#author("2023-11-23T03:53:17+00:00","default:iseki","iseki")
* JupyterLab-Blockly [#bc1f1dfa]
*** Links [#q47b9417]
- https://jupyterlab-blockly.readthedocs.io/en/latest/
- https://blockly.games/about?lang=ja
** Devel [#o0648b1c]
- ブロックの作成
-- https://developers.google.com/blockly/guides/create-custom-blocks/overview?hl=ja
- Blockly Developer Tools
-- https://blockly-demo.appspot.com/static/demos/blockfactory/index.html?hl=ja
*** 開発 Install [#t3a1bfb6]
git clone https://github.com/QuantStack/jupyterlab-blockly.git
cd jupyterlab-blockly
pre-commit install # 多分いらない
pip install -e ".[dev]"
jupyter labextension develop . --overwrite
jlpm build
chmod -R a+rx . # 必要に応じて
jupyter labextension list
pip uninstall jupyterlab-blockly # pip でインストールした分を消す
jupyter labextension list # 確認
*** Uninstall [#kcd5b08c]
**** pip [#ec54ac88]
pip uninstall jupyterlab_blockly
**** labextension [#t0deae0a]
jupyter labextension uninstall jupyterlab-broccoli-extension
- 消せない場合は,実際のファイルを削除
\rm -r /usr/local/share/jupyter/labextensions/jupyterlab-broccoli-extension/
ls -l /usr/local/share/jupyter/labextensions
jupyter labextension list
*** Packaging [#rbf9909f]
pip install build twine
python -m build
- pip install build twine は一回だけ
- python -m build で dist/ に tar Ball ができる.
- tar Ball は jupyter labextension install tar_ball でインストール
*** クラス階層 [#kb102fe1]
JupyterFrontEndPlugin
|
BlocklyEditorFactory --> BlocklyRegistry
|(複数)
+---------------+-------------------------+
| | |
BlocklyManager BlocklyPanel(SplitPanel) BlocklyEditor(DocumentWidget)
|
BlocklyLayout(SplitLayout)
- Factory, registry は1個のみ
*** イベント [#j2d7d6bc]
- [[操作イベントのハンドル>./HandleEvent]]
- [[Blockly イベント>./Blockly Event]]
*** 部品 [#qce73ca5]
- CodeCell
-- outputArea (OutputArea)
--- node ([[HTMLElement>./HTMLElement]]) -- [[style>./HTMLElement/style]]