js-draw 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/bundle.js +1 -1
- package/package.json +3 -2
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -34
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/ISSUE_TEMPLATE/translation.yml +0 -902
- package/.github/pull_request_template.md +0 -15
- package/.github/workflows/firebase-hosting-merge.yml +0 -34
- package/.github/workflows/firebase-hosting-pull-request.yml +0 -34
- package/.github/workflows/github-pages.yml +0 -58
- package/.husky/pre-commit +0 -4
- package/build_tools/BundledFile.ts +0 -167
- package/build_tools/buildTranslationTemplate.ts +0 -121
- package/build_tools/bundle.ts +0 -11
- package/build_tools/postDist.ts +0 -71
- package/dist/cjs/build_tools/BundledFile.d.ts +0 -13
- package/dist/cjs/build_tools/BundledFile.js +0 -163
- package/dist/cjs/build_tools/buildTranslationTemplate.d.ts +0 -1
- package/dist/cjs/build_tools/buildTranslationTemplate.js +0 -119
- package/dist/cjs/build_tools/bundle.d.ts +0 -1
- package/dist/cjs/build_tools/bundle.js +0 -10
- package/dist/cjs/build_tools/postDist.d.ts +0 -1
- package/dist/cjs/build_tools/postDist.js +0 -72
- package/dist/cjs/src/Color4.d.ts +0 -61
- package/dist/cjs/src/Color4.js +0 -197
- package/dist/cjs/src/Editor.d.ts +0 -308
- package/dist/cjs/src/Editor.js +0 -904
- package/dist/cjs/src/EditorImage.d.ts +0 -97
- package/dist/cjs/src/EditorImage.js +0 -486
- package/dist/cjs/src/EventDispatcher.d.ts +0 -30
- package/dist/cjs/src/EventDispatcher.js +0 -57
- package/dist/cjs/src/Pointer.d.ts +0 -24
- package/dist/cjs/src/Pointer.js +0 -84
- package/dist/cjs/src/SVGLoader.d.ts +0 -48
- package/dist/cjs/src/SVGLoader.js +0 -472
- package/dist/cjs/src/UndoRedoHistory.d.ts +0 -19
- package/dist/cjs/src/UndoRedoHistory.js +0 -93
- package/dist/cjs/src/Viewport.d.ts +0 -71
- package/dist/cjs/src/Viewport.js +0 -264
- package/dist/cjs/src/bundle/bundled.d.ts +0 -4
- package/dist/cjs/src/bundle/bundled.js +0 -24
- package/dist/cjs/src/commands/Command.d.ts +0 -16
- package/dist/cjs/src/commands/Command.js +0 -34
- package/dist/cjs/src/commands/Duplicate.d.ts +0 -14
- package/dist/cjs/src/commands/Duplicate.js +0 -39
- package/dist/cjs/src/commands/Erase.d.ts +0 -14
- package/dist/cjs/src/commands/Erase.js +0 -63
- package/dist/cjs/src/commands/SerializableCommand.d.ts +0 -12
- package/dist/cjs/src/commands/SerializableCommand.js +0 -42
- package/dist/cjs/src/commands/UnresolvedCommand.d.ts +0 -14
- package/dist/cjs/src/commands/UnresolvedCommand.js +0 -28
- package/dist/cjs/src/commands/invertCommand.d.ts +0 -4
- package/dist/cjs/src/commands/invertCommand.js +0 -49
- package/dist/cjs/src/commands/lib.d.ts +0 -7
- package/dist/cjs/src/commands/lib.js +0 -18
- package/dist/cjs/src/commands/localization.d.ts +0 -23
- package/dist/cjs/src/commands/localization.js +0 -24
- package/dist/cjs/src/commands/uniteCommands.d.ts +0 -4
- package/dist/cjs/src/commands/uniteCommands.js +0 -121
- package/dist/cjs/src/components/AbstractComponent.d.ts +0 -73
- package/dist/cjs/src/components/AbstractComponent.js +0 -258
- package/dist/cjs/src/components/ImageBackground.d.ts +0 -42
- package/dist/cjs/src/components/ImageBackground.js +0 -146
- package/dist/cjs/src/components/ImageComponent.d.ts +0 -31
- package/dist/cjs/src/components/ImageComponent.js +0 -152
- package/dist/cjs/src/components/RestylableComponent.d.ts +0 -24
- package/dist/cjs/src/components/RestylableComponent.js +0 -88
- package/dist/cjs/src/components/SVGGlobalAttributesObject.d.ts +0 -21
- package/dist/cjs/src/components/SVGGlobalAttributesObject.js +0 -65
- package/dist/cjs/src/components/Stroke.d.ts +0 -40
- package/dist/cjs/src/components/Stroke.js +0 -191
- package/dist/cjs/src/components/TextComponent.d.ts +0 -53
- package/dist/cjs/src/components/TextComponent.js +0 -258
- package/dist/cjs/src/components/UnknownSVGObject.d.ts +0 -18
- package/dist/cjs/src/components/UnknownSVGObject.js +0 -50
- package/dist/cjs/src/components/builders/ArrowBuilder.d.ts +0 -19
- package/dist/cjs/src/components/builders/ArrowBuilder.js +0 -117
- package/dist/cjs/src/components/builders/FreehandLineBuilder.d.ts +0 -33
- package/dist/cjs/src/components/builders/FreehandLineBuilder.js +0 -173
- package/dist/cjs/src/components/builders/LineBuilder.d.ts +0 -18
- package/dist/cjs/src/components/builders/LineBuilder.js +0 -89
- package/dist/cjs/src/components/builders/PressureSensitiveFreehandLineBuilder.d.ts +0 -36
- package/dist/cjs/src/components/builders/PressureSensitiveFreehandLineBuilder.js +0 -347
- package/dist/cjs/src/components/builders/RectangleBuilder.d.ts +0 -20
- package/dist/cjs/src/components/builders/RectangleBuilder.js +0 -59
- package/dist/cjs/src/components/builders/types.d.ts +0 -12
- package/dist/cjs/src/components/builders/types.js +0 -2
- package/dist/cjs/src/components/lib.d.ts +0 -12
- package/dist/cjs/src/components/lib.js +0 -43
- package/dist/cjs/src/components/localization.d.ts +0 -11
- package/dist/cjs/src/components/localization.js +0 -13
- package/dist/cjs/src/components/util/StrokeSmoother.d.ts +0 -35
- package/dist/cjs/src/components/util/StrokeSmoother.js +0 -217
- package/dist/cjs/src/components/util/describeComponentList.d.ts +0 -4
- package/dist/cjs/src/components/util/describeComponentList.js +0 -16
- package/dist/cjs/src/lib.d.ts +0 -34
- package/dist/cjs/src/lib.js +0 -63
- package/dist/cjs/src/localization.d.ts +0 -14
- package/dist/cjs/src/localization.js +0 -13
- package/dist/cjs/src/localizations/de.d.ts +0 -3
- package/dist/cjs/src/localizations/de.js +0 -6
- package/dist/cjs/src/localizations/en.d.ts +0 -3
- package/dist/cjs/src/localizations/en.js +0 -6
- package/dist/cjs/src/localizations/es.d.ts +0 -3
- package/dist/cjs/src/localizations/es.js +0 -20
- package/dist/cjs/src/localizations/getLocalizationTable.d.ts +0 -3
- package/dist/cjs/src/localizations/getLocalizationTable.js +0 -50
- package/dist/cjs/src/math/LineSegment2.d.ts +0 -24
- package/dist/cjs/src/math/LineSegment2.js +0 -131
- package/dist/cjs/src/math/Mat33.d.ts +0 -118
- package/dist/cjs/src/math/Mat33.js +0 -332
- package/dist/cjs/src/math/Path.d.ts +0 -71
- package/dist/cjs/src/math/Path.js +0 -655
- package/dist/cjs/src/math/Rect2.d.ts +0 -52
- package/dist/cjs/src/math/Rect2.js +0 -234
- package/dist/cjs/src/math/Triangle.d.ts +0 -11
- package/dist/cjs/src/math/Triangle.js +0 -22
- package/dist/cjs/src/math/Vec2.d.ts +0 -13
- package/dist/cjs/src/math/Vec2.js +0 -19
- package/dist/cjs/src/math/Vec3.d.ts +0 -106
- package/dist/cjs/src/math/Vec3.js +0 -177
- package/dist/cjs/src/math/lib.d.ts +0 -7
- package/dist/cjs/src/math/lib.js +0 -18
- package/dist/cjs/src/math/rounding.d.ts +0 -4
- package/dist/cjs/src/math/rounding.js +0 -135
- package/dist/cjs/src/rendering/Display.d.ts +0 -75
- package/dist/cjs/src/rendering/Display.js +0 -214
- package/dist/cjs/src/rendering/RenderingStyle.d.ts +0 -31
- package/dist/cjs/src/rendering/RenderingStyle.js +0 -48
- package/dist/cjs/src/rendering/TextRenderingStyle.d.ts +0 -36
- package/dist/cjs/src/rendering/TextRenderingStyle.js +0 -29
- package/dist/cjs/src/rendering/caching/CacheRecord.d.ts +0 -20
- package/dist/cjs/src/rendering/caching/CacheRecord.js +0 -61
- package/dist/cjs/src/rendering/caching/CacheRecordManager.d.ts +0 -12
- package/dist/cjs/src/rendering/caching/CacheRecordManager.js +0 -50
- package/dist/cjs/src/rendering/caching/RenderingCache.d.ts +0 -11
- package/dist/cjs/src/rendering/caching/RenderingCache.js +0 -51
- package/dist/cjs/src/rendering/caching/RenderingCacheNode.d.ts +0 -29
- package/dist/cjs/src/rendering/caching/RenderingCacheNode.js +0 -326
- package/dist/cjs/src/rendering/caching/testUtils.d.ts +0 -9
- package/dist/cjs/src/rendering/caching/testUtils.js +0 -27
- package/dist/cjs/src/rendering/caching/types.d.ts +0 -19
- package/dist/cjs/src/rendering/caching/types.js +0 -2
- package/dist/cjs/src/rendering/lib.d.ts +0 -5
- package/dist/cjs/src/rendering/lib.js +0 -16
- package/dist/cjs/src/rendering/localization.d.ts +0 -10
- package/dist/cjs/src/rendering/localization.js +0 -12
- package/dist/cjs/src/rendering/renderers/AbstractRenderer.d.ts +0 -68
- package/dist/cjs/src/rendering/renderers/AbstractRenderer.js +0 -170
- package/dist/cjs/src/rendering/renderers/CanvasRenderer.d.ts +0 -63
- package/dist/cjs/src/rendering/renderers/CanvasRenderer.js +0 -236
- package/dist/cjs/src/rendering/renderers/DummyRenderer.d.ts +0 -35
- package/dist/cjs/src/rendering/renderers/DummyRenderer.js +0 -112
- package/dist/cjs/src/rendering/renderers/SVGRenderer.d.ts +0 -57
- package/dist/cjs/src/rendering/renderers/SVGRenderer.js +0 -311
- package/dist/cjs/src/rendering/renderers/TextOnlyRenderer.d.ts +0 -29
- package/dist/cjs/src/rendering/renderers/TextOnlyRenderer.js +0 -63
- package/dist/cjs/src/testing/beforeEachFile.d.ts +0 -1
- package/dist/cjs/src/testing/beforeEachFile.js +0 -12
- package/dist/cjs/src/testing/createEditor.d.ts +0 -4
- package/dist/cjs/src/testing/createEditor.js +0 -14
- package/dist/cjs/src/testing/lib.d.ts +0 -2
- package/dist/cjs/src/testing/lib.js +0 -10
- package/dist/cjs/src/testing/loadExpectExtensions.d.ts +0 -2
- package/dist/cjs/src/testing/loadExpectExtensions.js +0 -28
- package/dist/cjs/src/testing/sendPenEvent.d.ts +0 -12
- package/dist/cjs/src/testing/sendPenEvent.js +0 -24
- package/dist/cjs/src/testing/sendTouchEvent.d.ts +0 -42
- package/dist/cjs/src/testing/sendTouchEvent.js +0 -87
- package/dist/cjs/src/toolbar/HTMLToolbar.d.ts +0 -103
- package/dist/cjs/src/toolbar/HTMLToolbar.js +0 -383
- package/dist/cjs/src/toolbar/IconProvider.d.ts +0 -62
- package/dist/cjs/src/toolbar/IconProvider.js +0 -660
- package/dist/cjs/src/toolbar/lib.d.ts +0 -3
- package/dist/cjs/src/toolbar/lib.js +0 -24
- package/dist/cjs/src/toolbar/localization.d.ts +0 -49
- package/dist/cjs/src/toolbar/localization.js +0 -51
- package/dist/cjs/src/toolbar/makeColorInput.d.ts +0 -6
- package/dist/cjs/src/toolbar/makeColorInput.js +0 -120
- package/dist/cjs/src/toolbar/types.d.ts +0 -4
- package/dist/cjs/src/toolbar/types.js +0 -2
- package/dist/cjs/src/toolbar/widgets/ActionButtonWidget.d.ts +0 -15
- package/dist/cjs/src/toolbar/widgets/ActionButtonWidget.js +0 -31
- package/dist/cjs/src/toolbar/widgets/BaseToolWidget.d.ts +0 -11
- package/dist/cjs/src/toolbar/widgets/BaseToolWidget.js +0 -50
- package/dist/cjs/src/toolbar/widgets/BaseWidget.d.ts +0 -72
- package/dist/cjs/src/toolbar/widgets/BaseWidget.js +0 -313
- package/dist/cjs/src/toolbar/widgets/DocumentPropertiesWidget.d.ts +0 -18
- package/dist/cjs/src/toolbar/widgets/DocumentPropertiesWidget.js +0 -126
- package/dist/cjs/src/toolbar/widgets/EraserToolWidget.d.ts +0 -17
- package/dist/cjs/src/toolbar/widgets/EraserToolWidget.js +0 -63
- package/dist/cjs/src/toolbar/widgets/HandToolWidget.d.ts +0 -17
- package/dist/cjs/src/toolbar/widgets/HandToolWidget.js +0 -201
- package/dist/cjs/src/toolbar/widgets/InsertImageWidget.d.ts +0 -19
- package/dist/cjs/src/toolbar/widgets/InsertImageWidget.js +0 -176
- package/dist/cjs/src/toolbar/widgets/OverflowWidget.d.ts +0 -25
- package/dist/cjs/src/toolbar/widgets/OverflowWidget.js +0 -77
- package/dist/cjs/src/toolbar/widgets/PenToolWidget.d.ts +0 -27
- package/dist/cjs/src/toolbar/widgets/PenToolWidget.js +0 -226
- package/dist/cjs/src/toolbar/widgets/SelectionToolWidget.d.ts +0 -13
- package/dist/cjs/src/toolbar/widgets/SelectionToolWidget.js +0 -153
- package/dist/cjs/src/toolbar/widgets/TextToolWidget.d.ts +0 -16
- package/dist/cjs/src/toolbar/widgets/TextToolWidget.js +0 -115
- package/dist/cjs/src/toolbar/widgets/lib.d.ts +0 -10
- package/dist/cjs/src/toolbar/widgets/lib.js +0 -26
- package/dist/cjs/src/tools/BaseTool.d.ts +0 -22
- package/dist/cjs/src/tools/BaseTool.js +0 -66
- package/dist/cjs/src/tools/Eraser.d.ts +0 -23
- package/dist/cjs/src/tools/Eraser.js +0 -112
- package/dist/cjs/src/tools/FindTool.d.ts +0 -21
- package/dist/cjs/src/tools/FindTool.js +0 -121
- package/dist/cjs/src/tools/PanZoom.d.ts +0 -52
- package/dist/cjs/src/tools/PanZoom.js +0 -421
- package/dist/cjs/src/tools/PasteHandler.d.ts +0 -23
- package/dist/cjs/src/tools/PasteHandler.js +0 -99
- package/dist/cjs/src/tools/Pen.d.ts +0 -39
- package/dist/cjs/src/tools/Pen.js +0 -179
- package/dist/cjs/src/tools/PipetteTool.d.ts +0 -18
- package/dist/cjs/src/tools/PipetteTool.js +0 -45
- package/dist/cjs/src/tools/SelectionTool/SelectAllShortcutHandler.d.ts +0 -8
- package/dist/cjs/src/tools/SelectionTool/SelectAllShortcutHandler.js +0 -28
- package/dist/cjs/src/tools/SelectionTool/Selection.d.ts +0 -64
- package/dist/cjs/src/tools/SelectionTool/Selection.js +0 -488
- package/dist/cjs/src/tools/SelectionTool/SelectionHandle.d.ts +0 -38
- package/dist/cjs/src/tools/SelectionTool/SelectionHandle.js +0 -85
- package/dist/cjs/src/tools/SelectionTool/SelectionTool.d.ts +0 -36
- package/dist/cjs/src/tools/SelectionTool/SelectionTool.js +0 -405
- package/dist/cjs/src/tools/SelectionTool/TransformMode.d.ts +0 -34
- package/dist/cjs/src/tools/SelectionTool/TransformMode.js +0 -107
- package/dist/cjs/src/tools/SelectionTool/types.d.ts +0 -9
- package/dist/cjs/src/tools/SelectionTool/types.js +0 -14
- package/dist/cjs/src/tools/TextTool.d.ts +0 -33
- package/dist/cjs/src/tools/TextTool.js +0 -262
- package/dist/cjs/src/tools/ToolController.d.ts +0 -18
- package/dist/cjs/src/tools/ToolController.js +0 -187
- package/dist/cjs/src/tools/ToolEnabledGroup.d.ts +0 -6
- package/dist/cjs/src/tools/ToolEnabledGroup.js +0 -14
- package/dist/cjs/src/tools/ToolSwitcherShortcut.d.ts +0 -16
- package/dist/cjs/src/tools/ToolSwitcherShortcut.js +0 -38
- package/dist/cjs/src/tools/ToolbarShortcutHandler.d.ts +0 -12
- package/dist/cjs/src/tools/ToolbarShortcutHandler.js +0 -29
- package/dist/cjs/src/tools/UndoRedoShortcut.d.ts +0 -8
- package/dist/cjs/src/tools/UndoRedoShortcut.js +0 -28
- package/dist/cjs/src/tools/lib.d.ts +0 -16
- package/dist/cjs/src/tools/lib.js +0 -36
- package/dist/cjs/src/tools/localization.d.ts +0 -28
- package/dist/cjs/src/tools/localization.js +0 -30
- package/dist/cjs/src/types.d.ts +0 -151
- package/dist/cjs/src/types.js +0 -38
- package/dist/cjs/src/util/assertions.d.ts +0 -23
- package/dist/cjs/src/util/assertions.js +0 -51
- package/dist/cjs/src/util/fileToBase64.d.ts +0 -3
- package/dist/cjs/src/util/fileToBase64.js +0 -15
- package/dist/cjs/src/util/untilNextAnimationFrame.d.ts +0 -3
- package/dist/cjs/src/util/untilNextAnimationFrame.js +0 -9
- package/dist/cjs/src/util/waitForTimeout.d.ts +0 -2
- package/dist/cjs/src/util/waitForTimeout.js +0 -9
- package/dist/mjs/build_tools/BundledFile.d.ts +0 -13
- package/dist/mjs/build_tools/BundledFile.mjs +0 -157
- package/dist/mjs/build_tools/buildTranslationTemplate.d.ts +0 -1
- package/dist/mjs/build_tools/buildTranslationTemplate.mjs +0 -94
- package/dist/mjs/build_tools/bundle.d.ts +0 -1
- package/dist/mjs/build_tools/bundle.mjs +0 -5
- package/dist/mjs/build_tools/postDist.d.ts +0 -1
- package/dist/mjs/build_tools/postDist.mjs +0 -67
- package/dist/mjs/src/Color4.d.ts +0 -61
- package/dist/mjs/src/Color4.mjs +0 -193
- package/dist/mjs/src/Editor.d.ts +0 -308
- package/dist/mjs/src/Editor.mjs +0 -874
- package/dist/mjs/src/EditorImage.d.ts +0 -97
- package/dist/mjs/src/EditorImage.mjs +0 -477
- package/dist/mjs/src/EventDispatcher.d.ts +0 -30
- package/dist/mjs/src/EventDispatcher.mjs +0 -54
- package/dist/mjs/src/Pointer.d.ts +0 -24
- package/dist/mjs/src/Pointer.mjs +0 -80
- package/dist/mjs/src/SVGLoader.d.ts +0 -48
- package/dist/mjs/src/SVGLoader.mjs +0 -442
- package/dist/mjs/src/UndoRedoHistory.d.ts +0 -19
- package/dist/mjs/src/UndoRedoHistory.mjs +0 -91
- package/dist/mjs/src/Viewport.d.ts +0 -71
- package/dist/mjs/src/Viewport.mjs +0 -256
- package/dist/mjs/src/bundle/bundled.d.ts +0 -4
- package/dist/mjs/src/bundle/bundled.mjs +0 -5
- package/dist/mjs/src/commands/Command.d.ts +0 -16
- package/dist/mjs/src/commands/Command.mjs +0 -30
- package/dist/mjs/src/commands/Duplicate.d.ts +0 -14
- package/dist/mjs/src/commands/Duplicate.mjs +0 -33
- package/dist/mjs/src/commands/Erase.d.ts +0 -14
- package/dist/mjs/src/commands/Erase.mjs +0 -57
- package/dist/mjs/src/commands/SerializableCommand.d.ts +0 -12
- package/dist/mjs/src/commands/SerializableCommand.mjs +0 -36
- package/dist/mjs/src/commands/UnresolvedCommand.d.ts +0 -14
- package/dist/mjs/src/commands/UnresolvedCommand.mjs +0 -22
- package/dist/mjs/src/commands/invertCommand.d.ts +0 -4
- package/dist/mjs/src/commands/invertCommand.mjs +0 -44
- package/dist/mjs/src/commands/lib.d.ts +0 -7
- package/dist/mjs/src/commands/lib.mjs +0 -7
- package/dist/mjs/src/commands/localization.d.ts +0 -23
- package/dist/mjs/src/commands/localization.mjs +0 -21
- package/dist/mjs/src/commands/uniteCommands.d.ts +0 -4
- package/dist/mjs/src/commands/uniteCommands.mjs +0 -116
- package/dist/mjs/src/components/AbstractComponent.d.ts +0 -73
- package/dist/mjs/src/components/AbstractComponent.mjs +0 -252
- package/dist/mjs/src/components/ImageBackground.d.ts +0 -42
- package/dist/mjs/src/components/ImageBackground.mjs +0 -139
- package/dist/mjs/src/components/ImageComponent.d.ts +0 -31
- package/dist/mjs/src/components/ImageComponent.mjs +0 -146
- package/dist/mjs/src/components/RestylableComponent.d.ts +0 -24
- package/dist/mjs/src/components/RestylableComponent.mjs +0 -80
- package/dist/mjs/src/components/SVGGlobalAttributesObject.d.ts +0 -21
- package/dist/mjs/src/components/SVGGlobalAttributesObject.mjs +0 -59
- package/dist/mjs/src/components/Stroke.d.ts +0 -40
- package/dist/mjs/src/components/Stroke.mjs +0 -185
- package/dist/mjs/src/components/TextComponent.d.ts +0 -53
- package/dist/mjs/src/components/TextComponent.mjs +0 -252
- package/dist/mjs/src/components/UnknownSVGObject.d.ts +0 -18
- package/dist/mjs/src/components/UnknownSVGObject.mjs +0 -44
- package/dist/mjs/src/components/builders/ArrowBuilder.d.ts +0 -19
- package/dist/mjs/src/components/builders/ArrowBuilder.mjs +0 -86
- package/dist/mjs/src/components/builders/FreehandLineBuilder.d.ts +0 -33
- package/dist/mjs/src/components/builders/FreehandLineBuilder.mjs +0 -165
- package/dist/mjs/src/components/builders/LineBuilder.d.ts +0 -18
- package/dist/mjs/src/components/builders/LineBuilder.mjs +0 -58
- package/dist/mjs/src/components/builders/PressureSensitiveFreehandLineBuilder.d.ts +0 -36
- package/dist/mjs/src/components/builders/PressureSensitiveFreehandLineBuilder.mjs +0 -339
- package/dist/mjs/src/components/builders/RectangleBuilder.d.ts +0 -20
- package/dist/mjs/src/components/builders/RectangleBuilder.mjs +0 -50
- package/dist/mjs/src/components/builders/types.d.ts +0 -12
- package/dist/mjs/src/components/builders/types.mjs +0 -1
- package/dist/mjs/src/components/lib.d.ts +0 -12
- package/dist/mjs/src/components/lib.mjs +0 -12
- package/dist/mjs/src/components/localization.d.ts +0 -11
- package/dist/mjs/src/components/localization.mjs +0 -10
- package/dist/mjs/src/components/util/StrokeSmoother.d.ts +0 -35
- package/dist/mjs/src/components/util/StrokeSmoother.mjs +0 -210
- package/dist/mjs/src/components/util/describeComponentList.d.ts +0 -4
- package/dist/mjs/src/components/util/describeComponentList.mjs +0 -14
- package/dist/mjs/src/lib.d.ts +0 -34
- package/dist/mjs/src/lib.mjs +0 -34
- package/dist/mjs/src/localization.d.ts +0 -14
- package/dist/mjs/src/localization.mjs +0 -10
- package/dist/mjs/src/localizations/de.d.ts +0 -3
- package/dist/mjs/src/localizations/de.mjs +0 -4
- package/dist/mjs/src/localizations/en.d.ts +0 -3
- package/dist/mjs/src/localizations/en.mjs +0 -4
- package/dist/mjs/src/localizations/es.d.ts +0 -3
- package/dist/mjs/src/localizations/es.mjs +0 -18
- package/dist/mjs/src/localizations/getLocalizationTable.d.ts +0 -3
- package/dist/mjs/src/localizations/getLocalizationTable.mjs +0 -45
- package/dist/mjs/src/math/LineSegment2.d.ts +0 -24
- package/dist/mjs/src/math/LineSegment2.mjs +0 -125
- package/dist/mjs/src/math/Mat33.d.ts +0 -118
- package/dist/mjs/src/math/Mat33.mjs +0 -326
- package/dist/mjs/src/math/Path.d.ts +0 -71
- package/dist/mjs/src/math/Path.mjs +0 -648
- package/dist/mjs/src/math/Rect2.d.ts +0 -52
- package/dist/mjs/src/math/Rect2.mjs +0 -228
- package/dist/mjs/src/math/Triangle.d.ts +0 -11
- package/dist/mjs/src/math/Triangle.mjs +0 -19
- package/dist/mjs/src/math/Vec2.d.ts +0 -13
- package/dist/mjs/src/math/Vec2.mjs +0 -13
- package/dist/mjs/src/math/Vec3.d.ts +0 -106
- package/dist/mjs/src/math/Vec3.mjs +0 -174
- package/dist/mjs/src/math/lib.d.ts +0 -7
- package/dist/mjs/src/math/lib.mjs +0 -7
- package/dist/mjs/src/math/rounding.d.ts +0 -4
- package/dist/mjs/src/math/rounding.mjs +0 -128
- package/dist/mjs/src/rendering/Display.d.ts +0 -75
- package/dist/mjs/src/rendering/Display.mjs +0 -207
- package/dist/mjs/src/rendering/RenderingStyle.d.ts +0 -31
- package/dist/mjs/src/rendering/RenderingStyle.mjs +0 -38
- package/dist/mjs/src/rendering/TextRenderingStyle.d.ts +0 -36
- package/dist/mjs/src/rendering/TextRenderingStyle.mjs +0 -23
- package/dist/mjs/src/rendering/caching/CacheRecord.d.ts +0 -20
- package/dist/mjs/src/rendering/caching/CacheRecord.mjs +0 -55
- package/dist/mjs/src/rendering/caching/CacheRecordManager.d.ts +0 -12
- package/dist/mjs/src/rendering/caching/CacheRecordManager.mjs +0 -43
- package/dist/mjs/src/rendering/caching/RenderingCache.d.ts +0 -11
- package/dist/mjs/src/rendering/caching/RenderingCache.mjs +0 -45
- package/dist/mjs/src/rendering/caching/RenderingCacheNode.d.ts +0 -29
- package/dist/mjs/src/rendering/caching/RenderingCacheNode.mjs +0 -320
- package/dist/mjs/src/rendering/caching/testUtils.d.ts +0 -9
- package/dist/mjs/src/rendering/caching/testUtils.mjs +0 -20
- package/dist/mjs/src/rendering/caching/types.d.ts +0 -19
- package/dist/mjs/src/rendering/caching/types.mjs +0 -1
- package/dist/mjs/src/rendering/lib.d.ts +0 -5
- package/dist/mjs/src/rendering/lib.mjs +0 -5
- package/dist/mjs/src/rendering/localization.d.ts +0 -10
- package/dist/mjs/src/rendering/localization.mjs +0 -9
- package/dist/mjs/src/rendering/renderers/AbstractRenderer.d.ts +0 -68
- package/dist/mjs/src/rendering/renderers/AbstractRenderer.mjs +0 -144
- package/dist/mjs/src/rendering/renderers/CanvasRenderer.d.ts +0 -63
- package/dist/mjs/src/rendering/renderers/CanvasRenderer.mjs +0 -230
- package/dist/mjs/src/rendering/renderers/DummyRenderer.d.ts +0 -35
- package/dist/mjs/src/rendering/renderers/DummyRenderer.mjs +0 -106
- package/dist/mjs/src/rendering/renderers/SVGRenderer.d.ts +0 -57
- package/dist/mjs/src/rendering/renderers/SVGRenderer.mjs +0 -304
- package/dist/mjs/src/rendering/renderers/TextOnlyRenderer.d.ts +0 -29
- package/dist/mjs/src/rendering/renderers/TextOnlyRenderer.mjs +0 -57
- package/dist/mjs/src/testing/beforeEachFile.d.ts +0 -1
- package/dist/mjs/src/testing/beforeEachFile.mjs +0 -7
- package/dist/mjs/src/testing/createEditor.d.ts +0 -4
- package/dist/mjs/src/testing/createEditor.mjs +0 -9
- package/dist/mjs/src/testing/lib.d.ts +0 -2
- package/dist/mjs/src/testing/lib.mjs +0 -2
- package/dist/mjs/src/testing/loadExpectExtensions.d.ts +0 -2
- package/dist/mjs/src/testing/loadExpectExtensions.mjs +0 -24
- package/dist/mjs/src/testing/sendPenEvent.d.ts +0 -12
- package/dist/mjs/src/testing/sendPenEvent.mjs +0 -19
- package/dist/mjs/src/testing/sendTouchEvent.d.ts +0 -42
- package/dist/mjs/src/testing/sendTouchEvent.mjs +0 -62
- package/dist/mjs/src/toolbar/HTMLToolbar.d.ts +0 -103
- package/dist/mjs/src/toolbar/HTMLToolbar.mjs +0 -376
- package/dist/mjs/src/toolbar/IconProvider.d.ts +0 -62
- package/dist/mjs/src/toolbar/IconProvider.mjs +0 -654
- package/dist/mjs/src/toolbar/lib.d.ts +0 -3
- package/dist/mjs/src/toolbar/lib.mjs +0 -3
- package/dist/mjs/src/toolbar/localization.d.ts +0 -49
- package/dist/mjs/src/toolbar/localization.mjs +0 -48
- package/dist/mjs/src/toolbar/makeColorInput.d.ts +0 -6
- package/dist/mjs/src/toolbar/makeColorInput.mjs +0 -113
- package/dist/mjs/src/toolbar/types.d.ts +0 -4
- package/dist/mjs/src/toolbar/types.mjs +0 -1
- package/dist/mjs/src/toolbar/widgets/ActionButtonWidget.d.ts +0 -15
- package/dist/mjs/src/toolbar/widgets/ActionButtonWidget.mjs +0 -25
- package/dist/mjs/src/toolbar/widgets/BaseToolWidget.d.ts +0 -11
- package/dist/mjs/src/toolbar/widgets/BaseToolWidget.mjs +0 -44
- package/dist/mjs/src/toolbar/widgets/BaseWidget.d.ts +0 -72
- package/dist/mjs/src/toolbar/widgets/BaseWidget.mjs +0 -307
- package/dist/mjs/src/toolbar/widgets/DocumentPropertiesWidget.d.ts +0 -18
- package/dist/mjs/src/toolbar/widgets/DocumentPropertiesWidget.mjs +0 -120
- package/dist/mjs/src/toolbar/widgets/EraserToolWidget.d.ts +0 -17
- package/dist/mjs/src/toolbar/widgets/EraserToolWidget.mjs +0 -57
- package/dist/mjs/src/toolbar/widgets/HandToolWidget.d.ts +0 -17
- package/dist/mjs/src/toolbar/widgets/HandToolWidget.mjs +0 -172
- package/dist/mjs/src/toolbar/widgets/InsertImageWidget.d.ts +0 -19
- package/dist/mjs/src/toolbar/widgets/InsertImageWidget.mjs +0 -170
- package/dist/mjs/src/toolbar/widgets/OverflowWidget.d.ts +0 -25
- package/dist/mjs/src/toolbar/widgets/OverflowWidget.mjs +0 -71
- package/dist/mjs/src/toolbar/widgets/PenToolWidget.d.ts +0 -27
- package/dist/mjs/src/toolbar/widgets/PenToolWidget.mjs +0 -220
- package/dist/mjs/src/toolbar/widgets/SelectionToolWidget.d.ts +0 -13
- package/dist/mjs/src/toolbar/widgets/SelectionToolWidget.mjs +0 -147
- package/dist/mjs/src/toolbar/widgets/TextToolWidget.d.ts +0 -16
- package/dist/mjs/src/toolbar/widgets/TextToolWidget.mjs +0 -109
- package/dist/mjs/src/toolbar/widgets/lib.d.ts +0 -10
- package/dist/mjs/src/toolbar/widgets/lib.mjs +0 -10
- package/dist/mjs/src/tools/BaseTool.d.ts +0 -22
- package/dist/mjs/src/tools/BaseTool.mjs +0 -63
- package/dist/mjs/src/tools/Eraser.d.ts +0 -23
- package/dist/mjs/src/tools/Eraser.mjs +0 -106
- package/dist/mjs/src/tools/FindTool.d.ts +0 -21
- package/dist/mjs/src/tools/FindTool.mjs +0 -114
- package/dist/mjs/src/tools/PanZoom.d.ts +0 -52
- package/dist/mjs/src/tools/PanZoom.mjs +0 -414
- package/dist/mjs/src/tools/PasteHandler.d.ts +0 -23
- package/dist/mjs/src/tools/PasteHandler.mjs +0 -93
- package/dist/mjs/src/tools/Pen.d.ts +0 -39
- package/dist/mjs/src/tools/Pen.mjs +0 -173
- package/dist/mjs/src/tools/PipetteTool.d.ts +0 -18
- package/dist/mjs/src/tools/PipetteTool.mjs +0 -39
- package/dist/mjs/src/tools/SelectionTool/SelectAllShortcutHandler.d.ts +0 -8
- package/dist/mjs/src/tools/SelectionTool/SelectAllShortcutHandler.mjs +0 -22
- package/dist/mjs/src/tools/SelectionTool/Selection.d.ts +0 -64
- package/dist/mjs/src/tools/SelectionTool/Selection.mjs +0 -459
- package/dist/mjs/src/tools/SelectionTool/SelectionHandle.d.ts +0 -38
- package/dist/mjs/src/tools/SelectionTool/SelectionHandle.mjs +0 -81
- package/dist/mjs/src/tools/SelectionTool/SelectionTool.d.ts +0 -36
- package/dist/mjs/src/tools/SelectionTool/SelectionTool.mjs +0 -398
- package/dist/mjs/src/tools/SelectionTool/TransformMode.d.ts +0 -34
- package/dist/mjs/src/tools/SelectionTool/TransformMode.mjs +0 -98
- package/dist/mjs/src/tools/SelectionTool/types.d.ts +0 -9
- package/dist/mjs/src/tools/SelectionTool/types.mjs +0 -11
- package/dist/mjs/src/tools/TextTool.d.ts +0 -33
- package/dist/mjs/src/tools/TextTool.mjs +0 -256
- package/dist/mjs/src/tools/ToolController.d.ts +0 -18
- package/dist/mjs/src/tools/ToolController.mjs +0 -158
- package/dist/mjs/src/tools/ToolEnabledGroup.d.ts +0 -6
- package/dist/mjs/src/tools/ToolEnabledGroup.mjs +0 -11
- package/dist/mjs/src/tools/ToolSwitcherShortcut.d.ts +0 -16
- package/dist/mjs/src/tools/ToolSwitcherShortcut.mjs +0 -32
- package/dist/mjs/src/tools/ToolbarShortcutHandler.d.ts +0 -12
- package/dist/mjs/src/tools/ToolbarShortcutHandler.mjs +0 -23
- package/dist/mjs/src/tools/UndoRedoShortcut.d.ts +0 -8
- package/dist/mjs/src/tools/UndoRedoShortcut.mjs +0 -22
- package/dist/mjs/src/tools/lib.d.ts +0 -16
- package/dist/mjs/src/tools/lib.mjs +0 -16
- package/dist/mjs/src/tools/localization.d.ts +0 -28
- package/dist/mjs/src/tools/localization.mjs +0 -27
- package/dist/mjs/src/types.d.ts +0 -151
- package/dist/mjs/src/types.mjs +0 -35
- package/dist/mjs/src/util/assertions.d.ts +0 -23
- package/dist/mjs/src/util/assertions.mjs +0 -45
- package/dist/mjs/src/util/fileToBase64.d.ts +0 -3
- package/dist/mjs/src/util/fileToBase64.mjs +0 -13
- package/dist/mjs/src/util/untilNextAnimationFrame.d.ts +0 -3
- package/dist/mjs/src/util/untilNextAnimationFrame.mjs +0 -7
- package/dist/mjs/src/util/waitForTimeout.d.ts +0 -2
- package/dist/mjs/src/util/waitForTimeout.mjs +0 -7
- package/src/Color4.test.ts +0 -40
- package/src/Color4.ts +0 -236
- package/src/Editor.css +0 -86
- package/src/Editor.loadFrom.test.ts +0 -24
- package/src/Editor.toSVG.test.ts +0 -111
- package/src/Editor.ts +0 -1122
- package/src/EditorImage.test.ts +0 -120
- package/src/EditorImage.ts +0 -603
- package/src/EventDispatcher.test.ts +0 -123
- package/src/EventDispatcher.ts +0 -71
- package/src/Pointer.ts +0 -127
- package/src/SVGLoader.test.ts +0 -114
- package/src/SVGLoader.ts +0 -511
- package/src/UndoRedoHistory.test.ts +0 -33
- package/src/UndoRedoHistory.ts +0 -102
- package/src/Viewport.ts +0 -319
- package/src/bundle/bundled.ts +0 -7
- package/src/commands/Command.ts +0 -45
- package/src/commands/Duplicate.ts +0 -48
- package/src/commands/Erase.ts +0 -74
- package/src/commands/SerializableCommand.ts +0 -49
- package/src/commands/UnresolvedCommand.ts +0 -37
- package/src/commands/invertCommand.ts +0 -51
- package/src/commands/lib.ts +0 -16
- package/src/commands/localization.ts +0 -47
- package/src/commands/uniteCommands.test.ts +0 -23
- package/src/commands/uniteCommands.ts +0 -135
- package/src/components/AbstractComponent.transformBy.test.ts +0 -22
- package/src/components/AbstractComponent.ts +0 -364
- package/src/components/ImageBackground.test.ts +0 -35
- package/src/components/ImageBackground.ts +0 -176
- package/src/components/ImageComponent.ts +0 -171
- package/src/components/RestylableComponent.ts +0 -142
- package/src/components/SVGGlobalAttributesObject.ts +0 -81
- package/src/components/Stroke.test.ts +0 -139
- package/src/components/Stroke.ts +0 -245
- package/src/components/TextComponent.test.ts +0 -99
- package/src/components/TextComponent.ts +0 -315
- package/src/components/UnknownSVGObject.test.ts +0 -10
- package/src/components/UnknownSVGObject.ts +0 -60
- package/src/components/builders/ArrowBuilder.ts +0 -107
- package/src/components/builders/FreehandLineBuilder.ts +0 -212
- package/src/components/builders/LineBuilder.ts +0 -77
- package/src/components/builders/PressureSensitiveFreehandLineBuilder.ts +0 -454
- package/src/components/builders/RectangleBuilder.ts +0 -74
- package/src/components/builders/types.ts +0 -15
- package/src/components/lib.ts +0 -25
- package/src/components/localization.ts +0 -22
- package/src/components/util/StrokeSmoother.ts +0 -293
- package/src/components/util/describeComponentList.ts +0 -18
- package/src/lib.ts +0 -37
- package/src/localization.ts +0 -34
- package/src/localizations/de.ts +0 -98
- package/src/localizations/en.ts +0 -8
- package/src/localizations/es.ts +0 -74
- package/src/localizations/getLocalizationTable.test.ts +0 -27
- package/src/localizations/getLocalizationTable.ts +0 -55
- package/src/math/LineSegment2.test.ts +0 -99
- package/src/math/LineSegment2.ts +0 -160
- package/src/math/Mat33.test.ts +0 -244
- package/src/math/Mat33.ts +0 -437
- package/src/math/Path.fromString.test.ts +0 -223
- package/src/math/Path.test.ts +0 -198
- package/src/math/Path.toString.test.ts +0 -77
- package/src/math/Path.ts +0 -790
- package/src/math/Rect2.test.ts +0 -204
- package/src/math/Rect2.ts +0 -315
- package/src/math/Triangle.ts +0 -29
- package/src/math/Vec2.test.ts +0 -30
- package/src/math/Vec2.ts +0 -18
- package/src/math/Vec3.test.ts +0 -44
- package/src/math/Vec3.ts +0 -218
- package/src/math/lib.ts +0 -15
- package/src/math/rounding.test.ts +0 -65
- package/src/math/rounding.ts +0 -156
- package/src/rendering/Display.ts +0 -249
- package/src/rendering/RenderingStyle.test.ts +0 -68
- package/src/rendering/RenderingStyle.ts +0 -55
- package/src/rendering/TextRenderingStyle.ts +0 -45
- package/src/rendering/caching/CacheRecord.test.ts +0 -49
- package/src/rendering/caching/CacheRecord.ts +0 -77
- package/src/rendering/caching/CacheRecordManager.ts +0 -71
- package/src/rendering/caching/RenderingCache.test.ts +0 -44
- package/src/rendering/caching/RenderingCache.ts +0 -66
- package/src/rendering/caching/RenderingCacheNode.ts +0 -405
- package/src/rendering/caching/testUtils.ts +0 -35
- package/src/rendering/caching/types.ts +0 -34
- package/src/rendering/lib.ts +0 -6
- package/src/rendering/localization.ts +0 -20
- package/src/rendering/renderers/AbstractRenderer.ts +0 -222
- package/src/rendering/renderers/CanvasRenderer.ts +0 -296
- package/src/rendering/renderers/DummyRenderer.test.ts +0 -42
- package/src/rendering/renderers/DummyRenderer.ts +0 -136
- package/src/rendering/renderers/SVGRenderer.ts +0 -354
- package/src/rendering/renderers/TextOnlyRenderer.ts +0 -70
- package/src/styles.js +0 -7
- package/src/testing/beforeEachFile.ts +0 -8
- package/src/testing/createEditor.ts +0 -11
- package/src/testing/global.d.ts +0 -17
- package/src/testing/lib.ts +0 -3
- package/src/testing/loadExpectExtensions.ts +0 -25
- package/src/testing/sendPenEvent.ts +0 -31
- package/src/testing/sendTouchEvent.ts +0 -78
- package/src/toolbar/HTMLToolbar.ts +0 -492
- package/src/toolbar/IconProvider.ts +0 -736
- package/src/toolbar/lib.ts +0 -4
- package/src/toolbar/localization.ts +0 -106
- package/src/toolbar/makeColorInput.ts +0 -145
- package/src/toolbar/toolbar.css +0 -213
- package/src/toolbar/types.ts +0 -5
- package/src/toolbar/widgets/ActionButtonWidget.ts +0 -39
- package/src/toolbar/widgets/BaseToolWidget.ts +0 -56
- package/src/toolbar/widgets/BaseWidget.ts +0 -377
- package/src/toolbar/widgets/DocumentPropertiesWidget.ts +0 -167
- package/src/toolbar/widgets/EraserToolWidget.ts +0 -85
- package/src/toolbar/widgets/HandToolWidget.ts +0 -250
- package/src/toolbar/widgets/InsertImageWidget.css +0 -44
- package/src/toolbar/widgets/InsertImageWidget.ts +0 -223
- package/src/toolbar/widgets/OverflowWidget.css +0 -27
- package/src/toolbar/widgets/OverflowWidget.ts +0 -92
- package/src/toolbar/widgets/PenToolWidget.ts +0 -288
- package/src/toolbar/widgets/SelectionToolWidget.ts +0 -190
- package/src/toolbar/widgets/TextToolWidget.ts +0 -145
- package/src/toolbar/widgets/lib.ts +0 -13
- package/src/tools/BaseTool.ts +0 -76
- package/src/tools/Eraser.test.ts +0 -103
- package/src/tools/Eraser.ts +0 -139
- package/src/tools/FindTool.css +0 -7
- package/src/tools/FindTool.ts +0 -152
- package/src/tools/PanZoom.test.ts +0 -310
- package/src/tools/PanZoom.ts +0 -520
- package/src/tools/PasteHandler.ts +0 -95
- package/src/tools/Pen.test.ts +0 -194
- package/src/tools/Pen.ts +0 -226
- package/src/tools/PipetteTool.ts +0 -55
- package/src/tools/SelectionTool/SelectAllShortcutHandler.ts +0 -28
- package/src/tools/SelectionTool/Selection.ts +0 -607
- package/src/tools/SelectionTool/SelectionHandle.ts +0 -108
- package/src/tools/SelectionTool/SelectionTool.css +0 -23
- package/src/tools/SelectionTool/SelectionTool.test.ts +0 -261
- package/src/tools/SelectionTool/SelectionTool.ts +0 -480
- package/src/tools/SelectionTool/TransformMode.ts +0 -114
- package/src/tools/SelectionTool/types.ts +0 -11
- package/src/tools/TextTool.ts +0 -326
- package/src/tools/ToolController.ts +0 -178
- package/src/tools/ToolEnabledGroup.ts +0 -14
- package/src/tools/ToolSwitcherShortcut.ts +0 -39
- package/src/tools/ToolbarShortcutHandler.ts +0 -34
- package/src/tools/UndoRedoShortcut.test.ts +0 -56
- package/src/tools/UndoRedoShortcut.ts +0 -25
- package/src/tools/lib.ts +0 -21
- package/src/tools/localization.ts +0 -66
- package/src/types.ts +0 -234
- package/src/util/assertions.ts +0 -55
- package/src/util/fileToBase64.ts +0 -18
- package/src/util/untilNextAnimationFrame.ts +0 -9
- package/src/util/waitForTimeout.ts +0 -9
@@ -1,103 +0,0 @@
|
|
1
|
-
import Editor from '../Editor';
|
2
|
-
import { ToolbarLocalization } from './localization';
|
3
|
-
import { ActionButtonIcon } from './types';
|
4
|
-
import BaseWidget from './widgets/BaseWidget';
|
5
|
-
export declare const toolbarCSSPrefix = "toolbar-";
|
6
|
-
interface SpacerOptions {
|
7
|
-
grow: number;
|
8
|
-
minSize: string;
|
9
|
-
maxSize: string;
|
10
|
-
}
|
11
|
-
export default class HTMLToolbar {
|
12
|
-
private editor;
|
13
|
-
private localizationTable;
|
14
|
-
private container;
|
15
|
-
private resizeObserver;
|
16
|
-
private listeners;
|
17
|
-
private widgetOrderCounter;
|
18
|
-
private widgetsById;
|
19
|
-
private widgetList;
|
20
|
-
private overflowWidget;
|
21
|
-
private static colorisStarted;
|
22
|
-
private updateColoris;
|
23
|
-
/** @internal */
|
24
|
-
constructor(editor: Editor, parent: HTMLElement, localizationTable?: ToolbarLocalization);
|
25
|
-
setupColorPickers(): void;
|
26
|
-
private reLayoutQueued;
|
27
|
-
private queueReLayout;
|
28
|
-
private reLayout;
|
29
|
-
/**
|
30
|
-
* Adds an `ActionButtonWidget` or `BaseToolWidget`. The widget should not have already have a parent
|
31
|
-
* (i.e. its `addTo` method should not have been called).
|
32
|
-
*
|
33
|
-
* @example
|
34
|
-
* ```ts
|
35
|
-
* const toolbar = editor.addToolbar();
|
36
|
-
* const insertImageWidget = new InsertImageWidget(editor);
|
37
|
-
* toolbar.addWidget(insertImageWidget);
|
38
|
-
* ```
|
39
|
-
*/
|
40
|
-
addWidget(widget: BaseWidget): void;
|
41
|
-
/**
|
42
|
-
* Adds a spacer.
|
43
|
-
*
|
44
|
-
* @example
|
45
|
-
* Adding a save button that moves to the very right edge of the toolbar
|
46
|
-
* while keeping the other buttons centered:
|
47
|
-
* ```ts
|
48
|
-
* const toolbar = editor.addToolbar(false);
|
49
|
-
*
|
50
|
-
* toolbar.addSpacer({ grow: 1 });
|
51
|
-
* toolbar.addDefaults();
|
52
|
-
* toolbar.addSpacer({ grow: 1 });
|
53
|
-
*
|
54
|
-
* toolbar.addActionButton({
|
55
|
-
* label: 'Save',
|
56
|
-
* icon: editor.icons.makeSaveIcon(),
|
57
|
-
* }, () => {
|
58
|
-
* saveCallback();
|
59
|
-
* });
|
60
|
-
* ```
|
61
|
-
*/
|
62
|
-
addSpacer(options?: Partial<SpacerOptions>): void;
|
63
|
-
serializeState(): string;
|
64
|
-
/**
|
65
|
-
* Deserialize toolbar widgets from the given state.
|
66
|
-
* Assumes that toolbar widgets are in the same order as when state was serialized.
|
67
|
-
*/
|
68
|
-
deserializeState(state: string): void;
|
69
|
-
/**
|
70
|
-
* Adds an action button with `title` to this toolbar (or to the given `parent` element).
|
71
|
-
*
|
72
|
-
* @return The added button.
|
73
|
-
*/
|
74
|
-
addActionButton(title: string | ActionButtonIcon, command: () => void, mustBeToplevel?: boolean): BaseWidget;
|
75
|
-
addUndoRedoButtons(): void;
|
76
|
-
addDefaultToolWidgets(): void;
|
77
|
-
addDefaultActionButtons(): void;
|
78
|
-
/**
|
79
|
-
* Adds a widget that toggles the overflow menu. Call `addOverflowWidget` to ensure
|
80
|
-
* that this widget is in the correct space (if shown).
|
81
|
-
*
|
82
|
-
* @example
|
83
|
-
* ```ts
|
84
|
-
* toolbar.addDefaultToolWidgets();
|
85
|
-
* toolbar.addOverflowWidget();
|
86
|
-
* toolbar.addDefaultActionButtons();
|
87
|
-
* ```
|
88
|
-
* shows the overflow widget between the default tool widgets and the default action buttons,
|
89
|
-
* if shown.
|
90
|
-
*/
|
91
|
-
addOverflowWidget(): void;
|
92
|
-
/**
|
93
|
-
* Adds both the default tool widgets and action buttons. Equivalent to
|
94
|
-
* ```ts
|
95
|
-
* toolbar.addDefaultToolWidgets();
|
96
|
-
* toolbar.addOverflowWidget();
|
97
|
-
* toolbar.addDefaultActionButtons();
|
98
|
-
* ```
|
99
|
-
*/
|
100
|
-
addDefaults(): void;
|
101
|
-
remove(): void;
|
102
|
-
}
|
103
|
-
export {};
|
@@ -1,376 +0,0 @@
|
|
1
|
-
import { EditorEventType } from '../types.mjs';
|
2
|
-
import { coloris, init as colorisInit } from '@melloware/coloris';
|
3
|
-
import Color4 from '../Color4.mjs';
|
4
|
-
import { defaultToolbarLocalization } from './localization.mjs';
|
5
|
-
import SelectionTool from '../tools/SelectionTool/SelectionTool.mjs';
|
6
|
-
import PanZoomTool from '../tools/PanZoom.mjs';
|
7
|
-
import TextTool from '../tools/TextTool.mjs';
|
8
|
-
import EraserTool from '../tools/Eraser.mjs';
|
9
|
-
import PenTool from '../tools/Pen.mjs';
|
10
|
-
import PenToolWidget from './widgets/PenToolWidget.mjs';
|
11
|
-
import EraserWidget from './widgets/EraserToolWidget.mjs';
|
12
|
-
import SelectionToolWidget from './widgets/SelectionToolWidget.mjs';
|
13
|
-
import TextToolWidget from './widgets/TextToolWidget.mjs';
|
14
|
-
import HandToolWidget from './widgets/HandToolWidget.mjs';
|
15
|
-
import ActionButtonWidget from './widgets/ActionButtonWidget.mjs';
|
16
|
-
import InsertImageWidget from './widgets/InsertImageWidget.mjs';
|
17
|
-
import DocumentPropertiesWidget from './widgets/DocumentPropertiesWidget.mjs';
|
18
|
-
import OverflowWidget from './widgets/OverflowWidget.mjs';
|
19
|
-
export const toolbarCSSPrefix = 'toolbar-';
|
20
|
-
export default class HTMLToolbar {
|
21
|
-
/** @internal */
|
22
|
-
constructor(editor, parent, localizationTable = defaultToolbarLocalization) {
|
23
|
-
this.editor = editor;
|
24
|
-
this.localizationTable = localizationTable;
|
25
|
-
this.listeners = [];
|
26
|
-
// Flex-order of the next widget to be added.
|
27
|
-
this.widgetOrderCounter = 0;
|
28
|
-
this.widgetsById = {};
|
29
|
-
this.widgetList = [];
|
30
|
-
// Widget to toggle overflow menu.
|
31
|
-
this.overflowWidget = null;
|
32
|
-
this.updateColoris = null;
|
33
|
-
this.reLayoutQueued = false;
|
34
|
-
this.container = document.createElement('div');
|
35
|
-
this.container.classList.add(`${toolbarCSSPrefix}root`);
|
36
|
-
this.container.setAttribute('role', 'toolbar');
|
37
|
-
parent.appendChild(this.container);
|
38
|
-
if (!HTMLToolbar.colorisStarted) {
|
39
|
-
colorisInit();
|
40
|
-
HTMLToolbar.colorisStarted = true;
|
41
|
-
}
|
42
|
-
this.setupColorPickers();
|
43
|
-
if ('ResizeObserver' in window) {
|
44
|
-
this.resizeObserver = new ResizeObserver((_entries) => {
|
45
|
-
this.reLayout();
|
46
|
-
});
|
47
|
-
this.resizeObserver.observe(this.container);
|
48
|
-
}
|
49
|
-
else {
|
50
|
-
console.warn('ResizeObserver not supported. Toolbar will not resize.');
|
51
|
-
}
|
52
|
-
}
|
53
|
-
// @internal
|
54
|
-
setupColorPickers() {
|
55
|
-
// Much of the setup only needs to be done once.
|
56
|
-
if (this.updateColoris) {
|
57
|
-
this.updateColoris();
|
58
|
-
return;
|
59
|
-
}
|
60
|
-
const closePickerOverlay = document.createElement('div');
|
61
|
-
closePickerOverlay.className = `${toolbarCSSPrefix}closeColorPickerOverlay`;
|
62
|
-
this.editor.createHTMLOverlay(closePickerOverlay);
|
63
|
-
const maxSwatchLen = 12;
|
64
|
-
const swatches = [
|
65
|
-
Color4.red.toHexString(),
|
66
|
-
Color4.purple.toHexString(),
|
67
|
-
Color4.blue.toHexString(),
|
68
|
-
Color4.clay.toHexString(),
|
69
|
-
Color4.black.toHexString(),
|
70
|
-
Color4.white.toHexString(),
|
71
|
-
];
|
72
|
-
const presetColorEnd = swatches.length;
|
73
|
-
// (Re)init Coloris -- update the swatches list.
|
74
|
-
const initColoris = () => {
|
75
|
-
coloris({
|
76
|
-
el: '.coloris_input',
|
77
|
-
format: 'hex',
|
78
|
-
selectInput: false,
|
79
|
-
focusInput: false,
|
80
|
-
themeMode: 'auto',
|
81
|
-
swatches
|
82
|
-
});
|
83
|
-
};
|
84
|
-
initColoris();
|
85
|
-
this.updateColoris = initColoris;
|
86
|
-
const addColorToSwatch = (newColor) => {
|
87
|
-
let alreadyPresent = false;
|
88
|
-
for (const color of swatches) {
|
89
|
-
if (color === newColor) {
|
90
|
-
alreadyPresent = true;
|
91
|
-
}
|
92
|
-
}
|
93
|
-
if (!alreadyPresent) {
|
94
|
-
swatches.push(newColor);
|
95
|
-
if (swatches.length > maxSwatchLen) {
|
96
|
-
swatches.splice(presetColorEnd, 1);
|
97
|
-
}
|
98
|
-
initColoris();
|
99
|
-
}
|
100
|
-
};
|
101
|
-
this.listeners.push(this.editor.notifier.on(EditorEventType.ColorPickerToggled, event => {
|
102
|
-
if (event.kind !== EditorEventType.ColorPickerToggled) {
|
103
|
-
return;
|
104
|
-
}
|
105
|
-
// Show/hide the overlay. Making the overlay visible gives users a surface to click
|
106
|
-
// on that shows/hides the color picker.
|
107
|
-
closePickerOverlay.style.display = event.open ? 'block' : 'none';
|
108
|
-
}));
|
109
|
-
// Add newly-selected colors to the swatch.
|
110
|
-
this.listeners.push(this.editor.notifier.on(EditorEventType.ColorPickerColorSelected, event => {
|
111
|
-
if (event.kind === EditorEventType.ColorPickerColorSelected) {
|
112
|
-
addColorToSwatch(event.color.toHexString());
|
113
|
-
}
|
114
|
-
}));
|
115
|
-
}
|
116
|
-
queueReLayout() {
|
117
|
-
if (!this.reLayoutQueued) {
|
118
|
-
this.reLayoutQueued = true;
|
119
|
-
requestAnimationFrame(() => this.reLayout());
|
120
|
-
}
|
121
|
-
}
|
122
|
-
reLayout() {
|
123
|
-
this.reLayoutQueued = false;
|
124
|
-
if (!this.overflowWidget) {
|
125
|
-
return;
|
126
|
-
}
|
127
|
-
const getTotalWidth = (widgetList) => {
|
128
|
-
let totalWidth = 0;
|
129
|
-
for (const widget of widgetList) {
|
130
|
-
if (!widget.isHidden()) {
|
131
|
-
totalWidth += widget.getButtonWidth();
|
132
|
-
}
|
133
|
-
}
|
134
|
-
return totalWidth;
|
135
|
-
};
|
136
|
-
// Returns true if there is enough empty space to move the first child
|
137
|
-
// from the overflow menu to the main menu.
|
138
|
-
const canRemoveFirstChildFromOverflow = (freeSpaceInMainMenu) => {
|
139
|
-
var _a, _b;
|
140
|
-
const overflowChildren = (_b = (_a = this.overflowWidget) === null || _a === void 0 ? void 0 : _a.getChildWidgets()) !== null && _b !== void 0 ? _b : [];
|
141
|
-
if (overflowChildren.length === 0) {
|
142
|
-
return false;
|
143
|
-
}
|
144
|
-
return overflowChildren[0].getButtonWidth() <= freeSpaceInMainMenu;
|
145
|
-
};
|
146
|
-
let overflowWidgetsWidth = getTotalWidth(this.overflowWidget.getChildWidgets());
|
147
|
-
let shownWidgetWidth = getTotalWidth(this.widgetList) - overflowWidgetsWidth;
|
148
|
-
let availableWidth = this.container.clientWidth * 0.87;
|
149
|
-
// If on a device that has enough vertical space, allow
|
150
|
-
// showing two rows of buttons.
|
151
|
-
// TODO: Fix magic numbers
|
152
|
-
if (window.innerHeight > availableWidth * 1.75) {
|
153
|
-
availableWidth *= 1.75;
|
154
|
-
}
|
155
|
-
let updatedChildren = false;
|
156
|
-
// If we can remove at least one child from the overflow menu,
|
157
|
-
if (canRemoveFirstChildFromOverflow(availableWidth - shownWidgetWidth)) {
|
158
|
-
// Move widgets to the main menu.
|
159
|
-
const overflowChildren = this.overflowWidget.clearChildren();
|
160
|
-
for (const child of overflowChildren) {
|
161
|
-
child.addTo(this.container);
|
162
|
-
child.setIsToplevel(true);
|
163
|
-
if (!child.isHidden()) {
|
164
|
-
shownWidgetWidth += child.getButtonWidth();
|
165
|
-
}
|
166
|
-
}
|
167
|
-
overflowWidgetsWidth = 0;
|
168
|
-
updatedChildren = true;
|
169
|
-
}
|
170
|
-
if (shownWidgetWidth >= availableWidth) {
|
171
|
-
// Move widgets to the overflow menu.
|
172
|
-
// Start with the rightmost widget, move to the leftmost
|
173
|
-
for (let i = this.widgetList.length - 1; i >= 0 && shownWidgetWidth >= availableWidth; i--) {
|
174
|
-
const child = this.widgetList[i];
|
175
|
-
if (this.overflowWidget.hasAsChild(child)) {
|
176
|
-
continue;
|
177
|
-
}
|
178
|
-
if (child.canBeInOverflowMenu()) {
|
179
|
-
shownWidgetWidth -= child.getButtonWidth();
|
180
|
-
this.overflowWidget.addToOverflow(child);
|
181
|
-
}
|
182
|
-
}
|
183
|
-
updatedChildren = true;
|
184
|
-
}
|
185
|
-
// Hide/show the overflow widget.
|
186
|
-
this.overflowWidget.setHidden(this.overflowWidget.getChildWidgets().length === 0);
|
187
|
-
if (updatedChildren) {
|
188
|
-
this.setupColorPickers();
|
189
|
-
}
|
190
|
-
}
|
191
|
-
/**
|
192
|
-
* Adds an `ActionButtonWidget` or `BaseToolWidget`. The widget should not have already have a parent
|
193
|
-
* (i.e. its `addTo` method should not have been called).
|
194
|
-
*
|
195
|
-
* @example
|
196
|
-
* ```ts
|
197
|
-
* const toolbar = editor.addToolbar();
|
198
|
-
* const insertImageWidget = new InsertImageWidget(editor);
|
199
|
-
* toolbar.addWidget(insertImageWidget);
|
200
|
-
* ```
|
201
|
-
*/
|
202
|
-
addWidget(widget) {
|
203
|
-
// Prevent name collisions
|
204
|
-
const id = widget.getUniqueIdIn(this.widgetsById);
|
205
|
-
// Add the widget
|
206
|
-
this.widgetsById[id] = widget;
|
207
|
-
this.widgetList.push(widget);
|
208
|
-
// Add HTML elements.
|
209
|
-
const container = widget.addTo(this.container);
|
210
|
-
this.setupColorPickers();
|
211
|
-
// Ensure that the widget gets displayed in the correct
|
212
|
-
// place in the toolbar, even if it's removed and re-added.
|
213
|
-
container.style.order = `${this.widgetOrderCounter++}`;
|
214
|
-
this.queueReLayout();
|
215
|
-
}
|
216
|
-
/**
|
217
|
-
* Adds a spacer.
|
218
|
-
*
|
219
|
-
* @example
|
220
|
-
* Adding a save button that moves to the very right edge of the toolbar
|
221
|
-
* while keeping the other buttons centered:
|
222
|
-
* ```ts
|
223
|
-
* const toolbar = editor.addToolbar(false);
|
224
|
-
*
|
225
|
-
* toolbar.addSpacer({ grow: 1 });
|
226
|
-
* toolbar.addDefaults();
|
227
|
-
* toolbar.addSpacer({ grow: 1 });
|
228
|
-
*
|
229
|
-
* toolbar.addActionButton({
|
230
|
-
* label: 'Save',
|
231
|
-
* icon: editor.icons.makeSaveIcon(),
|
232
|
-
* }, () => {
|
233
|
-
* saveCallback();
|
234
|
-
* });
|
235
|
-
* ```
|
236
|
-
*/
|
237
|
-
addSpacer(options = {}) {
|
238
|
-
const spacer = document.createElement('div');
|
239
|
-
spacer.classList.add(`${toolbarCSSPrefix}spacer`);
|
240
|
-
if (options.grow) {
|
241
|
-
spacer.style.flexGrow = `${options.grow}`;
|
242
|
-
}
|
243
|
-
if (options.minSize) {
|
244
|
-
spacer.style.minWidth = options.minSize;
|
245
|
-
}
|
246
|
-
if (options.maxSize) {
|
247
|
-
spacer.style.maxWidth = options.maxSize;
|
248
|
-
}
|
249
|
-
spacer.style.order = `${this.widgetOrderCounter++}`;
|
250
|
-
this.container.appendChild(spacer);
|
251
|
-
}
|
252
|
-
serializeState() {
|
253
|
-
const result = {};
|
254
|
-
for (const widgetId in this.widgetsById) {
|
255
|
-
result[widgetId] = this.widgetsById[widgetId].serializeState();
|
256
|
-
}
|
257
|
-
return JSON.stringify(result);
|
258
|
-
}
|
259
|
-
/**
|
260
|
-
* Deserialize toolbar widgets from the given state.
|
261
|
-
* Assumes that toolbar widgets are in the same order as when state was serialized.
|
262
|
-
*/
|
263
|
-
deserializeState(state) {
|
264
|
-
const data = JSON.parse(state);
|
265
|
-
for (const widgetId in data) {
|
266
|
-
if (!(widgetId in this.widgetsById)) {
|
267
|
-
console.warn(`Unable to deserialize widget ${widgetId} — no such widget.`);
|
268
|
-
}
|
269
|
-
this.widgetsById[widgetId].deserializeFrom(data[widgetId]);
|
270
|
-
}
|
271
|
-
}
|
272
|
-
/**
|
273
|
-
* Adds an action button with `title` to this toolbar (or to the given `parent` element).
|
274
|
-
*
|
275
|
-
* @return The added button.
|
276
|
-
*/
|
277
|
-
addActionButton(title, command, mustBeToplevel = true) {
|
278
|
-
const titleString = typeof title === 'string' ? title : title.label;
|
279
|
-
const widgetId = 'action-button';
|
280
|
-
const makeIcon = () => {
|
281
|
-
if (typeof title === 'string') {
|
282
|
-
return null;
|
283
|
-
}
|
284
|
-
return title.icon;
|
285
|
-
};
|
286
|
-
const widget = new ActionButtonWidget(this.editor, widgetId, makeIcon, titleString, command, this.editor.localization, mustBeToplevel);
|
287
|
-
this.addWidget(widget);
|
288
|
-
return widget;
|
289
|
-
}
|
290
|
-
addUndoRedoButtons() {
|
291
|
-
const undoButton = this.addActionButton({
|
292
|
-
label: this.localizationTable.undo,
|
293
|
-
icon: this.editor.icons.makeUndoIcon()
|
294
|
-
}, () => {
|
295
|
-
this.editor.history.undo();
|
296
|
-
});
|
297
|
-
const redoButton = this.addActionButton({
|
298
|
-
label: this.localizationTable.redo,
|
299
|
-
icon: this.editor.icons.makeRedoIcon(),
|
300
|
-
}, () => {
|
301
|
-
this.editor.history.redo();
|
302
|
-
});
|
303
|
-
undoButton.setDisabled(true);
|
304
|
-
redoButton.setDisabled(true);
|
305
|
-
this.editor.notifier.on(EditorEventType.UndoRedoStackUpdated, event => {
|
306
|
-
if (event.kind !== EditorEventType.UndoRedoStackUpdated) {
|
307
|
-
throw new Error('Wrong event type!');
|
308
|
-
}
|
309
|
-
undoButton.setDisabled(event.undoStackSize === 0);
|
310
|
-
redoButton.setDisabled(event.redoStackSize === 0);
|
311
|
-
});
|
312
|
-
}
|
313
|
-
addDefaultToolWidgets() {
|
314
|
-
const toolController = this.editor.toolController;
|
315
|
-
for (const tool of toolController.getMatchingTools(PenTool)) {
|
316
|
-
const widget = new PenToolWidget(this.editor, tool, this.localizationTable);
|
317
|
-
this.addWidget(widget);
|
318
|
-
}
|
319
|
-
for (const tool of toolController.getMatchingTools(EraserTool)) {
|
320
|
-
this.addWidget(new EraserWidget(this.editor, tool, this.localizationTable));
|
321
|
-
}
|
322
|
-
for (const tool of toolController.getMatchingTools(SelectionTool)) {
|
323
|
-
this.addWidget(new SelectionToolWidget(this.editor, tool, this.localizationTable));
|
324
|
-
}
|
325
|
-
for (const tool of toolController.getMatchingTools(TextTool)) {
|
326
|
-
this.addWidget(new TextToolWidget(this.editor, tool, this.localizationTable));
|
327
|
-
}
|
328
|
-
const panZoomTool = toolController.getMatchingTools(PanZoomTool)[0];
|
329
|
-
if (panZoomTool) {
|
330
|
-
this.addWidget(new HandToolWidget(this.editor, panZoomTool, this.localizationTable));
|
331
|
-
}
|
332
|
-
this.addWidget(new InsertImageWidget(this.editor, this.localizationTable));
|
333
|
-
}
|
334
|
-
addDefaultActionButtons() {
|
335
|
-
this.addWidget(new DocumentPropertiesWidget(this.editor, this.localizationTable));
|
336
|
-
this.addUndoRedoButtons();
|
337
|
-
}
|
338
|
-
/**
|
339
|
-
* Adds a widget that toggles the overflow menu. Call `addOverflowWidget` to ensure
|
340
|
-
* that this widget is in the correct space (if shown).
|
341
|
-
*
|
342
|
-
* @example
|
343
|
-
* ```ts
|
344
|
-
* toolbar.addDefaultToolWidgets();
|
345
|
-
* toolbar.addOverflowWidget();
|
346
|
-
* toolbar.addDefaultActionButtons();
|
347
|
-
* ```
|
348
|
-
* shows the overflow widget between the default tool widgets and the default action buttons,
|
349
|
-
* if shown.
|
350
|
-
*/
|
351
|
-
addOverflowWidget() {
|
352
|
-
this.overflowWidget = new OverflowWidget(this.editor, this.localizationTable);
|
353
|
-
this.addWidget(this.overflowWidget);
|
354
|
-
}
|
355
|
-
/**
|
356
|
-
* Adds both the default tool widgets and action buttons. Equivalent to
|
357
|
-
* ```ts
|
358
|
-
* toolbar.addDefaultToolWidgets();
|
359
|
-
* toolbar.addOverflowWidget();
|
360
|
-
* toolbar.addDefaultActionButtons();
|
361
|
-
* ```
|
362
|
-
*/
|
363
|
-
addDefaults() {
|
364
|
-
this.addDefaultToolWidgets();
|
365
|
-
this.addOverflowWidget();
|
366
|
-
this.addDefaultActionButtons();
|
367
|
-
}
|
368
|
-
remove() {
|
369
|
-
this.container.remove();
|
370
|
-
this.resizeObserver.disconnect();
|
371
|
-
for (const listener of this.listeners) {
|
372
|
-
listener.remove();
|
373
|
-
}
|
374
|
-
}
|
375
|
-
}
|
376
|
-
HTMLToolbar.colorisStarted = false;
|
@@ -1,62 +0,0 @@
|
|
1
|
-
import Color4 from '../Color4';
|
2
|
-
import { ComponentBuilderFactory } from '../components/builders/types';
|
3
|
-
import TextStyle from '../rendering/TextRenderingStyle';
|
4
|
-
import Pen from '../tools/Pen';
|
5
|
-
export type IconType = HTMLImageElement | SVGElement;
|
6
|
-
/**
|
7
|
-
* Provides icons that can be used in the toolbar, etc.
|
8
|
-
* Extend this class and override methods to customize icons.
|
9
|
-
*
|
10
|
-
* @example
|
11
|
-
* ```ts
|
12
|
-
* class CustomIconProvider extends jsdraw.IconProvider {
|
13
|
-
* // Use '☺' instead of the default dropdown symbol.
|
14
|
-
* public makeDropdownIcon() {
|
15
|
-
* const icon = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
16
|
-
* icon.innerHTML = `
|
17
|
-
* <text x='5' y='55' style='fill: var(--icon-color); font-size: 50pt;'>☺</text>
|
18
|
-
* `;
|
19
|
-
* icon.setAttribute('viewBox', '0 0 100 100');
|
20
|
-
* return icon;
|
21
|
-
* }
|
22
|
-
* }
|
23
|
-
*
|
24
|
-
* const icons = new CustomIconProvider();
|
25
|
-
* const editor = new jsdraw.Editor(document.body, {
|
26
|
-
* iconProvider: icons,
|
27
|
-
* });
|
28
|
-
*
|
29
|
-
* // Add a toolbar that uses these icons
|
30
|
-
* editor.addToolbar();
|
31
|
-
* ```
|
32
|
-
*/
|
33
|
-
export default class IconProvider {
|
34
|
-
makeUndoIcon(): IconType;
|
35
|
-
makeRedoIcon(mirror?: boolean): IconType;
|
36
|
-
makeDropdownIcon(): IconType;
|
37
|
-
makeEraserIcon(eraserSize?: number): IconType;
|
38
|
-
makeSelectionIcon(): IconType;
|
39
|
-
/**
|
40
|
-
* @param pathData - SVG path data (e.g. `m10,10l30,30z`)
|
41
|
-
* @param fill - A valid CSS color (e.g. `var(--icon-color)` or `#f0f`). This can be `none`.
|
42
|
-
*/
|
43
|
-
protected makeIconFromPath(pathData: string, fill?: string, strokeColor?: string, strokeWidth?: string): IconType;
|
44
|
-
makeHandToolIcon(): IconType;
|
45
|
-
makeTouchPanningIcon(): IconType;
|
46
|
-
makeAllDevicePanningIcon(): IconType;
|
47
|
-
makeZoomIcon(): IconType;
|
48
|
-
makeRotationLockIcon(): IconType;
|
49
|
-
makeInsertImageIcon(): IconType;
|
50
|
-
makeTextIcon(textStyle: TextStyle): IconType;
|
51
|
-
makePenIcon(strokeSize: number, color: string | Color4, rounded?: boolean): IconType;
|
52
|
-
makeIconFromFactory(pen: Pen, factory: ComponentBuilderFactory): IconType;
|
53
|
-
makePipetteIcon(color?: Color4): IconType;
|
54
|
-
makeFormatSelectionIcon(): IconType;
|
55
|
-
makeResizeViewportIcon(): IconType;
|
56
|
-
makeDuplicateSelectionIcon(): IconType;
|
57
|
-
makePasteIcon(): IconType;
|
58
|
-
makeDeleteSelectionIcon(): IconType;
|
59
|
-
makeSaveIcon(): IconType;
|
60
|
-
makeConfigureDocumentIcon(): IconType;
|
61
|
-
makeOverflowIcon(): IconType;
|
62
|
-
}
|