google / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
12.51k stars 3.72k forks source link

Allow importing additional types (PuzzleTab, FlyoutItem, ImageProperties) #8621

Closed mikeharv closed 3 weeks ago

mikeharv commented 1 month ago

Check for duplicates

Problem

No response

Request

For some of our customization, we need to work with some Blockly types that are not available with the standard import of Blockly core.

Specifically, we've had to create local interface definitions for the following:

These interfaces are exported from these files and used through the core Blockly repo, but don't seem to exported such that they can be accessed off of the imported Blockly object. Previously, we have been managing to access these types via deep imports, but as that will no longer work with v11, we've need to switch to re-defining each of these ourselves.

Alternatives considered

With v10 and earlier, our build tools supported deep importing from Blockly to access these types. For v11, until this issue is resolved, we'll need to maintain duplicate definitions for each type.

Additional context

No response

gonfunko commented 3 weeks ago

Thanks for reporting! PuzzleTab should be available as Blockly.blockRendering.PuzzleTab - does that work for you? I've opened a PR to export the others along with some other missing types.