@visactor/vrender-core 1.0.47-alpha.0 → 1.1.0-alpha.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/cjs/application.d.ts +14 -5
- package/cjs/application.js +1 -8
- package/cjs/application.js.map +1 -1
- package/cjs/canvas/empty-context.js +4 -14
- package/cjs/canvas/empty-context.js.map +1 -1
- package/cjs/canvas/util.d.ts +2 -3
- package/cjs/canvas/util.js +17 -3
- package/cjs/canvas/util.js.map +1 -1
- package/cjs/color-string/index.js +2 -1
- package/cjs/common/contribution-provider.d.ts +16 -9
- package/cjs/common/contribution-provider.js +9 -4
- package/cjs/common/contribution-provider.js.map +1 -1
- package/cjs/common/diff.js +1 -2
- package/cjs/common/enums.d.ts +2 -0
- package/cjs/common/enums.js +1 -0
- package/cjs/common/enums.js.map +1 -1
- package/cjs/common/event-transformer.js +43 -6
- package/cjs/common/event-transformer.js.map +1 -1
- package/cjs/common/explicit-binding.d.ts +5 -0
- package/cjs/common/explicit-binding.js +16 -0
- package/cjs/common/explicit-binding.js.map +1 -0
- package/cjs/common/performance-raf.d.ts +1 -0
- package/cjs/common/performance-raf.js +5 -0
- package/cjs/common/performance-raf.js.map +1 -1
- package/cjs/common/render-area.js +1 -1
- package/cjs/common/render-command-list.js +1 -1
- package/cjs/common/render-curve.js +1 -1
- package/cjs/common/render-utils.js +1 -1
- package/cjs/common/seg-context.js +1 -2
- package/cjs/common/simplify.js +1 -1
- package/cjs/common/sort.js +1 -1
- package/cjs/common/split-path.js +1 -1
- package/cjs/common/store.js +1 -1
- package/cjs/common/text.js +1 -1
- package/cjs/common/utils.js +1 -1
- package/cjs/core/application.js +1 -1
- package/cjs/core/camera.js +1 -1
- package/cjs/core/constants.js +1 -1
- package/cjs/core/contributions/env/base-contribution.js +4 -9
- package/cjs/core/contributions/env/base-contribution.js.map +1 -1
- package/cjs/core/contributions/env/modules.d.ts +4 -3
- package/cjs/core/contributions/env/modules.js +6 -4
- package/cjs/core/contributions/env/modules.js.map +1 -1
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +3 -12
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/cjs/core/contributions/layerHandler/empty-contribution.js +3 -12
- package/cjs/core/contributions/layerHandler/empty-contribution.js.map +1 -1
- package/cjs/core/contributions/layerHandler/modules.d.ts +4 -3
- package/cjs/core/contributions/layerHandler/modules.js +6 -4
- package/cjs/core/contributions/layerHandler/modules.js.map +1 -1
- package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js +3 -12
- package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
- package/cjs/core/contributions/modules.d.ts +2 -2
- package/cjs/core/contributions/modules.js +7 -1
- package/cjs/core/contributions/modules.js.map +1 -1
- package/cjs/core/contributions/textMeasure/AtextMeasure.js +3 -10
- package/cjs/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
- package/cjs/core/contributions/textMeasure/modules.d.ts +4 -3
- package/cjs/core/contributions/textMeasure/modules.js +6 -4
- package/cjs/core/contributions/textMeasure/modules.js.map +1 -1
- package/cjs/core/contributions/textMeasure/textMeasure-contribution.js +3 -10
- package/cjs/core/contributions/textMeasure/textMeasure-contribution.js.map +1 -1
- package/cjs/core/contributions/window/base-contribution.js +3 -12
- package/cjs/core/contributions/window/base-contribution.js.map +1 -1
- package/cjs/core/core-modules.d.ts +4 -3
- package/cjs/core/core-modules.js +11 -7
- package/cjs/core/core-modules.js.map +1 -1
- package/cjs/core/global-module.js +2 -0
- package/cjs/core/global-module.js.map +1 -1
- package/cjs/core/global.d.ts +2 -0
- package/cjs/core/global.js +9 -18
- package/cjs/core/global.js.map +1 -1
- package/cjs/core/graphic-utils.d.ts +1 -2
- package/cjs/core/graphic-utils.js +8 -23
- package/cjs/core/graphic-utils.js.map +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/layer-service.d.ts +7 -2
- package/cjs/core/layer-service.js +29 -27
- package/cjs/core/layer-service.js.map +1 -1
- package/cjs/core/layer.js +1 -1
- package/cjs/core/layer.js.map +1 -1
- package/cjs/core/light.js +1 -1
- package/cjs/core/stage.d.ts +19 -7
- package/cjs/core/stage.js +50 -39
- package/cjs/core/stage.js.map +1 -1
- package/cjs/core/window.d.ts +7 -5
- package/cjs/core/window.js +14 -18
- package/cjs/core/window.js.map +1 -1
- package/cjs/create.d.ts +1 -2
- package/cjs/create.js +2 -2
- package/cjs/create.js.map +1 -1
- package/cjs/entries/app-context.d.ts +30 -0
- package/cjs/entries/app-context.js +84 -0
- package/cjs/entries/app-context.js.map +1 -0
- package/cjs/entries/browser.d.ts +25 -0
- package/cjs/entries/browser.js +44 -0
- package/cjs/entries/browser.js.map +1 -0
- package/cjs/entries/index.d.ts +7 -0
- package/cjs/entries/index.js +32 -0
- package/cjs/entries/index.js.map +1 -0
- package/cjs/entries/miniapp.d.ts +6 -0
- package/cjs/entries/miniapp.js +20 -0
- package/cjs/entries/miniapp.js.map +1 -0
- package/cjs/entries/node.d.ts +6 -0
- package/cjs/entries/node.js +20 -0
- package/cjs/entries/node.js.map +1 -0
- package/cjs/entries/runtime-installer.d.ts +11 -0
- package/cjs/entries/runtime-installer.js +111 -0
- package/cjs/entries/runtime-installer.js.map +1 -0
- package/cjs/entries/types.d.ts +29 -0
- package/cjs/{common/inversify-lite/interfaces/interfaces.js → entries/types.js} +1 -1
- package/cjs/entries/types.js.map +1 -0
- package/cjs/event/util.d.ts +1 -1
- package/cjs/factory/graphic-factory.d.ts +7 -0
- package/cjs/factory/graphic-factory.js +23 -0
- package/cjs/factory/graphic-factory.js.map +1 -0
- package/cjs/factory/index.d.ts +4 -0
- package/cjs/{common/inversify-lite → factory}/index.js +2 -1
- package/cjs/factory/index.js.map +1 -0
- package/cjs/factory/layer-factory.d.ts +7 -0
- package/cjs/factory/layer-factory.js +19 -0
- package/cjs/factory/layer-factory.js.map +1 -0
- package/cjs/factory/stage-factory.d.ts +8 -0
- package/cjs/factory/stage-factory.js +20 -0
- package/cjs/factory/stage-factory.js.map +1 -0
- package/cjs/factory/types.d.ts +34 -0
- package/cjs/{common/inversify/interfaces.js → factory/types.js} +1 -1
- package/cjs/factory/types.js.map +1 -0
- package/cjs/factory.d.ts +1 -0
- package/cjs/factory.js +16 -1
- package/cjs/factory.js.map +1 -1
- package/cjs/global.d.ts +2 -0
- package/cjs/global.js +11 -0
- package/cjs/global.js.map +1 -0
- package/cjs/graphic/area.js +1 -1
- package/cjs/graphic/area.js.map +1 -1
- package/cjs/graphic/bounds.js +3 -3
- package/cjs/graphic/bounds.js.map +1 -1
- package/cjs/graphic/config.js +0 -1
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/glyph.js +9 -3
- package/cjs/graphic/glyph.js.map +1 -1
- package/cjs/graphic/graphic-creator.d.ts +9 -4
- package/cjs/graphic/graphic-creator.js +35 -7
- package/cjs/graphic/graphic-creator.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-module.d.ts +4 -3
- package/cjs/graphic/graphic-service/graphic-module.js +6 -4
- package/cjs/graphic/graphic-service/graphic-module.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-service.d.ts +2 -3
- package/cjs/graphic/graphic-service/graphic-service.js +5 -20
- package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +80 -11
- package/cjs/graphic/graphic.js +474 -152
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/group.d.ts +11 -1
- package/cjs/graphic/group.js +46 -11
- package/cjs/graphic/group.js.map +1 -1
- package/cjs/graphic/index.d.ts +3 -0
- package/cjs/graphic/index.js +34 -15
- package/cjs/graphic/index.js.map +1 -1
- package/cjs/graphic/line.js +1 -1
- package/cjs/graphic/line.js.map +1 -1
- package/cjs/graphic/state/attribute-update-classifier.d.ts +13 -0
- package/cjs/graphic/state/attribute-update-classifier.js +67 -0
- package/cjs/graphic/state/attribute-update-classifier.js.map +1 -0
- package/cjs/graphic/state/shared-state-refresh.d.ts +6 -0
- package/cjs/graphic/state/shared-state-refresh.js +55 -0
- package/cjs/graphic/state/shared-state-refresh.js.map +1 -0
- package/cjs/graphic/state/shared-state-scope.d.ts +25 -0
- package/cjs/graphic/state/shared-state-scope.js +98 -0
- package/cjs/graphic/state/shared-state-scope.js.map +1 -0
- package/cjs/graphic/state/state-batch-scheduler.d.ts +42 -0
- package/cjs/graphic/state/state-batch-scheduler.js +285 -0
- package/cjs/graphic/state/state-batch-scheduler.js.map +1 -0
- package/cjs/graphic/state/state-definition-compiler.d.ts +6 -0
- package/cjs/graphic/state/state-definition-compiler.js +91 -0
- package/cjs/graphic/state/state-definition-compiler.js.map +1 -0
- package/cjs/graphic/state/state-definition.d.ts +44 -0
- package/cjs/graphic/state/state-definition.js +6 -0
- package/cjs/graphic/state/state-definition.js.map +1 -0
- package/cjs/graphic/state/state-engine.d.ts +38 -0
- package/cjs/graphic/state/state-engine.js +220 -0
- package/cjs/graphic/state/state-engine.js.map +1 -0
- package/cjs/graphic/state/state-model.d.ts +43 -0
- package/cjs/graphic/state/state-model.js +143 -0
- package/cjs/graphic/state/state-model.js.map +1 -0
- package/cjs/graphic/state/state-perf-monitor.d.ts +119 -0
- package/cjs/graphic/state/state-perf-monitor.js +217 -0
- package/cjs/graphic/state/state-perf-monitor.js.map +1 -0
- package/cjs/graphic/state/state-style-resolver.d.ts +22 -0
- package/cjs/graphic/state/state-style-resolver.js +73 -0
- package/cjs/graphic/state/state-style-resolver.js.map +1 -0
- package/cjs/graphic/state/state-transition-orchestrator.d.ts +41 -0
- package/cjs/graphic/state/state-transition-orchestrator.js +74 -0
- package/cjs/graphic/state/state-transition-orchestrator.js.map +1 -0
- package/cjs/graphic/text.d.ts +3 -2
- package/cjs/graphic/text.js +22 -14
- package/cjs/graphic/text.js.map +1 -1
- package/cjs/graphic/theme.d.ts +5 -0
- package/cjs/graphic/theme.js +7 -0
- package/cjs/graphic/theme.js.map +1 -1
- package/cjs/graphic/wrap-text.d.ts +1 -1
- package/cjs/graphic/wrap-text.js +17 -14
- package/cjs/graphic/wrap-text.js.map +1 -1
- package/cjs/index.d.ts +7 -4
- package/cjs/index.js +95 -25
- package/cjs/index.js.map +1 -1
- package/cjs/interface/global.d.ts +2 -0
- package/cjs/interface/global.js.map +1 -1
- package/cjs/interface/graphic/group.d.ts +6 -0
- package/cjs/interface/graphic/group.js.map +1 -1
- package/cjs/interface/graphic/theme.d.ts +3 -0
- package/cjs/interface/graphic/theme.js.map +1 -1
- package/cjs/interface/graphic.d.ts +24 -26
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/plugin.d.ts +2 -0
- package/cjs/interface/plugin.js.map +1 -1
- package/cjs/interface/stage.d.ts +11 -3
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/interface/theme-service.js.map +1 -1
- package/cjs/legacy/binding-context.d.ts +24 -0
- package/cjs/legacy/binding-context.js +98 -0
- package/cjs/legacy/binding-context.js.map +1 -0
- package/cjs/legacy/bootstrap.d.ts +10 -0
- package/cjs/legacy/bootstrap.js +72 -0
- package/cjs/legacy/bootstrap.js.map +1 -0
- package/cjs/legacy/module-types.d.ts +2 -0
- package/cjs/legacy/module-types.js +6 -0
- package/cjs/legacy/module-types.js.map +1 -0
- package/cjs/modules.d.ts +5 -6
- package/cjs/modules.js +54 -20
- package/cjs/modules.js.map +1 -1
- package/cjs/picker/global-picker-service.js +3 -12
- package/cjs/picker/global-picker-service.js.map +1 -1
- package/cjs/picker/pick-interceptor.js +9 -19
- package/cjs/picker/pick-interceptor.js.map +1 -1
- package/cjs/picker/pick-modules.d.ts +5 -3
- package/cjs/picker/pick-modules.js +6 -4
- package/cjs/picker/pick-modules.js.map +1 -1
- package/cjs/picker/picker-service.d.ts +13 -4
- package/cjs/picker/picker-service.js +16 -22
- package/cjs/picker/picker-service.js.map +1 -1
- package/cjs/plugins/base-plugin.d.ts +8 -0
- package/cjs/plugins/base-plugin.js +15 -0
- package/cjs/plugins/base-plugin.js.map +1 -0
- package/cjs/plugins/browser-env-plugin.d.ts +8 -0
- package/cjs/plugins/browser-env-plugin.js +24 -0
- package/cjs/plugins/browser-env-plugin.js.map +1 -0
- package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.d.ts +4 -1
- package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js +25 -4
- package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +3 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/cjs/plugins/index.d.ts +5 -0
- package/cjs/plugins/index.js +23 -0
- package/cjs/plugins/index.js.map +1 -0
- package/cjs/plugins/picker-plugin.d.ts +7 -0
- package/cjs/plugins/picker-plugin.js +19 -0
- package/cjs/plugins/picker-plugin.js.map +1 -0
- package/cjs/plugins/plugin-modules.d.ts +4 -3
- package/cjs/plugins/plugin-modules.js +6 -4
- package/cjs/plugins/plugin-modules.js.map +1 -1
- package/cjs/plugins/plugin-service.d.ts +16 -2
- package/cjs/plugins/plugin-service.js +24 -26
- package/cjs/plugins/plugin-service.js.map +1 -1
- package/cjs/plugins/renderer-plugin.d.ts +7 -0
- package/cjs/plugins/renderer-plugin.js +19 -0
- package/cjs/plugins/renderer-plugin.js.map +1 -0
- package/cjs/plugins/types.d.ts +28 -0
- package/cjs/plugins/types.js +6 -0
- package/cjs/plugins/types.js.map +1 -0
- package/cjs/register/register-arc.js +1 -1
- package/cjs/register/register-arc.js.map +1 -1
- package/cjs/register/register-arc3d.js +1 -1
- package/cjs/register/register-arc3d.js.map +1 -1
- package/cjs/register/register-area.js +1 -1
- package/cjs/register/register-area.js.map +1 -1
- package/cjs/register/register-circle.js +1 -1
- package/cjs/register/register-circle.js.map +1 -1
- package/cjs/register/register-glyph.js +1 -1
- package/cjs/register/register-glyph.js.map +1 -1
- package/cjs/register/register-group.js +1 -1
- package/cjs/register/register-group.js.map +1 -1
- package/cjs/register/register-image.js +1 -1
- package/cjs/register/register-image.js.map +1 -1
- package/cjs/register/register-line.js +1 -1
- package/cjs/register/register-line.js.map +1 -1
- package/cjs/register/register-path.js +1 -1
- package/cjs/register/register-path.js.map +1 -1
- package/cjs/register/register-polygon.js +1 -1
- package/cjs/register/register-polygon.js.map +1 -1
- package/cjs/register/register-pyramid3d.js +1 -1
- package/cjs/register/register-pyramid3d.js.map +1 -1
- package/cjs/register/register-rect.js +1 -1
- package/cjs/register/register-rect.js.map +1 -1
- package/cjs/register/register-rect3d.js +1 -1
- package/cjs/register/register-rect3d.js.map +1 -1
- package/cjs/register/register-richtext.js +1 -1
- package/cjs/register/register-richtext.js.map +1 -1
- package/cjs/register/register-shadowRoot.js +1 -1
- package/cjs/register/register-shadowRoot.js.map +1 -1
- package/cjs/register/register-star.js +1 -1
- package/cjs/register/register-star.js.map +1 -1
- package/cjs/register/register-symbol.js +1 -1
- package/cjs/register/register-symbol.js.map +1 -1
- package/cjs/register/register-text.js +1 -1
- package/cjs/register/register-text.js.map +1 -1
- package/cjs/register/register-wraptext.js +1 -1
- package/cjs/register/register-wraptext.js.map +1 -1
- package/cjs/registry/contribution-registry.d.ts +9 -0
- package/cjs/registry/contribution-registry.js +33 -0
- package/cjs/registry/contribution-registry.js.map +1 -0
- package/cjs/registry/index.d.ts +5 -0
- package/cjs/registry/index.js +23 -0
- package/cjs/registry/index.js.map +1 -0
- package/cjs/registry/picker-registry.d.ts +10 -0
- package/cjs/registry/picker-registry.js +29 -0
- package/cjs/registry/picker-registry.js.map +1 -0
- package/cjs/registry/plugin-registry.d.ts +10 -0
- package/cjs/registry/plugin-registry.js +29 -0
- package/cjs/registry/plugin-registry.js.map +1 -0
- package/cjs/registry/renderer-registry.d.ts +11 -0
- package/cjs/registry/renderer-registry.js +37 -0
- package/cjs/registry/renderer-registry.js.map +1 -0
- package/cjs/registry/types.d.ts +34 -0
- package/cjs/registry/types.js +6 -0
- package/cjs/registry/types.js.map +1 -0
- package/cjs/render/contributions/modules.d.ts +2 -2
- package/cjs/render/contributions/modules.js +3 -1
- package/cjs/render/contributions/modules.js.map +1 -1
- package/cjs/render/contributions/render/arc-module.d.ts +4 -2
- package/cjs/render/contributions/render/arc-module.js +6 -4
- package/cjs/render/contributions/render/arc-module.js.map +1 -1
- package/cjs/render/contributions/render/arc-render.js +4 -19
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/arc3d-module.d.ts +4 -2
- package/cjs/render/contributions/render/arc3d-module.js +6 -4
- package/cjs/render/contributions/render/arc3d-module.js.map +1 -1
- package/cjs/render/contributions/render/arc3d-render.js +3 -10
- package/cjs/render/contributions/render/arc3d-render.js.map +1 -1
- package/cjs/render/contributions/render/area-module.d.ts +4 -2
- package/cjs/render/contributions/render/area-module.js +6 -4
- package/cjs/render/contributions/render/area-module.js.map +1 -1
- package/cjs/render/contributions/render/area-render.js +4 -19
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/base-render.js +9 -5
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/circle-module.d.ts +4 -2
- package/cjs/render/contributions/render/circle-module.js +6 -4
- package/cjs/render/contributions/render/circle-module.js.map +1 -1
- package/cjs/render/contributions/render/circle-render.js +3 -18
- package/cjs/render/contributions/render/circle-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/base-contribution-render.js +3 -18
- package/cjs/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js +5 -13
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-contribution.d.ts +13 -4
- package/cjs/render/contributions/render/draw-contribution.js +22 -22
- package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.js +5 -15
- package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
- package/cjs/render/contributions/render/glyph-module.d.ts +4 -2
- package/cjs/render/contributions/render/glyph-module.js +6 -4
- package/cjs/render/contributions/render/glyph-module.js.map +1 -1
- package/cjs/render/contributions/render/glyph-render.js +3 -10
- package/cjs/render/contributions/render/glyph-render.js.map +1 -1
- package/cjs/render/contributions/render/graphic-render.js +1 -10
- package/cjs/render/contributions/render/graphic-render.js.map +1 -1
- package/cjs/render/contributions/render/group-render.js +4 -19
- package/cjs/render/contributions/render/group-render.js.map +1 -1
- package/cjs/render/contributions/render/image-module.d.ts +4 -2
- package/cjs/render/contributions/render/image-module.js +6 -4
- package/cjs/render/contributions/render/image-module.js.map +1 -1
- package/cjs/render/contributions/render/image-render.d.ts +2 -2
- package/cjs/render/contributions/render/image-render.js +14 -30
- package/cjs/render/contributions/render/image-render.js.map +1 -1
- package/cjs/render/contributions/render/incremental-area-render.js +3 -10
- package/cjs/render/contributions/render/incremental-area-render.js.map +1 -1
- package/cjs/render/contributions/render/incremental-draw-contribution.d.ts +2 -2
- package/cjs/render/contributions/render/incremental-draw-contribution.js +4 -19
- package/cjs/render/contributions/render/incremental-draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/incremental-line-render.js +3 -10
- package/cjs/render/contributions/render/incremental-line-render.js.map +1 -1
- package/cjs/render/contributions/render/line-module.d.ts +4 -2
- package/cjs/render/contributions/render/line-module.js +6 -4
- package/cjs/render/contributions/render/line-module.js.map +1 -1
- package/cjs/render/contributions/render/line-render.js +3 -10
- package/cjs/render/contributions/render/line-render.js.map +1 -1
- package/cjs/render/contributions/render/module.d.ts +4 -3
- package/cjs/render/contributions/render/module.js +10 -6
- package/cjs/render/contributions/render/module.js.map +1 -1
- package/cjs/render/contributions/render/path-module.d.ts +4 -2
- package/cjs/render/contributions/render/path-module.js +6 -4
- package/cjs/render/contributions/render/path-module.js.map +1 -1
- package/cjs/render/contributions/render/path-render.js +3 -18
- package/cjs/render/contributions/render/path-render.js.map +1 -1
- package/cjs/render/contributions/render/polygon-module.d.ts +4 -2
- package/cjs/render/contributions/render/polygon-module.js +6 -4
- package/cjs/render/contributions/render/polygon-module.js.map +1 -1
- package/cjs/render/contributions/render/polygon-render.js +3 -18
- package/cjs/render/contributions/render/polygon-render.js.map +1 -1
- package/cjs/render/contributions/render/pyramid3d-module.d.ts +4 -2
- package/cjs/render/contributions/render/pyramid3d-module.js +6 -4
- package/cjs/render/contributions/render/pyramid3d-module.js.map +1 -1
- package/cjs/render/contributions/render/pyramid3d-render.js +3 -10
- package/cjs/render/contributions/render/pyramid3d-render.js.map +1 -1
- package/cjs/render/contributions/render/rect-module.d.ts +4 -2
- package/cjs/render/contributions/render/rect-module.js +11 -8
- package/cjs/render/contributions/render/rect-module.js.map +1 -1
- package/cjs/render/contributions/render/rect-render.js +3 -18
- package/cjs/render/contributions/render/rect-render.js.map +1 -1
- package/cjs/render/contributions/render/rect3d-module.d.ts +4 -2
- package/cjs/render/contributions/render/rect3d-module.js +6 -4
- package/cjs/render/contributions/render/rect3d-module.js.map +1 -1
- package/cjs/render/contributions/render/rect3d-render.js +3 -10
- package/cjs/render/contributions/render/rect3d-render.js.map +1 -1
- package/cjs/render/contributions/render/render-slector.js.map +1 -1
- package/cjs/render/contributions/render/richtext-module.d.ts +4 -2
- package/cjs/render/contributions/render/richtext-module.js +6 -4
- package/cjs/render/contributions/render/richtext-module.js.map +1 -1
- package/cjs/render/contributions/render/richtext-render.js +3 -12
- package/cjs/render/contributions/render/richtext-render.js.map +1 -1
- package/cjs/render/contributions/render/star-module.d.ts +4 -2
- package/cjs/render/contributions/render/star-module.js +9 -6
- package/cjs/render/contributions/render/star-module.js.map +1 -1
- package/cjs/render/contributions/render/star-render.js +3 -18
- package/cjs/render/contributions/render/star-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol-module.d.ts +4 -2
- package/cjs/render/contributions/render/symbol-module.js +6 -4
- package/cjs/render/contributions/render/symbol-module.js.map +1 -1
- package/cjs/render/contributions/render/symbol-render.js +3 -18
- package/cjs/render/contributions/render/symbol-render.js.map +1 -1
- package/cjs/render/contributions/render/text-module.d.ts +4 -2
- package/cjs/render/contributions/render/text-module.js +6 -4
- package/cjs/render/contributions/render/text-module.js.map +1 -1
- package/cjs/render/contributions/render/text-render.js +3 -18
- package/cjs/render/contributions/render/text-render.js.map +1 -1
- package/cjs/render/render-modules.d.ts +4 -3
- package/cjs/render/render-modules.js +6 -4
- package/cjs/render/render-modules.js.map +1 -1
- package/cjs/render/render-service.d.ts +1 -1
- package/cjs/render/render-service.js +4 -18
- package/cjs/render/render-service.js.map +1 -1
- package/dist/index.es.js +22505 -20114
- package/es/application.d.ts +14 -5
- package/es/application.js +1 -10
- package/es/application.js.map +1 -1
- package/es/canvas/empty-context.js +2 -17
- package/es/canvas/empty-context.js.map +1 -1
- package/es/canvas/util.d.ts +2 -3
- package/es/canvas/util.js +15 -5
- package/es/canvas/util.js.map +1 -1
- package/es/color-string/index.js +2 -1
- package/es/common/contribution-provider.d.ts +16 -9
- package/es/common/contribution-provider.js +6 -2
- package/es/common/contribution-provider.js.map +1 -1
- package/es/common/diff.js +1 -2
- package/es/common/enums.d.ts +2 -0
- package/es/common/enums.js +1 -0
- package/es/common/enums.js.map +1 -1
- package/es/common/event-transformer.js +43 -6
- package/es/common/event-transformer.js.map +1 -1
- package/es/common/explicit-binding.d.ts +5 -0
- package/es/common/explicit-binding.js +10 -0
- package/es/common/explicit-binding.js.map +1 -0
- package/es/common/performance-raf.d.ts +1 -0
- package/es/common/performance-raf.js +5 -0
- package/es/common/performance-raf.js.map +1 -1
- package/es/common/render-area.js +1 -1
- package/es/common/render-command-list.js +1 -1
- package/es/common/render-curve.js +1 -1
- package/es/common/render-utils.js +1 -1
- package/es/common/seg-context.js +1 -2
- package/es/common/simplify.js +1 -1
- package/es/common/sort.js +1 -1
- package/es/common/split-path.js +1 -1
- package/es/common/store.js +1 -1
- package/es/common/text.js +1 -1
- package/es/common/utils.js +1 -1
- package/es/core/application.js +1 -1
- package/es/core/camera.js +1 -1
- package/es/core/constants.js +1 -1
- package/es/core/contributions/env/base-contribution.js +3 -13
- package/es/core/contributions/env/base-contribution.js.map +1 -1
- package/es/core/contributions/env/modules.d.ts +4 -3
- package/es/core/contributions/env/modules.js +4 -4
- package/es/core/contributions/env/modules.js.map +1 -1
- package/es/core/contributions/layerHandler/canvas2d-contribution.js +2 -16
- package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/es/core/contributions/layerHandler/empty-contribution.js +2 -16
- package/es/core/contributions/layerHandler/empty-contribution.js.map +1 -1
- package/es/core/contributions/layerHandler/modules.d.ts +4 -3
- package/es/core/contributions/layerHandler/modules.js +4 -4
- package/es/core/contributions/layerHandler/modules.js.map +1 -1
- package/es/core/contributions/layerHandler/offscreen2d-contribution.js +2 -16
- package/es/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
- package/es/core/contributions/modules.d.ts +2 -2
- package/es/core/contributions/modules.js +7 -1
- package/es/core/contributions/modules.js.map +1 -1
- package/es/core/contributions/textMeasure/AtextMeasure.js +2 -14
- package/es/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
- package/es/core/contributions/textMeasure/modules.d.ts +4 -3
- package/es/core/contributions/textMeasure/modules.js +4 -4
- package/es/core/contributions/textMeasure/modules.js.map +1 -1
- package/es/core/contributions/textMeasure/textMeasure-contribution.js +2 -14
- package/es/core/contributions/textMeasure/textMeasure-contribution.js.map +1 -1
- package/es/core/contributions/window/base-contribution.js +2 -16
- package/es/core/contributions/window/base-contribution.js.map +1 -1
- package/es/core/core-modules.d.ts +4 -3
- package/es/core/core-modules.js +13 -9
- package/es/core/core-modules.js.map +1 -1
- package/es/core/global-module.js +2 -0
- package/es/core/global-module.js.map +1 -1
- package/es/core/global.d.ts +2 -0
- package/es/core/global.js +8 -24
- package/es/core/global.js.map +1 -1
- package/es/core/graphic-utils.d.ts +1 -2
- package/es/core/graphic-utils.js +8 -35
- package/es/core/graphic-utils.js.map +1 -1
- package/es/core/index.js +1 -1
- package/es/core/layer-service.d.ts +7 -2
- package/es/core/layer-service.js +28 -34
- package/es/core/layer-service.js.map +1 -1
- package/es/core/layer.js +1 -1
- package/es/core/layer.js.map +1 -1
- package/es/core/light.js +1 -1
- package/es/core/stage.d.ts +19 -7
- package/es/core/stage.js +64 -48
- package/es/core/stage.js.map +1 -1
- package/es/core/window.d.ts +7 -5
- package/es/core/window.js +13 -25
- package/es/core/window.js.map +1 -1
- package/es/create.d.ts +1 -2
- package/es/create.js +4 -2
- package/es/create.js.map +1 -1
- package/es/entries/app-context.d.ts +30 -0
- package/es/entries/app-context.js +86 -0
- package/es/entries/app-context.js.map +1 -0
- package/es/entries/browser.d.ts +25 -0
- package/es/entries/browser.js +36 -0
- package/es/entries/browser.js.map +1 -0
- package/es/entries/index.d.ts +7 -0
- package/es/entries/index.js +14 -0
- package/es/entries/index.js.map +1 -0
- package/es/entries/miniapp.d.ts +6 -0
- package/es/entries/miniapp.js +12 -0
- package/es/entries/miniapp.js.map +1 -0
- package/es/entries/node.d.ts +6 -0
- package/es/entries/node.js +12 -0
- package/es/entries/node.js.map +1 -0
- package/es/entries/runtime-installer.d.ts +11 -0
- package/es/entries/runtime-installer.js +130 -0
- package/es/entries/runtime-installer.js.map +1 -0
- package/es/entries/types.d.ts +29 -0
- package/es/entries/types.js +2 -0
- package/es/entries/types.js.map +1 -0
- package/es/event/util.d.ts +1 -1
- package/es/factory/graphic-factory.d.ts +7 -0
- package/es/factory/graphic-factory.js +15 -0
- package/es/factory/graphic-factory.js.map +1 -0
- package/es/factory/index.d.ts +4 -0
- package/es/factory/index.js +8 -0
- package/es/factory/index.js.map +1 -0
- package/es/factory/layer-factory.d.ts +7 -0
- package/es/factory/layer-factory.js +11 -0
- package/es/factory/layer-factory.js.map +1 -0
- package/es/factory/stage-factory.d.ts +8 -0
- package/es/factory/stage-factory.js +12 -0
- package/es/factory/stage-factory.js.map +1 -0
- package/es/factory/types.d.ts +34 -0
- package/es/factory/types.js +2 -0
- package/es/factory/types.js.map +1 -0
- package/es/factory.d.ts +1 -0
- package/es/factory.js +2 -0
- package/es/factory.js.map +1 -1
- package/es/global.d.ts +2 -0
- package/es/global.js +10 -0
- package/es/global.js.map +1 -0
- package/es/graphic/area.js +1 -1
- package/es/graphic/area.js.map +1 -1
- package/es/graphic/bounds.js +3 -3
- package/es/graphic/bounds.js.map +1 -1
- package/es/graphic/config.js +0 -1
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/glyph.js +9 -3
- package/es/graphic/glyph.js.map +1 -1
- package/es/graphic/graphic-creator.d.ts +9 -4
- package/es/graphic/graphic-creator.js +32 -5
- package/es/graphic/graphic-creator.js.map +1 -1
- package/es/graphic/graphic-service/graphic-module.d.ts +4 -3
- package/es/graphic/graphic-service/graphic-module.js +4 -4
- package/es/graphic/graphic-service/graphic-module.js.map +1 -1
- package/es/graphic/graphic-service/graphic-service.d.ts +2 -3
- package/es/graphic/graphic-service/graphic-service.js +6 -25
- package/es/graphic/graphic-service/graphic-service.js.map +1 -1
- package/es/graphic/graphic.d.ts +80 -11
- package/es/graphic/graphic.js +473 -139
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/group.d.ts +11 -1
- package/es/graphic/group.js +46 -10
- package/es/graphic/group.js.map +1 -1
- package/es/graphic/index.d.ts +3 -0
- package/es/graphic/index.js +4 -0
- package/es/graphic/index.js.map +1 -1
- package/es/graphic/line.js +1 -1
- package/es/graphic/line.js.map +1 -1
- package/es/graphic/state/attribute-update-classifier.d.ts +13 -0
- package/es/graphic/state/attribute-update-classifier.js +61 -0
- package/es/graphic/state/attribute-update-classifier.js.map +1 -0
- package/es/graphic/state/shared-state-refresh.d.ts +6 -0
- package/es/graphic/state/shared-state-refresh.js +46 -0
- package/es/graphic/state/shared-state-refresh.js.map +1 -0
- package/es/graphic/state/shared-state-scope.d.ts +25 -0
- package/es/graphic/state/shared-state-scope.js +90 -0
- package/es/graphic/state/shared-state-scope.js.map +1 -0
- package/es/graphic/state/state-batch-scheduler.d.ts +42 -0
- package/es/graphic/state/state-batch-scheduler.js +278 -0
- package/es/graphic/state/state-batch-scheduler.js.map +1 -0
- package/es/graphic/state/state-definition-compiler.d.ts +6 -0
- package/es/graphic/state/state-definition-compiler.js +83 -0
- package/es/graphic/state/state-definition-compiler.js.map +1 -0
- package/es/graphic/state/state-definition.d.ts +44 -0
- package/es/graphic/state/state-definition.js +2 -0
- package/es/graphic/state/state-definition.js.map +1 -0
- package/es/graphic/state/state-engine.d.ts +38 -0
- package/es/graphic/state/state-engine.js +212 -0
- package/es/graphic/state/state-engine.js.map +1 -0
- package/es/graphic/state/state-model.d.ts +43 -0
- package/es/graphic/state/state-model.js +135 -0
- package/es/graphic/state/state-model.js.map +1 -0
- package/es/graphic/state/state-perf-monitor.d.ts +119 -0
- package/es/graphic/state/state-perf-monitor.js +207 -0
- package/es/graphic/state/state-perf-monitor.js.map +1 -0
- package/es/graphic/state/state-style-resolver.d.ts +22 -0
- package/es/graphic/state/state-style-resolver.js +65 -0
- package/es/graphic/state/state-style-resolver.js.map +1 -0
- package/es/graphic/state/state-transition-orchestrator.d.ts +41 -0
- package/es/graphic/state/state-transition-orchestrator.js +68 -0
- package/es/graphic/state/state-transition-orchestrator.js.map +1 -0
- package/es/graphic/text.d.ts +3 -2
- package/es/graphic/text.js +22 -13
- package/es/graphic/text.js.map +1 -1
- package/es/graphic/theme.d.ts +5 -0
- package/es/graphic/theme.js +7 -0
- package/es/graphic/theme.js.map +1 -1
- package/es/graphic/wrap-text.d.ts +1 -1
- package/es/graphic/wrap-text.js +18 -13
- package/es/graphic/wrap-text.js.map +1 -1
- package/es/index.d.ts +7 -4
- package/es/index.js +12 -6
- package/es/index.js.map +1 -1
- package/es/interface/global.d.ts +2 -0
- package/es/interface/global.js.map +1 -1
- package/es/interface/graphic/group.d.ts +6 -0
- package/es/interface/graphic/group.js.map +1 -1
- package/es/interface/graphic/theme.d.ts +3 -0
- package/es/interface/graphic/theme.js.map +1 -1
- package/es/interface/graphic.d.ts +24 -26
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/plugin.d.ts +2 -0
- package/es/interface/plugin.js.map +1 -1
- package/es/interface/stage.d.ts +11 -3
- package/es/interface/stage.js.map +1 -1
- package/es/interface/theme-service.js.map +1 -1
- package/es/legacy/binding-context.d.ts +24 -0
- package/es/legacy/binding-context.js +90 -0
- package/es/legacy/binding-context.js.map +1 -0
- package/es/legacy/bootstrap.d.ts +10 -0
- package/es/legacy/bootstrap.js +73 -0
- package/es/legacy/bootstrap.js.map +1 -0
- package/es/legacy/module-types.d.ts +2 -0
- package/es/legacy/module-types.js +2 -0
- package/es/legacy/module-types.js.map +1 -0
- package/es/modules.d.ts +5 -6
- package/es/modules.js +37 -33
- package/es/modules.js.map +1 -1
- package/es/picker/global-picker-service.js +2 -16
- package/es/picker/global-picker-service.js.map +1 -1
- package/es/picker/pick-interceptor.js +8 -32
- package/es/picker/pick-interceptor.js.map +1 -1
- package/es/picker/pick-modules.d.ts +5 -3
- package/es/picker/pick-modules.js +4 -4
- package/es/picker/pick-modules.js.map +1 -1
- package/es/picker/picker-service.d.ts +13 -4
- package/es/picker/picker-service.js +16 -26
- package/es/picker/picker-service.js.map +1 -1
- package/es/plugins/base-plugin.d.ts +8 -0
- package/es/plugins/base-plugin.js +7 -0
- package/es/plugins/base-plugin.js.map +1 -0
- package/es/plugins/browser-env-plugin.d.ts +8 -0
- package/es/plugins/browser-env-plugin.js +16 -0
- package/es/plugins/browser-env-plugin.js.map +1 -0
- package/es/plugins/builtin-plugin/dirty-bounds-plugin.d.ts +4 -1
- package/es/plugins/builtin-plugin/dirty-bounds-plugin.js +26 -3
- package/es/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js +3 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/es/plugins/index.d.ts +5 -0
- package/es/plugins/index.js +10 -0
- package/es/plugins/index.js.map +1 -0
- package/es/plugins/picker-plugin.d.ts +7 -0
- package/es/plugins/picker-plugin.js +11 -0
- package/es/plugins/picker-plugin.js.map +1 -0
- package/es/plugins/plugin-modules.d.ts +4 -3
- package/es/plugins/plugin-modules.js +4 -4
- package/es/plugins/plugin-modules.js.map +1 -1
- package/es/plugins/plugin-service.d.ts +16 -2
- package/es/plugins/plugin-service.js +25 -32
- package/es/plugins/plugin-service.js.map +1 -1
- package/es/plugins/renderer-plugin.d.ts +7 -0
- package/es/plugins/renderer-plugin.js +11 -0
- package/es/plugins/renderer-plugin.js.map +1 -0
- package/es/plugins/types.d.ts +28 -0
- package/es/plugins/types.js +2 -0
- package/es/plugins/types.js.map +1 -0
- package/es/register/register-arc.js +2 -2
- package/es/register/register-arc.js.map +1 -1
- package/es/register/register-arc3d.js +2 -2
- package/es/register/register-arc3d.js.map +1 -1
- package/es/register/register-area.js +2 -2
- package/es/register/register-area.js.map +1 -1
- package/es/register/register-circle.js +2 -2
- package/es/register/register-circle.js.map +1 -1
- package/es/register/register-glyph.js +2 -2
- package/es/register/register-glyph.js.map +1 -1
- package/es/register/register-group.js +2 -2
- package/es/register/register-group.js.map +1 -1
- package/es/register/register-image.js +2 -2
- package/es/register/register-image.js.map +1 -1
- package/es/register/register-line.js +2 -2
- package/es/register/register-line.js.map +1 -1
- package/es/register/register-path.js +2 -2
- package/es/register/register-path.js.map +1 -1
- package/es/register/register-polygon.js +2 -2
- package/es/register/register-polygon.js.map +1 -1
- package/es/register/register-pyramid3d.js +2 -2
- package/es/register/register-pyramid3d.js.map +1 -1
- package/es/register/register-rect.js +2 -2
- package/es/register/register-rect.js.map +1 -1
- package/es/register/register-rect3d.js +2 -2
- package/es/register/register-rect3d.js.map +1 -1
- package/es/register/register-richtext.js +2 -2
- package/es/register/register-richtext.js.map +1 -1
- package/es/register/register-shadowRoot.js +2 -2
- package/es/register/register-shadowRoot.js.map +1 -1
- package/es/register/register-star.js +2 -2
- package/es/register/register-star.js.map +1 -1
- package/es/register/register-symbol.js +2 -2
- package/es/register/register-symbol.js.map +1 -1
- package/es/register/register-text.js +2 -2
- package/es/register/register-text.js.map +1 -1
- package/es/register/register-wraptext.js +2 -2
- package/es/register/register-wraptext.js.map +1 -1
- package/es/registry/contribution-registry.d.ts +9 -0
- package/es/registry/contribution-registry.js +25 -0
- package/es/registry/contribution-registry.js.map +1 -0
- package/es/registry/index.d.ts +5 -0
- package/es/registry/index.js +10 -0
- package/es/registry/index.js.map +1 -0
- package/es/registry/picker-registry.d.ts +10 -0
- package/es/registry/picker-registry.js +21 -0
- package/es/registry/picker-registry.js.map +1 -0
- package/es/registry/plugin-registry.d.ts +10 -0
- package/es/registry/plugin-registry.js +21 -0
- package/es/registry/plugin-registry.js.map +1 -0
- package/es/registry/renderer-registry.d.ts +11 -0
- package/es/registry/renderer-registry.js +29 -0
- package/es/registry/renderer-registry.js.map +1 -0
- package/es/registry/types.d.ts +34 -0
- package/es/registry/types.js +2 -0
- package/es/registry/types.js.map +1 -0
- package/es/render/contributions/modules.d.ts +2 -2
- package/es/render/contributions/modules.js +3 -1
- package/es/render/contributions/modules.js.map +1 -1
- package/es/render/contributions/render/arc-module.d.ts +4 -2
- package/es/render/contributions/render/arc-module.js +4 -4
- package/es/render/contributions/render/arc-module.js.map +1 -1
- package/es/render/contributions/render/arc-render.js +2 -24
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/arc3d-module.d.ts +4 -2
- package/es/render/contributions/render/arc3d-module.js +4 -4
- package/es/render/contributions/render/arc3d-module.js.map +1 -1
- package/es/render/contributions/render/arc3d-render.js +2 -14
- package/es/render/contributions/render/arc3d-render.js.map +1 -1
- package/es/render/contributions/render/area-module.d.ts +4 -2
- package/es/render/contributions/render/area-module.js +4 -4
- package/es/render/contributions/render/area-module.js.map +1 -1
- package/es/render/contributions/render/area-render.js +2 -24
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/base-render.js +8 -5
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/circle-module.d.ts +4 -2
- package/es/render/contributions/render/circle-module.js +4 -4
- package/es/render/contributions/render/circle-module.js.map +1 -1
- package/es/render/contributions/render/circle-render.js +2 -24
- package/es/render/contributions/render/circle-render.js.map +1 -1
- package/es/render/contributions/render/contributions/base-contribution-render.js +2 -24
- package/es/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/rect-contribution-render.js +4 -20
- package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
- package/es/render/contributions/render/draw-contribution.d.ts +13 -4
- package/es/render/contributions/render/draw-contribution.js +24 -34
- package/es/render/contributions/render/draw-contribution.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.js +4 -19
- package/es/render/contributions/render/draw-interceptor.js.map +1 -1
- package/es/render/contributions/render/glyph-module.d.ts +4 -2
- package/es/render/contributions/render/glyph-module.js +4 -4
- package/es/render/contributions/render/glyph-module.js.map +1 -1
- package/es/render/contributions/render/glyph-render.js +2 -14
- package/es/render/contributions/render/glyph-render.js.map +1 -1
- package/es/render/contributions/render/graphic-render.js +1 -13
- package/es/render/contributions/render/graphic-render.js.map +1 -1
- package/es/render/contributions/render/group-render.js +2 -24
- package/es/render/contributions/render/group-render.js.map +1 -1
- package/es/render/contributions/render/image-module.d.ts +4 -2
- package/es/render/contributions/render/image-module.js +4 -4
- package/es/render/contributions/render/image-module.js.map +1 -1
- package/es/render/contributions/render/image-render.d.ts +2 -2
- package/es/render/contributions/render/image-render.js +9 -31
- package/es/render/contributions/render/image-render.js.map +1 -1
- package/es/render/contributions/render/incremental-area-render.js +2 -14
- package/es/render/contributions/render/incremental-area-render.js.map +1 -1
- package/es/render/contributions/render/incremental-draw-contribution.d.ts +2 -2
- package/es/render/contributions/render/incremental-draw-contribution.js +3 -29
- package/es/render/contributions/render/incremental-draw-contribution.js.map +1 -1
- package/es/render/contributions/render/incremental-line-render.js +2 -14
- package/es/render/contributions/render/incremental-line-render.js.map +1 -1
- package/es/render/contributions/render/line-module.d.ts +4 -2
- package/es/render/contributions/render/line-module.js +4 -4
- package/es/render/contributions/render/line-module.js.map +1 -1
- package/es/render/contributions/render/line-render.js +2 -14
- package/es/render/contributions/render/line-render.js.map +1 -1
- package/es/render/contributions/render/module.d.ts +4 -3
- package/es/render/contributions/render/module.js +10 -10
- package/es/render/contributions/render/module.js.map +1 -1
- package/es/render/contributions/render/path-module.d.ts +4 -2
- package/es/render/contributions/render/path-module.js +4 -4
- package/es/render/contributions/render/path-module.js.map +1 -1
- package/es/render/contributions/render/path-render.js +2 -24
- package/es/render/contributions/render/path-render.js.map +1 -1
- package/es/render/contributions/render/polygon-module.d.ts +4 -2
- package/es/render/contributions/render/polygon-module.js +4 -4
- package/es/render/contributions/render/polygon-module.js.map +1 -1
- package/es/render/contributions/render/polygon-render.js +2 -24
- package/es/render/contributions/render/polygon-render.js.map +1 -1
- package/es/render/contributions/render/pyramid3d-module.d.ts +4 -2
- package/es/render/contributions/render/pyramid3d-module.js +4 -4
- package/es/render/contributions/render/pyramid3d-module.js.map +1 -1
- package/es/render/contributions/render/pyramid3d-render.js +2 -14
- package/es/render/contributions/render/pyramid3d-render.js.map +1 -1
- package/es/render/contributions/render/rect-module.d.ts +4 -2
- package/es/render/contributions/render/rect-module.js +7 -7
- package/es/render/contributions/render/rect-module.js.map +1 -1
- package/es/render/contributions/render/rect-render.js +2 -24
- package/es/render/contributions/render/rect-render.js.map +1 -1
- package/es/render/contributions/render/rect3d-module.d.ts +4 -2
- package/es/render/contributions/render/rect3d-module.js +4 -4
- package/es/render/contributions/render/rect3d-module.js.map +1 -1
- package/es/render/contributions/render/rect3d-render.js +2 -14
- package/es/render/contributions/render/rect3d-render.js.map +1 -1
- package/es/render/contributions/render/render-slector.js.map +1 -1
- package/es/render/contributions/render/richtext-module.d.ts +4 -2
- package/es/render/contributions/render/richtext-module.js +4 -4
- package/es/render/contributions/render/richtext-module.js.map +1 -1
- package/es/render/contributions/render/richtext-render.js +2 -16
- package/es/render/contributions/render/richtext-render.js.map +1 -1
- package/es/render/contributions/render/star-module.d.ts +4 -2
- package/es/render/contributions/render/star-module.js +9 -5
- package/es/render/contributions/render/star-module.js.map +1 -1
- package/es/render/contributions/render/star-render.js +2 -24
- package/es/render/contributions/render/star-render.js.map +1 -1
- package/es/render/contributions/render/symbol-module.d.ts +4 -2
- package/es/render/contributions/render/symbol-module.js +4 -4
- package/es/render/contributions/render/symbol-module.js.map +1 -1
- package/es/render/contributions/render/symbol-render.js +2 -24
- package/es/render/contributions/render/symbol-render.js.map +1 -1
- package/es/render/contributions/render/text-module.d.ts +4 -2
- package/es/render/contributions/render/text-module.js +4 -4
- package/es/render/contributions/render/text-module.js.map +1 -1
- package/es/render/contributions/render/text-render.js +2 -24
- package/es/render/contributions/render/text-render.js.map +1 -1
- package/es/render/render-modules.d.ts +4 -3
- package/es/render/render-modules.js +4 -4
- package/es/render/render-modules.js.map +1 -1
- package/es/render/render-service.d.ts +1 -1
- package/es/render/render-service.js +4 -22
- package/es/render/render-service.js.map +1 -1
- package/package.json +8 -7
- package/cjs/common/inversify/annotation/inject.d.ts +0 -1
- package/cjs/common/inversify/annotation/inject.js +0 -10
- package/cjs/common/inversify/annotation/inject.js.map +0 -1
- package/cjs/common/inversify/annotation/inject_base.d.ts +0 -14
- package/cjs/common/inversify/annotation/inject_base.js +0 -39
- package/cjs/common/inversify/annotation/inject_base.js.map +0 -1
- package/cjs/common/inversify/annotation/injectable.d.ts +0 -1
- package/cjs/common/inversify/annotation/injectable.js +0 -46
- package/cjs/common/inversify/annotation/injectable.js.map +0 -1
- package/cjs/common/inversify/annotation/multi_inject.d.ts +0 -1
- package/cjs/common/inversify/annotation/multi_inject.js +0 -10
- package/cjs/common/inversify/annotation/multi_inject.js.map +0 -1
- package/cjs/common/inversify/annotation/named.d.ts +0 -1
- package/cjs/common/inversify/annotation/named.js +0 -14
- package/cjs/common/inversify/annotation/named.js.map +0 -1
- package/cjs/common/inversify/annotation/optional.d.ts +0 -2
- package/cjs/common/inversify/annotation/optional.js +0 -14
- package/cjs/common/inversify/annotation/optional.js.map +0 -1
- package/cjs/common/inversify/binding.d.ts +0 -18
- package/cjs/common/inversify/binding.js +0 -26
- package/cjs/common/inversify/binding.js.map +0 -1
- package/cjs/common/inversify/container.d.ts +0 -28
- package/cjs/common/inversify/container.js +0 -158
- package/cjs/common/inversify/container.js.map +0 -1
- package/cjs/common/inversify/cotainer-module.d.ts +0 -6
- package/cjs/common/inversify/cotainer-module.js +0 -16
- package/cjs/common/inversify/cotainer-module.js.map +0 -1
- package/cjs/common/inversify/index.d.ts +0 -7
- package/cjs/common/inversify/index.js +0 -75
- package/cjs/common/inversify/index.js.map +0 -1
- package/cjs/common/inversify/interfaces.d.ts +0 -218
- package/cjs/common/inversify/interfaces.js.map +0 -1
- package/cjs/common/inversify/literal_types.d.ts +0 -5
- package/cjs/common/inversify/literal_types.js +0 -34
- package/cjs/common/inversify/literal_types.js.map +0 -1
- package/cjs/common/inversify/meta-data.d.ts +0 -6
- package/cjs/common/inversify/meta-data.js +0 -19
- package/cjs/common/inversify/meta-data.js.map +0 -1
- package/cjs/common/inversify/metadata_keys.d.ts +0 -12
- package/cjs/common/inversify/metadata_keys.js +0 -15
- package/cjs/common/inversify/metadata_keys.js.map +0 -1
- package/cjs/common/inversify/metadata_reader.d.ts +0 -6
- package/cjs/common/inversify/metadata_reader.js +0 -28
- package/cjs/common/inversify/metadata_reader.js.map +0 -1
- package/cjs/common/inversify/syntax/binding_in_syntax.d.ts +0 -10
- package/cjs/common/inversify/syntax/binding_in_syntax.js +0 -29
- package/cjs/common/inversify/syntax/binding_in_syntax.js.map +0 -1
- package/cjs/common/inversify/syntax/binding_to_syntax.d.ts +0 -12
- package/cjs/common/inversify/syntax/binding_to_syntax.js +0 -40
- package/cjs/common/inversify/syntax/binding_to_syntax.js.map +0 -1
- package/cjs/common/inversify/syntax/constraint_helpers.d.ts +0 -2
- package/cjs/common/inversify/syntax/constraint_helpers.js +0 -20
- package/cjs/common/inversify/syntax/constraint_helpers.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/decorator_utils.d.ts +0 -16
- package/cjs/common/inversify-lite/annotation/decorator_utils.js +0 -97
- package/cjs/common/inversify-lite/annotation/decorator_utils.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/inject.d.ts +0 -2
- package/cjs/common/inversify-lite/annotation/inject.js +0 -36
- package/cjs/common/inversify-lite/annotation/inject.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/inject_base.d.ts +0 -3
- package/cjs/common/inversify-lite/annotation/inject_base.js +0 -20
- package/cjs/common/inversify-lite/annotation/inject_base.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/injectable.d.ts +0 -2
- package/cjs/common/inversify-lite/annotation/injectable.js +0 -48
- package/cjs/common/inversify-lite/annotation/injectable.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/lazy_service_identifier.d.ts +0 -7
- package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js +0 -17
- package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/multi_inject.d.ts +0 -2
- package/cjs/common/inversify-lite/annotation/multi_inject.js +0 -36
- package/cjs/common/inversify-lite/annotation/multi_inject.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/named.d.ts +0 -2
- package/cjs/common/inversify-lite/annotation/named.js +0 -39
- package/cjs/common/inversify-lite/annotation/named.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/property_event_decorator.d.ts +0 -4
- package/cjs/common/inversify-lite/annotation/property_event_decorator.js +0 -24
- package/cjs/common/inversify-lite/annotation/property_event_decorator.js.map +0 -1
- package/cjs/common/inversify-lite/bindings/binding.d.ts +0 -20
- package/cjs/common/inversify-lite/bindings/binding.js +0 -27
- package/cjs/common/inversify-lite/bindings/binding.js.map +0 -1
- package/cjs/common/inversify-lite/bindings/binding_count.d.ts +0 -5
- package/cjs/common/inversify-lite/bindings/binding_count.js +0 -10
- package/cjs/common/inversify-lite/bindings/binding_count.js.map +0 -1
- package/cjs/common/inversify-lite/constants/error_msgs.d.ts +0 -32
- package/cjs/common/inversify-lite/constants/error_msgs.js +0 -50
- package/cjs/common/inversify-lite/constants/error_msgs.js.map +0 -1
- package/cjs/common/inversify-lite/constants/literal_types.d.ts +0 -5
- package/cjs/common/inversify-lite/constants/literal_types.js +0 -35
- package/cjs/common/inversify-lite/constants/literal_types.js.map +0 -1
- package/cjs/common/inversify-lite/constants/metadata_keys.d.ts +0 -13
- package/cjs/common/inversify-lite/constants/metadata_keys.js +0 -16
- package/cjs/common/inversify-lite/constants/metadata_keys.js.map +0 -1
- package/cjs/common/inversify-lite/container/container.d.ts +0 -46
- package/cjs/common/inversify-lite/container/container.js +0 -290
- package/cjs/common/inversify-lite/container/container.js.map +0 -1
- package/cjs/common/inversify-lite/container/container_module.d.ts +0 -11
- package/cjs/common/inversify-lite/container/container_module.js +0 -24
- package/cjs/common/inversify-lite/container/container_module.js.map +0 -1
- package/cjs/common/inversify-lite/container/lookup.d.ts +0 -16
- package/cjs/common/inversify-lite/container/lookup.js +0 -97
- package/cjs/common/inversify-lite/container/lookup.js.map +0 -1
- package/cjs/common/inversify-lite/index.d.ts +0 -1
- package/cjs/common/inversify-lite/index.js.map +0 -1
- package/cjs/common/inversify-lite/interfaces/interfaces.d.ts +0 -237
- package/cjs/common/inversify-lite/interfaces/interfaces.js.map +0 -1
- package/cjs/common/inversify-lite/planning/context.d.ts +0 -11
- package/cjs/common/inversify-lite/planning/context.js +0 -22
- package/cjs/common/inversify-lite/planning/context.js.map +0 -1
- package/cjs/common/inversify-lite/planning/metadata.d.ts +0 -8
- package/cjs/common/inversify-lite/planning/metadata.js +0 -44
- package/cjs/common/inversify-lite/planning/metadata.js.map +0 -1
- package/cjs/common/inversify-lite/planning/metadata_reader.d.ts +0 -6
- package/cjs/common/inversify-lite/planning/metadata_reader.js +0 -51
- package/cjs/common/inversify-lite/planning/metadata_reader.js.map +0 -1
- package/cjs/common/inversify-lite/planning/plan.d.ts +0 -7
- package/cjs/common/inversify-lite/planning/plan.js +0 -14
- package/cjs/common/inversify-lite/planning/plan.js.map +0 -1
- package/cjs/common/inversify-lite/planning/planner.d.ts +0 -5
- package/cjs/common/inversify-lite/planning/planner.js +0 -132
- package/cjs/common/inversify-lite/planning/planner.js.map +0 -1
- package/cjs/common/inversify-lite/planning/queryable_string.d.ts +0 -9
- package/cjs/common/inversify-lite/planning/queryable_string.js +0 -23
- package/cjs/common/inversify-lite/planning/queryable_string.js.map +0 -1
- package/cjs/common/inversify-lite/planning/reflection_utils.d.ts +0 -5
- package/cjs/common/inversify-lite/planning/reflection_utils.js +0 -129
- package/cjs/common/inversify-lite/planning/reflection_utils.js.map +0 -1
- package/cjs/common/inversify-lite/planning/request.d.ts +0 -14
- package/cjs/common/inversify-lite/planning/request.js +0 -22
- package/cjs/common/inversify-lite/planning/request.js.map +0 -1
- package/cjs/common/inversify-lite/planning/target.d.ts +0 -23
- package/cjs/common/inversify-lite/planning/target.js +0 -81
- package/cjs/common/inversify-lite/planning/target.js.map +0 -1
- package/cjs/common/inversify-lite/resolution/instantiation.d.ts +0 -3
- package/cjs/common/inversify-lite/resolution/instantiation.js +0 -143
- package/cjs/common/inversify-lite/resolution/instantiation.js.map +0 -1
- package/cjs/common/inversify-lite/resolution/resolver.d.ts +0 -3
- package/cjs/common/inversify-lite/resolution/resolver.js +0 -74
- package/cjs/common/inversify-lite/resolution/resolver.js.map +0 -1
- package/cjs/common/inversify-lite/scope/scope.d.ts +0 -3
- package/cjs/common/inversify-lite/scope/scope.js +0 -56
- package/cjs/common/inversify-lite/scope/scope.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_in_syntax.d.ts +0 -9
- package/cjs/common/inversify-lite/syntax/binding_in_syntax.js +0 -25
- package/cjs/common/inversify-lite/syntax/binding_in_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.d.ts +0 -12
- package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -29
- package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_on_syntax.d.ts +0 -6
- package/cjs/common/inversify-lite/syntax/binding_on_syntax.js +0 -14
- package/cjs/common/inversify-lite/syntax/binding_on_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_to_syntax.d.ts +0 -18
- package/cjs/common/inversify-lite/syntax/binding_to_syntax.js +0 -88
- package/cjs/common/inversify-lite/syntax/binding_to_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.d.ts +0 -8
- package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -19
- package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_when_syntax.d.ts +0 -7
- package/cjs/common/inversify-lite/syntax/binding_when_syntax.js +0 -20
- package/cjs/common/inversify-lite/syntax/binding_when_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/constraint_helpers.d.ts +0 -3
- package/cjs/common/inversify-lite/syntax/constraint_helpers.js +0 -38
- package/cjs/common/inversify-lite/syntax/constraint_helpers.js.map +0 -1
- package/cjs/common/inversify-lite/utils/async.d.ts +0 -3
- package/cjs/common/inversify-lite/utils/async.js +0 -15
- package/cjs/common/inversify-lite/utils/async.js.map +0 -1
- package/cjs/common/inversify-lite/utils/binding_utils.d.ts +0 -4
- package/cjs/common/inversify-lite/utils/binding_utils.js +0 -94
- package/cjs/common/inversify-lite/utils/binding_utils.js.map +0 -1
- package/cjs/common/inversify-lite/utils/clonable.d.ts +0 -3
- package/cjs/common/inversify-lite/utils/clonable.js +0 -10
- package/cjs/common/inversify-lite/utils/clonable.js.map +0 -1
- package/cjs/common/inversify-lite/utils/exceptions.d.ts +0 -2
- package/cjs/common/inversify-lite/utils/exceptions.js +0 -43
- package/cjs/common/inversify-lite/utils/exceptions.js.map +0 -1
- package/cjs/common/inversify-lite/utils/factory_type.d.ts +0 -5
- package/cjs/common/inversify-lite/utils/factory_type.js +0 -11
- package/cjs/common/inversify-lite/utils/factory_type.js.map +0 -1
- package/cjs/common/inversify-lite/utils/id.d.ts +0 -2
- package/cjs/common/inversify-lite/utils/id.js +0 -14
- package/cjs/common/inversify-lite/utils/id.js.map +0 -1
- package/cjs/common/inversify-lite/utils/js.d.ts +0 -1
- package/cjs/common/inversify-lite/utils/js.js +0 -14
- package/cjs/common/inversify-lite/utils/js.js.map +0 -1
- package/cjs/common/inversify-lite/utils/serialization.d.ts +0 -10
- package/cjs/common/inversify-lite/utils/serialization.js +0 -99
- package/cjs/common/inversify-lite/utils/serialization.js.map +0 -1
- package/cjs/container.d.ts +0 -2
- package/cjs/container.js +0 -10
- package/cjs/container.js.map +0 -1
- package/es/common/inversify/annotation/inject.d.ts +0 -1
- package/es/common/inversify/annotation/inject.js +0 -6
- package/es/common/inversify/annotation/inject.js.map +0 -1
- package/es/common/inversify/annotation/inject_base.d.ts +0 -14
- package/es/common/inversify/annotation/inject_base.js +0 -29
- package/es/common/inversify/annotation/inject_base.js.map +0 -1
- package/es/common/inversify/annotation/injectable.d.ts +0 -1
- package/es/common/inversify/annotation/injectable.js +0 -10
- package/es/common/inversify/annotation/injectable.js.map +0 -1
- package/es/common/inversify/annotation/multi_inject.d.ts +0 -1
- package/es/common/inversify/annotation/multi_inject.js +0 -6
- package/es/common/inversify/annotation/multi_inject.js.map +0 -1
- package/es/common/inversify/annotation/named.d.ts +0 -1
- package/es/common/inversify/annotation/named.js +0 -10
- package/es/common/inversify/annotation/named.js.map +0 -1
- package/es/common/inversify/annotation/optional.d.ts +0 -2
- package/es/common/inversify/annotation/optional.js +0 -12
- package/es/common/inversify/annotation/optional.js.map +0 -1
- package/es/common/inversify/binding.d.ts +0 -18
- package/es/common/inversify/binding.js +0 -22
- package/es/common/inversify/binding.js.map +0 -1
- package/es/common/inversify/container.d.ts +0 -28
- package/es/common/inversify/container.js +0 -158
- package/es/common/inversify/container.js.map +0 -1
- package/es/common/inversify/cotainer-module.d.ts +0 -6
- package/es/common/inversify/cotainer-module.js +0 -8
- package/es/common/inversify/cotainer-module.js.map +0 -1
- package/es/common/inversify/index.d.ts +0 -7
- package/es/common/inversify/index.js +0 -14
- package/es/common/inversify/index.js.map +0 -1
- package/es/common/inversify/interfaces.d.ts +0 -218
- package/es/common/inversify/interfaces.js +0 -2
- package/es/common/inversify/interfaces.js.map +0 -1
- package/es/common/inversify/literal_types.d.ts +0 -5
- package/es/common/inversify/literal_types.js +0 -20
- package/es/common/inversify/literal_types.js.map +0 -1
- package/es/common/inversify/meta-data.d.ts +0 -6
- package/es/common/inversify/meta-data.js +0 -11
- package/es/common/inversify/meta-data.js.map +0 -1
- package/es/common/inversify/metadata_keys.d.ts +0 -12
- package/es/common/inversify/metadata_keys.js +0 -28
- package/es/common/inversify/metadata_keys.js.map +0 -1
- package/es/common/inversify/metadata_reader.d.ts +0 -6
- package/es/common/inversify/metadata_reader.js +0 -18
- package/es/common/inversify/metadata_reader.js.map +0 -1
- package/es/common/inversify/syntax/binding_in_syntax.d.ts +0 -10
- package/es/common/inversify/syntax/binding_in_syntax.js +0 -24
- package/es/common/inversify/syntax/binding_in_syntax.js.map +0 -1
- package/es/common/inversify/syntax/binding_to_syntax.d.ts +0 -12
- package/es/common/inversify/syntax/binding_to_syntax.js +0 -36
- package/es/common/inversify/syntax/binding_to_syntax.js.map +0 -1
- package/es/common/inversify/syntax/constraint_helpers.d.ts +0 -2
- package/es/common/inversify/syntax/constraint_helpers.js +0 -18
- package/es/common/inversify/syntax/constraint_helpers.js.map +0 -1
- package/es/common/inversify-lite/annotation/decorator_utils.d.ts +0 -16
- package/es/common/inversify-lite/annotation/decorator_utils.js +0 -67
- package/es/common/inversify-lite/annotation/decorator_utils.js.map +0 -1
- package/es/common/inversify-lite/annotation/inject.d.ts +0 -2
- package/es/common/inversify-lite/annotation/inject.js +0 -8
- package/es/common/inversify-lite/annotation/inject.js.map +0 -1
- package/es/common/inversify-lite/annotation/inject_base.d.ts +0 -3
- package/es/common/inversify-lite/annotation/inject_base.js +0 -16
- package/es/common/inversify-lite/annotation/inject_base.js.map +0 -1
- package/es/common/inversify-lite/annotation/injectable.d.ts +0 -2
- package/es/common/inversify-lite/annotation/injectable.js +0 -16
- package/es/common/inversify-lite/annotation/injectable.js.map +0 -1
- package/es/common/inversify-lite/annotation/lazy_service_identifier.d.ts +0 -7
- package/es/common/inversify-lite/annotation/lazy_service_identifier.js +0 -9
- package/es/common/inversify-lite/annotation/lazy_service_identifier.js.map +0 -1
- package/es/common/inversify-lite/annotation/multi_inject.d.ts +0 -2
- package/es/common/inversify-lite/annotation/multi_inject.js +0 -8
- package/es/common/inversify-lite/annotation/multi_inject.js.map +0 -1
- package/es/common/inversify-lite/annotation/named.d.ts +0 -2
- package/es/common/inversify-lite/annotation/named.js +0 -12
- package/es/common/inversify-lite/annotation/named.js.map +0 -1
- package/es/common/inversify-lite/annotation/property_event_decorator.d.ts +0 -4
- package/es/common/inversify-lite/annotation/property_event_decorator.js +0 -14
- package/es/common/inversify-lite/annotation/property_event_decorator.js.map +0 -1
- package/es/common/inversify-lite/bindings/binding.d.ts +0 -20
- package/es/common/inversify-lite/bindings/binding.js +0 -23
- package/es/common/inversify-lite/bindings/binding.js.map +0 -1
- package/es/common/inversify-lite/bindings/binding_count.d.ts +0 -5
- package/es/common/inversify-lite/bindings/binding_count.js +0 -6
- package/es/common/inversify-lite/bindings/binding_count.js.map +0 -1
- package/es/common/inversify-lite/constants/error_msgs.d.ts +0 -32
- package/es/common/inversify-lite/constants/error_msgs.js +0 -64
- package/es/common/inversify-lite/constants/error_msgs.js.map +0 -1
- package/es/common/inversify-lite/constants/literal_types.d.ts +0 -5
- package/es/common/inversify-lite/constants/literal_types.js +0 -21
- package/es/common/inversify-lite/constants/literal_types.js.map +0 -1
- package/es/common/inversify-lite/constants/metadata_keys.d.ts +0 -13
- package/es/common/inversify-lite/constants/metadata_keys.js +0 -30
- package/es/common/inversify-lite/constants/metadata_keys.js.map +0 -1
- package/es/common/inversify-lite/container/container.d.ts +0 -46
- package/es/common/inversify-lite/container/container.js +0 -279
- package/es/common/inversify-lite/container/container.js.map +0 -1
- package/es/common/inversify-lite/container/container_module.d.ts +0 -11
- package/es/common/inversify-lite/container/container_module.js +0 -14
- package/es/common/inversify-lite/container/container_module.js.map +0 -1
- package/es/common/inversify-lite/container/lookup.d.ts +0 -16
- package/es/common/inversify-lite/container/lookup.js +0 -68
- package/es/common/inversify-lite/container/lookup.js.map +0 -1
- package/es/common/inversify-lite/index.d.ts +0 -1
- package/es/common/inversify-lite/index.js +0 -2
- package/es/common/inversify-lite/index.js.map +0 -1
- package/es/common/inversify-lite/interfaces/interfaces.d.ts +0 -237
- package/es/common/inversify-lite/interfaces/interfaces.js +0 -2
- package/es/common/inversify-lite/interfaces/interfaces.js.map +0 -1
- package/es/common/inversify-lite/planning/context.d.ts +0 -11
- package/es/common/inversify-lite/planning/context.js +0 -16
- package/es/common/inversify-lite/planning/context.js.map +0 -1
- package/es/common/inversify-lite/planning/metadata.d.ts +0 -8
- package/es/common/inversify-lite/planning/metadata.js +0 -13
- package/es/common/inversify-lite/planning/metadata.js.map +0 -1
- package/es/common/inversify-lite/planning/metadata_reader.d.ts +0 -6
- package/es/common/inversify-lite/planning/metadata_reader.js +0 -18
- package/es/common/inversify-lite/planning/metadata_reader.js.map +0 -1
- package/es/common/inversify-lite/planning/plan.d.ts +0 -7
- package/es/common/inversify-lite/planning/plan.js +0 -8
- package/es/common/inversify-lite/planning/plan.js.map +0 -1
- package/es/common/inversify-lite/planning/planner.d.ts +0 -5
- package/es/common/inversify-lite/planning/planner.js +0 -120
- package/es/common/inversify-lite/planning/planner.js.map +0 -1
- package/es/common/inversify-lite/planning/queryable_string.d.ts +0 -9
- package/es/common/inversify-lite/planning/queryable_string.js +0 -17
- package/es/common/inversify-lite/planning/queryable_string.js.map +0 -1
- package/es/common/inversify-lite/planning/reflection_utils.d.ts +0 -5
- package/es/common/inversify-lite/planning/reflection_utils.js +0 -99
- package/es/common/inversify-lite/planning/reflection_utils.js.map +0 -1
- package/es/common/inversify-lite/planning/request.d.ts +0 -14
- package/es/common/inversify-lite/planning/request.js +0 -16
- package/es/common/inversify-lite/planning/request.js.map +0 -1
- package/es/common/inversify-lite/planning/target.d.ts +0 -23
- package/es/common/inversify-lite/planning/target.js +0 -58
- package/es/common/inversify-lite/planning/target.js.map +0 -1
- package/es/common/inversify-lite/resolution/instantiation.d.ts +0 -3
- package/es/common/inversify-lite/resolution/instantiation.js +0 -117
- package/es/common/inversify-lite/resolution/instantiation.js.map +0 -1
- package/es/common/inversify-lite/resolution/resolver.d.ts +0 -3
- package/es/common/inversify-lite/resolution/resolver.js +0 -55
- package/es/common/inversify-lite/resolution/resolver.js.map +0 -1
- package/es/common/inversify-lite/scope/scope.d.ts +0 -3
- package/es/common/inversify-lite/scope/scope.js +0 -50
- package/es/common/inversify-lite/scope/scope.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_in_syntax.d.ts +0 -9
- package/es/common/inversify-lite/syntax/binding_in_syntax.js +0 -21
- package/es/common/inversify-lite/syntax/binding_in_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.d.ts +0 -12
- package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -25
- package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_on_syntax.d.ts +0 -6
- package/es/common/inversify-lite/syntax/binding_on_syntax.js +0 -8
- package/es/common/inversify-lite/syntax/binding_on_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_to_syntax.d.ts +0 -18
- package/es/common/inversify-lite/syntax/binding_to_syntax.js +0 -63
- package/es/common/inversify-lite/syntax/binding_to_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_when_on_syntax.d.ts +0 -8
- package/es/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -13
- package/es/common/inversify-lite/syntax/binding_when_on_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_when_syntax.d.ts +0 -7
- package/es/common/inversify-lite/syntax/binding_when_syntax.js +0 -15
- package/es/common/inversify-lite/syntax/binding_when_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/constraint_helpers.d.ts +0 -3
- package/es/common/inversify-lite/syntax/constraint_helpers.js +0 -11
- package/es/common/inversify-lite/syntax/constraint_helpers.js.map +0 -1
- package/es/common/inversify-lite/utils/async.d.ts +0 -3
- package/es/common/inversify-lite/utils/async.js +0 -10
- package/es/common/inversify-lite/utils/async.js.map +0 -1
- package/es/common/inversify-lite/utils/binding_utils.d.ts +0 -4
- package/es/common/inversify-lite/utils/binding_utils.js +0 -65
- package/es/common/inversify-lite/utils/binding_utils.js.map +0 -1
- package/es/common/inversify-lite/utils/clonable.d.ts +0 -3
- package/es/common/inversify-lite/utils/clonable.js +0 -6
- package/es/common/inversify-lite/utils/clonable.js.map +0 -1
- package/es/common/inversify-lite/utils/exceptions.d.ts +0 -2
- package/es/common/inversify-lite/utils/exceptions.js +0 -8
- package/es/common/inversify-lite/utils/exceptions.js.map +0 -1
- package/es/common/inversify-lite/utils/factory_type.d.ts +0 -5
- package/es/common/inversify-lite/utils/factory_type.js +0 -7
- package/es/common/inversify-lite/utils/factory_type.js.map +0 -1
- package/es/common/inversify-lite/utils/id.d.ts +0 -2
- package/es/common/inversify-lite/utils/id.js +0 -8
- package/es/common/inversify-lite/utils/id.js.map +0 -1
- package/es/common/inversify-lite/utils/js.d.ts +0 -1
- package/es/common/inversify-lite/utils/js.js +0 -8
- package/es/common/inversify-lite/utils/js.js.map +0 -1
- package/es/common/inversify-lite/utils/serialization.d.ts +0 -10
- package/es/common/inversify-lite/utils/serialization.js +0 -66
- package/es/common/inversify-lite/utils/serialization.js.map +0 -1
- package/es/container.d.ts +0 -2
- package/es/container.js +0 -4
- package/es/container.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/interface/graphic.ts"],"names":[],"mappings":"","file":"graphic.js","sourcesContent":["import type { IAABBBounds, IMatrix, IPointLike, IPoint, BoundsAnchorType, IOBBBounds } from '@visactor/vutils';\nimport type { IAnimate, IStep, EasingType, IAnimateTarget, ITimeline } from './animation';\nimport type { IColor } from './color';\nimport type { IGroup } from './graphic/group';\nimport type { IShadowRoot } from './graphic/shadow-root';\nimport type { ILayer } from './layer';\nimport type { INode } from './node-tree';\nimport type { ICustomPath2D } from './path';\nimport type { IStage } from './stage';\nimport type { IGlyphGraphicAttribute } from './graphic/glyph';\nimport type { IContainPointMode } from '../common/enums';\nimport type { IFace3d } from './graphic/face3d';\nimport type { IPickerService } from './picker';\nimport type { ISymbolClass } from './graphic/symbol';\nimport type { IContext2d } from './context';\n\ntype IStrokeSeg = {\n /**\n * 百分比\n */\n start: number;\n /**\n * 百分比\n * end和length二选一\n */\n end: number;\n /**\n * 像素长度\n */\n length: number;\n};\n\n// TODO 最后加一个any\nexport type GraphicType =\n | 'area'\n | 'circle'\n | 'ellipse'\n | 'line'\n | 'rect'\n | 'rect3d'\n | 'path'\n | 'richtext'\n | 'text'\n | 'arc'\n | 'arc3d'\n | 'image'\n | 'symbol'\n | 'group'\n | 'shadowroot'\n | 'polygon'\n | 'pyramid3d'\n | 'glyph'\n | string;\n\n// Cursor style\n// See: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\nexport type Cursor =\n | 'auto'\n | 'default'\n | 'none'\n | 'context-menu'\n | 'help'\n | 'pointer'\n | 'progress'\n | 'wait'\n | 'cell'\n | 'crosshair'\n | 'text'\n | 'vertical-text'\n | 'alias'\n | 'copy'\n | 'move'\n | 'no-drop'\n | 'not-allowed'\n | 'grab'\n | 'grabbing'\n | 'all-scroll'\n | 'col-resize'\n | 'row-resize'\n | 'n-resize'\n | 'e-resize'\n | 's-resize'\n | 'w-resize'\n | 'ne-resize'\n | 'nw-resize'\n | 'se-resize'\n | 'sw-resize'\n | 'ew-resize'\n | 'ns-resize'\n | 'nesw-resize'\n | 'nwse-resize'\n | 'zoom-in'\n | 'zoom-out';\n\nexport type ITransform = {\n /**\n * x坐标\n */\n x: number;\n /**\n * y坐标\n */\n y: number;\n /**\n * z坐标\n */\n z: number;\n /**\n * x方向偏移量\n */\n dx: number;\n /**\n * y方向偏移量\n */\n dy: number;\n /**\n * z方向偏移量\n */\n dz: number;\n /**\n * x方向的滚动值\n */\n scrollX: number;\n /**\n * y方向的滚动值\n */\n scrollY: number;\n /**\n * x方向的缩放值\n */\n scaleX: number;\n /**\n * y方向的缩放值\n */\n scaleY: number;\n /**\n * z方向的缩放值\n */\n scaleZ: number;\n /**\n * 绕z轴的转角,即xy平面上的旋转角度\n */\n angle: number;\n /**\n * 绕x轴的转角\n */\n alpha: number;\n /**\n * 绕y轴的转角\n */\n beta: number;\n /**\n * 应用缩放的中心\n */\n scaleCenter: [number | string, number | string];\n /**\n * 基于AABB的锚点位置,用于简单的定位某些path\n */\n anchor: [number | string, number | string];\n /**\n * 3d的锚点位置\n */\n anchor3d: [number | string, number | string, number] | [number | string, number | string];\n /**\n * 处理矩阵,在正常计算完变换矩阵之后,会将该矩阵乘到变换矩阵上得到最终的变换矩阵\n */\n postMatrix: IMatrix;\n};\n\nexport type IFillType = boolean | string | IColor;\nexport type IFillStyle = {\n /**\n * 图形的填充透明度\n */\n fillOpacity: number;\n /**\n * 图形模糊效果程度\n */\n shadowBlur: number;\n /**\n * 图形的阴影颜色\n */\n shadowColor: string;\n /**\n * 阴影水平偏移距离\n */\n shadowOffsetX: number;\n /**\n * 阴影垂直偏移距离\n */\n shadowOffsetY: number;\n /**\n * 图形的填充颜色\n */\n fill: IFillType;\n};\n\nexport type ILayout = {\n /**\n * 设置对齐方式\n */\n alignSelf: 'auto' | 'flex-start' | 'flex-end' | 'center';\n};\n\nexport type IBorderStyle = Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> & {\n /**\n * 边距离边缘的距离\n */\n distance: number | string;\n /**\n * 是否显示边框,默认是不显示的\n */\n visible?: boolean;\n};\n\nexport type IStrokeType = boolean | string | IColor | null;\nexport type IStrokeStyle = {\n /**\n * 外部边框的样式配置,默认不展示外部边框\n */\n outerBorder: Partial<IBorderStyle>;\n /**\n * 内部边框的样式配置\n */\n innerBorder: Partial<IBorderStyle>;\n /**\n * 描边的透明度\n */\n strokeOpacity: number;\n /**\n * 设置线条虚线样式的属性,它通过定义实线和空白的交替长度来创建虚线效果\n */\n lineDash: number[];\n\n /**\n * 设置虚线样式的起始偏移量\n */\n lineDashOffset: number;\n\n /**\n * 设置线条的宽度\n */\n lineWidth: number;\n\n /**\n * 设置线条末端的样式\n */\n lineCap: CanvasLineCap;\n\n /**\n * 设置线条拐角的样式\n */\n lineJoin: CanvasLineJoin;\n\n /**\n * 设置线条拐角处的斜接限制\n */\n miterLimit: number;\n /**\n * 描边的boundsBuffer,用于控制bounds的buffer\n */\n strokeBoundsBuffer: number;\n /**\n * stroke - true 全描边\n * stroke - false 不描边\n * stroke 为数值类型,适用于rect\\arc等图形,用于配置部分描边的场景,其中\n *\n * 0b00000 - 不描边\n * 0b000001 - top\n * 0b000010 - right\n * 0b000100 - bottom\n * 0b001000 - left\n * 相应的:\n * 0b000011 - top + right\n * 0b000111 - top + right + bottom\n * 0b001111 - 全描边\n *\n * stroke - boolean[],适用于rect\\arc等图形,用于配置部分描边的场景\n */\n stroke: IStrokeType[] | IStrokeType;\n};\n\ntype TextureType =\n | 'circle'\n | 'diamond'\n | 'rect'\n | 'vertical-line'\n | 'horizontal-line'\n | 'bias-lr'\n | 'bias-rl'\n | 'grid'\n | 'wave';\n\ntype ITextureSource = string | HTMLImageElement | HTMLCanvasElement;\n\nexport type IConnectedStyle = {\n /**\n * 连接,取零或者断开\n */\n connectedType: 'connect' | 'none';\n /**\n * 连接线的样式配置\n */\n connectedStyle: {\n stroke: IStrokeStyle['stroke'];\n strokeOpacity: IStrokeStyle['strokeOpacity'];\n lineDash: IStrokeStyle['lineDash'];\n lineDashOffset: IStrokeStyle['lineDashOffset'];\n lineCap: IStrokeStyle['lineCap'];\n lineJoin: IStrokeStyle['lineJoin'];\n lineWidth: IStrokeStyle['lineWidth'];\n fill: IFillStyle['fill'];\n fillOpacity: IFillStyle['fillOpacity'];\n };\n connectedX: number;\n connectedY: number;\n};\n\nexport type IBackgroundConfig = {\n stroke?: string | boolean;\n fill?: string | boolean;\n lineWidth?: number;\n cornerRadius?: number;\n expandX?: number;\n expandY?: number;\n};\n\nexport type BackgroundSizing = 'cover' | 'contain' | 'fill' | 'auto';\nexport type BackgroundRepeatMode = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';\nexport type BackgroundSizingShorthand = 'no-repeat-cover' | 'no-repeat-contain' | 'no-repeat-fill' | 'no-repeat-auto';\nexport type BackgroundMode = BackgroundRepeatMode | BackgroundSizingShorthand;\nexport type BackgroundPositionHorizontalKeyword = 'left' | 'center' | 'right';\nexport type BackgroundPositionVerticalKeyword = 'top' | 'center' | 'bottom';\nexport type BackgroundPositionKeyword = BackgroundPositionHorizontalKeyword | BackgroundPositionVerticalKeyword;\nexport type BackgroundPositionPercent = `${number}%`;\nexport type BackgroundPositionValue = number | BackgroundPositionKeyword | BackgroundPositionPercent;\nexport type BackgroundPositionPreset =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'center-left'\n | 'center'\n | 'center-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right';\nexport type BackgroundPosition =\n | BackgroundPositionKeyword\n | BackgroundPositionPreset\n | [BackgroundPositionValue, BackgroundPositionValue];\n\nexport type IBackgroundType = string | HTMLImageElement | HTMLCanvasElement | IBackgroundConfig;\n\nexport interface SimpleDomStyleOptions {\n /**\n * 容器的宽度\n */\n width: number;\n /**\n * 容器的高度\n */\n height: number;\n /**\n * 容器的样式设置\n */\n style?:\n | string\n | Record<string, any>\n | ((\n pos: { top: number; left: number; width: number; height: number },\n graphic: IGraphic,\n wrapContainer: HTMLElement\n ) => Record<string, any>); // 容器的样式\n}\n\nexport interface CommonDomOptions {\n /**\n * 全局唯一的id\n */\n id?: string;\n /**\n * 容器元素的id或者dom元素\n */\n container: string | HTMLElement | null;\n /**\n * 是否显示\n */\n visible?: boolean;\n /**\n * 是否支持事件冒泡\n */\n pointerEvents?: boolean | string;\n /**\n * 可穿透的事件列表\n * @since 0.21.2\n */\n penetrateEventList?: string[];\n /**\n * 定位类型\n * 'position' - 根据挂载图形节点的坐标也就是x,y进行定位\n * 'boundsLeftTop' - 定位到挂载图形节点bounds的左上角\n * 'left' - 定位到挂载图形节点bounds 的左侧\n * 'right' - 定位到挂载图形节点bounds 的右侧\n * 'bottom' - 定位到挂载图形节点bounds 的底部\n * 'top' - 定位到挂载图形节点bounds 的顶部\n * 'center' - 定位到挂载图形节点bounds 的中心\n * 'top-left' - 定位到挂载图形节点bounds 的左上角\n * 'top-right' - 定位到挂载图形节点bounds 的右上角\n * 'bottom-left' - 定位到挂载图形节点bounds 的左下角\n * 'bottom-right' - 定位到挂载图形节点bounds 的右下角\n */\n anchorType?: 'position' | 'boundsLeftTop' | BoundsAnchorType;\n}\n\nexport type IRoughStyle = {\n fillStyle: 'hachure' | 'solid' | 'zigzag' | 'cross-hatch' | 'dots' | 'sunburst' | 'dashed' | 'zigzag-line';\n roughness: number;\n bowing: number;\n};\n\nexport type IGraphicStyle = ILayout &\n IFillStyle &\n IStrokeStyle &\n IPickStyle & {\n /**\n * 强制设置的bounds宽度,主要用于使用html或者react展示图形的时候,设置一个固定的宽度\n */\n forceBoundsWidth: number | (() => number) | undefined;\n /**\n * 强制设置的bounds高度,主要用于使用html或者react展示图形的时候,设置一个固定的高度\n */\n forceBoundsHeight: number | (() => number) | undefined;\n /**\n * 透明度,会同时影响填充和描边\n */\n opacity: number;\n /**\n * 影子节点\n */\n shadowGraphic?: IGraphic | undefined;\n /**\n * 背景图绘制模式。\n * - repeat/repeat-x/repeat-y/no-repeat: 原有平铺语义\n * - no-repeat-cover/no-repeat-contain/no-repeat-fill/no-repeat-auto: no-repeat 下的尺寸简写\n */\n backgroundMode: BackgroundMode;\n /**\n * 是否正好填充,只在repeat-x或者repeat-y以及no-repeat的时候生效\n */\n backgroundFit: boolean;\n /**\n * 是否保持背景图的宽高比\n */\n backgroundKeepAspectRatio: boolean;\n /**\n * 背景图缩放,只在no-repeat的时候生效\n */\n backgroundScale: number;\n /**\n * 背景图偏移,只在no-repeat的时候生效\n */\n backgroundOffsetX: number;\n /**\n * 背景图偏移,只在no-repeat的时候生效\n */\n backgroundOffsetY: number;\n /**\n * 背景图锚定位置(类似 CSS background-position),仅在 no-repeat 的图片背景下生效。\n * 默认值为 'top-left',当前公开支持以下几类配置:\n * - 单关键字:'left' | 'center' | 'right' | 'top' | 'bottom'\n * - 预设位置:'top-left'、'top-center'、'top-right'、'center-left'、'center'、\n * 'center-right'、'bottom-left'、'bottom-center'、'bottom-right'\n * - 元组写法:[x, y],其中 x/y 支持 number、关键字、百分比字符串(如 ['25%', '75%'])\n * 运行时仍兼容 CSS 风格空格字符串,但不再作为公开类型暴露。\n */\n backgroundPosition: BackgroundPosition;\n /**\n * 背景图是否裁切,是否调用clip避免绘制到图元外部\n */\n backgroundClip: boolean;\n /**\n * 背景圆角半径\n */\n backgroundCornerRadius: number | number[];\n /**\n * 背景透明度\n */\n backgroundOpacity: number;\n /**\n * 背景,支持颜色字符串、html image元素、html canvas元素\n */\n // 纹理是否自动做动画\n autoAnimateTexture: boolean;\n // 如果做动画的话,这里代表ratio\n textureRatio: number;\n textureOptions: {\n /**\n * 是否将纹理的 pattern 原点对齐到图元的绘制原点\n */\n alignToGraphic?: boolean;\n /**\n * 纹理在 x 方向的额外偏移量(用户坐标系)\n */\n alignOffsetX?: number;\n /**\n * 纹理在 y 方向的额外偏移量(用户坐标系)\n */\n alignOffsetY?: number;\n /**\n * 图片/SVG 纹理图案本身的圆角半径(用户坐标系)\n */\n radius?: number;\n /**\n * 是否使用动态纹理绘制(由调用方提供绘制回调)\n */\n dynamicTexture?: (\n ctx: IContext2d,\n row: number,\n column: number,\n rowCount: number,\n columnCount: number,\n ratio: number,\n graphic: IGraphic,\n width?: number,\n height?: number\n ) => void;\n /**\n * 动态纹理绘制前回调\n */\n beforeDynamicTexture?: (\n ctx: IContext2d,\n row: number,\n column: number,\n rowCount: number,\n columnCount: number,\n ratio: number,\n graphic: IGraphic,\n width?: number,\n height?: number\n ) => void;\n /**\n * 动态纹理网格配置\n */\n gridConfig?: {\n columns?: number;\n rows?: number;\n gutterColumn?: number;\n gutterRow?: number;\n };\n /**\n * 是否使用新 canvas 绘制动态纹理\n */\n useNewCanvas?: boolean;\n /**\n * 其他纹理选项\n */\n [key: string]: any;\n };\n background:\n | IBackgroundType\n | {\n /**\n * 背景,支持颜色字符串、html image元素、html canvas元素\n */\n background: IBackgroundType;\n /**\n * 背景的x方向偏移量\n */\n dx?: number;\n /**\n * 背景的y方向偏移量\n */\n dy?: number;\n /**\n * 背景宽度\n */\n width?: number;\n /**\n * 背景高度\n */\n height?: number;\n /**\n * 背景的x坐标\n */\n x?: number;\n /**\n * 背景的y坐标\n */\n y?: number;\n }\n | null; // 背景,可以与fill同时存在\n /**\n * 纹理的类型\n */\n texture: TextureType | ITextureSource;\n /**\n * 纹理的颜色\n */\n textureColor: string;\n /**\n * 纹理的大小\n */\n textureSize: number;\n /**\n * 纹理的间隙\n */\n texturePadding: number;\n\n blur: number;\n /**\n * 设置图形对应的鼠标样式\n */\n cursor: Cursor | null;\n // @deprecated 用处少废弃,后续考虑新设计API\n filter: string;\n renderStyle?: 'default' | 'rough' | any;\n roughStyle?: IRoughStyle | null;\n /**\n * HTML的dom或者string\n */\n html:\n | ({\n /**\n * dom字符串或者dom\n */\n dom: string | HTMLElement;\n } & SimpleDomStyleOptions &\n CommonDomOptions)\n | null;\n /**\n * 使用react元素渲染内容\n */\n react:\n | ({\n /**\n * react场景节点\n */\n element: any;\n } & SimpleDomStyleOptions &\n CommonDomOptions)\n | null;\n /**\n * 使用vue组件渲染内容\n */\n vue:\n | ({\n /**\n * vue 虚拟节点\n */\n element: any;\n } & SimpleDomStyleOptions &\n CommonDomOptions)\n | null;\n };\n\nexport type IPickStyle = {\n /**\n * 给stroke模式的pick额外加的buffer,用于外界控制stroke区域的pick范围\n */\n pickStrokeBuffer: number;\n};\n\nexport type IDebugType = {\n _debug_bounds: boolean | ((c: any, g: any) => void);\n};\nexport type IGraphicAttribute = IDebugType &\n IGraphicStyle &\n ITransform & {\n /**\n * stroke百分比\n */\n strokeSeg: IStrokeSeg | null;\n /**\n * 包围盒的padding\n */\n boundsPadding: number | number[];\n /**\n * 选择模式,精确模式,粗糙模式(包围盒模式),自定义模式\n */\n pickMode: 'accurate' | 'imprecise' | 'custom';\n boundsMode: 'accurate' | 'imprecise' | 'empty';\n customPickShape: () => boolean | null;\n /**\n * 是否支持事件拾取,默认为 true。\n * @default true\n */\n pickable: boolean;\n /**\n * 是否支持fill拾取,默认为 true。\n * @experimental\n * @default true\n */\n fillPickable: boolean;\n /**\n * 是否支持stroke拾取,默认为 true。\n * @experimental\n * @default true\n */\n strokePickable: boolean;\n /**\n * 对于 group 节点,是否支持其子元素的事件拾取,默认为 true。\n * 如果 group `pickable` 关闭,`childrenPickable` 开启,那么 group 的子节点仍参与事件拾取\n * @default true\n */\n childrenPickable: boolean;\n /**\n * 元素是否可见。\n * @default true\n */\n visible: boolean;\n /**\n * 分组下的层级,层级越小越先绘制\n */\n zIndex: number;\n layout: any;\n /**\n * 是否隐藏元素(只是绘制的时候不绘制)\n */\n renderable: boolean;\n /**\n * 是否在3d中控制方向\n * false: 不控制方向\n * true: 始终控制方向朝摄像机\n */\n keepDirIn3d?: boolean;\n shadowRootIdx: number;\n shadowPickMode?: 'full' | 'graphic';\n /**\n * 全局范围的层级,设置了这个属性的图形,会提取到交互层进行渲染\n */\n globalZIndex: number;\n /**\n * canvas 的合成方式\n */\n globalCompositeOperation: CanvasRenderingContext2D['globalCompositeOperation'] | '';\n /**\n * 完全支持滚动 | 完全不支持滚动 | 支持x方向的滚动 | 支持y方向的滚动\n */\n overflow: 'scroll' | 'hidden' | 'scroll-x' | 'scroll-y';\n /**\n * 绘制fill和stroke的顺序,为0表示fill先绘制,1表示stroke先绘制\n */\n fillStrokeOrder: number;\n /**\n * @since 0.20.15\n * 保持stroke的scale,默认为false,为true的话stroke显示的宽度会随着scale变化\n */\n keepStrokeScale: boolean;\n\n /**\n * @since 0.22.2\n * 裁剪路径,用于裁剪图形,用于普通图元的裁剪\n * 由于一般情况下普通图元只需要一个形状即可,所以这里不需要配置具体的位置和大小,强制中心在图元中心,宽高和图元Bounds宽高一致\n * 不考虑其他复杂情况,否则配置项就非常多了,比如多路径,或者配置位置大小等,如果配置大小那还得用户自己去拿图元的大小,目前没有这种需求\n */\n clipConfig: {\n shape: string;\n } | null;\n /**\n * 自定义路径,可覆盖图元默认路径渲染(支持字符串、Path2D对象、以及动态函数)\n */\n pathProxy?: string | ICustomPath2D | ((attrs: Partial<IGraphicAttribute>) => string | ICustomPath2D) | null;\n };\n\nexport interface IGraphicJson<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>> {\n attribute: Partial<T>;\n _uid: number;\n type: string;\n name: string;\n children: IGraphicJson<T>[];\n}\n\n/** the context of setAttribute */\nexport type ISetAttributeContext = {\n /** type of setAttribute */\n type?: number;\n animationState?: {\n step?: IStep;\n isFirstFrameOfStep?: boolean;\n /** ratio of animation */\n ratio?: number;\n /** is animation end? */\n end?: boolean;\n };\n skipUpdateCallback?: boolean;\n};\n\nexport type IGraphicAnimateParams = {\n slience?: boolean;\n id?: number | string;\n timeline?: ITimeline;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n};\n\nexport interface IGraphic<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>>\n extends INode,\n IAnimateTarget {\n type?: GraphicType;\n numberType?: number;\n stage?: IStage;\n layer?: ILayer;\n shadowRoot?: IShadowRoot;\n glyphHost?: IGraphic<IGlyphGraphicAttribute>;\n backgroundImg?: boolean;\n attachedThemeGraphic?: IGraphic<any>;\n /**\n * 保存语法上下文\n */\n context?: Record<string, any>;\n bindDom?: Map<\n string | HTMLElement,\n { container: HTMLElement | string; dom: HTMLElement | any; wrapGroup: HTMLDivElement | any; root?: any }\n >;\n\n valid: boolean;\n parent: IGroup | null;\n isContainer?: boolean;\n // 是否是3d模式(是否应用3d视角)\n in3dMode?: boolean;\n\n // 不考虑transform的宽高,特殊情况下会使用到\n widthWithoutTransform?: number;\n heightWithoutTransform?: number;\n\n // 上次更新的stamp\n stamp?: number;\n animationBackUps?: {\n from: Record<string, any>;\n to: Record<string, any>;\n };\n\n attribute: Partial<T>;\n\n /** 用于实现morph动画场景,转换成bezier曲线渲染 */\n pathProxy?: string | ICustomPath2D | ((attrs: T) => string | ICustomPath2D);\n incremental?: number;\n incrementalAt?: number;\n\n /** 记录state对应的图形属性 */\n states?: Record<string, Partial<T>>;\n normalAttrs?: Partial<T>;\n stateProxy?: (stateName: string, targetStates?: string[]) => Partial<T>;\n findFace?: () => IFace3d;\n toggleState: (stateName: string, hasAnimation?: boolean) => void;\n removeState: (stateName: string | string[], hasAnimation?: boolean) => void;\n clearStates: (hasAnimation?: boolean) => void;\n useStates: (states: string[], hasAnimation?: boolean) => void;\n addState: (stateName: string, keepCurrentStates?: boolean, hasAnimation?: boolean) => void;\n hasState: (stateName?: string) => boolean;\n getState: (stateName: string) => Partial<T>;\n onBeforeAttributeUpdate?: (\n val: any,\n attributes: Partial<T>,\n key: null | string | string[],\n context?: ISetAttributeContext\n ) => T | undefined;\n applyStateAttrs: (attrs: Partial<T>, stateNames: string[], hasAnimation?: boolean, isClear?: boolean) => void;\n updateNormalAttrs: (stateAttrs: Partial<T>) => void;\n\n // get\n readonly AABBBounds: IAABBBounds; // 用于获取当前节点的AABB包围盒\n readonly OBBBounds: IOBBBounds; // 获取OBB包围盒,旋转防重叠需要用\n readonly globalAABBBounds: IAABBBounds; // 全局AABB包围盒\n readonly transMatrix: IMatrix; // 变换矩阵,动态计算\n readonly globalTransMatrix: IMatrix; // 变换矩阵,动态计算\n\n getOffsetXY: (attr?: ITransform) => IPoint;\n\n // function\n containsPoint: (x: number, y: number, mode?: IContainPointMode, picker?: IPickerService) => boolean;\n\n setMode: (mode: '3d' | '2d') => void;\n isValid: () => boolean;\n\n getClipPath: () => ISymbolClass | null;\n\n // TODO: transform API\n // 基于当前transform的变换,普通用户尽量别用,拿捏不住的~\n translate: (x: number, y: number) => this;\n translateTo: (x: number, y: number) => this;\n scale: (scaleX: number, scaleY: number, scaleCenter?: IPointLike) => this;\n scaleTo: (scaleX: number, scaleY: number) => this;\n rotate: (angle: number, rotateCenter?: IPointLike) => this;\n rotateTo: (angle: number) => this;\n skewTo: (b: number, c: number) => this;\n addUpdateBoundTag: () => void;\n addUpdateShapeAndBoundsTag: () => void;\n addUpdateLayoutTag: () => void;\n\n update: (d?: { bounds: boolean; trans: boolean }) => void;\n\n // animate\n animate?: (params?: IGraphicAnimateParams) => IAnimate;\n\n // 语法糖,可有可无,有的为了首屏性能考虑做成get方法,有的由外界直接托管,内部不赋值\n name?: string;\n\n // 供render处理shape缓存tag\n shouldUpdateShape: () => boolean;\n clearUpdateShapeTag: () => void;\n\n // // 供render缓存shape\n // cacheShape?: ICustomPath2D;\n // // 线段使用的path2D\n // cacheLine?: ISegPath2D | ISegPath2D[];\n // // 面积图使用的path2D\n // cacheArea?: IAreaCacheItem | IAreaCacheItem[];\n\n setAttributes: (params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext) => void;\n\n initAttributes: (params: Partial<T>) => void;\n\n setAttribute: (key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) => void;\n\n setStage: (stage?: IStage, layer?: ILayer) => void;\n onSetStage: (cb: (g: IGraphic, stage: IStage) => void) => void;\n\n shouldUpdateAABBBounds: () => boolean;\n shouldSelfChangeUpdateAABBBounds: () => boolean;\n shouldUpdateGlobalMatrix: () => boolean;\n\n addUpdatePositionTag: () => void;\n addUpdateGlobalPositionTag: () => void;\n\n attachShadow: () => IShadowRoot;\n detachShadow: () => void;\n\n toJson: () => IGraphicJson;\n\n /** 创建pathProxy */\n createPathProxy: (path?: string) => void;\n /** 获取解析后的pathProxy(优先取attribute.pathProxy) */\n getPathProxy: () => ICustomPath2D | null;\n /** 将图形转换成CustomPath2D */\n toCustomPath?: () => ICustomPath2D;\n\n resources?: Map<\n string | HTMLImageElement | HTMLCanvasElement | IBackgroundConfig,\n { state: 'init' | 'loading' | 'success' | 'fail'; data?: HTMLImageElement | HTMLCanvasElement }\n >;\n imageLoadSuccess: (url: string, data: HTMLImageElement) => void;\n imageLoadFail: (url: string) => void;\n\n clone: () => IGraphic;\n stopAnimates: (stopChildren?: boolean) => void;\n getNoWorkAnimateAttr: () => Record<string, number>;\n getGraphicTheme: () => T;\n\n getAttributes: (final?: boolean) => Partial<T>;\n\n pauseAnimation?: (deep?: boolean) => void;\n resumeAnimation?: (deep?: boolean) => void;\n stopAnimation?: (deep?: boolean) => void;\n reApplyAnimationState?: (state: string, deep?: boolean) => this;\n}\n\nexport interface IRoot extends IGraphic {\n pick: (x: number, y: number) => IGraphic;\n}\n\n/**\n * 动画配置\n */\nexport type IAnimateConfig = {\n duration?: number;\n easing?: EasingType;\n};\n\nexport type GraphicReleaseStatus = 'released' | 'willRelease';\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/interface/graphic.ts"],"names":[],"mappings":"","file":"graphic.js","sourcesContent":["import type { IAABBBounds, IMatrix, IPointLike, IPoint, BoundsAnchorType, IOBBBounds } from '@visactor/vutils';\nimport type { IAnimate, IStep, EasingType, IAnimateTarget, ITimeline } from './animation';\nimport type { IColor } from './color';\nimport type { IGroup } from './graphic/group';\nimport type { IShadowRoot } from './graphic/shadow-root';\nimport type { ILayer } from './layer';\nimport type { INode } from './node-tree';\nimport type { ICustomPath2D } from './path';\nimport type { IStage } from './stage';\nimport type { IGlyphGraphicAttribute } from './graphic/glyph';\nimport type { IContainPointMode } from '../common/enums';\nimport type { IFace3d } from './graphic/face3d';\nimport type { IPickerService } from './picker';\nimport type { ISymbolClass } from './graphic/symbol';\nimport type {\n CompiledStateDefinition,\n StateDefinition,\n StateDefinitionsInput\n} from '../graphic/state/state-definition';\nimport type { StateMergeMode } from '../graphic/state/state-style-resolver';\nimport type { SharedStateScope } from '../graphic/state/shared-state-scope';\n\ntype IStrokeSeg = {\n /**\n * 百分比\n */\n start: number;\n /**\n * 百分比\n * end和length二选一\n */\n end: number;\n /**\n * 像素长度\n */\n length: number;\n};\n\n// TODO 最后加一个any\nexport type GraphicType =\n | 'area'\n | 'circle'\n | 'ellipse'\n | 'line'\n | 'rect'\n | 'rect3d'\n | 'path'\n | 'richtext'\n | 'text'\n | 'arc'\n | 'arc3d'\n | 'image'\n | 'symbol'\n | 'group'\n | 'shadowroot'\n | 'polygon'\n | 'pyramid3d'\n | 'glyph'\n | string;\n\n// Cursor style\n// See: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\nexport type Cursor =\n | 'auto'\n | 'default'\n | 'none'\n | 'context-menu'\n | 'help'\n | 'pointer'\n | 'progress'\n | 'wait'\n | 'cell'\n | 'crosshair'\n | 'text'\n | 'vertical-text'\n | 'alias'\n | 'copy'\n | 'move'\n | 'no-drop'\n | 'not-allowed'\n | 'grab'\n | 'grabbing'\n | 'all-scroll'\n | 'col-resize'\n | 'row-resize'\n | 'n-resize'\n | 'e-resize'\n | 's-resize'\n | 'w-resize'\n | 'ne-resize'\n | 'nw-resize'\n | 'se-resize'\n | 'sw-resize'\n | 'ew-resize'\n | 'ns-resize'\n | 'nesw-resize'\n | 'nwse-resize'\n | 'zoom-in'\n | 'zoom-out';\n\nexport type ITransform = {\n /**\n * x坐标\n */\n x: number;\n /**\n * y坐标\n */\n y: number;\n /**\n * z坐标\n */\n z: number;\n /**\n * x方向偏移量\n */\n dx: number;\n /**\n * y方向偏移量\n */\n dy: number;\n /**\n * z方向偏移量\n */\n dz: number;\n /**\n * x方向的滚动值\n */\n scrollX: number;\n /**\n * y方向的滚动值\n */\n scrollY: number;\n /**\n * x方向的缩放值\n */\n scaleX: number;\n /**\n * y方向的缩放值\n */\n scaleY: number;\n /**\n * z方向的缩放值\n */\n scaleZ: number;\n /**\n * 绕z轴的转角,即xy平面上的旋转角度\n */\n angle: number;\n /**\n * 绕x轴的转角\n */\n alpha: number;\n /**\n * 绕y轴的转角\n */\n beta: number;\n /**\n * 应用缩放的中心\n */\n scaleCenter: [number | string, number | string];\n /**\n * 基于AABB的锚点位置,用于简单的定位某些path\n */\n anchor: [number | string, number | string];\n /**\n * 3d的锚点位置\n */\n anchor3d: [number | string, number | string, number] | [number | string, number | string];\n /**\n * 处理矩阵,在正常计算完变换矩阵之后,会将该矩阵乘到变换矩阵上得到最终的变换矩阵\n */\n postMatrix: IMatrix;\n};\n\nexport type IFillType = boolean | string | IColor;\nexport type IFillStyle = {\n /**\n * 图形的填充透明度\n */\n fillOpacity: number;\n /**\n * 图形模糊效果程度\n */\n shadowBlur: number;\n /**\n * 图形的阴影颜色\n */\n shadowColor: string;\n /**\n * 阴影水平偏移距离\n */\n shadowOffsetX: number;\n /**\n * 阴影垂直偏移距离\n */\n shadowOffsetY: number;\n /**\n * 图形的填充颜色\n */\n fill: IFillType;\n};\n\nexport type ILayout = {\n /**\n * 设置对齐方式\n */\n alignSelf: 'auto' | 'flex-start' | 'flex-end' | 'center';\n};\n\nexport type IBorderStyle = Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> & {\n /**\n * 边距离边缘的距离\n */\n distance: number | string;\n /**\n * 是否显示边框,默认是不显示的\n */\n visible?: boolean;\n};\n\nexport type IStrokeType = boolean | string | IColor | null;\nexport type IStrokeStyle = {\n /**\n * 外部边框的样式配置,默认不展示外部边框\n */\n outerBorder: Partial<IBorderStyle>;\n /**\n * 内部边框的样式配置\n */\n innerBorder: Partial<IBorderStyle>;\n /**\n * 描边的透明度\n */\n strokeOpacity: number;\n /**\n * 设置线条虚线样式的属性,它通过定义实线和空白的交替长度来创建虚线效果\n */\n lineDash: number[];\n\n /**\n * 设置虚线样式的起始偏移量\n */\n lineDashOffset: number;\n\n /**\n * 设置线条的宽度\n */\n lineWidth: number;\n\n /**\n * 设置线条末端的样式\n */\n lineCap: CanvasLineCap;\n\n /**\n * 设置线条拐角的样式\n */\n lineJoin: CanvasLineJoin;\n\n /**\n * 设置线条拐角处的斜接限制\n */\n miterLimit: number;\n /**\n * 描边的boundsBuffer,用于控制bounds的buffer\n */\n strokeBoundsBuffer: number;\n /**\n * stroke - true 全描边\n * stroke - false 不描边\n * stroke 为数值类型,适用于rect\\arc等图形,用于配置部分描边的场景,其中\n *\n * 0b00000 - 不描边\n * 0b000001 - top\n * 0b000010 - right\n * 0b000100 - bottom\n * 0b001000 - left\n * 相应的:\n * 0b000011 - top + right\n * 0b000111 - top + right + bottom\n * 0b001111 - 全描边\n *\n * stroke - boolean[],适用于rect\\arc等图形,用于配置部分描边的场景\n */\n stroke: IStrokeType[] | IStrokeType;\n};\n\ntype TextureType = 'circle' | 'diamond' | 'rect' | 'vertical-line' | 'horizontal-line' | 'bias-lr' | 'bias-rl' | 'grid';\n\nexport type IConnectedStyle = {\n /**\n * 连接,取零或者断开\n */\n connectedType: 'connect' | 'none';\n /**\n * 连接线的样式配置\n */\n connectedStyle: {\n stroke: IStrokeStyle['stroke'];\n strokeOpacity: IStrokeStyle['strokeOpacity'];\n lineDash: IStrokeStyle['lineDash'];\n lineDashOffset: IStrokeStyle['lineDashOffset'];\n lineCap: IStrokeStyle['lineCap'];\n lineJoin: IStrokeStyle['lineJoin'];\n lineWidth: IStrokeStyle['lineWidth'];\n fill: IFillStyle['fill'];\n fillOpacity: IFillStyle['fillOpacity'];\n };\n connectedX: number;\n connectedY: number;\n};\n\nexport type IBackgroundConfig = {\n stroke?: string | boolean;\n fill?: string | boolean;\n lineWidth?: number;\n cornerRadius?: number;\n expandX?: number;\n expandY?: number;\n};\n\nexport type BackgroundSizing = 'cover' | 'contain' | 'fill' | 'auto';\nexport type BackgroundRepeatMode = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';\nexport type BackgroundSizingShorthand = 'no-repeat-cover' | 'no-repeat-contain' | 'no-repeat-fill' | 'no-repeat-auto';\nexport type BackgroundMode = BackgroundRepeatMode | BackgroundSizingShorthand;\nexport type BackgroundPositionHorizontalKeyword = 'left' | 'center' | 'right';\nexport type BackgroundPositionVerticalKeyword = 'top' | 'center' | 'bottom';\nexport type BackgroundPositionKeyword = BackgroundPositionHorizontalKeyword | BackgroundPositionVerticalKeyword;\nexport type BackgroundPositionPercent = `${number}%`;\nexport type BackgroundPositionValue = number | BackgroundPositionKeyword | BackgroundPositionPercent;\nexport type BackgroundPositionPreset =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'center-left'\n | 'center'\n | 'center-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right';\nexport type BackgroundPosition =\n | BackgroundPositionKeyword\n | BackgroundPositionPreset\n | [BackgroundPositionValue, BackgroundPositionValue];\n\nexport type IBackgroundType = string | HTMLImageElement | HTMLCanvasElement | IBackgroundConfig;\n\nexport interface SimpleDomStyleOptions {\n /**\n * 容器的宽度\n */\n width: number;\n /**\n * 容器的高度\n */\n height: number;\n /**\n * 容器的样式设置\n */\n style?:\n | string\n | Record<string, any>\n | ((\n pos: { top: number; left: number; width: number; height: number },\n graphic: IGraphic,\n wrapContainer: HTMLElement\n ) => Record<string, any>); // 容器的样式\n}\n\nexport interface CommonDomOptions {\n /**\n * 全局唯一的id\n */\n id?: string;\n /**\n * 容器元素的id或者dom元素\n */\n container: string | HTMLElement | null;\n /**\n * 是否显示\n */\n visible?: boolean;\n /**\n * 是否支持事件冒泡\n */\n pointerEvents?: boolean | string;\n /**\n * 可穿透的事件列表\n * @since 0.21.2\n */\n penetrateEventList?: string[];\n /**\n * 定位类型\n * 'position' - 根据挂载图形节点的坐标也就是x,y进行定位\n * 'boundsLeftTop' - 定位到挂载图形节点bounds的左上角\n * 'left' - 定位到挂载图形节点bounds 的左侧\n * 'right' - 定位到挂载图形节点bounds 的右侧\n * 'bottom' - 定位到挂载图形节点bounds 的底部\n * 'top' - 定位到挂载图形节点bounds 的顶部\n * 'center' - 定位到挂载图形节点bounds 的中心\n * 'top-left' - 定位到挂载图形节点bounds 的左上角\n * 'top-right' - 定位到挂载图形节点bounds 的右上角\n * 'bottom-left' - 定位到挂载图形节点bounds 的左下角\n * 'bottom-right' - 定位到挂载图形节点bounds 的右下角\n */\n anchorType?: 'position' | 'boundsLeftTop' | BoundsAnchorType;\n}\n\nexport type IRoughStyle = {\n fillStyle: 'hachure' | 'solid' | 'zigzag' | 'cross-hatch' | 'dots' | 'sunburst' | 'dashed' | 'zigzag-line';\n roughness: number;\n bowing: number;\n};\n\nexport type IGraphicStyle = ILayout &\n IFillStyle &\n IStrokeStyle &\n IPickStyle & {\n /**\n * 强制设置的bounds宽度,主要用于使用html或者react展示图形的时候,设置一个固定的宽度\n */\n forceBoundsWidth: number | (() => number) | undefined;\n /**\n * 强制设置的bounds高度,主要用于使用html或者react展示图形的时候,设置一个固定的高度\n */\n forceBoundsHeight: number | (() => number) | undefined;\n /**\n * 透明度,会同时影响填充和描边\n */\n opacity: number;\n /**\n * 影子节点\n */\n shadowGraphic?: IGraphic | undefined;\n /**\n * 背景填充模式(与具体图元有关)\n */\n backgroundMode: BackgroundMode;\n /**\n * 是否正好填充,只在repeat-x或者repeat-y以及no-repeat的时候生效\n */\n backgroundFit: boolean;\n /**\n * 是否保持背景图的宽高比\n */\n backgroundKeepAspectRatio: boolean;\n /**\n * 背景图缩放,只在no-repeat的时候生效\n */\n backgroundScale: number;\n /**\n * 背景图偏移,只在no-repeat的时候生效\n */\n backgroundOffsetX: number;\n /**\n * 背景图偏移,只在no-repeat的时候生效\n */\n backgroundOffsetY: number;\n /**\n * 背景图锚定位置(类似 CSS background-position),仅在 no-repeat 的图片背景下生效。\n */\n backgroundPosition: BackgroundPosition;\n /**\n * 背景图是否裁切,是否调用clip避免绘制到图元外部\n */\n backgroundClip: boolean;\n /**\n * 背景圆角半径\n */\n backgroundCornerRadius: number | number[];\n /**\n * 背景透明度\n */\n backgroundOpacity: number;\n /**\n * 背景,支持颜色字符串、html image元素、html canvas元素\n */\n // 纹理是否自动做动画\n autoAnimateTexture: boolean;\n // 如果做动画的话,这里代表ratio\n textureRatio: number;\n textureOptions: any;\n background:\n | IBackgroundType\n | {\n /**\n * 背景,支持颜色字符串、html image元素、html canvas元素\n */\n background: IBackgroundType;\n /**\n * 背景的x方向偏移量\n */\n dx?: number;\n /**\n * 背景的y方向偏移量\n */\n dy?: number;\n /**\n * 背景宽度\n */\n width?: number;\n /**\n * 背景高度\n */\n height?: number;\n /**\n * 背景的x坐标\n */\n x?: number;\n /**\n * 背景的y坐标\n */\n y?: number;\n }\n | null; // 背景,可以与fill同时存在\n /**\n * 纹理的类型\n */\n texture: TextureType | string;\n /**\n * 纹理的颜色\n */\n textureColor: string;\n /**\n * 纹理的大小\n */\n textureSize: number;\n /**\n * 纹理的间隙\n */\n texturePadding: number;\n\n blur: number;\n /**\n * 设置图形对应的鼠标样式\n */\n cursor: Cursor | null;\n // @deprecated 用处少废弃,后续考虑新设计API\n filter: string;\n renderStyle?: 'default' | 'rough' | any;\n roughStyle?: IRoughStyle | null;\n /**\n * HTML的dom或者string\n */\n html:\n | ({\n /**\n * dom字符串或者dom\n */\n dom: string | HTMLElement;\n } & SimpleDomStyleOptions &\n CommonDomOptions)\n | null;\n /**\n * 使用react元素渲染内容\n */\n react:\n | ({\n /**\n * react场景节点\n */\n element: any;\n } & SimpleDomStyleOptions &\n CommonDomOptions)\n | null;\n /**\n * 使用vue组件渲染内容\n */\n vue:\n | ({\n /**\n * vue 虚拟节点\n */\n element: any;\n } & SimpleDomStyleOptions &\n CommonDomOptions)\n | null;\n };\n\nexport type IPickStyle = {\n /**\n * 给stroke模式的pick额外加的buffer,用于外界控制stroke区域的pick范围\n */\n pickStrokeBuffer: number;\n};\n\nexport type IDebugType = {\n _debug_bounds: boolean | ((c: any, g: any) => void);\n};\nexport type IGraphicAttribute = IDebugType &\n IGraphicStyle &\n ITransform & {\n /**\n * stroke百分比\n */\n strokeSeg: IStrokeSeg | null;\n /**\n * 包围盒的padding\n */\n boundsPadding: number | number[];\n /**\n * 选择模式,精确模式,粗糙模式(包围盒模式),自定义模式\n */\n pickMode: 'accurate' | 'imprecise' | 'custom';\n boundsMode: 'accurate' | 'imprecise' | 'empty';\n customPickShape: () => boolean | null;\n /**\n * 是否支持事件拾取,默认为 true。\n * @default true\n */\n pickable: boolean;\n /**\n * 是否支持fill拾取,默认为 true。\n * @experimental\n * @default true\n */\n fillPickable: boolean;\n /**\n * 是否支持stroke拾取,默认为 true。\n * @experimental\n * @default true\n */\n strokePickable: boolean;\n /**\n * 对于 group 节点,是否支持其子元素的事件拾取,默认为 true。\n * 如果 group `pickable` 关闭,`childrenPickable` 开启,那么 group 的子节点仍参与事件拾取\n * @default true\n */\n childrenPickable: boolean;\n /**\n * 元素是否可见。\n * @default true\n */\n visible: boolean;\n /**\n * 分组下的层级,层级越小越先绘制\n */\n zIndex: number;\n layout: any;\n /**\n * 是否隐藏元素(只是绘制的时候不绘制)\n */\n renderable: boolean;\n /**\n * 是否在3d中控制方向\n * false: 不控制方向\n * true: 始终控制方向朝摄像机\n */\n keepDirIn3d?: boolean;\n shadowRootIdx: number;\n shadowPickMode?: 'full' | 'graphic';\n /**\n * 全局范围的层级,设置了这个属性的图形,会提取到交互层进行渲染\n */\n globalZIndex: number;\n /**\n * canvas 的合成方式\n */\n globalCompositeOperation: CanvasRenderingContext2D['globalCompositeOperation'] | '';\n /**\n * 完全支持滚动 | 完全不支持滚动 | 支持x方向的滚动 | 支持y方向的滚动\n */\n overflow: 'scroll' | 'hidden' | 'scroll-x' | 'scroll-y';\n /**\n * 绘制fill和stroke的顺序,为0表示fill先绘制,1表示stroke先绘制\n */\n fillStrokeOrder: number;\n /**\n * @since 0.20.15\n * 保持stroke的scale,默认为false,为true的话stroke显示的宽度会随着scale变化\n */\n keepStrokeScale: boolean;\n\n /**\n * @since 0.22.2\n * 裁剪路径,用于裁剪图形,用于普通图元的裁剪\n * 由于一般情况下普通图元只需要一个形状即可,所以这里不需要配置具体的位置和大小,强制中心在图元中心,宽高和图元Bounds宽高一致\n * 不考虑其他复杂情况,否则配置项就非常多了,比如多路径,或者配置位置大小等,如果配置大小那还得用户自己去拿图元的大小,目前没有这种需求\n */\n clipConfig: {\n shape: string;\n } | null;\n };\n\nexport interface IGraphicJson<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>> {\n attribute: Partial<T>;\n baseAttributes?: Partial<T>;\n _uid: number;\n type: string;\n name: string;\n children: IGraphicJson<T>[];\n}\n\n/** the context of setAttribute */\nexport type ISetAttributeContext = {\n /** type of setAttribute */\n type?: number;\n animationState?: {\n step?: IStep;\n isFirstFrameOfStep?: boolean;\n /** ratio of animation */\n ratio?: number;\n /** is animation end? */\n end?: boolean;\n };\n skipUpdateCallback?: boolean;\n};\n\nexport type IGraphicAnimateParams = {\n slience?: boolean;\n id?: number | string;\n timeline?: ITimeline;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n};\n\nexport interface IGraphic<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>>\n extends INode,\n IAnimateTarget {\n type?: GraphicType;\n numberType?: number;\n stage?: IStage;\n layer?: ILayer;\n shadowRoot?: IShadowRoot;\n glyphHost?: IGraphic<IGlyphGraphicAttribute>;\n backgroundImg?: boolean;\n attachedThemeGraphic?: IGraphic<any>;\n /**\n * 保存语法上下文\n */\n context?: Record<string, any>;\n bindDom?: Map<\n string | HTMLElement,\n { container: HTMLElement | string; dom: HTMLElement | any; wrapGroup: HTMLDivElement | any; root?: any }\n >;\n\n valid: boolean;\n parent: IGroup | null;\n isContainer?: boolean;\n // 是否是3d模式(是否应用3d视角)\n in3dMode?: boolean;\n\n // 不考虑transform的宽高,特殊情况下会使用到\n widthWithoutTransform?: number;\n heightWithoutTransform?: number;\n\n // 上次更新的stamp\n stamp?: number;\n animationBackUps?: {\n from: Record<string, any>;\n to: Record<string, any>;\n };\n\n attribute: Partial<T>;\n\n /** 用于实现morph动画场景,转换成bezier曲线渲染 */\n pathProxy?: ICustomPath2D | ((attrs: T) => ICustomPath2D);\n incremental?: number;\n incrementalAt?: number;\n\n /** 记录state对应的图形属性 */\n states?: StateDefinitionsInput<T>;\n effectiveStates?: string[];\n resolvedStatePatch?: Partial<T>;\n normalAttrs?: Partial<T>;\n baseAttributes?: Partial<T>;\n boundSharedStateScope?: SharedStateScope<T>;\n boundSharedStateRevision?: number;\n sharedStateDirty?: boolean;\n registeredActiveScopes?: Set<SharedStateScope<T>>;\n localFallbackCompiledDefinitions?: Map<string, CompiledStateDefinition<T>>;\n localFallbackVersion?: number;\n stateProxy?: (stateName: string, targetStates?: string[]) => Partial<T>;\n stateMergeMode?: StateMergeMode;\n findFace?: () => IFace3d;\n toggleState: (stateName: string, hasAnimation?: boolean) => void;\n removeState: (stateName: string | string[], hasAnimation?: boolean) => void;\n clearStates: (hasAnimation?: boolean) => void;\n useStates: (states: string[], hasAnimation?: boolean) => void;\n addState: (stateName: string, keepCurrentStates?: boolean, hasAnimation?: boolean) => void;\n invalidateResolver: () => void;\n hasState: (stateName?: string) => boolean;\n getState: (stateName: string) => Partial<T> | StateDefinition<T>;\n onBeforeAttributeUpdate?: (\n val: any,\n attributes: Partial<T>,\n key: null | string | string[],\n context?: ISetAttributeContext\n ) => T | undefined;\n applyStateAttrs: (\n attrs: Partial<T>,\n stateNames: string[],\n hasAnimation?: boolean,\n isClear?: boolean,\n animateConfig?: IAnimateConfig\n ) => void;\n updateNormalAttrs: (stateAttrs: Partial<T>) => void;\n\n // get\n readonly AABBBounds: IAABBBounds; // 用于获取当前节点的AABB包围盒\n readonly OBBBounds: IOBBBounds; // 获取OBB包围盒,旋转防重叠需要用\n readonly globalAABBBounds: IAABBBounds; // 全局AABB包围盒\n readonly transMatrix: IMatrix; // 变换矩阵,动态计算\n readonly globalTransMatrix: IMatrix; // 变换矩阵,动态计算\n\n getOffsetXY: (attr?: ITransform) => IPoint;\n\n // function\n containsPoint: (x: number, y: number, mode?: IContainPointMode, picker?: IPickerService) => boolean;\n\n setMode: (mode: '3d' | '2d') => void;\n isValid: () => boolean;\n\n getClipPath: () => ISymbolClass | null;\n\n // TODO: transform API\n // 基于当前transform的变换,普通用户尽量别用,拿捏不住的~\n translate: (x: number, y: number) => this;\n translateTo: (x: number, y: number) => this;\n scale: (scaleX: number, scaleY: number, scaleCenter?: IPointLike) => this;\n scaleTo: (scaleX: number, scaleY: number) => this;\n rotate: (angle: number, rotateCenter?: IPointLike) => this;\n rotateTo: (angle: number) => this;\n skewTo: (b: number, c: number) => this;\n addUpdateBoundTag: () => void;\n addUpdatePaintTag: () => void;\n addUpdateShapeAndBoundsTag: () => void;\n addUpdateLayoutTag: () => void;\n\n update: (d?: { bounds: boolean; trans: boolean }) => void;\n\n // animate\n animate?: (params?: IGraphicAnimateParams) => IAnimate;\n\n // 语法糖,可有可无,有的为了首屏性能考虑做成get方法,有的由外界直接托管,内部不赋值\n name?: string;\n\n // 供render处理shape缓存tag\n shouldUpdateShape: () => boolean;\n clearUpdateShapeTag: () => void;\n\n // // 供render缓存shape\n // cacheShape?: ICustomPath2D;\n // // 线段使用的path2D\n // cacheLine?: ISegPath2D | ISegPath2D[];\n // // 面积图使用的path2D\n // cacheArea?: IAreaCacheItem | IAreaCacheItem[];\n\n setAttributes: (params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext) => void;\n\n initAttributes: (params: Partial<T>) => void;\n\n setAttribute: (key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) => void;\n\n setStage: (stage?: IStage, layer?: ILayer) => void;\n onSetStage: (cb: (g: IGraphic, stage: IStage) => void) => void;\n\n shouldUpdateAABBBounds: () => boolean;\n shouldSelfChangeUpdateAABBBounds: () => boolean;\n shouldUpdateGlobalMatrix: () => boolean;\n\n addUpdatePositionTag: () => void;\n addUpdateGlobalPositionTag: () => void;\n\n attachShadow: () => IShadowRoot;\n detachShadow: () => void;\n\n toJson: () => IGraphicJson;\n\n /** 创建pathProxy */\n createPathProxy: (path?: string) => void;\n /** 将图形转换成CustomPath2D */\n toCustomPath?: () => ICustomPath2D;\n\n resources?: Map<\n string | HTMLImageElement | HTMLCanvasElement | IBackgroundConfig,\n { state: 'init' | 'loading' | 'success' | 'fail'; data?: HTMLImageElement | HTMLCanvasElement }\n >;\n imageLoadSuccess: (url: string, data: HTMLImageElement) => void;\n imageLoadFail: (url: string) => void;\n\n clone: () => IGraphic;\n stopAnimates: (stopChildren?: boolean) => void;\n getNoWorkAnimateAttr: () => Record<string, number>;\n getGraphicTheme: () => T;\n\n getAttributes: (final?: boolean) => Partial<T>;\n\n pauseAnimation?: (deep?: boolean) => void;\n resumeAnimation?: (deep?: boolean) => void;\n stopAnimation?: (deep?: boolean) => void;\n reApplyAnimationState?: (state: string, deep?: boolean) => this;\n}\n\nexport interface IRoot extends IGraphic {\n pick: (x: number, y: number) => IGraphic;\n}\n\n/**\n * 动画配置\n */\nexport type IAnimateConfig = {\n duration?: number;\n easing?: EasingType;\n noAnimateAttrs?: string[] | Record<string, boolean | number>;\n};\n\nexport type GraphicReleaseStatus = 'released' | 'willRelease';\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Releaseable } from './common';
|
|
2
2
|
import type { IStage } from './stage';
|
|
3
3
|
export interface IPluginService extends Releaseable {
|
|
4
|
+
install?: (plugin: IPlugin) => void;
|
|
5
|
+
uninstall?: (name: string) => void;
|
|
4
6
|
register: (plugin: IPlugin) => void;
|
|
5
7
|
unRegister: (plugin: IPlugin) => void;
|
|
6
8
|
active: (stage: IStage, params: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/interface/plugin.ts"],"names":[],"mappings":"","file":"plugin.js","sourcesContent":["import type { Releaseable } from './common';\nimport type { IStage } from './stage';\n\nexport interface IPluginService extends Releaseable {\n register: (plugin: IPlugin) => void;\n unRegister: (plugin: IPlugin) => void;\n active: (stage: IStage, params: { pluginList?: string[] }) => void;\n actived: boolean;\n stage: IStage;\n findPluginsByName: (name: string) => IPlugin[];\n}\n\nexport interface IPlugin {\n name: string;\n activeEvent: 'onStartupFinished' | 'onRegister';\n activate: (context: IPluginService) => void;\n deactivate: (context: IPluginService) => void;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/interface/plugin.ts"],"names":[],"mappings":"","file":"plugin.js","sourcesContent":["import type { Releaseable } from './common';\nimport type { IStage } from './stage';\n\nexport interface IPluginService extends Releaseable {\n install?: (plugin: IPlugin) => void;\n uninstall?: (name: string) => void;\n register: (plugin: IPlugin) => void;\n unRegister: (plugin: IPlugin) => void;\n active: (stage: IStage, params: { pluginList?: string[] }) => void;\n actived: boolean;\n stage: IStage;\n findPluginsByName: (name: string) => IPlugin[];\n}\n\nexport interface IPlugin {\n name: string;\n activeEvent: 'onStartupFinished' | 'onRegister';\n activate: (context: IPluginService) => void;\n deactivate: (context: IPluginService) => void;\n}\n"]}
|
package/cjs/interface/stage.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { INode } from './node-tree';
|
|
2
2
|
import type { ILayer, LayerMode } from './layer';
|
|
3
3
|
import type { IColor } from './color';
|
|
4
|
+
import type { IGraphic } from './graphic';
|
|
4
5
|
import type { IAABBBounds, IBounds, IBoundsLike, IMatrix } from '@visactor/vutils';
|
|
5
6
|
import type { ICamera } from './camera';
|
|
6
7
|
import type { vec3 } from './matrix';
|
|
@@ -14,7 +15,8 @@ import type { IWindow } from './window';
|
|
|
14
15
|
import type { ILayerService } from './core';
|
|
15
16
|
import type { IFullThemeSpec } from './graphic/theme';
|
|
16
17
|
import type { IGraphicService } from './graphic-service';
|
|
17
|
-
import type {
|
|
18
|
+
import type { SharedStateScope } from '../graphic/state/shared-state-scope';
|
|
19
|
+
import type { IDeferredStateOwnerConfig, IStatePerfConfig, IStatePerfSnapshot } from '../graphic/state/state-perf-monitor';
|
|
18
20
|
export type IExportType = 'canvas' | 'imageData';
|
|
19
21
|
export type IStageCreateContext = {
|
|
20
22
|
appName?: 'vchart' | 'vgrammar' | 'vtable' | string;
|
|
@@ -24,7 +26,7 @@ export interface IStageParams {
|
|
|
24
26
|
width: number;
|
|
25
27
|
height: number;
|
|
26
28
|
dpr: number;
|
|
27
|
-
background:
|
|
29
|
+
background: string | IColor;
|
|
28
30
|
canvas: string | HTMLCanvasElement;
|
|
29
31
|
container: string | HTMLElement;
|
|
30
32
|
canvasControled: boolean;
|
|
@@ -99,6 +101,8 @@ export interface IStage extends INode {
|
|
|
99
101
|
dirtyBounds: IBounds | null;
|
|
100
102
|
autoRender: boolean;
|
|
101
103
|
renderCount: number;
|
|
104
|
+
statePerfConfig?: IStatePerfConfig;
|
|
105
|
+
deferredStateConfig?: IDeferredStateOwnerConfig;
|
|
102
106
|
hooks: {
|
|
103
107
|
beforeRender: ISyncHook<[IStage]>;
|
|
104
108
|
afterRender: ISyncHook<[IStage]>;
|
|
@@ -111,7 +115,7 @@ export interface IStage extends INode {
|
|
|
111
115
|
camera?: ICamera;
|
|
112
116
|
dpr: number;
|
|
113
117
|
viewBox: IBoundsLike;
|
|
114
|
-
background:
|
|
118
|
+
background: string | IColor;
|
|
115
119
|
ticker: ITicker;
|
|
116
120
|
increaseAutoRender: boolean;
|
|
117
121
|
readonly renderService: IRenderService;
|
|
@@ -119,6 +123,7 @@ export interface IStage extends INode {
|
|
|
119
123
|
getPickerService: () => IPickerService;
|
|
120
124
|
readonly pluginService: IPluginService;
|
|
121
125
|
readonly layerService: ILayerService;
|
|
126
|
+
rootSharedStateScope?: SharedStateScope<Record<string, any>>;
|
|
122
127
|
createLayer: (canvasId?: string, layerMode?: LayerMode) => ILayer;
|
|
123
128
|
getLayer: (name: string) => ILayer;
|
|
124
129
|
sortLayer: (cb: (layer1: ILayer, layer2: ILayer) => number) => void;
|
|
@@ -126,6 +131,9 @@ export interface IStage extends INode {
|
|
|
126
131
|
getTimeline: () => ITimeline;
|
|
127
132
|
render: (layers?: ILayer[], params?: Partial<IDrawContext>) => void;
|
|
128
133
|
renderNextFrame: (layers?: ILayer[], force?: boolean) => void;
|
|
134
|
+
scheduleStateBatch: (graphics: IGraphic[], targetStates: string[]) => void;
|
|
135
|
+
getStatePerfSnapshot: () => IStatePerfSnapshot;
|
|
136
|
+
resetStatePerfSnapshot: () => void;
|
|
129
137
|
tryInitInteractiveLayer: () => void;
|
|
130
138
|
resize: (w: number, h: number, rerender?: boolean) => void;
|
|
131
139
|
resizeWindow: (w: number, h: number, rerender?: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/interface/stage.ts"],"names":[],"mappings":"","file":"stage.js","sourcesContent":["import type { INode } from './node-tree';\nimport type { ILayer, LayerMode } from './layer';\nimport type { IColor } from './color';\nimport type { IAABBBounds, IBounds, IBoundsLike, IMatrix } from '@visactor/vutils';\nimport type { ICamera } from './camera';\nimport type { vec3 } from './matrix';\nimport type { IDirectionLight } from './light';\nimport type { ISyncHook } from './sync-hook';\nimport type { IDrawContext, IRenderService, IRenderServiceDrawParams } from './render';\nimport type { ITicker, ITimeline } from './animation';\nimport type { IPickerService, PickResult } from './picker';\nimport type { IPlugin, IPluginService } from './plugin';\nimport type { IWindow } from './window';\nimport type { ILayerService } from './core';\nimport type { IFullThemeSpec } from './graphic/theme';\nimport type { IGraphicService } from './graphic-service';\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/interface/stage.ts"],"names":[],"mappings":"","file":"stage.js","sourcesContent":["import type { INode } from './node-tree';\nimport type { ILayer, LayerMode } from './layer';\nimport type { IColor } from './color';\nimport type { IGraphic } from './graphic';\nimport type { IAABBBounds, IBounds, IBoundsLike, IMatrix } from '@visactor/vutils';\nimport type { ICamera } from './camera';\nimport type { vec3 } from './matrix';\nimport type { IDirectionLight } from './light';\nimport type { ISyncHook } from './sync-hook';\nimport type { IDrawContext, IRenderService, IRenderServiceDrawParams } from './render';\nimport type { ITicker, ITimeline } from './animation';\nimport type { IPickerService, PickResult } from './picker';\nimport type { IPlugin, IPluginService } from './plugin';\nimport type { IWindow } from './window';\nimport type { ILayerService } from './core';\nimport type { IFullThemeSpec } from './graphic/theme';\nimport type { IGraphicService } from './graphic-service';\nimport type { SharedStateScope } from '../graphic/state/shared-state-scope';\nimport type {\n IDeferredStateOwnerConfig,\n IStatePerfConfig,\n IStatePerfSnapshot\n} from '../graphic/state/state-perf-monitor';\n\nexport type IExportType = 'canvas' | 'imageData';\n\nexport type IStageCreateContext = {\n appName?: 'vchart' | 'vgrammar' | 'vtable' | string;\n};\nexport interface IStageParams {\n // x: number;\n // y: number;\n // // 视口的宽高\n // viewWidth: number;\n // viewHeight: number;\n\n // 视口的宽高\n viewBox: IBoundsLike;\n // 总的宽高\n width: number;\n height: number;\n dpr: number;\n // stage的背景\n background: string | IColor;\n // 外部的canvas\n canvas: string | HTMLCanvasElement;\n // canvas的container容器,如果不传入canvas,那就会在容器中创建canvas\n container: string | HTMLElement;\n // 是否是受控制的canvas,如果不是的话,不会进行resize等操作,也不会修改canvas的样式\n canvasControled: boolean;\n title: string;\n // 是否开启自动渲染\n autoRender: boolean;\n // 是否开启自动刷新\n autoRefresh: boolean;\n // 是否开启布局支持\n enableLayout: boolean;\n // 是否关闭脏矩形检测\n disableDirtyBounds: boolean;\n // 是否支持interactiveLayer,默认为true\n interactiveLayer: boolean;\n // 是否支持HTML属性\n enableHtmlAttribute: string | boolean | HTMLElement;\n // 是否支持react-dom(传入ReactDOM)\n ReactDOM: any;\n // 是否支持滚动条\n enableScroll: boolean;\n poptip: boolean;\n // 绘制之前的钩子函数\n beforeRender: (stage: IStage) => void;\n // 绘制之后的钩子函数\n afterRender: (stage: IStage) => void;\n // 清屏之后的钩子函数\n afterClearScreen: (drawParams: any) => void;\n // 清除矩形区域之后的钩子函数\n afterClearRect: (drawParams: any) => void;\n\n renderStyle?: string;\n ticker?: ITicker;\n pluginList?: string[];\n // 优化配置\n optimize?: IOptimizeType;\n /**\n * 事件系统相关配置\n */\n event?: EventConfig;\n\n /**\n * @since 0.17.15\n * 是否支持touch事件,不支持就不监听touch事件\n */\n supportsTouchEvents?: boolean;\n\n /**\n * @since 0.17.15\n * 是否支持pointer事件,不支持就监听mouse事件\n */\n supportsPointerEvents?: boolean;\n\n context?: IStageCreateContext;\n\n // 被分配的rafId,用于renderNextFrame,避免使用大量原生的RAF\n rafId?: number;\n}\n\nexport type EventConfig = {\n /** 是否自动阻止事件 */\n autoPreventDefault?: boolean;\n /**\n * 多次点击之间的最大时间,默认为 200 ms\n * @default 200\n */\n clickInterval?: number;\n [key: string]: any;\n};\n\nexport type IOptimizeType = {\n // 视口不在可视区,跳过渲染,默认为true\n skipRenderWithOutRange?: boolean;\n // 跳过图元在区间外的判断\n // 不存在dirtyBounds的时候,根据该配置判断是否关闭图元的超出边界判定\n // 如果有dirtyBounds那么该配置不生效\n disableCheckGraphicWidthOutRange?: boolean;\n // tick渲染模式,effect会在tick之后立刻执行render,保证动画效果正常。performance模式中tick和render均是RAF,属性可能会被篡改\n // 是否开启高性能动画,默认开启\n // 开启后不会执行某些安全校验,比如跳帧处理\n // 开启后会自动降帧,最高60fps\n tickRenderMode?: 'effect' | 'performance';\n};\n\nexport interface IOption3D {\n enableView3dTransform?: boolean; // 是否开启view3d自动旋转\n alpha?: number; // x轴的转角\n beta?: number; // y轴的转角\n gama?: number; // z轴的转角\n center?: { x?: number; y?: number; z?: number; dx?: number; dy?: number; dz?: number }; // 中心位置\n fieldRatio?: number; // 透视的视域缩放比例\n fieldDepth?: number;\n light?: {\n dir?: vec3;\n color?: string;\n ambient?: number;\n };\n // 配置相机后,alpha、beta、gamma配置会失效\n camera?: any; // 相机配置\n}\n\n// TODO 命名方式\nexport interface IStage extends INode {\n stage?: IStage;\n parent: IStage | null;\n // rootNode: IStage;\n x: number;\n y: number;\n\n params: Partial<IStageParams>;\n\n window: IWindow;\n\n width: number;\n height: number;\n viewWidth: number;\n viewHeight: number;\n defaultLayer: ILayer;\n dirtyBounds: IBounds | null;\n\n autoRender: boolean;\n renderCount: number;\n statePerfConfig?: IStatePerfConfig;\n deferredStateConfig?: IDeferredStateOwnerConfig;\n\n hooks: {\n beforeRender: ISyncHook<[IStage]>;\n afterRender: ISyncHook<[IStage]>;\n afterClearScreen: ISyncHook<[IRenderServiceDrawParams]>;\n afterClearRect: ISyncHook<[IRenderServiceDrawParams]>;\n };\n\n option3d?: IOption3D;\n\n set3dOptions: (options: IOption3D) => void;\n light?: IDirectionLight;\n camera?: ICamera;\n\n dpr: number;\n\n viewBox: IBoundsLike;\n background: string | IColor;\n ticker: ITicker;\n increaseAutoRender: boolean;\n readonly renderService: IRenderService;\n readonly graphicService: IGraphicService;\n getPickerService: () => IPickerService;\n readonly pluginService: IPluginService;\n readonly layerService: ILayerService;\n rootSharedStateScope?: SharedStateScope<Record<string, any>>;\n // 如果传入CanvasId,如果存在相同Id,说明这两个图层使用相同的Canvas绘制\n // 但需要注意的是依然是两个图层(用于解决Table嵌入ChartSpace不影响Table的绘制)\n createLayer: (canvasId?: string, layerMode?: LayerMode) => ILayer;\n getLayer: (name: string) => ILayer;\n sortLayer: (cb: (layer1: ILayer, layer2: ILayer) => number) => void;\n removeLayer: (layerId: number) => ILayer | false;\n\n getTimeline: () => ITimeline;\n\n render: (layers?: ILayer[], params?: Partial<IDrawContext>) => void;\n /**\n * 下一帧渲染\n * @param layers 渲染的图层\n * @param force 是否强行下一帧渲染,不采取优化方案\n * @returns\n */\n renderNextFrame: (layers?: ILayer[], force?: boolean) => void;\n scheduleStateBatch: (graphics: IGraphic[], targetStates: string[]) => void;\n getStatePerfSnapshot: () => IStatePerfSnapshot;\n resetStatePerfSnapshot: () => void;\n tryInitInteractiveLayer: () => void;\n\n // 画布操作\n resize: (w: number, h: number, rerender?: boolean) => void;\n resizeWindow: (w: number, h: number, rerender?: boolean) => void;\n resizeView: (w: number, h: number, rerender?: boolean) => void;\n setViewBox:\n | ((viewBox: IBoundsLike, rerender: boolean) => void)\n | ((x: number, y: number, w: number, h: number, rerender: boolean) => void)\n | ((x: number | IBoundsLike, y: number | boolean, w?: number, h?: number, rerender?: boolean) => void);\n setDpr: (dpr: number, rerender?: boolean) => void;\n setOrigin: (x: number, y: number) => void;\n export: (type: IExportType) => HTMLCanvasElement | ImageData;\n pick: (x: number, y: number) => PickResult | false;\n\n // 动画相关\n startAnimate: (t: number) => void;\n setToFrame: (t: number) => void;\n dirty: (b: IBounds, matrix?: IMatrix) => void;\n // 考虑操作回放\n\n renderTo: (window: IWindow, params: { x: number; y: number; width: number; height: number }) => void;\n\n renderToNewWindow: (fullImage?: boolean) => IWindow;\n\n toCanvas: (fullImage?: boolean, viewBox?: IAABBBounds) => HTMLCanvasElement | null;\n\n setBeforeRender: (cb: (stage: IStage) => void) => void;\n removeBeforeRender: (cb: (stage: IStage) => void) => void;\n setAfterRender: (cb: (stage: IStage) => void) => void;\n removeAfterRender: (cb: (stage: IStage) => void) => void;\n afterNextRender: (cb: (stage: IStage) => void) => void;\n enableAutoRender: () => void;\n disableAutoRender: () => void;\n enableIncrementalAutoRender: () => void;\n disableIncrementalAutoRender: () => void;\n enableDirtyBounds: () => void;\n disableDirtyBounds: () => void;\n enableView3dTransform: () => void;\n disableView3dTranform: () => void;\n getPluginsByName: (name: string) => IPlugin[];\n clearViewBox: (color?: string) => void;\n release: () => void;\n setStage: (stage?: IStage) => void;\n\n pauseRender: (sk?: number) => void;\n resumeRender: () => void;\n\n setCursor: (mode?: string) => void;\n\n getTheme: () => IFullThemeSpec;\n eventPointTransform: (e: PointerEvent | WheelEvent | TouchEvent) => { x: number; y: number };\n pauseTriggerEvent: () => void;\n resumeTriggerEvent: () => void;\n\n pauseAnimation?: (deep?: boolean) => void;\n resumeAnimation?: (deep?: boolean) => void;\n stopAnimation?: (deep?: boolean) => void;\n reApplyAnimationState?: (state: string, deep?: boolean) => this;\n}\n\nexport declare function combineStage(srages: IStage[], params: { canvas: string | HTMLCanvasElement }): IStage;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/interface/theme-service.ts"],"names":[],"mappings":"","file":"theme-service.js","sourcesContent":["// import { ContributionProvider } from '../../common/contribution-provider';\n// import {\n// ICircleGraphicAttribute,\n// ILineGraphicAttribute,\n// IPathGraphicAttribute,\n// IRectGraphicAttribute,\n// ISymbolGraphicAttribute,\n// ITextGraphicAttribute,\n// IArcGraphicAttribute,\n// IAreaGraphicAttribute,\n// IGroupGraphicAttribute,\n// IPolygonGraphicAttribute\n// } from '../../interface';\n\n// export interface ITheme {\n// readonly id: string;\n// circleAttribute: Required<ICircleGraphicAttribute>;\n// textAttribute: Required<ITextGraphicAttribute>;\n// symbolAttribute: Required<ISymbolGraphicAttribute>;\n// lineAttribute: Required<ILineGraphicAttribute>;\n// areaAttribute: Required<IAreaGraphicAttribute>;\n// rectAttribute: Required<IRectGraphicAttribute>;\n// pathAttribute: Required<IPathGraphicAttribute>;\n// arcAttribute: Required<IArcGraphicAttribute>;\n// groupAttribute: Required<IGroupGraphicAttribute>;\n// polygonAttribute: Required<IPolygonGraphicAttribute>;\n\n// configure: (themeService: IThemeService) => void;\n\n// activate: () => void;\n// deactivate: () => void;\n// }\n\n// export const Theme = Symbol.for('Theme');\n\n// export const DEFAULT_THEME_ID = 'DEFAULT_THEME_ID';\n\n// export interface IThemeService {\n// register: (theme: ITheme) => void;\n// getThemes: () => ITheme[];\n\n// getTheme: (themeId: string) => ITheme;\n\n// setCurrentTheme: (themeId: string) => void;\n\n// getCurrentTheme: () => ITheme;\n\n// defaultTheme: ITheme;\n\n// reset: () => void;\n// }\n\n// export const ThemeServce = Symbol.for('ThemeServce');\n\n//
|
|
1
|
+
{"version":3,"sources":["../src/interface/theme-service.ts"],"names":[],"mappings":"","file":"theme-service.js","sourcesContent":["// import { ContributionProvider } from '../../common/contribution-provider';\n// import {\n// ICircleGraphicAttribute,\n// ILineGraphicAttribute,\n// IPathGraphicAttribute,\n// IRectGraphicAttribute,\n// ISymbolGraphicAttribute,\n// ITextGraphicAttribute,\n// IArcGraphicAttribute,\n// IAreaGraphicAttribute,\n// IGroupGraphicAttribute,\n// IPolygonGraphicAttribute\n// } from '../../interface';\n\n// export interface ITheme {\n// readonly id: string;\n// circleAttribute: Required<ICircleGraphicAttribute>;\n// textAttribute: Required<ITextGraphicAttribute>;\n// symbolAttribute: Required<ISymbolGraphicAttribute>;\n// lineAttribute: Required<ILineGraphicAttribute>;\n// areaAttribute: Required<IAreaGraphicAttribute>;\n// rectAttribute: Required<IRectGraphicAttribute>;\n// pathAttribute: Required<IPathGraphicAttribute>;\n// arcAttribute: Required<IArcGraphicAttribute>;\n// groupAttribute: Required<IGroupGraphicAttribute>;\n// polygonAttribute: Required<IPolygonGraphicAttribute>;\n\n// configure: (themeService: IThemeService) => void;\n\n// activate: () => void;\n// deactivate: () => void;\n// }\n\n// export const Theme = Symbol.for('Theme');\n\n// export const DEFAULT_THEME_ID = 'DEFAULT_THEME_ID';\n\n// export interface IThemeService {\n// register: (theme: ITheme) => void;\n// getThemes: () => ITheme[];\n\n// getTheme: (themeId: string) => ITheme;\n\n// setCurrentTheme: (themeId: string) => void;\n\n// getCurrentTheme: () => ITheme;\n\n// defaultTheme: ITheme;\n\n// reset: () => void;\n// }\n\n// export const ThemeServce = Symbol.for('ThemeServce');\n\n// export class DefaultThemeService implements IThemeService {\n// protected themeMap: Record<string, ITheme> = {};\n// protected activeTheme?: ITheme;\n\n// constructor(\n// @named(Theme)\n// protected readonly contributions: ContributionProvider<ITheme>\n// ) {}\n\n// @postConstruct()\n// init() {\n// this.contributions.getContributions().forEach(theme => {\n// theme.configure(this);\n// });\n// this.setCurrentTheme(this.defaultTheme.id);\n// }\n\n// register(theme: ITheme) {\n// this.themeMap[theme.id] = theme;\n// }\n// getThemes(): ITheme[] {\n// return Object.keys(this.themeMap).map(k => this.themeMap[k]);\n// }\n\n// getTheme(themeId: string): ITheme {\n// return this.themeMap[themeId];\n// }\n\n// setCurrentTheme(themeId: string): void {\n// this.activeTheme = this.themeMap[themeId] || this.defaultTheme;\n// }\n\n// getCurrentTheme(): ITheme {\n// return this.activeTheme as ITheme;\n// }\n\n// get defaultTheme(): ITheme {\n// return this.themeMap[DEFAULT_THEME_ID];\n// }\n\n// reset(): void {\n// this.setCurrentTheme(this.defaultTheme.id);\n// }\n// }\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ServiceIdentifier } from '../common/explicit-binding';
|
|
2
|
+
export type LegacyNamedIdentifier = string | number | symbol;
|
|
3
|
+
export interface ILegacyBindingResolveContext {
|
|
4
|
+
container: ILegacyBindingContext;
|
|
5
|
+
}
|
|
6
|
+
export interface ILegacyBindingSyntax<T = unknown> {
|
|
7
|
+
to: (constructor: new (...args: any[]) => T) => ILegacyBindingSyntax<T>;
|
|
8
|
+
toSelf: () => ILegacyBindingSyntax<T>;
|
|
9
|
+
toDynamicValue: (factory: (context: ILegacyBindingResolveContext) => T) => ILegacyBindingSyntax<T>;
|
|
10
|
+
toConstantValue: (value: T) => ILegacyBindingSyntax<T>;
|
|
11
|
+
toService: (serviceIdentifier: ServiceIdentifier) => ILegacyBindingSyntax<T>;
|
|
12
|
+
inSingletonScope: () => ILegacyBindingSyntax<T>;
|
|
13
|
+
whenTargetNamed: (name: LegacyNamedIdentifier) => ILegacyBindingSyntax<T>;
|
|
14
|
+
}
|
|
15
|
+
export interface ILegacyBindContext {
|
|
16
|
+
bind: <T>(serviceIdentifier: ServiceIdentifier<T>) => ILegacyBindingSyntax<T>;
|
|
17
|
+
}
|
|
18
|
+
export interface ILegacyBindingContext extends ILegacyBindContext {
|
|
19
|
+
rebind: <T>(serviceIdentifier: ServiceIdentifier<T>) => ILegacyBindingSyntax<T>;
|
|
20
|
+
isBound: <T>(serviceIdentifier: ServiceIdentifier<T>) => boolean;
|
|
21
|
+
getAll: <T>(serviceIdentifier: ServiceIdentifier<T>) => T[];
|
|
22
|
+
getNamed: <T>(serviceIdentifier: ServiceIdentifier<T>, name: LegacyNamedIdentifier) => T | undefined;
|
|
23
|
+
}
|
|
24
|
+
export declare function createLegacyBindingContext(): ILegacyBindingContext;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.createLegacyBindingContext = void 0;
|
|
6
|
+
|
|
7
|
+
class LegacyBindingSyntax {
|
|
8
|
+
constructor(record) {
|
|
9
|
+
this.record = record;
|
|
10
|
+
}
|
|
11
|
+
to(constructor) {
|
|
12
|
+
return this.record.implementationType = "constructor", this.record.implementationConstructor = constructor,
|
|
13
|
+
this.record.cached = !1, this.record.cachedValue = void 0, this;
|
|
14
|
+
}
|
|
15
|
+
toSelf() {
|
|
16
|
+
return this.to(this.record.serviceIdentifier);
|
|
17
|
+
}
|
|
18
|
+
toDynamicValue(factory) {
|
|
19
|
+
return this.record.implementationType = "dynamic", this.record.implementationFactory = factory,
|
|
20
|
+
this.record.cached = !1, this.record.cachedValue = void 0, this;
|
|
21
|
+
}
|
|
22
|
+
toConstantValue(value) {
|
|
23
|
+
return this.record.implementationType = "constant", this.record.implementationValue = value,
|
|
24
|
+
this.record.cached = !0, this.record.cachedValue = value, this;
|
|
25
|
+
}
|
|
26
|
+
toService(serviceIdentifier) {
|
|
27
|
+
return this.record.implementationType = "service", this.record.linkedServiceIdentifier = serviceIdentifier,
|
|
28
|
+
this.record.cached = !1, this.record.cachedValue = void 0, this;
|
|
29
|
+
}
|
|
30
|
+
inSingletonScope() {
|
|
31
|
+
return this.record.scope = "singleton", this;
|
|
32
|
+
}
|
|
33
|
+
whenTargetNamed(name) {
|
|
34
|
+
return this.record.named = name, this;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
class LegacyBindingContext {
|
|
39
|
+
constructor() {
|
|
40
|
+
this.bindings = new Map, this.bind = serviceIdentifier => {
|
|
41
|
+
const record = {
|
|
42
|
+
serviceIdentifier: serviceIdentifier,
|
|
43
|
+
scope: "transient",
|
|
44
|
+
cached: !1
|
|
45
|
+
}, records = this.bindings.get(serviceIdentifier);
|
|
46
|
+
return records ? records.push(record) : this.bindings.set(serviceIdentifier, [ record ]),
|
|
47
|
+
new LegacyBindingSyntax(record);
|
|
48
|
+
}, this.rebind = serviceIdentifier => (this.bindings.delete(serviceIdentifier),
|
|
49
|
+
this.bind(serviceIdentifier)), this.isBound = serviceIdentifier => {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
return (null !== (_b = null === (_a = this.bindings.get(serviceIdentifier)) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0) > 0;
|
|
52
|
+
}, this.getAll = serviceIdentifier => {
|
|
53
|
+
const records = this.bindings.get(serviceIdentifier);
|
|
54
|
+
return (null == records ? void 0 : records.length) ? records.map((record => this.resolveBinding(record))).filter((value => void 0 !== value)) : [];
|
|
55
|
+
}, this.getNamed = (serviceIdentifier, name) => {
|
|
56
|
+
const records = this.bindings.get(serviceIdentifier);
|
|
57
|
+
if (!(null == records ? void 0 : records.length)) return;
|
|
58
|
+
const record = records.find((item => item.named === name));
|
|
59
|
+
return record ? this.resolveBinding(record) : void 0;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
resolveBinding(record) {
|
|
63
|
+
var _a;
|
|
64
|
+
if ("singleton" === record.scope && record.cached) return record.cachedValue;
|
|
65
|
+
let value;
|
|
66
|
+
switch (record.implementationType) {
|
|
67
|
+
case "constant":
|
|
68
|
+
value = record.implementationValue;
|
|
69
|
+
break;
|
|
70
|
+
|
|
71
|
+
case "constructor":
|
|
72
|
+
value = record.implementationConstructor ? new record.implementationConstructor : void 0;
|
|
73
|
+
break;
|
|
74
|
+
|
|
75
|
+
case "dynamic":
|
|
76
|
+
value = null === (_a = record.implementationFactory) || void 0 === _a ? void 0 : _a.call(record, {
|
|
77
|
+
container: this
|
|
78
|
+
});
|
|
79
|
+
break;
|
|
80
|
+
|
|
81
|
+
case "service":
|
|
82
|
+
record.linkedServiceIdentifier && ([value] = this.getAll(record.linkedServiceIdentifier));
|
|
83
|
+
break;
|
|
84
|
+
|
|
85
|
+
default:
|
|
86
|
+
value = void 0;
|
|
87
|
+
}
|
|
88
|
+
return "singleton" === record.scope && (record.cached = !0, record.cachedValue = value),
|
|
89
|
+
value;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function createLegacyBindingContext() {
|
|
94
|
+
return new LegacyBindingContext;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
exports.createLegacyBindingContext = createLegacyBindingContext;
|
|
98
|
+
//# sourceMappingURL=binding-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/legacy/binding-context.ts"],"names":[],"mappings":";;;AAiDA,MAAM,mBAAmB;IACvB,YAA6B,MAA+B;QAA/B,WAAM,GAAN,MAAM,CAAyB;IAAG,CAAC;IAEhE,EAAE,CAAC,WAAsC;QACvC,IAAI,CAAC,MAAM,CAAC,kBAAkB,GAAG,aAAa,CAAC;QAC/C,IAAI,CAAC,MAAM,CAAC,yBAAyB,GAAG,WAAW,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,iBAA8C,CAAC,CAAC;IAC7E,CAAC;IAED,cAAc,CAAC,OAAqD;QAClE,IAAI,CAAC,MAAM,CAAC,kBAAkB,GAAG,SAAS,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,qBAAqB,GAAG,OAAO,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,eAAe,CAAC,KAAQ;QACtB,IAAI,CAAC,MAAM,CAAC,kBAAkB,GAAG,UAAU,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,iBAAoC;QAC5C,IAAI,CAAC,MAAM,CAAC,kBAAkB,GAAG,SAAS,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,uBAAuB,GAAG,iBAAiB,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,eAAe,CAAC,IAA2B;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,MAAM,oBAAoB;IAA1B;QACmB,aAAQ,GAAG,IAAI,GAAG,EAA6C,CAAC;QAEjF,SAAI,GAAG,CAAI,iBAAuC,EAA2B,EAAE;YAC7E,MAAM,MAAM,GAA4B;gBACtC,iBAAiB;gBACjB,KAAK,EAAE,WAAW;gBAClB,MAAM,EAAE,KAAK;aACd,CAAC;YACF,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YACrD,IAAI,OAAO,EAAE;gBACX,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACtB;iBAAM;gBACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;aAChD;YACD,OAAO,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC,CAAC;QAEF,WAAM,GAAG,CAAI,iBAAuC,EAA2B,EAAE;YAC/E,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;YACxC,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACtC,CAAC,CAAC;QAEF,YAAO,GAAG,CAAI,iBAAuC,EAAW,EAAE;;YAChE,OAAO,CAAC,MAAA,MAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,0CAAE,MAAM,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACjE,CAAC,CAAC;QAEF,WAAM,GAAG,CAAI,iBAAuC,EAAO,EAAE;YAC3D,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YACrD,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAA,EAAE;gBACpB,OAAO,EAAE,CAAC;aACX;YACD,OAAO,OAAO;iBACX,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAkB,CAAC;iBAC3D,MAAM,CAAC,CAAC,KAAK,EAAc,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;QACxD,CAAC,CAAC;QAEF,aAAQ,GAAG,CAAI,iBAAuC,EAAE,IAA2B,EAAiB,EAAE;YACpG,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YACrD,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAA,EAAE;gBACpB,OAAO,SAAS,CAAC;aAClB;YACD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC;YACzD,OAAO,MAAM,CAAC,CAAC,CAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7E,CAAC,CAAC;IAkCJ,CAAC;IAhCS,cAAc,CAAI,MAA+B;;QACvD,IAAI,MAAM,CAAC,KAAK,KAAK,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE;YACjD,OAAO,MAAM,CAAC,WAAW,CAAC;SAC3B;QAED,IAAI,KAAoB,CAAC;QACzB,QAAQ,MAAM,CAAC,kBAAkB,EAAE;YACjC,KAAK,UAAU;gBACb,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC;gBACnC,MAAM;YACR,KAAK,aAAa;gBAChB,KAAK,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;gBAC9F,MAAM;YACR,KAAK,SAAS;gBACZ,KAAK,GAAG,MAAA,MAAM,CAAC,qBAAqB,uDAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC5D,MAAM;YACR,KAAK,SAAS;gBACZ,IAAI,MAAM,CAAC,uBAAuB,EAAE;oBAClC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAQ,CAAC;iBAC9D;gBACD,MAAM;YACR;gBACE,KAAK,GAAG,SAAS,CAAC;SACrB;QAED,IAAI,MAAM,CAAC,KAAK,KAAK,WAAW,EAAE;YAChC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;YACrB,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;SAC5B;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED,SAAgB,0BAA0B;IACxC,OAAO,IAAI,oBAAoB,EAAE,CAAC;AACpC,CAAC;AAFD,gEAEC","file":"binding-context.js","sourcesContent":["import type { ServiceIdentifier } from '../common/explicit-binding';\n\n/**\n * Lightweight legacy binding context kept only for the remaining bootstrap compatibility path.\n * It replaces the removed container/inversify bridge with the minimal binding features we still need.\n */\nexport type LegacyNamedIdentifier = string | number | symbol;\n\nexport interface ILegacyBindingResolveContext {\n container: ILegacyBindingContext;\n}\n\nexport interface ILegacyBindingSyntax<T = unknown> {\n to: (constructor: new (...args: any[]) => T) => ILegacyBindingSyntax<T>;\n toSelf: () => ILegacyBindingSyntax<T>;\n toDynamicValue: (factory: (context: ILegacyBindingResolveContext) => T) => ILegacyBindingSyntax<T>;\n toConstantValue: (value: T) => ILegacyBindingSyntax<T>;\n toService: (serviceIdentifier: ServiceIdentifier) => ILegacyBindingSyntax<T>;\n inSingletonScope: () => ILegacyBindingSyntax<T>;\n whenTargetNamed: (name: LegacyNamedIdentifier) => ILegacyBindingSyntax<T>;\n}\n\nexport interface ILegacyBindContext {\n bind: <T>(serviceIdentifier: ServiceIdentifier<T>) => ILegacyBindingSyntax<T>;\n}\n\nexport interface ILegacyBindingContext extends ILegacyBindContext {\n rebind: <T>(serviceIdentifier: ServiceIdentifier<T>) => ILegacyBindingSyntax<T>;\n isBound: <T>(serviceIdentifier: ServiceIdentifier<T>) => boolean;\n getAll: <T>(serviceIdentifier: ServiceIdentifier<T>) => T[];\n getNamed: <T>(serviceIdentifier: ServiceIdentifier<T>, name: LegacyNamedIdentifier) => T | undefined;\n}\n\ntype LegacyBindingType = 'constructor' | 'constant' | 'dynamic' | 'service';\ntype LegacyBindingScope = 'transient' | 'singleton';\n\ninterface ILegacyBindingRecord<T = unknown> {\n serviceIdentifier: ServiceIdentifier<T>;\n implementationType?: LegacyBindingType;\n implementationConstructor?: new (...args: any[]) => T;\n implementationFactory?: (context: ILegacyBindingResolveContext) => T;\n implementationValue?: T;\n linkedServiceIdentifier?: ServiceIdentifier;\n scope: LegacyBindingScope;\n named?: LegacyNamedIdentifier;\n cached: boolean;\n cachedValue?: T;\n}\n\nclass LegacyBindingSyntax<T> implements ILegacyBindingSyntax<T> {\n constructor(private readonly record: ILegacyBindingRecord<T>) {}\n\n to(constructor: new (...args: any[]) => T): ILegacyBindingSyntax<T> {\n this.record.implementationType = 'constructor';\n this.record.implementationConstructor = constructor;\n this.record.cached = false;\n this.record.cachedValue = undefined;\n return this;\n }\n\n toSelf(): ILegacyBindingSyntax<T> {\n return this.to(this.record.serviceIdentifier as new (...args: any[]) => T);\n }\n\n toDynamicValue(factory: (context: ILegacyBindingResolveContext) => T): ILegacyBindingSyntax<T> {\n this.record.implementationType = 'dynamic';\n this.record.implementationFactory = factory;\n this.record.cached = false;\n this.record.cachedValue = undefined;\n return this;\n }\n\n toConstantValue(value: T): ILegacyBindingSyntax<T> {\n this.record.implementationType = 'constant';\n this.record.implementationValue = value;\n this.record.cached = true;\n this.record.cachedValue = value;\n return this;\n }\n\n toService(serviceIdentifier: ServiceIdentifier): ILegacyBindingSyntax<T> {\n this.record.implementationType = 'service';\n this.record.linkedServiceIdentifier = serviceIdentifier;\n this.record.cached = false;\n this.record.cachedValue = undefined;\n return this;\n }\n\n inSingletonScope(): ILegacyBindingSyntax<T> {\n this.record.scope = 'singleton';\n return this;\n }\n\n whenTargetNamed(name: LegacyNamedIdentifier): ILegacyBindingSyntax<T> {\n this.record.named = name;\n return this;\n }\n}\n\nclass LegacyBindingContext implements ILegacyBindingContext {\n private readonly bindings = new Map<ServiceIdentifier, ILegacyBindingRecord[]>();\n\n bind = <T>(serviceIdentifier: ServiceIdentifier<T>): ILegacyBindingSyntax<T> => {\n const record: ILegacyBindingRecord<T> = {\n serviceIdentifier,\n scope: 'transient',\n cached: false\n };\n const records = this.bindings.get(serviceIdentifier);\n if (records) {\n records.push(record);\n } else {\n this.bindings.set(serviceIdentifier, [record]);\n }\n return new LegacyBindingSyntax(record);\n };\n\n rebind = <T>(serviceIdentifier: ServiceIdentifier<T>): ILegacyBindingSyntax<T> => {\n this.bindings.delete(serviceIdentifier);\n return this.bind(serviceIdentifier);\n };\n\n isBound = <T>(serviceIdentifier: ServiceIdentifier<T>): boolean => {\n return (this.bindings.get(serviceIdentifier)?.length ?? 0) > 0;\n };\n\n getAll = <T>(serviceIdentifier: ServiceIdentifier<T>): T[] => {\n const records = this.bindings.get(serviceIdentifier);\n if (!records?.length) {\n return [];\n }\n return records\n .map(record => this.resolveBinding(record) as T | undefined)\n .filter((value): value is T => value !== undefined);\n };\n\n getNamed = <T>(serviceIdentifier: ServiceIdentifier<T>, name: LegacyNamedIdentifier): T | undefined => {\n const records = this.bindings.get(serviceIdentifier);\n if (!records?.length) {\n return undefined;\n }\n const record = records.find(item => item.named === name);\n return record ? (this.resolveBinding(record) as T | undefined) : undefined;\n };\n\n private resolveBinding<T>(record: ILegacyBindingRecord<T>): T | undefined {\n if (record.scope === 'singleton' && record.cached) {\n return record.cachedValue;\n }\n\n let value: T | undefined;\n switch (record.implementationType) {\n case 'constant':\n value = record.implementationValue;\n break;\n case 'constructor':\n value = record.implementationConstructor ? new record.implementationConstructor() : undefined;\n break;\n case 'dynamic':\n value = record.implementationFactory?.({ container: this });\n break;\n case 'service':\n if (record.linkedServiceIdentifier) {\n [value] = this.getAll(record.linkedServiceIdentifier) as T[];\n }\n break;\n default:\n value = undefined;\n }\n\n if (record.scope === 'singleton') {\n record.cached = true;\n record.cachedValue = value;\n }\n\n return value;\n }\n}\n\nexport function createLegacyBindingContext(): ILegacyBindingContext {\n return new LegacyBindingContext();\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ILegacyBindingContext } from './binding-context';
|
|
2
|
+
export type { ILegacyBindContext, ILegacyBindingContext } from './binding-context';
|
|
3
|
+
export declare function preLoadAllModule(): void;
|
|
4
|
+
export declare namespace preLoadAllModule {
|
|
5
|
+
var __loaded: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function getLegacyBindingContext(): ILegacyBindingContext;
|
|
8
|
+
export declare function resolveLegacySingleton<T>(serviceIdentifier: any): T;
|
|
9
|
+
export declare function resolveLegacyNamed<T>(serviceIdentifier: any, name: string): T | undefined;
|
|
10
|
+
export declare function createLegacySingletonProxy<T extends object>(resolver: () => T): T;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
}), exports.createLegacySingletonProxy = exports.resolveLegacyNamed = exports.resolveLegacySingleton = exports.getLegacyBindingContext = exports.preLoadAllModule = void 0;
|
|
12
|
+
|
|
13
|
+
const core_modules_1 = __importDefault(require("../core/core-modules")), render_modules_1 = __importDefault(require("../render/render-modules")), pick_modules_1 = __importDefault(require("../picker/pick-modules")), graphic_module_1 = __importDefault(require("../graphic/graphic-service/graphic-module")), plugin_modules_1 = __importDefault(require("../plugins/plugin-modules")), modules_1 = __importDefault(require("../core/contributions/modules")), modules_2 = __importDefault(require("../render/contributions/modules")), binding_context_1 = require("./binding-context"), legacyBindingContext = (0,
|
|
14
|
+
binding_context_1.createLegacyBindingContext)();
|
|
15
|
+
|
|
16
|
+
function getLegacyTarget(resolver) {
|
|
17
|
+
let target;
|
|
18
|
+
return () => (void 0 === target && (target = resolver()), target);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function preLoadAllModule() {
|
|
22
|
+
preLoadAllModule.__loaded || (preLoadAllModule.__loaded = !0, (0, core_modules_1.default)({
|
|
23
|
+
bind: legacyBindingContext.bind
|
|
24
|
+
}), (0, graphic_module_1.default)({
|
|
25
|
+
bind: legacyBindingContext.bind
|
|
26
|
+
}), (0, render_modules_1.default)({
|
|
27
|
+
bind: legacyBindingContext.bind
|
|
28
|
+
}), (0, pick_modules_1.default)({
|
|
29
|
+
bind: legacyBindingContext.bind,
|
|
30
|
+
isBound: legacyBindingContext.isBound
|
|
31
|
+
}), (0, plugin_modules_1.default)({
|
|
32
|
+
bind: legacyBindingContext.bind
|
|
33
|
+
}), (0, modules_1.default)(legacyBindingContext), (0, modules_2.default)(legacyBindingContext));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function getLegacyBindingContext() {
|
|
37
|
+
return legacyBindingContext;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function resolveLegacySingleton(serviceIdentifier) {
|
|
41
|
+
preLoadAllModule();
|
|
42
|
+
const [instance] = legacyBindingContext.getAll(serviceIdentifier);
|
|
43
|
+
return instance;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function resolveLegacyNamed(serviceIdentifier, name) {
|
|
47
|
+
return preLoadAllModule(), legacyBindingContext.getNamed(serviceIdentifier, name);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function createLegacySingletonProxy(resolver) {
|
|
51
|
+
const getTarget = getLegacyTarget(resolver);
|
|
52
|
+
return new Proxy({}, {
|
|
53
|
+
get(_target, property) {
|
|
54
|
+
const value = getTarget()[property];
|
|
55
|
+
return "function" == typeof value ? value.bind(getTarget()) : value;
|
|
56
|
+
},
|
|
57
|
+
set: (_target, property, value) => (getTarget()[property] = value, !0),
|
|
58
|
+
has: (_target, property) => property in getTarget(),
|
|
59
|
+
ownKeys: () => Reflect.ownKeys(getTarget()),
|
|
60
|
+
getOwnPropertyDescriptor(_target, property) {
|
|
61
|
+
const descriptor = Object.getOwnPropertyDescriptor(getTarget(), property);
|
|
62
|
+
if (descriptor) return Object.assign(Object.assign({}, descriptor), {
|
|
63
|
+
configurable: !0
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
exports.preLoadAllModule = preLoadAllModule, preLoadAllModule.__loaded = !1, exports.getLegacyBindingContext = getLegacyBindingContext,
|
|
70
|
+
exports.resolveLegacySingleton = resolveLegacySingleton, exports.resolveLegacyNamed = resolveLegacyNamed,
|
|
71
|
+
exports.createLegacySingletonProxy = createLegacySingletonProxy;
|
|
72
|
+
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/legacy/bootstrap.ts"],"names":[],"mappings":";;;;;;AAAA,wEAA8C;AAC9C,8EAAoD;AACpD,0EAAgD;AAChD,+FAAsE;AACtE,+EAAqD;AACrD,4EAAqE;AACrE,8EAAsE;AACtE,uDAAoH;AAIpH,MAAM,oBAAoB,GAAG,IAAA,4CAA0B,GAAE,CAAC;AAE1D,SAAS,eAAe,CAAI,QAAiB;IAC3C,IAAI,MAAqB,CAAC;IAE1B,OAAO,GAAG,EAAE;QACV,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,GAAG,QAAQ,EAAE,CAAC;SACrB;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,gBAAgB;IAC9B,IAAI,gBAAgB,CAAC,QAAQ,EAAE;QAC7B,OAAO;KACR;IACD,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC;IACjC,IAAA,sBAAU,EAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,IAAA,wBAAa,EAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC;IACnD,IAAA,wBAAY,EAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC;IAClD,IAAA,sBAAU,EAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,oBAAoB,CAAC,OAAO,EAAE,CAAC,CAAC;IACvF,IAAA,wBAAY,EAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC;IAClD,IAAA,iBAAwB,EAAC,oBAAoB,CAAC,CAAC;IAC/C,IAAA,iBAAuB,EAAC,oBAAoB,CAAC,CAAC;AAChD,CAAC;AAZD,4CAYC;AAED,gBAAgB,CAAC,QAAQ,GAAG,KAAK,CAAC;AAElC,SAAgB,uBAAuB;IACrC,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAFD,0DAEC;AAED,SAAgB,sBAAsB,CAAI,iBAAsB;IAC9D,gBAAgB,EAAE,CAAC;IACnB,MAAM,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAC,MAAM,CAAI,iBAAiB,CAAC,CAAC;IACrE,OAAO,QAAQ,CAAC;AAClB,CAAC;AAJD,wDAIC;AAED,SAAgB,kBAAkB,CAAI,iBAAsB,EAAE,IAAY;IACxE,gBAAgB,EAAE,CAAC;IACnB,OAAO,oBAAoB,CAAC,QAAQ,CAAI,iBAAiB,EAAE,IAAI,CAAC,CAAC;AACnE,CAAC;AAHD,gDAGC;AAED,SAAgB,0BAA0B,CAAmB,QAAiB;IAC5E,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAE5C,OAAO,IAAI,KAAK,CAAC,EAAO,EAAE;QACxB,GAAG,CAAC,OAAO,EAAE,QAAQ;YACnB,MAAM,KAAK,GAAI,SAAS,EAAU,CAAC,QAAQ,CAAC,CAAC;YAC7C,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QACvE,CAAC;QACD,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK;YACzB,SAAS,EAAU,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;YACvC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,GAAG,CAAC,OAAO,EAAE,QAAQ;YACnB,OAAO,QAAQ,IAAK,SAAS,EAAU,CAAC;QAC1C,CAAC;QACD,OAAO;YACL,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,EAAS,CAAC,CAAC;QAC7C,CAAC;QACD,wBAAwB,CAAC,OAAO,EAAE,QAAQ;YACxC,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAS,EAAE,QAAQ,CAAC,CAAC;YAEjF,IAAI,CAAC,UAAU,EAAE;gBACf,OAAO,SAAS,CAAC;aAClB;YAED,uCACK,UAAU,KACb,YAAY,EAAE,IAAI,IAClB;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA/BD,gEA+BC","file":"bootstrap.js","sourcesContent":["import coreModule from '../core/core-modules';\nimport renderModule from '../render/render-modules';\nimport pickModule from '../picker/pick-modules';\nimport graphicModule from '../graphic/graphic-service/graphic-module';\nimport pluginModule from '../plugins/plugin-modules';\nimport loadBuiltinContributions from '../core/contributions/modules';\nimport loadRenderContributions from '../render/contributions/modules';\nimport { createLegacyBindingContext, type ILegacyBindContext, type ILegacyBindingContext } from './binding-context';\n\nexport type { ILegacyBindContext, ILegacyBindingContext } from './binding-context';\n\nconst legacyBindingContext = createLegacyBindingContext();\n\nfunction getLegacyTarget<T>(resolver: () => T): () => T {\n let target: T | undefined;\n\n return () => {\n if (target === undefined) {\n target = resolver();\n }\n\n return target;\n };\n}\n\nexport function preLoadAllModule() {\n if (preLoadAllModule.__loaded) {\n return;\n }\n preLoadAllModule.__loaded = true;\n coreModule({ bind: legacyBindingContext.bind });\n graphicModule({ bind: legacyBindingContext.bind });\n renderModule({ bind: legacyBindingContext.bind });\n pickModule({ bind: legacyBindingContext.bind, isBound: legacyBindingContext.isBound });\n pluginModule({ bind: legacyBindingContext.bind });\n loadBuiltinContributions(legacyBindingContext);\n loadRenderContributions(legacyBindingContext);\n}\n\npreLoadAllModule.__loaded = false;\n\nexport function getLegacyBindingContext(): ILegacyBindingContext {\n return legacyBindingContext;\n}\n\nexport function resolveLegacySingleton<T>(serviceIdentifier: any): T {\n preLoadAllModule();\n const [instance] = legacyBindingContext.getAll<T>(serviceIdentifier);\n return instance;\n}\n\nexport function resolveLegacyNamed<T>(serviceIdentifier: any, name: string): T | undefined {\n preLoadAllModule();\n return legacyBindingContext.getNamed<T>(serviceIdentifier, name);\n}\n\nexport function createLegacySingletonProxy<T extends object>(resolver: () => T): T {\n const getTarget = getLegacyTarget(resolver);\n\n return new Proxy({} as T, {\n get(_target, property) {\n const value = (getTarget() as any)[property];\n return typeof value === 'function' ? value.bind(getTarget()) : value;\n },\n set(_target, property, value) {\n (getTarget() as any)[property] = value;\n return true;\n },\n has(_target, property) {\n return property in (getTarget() as any);\n },\n ownKeys() {\n return Reflect.ownKeys(getTarget() as any);\n },\n getOwnPropertyDescriptor(_target, property) {\n const descriptor = Object.getOwnPropertyDescriptor(getTarget() as any, property);\n\n if (!descriptor) {\n return undefined;\n }\n\n return {\n ...descriptor,\n configurable: true\n };\n }\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/legacy/module-types.ts"],"names":[],"mappings":"","file":"module-types.js","sourcesContent":["import type { ILegacyBindContext } from './binding-context';\n\nexport type ILegacyContributionBindingContext = ILegacyBindContext;\n"]}
|
package/cjs/modules.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IGraphicService } from './interface';
|
|
2
2
|
import type { IGraphicUtil, ILayerService, ITransformUtil } from './interface/core';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
export declare const vglobal: IGlobal;
|
|
3
|
+
export { vglobal } from './global';
|
|
4
|
+
export { preLoadAllModule, getLegacyBindingContext, type ILegacyBindContext, type ILegacyBindingContext } from './legacy/bootstrap';
|
|
5
|
+
export declare const container: import("./legacy/binding-context").ILegacyBindingContext;
|
|
8
6
|
export declare const graphicUtil: IGraphicUtil;
|
|
9
7
|
export declare const transformUtil: ITransformUtil;
|
|
10
8
|
export declare const graphicService: IGraphicService;
|
|
11
9
|
export declare const layerService: ILayerService;
|
|
10
|
+
export declare function configureLegacyApplication(): void;
|