@visactor/vrender-core 1.1.3-alpha.5 → 1.1.4-alpha.0

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.
Files changed (126) hide show
  1. package/cjs/allocator/bounds-allocate.js +1 -2
  2. package/cjs/allocator/canvas-allocate.js +2 -1
  3. package/cjs/application-state.d.ts +27 -0
  4. package/cjs/application-state.js +22 -0
  5. package/cjs/application-state.js.map +1 -0
  6. package/cjs/application.d.ts +2 -22
  7. package/cjs/application.js +24 -3
  8. package/cjs/application.js.map +1 -1
  9. package/cjs/common/bounds-context.js +1 -2
  10. package/cjs/common/contribution-provider.d.ts +2 -1
  11. package/cjs/common/contribution-provider.js +19 -2
  12. package/cjs/common/contribution-provider.js.map +1 -1
  13. package/cjs/common/contribution-store-state.d.ts +6 -0
  14. package/cjs/common/contribution-store-state.js +20 -0
  15. package/cjs/common/contribution-store-state.js.map +1 -0
  16. package/cjs/common/event-listener-manager.js +2 -1
  17. package/cjs/common/performance-raf.js +1 -2
  18. package/cjs/common/polygon.js +2 -2
  19. package/cjs/common/rect-utils.js +1 -1
  20. package/cjs/common/render-area.js +1 -1
  21. package/cjs/common/render-command-list.js +1 -1
  22. package/cjs/common/render-curve.js +1 -1
  23. package/cjs/common/render-utils.js +1 -1
  24. package/cjs/common/seg-context.js +1 -1
  25. package/cjs/core/camera.js +1 -1
  26. package/cjs/core/constants.js +1 -1
  27. package/cjs/core/core-modules.js +1 -1
  28. package/cjs/core/global.js +1 -1
  29. package/cjs/core/graphic-utils.js +2 -1
  30. package/cjs/core/index.js +1 -1
  31. package/cjs/core/layer-service.js +1 -1
  32. package/cjs/core/layer.js +1 -1
  33. package/cjs/core/light.js +1 -1
  34. package/cjs/core/stage.js +1 -1
  35. package/cjs/core/window.js +1 -1
  36. package/cjs/entries/runtime-installer-state.d.ts +12 -0
  37. package/cjs/entries/runtime-installer-state.js +27 -0
  38. package/cjs/entries/runtime-installer-state.js.map +1 -0
  39. package/cjs/entries/runtime-installer.d.ts +3 -1
  40. package/cjs/entries/runtime-installer.js +23 -13
  41. package/cjs/entries/runtime-installer.js.map +1 -1
  42. package/cjs/factory-state.d.ts +5 -0
  43. package/cjs/factory-state.js +19 -0
  44. package/cjs/factory-state.js.map +1 -0
  45. package/cjs/factory.d.ts +2 -0
  46. package/cjs/factory.js +18 -2
  47. package/cjs/factory.js.map +1 -1
  48. package/cjs/graphic/graphic-creator.d.ts +2 -29
  49. package/cjs/graphic/graphic-creator.js +24 -38
  50. package/cjs/graphic/graphic-creator.js.map +1 -1
  51. package/cjs/graphic/graphic-registry.d.ts +36 -0
  52. package/cjs/graphic/graphic-registry.js +65 -0
  53. package/cjs/graphic/graphic-registry.js.map +1 -0
  54. package/cjs/graphic/index.d.ts +2 -0
  55. package/cjs/graphic/index.js +29 -16
  56. package/cjs/graphic/index.js.map +1 -1
  57. package/cjs/legacy/bootstrap-state.d.ts +7 -0
  58. package/cjs/legacy/bootstrap-state.js +24 -0
  59. package/cjs/legacy/bootstrap-state.js.map +1 -0
  60. package/cjs/legacy/bootstrap.d.ts +3 -4
  61. package/cjs/legacy/bootstrap.js +20 -7
  62. package/cjs/legacy/bootstrap.js.map +1 -1
  63. package/dist/index.es.js +110 -22
  64. package/es/allocator/bounds-allocate.js +1 -2
  65. package/es/allocator/canvas-allocate.js +2 -1
  66. package/es/application-state.d.ts +27 -0
  67. package/es/application-state.js +17 -0
  68. package/es/application-state.js.map +1 -0
  69. package/es/application.d.ts +2 -22
  70. package/es/application.js +2 -3
  71. package/es/application.js.map +1 -1
  72. package/es/common/bounds-context.js +1 -2
  73. package/es/common/contribution-provider.d.ts +2 -1
  74. package/es/common/contribution-provider.js +5 -1
  75. package/es/common/contribution-provider.js.map +1 -1
  76. package/es/common/contribution-store-state.d.ts +6 -0
  77. package/es/common/contribution-store-state.js +14 -0
  78. package/es/common/contribution-store-state.js.map +1 -0
  79. package/es/common/event-listener-manager.js +2 -1
  80. package/es/common/performance-raf.js +1 -2
  81. package/es/common/polygon.js +1 -1
  82. package/es/common/rect-utils.js +1 -1
  83. package/es/common/render-area.js +1 -1
  84. package/es/common/render-command-list.js +1 -1
  85. package/es/common/render-curve.js +1 -1
  86. package/es/common/render-utils.js +1 -1
  87. package/es/common/seg-context.js +1 -1
  88. package/es/core/camera.js +1 -1
  89. package/es/core/constants.js +1 -1
  90. package/es/core/core-modules.js +1 -1
  91. package/es/core/global.js +1 -1
  92. package/es/core/graphic-utils.js +2 -1
  93. package/es/core/index.js +1 -1
  94. package/es/core/layer-service.js +1 -1
  95. package/es/core/layer.js +1 -1
  96. package/es/core/light.js +1 -1
  97. package/es/core/stage.js +1 -1
  98. package/es/core/window.js +1 -1
  99. package/es/entries/runtime-installer-state.d.ts +12 -0
  100. package/es/entries/runtime-installer-state.js +20 -0
  101. package/es/entries/runtime-installer-state.js.map +1 -0
  102. package/es/entries/runtime-installer.d.ts +3 -1
  103. package/es/entries/runtime-installer.js +8 -9
  104. package/es/entries/runtime-installer.js.map +1 -1
  105. package/es/factory-state.d.ts +5 -0
  106. package/es/factory-state.js +14 -0
  107. package/es/factory-state.js.map +1 -0
  108. package/es/factory.d.ts +2 -0
  109. package/es/factory.js +5 -1
  110. package/es/factory.js.map +1 -1
  111. package/es/graphic/graphic-creator.d.ts +2 -29
  112. package/es/graphic/graphic-creator.js +1 -41
  113. package/es/graphic/graphic-creator.js.map +1 -1
  114. package/es/graphic/graphic-registry.d.ts +36 -0
  115. package/es/graphic/graphic-registry.js +57 -0
  116. package/es/graphic/graphic-registry.js.map +1 -0
  117. package/es/graphic/index.d.ts +2 -0
  118. package/es/graphic/index.js +2 -0
  119. package/es/graphic/index.js.map +1 -1
  120. package/es/legacy/bootstrap-state.d.ts +7 -0
  121. package/es/legacy/bootstrap-state.js +17 -0
  122. package/es/legacy/bootstrap-state.js.map +1 -0
  123. package/es/legacy/bootstrap.d.ts +3 -4
  124. package/es/legacy/bootstrap.js +5 -5
  125. package/es/legacy/bootstrap.js.map +1 -1
  126. package/package.json +9 -1
