How penguinmod/penguinmod-blocks works
PenguinMod-Blocks is a visual-programming editor library with vertical Scratch-style blocks and a horizontal, icon-oriented grammar. An embedding application presents the editor to users, who assemble connected blocks into programs; the README positions the library as an interface layer used with a virtual machine, rather than as a code generator. The tree also shows block-category definitions, drag/connection behavior, and localization conversion. Source excerpts confirm the dragger-to-insertion-marker relationship and the shim entry points; other runtime relationships are kept out where the supplied evidence does not establish them.
Main entry points: common.py Translation helpers · vertical.js Vertical entry · horizontal.js Horizontal entry · insertion_marker_manager.js Insertion markers
Components 19
Editor runtime
- Vertical entry
shim/vertical.js - Horizontal entry
shim/horizontal.js - Workspace
core/workspace.js - Block model
core/block.js - Block rendering
core/block_render.js
Block interaction
- Block dragging
core/block_dragger.js - Insertion markers
core/insertion_marker_manager.js - Connections
core/connection.js
Block grammars
- Vertical categories
blocks_vertical/control.js - Default toolbox
blocks_vertical/default_toolbox.js - Shared blocks
blocks_common/math.js
Localization
- Message catalogs
msg/messages.js - Scratch messages
msg/scratch_msgs.js - Translation helpers
i18n/common.py - XLIFF converter
i18n/xliff_to_json.py - Message extractor
i18n/js_to_json.py - Message generator
i18n/create_messages.py
Other components
- Editor user
- Embedding app
Connections 10
- Editor user → Embedding app: uses editor
- Embedding app → Vertical entry: loads vertical
- Embedding app → Horizontal entry: loads horizontal
- Vertical entry → Scratch messages: imports messages
shim/vertical.js - Horizontal entry → Scratch messages: imports messages
shim/horizontal.js - Block dragging → Insertion markers: creates manager
core/block_dragger.js - Insertion markers → Connections: connects blocks
core/insertion_marker_manager.js - XLIFF converter → Translation helpers: uses helpers
i18n/xliff_to_json.py - Message extractor → Translation helpers: writes via
i18n/js_to_json.py - Message generator → Translation helpers: uses helpers
i18n/create_messages.py