@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
package/es/factory.d.ts
CHANGED
package/es/factory.js
CHANGED
package/es/factory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/factory.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;IAGlB,MAAM,CAAC,cAAc,CAAC,SAAiB,EAAE,WAAgB;QACvD,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,SAAiB;QAChC,OAAO,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC3C,CAAC;;AARc,sBAAc,GAAwB,EAAE,CAAC","file":"factory.js","sourcesContent":["export class Factory {\n private static _pluginClasses: Record<string, any> = {};\n\n static registerPlugin(pluginKey: string, pluginClass: any) {\n Factory._pluginClasses[pluginKey] = pluginClass;\n }\n\n static getPlugin(pluginKey: string) {\n return Factory._pluginClasses[pluginKey];\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/factory.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;IAGlB,MAAM,CAAC,cAAc,CAAC,SAAiB,EAAE,WAAgB;QACvD,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,SAAiB;QAChC,OAAO,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC3C,CAAC;;AARc,sBAAc,GAAwB,EAAE,CAAC;AAW1D,cAAc,iBAAiB,CAAC","file":"factory.js","sourcesContent":["export class Factory {\n private static _pluginClasses: Record<string, any> = {};\n\n static registerPlugin(pluginKey: string, pluginClass: any) {\n Factory._pluginClasses[pluginKey] = pluginClass;\n }\n\n static getPlugin(pluginKey: string) {\n return Factory._pluginClasses[pluginKey];\n }\n}\n\nexport * from './factory/index';\n"]}
|
package/es/global.d.ts
ADDED
package/es/global.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { application } from "./application";
|
|
2
|
+
|
|
3
|
+
import { VGlobal } from "./constants";
|
|
4
|
+
|
|
5
|
+
import { createLegacySingletonProxy, resolveLegacySingleton } from "./legacy/bootstrap";
|
|
6
|
+
|
|
7
|
+
export const vglobal = createLegacySingletonProxy((() => resolveLegacySingleton(VGlobal)));
|
|
8
|
+
|
|
9
|
+
application.global = vglobal;
|
|
10
|
+
//# sourceMappingURL=global.js.map
|
package/es/global.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/global.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAExF,MAAM,CAAC,MAAM,OAAO,GAAG,0BAA0B,CAAU,GAAG,EAAE,CAAC,sBAAsB,CAAU,OAAO,CAAC,CAAC,CAAC;AAE3G,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC","file":"global.js","sourcesContent":["import type { IGlobal } from './interface';\nimport { application } from './application';\nimport { VGlobal } from './constants';\nimport { createLegacySingletonProxy, resolveLegacySingleton } from './legacy/bootstrap';\n\nexport const vglobal = createLegacySingletonProxy<IGlobal>(() => resolveLegacySingleton<IGlobal>(VGlobal));\n\napplication.global = vglobal;\n"]}
|
package/es/graphic/area.js
CHANGED
|
@@ -20,7 +20,7 @@ export class Area extends Graphic {
|
|
|
20
20
|
return super.isValid() && this._isValid();
|
|
21
21
|
}
|
|
22
22
|
_isValid() {
|
|
23
|
-
if (this.
|
|
23
|
+
if (this.pathProxy) return !0;
|
|
24
24
|
const {points: points, segments: segments} = this.attribute;
|
|
25
25
|
return segments ? 0 !== segments.length : !!points && 0 !== points.length;
|
|
26
26
|
}
|
package/es/graphic/area.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/area.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,mBA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AAO,CAAC,GAAG,CAAC,EAAE;gBACrB,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO,IAAI,IAAI,mBAAM,IAAI,CAAC,SAAS,EAAG,CAAC;IACzC,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;;AArKM,wBAAmB,mBACxB,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,IACT,mBAAmB,EACtB;AAoKJ,MAAM,UAAU,UAAU,CAAC,UAAiC;IAC1D,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;AAC9B,CAAC","file":"area.js","sourcesContent":["import type { IAABBBounds, IPointLike } from '@visactor/vutils';\nimport type { IArea, IAreaCacheItem, IAreaGraphicAttribute } from '../interface';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { pointsInterpolation } from '../common/utils';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { AREA_NUMBER_TYPE } from './constants';\n\nconst AREA_UPDATE_TAG_KEY = ['segments', 'points', 'curveType', 'curveTension', ...GRAPHIC_UPDATE_TAG_KEY];\n\nexport class Area extends Graphic<IAreaGraphicAttribute> implements IArea {\n type: 'area' = 'area';\n\n static NOWORK_ANIMATE_ATTR = {\n segments: 1,\n curveType: 1,\n ...NOWORK_ANIMATE_ATTR\n };\n\n cache?: IAreaCacheItem;\n\n constructor(params: IAreaGraphicAttribute) {\n super(params);\n this.numberType = AREA_NUMBER_TYPE;\n }\n\n isValid(): boolean {\n return super.isValid() && this._isValid();\n }\n private _isValid(): boolean {\n if (this.getPathProxy()) {\n return true;\n }\n const { points, segments } = this.attribute;\n if (segments) {\n if (segments.length === 0) {\n return false;\n }\n return true;\n } else if (points) {\n if (points.length === 0) {\n return false;\n }\n return true;\n }\n return false;\n }\n\n getGraphicTheme(): Required<IAreaGraphicAttribute> {\n return getTheme(this).area;\n }\n\n protected updateAABBBounds(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n if (!this.updatePathProxyAABBBounds(aabbBounds)) {\n attribute.segments\n ? this.updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds)\n : this.updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds);\n }\n application.graphicService.updateTempAABBBounds(aabbBounds);\n // if (!this._rectBoundsContribitions) {\n // this._rectBoundsContribitions = this.rectBoundsContribitions.getContributions() || [];\n // }\n // this._rectBoundsContribitions.length &&\n // this._rectBoundsContribitions.forEach(c => {\n // c.updateBounds(attribute, areaTheme, tb1, graphic);\n // aabbBounds.union(tb1);\n // tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);\n // });\n\n this.setWidthHeightWithoutTransform(aabbBounds);\n\n const { lineJoin = areaTheme.lineJoin } = attribute;\n application.graphicService.transformAABBBounds(attribute, aabbBounds, areaTheme, lineJoin === 'miter', this);\n return aabbBounds;\n }\n\n protected updateAreaAABBBoundsByPoints(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds,\n graphic?: IArea\n ): IAABBBounds {\n const { points = areaTheme.points } = attribute;\n const b = aabbBounds;\n points.forEach(p => {\n b.add(p.x, p.y);\n b.add(p.x1 ?? p.x, p.y1 ?? p.y); //面积图特殊性:由三个值构成,横向面积图,x1会省略;纵向面积图,y1会省略\n });\n return b;\n }\n protected updateAreaAABBBoundsBySegments(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds,\n graphic?: IArea\n ): IAABBBounds {\n const { segments = areaTheme.segments } = attribute;\n const b = aabbBounds;\n segments.forEach(s => {\n s.points.forEach(p => {\n b.add(p.x, p.y);\n b.add(p.x1 ?? p.x, p.y1 ?? p.y); //面积图特殊性:由三个值构成,横向面积图,x1会省略;纵向面积图,y1会省略\n });\n });\n return b;\n }\n\n protected _interpolate(key: string, ratio: number, lastStepVal: any, nextStepVal: any, nextAttributes: any): void {\n if (key === 'points') {\n (nextAttributes as any).points = pointsInterpolation(lastStepVal, nextStepVal, ratio);\n }\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, AREA_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, AREA_UPDATE_TAG_KEY);\n }\n\n toCustomPath() {\n let path = super.toCustomPath();\n if (path) {\n return path;\n }\n path = new CustomPath2D();\n const attribute = this.attribute;\n const segments = attribute.segments;\n\n const parsePoints = (points: IPointLike[]) => {\n if (points && points.length) {\n let isFirst = true;\n const basePoints: IPointLike[] = [];\n points.forEach(point => {\n if (point.defined === false) {\n return;\n }\n if (isFirst) {\n path.moveTo(point.x, point.y);\n } else {\n path.lineTo(point.x, point.y);\n }\n basePoints.push({ x: point.x1 ?? point.x, y: point.y1 ?? point.y });\n\n isFirst = false;\n });\n\n if (basePoints.length) {\n for (let i = basePoints.length - 1; i >= 0; i--) {\n path.lineTo(basePoints[i].x, basePoints[i].y);\n }\n\n path.closePath();\n }\n }\n };\n\n if (attribute.points) {\n parsePoints(attribute.points);\n } else if (segments && segments.length) {\n segments.forEach(seg => {\n parsePoints(seg.points);\n });\n }\n\n return path;\n }\n\n clone() {\n return new Area({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Area.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createArea(attributes: IAreaGraphicAttribute): IArea {\n return new Area(attributes);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/graphic/area.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,E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GAAG,CAAC,MAAM,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO,IAAI,IAAI,mBAAM,IAAI,CAAC,SAAS,EAAG,CAAC;IACzC,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;;AArKM,wBAAmB,mBACxB,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,IACT,mBAAmB,EACtB;AAoKJ,MAAM,UAAU,UAAU,CAAC,UAAiC;IAC1D,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;AAC9B,CAAC","file":"area.js","sourcesContent":["import type { IAABBBounds, IPointLike } from '@visactor/vutils';\nimport type { IArea, IAreaCacheItem, IAreaGraphicAttribute } from '../interface';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { pointsInterpolation } from '../common/utils';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { AREA_NUMBER_TYPE } from './constants';\n\nconst AREA_UPDATE_TAG_KEY = ['segments', 'points', 'curveType', 'curveTension', ...GRAPHIC_UPDATE_TAG_KEY];\n\nexport class Area extends Graphic<IAreaGraphicAttribute> implements IArea {\n type: 'area' = 'area';\n\n static NOWORK_ANIMATE_ATTR = {\n segments: 1,\n curveType: 1,\n ...NOWORK_ANIMATE_ATTR\n };\n\n cache?: IAreaCacheItem;\n\n constructor(params: IAreaGraphicAttribute) {\n super(params);\n this.numberType = AREA_NUMBER_TYPE;\n }\n\n isValid(): boolean {\n return super.isValid() && this._isValid();\n }\n private _isValid(): boolean {\n if (this.pathProxy) {\n return true;\n }\n const { points, segments } = this.attribute;\n if (segments) {\n if (segments.length === 0) {\n return false;\n }\n return true;\n } else if (points) {\n if (points.length === 0) {\n return false;\n }\n return true;\n }\n return false;\n }\n\n getGraphicTheme(): Required<IAreaGraphicAttribute> {\n return getTheme(this).area;\n }\n\n protected updateAABBBounds(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n if (!this.updatePathProxyAABBBounds(aabbBounds)) {\n attribute.segments\n ? this.updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds)\n : this.updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds);\n }\n application.graphicService.updateTempAABBBounds(aabbBounds);\n // if (!this._rectBoundsContribitions) {\n // this._rectBoundsContribitions = this.rectBoundsContribitions.getContributions() || [];\n // }\n // this._rectBoundsContribitions.length &&\n // this._rectBoundsContribitions.forEach(c => {\n // c.updateBounds(attribute, areaTheme, tb1, graphic);\n // aabbBounds.union(tb1);\n // tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);\n // });\n\n this.setWidthHeightWithoutTransform(aabbBounds);\n\n const { lineJoin = areaTheme.lineJoin } = attribute;\n application.graphicService.transformAABBBounds(attribute, aabbBounds, areaTheme, lineJoin === 'miter', this);\n return aabbBounds;\n }\n\n protected updateAreaAABBBoundsByPoints(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds,\n graphic?: IArea\n ): IAABBBounds {\n const { points = areaTheme.points } = attribute;\n const b = aabbBounds;\n points.forEach(p => {\n b.add(p.x, p.y);\n b.add(p.x1 ?? p.x, p.y1 ?? p.y); //面积图特殊性:由三个值构成,横向面积图,x1会省略;纵向面积图,y1会省略\n });\n return b;\n }\n protected updateAreaAABBBoundsBySegments(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds,\n graphic?: IArea\n ): IAABBBounds {\n const { segments = areaTheme.segments } = attribute;\n const b = aabbBounds;\n segments.forEach(s => {\n s.points.forEach(p => {\n b.add(p.x, p.y);\n b.add(p.x1 ?? p.x, p.y1 ?? p.y); //面积图特殊性:由三个值构成,横向面积图,x1会省略;纵向面积图,y1会省略\n });\n });\n return b;\n }\n\n protected _interpolate(key: string, ratio: number, lastStepVal: any, nextStepVal: any, nextAttributes: any): void {\n if (key === 'points') {\n (nextAttributes as any).points = pointsInterpolation(lastStepVal, nextStepVal, ratio);\n }\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, AREA_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, AREA_UPDATE_TAG_KEY);\n }\n\n toCustomPath() {\n let path = super.toCustomPath();\n if (path) {\n return path;\n }\n path = new CustomPath2D();\n const attribute = this.attribute;\n const segments = attribute.segments;\n\n const parsePoints = (points: IPointLike[]) => {\n if (points && points.length) {\n let isFirst = true;\n const basePoints: IPointLike[] = [];\n points.forEach(point => {\n if (point.defined === false) {\n return;\n }\n if (isFirst) {\n path.moveTo(point.x, point.y);\n } else {\n path.lineTo(point.x, point.y);\n }\n basePoints.push({ x: point.x1 ?? point.x, y: point.y1 ?? point.y });\n\n isFirst = false;\n });\n\n if (basePoints.length) {\n for (let i = basePoints.length - 1; i >= 0; i--) {\n path.lineTo(basePoints[i].x, basePoints[i].y);\n }\n\n path.closePath();\n }\n }\n };\n\n if (attribute.points) {\n parsePoints(attribute.points);\n } else if (segments && segments.length) {\n segments.forEach(seg => {\n parsePoints(seg.points);\n });\n }\n\n return path;\n }\n\n clone() {\n return new Area({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Area.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createArea(attributes: IAreaGraphicAttribute): IArea {\n return new Area(attributes);\n}\n"]}
|
package/es/graphic/bounds.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createGraphic } from "./graphic-creator";
|
|
2
2
|
|
|
3
3
|
let text, richText;
|
|
4
4
|
|
|
5
5
|
export function getTextBounds(params) {
|
|
6
|
-
return text || (text =
|
|
6
|
+
return text || (text = createGraphic("text", {})), text.initAttributes(params),
|
|
7
7
|
text.AABBBounds;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export function getRichTextBounds(params) {
|
|
11
|
-
return richText || (richText =
|
|
11
|
+
return richText || (richText = createGraphic("richtext", {})), richText.setAttributes(params),
|
|
12
12
|
richText.AABBBounds;
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=bounds.js.map
|
package/es/graphic/bounds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/bounds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/graphic/bounds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD,IAAI,IAAS,CAAC;AACd,MAAM,UAAU,aAAa,CAAC,MAAyB;IACrD,IAAI,CAAC,IAAI,EAAE;QACT,IAAI,GAAG,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;KAClC;IACD,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC,UAAU,CAAC;AACzB,CAAC;AAGD,IAAI,QAAa,CAAC;AAClB,MAAM,UAAU,iBAAiB,CAAC,MAA6B;IAC7D,IAAI,CAAC,QAAQ,EAAE;QACb,QAAQ,GAAG,aAAa,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;KAC1C;IACD,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,QAAQ,CAAC,UAAU,CAAC;AAC7B,CAAC","file":"bounds.js","sourcesContent":["import type { IRichTextGraphicAttribute, ITextGraphicAttribute } from '../interface';\nimport { createGraphic } from './graphic-creator';\n// import { createRichText, createText } from './graphic-creator';\n\ntype ITextBoundsParams = Partial<ITextGraphicAttribute>;\nlet text: any;\nexport function getTextBounds(params: ITextBoundsParams) {\n if (!text) {\n text = createGraphic('text', {});\n }\n text.initAttributes(params);\n return text.AABBBounds;\n}\n\ntype IRichTextBoundsParams = Partial<IRichTextGraphicAttribute>;\nlet richText: any;\nexport function getRichTextBounds(params: IRichTextBoundsParams) {\n if (!richText) {\n richText = createGraphic('richtext', {});\n }\n richText.setAttributes(params);\n return richText.AABBBounds;\n}\n"]}
|
package/es/graphic/config.js
CHANGED
|
@@ -161,7 +161,6 @@ export const DefaultAttribute = Object.assign(Object.assign(Object.assign({
|
|
|
161
161
|
shadowPickMode: "graphic",
|
|
162
162
|
keepStrokeScale: !1,
|
|
163
163
|
clipConfig: null,
|
|
164
|
-
pathProxy: null,
|
|
165
164
|
roughStyle: null
|
|
166
165
|
}, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
|
|
167
166
|
|
package/es/graphic/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EA+BL,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,C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,MAAM,CAAC,MAAM,4BAA4B,mCACpC,qBAAqB,KACxB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,CAAC,EAClB,gBAAgB,EAAE,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,QAAQ,EACtB,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EAEN,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,cAAc,EAAE,0BAA0B,EAC1C,qBAAqB,EAAE,CAAC,EACxB,gBAAgB,EAAE,KAAK,EACvB,uBAAuB,EAAE,CAAC,EAC1B,gBAAgB,EAAE,CAAC,EACnB,OAAO,EAAE,CAAC,GACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport {\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type IGraphicAttribute,\n type ICircleGraphicAttribute,\n type IFillStyle,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IStrokeStyle,\n type IGraphicStyle,\n type ISymbolGraphicAttribute,\n type ITextAttribute,\n type ITextGraphicAttribute,\n type IRichTextGraphicAttribute,\n type ITransform,\n type RichTextWordBreak,\n type RichTextVerticalDirection,\n type RichTextGlobalAlignType,\n type RichTextGlobalBaselineType,\n type IRichTextIconGraphicAttribute,\n type IStarGraphicAttribute,\n type IConnectedStyle,\n type ILayout,\n type IDebugType,\n type IPickStyle,\n MeasureModeEnum\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n maxWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined,\n measureMode: MeasureModeEnum.fontBounding,\n keepCenterInLine: false\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n autoAnimateTexture: false,\n textureRatio: 1,\n textureOptions: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n backgroundKeepAspectRatio: false,\n backgroundClip: true,\n backgroundScale: 1,\n backgroundOffsetX: 0,\n backgroundOffsetY: 0,\n backgroundPosition: 'top-left',\n blur: 0,\n filter: '',\n cursor: null,\n html: null,\n react: null,\n vue: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n fillStrokeOrder: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n shadowPickMode: 'graphic',\n keepStrokeScale: false,\n clipConfig: null,\n pathProxy: null,\n roughStyle: null,\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1,\n cornerType: 'round'\n // 默认是0,不需要主题\n // drawMode: 0\n} as any;\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n fillStrokeOrder: 1,\n clipRange: 1,\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultStarAttribute: Required<IStarGraphicAttribute> = {\n ...DefaultAttribute,\n width: 100,\n height: 100,\n spikes: 5,\n thickness: 0.5\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true,\n clipRange: 1\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n upgradeAttrs: null,\n editable: false,\n editOptions: null,\n ascentDescentMode: 'actual',\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n imageMode: undefined,\n image: '',\n width: 0,\n height: 0,\n maxWidth: 500,\n maxHeight: 500,\n imagePosition: 'top-left',\n imageScale: 1,\n imageOffsetX: 0,\n imageOffsetY: 0,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0,\n cornerType: 'round'\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EA+BL,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CA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,EAAE,CAAC,IACZ,gBAAgB,KACnB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,EACf,UAAU,EAAE,OAAO,GACpB,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,mCACpC,qBAAqB,KACxB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,CAAC,EAClB,gBAAgB,EAAE,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,QAAQ,EACtB,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EAEN,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,cAAc,EAAE,0BAA0B,EAC1C,qBAAqB,EAAE,CAAC,EACxB,gBAAgB,EAAE,KAAK,EACvB,uBAAuB,EAAE,CAAC,EAC1B,gBAAgB,EAAE,CAAC,EACnB,OAAO,EAAE,CAAC,GACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport {\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type IGraphicAttribute,\n type ICircleGraphicAttribute,\n type IFillStyle,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IStrokeStyle,\n type IGraphicStyle,\n type ISymbolGraphicAttribute,\n type ITextAttribute,\n type ITextGraphicAttribute,\n type IRichTextGraphicAttribute,\n type ITransform,\n type RichTextWordBreak,\n type RichTextVerticalDirection,\n type RichTextGlobalAlignType,\n type RichTextGlobalBaselineType,\n type IRichTextIconGraphicAttribute,\n type IStarGraphicAttribute,\n type IConnectedStyle,\n type ILayout,\n type IDebugType,\n type IPickStyle,\n MeasureModeEnum\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n maxWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined,\n measureMode: MeasureModeEnum.fontBounding,\n keepCenterInLine: false\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n autoAnimateTexture: false,\n textureRatio: 1,\n textureOptions: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n backgroundKeepAspectRatio: false,\n backgroundClip: true,\n backgroundScale: 1,\n backgroundOffsetX: 0,\n backgroundOffsetY: 0,\n backgroundPosition: 'top-left',\n blur: 0,\n filter: '',\n cursor: null,\n html: null,\n react: null,\n vue: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n fillStrokeOrder: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n shadowPickMode: 'graphic',\n keepStrokeScale: false,\n clipConfig: null,\n roughStyle: null,\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1,\n cornerType: 'round'\n // 默认是0,不需要主题\n // drawMode: 0\n} as any;\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n fillStrokeOrder: 1,\n clipRange: 1,\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultStarAttribute: Required<IStarGraphicAttribute> = {\n ...DefaultAttribute,\n width: 100,\n height: 100,\n spikes: 5,\n thickness: 0.5\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true,\n clipRange: 1\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n upgradeAttrs: null,\n editable: false,\n editOptions: null,\n ascentDescentMode: 'actual',\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n imageMode: undefined,\n image: '',\n width: 0,\n height: 0,\n maxWidth: 500,\n maxHeight: 500,\n imagePosition: 'top-left',\n imageScale: 1,\n imageOffsetX: 0,\n imageOffsetY: 0,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0,\n cornerType: 'round'\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
|
package/es/graphic/glyph.js
CHANGED
|
@@ -93,6 +93,7 @@ export class Glyph extends Graphic {
|
|
|
93
93
|
useStates(states, hasAnimation) {
|
|
94
94
|
var _a;
|
|
95
95
|
if (!states.length) return void this.clearStates(hasAnimation);
|
|
96
|
+
const previousStates = this.currentStates ? this.currentStates.slice() : [];
|
|
96
97
|
if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some(((stateName, index) => this.currentStates[index] !== stateName)))) return;
|
|
97
98
|
this.stopStateAnimates(), this.stateSort && (states = states.sort(this.stateSort));
|
|
98
99
|
const stateAttrs = {}, subAttrs = this.subGraphic.map((() => ({})));
|
|
@@ -102,11 +103,16 @@ export class Glyph extends Graphic {
|
|
|
102
103
|
attrs && (Object.assign(stateAttrs, attrs.attributes), (null === (_a = attrs.subAttributes) || void 0 === _a ? void 0 : _a.length) && subAttrs.forEach(((subAttrs, index) => {
|
|
103
104
|
Object.assign(subAttrs, attrs.subAttributes[index]);
|
|
104
105
|
})));
|
|
105
|
-
})), this.
|
|
106
|
+
})), this.beforeStateUpdate(stateAttrs, previousStates, states, hasAnimation, !1) && (this.updateNormalAttrs(stateAttrs),
|
|
107
|
+
this.currentStates = states, this.applyStateAttrs(stateAttrs, states, hasAnimation));
|
|
106
108
|
}
|
|
107
109
|
clearStates(hasAnimation) {
|
|
108
|
-
this.stopStateAnimates()
|
|
109
|
-
|
|
110
|
+
this.stopStateAnimates();
|
|
111
|
+
const previousStates = this.currentStates ? this.currentStates.slice() : [];
|
|
112
|
+
if (this.hasState() && this.normalAttrs) {
|
|
113
|
+
if (!this.beforeStateUpdate(this.normalAttrs, previousStates, [], hasAnimation, !0)) return;
|
|
114
|
+
this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0);
|
|
115
|
+
} else this.currentStates = [];
|
|
110
116
|
this.normalAttrs = null;
|
|
111
117
|
}
|
|
112
118
|
clone() {
|
package/es/graphic/glyph.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/glyph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AASzD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,OAAO,KAAM,SAAQ,OAA+B;IAsBxD,YAAY,MAAuC;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QAtBhB,SAAI,GAAgB,OAAO,CAAC;QAuB1B,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CA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,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,oBAAoB;QAClB,OAAO,KAAK,CAAC,mBAAmB,CAAC;IACnC,CAAC;;AAjOM,yBAAmB,GAAG,mBAAmB,CAAC;AAoOnD,MAAM,UAAU,WAAW,CAAC,UAAkC;IAC5D,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC","file":"glyph.js","sourcesContent":["import type { AABBBounds, IAABBBounds, IPointLike } from '@visactor/vutils';\nimport { Graphic, NOWORK_ANIMATE_ATTR } from './graphic';\nimport type {\n GraphicType,\n IGraphic,\n IGlyph,\n IGlyphGraphicAttribute,\n IGraphicAttribute,\n ISetAttributeContext\n} from '../interface';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { GLYPH_NUMBER_TYPE } from './constants';\n\nexport class Glyph extends Graphic<IGlyphGraphicAttribute> implements IGlyph {\n type: GraphicType = 'glyph';\n declare _onInit: (g: IGlyph) => void;\n declare _onUpdate: (g: IGlyph) => void;\n declare glyphStates?: Record<\n string,\n {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n }\n >;\n declare glyphStateProxy?: (\n stateName: string,\n targetStates?: string[]\n ) => {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n };\n protected declare subGraphic: IGraphic[];\n\n static NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;\n\n constructor(params: Partial<IGlyphGraphicAttribute>) {\n super(params);\n this.numberType = GLYPH_NUMBER_TYPE;\n this.subGraphic = [];\n this._onInit && this._onInit(this);\n this.valid = this.isValid();\n }\n\n setSubGraphic(subGraphic: IGraphic[]) {\n this.detachSubGraphic();\n this.subGraphic = subGraphic;\n subGraphic.forEach(g => {\n g.glyphHost = this;\n Object.setPrototypeOf(g.attribute, this.attribute);\n });\n this.valid = this.isValid();\n this.addUpdateBoundTag();\n }\n\n protected detachSubGraphic() {\n this.subGraphic.forEach(g => {\n g.glyphHost = null;\n Object.setPrototypeOf(g.attribute, {});\n });\n }\n\n getSubGraphic() {\n return this.subGraphic;\n }\n\n onInit(cb: (g: this) => void): void {\n this._onInit = cb;\n }\n\n onUpdate(cb: (g: this) => void): void {\n this._onUpdate = cb;\n }\n\n isValid(): boolean {\n return true;\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) {\n super.setAttribute(key, value, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n setAttributes(\n params: Partial<IGlyphGraphicAttribute>,\n forceUpdateTag: boolean = false,\n context?: ISetAttributeContext\n ) {\n super.setAttributes(params, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n translate(x: number, y: number) {\n super.translate(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n translateTo(x: number, y: number) {\n super.translateTo(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scale(scaleX: number, scaleY: number, scaleCenter?: IPointLike) {\n super.scale(scaleX, scaleY, scaleCenter);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scaleTo(scaleX: number, scaleY: number) {\n super.scaleTo(scaleX, scaleY);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotate(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotateTo(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n getGraphicTheme(): Required<IGlyphGraphicAttribute> {\n return getTheme(this as IGraphic).glyph;\n }\n\n protected updateAABBBounds(\n attribute: IGlyphGraphicAttribute,\n theme: Required<IGlyphGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n // 添加子节点\n this.getSubGraphic().forEach((node: IGraphic) => {\n aabbBounds.union(node.AABBBounds);\n });\n\n // glyph不需要计算AABBBounds\n // this.transformAABBBounds(attribute, aabbBounds, theme, graphic);\n return aabbBounds;\n }\n\n protected doUpdateAABBBounds(): AABBBounds {\n this.updateAABBBoundsStamp++;\n this._AABBBounds.clear();\n const bounds = this.updateAABBBounds(this.attribute, this.getGraphicTheme(), this._AABBBounds) as AABBBounds;\n this.clearUpdateBoundTag();\n return bounds;\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return false;\n }\n protected needUpdateTag(key: string): boolean {\n return false;\n }\n\n useStates(states: string[], hasAnimation?: boolean): void {\n if (!states.length) {\n this.clearStates(hasAnimation);\n return;\n }\n\n const isChange =\n this.currentStates?.length !== states.length ||\n states.some((stateName, index) => this.currentStates[index] !== stateName);\n if (!isChange) {\n return;\n }\n\n this.stopStateAnimates();\n\n if (this.stateSort) {\n states = states.sort(this.stateSort);\n }\n const stateAttrs = {};\n const subAttrs = this.subGraphic.map(() => ({}));\n states.forEach(stateName => {\n const attrs = this.glyphStateProxy ? this.glyphStateProxy(stateName, states) : this.glyphStates[stateName];\n\n if (attrs) {\n Object.assign(stateAttrs, attrs.attributes);\n\n if (attrs.subAttributes?.length) {\n subAttrs.forEach((subAttrs, index) => {\n Object.assign(subAttrs, attrs.subAttributes[index]);\n });\n }\n }\n });\n\n // this.subGraphic.forEach((graphic, index) => {\n // graphic.updateNormalAttrs(subAttrs[index]);\n // graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);\n // });\n\n this.updateNormalAttrs(stateAttrs);\n this.currentStates = states;\n this.applyStateAttrs(stateAttrs, states, hasAnimation);\n }\n\n clearStates(hasAnimation?: boolean) {\n this.stopStateAnimates();\n if (this.hasState() && this.normalAttrs) {\n this.currentStates = [];\n // this.subGraphic.forEach(graphic => {\n // graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, true);\n // graphic.normalAttrs = null;\n // });\n this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, true);\n } else {\n this.currentStates = [];\n }\n this.normalAttrs = null;\n }\n\n clone(): IGraphic<Partial<IGlyphGraphicAttribute>> {\n const glyph = new Glyph({ ...this.attribute });\n glyph.setSubGraphic(this.subGraphic.map(g => g.clone()));\n return glyph;\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Glyph.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createGlyph(attributes: IGlyphGraphicAttribute): IGlyph {\n return new Glyph(attributes);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/graphic/glyph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AASzD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,OAAO,KAAM,SAAQ,OAA+B;IAsBxD,YAAY,MAAuC;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QAtBhB,SAAI,GAAgB,OAAO,CAAC;QAuB1B,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC9B,CAAC;IAED,aAAa,CAAC,UAAsB;QAClC,IAAI,CAAC,gBAAgB,EAA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,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;SAChF;aAAM;YACL,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;SACzB;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,MAAM,KAAK,GAAG,IAAI,KAAK,mBAAM,IAAI,CAAC,SAAS,EAAG,CAAC;QAC/C,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,oBAAoB;QAClB,OAAO,KAAK,CAAC,mBAAmB,CAAC;IACnC,CAAC;;AA1OM,yBAAmB,GAAG,mBAAmB,CAAC;AA6OnD,MAAM,UAAU,WAAW,CAAC,UAAkC;IAC5D,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC","file":"glyph.js","sourcesContent":["import type { AABBBounds, IAABBBounds, IPointLike } from '@visactor/vutils';\nimport { Graphic, NOWORK_ANIMATE_ATTR } from './graphic';\nimport type {\n GraphicType,\n IGraphic,\n IGlyph,\n IGlyphGraphicAttribute,\n IGraphicAttribute,\n ISetAttributeContext\n} from '../interface';\nimport { getTheme } from './theme';\nimport { GLYPH_NUMBER_TYPE } from './constants';\n\nexport class Glyph extends Graphic<IGlyphGraphicAttribute> implements IGlyph {\n type: GraphicType = 'glyph';\n declare _onInit: (g: IGlyph) => void;\n declare _onUpdate: (g: IGlyph) => void;\n declare glyphStates?: Record<\n string,\n {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n }\n >;\n declare glyphStateProxy?: (\n stateName: string,\n targetStates?: string[]\n ) => {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n };\n protected declare subGraphic: IGraphic[];\n\n static NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;\n\n constructor(params: Partial<IGlyphGraphicAttribute>) {\n super(params);\n this.numberType = GLYPH_NUMBER_TYPE;\n this.subGraphic = [];\n this._onInit && this._onInit(this);\n this.valid = this.isValid();\n }\n\n setSubGraphic(subGraphic: IGraphic[]) {\n this.detachSubGraphic();\n this.subGraphic = subGraphic;\n subGraphic.forEach(g => {\n g.glyphHost = this;\n Object.setPrototypeOf(g.attribute, this.attribute);\n });\n this.valid = this.isValid();\n this.addUpdateBoundTag();\n }\n\n protected detachSubGraphic() {\n this.subGraphic.forEach(g => {\n g.glyphHost = null;\n Object.setPrototypeOf(g.attribute, {});\n });\n }\n\n getSubGraphic() {\n return this.subGraphic;\n }\n\n onInit(cb: (g: this) => void): void {\n this._onInit = cb;\n }\n\n onUpdate(cb: (g: this) => void): void {\n this._onUpdate = cb;\n }\n\n isValid(): boolean {\n return true;\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) {\n super.setAttribute(key, value, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n setAttributes(\n params: Partial<IGlyphGraphicAttribute>,\n forceUpdateTag: boolean = false,\n context?: ISetAttributeContext\n ) {\n super.setAttributes(params, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n translate(x: number, y: number) {\n super.translate(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n translateTo(x: number, y: number) {\n super.translateTo(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scale(scaleX: number, scaleY: number, scaleCenter?: IPointLike) {\n super.scale(scaleX, scaleY, scaleCenter);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scaleTo(scaleX: number, scaleY: number) {\n super.scaleTo(scaleX, scaleY);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotate(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotateTo(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n getGraphicTheme(): Required<IGlyphGraphicAttribute> {\n return getTheme(this as IGraphic).glyph;\n }\n\n protected updateAABBBounds(\n attribute: IGlyphGraphicAttribute,\n theme: Required<IGlyphGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n // 添加子节点\n this.getSubGraphic().forEach((node: IGraphic) => {\n aabbBounds.union(node.AABBBounds);\n });\n\n // glyph不需要计算AABBBounds\n // this.transformAABBBounds(attribute, aabbBounds, theme, graphic);\n return aabbBounds;\n }\n\n protected doUpdateAABBBounds(): AABBBounds {\n this.updateAABBBoundsStamp++;\n this._AABBBounds.clear();\n const bounds = this.updateAABBBounds(this.attribute, this.getGraphicTheme(), this._AABBBounds) as AABBBounds;\n this.clearUpdateBoundTag();\n return bounds;\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return false;\n }\n protected needUpdateTag(key: string): boolean {\n return false;\n }\n\n useStates(states: string[], hasAnimation?: boolean): void {\n if (!states.length) {\n this.clearStates(hasAnimation);\n return;\n }\n const previousStates = this.currentStates ? this.currentStates.slice() : [];\n\n const isChange =\n this.currentStates?.length !== states.length ||\n states.some((stateName, index) => this.currentStates[index] !== stateName);\n if (!isChange) {\n return;\n }\n\n this.stopStateAnimates();\n\n if (this.stateSort) {\n states = states.sort(this.stateSort);\n }\n const stateAttrs = {};\n const subAttrs = this.subGraphic.map(() => ({}));\n states.forEach(stateName => {\n const attrs = this.glyphStateProxy ? this.glyphStateProxy(stateName, states) : this.glyphStates[stateName];\n\n if (attrs) {\n Object.assign(stateAttrs, attrs.attributes);\n\n if (attrs.subAttributes?.length) {\n subAttrs.forEach((subAttrs, index) => {\n Object.assign(subAttrs, attrs.subAttributes[index]);\n });\n }\n }\n });\n\n // this.subGraphic.forEach((graphic, index) => {\n // graphic.updateNormalAttrs(subAttrs[index]);\n // graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);\n // });\n\n if (!this.beforeStateUpdate(stateAttrs, previousStates, states, hasAnimation, false)) {\n return;\n }\n\n this.updateNormalAttrs(stateAttrs);\n this.currentStates = states;\n this.applyStateAttrs(stateAttrs, states, hasAnimation);\n }\n\n clearStates(hasAnimation?: boolean) {\n this.stopStateAnimates();\n const previousStates = this.currentStates ? this.currentStates.slice() : [];\n if (this.hasState() && this.normalAttrs) {\n if (!this.beforeStateUpdate(this.normalAttrs, previousStates, [], hasAnimation, true)) {\n return;\n }\n this.currentStates = [];\n // this.subGraphic.forEach(graphic => {\n // graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, true);\n // graphic.normalAttrs = null;\n // });\n this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, true);\n } else {\n this.currentStates = [];\n }\n this.normalAttrs = null;\n }\n\n clone(): IGraphic<Partial<IGlyphGraphicAttribute>> {\n const glyph = new Glyph({ ...this.attribute });\n glyph.setSubGraphic(this.subGraphic.map(g => g.clone()));\n return glyph;\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Glyph.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createGlyph(attributes: IGlyphGraphicAttribute): IGlyph {\n return new Glyph(attributes);\n}\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { IArc, IArcGraphicAttribute, IArea, IAreaGraphicAttribute, ICircle, ICircleGraphicAttribute, IGroup, IGroupGraphicAttribute, IImage, IImageGraphicAttribute, ILine, ILineGraphicAttribute, IPath, IPathGraphicAttribute, IPolygon, IPolygonGraphicAttribute, IRect, IRect3d, IRect3dGraphicAttribute, IRectGraphicAttribute, IRichText, IRichTextGraphicAttribute, IShadowRoot, ISymbol, ISymbolGraphicAttribute, IText, ITextGraphicAttribute, IWrapTextGraphicAttribute } from '../interface';
|
|
2
|
+
import type { IGraphic } from '../interface/graphic';
|
|
3
|
+
export type IGraphicCreateCallback<TGraphic extends IGraphic = IGraphic, TAttributes = any> = (attributes: TAttributes) => TGraphic;
|
|
2
4
|
declare class GraphicCreator {
|
|
3
|
-
store: Map<string,
|
|
5
|
+
store: Map<string, IGraphicCreateCallback>;
|
|
4
6
|
arc?: (attribute: IArcGraphicAttribute) => IArc;
|
|
5
7
|
area?: (attribute: IAreaGraphicAttribute) => IArea;
|
|
6
8
|
circle?: (attribute: ICircleGraphicAttribute) => ICircle;
|
|
@@ -15,10 +17,13 @@ declare class GraphicCreator {
|
|
|
15
17
|
richtext?: (attribute: IRichTextGraphicAttribute) => IRichText;
|
|
16
18
|
polygon?: (attribute: IPolygonGraphicAttribute) => IPolygon;
|
|
17
19
|
shadowRoot?: (attribute: IGroupGraphicAttribute) => IShadowRoot;
|
|
18
|
-
|
|
20
|
+
wrapText?: (attribute: IWrapTextGraphicAttribute) => IText;
|
|
19
21
|
constructor();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
registerStore(name: string, creator: IGraphicCreateCallback): void;
|
|
23
|
+
RegisterGraphicCreator(name: string, creator: IGraphicCreateCallback): void;
|
|
24
|
+
CreateGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(name: string, attributes: TAttributes): TGraphic | null;
|
|
22
25
|
}
|
|
23
26
|
export declare const graphicCreator: GraphicCreator;
|
|
27
|
+
export declare function registerGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(name: string, creator: IGraphicCreateCallback<TGraphic, TAttributes>): void;
|
|
28
|
+
export declare function createGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(name: string, attributes: TAttributes): TGraphic;
|
|
24
29
|
export {};
|
|
@@ -1,15 +1,42 @@
|
|
|
1
|
+
import { GraphicFactory } from "../factory/graphic-factory";
|
|
2
|
+
|
|
3
|
+
function createGraphicCtor(creator) {
|
|
4
|
+
return class {
|
|
5
|
+
constructor(attributes) {
|
|
6
|
+
try {
|
|
7
|
+
return new creator(attributes);
|
|
8
|
+
} catch (error) {
|
|
9
|
+
return creator(attributes);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const sharedGraphicFactory = new GraphicFactory;
|
|
16
|
+
|
|
1
17
|
class GraphicCreator {
|
|
2
18
|
constructor() {
|
|
3
19
|
this.store = new Map;
|
|
4
20
|
}
|
|
5
|
-
|
|
6
|
-
this.store.set(name,
|
|
21
|
+
registerStore(name, creator) {
|
|
22
|
+
this.store.set(name, creator), this[name] = creator;
|
|
23
|
+
}
|
|
24
|
+
RegisterGraphicCreator(name, creator) {
|
|
25
|
+
registerGraphic(name, creator);
|
|
7
26
|
}
|
|
8
|
-
CreateGraphic(name,
|
|
9
|
-
|
|
10
|
-
return cb ? cb(params) : null;
|
|
27
|
+
CreateGraphic(name, attributes) {
|
|
28
|
+
return this.store.has(name) ? createGraphic(name, attributes) : null;
|
|
11
29
|
}
|
|
12
30
|
}
|
|
13
31
|
|
|
14
32
|
export const graphicCreator = new GraphicCreator;
|
|
33
|
+
|
|
34
|
+
export function registerGraphic(name, creator) {
|
|
35
|
+
if (!name) throw new Error("Graphic registration requires a non-empty graphic type");
|
|
36
|
+
graphicCreator.registerStore(name, creator), sharedGraphicFactory.register(name, createGraphicCtor(creator));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function createGraphic(name, attributes) {
|
|
40
|
+
return sharedGraphicFactory.create(name, attributes);
|
|
41
|
+
}
|
|
15
42
|
//# sourceMappingURL=graphic-creator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/graphic-creator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/graphic/graphic-creator.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAO5D,SAAS,iBAAiB,CACxB,OAAsD;IAEtD,OAAO,MAAM,qBAAqB;QAChC,YAAY,UAAuB;YACjC,IAAI;gBACF,OAAO,IAAK,OAAe,CAAC,UAAU,CAAC,CAAC;aACzC;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC;aAC5B;QACH,CAAC;KACK,CAAC;AACX,CAAC;AAED,MAAM,oBAAoB,GAAG,IAAI,cAAc,EAAE,CAAC;AAElD,MAAM,cAAc;IAkBlB;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,aAAa,CAAC,IAAY,EAAE,OAA+B;QACzD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7B,IAAY,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAChC,CAAC;IAED,sBAAsB,CAAC,IAAY,EAAE,OAA+B;QAClE,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IAED,aAAa,CACX,IAAY,EACZ,UAAuB;QAEvB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACzB,OAAO,IAAI,CAAC;SACb;QAED,OAAO,aAAa,CAAwB,IAAI,EAAE,UAAU,CAAC,CAAC;IAChE,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AAEnD,MAAM,UAAU,eAAe,CAC7B,IAAY,EACZ,OAAsD;IAEtD,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;KAC3E;IAED,cAAc,CAAC,aAAa,CAAC,IAAI,EAAE,OAAiC,CAAC,CAAC;IACtE,oBAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,IAAY,EACZ,UAAuB;IAEvB,OAAO,oBAAoB,CAAC,MAAM,CAAwB,IAAI,EAAE,UAAU,CAAC,CAAC;AAC9E,CAAC","file":"graphic-creator.js","sourcesContent":["import type {\n IArc,\n IArcGraphicAttribute,\n IArea,\n IAreaGraphicAttribute,\n ICircle,\n ICircleGraphicAttribute,\n IGroup,\n IGroupGraphicAttribute,\n IImage,\n IImageGraphicAttribute,\n ILine,\n ILineGraphicAttribute,\n IPath,\n IPathGraphicAttribute,\n IPolygon,\n IPolygonGraphicAttribute,\n IRect,\n IRect3d,\n IRect3dGraphicAttribute,\n IRectGraphicAttribute,\n IRichText,\n IRichTextGraphicAttribute,\n IShadowRoot,\n ISymbol,\n ISymbolGraphicAttribute,\n IText,\n ITextGraphicAttribute,\n IWrapTextGraphicAttribute\n} from '../interface';\nimport { GraphicFactory } from '../factory/graphic-factory';\nimport type { IGraphic } from '../interface/graphic';\n\nexport type IGraphicCreateCallback<TGraphic extends IGraphic = IGraphic, TAttributes = any> = (\n attributes: TAttributes\n) => TGraphic;\n\nfunction createGraphicCtor<TGraphic extends IGraphic = IGraphic, TAttributes = any>(\n creator: IGraphicCreateCallback<TGraphic, TAttributes>\n) {\n return class RegisteredGraphicCtor {\n constructor(attributes: TAttributes) {\n try {\n return new (creator as any)(attributes);\n } catch (error) {\n return creator(attributes);\n }\n }\n } as any;\n}\n\nconst sharedGraphicFactory = new GraphicFactory();\n\nclass GraphicCreator {\n declare store: Map<string, IGraphicCreateCallback>;\n declare arc?: (attribute: IArcGraphicAttribute) => IArc;\n declare area?: (attribute: IAreaGraphicAttribute) => IArea;\n declare circle?: (attribute: ICircleGraphicAttribute) => ICircle;\n declare group?: (attribute: IGroupGraphicAttribute) => IGroup;\n declare image?: (attribute: IImageGraphicAttribute) => IImage;\n declare line?: (attribute: ILineGraphicAttribute) => ILine;\n declare path?: (attribute: IPathGraphicAttribute) => IPath;\n declare rect?: (attribute: IRectGraphicAttribute) => IRect;\n declare rect3d?: (attribute: IRect3dGraphicAttribute) => IRect3d;\n declare symbol?: (attribute: ISymbolGraphicAttribute) => ISymbol;\n declare text?: (attribute: ITextGraphicAttribute) => IText;\n declare richtext?: (attribute: IRichTextGraphicAttribute) => IRichText;\n declare polygon?: (attribute: IPolygonGraphicAttribute) => IPolygon;\n declare shadowRoot?: (attribute: IGroupGraphicAttribute) => IShadowRoot;\n declare wrapText?: (attribute: IWrapTextGraphicAttribute) => IText;\n\n constructor() {\n this.store = new Map();\n }\n\n registerStore(name: string, creator: IGraphicCreateCallback) {\n this.store.set(name, creator);\n (this as any)[name] = creator;\n }\n\n RegisterGraphicCreator(name: string, creator: IGraphicCreateCallback) {\n registerGraphic(name, creator);\n }\n\n CreateGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(\n name: string,\n attributes: TAttributes\n ): TGraphic | null {\n if (!this.store.has(name)) {\n return null;\n }\n\n return createGraphic<TGraphic, TAttributes>(name, attributes);\n }\n}\n\nexport const graphicCreator = new GraphicCreator();\n\nexport function registerGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(\n name: string,\n creator: IGraphicCreateCallback<TGraphic, TAttributes>\n) {\n if (!name) {\n throw new Error('Graphic registration requires a non-empty graphic type');\n }\n\n graphicCreator.registerStore(name, creator as IGraphicCreateCallback);\n sharedGraphicFactory.register(name, createGraphicCtor(creator));\n}\n\nexport function createGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(\n name: string,\n attributes: TAttributes\n): TGraphic {\n return sharedGraphicFactory.create<TGraphic, TAttributes>(name, attributes);\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare function bindGraphicModules({ bind }: {
|
|
2
|
+
bind: any;
|
|
3
|
+
}): void;
|
|
4
|
+
export default bindGraphicModules;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ContainerModule } from "../../common/inversify-lite";
|
|
2
|
-
|
|
3
1
|
import { DefaultGraphicService } from "./graphic-service";
|
|
4
2
|
|
|
5
3
|
import { GraphicCreator, GraphicService } from "../constants";
|
|
6
4
|
|
|
7
5
|
import { graphicCreator } from "../graphic-creator";
|
|
8
6
|
|
|
9
|
-
export
|
|
7
|
+
export function bindGraphicModules({bind: bind}) {
|
|
10
8
|
bind(GraphicService).to(DefaultGraphicService), bind(GraphicCreator).toConstantValue(graphicCreator);
|
|
11
|
-
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default bindGraphicModules;
|
|
12
12
|
//# sourceMappingURL=graphic-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/graphic-service/graphic-module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/graphic/graphic-service/graphic-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,MAAM,UAAU,kBAAkB,CAAC,EAAE,IAAI,EAAiB;IACxD,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC;IAE/C,IAAI,CAAC,cAAc,CAAC,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;AACvD,CAAC;AAED,eAAe,kBAAkB,CAAC","file":"graphic-module.js","sourcesContent":["// import { DefaultTheme } from './default-theme';\nimport { DefaultGraphicService } from './graphic-service';\nimport { GraphicCreator, GraphicService } from '../constants';\nimport { graphicCreator } from '../graphic-creator';\n// import { DefaultThemeService, Theme, ThemeServce } from './theme-service';\n\nexport function bindGraphicModules({ bind }: { bind: any }) {\n bind(GraphicService).to(DefaultGraphicService);\n\n bind(GraphicCreator).toConstantValue(graphicCreator);\n}\n\nexport default bindGraphicModules;\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { AABBBounds } from '@visactor/vutils';
|
|
1
|
+
import { AABBBounds, type IAABBBounds } from '@visactor/vutils';
|
|
3
2
|
import type { mat4, IGraphicAttribute, IGraphic, IGroup, IStage, IText, ITextGraphicAttribute, ITransform, IGraphicService, IGraphicCreator, ISyncHook } from '../../interface';
|
|
4
3
|
export declare function getExtraModelMatrix(dx: number, dy: number, graphic: IGraphic): mat4 | null;
|
|
5
4
|
export declare function getModelMatrix(out: mat4, graphic: IGraphic, theme: ITransform): void;
|
|
@@ -21,7 +20,7 @@ export declare class DefaultGraphicService implements IGraphicService {
|
|
|
21
20
|
};
|
|
22
21
|
protected tempAABBBounds1: AABBBounds;
|
|
23
22
|
protected tempAABBBounds2: AABBBounds;
|
|
24
|
-
constructor(creator
|
|
23
|
+
constructor(creator?: IGraphicCreator);
|
|
25
24
|
onAttributeUpdate(graphic: IGraphic): void;
|
|
26
25
|
onSetStage(graphic: IGraphic, stage: IStage): void;
|
|
27
26
|
onRemove(graphic: IGraphic<Partial<IGraphicAttribute>>): void;
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
2
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
3
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
4
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5
|
-
}, __metadata = this && this.__metadata || function(k, v) {
|
|
6
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
7
|
-
}, __param = this && this.__param || function(paramIndex, decorator) {
|
|
8
|
-
return function(target, key) {
|
|
9
|
-
decorator(target, key, paramIndex);
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
import { inject, injectable } from "../../common/inversify-lite";
|
|
14
|
-
|
|
15
1
|
import { AABBBounds, isNumber, transformBoundsWithMatrix } from "@visactor/vutils";
|
|
16
2
|
|
|
17
3
|
import { SyncHook } from "../../tapable";
|
|
@@ -26,10 +12,10 @@ import { BoundsContext } from "../../common/bounds-context";
|
|
|
26
12
|
|
|
27
13
|
import { renderCommandList } from "../../common/render-command-list";
|
|
28
14
|
|
|
29
|
-
import { GraphicCreator } from "../constants";
|
|
30
|
-
|
|
31
15
|
import { identityMat4, multiplyMat4Mat4, rotateX, rotateY, rotateZ, scaleMat4, translate } from "../../common/matrix";
|
|
32
16
|
|
|
17
|
+
import { graphicCreator } from "../graphic-creator";
|
|
18
|
+
|
|
33
19
|
export function getExtraModelMatrix(dx, dy, graphic) {
|
|
34
20
|
const {alpha: alpha, beta: beta} = graphic.attribute;
|
|
35
21
|
if (!alpha && !beta) return null;
|
|
@@ -93,8 +79,8 @@ export function shouldUseMat4(graphic) {
|
|
|
93
79
|
return alpha || beta;
|
|
94
80
|
}
|
|
95
81
|
|
|
96
|
-
|
|
97
|
-
constructor(creator) {
|
|
82
|
+
export class DefaultGraphicService {
|
|
83
|
+
constructor(creator = graphicCreator) {
|
|
98
84
|
this.creator = creator, this.hooks = {
|
|
99
85
|
onAttributeUpdate: new SyncHook([ "graphic" ]),
|
|
100
86
|
onSetStage: new SyncHook([ "graphic", "stage" ]),
|
|
@@ -135,8 +121,7 @@ let DefaultGraphicService = class {
|
|
|
135
121
|
this.hooks.clearAABBBounds.taps.length && this.hooks.clearAABBBounds.call(graphic, stage, b);
|
|
136
122
|
}
|
|
137
123
|
updatePathProxyAABBBounds(aabbBounds, graphic) {
|
|
138
|
-
|
|
139
|
-
const path = null === (_a = null == graphic ? void 0 : graphic.getPathProxy) || void 0 === _a ? void 0 : _a.call(graphic);
|
|
124
|
+
const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
|
|
140
125
|
if (!path) return !1;
|
|
141
126
|
const boundsContext = new BoundsContext(aabbBounds);
|
|
142
127
|
return renderCommandList(path.commandList, boundsContext, 0, 0), !0;
|
|
@@ -194,9 +179,5 @@ let DefaultGraphicService = class {
|
|
|
194
179
|
tb2: tb2
|
|
195
180
|
};
|
|
196
181
|
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
DefaultGraphicService = __decorate([ injectable(), __param(0, inject(GraphicCreator)), __metadata("design:paramtypes", [ Object ]) ], DefaultGraphicService);
|
|
200
|
-
|
|
201
|
-
export { DefaultGraphicService };
|
|
182
|
+
}
|
|
202
183
|
//# sourceMappingURL=graphic-service.js.map
|