@@ -8,10 +8,10 @@ var __importDefault = this && this.__importDefault || function(mod) {
8
8
 
9
9
  Object.defineProperty(exports, "__esModule", {
10
10
  value: !0
11
- }), exports.createLegacySingletonProxy = exports.resolveLegacyNamed = exports.resolveLegacySingleton = exports.getLegacyBindingContext = exports.preLoadAllModule = void 0;
11
+ }), exports.createLegacySingletonProxy = exports.resolveLegacyNamed = exports.getLegacyBootstrapState = exports.LEGACY_BOOTSTRAP_STATE_SYMBOL = exports.resolveLegacySingleton = exports.getLegacyBindingContext = exports.preLoadAllModule = void 0;
12
12
 
13
- const core_modules_1 = __importDefault(require("../core/core-modules")), render_modules_1 = __importDefault(require("../render/render-modules")), pick_modules_1 = __importDefault(require("../picker/pick-modules")), graphic_module_1 = __importDefault(require("../graphic/graphic-service/graphic-module")), plugin_modules_1 = __importDefault(require("../plugins/plugin-modules")), modules_1 = __importDefault(require("../core/contributions/modules")), modules_2 = __importDefault(require("../render/contributions/modules")), binding_context_1 = require("./binding-context"), legacyBindingContext = (0,
14
- binding_context_1.createLegacyBindingContext)();
13
+ const core_modules_1 = __importDefault(require("../core/core-modules")), render_modules_1 = __importDefault(require("../render/render-modules")), pick_modules_1 = __importDefault(require("../picker/pick-modules")), graphic_module_1 = __importDefault(require("../graphic/graphic-service/graphic-module")), plugin_modules_1 = __importDefault(require("../plugins/plugin-modules")), modules_1 = __importDefault(require("../core/contributions/modules")), modules_2 = __importDefault(require("../render/contributions/modules")), bootstrap_state_1 = require("./bootstrap-state"), legacyBootstrapState = (0,
14
+ bootstrap_state_1.getLegacyBootstrapState)(), legacyBindingContext = legacyBootstrapState.legacyBindingContext;
15
15
 
16
16
  function getLegacyTarget(resolver) {
17
17
  let target;
@@ -19,7 +19,7 @@ function getLegacyTarget(resolver) {
19
19
  }
20
20
 
21
21
  function preLoadAllModule() {
22
- preLoadAllModule.__loaded || (preLoadAllModule.__loaded = !0, (0, core_modules_1.default)({
22
+ legacyBootstrapState.preloaded || (legacyBootstrapState.preloaded = !0, (0, core_modules_1.default)({
23
23
  bind: legacyBindingContext.bind
24
24
  }), (0, graphic_module_1.default)({
25
25
  bind: legacyBindingContext.bind
@@ -43,6 +43,11 @@ function resolveLegacySingleton(serviceIdentifier) {
43
43
  return instance;
44
44
  }
45
45
 
46
+ exports.preLoadAllModule = preLoadAllModule, exports.getLegacyBindingContext = getLegacyBindingContext,
47
+ exports.resolveLegacySingleton = resolveLegacySingleton;
48
+
49
+ var bootstrap_state_2 = require("./bootstrap-state");
50
+
46
51
  function resolveLegacyNamed(serviceIdentifier, name) {
47
52
  return preLoadAllModule(), legacyBindingContext.getNamed(serviceIdentifier, name);
48
53
  }
@@ -66,7 +71,15 @@ function createLegacySingletonProxy(resolver) {
66
71
  });
67
72
  }
68
73
 
69
- exports.preLoadAllModule = preLoadAllModule, preLoadAllModule.__loaded = !1, exports.getLegacyBindingContext = getLegacyBindingContext,
70
- exports.resolveLegacySingleton = resolveLegacySingleton, exports.resolveLegacyNamed = resolveLegacyNamed,
71
- exports.createLegacySingletonProxy = createLegacySingletonProxy;
74
+ Object.defineProperty(exports, "LEGACY_BOOTSTRAP_STATE_SYMBOL", {
75
+ enumerable: !0,
76
+ get: function() {
77
+ return bootstrap_state_2.LEGACY_BOOTSTRAP_STATE_SYMBOL;
78
+ }
79
+ }), Object.defineProperty(exports, "getLegacyBootstrapState", {
80
+ enumerable: !0,
81
+ get: function() {
82
+ return bootstrap_state_2.getLegacyBootstrapState;
83
+ }
84
+ }), exports.resolveLegacyNamed = resolveLegacyNamed, exports.createLegacySingletonProxy = createLegacySingletonProxy;
72
85
  //# sourceMappingURL=bootstrap.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/legacy/bootstrap.ts"],"names":[],"mappings":"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","file":"bootstrap.js","sourcesContent":["import coreModule from '../core/core-modules';\nimport renderModule from '../render/render-modules';\nimport pickModule from '../picker/pick-modules';\nimport graphicModule from '../graphic/graphic-service/graphic-module';\nimport pluginModule from '../plugins/plugin-modules';\nimport loadBuiltinContributions from '../core/contributions/modules';\nimport loadRenderContributions from '../render/contributions/modules';\nimport { createLegacyBindingContext, type ILegacyBindContext, type ILegacyBindingContext } from './binding-context';\n\nexport type { ILegacyBindContext, ILegacyBindingContext } from './binding-context';\n\nconst legacyBindingContext = createLegacyBindingContext();\n\nfunction getLegacyTarget<T>(resolver: () => T): () => T {\n let target: T | undefined;\n\n return () => {\n if (target === undefined) {\n target = resolver();\n }\n\n return target;\n };\n}\n\nexport function preLoadAllModule() {\n if (preLoadAllModule.__loaded) {\n return;\n }\n preLoadAllModule.__loaded = true;\n coreModule({ bind: legacyBindingContext.bind });\n graphicModule({ bind: legacyBindingContext.bind });\n renderModule({ bind: legacyBindingContext.bind });\n pickModule({ bind: legacyBindingContext.bind, isBound: legacyBindingContext.isBound });\n pluginModule({ bind: legacyBindingContext.bind });\n loadBuiltinContributions(legacyBindingContext);\n loadRenderContributions(legacyBindingContext);\n}\n\npreLoadAllModule.__loaded = false;\n\nexport function getLegacyBindingContext(): ILegacyBindingContext {\n return legacyBindingContext;\n}\n\nexport function resolveLegacySingleton<T>(serviceIdentifier: any): T {\n preLoadAllModule();\n const [instance] = legacyBindingContext.getAll<T>(serviceIdentifier);\n return instance;\n}\n\nexport function resolveLegacyNamed<T>(serviceIdentifier: any, name: string): T | undefined {\n preLoadAllModule();\n return legacyBindingContext.getNamed<T>(serviceIdentifier, name);\n}\n\nexport function createLegacySingletonProxy<T extends object>(resolver: () => T): T {\n const getTarget = getLegacyTarget(resolver);\n\n return new Proxy({} as T, {\n get(_target, property) {\n const value = (getTarget() as any)[property];\n return typeof value === 'function' ? value.bind(getTarget()) : value;\n },\n set(_target, property, value) {\n (getTarget() as any)[property] = value;\n return true;\n },\n has(_target, property) {\n return property in (getTarget() as any);\n },\n ownKeys() {\n return Reflect.ownKeys(getTarget() as any);\n },\n getOwnPropertyDescriptor(_target, property) {\n const descriptor = Object.getOwnPropertyDescriptor(getTarget() as any, property);\n\n if (!descriptor) {\n return undefined;\n }\n\n return {\n ...descriptor,\n configurable: true\n };\n }\n });\n}\n"]}
1
+ {"version":3,"sources":["../src/legacy/bootstrap.ts"],"names":[],"mappings":"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","file":"bootstrap.js","sourcesContent":["import coreModule from '../core/core-modules';\nimport renderModule from '../render/render-modules';\nimport pickModule from '../picker/pick-modules';\nimport graphicModule from '../graphic/graphic-service/graphic-module';\nimport pluginModule from '../plugins/plugin-modules';\nimport loadBuiltinContributions from '../core/contributions/modules';\nimport loadRenderContributions from '../render/contributions/modules';\nimport type { ILegacyBindContext, ILegacyBindingContext } from './binding-context';\nimport { getLegacyBootstrapState } from './bootstrap-state';\n\nexport type { ILegacyBindContext, ILegacyBindingContext } from './binding-context';\n\nconst legacyBootstrapState = getLegacyBootstrapState();\nconst legacyBindingContext = legacyBootstrapState.legacyBindingContext;\n\nfunction getLegacyTarget<T>(resolver: () => T): () => T {\n let target: T | undefined;\n\n return () => {\n if (target === undefined) {\n target = resolver();\n }\n\n return target;\n };\n}\n\nexport function preLoadAllModule() {\n if (legacyBootstrapState.preloaded) {\n return;\n }\n legacyBootstrapState.preloaded = true;\n coreModule({ bind: legacyBindingContext.bind });\n graphicModule({ bind: legacyBindingContext.bind });\n renderModule({ bind: legacyBindingContext.bind });\n pickModule({ bind: legacyBindingContext.bind, isBound: legacyBindingContext.isBound });\n pluginModule({ bind: legacyBindingContext.bind });\n loadBuiltinContributions(legacyBindingContext);\n loadRenderContributions(legacyBindingContext);\n}\n\nexport function getLegacyBindingContext(): ILegacyBindingContext {\n return legacyBindingContext;\n}\n\nexport function resolveLegacySingleton<T>(serviceIdentifier: any): T {\n preLoadAllModule();\n const [instance] = legacyBindingContext.getAll<T>(serviceIdentifier);\n return instance;\n}\n\nexport { LEGACY_BOOTSTRAP_STATE_SYMBOL, getLegacyBootstrapState } from './bootstrap-state';\nexport type { ILegacyBootstrapState } from './bootstrap-state';\n\nexport function resolveLegacyNamed<T>(serviceIdentifier: any, name: string): T | undefined {\n preLoadAllModule();\n return legacyBindingContext.getNamed<T>(serviceIdentifier, name);\n}\n\nexport function createLegacySingletonProxy<T extends object>(resolver: () => T): T {\n const getTarget = getLegacyTarget(resolver);\n\n return new Proxy({} as T, {\n get(_target, property) {\n const value = (getTarget() as any)[property];\n return typeof value === 'function' ? value.bind(getTarget()) : value;\n },\n set(_target, property, value) {\n (getTarget() as any)[property] = value;\n return true;\n },\n has(_target, property) {\n return property in (getTarget() as any);\n },\n ownKeys() {\n return Reflect.ownKeys(getTarget() as any);\n },\n getOwnPropertyDescriptor(_target, property) {\n const descriptor = Object.getOwnPropertyDescriptor(getTarget() as any, property);\n\n if (!descriptor) {\n return undefined;\n }\n\n return {\n ...descriptor,\n configurable: true\n };\n }\n });\n}\n"]}
package/dist/index.es.js CHANGED
@@ -142,7 +142,20 @@ Generator.auto_increment_id = 0;
142
142
 
143
143
  class Application {
144
144
  }
145
- const application = new Application();
145
+ const APPLICATION_STATE_SYMBOL = Symbol.for('@visactor/vrender-core/application-state');
146
+ function createApplicationState() {
147
+ return {
148
+ application: new Application()
149
+ };
150
+ }
151
+ function getApplicationState() {
152
+ const scope = globalThis;
153
+ if (!scope[APPLICATION_STATE_SYMBOL]) {
154
+ scope[APPLICATION_STATE_SYMBOL] = createApplicationState();
155
+ }
156
+ return scope[APPLICATION_STATE_SYMBOL];
157
+ }
158
+ const application = getApplicationState().application;
146
159
 
147
160
  let idx = 0;
148
161
  class PerformanceRAF {
@@ -16913,7 +16926,6 @@ function createGraphicCtor(creator) {
16913
16926
  }
16914
16927
  };
16915
16928
  }
16916
- const sharedGraphicFactory = new GraphicFactory();
16917
16929
  class GraphicCreator {
16918
16930
  constructor() {
16919
16931
  this.store = new Map();
@@ -16932,16 +16944,31 @@ class GraphicCreator {
16932
16944
  return createGraphic(name, attributes);
16933
16945
  }
16934
16946
  }
16935
- const graphicCreator = new GraphicCreator();
16947
+ const GRAPHIC_REGISTRY_SYMBOL = Symbol.for('@visactor/vrender-core/graphic-registry');
16948
+ function createGraphicRegistryState() {
16949
+ return {
16950
+ graphicCreator: new GraphicCreator(),
16951
+ graphicFactory: new GraphicFactory()
16952
+ };
16953
+ }
16954
+ function getGraphicRegistryState() {
16955
+ const scope = globalThis;
16956
+ if (!scope[GRAPHIC_REGISTRY_SYMBOL]) {
16957
+ scope[GRAPHIC_REGISTRY_SYMBOL] = createGraphicRegistryState();
16958
+ }
16959
+ return scope[GRAPHIC_REGISTRY_SYMBOL];
16960
+ }
16961
+ const sharedGraphicRegistry = getGraphicRegistryState();
16962
+ const graphicCreator = sharedGraphicRegistry.graphicCreator;
16936
16963
  function registerGraphic(name, creator) {
16937
16964
  if (!name) {
16938
16965
  throw new Error('Graphic registration requires a non-empty graphic type');
16939
16966
  }
16940
16967
  graphicCreator.registerStore(name, creator);
16941
- sharedGraphicFactory.register(name, createGraphicCtor(creator));
16968
+ sharedGraphicRegistry.graphicFactory.register(name, createGraphicCtor(creator));
16942
16969
  }
16943
16970
  function createGraphic(name, attributes) {
16944
- return sharedGraphicFactory.create(name, attributes);
16971
+ return sharedGraphicRegistry.graphicFactory.create(name, attributes);
16945
16972
  }
16946
16973
 
16947
16974
  function getExtraModelMatrix(dx, dy, graphic) {
@@ -17688,6 +17715,20 @@ class DefaultTransformUtil {
17688
17715
  }
17689
17716
  }
17690
17717
 
17718
+ const FACTORY_STATE_SYMBOL = Symbol.for('@visactor/vrender-core/factory-state');
17719
+ function createFactoryState() {
17720
+ return {
17721
+ pluginClasses: {}
17722
+ };
17723
+ }
17724
+ function getFactoryState() {
17725
+ const scope = globalThis;
17726
+ if (!scope[FACTORY_STATE_SYMBOL]) {
17727
+ scope[FACTORY_STATE_SYMBOL] = createFactoryState();
17728
+ }
17729
+ return scope[FACTORY_STATE_SYMBOL];
17730
+ }
17731
+
17691
17732
  class DefaultGlobalPickerService {
17692
17733
  constructor() {
17693
17734
  this.global = application.global;
@@ -20347,7 +20388,7 @@ class Factory {
20347
20388
  return Factory._pluginClasses[pluginKey];
20348
20389
  }
20349
20390
  }
20350
- Factory._pluginClasses = {};
20391
+ Factory._pluginClasses = getFactoryState().pluginClasses;
20351
20392
 
20352
20393
  function defaultLayerHandlerFactory(layerMode) {
20353
20394
  const handlerFactory = application.layerHandlerFactory;
@@ -20444,6 +20485,20 @@ class DefaultLayerService {
20444
20485
  DefaultLayerService.idprefix = 'visactor_layer';
20445
20486
  DefaultLayerService.prefix_count = 0;
20446
20487
 
20488
+ const CONTRIBUTION_STORE_STATE_SYMBOL = Symbol.for('@visactor/vrender-core/contribution-store-state');
20489
+ function createContributionStoreState() {
20490
+ return {
20491
+ store: new Map()
20492
+ };
20493
+ }
20494
+ function getContributionStoreState() {
20495
+ const scope = globalThis;
20496
+ if (!scope[CONTRIBUTION_STORE_STATE_SYMBOL]) {
20497
+ scope[CONTRIBUTION_STORE_STATE_SYMBOL] = createContributionStoreState();
20498
+ }
20499
+ return scope[CONTRIBUTION_STORE_STATE_SYMBOL];
20500
+ }
20501
+
20447
20502
  const ContributionProvider = Symbol('ContributionProvider');
20448
20503
  class ContributionProviderCache {
20449
20504
  constructor(serviceIdentifier, container) {
@@ -20505,7 +20560,7 @@ class ContributionStore {
20505
20560
  });
20506
20561
  }
20507
20562
  }
20508
- ContributionStore.store = new Map();
20563
+ ContributionStore.store = getContributionStoreState().store;
20509
20564
 
20510
20565
  class ATextMeasure {
20511
20566
  constructor() {
@@ -23384,7 +23439,23 @@ function createLegacyBindingContext() {
23384
23439
  return new LegacyBindingContext();
23385
23440
  }
23386
23441
 
23387
- const legacyBindingContext = createLegacyBindingContext();
23442
+ const LEGACY_BOOTSTRAP_STATE_SYMBOL = Symbol.for('@visactor/vrender-core/legacy-bootstrap-state');
23443
+ function createLegacyBootstrapState() {
23444
+ return {
23445
+ legacyBindingContext: createLegacyBindingContext(),
23446
+ preloaded: false
23447
+ };
23448
+ }
23449
+ function getLegacyBootstrapState() {
23450
+ const scope = globalThis;
23451
+ if (!scope[LEGACY_BOOTSTRAP_STATE_SYMBOL]) {
23452
+ scope[LEGACY_BOOTSTRAP_STATE_SYMBOL] = createLegacyBootstrapState();
23453
+ }
23454
+ return scope[LEGACY_BOOTSTRAP_STATE_SYMBOL];
23455
+ }
23456
+
23457
+ const legacyBootstrapState = getLegacyBootstrapState();
23458
+ const legacyBindingContext = legacyBootstrapState.legacyBindingContext;
23388
23459
  function getLegacyTarget(resolver) {
23389
23460
  let target;
23390
23461
  return () => {
@@ -23395,10 +23466,10 @@ function getLegacyTarget(resolver) {
23395
23466
  };
23396
23467
  }
23397
23468
  function preLoadAllModule() {
23398
- if (preLoadAllModule.__loaded) {
23469
+ if (legacyBootstrapState.preloaded) {
23399
23470
  return;
23400
23471
  }
23401
- preLoadAllModule.__loaded = true;
23472
+ legacyBootstrapState.preloaded = true;
23402
23473
  bindCoreModules({ bind: legacyBindingContext.bind });
23403
23474
  bindGraphicModules({ bind: legacyBindingContext.bind });
23404
23475
  bindRenderServiceModule({ bind: legacyBindingContext.bind });
@@ -23407,7 +23478,6 @@ function preLoadAllModule() {
23407
23478
  load$1(legacyBindingContext);
23408
23479
  load(legacyBindingContext);
23409
23480
  }
23410
- preLoadAllModule.__loaded = false;
23411
23481
  function getLegacyBindingContext() {
23412
23482
  return legacyBindingContext;
23413
23483
  }
@@ -26834,21 +26904,38 @@ class DefaultIncrementalCanvasLineRender extends DefaultCanvasLineRender {
26834
26904
  }
26835
26905
  }
26836
26906
 
26837
- const runtimeInstallerContext = createLegacyBindingContext();
26838
- let runtimeInstallerPreloaded = false;
26839
- let runtimeGlobal;
26907
+ const RUNTIME_INSTALLER_STATE_SYMBOL = Symbol.for('@visactor/vrender-core/runtime-installer-state');
26908
+ function createRuntimeInstallerState() {
26909
+ return {
26910
+ runtimeInstallerContext: createLegacyBindingContext(),
26911
+ preloaded: false,
26912
+ runtimeEntryKeys: new WeakMap(),
26913
+ runtimeDrawContributions: new WeakMap(),
26914
+ loadedRuntimeContributionModules: new WeakMap()
26915
+ };
26916
+ }
26917
+ function getRuntimeInstallerState() {
26918
+ const scope = globalThis;
26919
+ if (!scope[RUNTIME_INSTALLER_STATE_SYMBOL]) {
26920
+ scope[RUNTIME_INSTALLER_STATE_SYMBOL] = createRuntimeInstallerState();
26921
+ }
26922
+ return scope[RUNTIME_INSTALLER_STATE_SYMBOL];
26923
+ }
26924
+
26925
+ const runtimeInstallerState = getRuntimeInstallerState();
26926
+ const runtimeInstallerContext = runtimeInstallerState.runtimeInstallerContext;
26840
26927
  const RUNTIME_RENDERER_NAMESPACE = 'vrender:runtime-renderer';
26841
26928
  const RUNTIME_PICKER_NAMESPACE = 'vrender:runtime-picker';
26842
- const runtimeEntryKeys = new WeakMap();
26843
- const runtimeDrawContributions = new WeakMap();
26844
- const loadedRuntimeContributionModules = new WeakMap();
26929
+ const runtimeEntryKeys = runtimeInstallerState.runtimeEntryKeys;
26930
+ const runtimeDrawContributions = runtimeInstallerState.runtimeDrawContributions;
26931
+ const loadedRuntimeContributionModules = runtimeInstallerState.loadedRuntimeContributionModules;
26845
26932
  const DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = ['graphic-renderer'];
26846
26933
  const noopUnbindRuntimeContributionService = () => undefined;
26847
26934
  function ensureRuntimeInstallerPreloaded() {
26848
- if (runtimeInstallerPreloaded) {
26935
+ if (runtimeInstallerState.preloaded) {
26849
26936
  return;
26850
26937
  }
26851
- runtimeInstallerPreloaded = true;
26938
+ runtimeInstallerState.preloaded = true;
26852
26939
  bindCoreModules({ bind: runtimeInstallerContext.bind });
26853
26940
  bindGraphicModules({ bind: runtimeInstallerContext.bind });
26854
26941
  bindRenderServiceModule({ bind: runtimeInstallerContext.bind });
@@ -26904,9 +26991,10 @@ function refreshRuntimeInstallerContributions() {
26904
26991
  ContributionStore.refreshAllContributions();
26905
26992
  }
26906
26993
  function getRuntimeInstallerGlobal() {
26994
+ var _a;
26907
26995
  ensureRuntimeInstallerPreloaded();
26908
- runtimeGlobal !== null && runtimeGlobal !== void 0 ? runtimeGlobal : (runtimeGlobal = new DefaultGlobal(createContributionProvider(EnvContribution, runtimeInstallerContext)));
26909
- return runtimeGlobal;
26996
+ (_a = runtimeInstallerState.runtimeGlobal) !== null && _a !== void 0 ? _a : (runtimeInstallerState.runtimeGlobal = new DefaultGlobal(createContributionProvider(EnvContribution, runtimeInstallerContext)));
26997
+ return runtimeInstallerState.runtimeGlobal;
26910
26998
  }
26911
26999
  function configureRuntimeApplicationForApp(app) {
26912
27000
  const bindingContext = getRuntimeInstallerBindingContext();
@@ -30730,4 +30818,4 @@ const registerFlexLayoutPlugin = () => {
30730
30818
  Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
30731
30819
  };
30732
30820
 
30733
- export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, Base3dRender, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Context2dFactory, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArc3DRender, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasPyramid3dRender, DefaultCanvasRect3dRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerFactory, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, PluginRegistry, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step, StepClosed, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dRenderModule, bindArcRenderModule, bindAreaRenderModule, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindGlyphRenderModule, bindImageRenderModule, bindLineRenderModule, bindPathRenderModule, bindPolygonRenderModule, bindPyramid3dRenderModule, bindRect3dRenderModule, bindRectRenderModule, bindRichtextRenderModule, bindStarRenderModule, bindSymbolRenderModule, bindTextRenderModule, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, configureRuntimeApplicationForApp, container, cornerTangents, createBrowserApp as createApp, createArc, createArc3d, createArea, createBrowserApp, createCanvasEventTransformer, createCircle, createColor, createConicalGradient, createContributionProvider, createEventTransformer, createGlyph, createGraphic, createGroup, createImage, createLine, createMat4, createMiniappApp, createNodeApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getBackgroundImage, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getLegacyBindingContext, getModelMatrix, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, installRuntimeContributionModule, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNoRepeatSizingMode, isNodeEnv, isSvg, isXML, layerService, lineModule, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlobalEventTransformer, registerGlyphGraphic, registerGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerStarGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapTextGraphic, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldClipImageByLayout, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformMat4, transformPointForCanvas, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
30821
+ export { APPLICATION_STATE_SYMBOL, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, Base3dRender, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, CIRCLE_NUMBER_TYPE, CONTRIBUTION_STORE_STATE_SYMBOL, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Context2dFactory, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArc3DRender, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasPyramid3dRender, DefaultCanvasRect3dRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FACTORY_STATE_SYMBOL, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_REGISTRY_SYMBOL, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerFactory, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, PluginRegistry, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RUNTIME_INSTALLER_STATE_SYMBOL, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step, StepClosed, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dRenderModule, bindArcRenderModule, bindAreaRenderModule, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindGlyphRenderModule, bindImageRenderModule, bindLineRenderModule, bindPathRenderModule, bindPolygonRenderModule, bindPyramid3dRenderModule, bindRect3dRenderModule, bindRectRenderModule, bindRichtextRenderModule, bindStarRenderModule, bindSymbolRenderModule, bindTextRenderModule, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, configureRuntimeApplicationForApp, container, cornerTangents, createBrowserApp as createApp, createArc, createArc3d, createArea, createBrowserApp, createCanvasEventTransformer, createCircle, createColor, createConicalGradient, createContributionProvider, createEventTransformer, createGlyph, createGraphic, createGroup, createImage, createLine, createMat4, createMiniappApp, createNodeApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, getApplicationState, getAttributeFromDefaultAttrList, getBackgroundImage, getConicGradientAt, getContributionStoreState, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getFactoryState, getGraphicRegistryState, getLegacyBindingContext, getModelMatrix, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getRuntimeInstallerState, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, installRuntimeContributionModule, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNoRepeatSizingMode, isNodeEnv, isSvg, isXML, layerService, lineModule, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlobalEventTransformer, registerGlyphGraphic, registerGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerStarGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapTextGraphic, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldClipImageByLayout, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformMat4, transformPointForCanvas, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
@@ -28,5 +28,4 @@ export class DefaultBoundsAllocate {
28
28
  }
29
29
  }
30
30
 
31
- export const boundsAllocate = new DefaultBoundsAllocate;
32
- //# sourceMappingURL=bounds-allocate.js.map
31
+ export const boundsAllocate = new DefaultBoundsAllocate;
@@ -51,4 +51,5 @@ export class DefaultCanvasAllocate {
51
51
  }
52
52
  }
53
53
 
54
- export const canvasAllocate = new DefaultCanvasAllocate;
54
+ export const canvasAllocate = new DefaultCanvasAllocate;
55
+ //# sourceMappingURL=canvas-allocate.js.map
@@ -0,0 +1,27 @@
1
+ import type { IGraphicUtil, ILayerService, ITransformUtil } from './interface/core';
2
+ import type { ICanvasFactory, IContext2dFactory, IGlobal, IGraphicService, ILayerHandlerContribution, IPickerService, IPluginService, IRenderService, IWindow, IWindowHandlerContribution, LayerMode } from './interface';
3
+ import type { IDrawContribution } from './interface/render';
4
+ export declare class Application {
5
+ global: IGlobal;
6
+ graphicUtil: IGraphicUtil;
7
+ graphicService: IGraphicService;
8
+ renderService: IRenderService;
9
+ renderServiceFactory?: () => IRenderService;
10
+ pluginService?: IPluginService;
11
+ pluginServiceFactory?: () => IPluginService;
12
+ pickerServiceFactory?: () => IPickerService;
13
+ windowFactory?: () => IWindow;
14
+ windowHandlerFactory?: (env: string) => IWindowHandlerContribution;
15
+ layerHandlerFactory?: (layerMode: LayerMode) => ILayerHandlerContribution;
16
+ incrementalDrawContributionFactory?: () => IDrawContribution;
17
+ canvasFactory?: (env: string) => ICanvasFactory | undefined;
18
+ context2dFactory?: (env: string) => IContext2dFactory | undefined;
19
+ transformUtil: ITransformUtil;
20
+ layerService: ILayerService;
21
+ }
22
+ export declare const APPLICATION_STATE_SYMBOL: unique symbol;
23
+ export interface IApplicationState {
24
+ application: Application;
25
+ }
26
+ export declare function getApplicationState(): IApplicationState;
27
+ export declare const application: Application;
@@ -0,0 +1,17 @@
1
+ export class Application {}
2
+
3
+ export const APPLICATION_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/application-state");
4
+
5
+ function createApplicationState() {
6
+ return {
7
+ application: new Application
8
+ };
9
+ }
10
+
11
+ export function getApplicationState() {
12
+ const scope = globalThis;
13
+ return scope[APPLICATION_STATE_SYMBOL] || (scope[APPLICATION_STATE_SYMBOL] = createApplicationState()),
14
+ scope[APPLICATION_STATE_SYMBOL];
15
+ }
16
+
17
+ export const application = getApplicationState().application;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/application-state.ts"],"names":[],"mappings":"AAgBA,MAAM,OAAO,WAAW;CAiBvB;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;AAM/F,SAAS,sBAAsB;IAC7B,OAAO;QACL,WAAW,EAAE,IAAI,WAAW,EAAE;KAC/B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,MAAM,KAAK,GAAG,UAAoF,CAAC;IAEnG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE;QACpC,KAAK,CAAC,wBAAwB,CAAC,GAAG,sBAAsB,EAAE,CAAC;KAC5D;IAED,OAAO,KAAK,CAAC,wBAAwB,CAAsB,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,EAAE,CAAC,WAAW,CAAC","file":"application-state.js","sourcesContent":["import type { IGraphicUtil, ILayerService, ITransformUtil } from './interface/core';\nimport type {\n ICanvasFactory,\n IContext2dFactory,\n IGlobal,\n IGraphicService,\n ILayerHandlerContribution,\n IPickerService,\n IPluginService,\n IRenderService,\n IWindow,\n IWindowHandlerContribution,\n LayerMode\n} from './interface';\nimport type { IDrawContribution } from './interface/render';\n\nexport class Application {\n global: IGlobal;\n graphicUtil: IGraphicUtil;\n graphicService: IGraphicService;\n renderService: IRenderService;\n renderServiceFactory?: () => IRenderService;\n pluginService?: IPluginService;\n pluginServiceFactory?: () => IPluginService;\n pickerServiceFactory?: () => IPickerService;\n windowFactory?: () => IWindow;\n windowHandlerFactory?: (env: string) => IWindowHandlerContribution;\n layerHandlerFactory?: (layerMode: LayerMode) => ILayerHandlerContribution;\n incrementalDrawContributionFactory?: () => IDrawContribution;\n canvasFactory?: (env: string) => ICanvasFactory | undefined;\n context2dFactory?: (env: string) => IContext2dFactory | undefined;\n transformUtil: ITransformUtil;\n layerService: ILayerService;\n}\n\nexport const APPLICATION_STATE_SYMBOL = Symbol.for('@visactor/vrender-core/application-state');\n\nexport interface IApplicationState {\n application: Application;\n}\n\nfunction createApplicationState(): IApplicationState {\n return {\n application: new Application()\n };\n}\n\nexport function getApplicationState(): IApplicationState {\n const scope = globalThis as typeof globalThis & { [APPLICATION_STATE_SYMBOL]?: IApplicationState };\n\n if (!scope[APPLICATION_STATE_SYMBOL]) {\n scope[APPLICATION_STATE_SYMBOL] = createApplicationState();\n }\n\n return scope[APPLICATION_STATE_SYMBOL] as IApplicationState;\n}\n\nexport const application = getApplicationState().application;\n"]}
@@ -1,22 +1,2 @@
1
- import type { IGraphicUtil, ILayerService, ITransformUtil } from './interface/core';
2
- import type { ICanvasFactory, IContext2dFactory, IGlobal, IGraphicService, ILayerHandlerContribution, IPickerService, IPluginService, IRenderService, IWindow, IWindowHandlerContribution, LayerMode } from './interface';
3
- import type { IDrawContribution } from './interface/render';
4
- export declare class Application {
5
- global: IGlobal;
6
- graphicUtil: IGraphicUtil;
7
- graphicService: IGraphicService;
8
- renderService: IRenderService;
9
- renderServiceFactory?: () => IRenderService;
10
- pluginService?: IPluginService;
11
- pluginServiceFactory?: () => IPluginService;
12
- pickerServiceFactory?: () => IPickerService;
13
- windowFactory?: () => IWindow;
14
- windowHandlerFactory?: (env: string) => IWindowHandlerContribution;
15
- layerHandlerFactory?: (layerMode: LayerMode) => ILayerHandlerContribution;
16
- incrementalDrawContributionFactory?: () => IDrawContribution;
17
- canvasFactory?: (env: string) => ICanvasFactory | undefined;
18
- context2dFactory?: (env: string) => IContext2dFactory | undefined;
19
- transformUtil: ITransformUtil;
20
- layerService: ILayerService;
21
- }
22
- export declare const application: Application;
1
+ export { application, Application, APPLICATION_STATE_SYMBOL, getApplicationState } from './application-state';
2
+ export type { IApplicationState } from './application-state';
package/es/application.js CHANGED
@@ -1,3 +1,2 @@
1
- export class Application {}
2
-
3
- export const application = new Application;
1
+ export { application, Application, APPLICATION_STATE_SYMBOL, getApplicationState } from "./application-state";
2
+ //# sourceMappingURL=application.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/application.ts"],"names":[],"mappings":"AAgBA,MAAM,OAAO,WAAW;CAiBvB;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC","file":"application.js","sourcesContent":["import type { IGraphicUtil, ILayerService, ITransformUtil } from './interface/core';\nimport type {\n ICanvasFactory,\n IContext2dFactory,\n IGlobal,\n IGraphicService,\n ILayerHandlerContribution,\n IPickerService,\n IPluginService,\n IRenderService,\n IWindow,\n IWindowHandlerContribution,\n LayerMode\n} from './interface';\nimport type { IDrawContribution } from './interface/render';\n\nexport class Application {\n global: IGlobal;\n graphicUtil: IGraphicUtil;\n graphicService: IGraphicService;\n renderService: IRenderService;\n renderServiceFactory?: () => IRenderService;\n pluginService?: IPluginService;\n pluginServiceFactory?: () => IPluginService;\n pickerServiceFactory?: () => IPickerService;\n windowFactory?: () => IWindow;\n windowHandlerFactory?: (env: string) => IWindowHandlerContribution;\n layerHandlerFactory?: (layerMode: LayerMode) => ILayerHandlerContribution;\n incrementalDrawContributionFactory?: () => IDrawContribution;\n canvasFactory?: (env: string) => ICanvasFactory | undefined;\n context2dFactory?: (env: string) => IContext2dFactory | undefined;\n transformUtil: ITransformUtil;\n layerService: ILayerService;\n}\n\nexport const application = new Application();\n"]}
1
+ {"version":3,"sources":["../src/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC","file":"application.js","sourcesContent":["export { application, Application, APPLICATION_STATE_SYMBOL, getApplicationState } from './application-state';\nexport type { IApplicationState } from './application-state';\n"]}
@@ -49,5 +49,4 @@ export class BoundsContext {
49
49
  this.bounds.clear();
50
50
  }
51
51
  release(...params) {}
52
- }
53
- //# sourceMappingURL=bounds-context.js.map
52
+ }
@@ -24,4 +24,5 @@ export declare class ContributionStore {
24
24
  static setStore(id: ServiceIdentifier<any>, cache: ContributionProviderCache<any>): void;
25
25
  static refreshAllContributions(): void;
26
26
  }
27
- export {};
27
+ export { CONTRIBUTION_STORE_STATE_SYMBOL, getContributionStoreState } from './contribution-store-state';
28
+ export type { IContributionStoreState } from './contribution-store-state';
@@ -1,3 +1,5 @@
1
+ import { getContributionStoreState } from "./contribution-store-state";
2
+
1
3
  export const ContributionProvider = Symbol("ContributionProvider");
2
4
 
3
5
  class ContributionProviderCache {
@@ -43,5 +45,7 @@ export class ContributionStore {
43
45
  }
44
46
  }
45
47
 
46
- ContributionStore.store = new Map;
48
+ ContributionStore.store = getContributionStoreState().store;
49
+
50
+ export { CONTRIBUTION_STORE_STATE_SYMBOL, getContributionStoreState } from "./contribution-store-state";
47
51
  //# sourceMappingURL=contribution-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/contribution-provider.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAEnE,MAAM,yBAAyB;IAK7B,YACE,iBAAuC,EACvC,SAA+F;QAE/F,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACjB,IAAI,CAAC,SAAS;gBACZ,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC;gBAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACtE;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,OAAO;SACR;QACD,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,SAAS;YACZ,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC;YAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACvE,CAAC;CACF;AAMD,MAAM,UAAU,0BAA0B,CACxC,iBAAuC,EACvC,SAA+F;IAE/F,OAAO,IAAI,yBAAyB,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,IAAS,EAAE,EAAqB;IACvE,IAAI,CAAC,oBAAoB,CAAC;SACvB,cAAc,CAAC,CAAC,EAAE,SAAS,EAAuC,EAAE,EAAE,CAAC,0BAA0B,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;SACjH,gBAAgB,EAAE;SAClB,eAAe,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,wCAAwC,CAAC,IAAS,EAAE,EAAqB;IACvF,IAAI,CAAC,oBAAoB,CAAC;SACvB,cAAc,CAAC,CAAC,EAAE,SAAS,EAAuC,EAAE,EAAE,CAAC,0BAA0B,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;SACjH,eAAe,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,OAAO,iBAAiB;IAG5B,MAAM,CAAC,QAAQ,CAAC,EAA0B;;QACxC,OAAO,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,0CAAE,MAAM,GAAG,IAAI,GAAG,KAAK,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,EAA0B,EAAE,KAAqC;QAC/E,IAAI,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,GAAG,IAAI,GAAG,EAAkC,CAAC;YACnD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;SAC5B;QACD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,CAAC,uBAAuB;QAC5B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAC1B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACrB,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;;AArBM,uBAAK,GAAqE,IAAI,GAAG,EAAE,CAAC","file":"contribution-provider.js","sourcesContent":["import type { IBindingResolver, ServiceIdentifier } from './explicit-binding';\nimport type { IContributionProvider } from '../interface';\n\nexport const ContributionProvider = Symbol('ContributionProvider');\n\nclass ContributionProviderCache<T> implements IContributionProvider<T> {\n protected caches?: T[];\n protected serviceIdentifier: ServiceIdentifier<T>;\n protected container: IBindingResolver & { isBound: (serviceIdentifier: ServiceIdentifier<T>) => boolean };\n\n constructor(\n serviceIdentifier: ServiceIdentifier<T>,\n container: IBindingResolver & { isBound: (serviceIdentifier: ServiceIdentifier<T>) => boolean }\n ) {\n this.serviceIdentifier = serviceIdentifier;\n this.container = container;\n ContributionStore.setStore(this.serviceIdentifier, this);\n }\n\n getContributions(): T[] {\n if (!this.caches) {\n this.caches = [];\n this.container &&\n this.container.isBound(this.serviceIdentifier) &&\n this.caches.push(...this.container.getAll(this.serviceIdentifier));\n }\n return this.caches;\n }\n\n refresh() {\n if (!this.caches) {\n return;\n }\n this.caches.length = 0;\n this.container &&\n this.container.isBound(this.serviceIdentifier) &&\n this.caches.push(...this.container.getAll(this.serviceIdentifier));\n }\n}\n\ntype IContributionProviderFactoryContext = {\n container: IBindingResolver & { isBound: (serviceIdentifier: ServiceIdentifier) => boolean };\n};\n\nexport function createContributionProvider<T>(\n serviceIdentifier: ServiceIdentifier<T>,\n container: IBindingResolver & { isBound: (serviceIdentifier: ServiceIdentifier<T>) => boolean }\n): IContributionProvider<T> {\n return new ContributionProviderCache(serviceIdentifier, container);\n}\n\nexport function bindContributionProvider(bind: any, id: ServiceIdentifier): void {\n bind(ContributionProvider)\n .toDynamicValue(({ container }: IContributionProviderFactoryContext) => createContributionProvider(id, container))\n .inSingletonScope()\n .whenTargetNamed(id);\n}\n\nexport function bindContributionProviderNoSingletonScope(bind: any, id: ServiceIdentifier): void {\n bind(ContributionProvider)\n .toDynamicValue(({ container }: IContributionProviderFactoryContext) => createContributionProvider(id, container))\n .whenTargetNamed(id);\n}\n\nexport class ContributionStore {\n static store: Map<ServiceIdentifier<any>, Set<ContributionProviderCache<any>>> = new Map();\n\n static getStore(id: ServiceIdentifier<any>): ContributionProviderCache<any> | undefined {\n return this.store.get(id)?.values().next().value;\n }\n\n static setStore(id: ServiceIdentifier<any>, cache: ContributionProviderCache<any>): void {\n let caches = this.store.get(id);\n if (!caches) {\n caches = new Set<ContributionProviderCache<any>>();\n this.store.set(id, caches);\n }\n caches.add(cache);\n }\n\n static refreshAllContributions(): void {\n this.store.forEach(caches => {\n caches.forEach(cache => {\n cache.refresh();\n });\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/common/contribution-provider.ts"],"names":[],"mappings":"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","file":"contribution-provider.js","sourcesContent":["import type { IBindingResolver, ServiceIdentifier } from './explicit-binding';\nimport type { IContributionProvider } from '../interface';\nimport { getContributionStoreState } from './contribution-store-state';\n\nexport const ContributionProvider = Symbol('ContributionProvider');\n\nclass ContributionProviderCache<T> implements IContributionProvider<T> {\n protected caches?: T[];\n protected serviceIdentifier: ServiceIdentifier<T>;\n protected container: IBindingResolver & { isBound: (serviceIdentifier: ServiceIdentifier<T>) => boolean };\n\n constructor(\n serviceIdentifier: ServiceIdentifier<T>,\n container: IBindingResolver & { isBound: (serviceIdentifier: ServiceIdentifier<T>) => boolean }\n ) {\n this.serviceIdentifier = serviceIdentifier;\n this.container = container;\n ContributionStore.setStore(this.serviceIdentifier, this);\n }\n\n getContributions(): T[] {\n if (!this.caches) {\n this.caches = [];\n this.container &&\n this.container.isBound(this.serviceIdentifier) &&\n this.caches.push(...this.container.getAll(this.serviceIdentifier));\n }\n return this.caches;\n }\n\n refresh() {\n if (!this.caches) {\n return;\n }\n this.caches.length = 0;\n this.container &&\n this.container.isBound(this.serviceIdentifier) &&\n this.caches.push(...this.container.getAll(this.serviceIdentifier));\n }\n}\n\ntype IContributionProviderFactoryContext = {\n container: IBindingResolver & { isBound: (serviceIdentifier: ServiceIdentifier) => boolean };\n};\n\nexport function createContributionProvider<T>(\n serviceIdentifier: ServiceIdentifier<T>,\n container: IBindingResolver & { isBound: (serviceIdentifier: ServiceIdentifier<T>) => boolean }\n): IContributionProvider<T> {\n return new ContributionProviderCache(serviceIdentifier, container);\n}\n\nexport function bindContributionProvider(bind: any, id: ServiceIdentifier): void {\n bind(ContributionProvider)\n .toDynamicValue(({ container }: IContributionProviderFactoryContext) => createContributionProvider(id, container))\n .inSingletonScope()\n .whenTargetNamed(id);\n}\n\nexport function bindContributionProviderNoSingletonScope(bind: any, id: ServiceIdentifier): void {\n bind(ContributionProvider)\n .toDynamicValue(({ container }: IContributionProviderFactoryContext) => createContributionProvider(id, container))\n .whenTargetNamed(id);\n}\n\nexport class ContributionStore {\n static store = getContributionStoreState().store as Map<ServiceIdentifier<any>, Set<ContributionProviderCache<any>>>;\n\n static getStore(id: ServiceIdentifier<any>): ContributionProviderCache<any> | undefined {\n return this.store.get(id)?.values().next().value;\n }\n\n static setStore(id: ServiceIdentifier<any>, cache: ContributionProviderCache<any>): void {\n let caches = this.store.get(id);\n if (!caches) {\n caches = new Set<ContributionProviderCache<any>>();\n this.store.set(id, caches);\n }\n caches.add(cache);\n }\n\n static refreshAllContributions(): void {\n this.store.forEach(caches => {\n caches.forEach(cache => {\n cache.refresh();\n });\n });\n }\n}\n\nexport { CONTRIBUTION_STORE_STATE_SYMBOL, getContributionStoreState } from './contribution-store-state';\nexport type { IContributionStoreState } from './contribution-store-state';\n"]}
@@ -0,0 +1,6 @@
1
+ import type { ServiceIdentifier } from './explicit-binding';
2
+ export declare const CONTRIBUTION_STORE_STATE_SYMBOL: unique symbol;
3
+ export interface IContributionStoreState<T = any> {
4
+ store: Map<ServiceIdentifier<T>, Set<T>>;
5
+ }
6
+ export declare function getContributionStoreState(): IContributionStoreState;
@@ -0,0 +1,14 @@
1
+ export const CONTRIBUTION_STORE_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/contribution-store-state");
2
+
3
+ function createContributionStoreState() {
4
+ return {
5
+ store: new Map
6
+ };
7
+ }
8
+
9
+ export function getContributionStoreState() {
10
+ const scope = globalThis;
11
+ return scope[CONTRIBUTION_STORE_STATE_SYMBOL] || (scope[CONTRIBUTION_STORE_STATE_SYMBOL] = createContributionStoreState()),
12
+ scope[CONTRIBUTION_STORE_STATE_SYMBOL];
13
+ }
14
+ //# sourceMappingURL=contribution-store-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common/contribution-store-state.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;AAM7G,SAAS,4BAA4B;IACnC,OAAO;QACL,KAAK,EAAE,IAAI,GAAG,EAAE;KACjB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,MAAM,KAAK,GAAG,UAAiG,CAAC;IAEhH,IAAI,CAAC,KAAK,CAAC,+BAA+B,CAAC,EAAE;QAC3C,KAAK,CAAC,+BAA+B,CAAC,GAAG,4BAA4B,EAAE,CAAC;KACzE;IAED,OAAO,KAAK,CAAC,+BAA+B,CAA4B,CAAC;AAC3E,CAAC","file":"contribution-store-state.js","sourcesContent":["import type { ServiceIdentifier } from './explicit-binding';\n\nexport const CONTRIBUTION_STORE_STATE_SYMBOL = Symbol.for('@visactor/vrender-core/contribution-store-state');\n\nexport interface IContributionStoreState<T = any> {\n store: Map<ServiceIdentifier<T>, Set<T>>;\n}\n\nfunction createContributionStoreState(): IContributionStoreState {\n return {\n store: new Map()\n };\n}\n\nexport function getContributionStoreState(): IContributionStoreState {\n const scope = globalThis as typeof globalThis & { [CONTRIBUTION_STORE_STATE_SYMBOL]?: IContributionStoreState };\n\n if (!scope[CONTRIBUTION_STORE_STATE_SYMBOL]) {\n scope[CONTRIBUTION_STORE_STATE_SYMBOL] = createContributionStoreState();\n }\n\n return scope[CONTRIBUTION_STORE_STATE_SYMBOL] as IContributionStoreState;\n}\n"]}
@@ -70,4 +70,5 @@ export class EventListenerManager {
70
70
  _nativeDispatchEvent(event) {
71
71
  throw new Error("_nativeDispatchEvent must be implemented by derived classes");
72
72
  }
73
- }
73
+ }
74
+ //# sourceMappingURL=event-listener-manager.js.map
@@ -25,5 +25,4 @@ export class PerformanceRAF {
25
25
  this.addAnimationFrameCb((() => resolve()));
26
26
  }));
27
27
  }
28
- }
29
- //# sourceMappingURL=performance-raf.js.map
28
+ }
@@ -38,4 +38,4 @@ function getProportionPoint(point, segment, length, dx, dy) {
38
38
  y: point.y - dy * factor
39
39
  };
40
40
  }
41
- //# sourceMappingURL=polygon.js.map
41
+ //# sourceMappingURL=polygon.js.map
@@ -17,4 +17,4 @@ export const normalizeRectAttributes = attribute => {
17
17
  height: height
18
18
  };
19
19
  };
20
- //# sourceMappingURL=rect-utils.js.map
20
+ //# sourceMappingURL=rect-utils.js.map
@@ -61,4 +61,4 @@ function drawAreaBlock(path, topList, bottomList, params) {
61
61
  }
62
62
  path.closePath();
63
63
  }
64
- //# sourceMappingURL=render-area.js.map
64
+ //# sourceMappingURL=render-area.js.map
@@ -6,4 +6,4 @@ export function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy
6
6
  commandFuncs[command[0]](command, context, x, y, sx, sy, z);
7
7
  }
8
8
  }
9
- //# sourceMappingURL=render-command-list.js.map
9
+ //# sourceMappingURL=render-command-list.js.map
@@ -93,4 +93,4 @@ export function drawIncrementalAreaSegments(path, lastSeg, segments, params) {
93
93
  path.closePath();
94
94
  }));
95
95
  }
96
- //# sourceMappingURL=render-curve.js.map
96
+ //# sourceMappingURL=render-curve.js.map
@@ -11,4 +11,4 @@ export function drawSegItem(ctx, curve, endPercent, params) {
11
11
  ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
12
12
  }
13
13
  }
14
- //# sourceMappingURL=render-utils.js.map
14
+ //# sourceMappingURL=render-utils.js.map