@visactor/vrender-core 1.1.3 → 1.1.4-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.
Files changed (146) hide show
  1. package/cjs/allocator/bounds-allocate.js +1 -2
  2. package/cjs/allocator/graphic-allocate.js +2 -1
  3. package/cjs/animate/config.js +1 -1
  4. package/cjs/application-state.d.ts +27 -0
  5. package/cjs/application-state.js +22 -0
  6. package/cjs/application-state.js.map +1 -0
  7. package/cjs/application.d.ts +2 -22
  8. package/cjs/application.js +24 -3
  9. package/cjs/application.js.map +1 -1
  10. package/cjs/common/contribution-provider.d.ts +2 -1
  11. package/cjs/common/contribution-provider.js +20 -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/custom-path2d.js +1 -2
  17. package/cjs/common/module-guard.js +1 -1
  18. package/cjs/common/morphing-utils.js +1 -1
  19. package/cjs/common/path-svg.js +1 -1
  20. package/cjs/common/performance-raf.js +1 -1
  21. package/cjs/common/polygon.js +2 -2
  22. package/cjs/common/rect-utils.js +1 -1
  23. package/cjs/common/render-area.js +1 -1
  24. package/cjs/common/render-command-list.js +2 -1
  25. package/cjs/common/render-curve.js +1 -1
  26. package/cjs/common/render-utils.js +1 -1
  27. package/cjs/common/seg-context.js +1 -1
  28. package/cjs/common/simplify.js +1 -1
  29. package/cjs/common/sort.js +1 -1
  30. package/cjs/common/split-path.js +1 -1
  31. package/cjs/common/text.js +1 -1
  32. package/cjs/core/camera.js +1 -1
  33. package/cjs/core/constants.js +1 -1
  34. package/cjs/core/core-modules.js +1 -2
  35. package/cjs/core/global.js +1 -1
  36. package/cjs/core/graphic-utils.js +1 -1
  37. package/cjs/core/index.js +1 -1
  38. package/cjs/core/layer-service.js +1 -1
  39. package/cjs/core/layer.js +1 -1
  40. package/cjs/core/light.js +1 -1
  41. package/cjs/core/stage.js +1 -1
  42. package/cjs/core/window.js +1 -1
  43. package/cjs/entries/runtime-installer-state.d.ts +12 -0
  44. package/cjs/entries/runtime-installer-state.js +27 -0
  45. package/cjs/entries/runtime-installer-state.js.map +1 -0
  46. package/cjs/entries/runtime-installer.d.ts +3 -1
  47. package/cjs/entries/runtime-installer.js +23 -13
  48. package/cjs/entries/runtime-installer.js.map +1 -1
  49. package/cjs/factory-state.d.ts +5 -0
  50. package/cjs/factory-state.js +19 -0
  51. package/cjs/factory-state.js.map +1 -0
  52. package/cjs/factory.d.ts +2 -0
  53. package/cjs/factory.js +18 -2
  54. package/cjs/factory.js.map +1 -1
  55. package/cjs/graphic/graphic-creator.d.ts +2 -29
  56. package/cjs/graphic/graphic-creator.js +24 -38
  57. package/cjs/graphic/graphic-creator.js.map +1 -1
  58. package/cjs/graphic/graphic-registry.d.ts +36 -0
  59. package/cjs/graphic/graphic-registry.js +65 -0
  60. package/cjs/graphic/graphic-registry.js.map +1 -0
  61. package/cjs/graphic/graphic.d.ts +8 -1
  62. package/cjs/graphic/graphic.js +22 -7
  63. package/cjs/graphic/graphic.js.map +1 -1
  64. package/cjs/graphic/index.d.ts +2 -0
  65. package/cjs/graphic/index.js +29 -16
  66. package/cjs/graphic/index.js.map +1 -1
  67. package/cjs/legacy/bootstrap-state.d.ts +7 -0
  68. package/cjs/legacy/bootstrap-state.js +24 -0
  69. package/cjs/legacy/bootstrap-state.js.map +1 -0
  70. package/cjs/legacy/bootstrap.d.ts +3 -4
  71. package/cjs/legacy/bootstrap.js +20 -7
  72. package/cjs/legacy/bootstrap.js.map +1 -1
  73. package/dist/index.es.js +126 -25
  74. package/es/allocator/bounds-allocate.js +1 -2
  75. package/es/allocator/graphic-allocate.js +2 -1
  76. package/es/animate/config.js +1 -1
  77. package/es/application-state.d.ts +27 -0
  78. package/es/application-state.js +17 -0
  79. package/es/application-state.js.map +1 -0
  80. package/es/application.d.ts +2 -22
  81. package/es/application.js +2 -3
  82. package/es/application.js.map +1 -1
  83. package/es/common/contribution-provider.d.ts +2 -1
  84. package/es/common/contribution-provider.js +6 -1
  85. package/es/common/contribution-provider.js.map +1 -1
  86. package/es/common/contribution-store-state.d.ts +6 -0
  87. package/es/common/contribution-store-state.js +14 -0
  88. package/es/common/contribution-store-state.js.map +1 -0
  89. package/es/common/custom-path2d.js +1 -2
  90. package/es/common/module-guard.js +1 -1
  91. package/es/common/morphing-utils.js +1 -1
  92. package/es/common/path-svg.js +1 -1
  93. package/es/common/performance-raf.js +1 -1
  94. package/es/common/polygon.js +1 -1
  95. package/es/common/rect-utils.js +1 -1
  96. package/es/common/render-area.js +1 -1
  97. package/es/common/render-command-list.js +2 -1
  98. package/es/common/render-curve.js +1 -1
  99. package/es/common/render-utils.js +1 -1
  100. package/es/common/seg-context.js +1 -1
  101. package/es/common/simplify.js +1 -1
  102. package/es/common/sort.js +1 -1
  103. package/es/common/split-path.js +1 -1
  104. package/es/common/text.js +1 -1
  105. package/es/core/camera.js +1 -1
  106. package/es/core/constants.js +1 -1
  107. package/es/core/core-modules.js +1 -2
  108. package/es/core/global.js +1 -1
  109. package/es/core/graphic-utils.js +1 -1
  110. package/es/core/index.js +1 -1
  111. package/es/core/layer-service.js +1 -1
  112. package/es/core/layer.js +1 -1
  113. package/es/core/light.js +1 -1
  114. package/es/core/stage.js +1 -1
  115. package/es/core/window.js +1 -1
  116. package/es/entries/runtime-installer-state.d.ts +12 -0
  117. package/es/entries/runtime-installer-state.js +20 -0
  118. package/es/entries/runtime-installer-state.js.map +1 -0
  119. package/es/entries/runtime-installer.d.ts +3 -1
  120. package/es/entries/runtime-installer.js +8 -9
  121. package/es/entries/runtime-installer.js.map +1 -1
  122. package/es/factory-state.d.ts +5 -0
  123. package/es/factory-state.js +14 -0
  124. package/es/factory-state.js.map +1 -0
  125. package/es/factory.d.ts +2 -0
  126. package/es/factory.js +5 -1
  127. package/es/factory.js.map +1 -1
  128. package/es/graphic/graphic-creator.d.ts +2 -29
  129. package/es/graphic/graphic-creator.js +1 -41
  130. package/es/graphic/graphic-creator.js.map +1 -1
  131. package/es/graphic/graphic-registry.d.ts +36 -0
  132. package/es/graphic/graphic-registry.js +57 -0
  133. package/es/graphic/graphic-registry.js.map +1 -0
  134. package/es/graphic/graphic.d.ts +8 -1
  135. package/es/graphic/graphic.js +22 -3
  136. package/es/graphic/graphic.js.map +1 -1
  137. package/es/graphic/index.d.ts +2 -0
  138. package/es/graphic/index.js +2 -0
  139. package/es/graphic/index.js.map +1 -1
  140. package/es/legacy/bootstrap-state.d.ts +7 -0
  141. package/es/legacy/bootstrap-state.js +17 -0
  142. package/es/legacy/bootstrap-state.js.map +1 -0
  143. package/es/legacy/bootstrap.d.ts +3 -4
  144. package/es/legacy/bootstrap.js +5 -5
  145. package/es/legacy/bootstrap.js.map +1 -1
  146. package/package.json +11 -3
@@ -34,5 +34,4 @@ class DefaultBoundsAllocate {
34
34
  }
35
35
  }
36
36
 
37
- exports.DefaultBoundsAllocate = DefaultBoundsAllocate, exports.boundsAllocate = new DefaultBoundsAllocate;
38
- //# sourceMappingURL=bounds-allocate.js.map
37
+ exports.DefaultBoundsAllocate = DefaultBoundsAllocate, exports.boundsAllocate = new DefaultBoundsAllocate;
@@ -159,4 +159,5 @@ class DefaultGraphicMemoryManager {
159
159
  }
160
160
  }
161
161
 
162
- exports.DefaultGraphicMemoryManager = DefaultGraphicMemoryManager, exports.defaultGraphicMemoryManager = new DefaultGraphicMemoryManager;
162
+ exports.DefaultGraphicMemoryManager = DefaultGraphicMemoryManager, exports.defaultGraphicMemoryManager = new DefaultGraphicMemoryManager;
163
+ //# sourceMappingURL=graphic-allocate.js.map
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  duration: 200,
7
7
  easing: "cubicOut"
8
8
  };
9
- //# sourceMappingURL=config.js.map
9
+ //# sourceMappingURL=config.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,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.application = exports.getApplicationState = exports.APPLICATION_STATE_SYMBOL = exports.Application = void 0;
6
+
7
+ class Application {}
8
+
9
+ function createApplicationState() {
10
+ return {
11
+ application: new Application
12
+ };
13
+ }
14
+
15
+ function getApplicationState() {
16
+ const scope = globalThis;
17
+ return scope[exports.APPLICATION_STATE_SYMBOL] || (scope[exports.APPLICATION_STATE_SYMBOL] = createApplicationState()),
18
+ scope[exports.APPLICATION_STATE_SYMBOL];
19
+ }
20
+
21
+ exports.Application = Application, exports.APPLICATION_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/application-state"),
22
+ exports.getApplicationState = getApplicationState, exports.application = getApplicationState().application;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/application-state.ts"],"names":[],"mappings":";;;AAgBA,MAAa,WAAW;CAiBvB;AAjBD,kCAiBC;AAEY,QAAA,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,SAAgB,mBAAmB;IACjC,MAAM,KAAK,GAAG,UAAoF,CAAC;IAEnG,IAAI,CAAC,KAAK,CAAC,gCAAwB,CAAC,EAAE;QACpC,KAAK,CAAC,gCAAwB,CAAC,GAAG,sBAAsB,EAAE,CAAC;KAC5D;IAED,OAAO,KAAK,CAAC,gCAAwB,CAAsB,CAAC;AAC9D,CAAC;AARD,kDAQC;AAEY,QAAA,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';
@@ -2,8 +2,29 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.application = exports.Application = void 0;
5
+ }), exports.getApplicationState = exports.APPLICATION_STATE_SYMBOL = exports.Application = exports.application = void 0;
6
6
 
7
- class Application {}
7
+ var application_state_1 = require("./application-state");
8
8
 
9
- exports.Application = Application, exports.application = new Application;
9
+ Object.defineProperty(exports, "application", {
10
+ enumerable: !0,
11
+ get: function() {
12
+ return application_state_1.application;
13
+ }
14
+ }), Object.defineProperty(exports, "Application", {
15
+ enumerable: !0,
16
+ get: function() {
17
+ return application_state_1.Application;
18
+ }
19
+ }), Object.defineProperty(exports, "APPLICATION_STATE_SYMBOL", {
20
+ enumerable: !0,
21
+ get: function() {
22
+ return application_state_1.APPLICATION_STATE_SYMBOL;
23
+ }
24
+ }), Object.defineProperty(exports, "getApplicationState", {
25
+ enumerable: !0,
26
+ get: function() {
27
+ return application_state_1.getApplicationState;
28
+ }
29
+ });
30
+ //# sourceMappingURL=application.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/application.ts"],"names":[],"mappings":";;;AAgBA,MAAa,WAAW;CAiBvB;AAjBD,kCAiBC;AAEY,QAAA,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,yDAA8G;AAArG,gHAAA,WAAW,OAAA;AAAE,gHAAA,WAAW,OAAA;AAAE,6HAAA,wBAAwB,OAAA;AAAE,wHAAA,mBAAmB,OAAA","file":"application.js","sourcesContent":["export { application, Application, APPLICATION_STATE_SYMBOL, getApplicationState } from './application-state';\nexport type { IApplicationState } from './application-state';\n"]}
@@ -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';
@@ -2,7 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.ContributionStore = exports.bindContributionProviderNoSingletonScope = exports.bindContributionProvider = exports.createContributionProvider = exports.ContributionProvider = void 0,
5
+ }), exports.getContributionStoreState = exports.CONTRIBUTION_STORE_STATE_SYMBOL = exports.ContributionStore = exports.bindContributionProviderNoSingletonScope = exports.bindContributionProvider = exports.createContributionProvider = exports.ContributionProvider = void 0;
6
+
7
+ const contribution_store_state_1 = require("./contribution-store-state");
8
+
6
9
  exports.ContributionProvider = Symbol("ContributionProvider");
7
10
 
8
11
  class ContributionProviderCache {
@@ -51,4 +54,19 @@ class ContributionStore {
51
54
  }
52
55
  }
53
56
 
54
- exports.ContributionStore = ContributionStore, ContributionStore.store = new Map;
57
+ exports.ContributionStore = ContributionStore, ContributionStore.store = (0, contribution_store_state_1.getContributionStoreState)().store;
58
+
59
+ var contribution_store_state_2 = require("./contribution-store-state");
60
+
61
+ Object.defineProperty(exports, "CONTRIBUTION_STORE_STATE_SYMBOL", {
62
+ enumerable: !0,
63
+ get: function() {
64
+ return contribution_store_state_2.CONTRIBUTION_STORE_STATE_SYMBOL;
65
+ }
66
+ }), Object.defineProperty(exports, "getContributionStoreState", {
67
+ enumerable: !0,
68
+ get: function() {
69
+ return contribution_store_state_2.getContributionStoreState;
70
+ }
71
+ });
72
+ //# sourceMappingURL=contribution-provider.js.map
@@ -1 +1 @@
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';\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,20 @@
1
+ "use strict";
2
+
3
+ function createContributionStoreState() {
4
+ return {
5
+ store: new Map
6
+ };
7
+ }
8
+
9
+ function getContributionStoreState() {
10
+ const scope = globalThis;
11
+ return scope[exports.CONTRIBUTION_STORE_STATE_SYMBOL] || (scope[exports.CONTRIBUTION_STORE_STATE_SYMBOL] = createContributionStoreState()),
12
+ scope[exports.CONTRIBUTION_STORE_STATE_SYMBOL];
13
+ }
14
+
15
+ Object.defineProperty(exports, "__esModule", {
16
+ value: !0
17
+ }), exports.getContributionStoreState = exports.CONTRIBUTION_STORE_STATE_SYMBOL = void 0,
18
+ exports.CONTRIBUTION_STORE_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/contribution-store-state"),
19
+ exports.getContributionStoreState = getContributionStoreState;
20
+ //# sourceMappingURL=contribution-store-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common/contribution-store-state.ts"],"names":[],"mappings":";;;AAEa,QAAA,+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,SAAgB,yBAAyB;IACvC,MAAM,KAAK,GAAG,UAAiG,CAAC;IAEhH,IAAI,CAAC,KAAK,CAAC,uCAA+B,CAAC,EAAE;QAC3C,KAAK,CAAC,uCAA+B,CAAC,GAAG,4BAA4B,EAAE,CAAC;KACzE;IAED,OAAO,KAAK,CAAC,uCAA+B,CAA4B,CAAC;AAC3E,CAAC;AARD,8DAQC","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"]}
@@ -367,5 +367,4 @@ function scale(current, sX, sY) {
367
367
  temp[3] = current[3], temp[4] = current[4], temp[5] = current[5], temp[6] = sX * current[6],
368
368
  temp[7] = sY * current[7]; else if ("h" === c || "H" === c) temp[1] = sX * current[1]; else if ("v" === c || "V" === c) temp[1] = sY * current[1]; else for (let i = 1, n = current.length; i < n; ++i) temp[i] = (i % 2 == 1 ? sX : sY) * current[i];
369
369
  return temp;
370
- }
371
- //# sourceMappingURL=custom-path2d.js.map
370
+ }
@@ -8,4 +8,4 @@ function isBindingContextLoaded(loadedContexts, context) {
8
8
  Object.defineProperty(exports, "__esModule", {
9
9
  value: !0
10
10
  }), exports.isBindingContextLoaded = void 0, exports.isBindingContextLoaded = isBindingContextLoaded;
11
- //# sourceMappingURL=module-guard.js.map
11
+ //# sourceMappingURL=module-guard.js.map
@@ -200,4 +200,4 @@ exports.cubicSubdivide = cubicSubdivide, exports.alignSubpath = alignSubpath, ex
200
200
  exports.findBestMorphingRotation = findBestMorphingRotation, exports.alignBezierCurves = alignBezierCurves,
201
201
  exports.pathToBezierCurves = pathToBezierCurves, exports.applyTransformOnBezierCurves = applyTransformOnBezierCurves,
202
202
  exports.bezierCurversToPath = bezierCurversToPath;
203
- //# sourceMappingURL=morphing-utils.js.map
203
+ //# sourceMappingURL=morphing-utils.js.map
@@ -61,4 +61,4 @@ exports.enumCommandMap = {
61
61
  Q: 7,
62
62
  R: 8
63
63
  }, exports.parseSvgPath = parseSvgPath;
64
- //# sourceMappingURL=path-svg.js.map
64
+ //# sourceMappingURL=path-svg.js.map
@@ -34,4 +34,4 @@ class PerformanceRAF {
34
34
  }
35
35
 
36
36
  exports.PerformanceRAF = PerformanceRAF;
37
- //# sourceMappingURL=performance-raf.js.map
37
+ //# sourceMappingURL=performance-raf.js.map
@@ -41,8 +41,8 @@ function getProportionPoint(point, segment, length, dx, dy) {
41
41
  };
42
42
  }
43
43
 
44
- //# sourceMappingURL=polygon.js.map
45
44
  Object.defineProperty(exports, "__esModule", {
46
45
  value: !0
47
46
  }), exports.drawRoundedPolygon = exports.drawPolygon = void 0, exports.drawPolygon = drawPolygon,
48
- exports.drawRoundedPolygon = drawRoundedPolygon;
47
+ exports.drawRoundedPolygon = drawRoundedPolygon;
48
+ //# sourceMappingURL=polygon.js.map
@@ -24,4 +24,4 @@ const vutils_1 = require("@visactor/vutils"), normalizeRectAttributes = attribut
24
24
  };
25
25
 
26
26
  exports.normalizeRectAttributes = normalizeRectAttributes;
27
- //# sourceMappingURL=rect-utils.js.map
27
+ //# sourceMappingURL=rect-utils.js.map
@@ -61,5 +61,5 @@ function drawAreaBlock(path, topList, bottomList, params) {
61
61
  path.closePath();
62
62
  }
63
63
 
64
+ exports.drawAreaSegments = drawAreaSegments;
64
65
  //# sourceMappingURL=render-area.js.map
65
- exports.drawAreaSegments = drawAreaSegments;
@@ -13,4 +13,5 @@ function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy = 1, z
13
13
  }
14
14
  }
15
15
 
16
- exports.renderCommandList = renderCommandList;
16
+ exports.renderCommandList = renderCommandList;
17
+ //# sourceMappingURL=render-command-list.js.map
@@ -99,4 +99,4 @@ function drawIncrementalAreaSegments(path, lastSeg, segments, params) {
99
99
 
100
100
  exports.drawSegments = drawSegments, exports.drawIncrementalSegments = drawIncrementalSegments,
101
101
  exports.drawIncrementalAreaSegments = drawIncrementalAreaSegments;
102
- //# sourceMappingURL=render-curve.js.map
102
+ //# sourceMappingURL=render-curve.js.map
@@ -19,4 +19,4 @@ function drawSegItem(ctx, curve, endPercent, params) {
19
19
  }
20
20
 
21
21
  exports.drawSegItem = drawSegItem;
22
- //# sourceMappingURL=render-utils.js.map
22
+ //# sourceMappingURL=render-utils.js.map
@@ -95,4 +95,4 @@ class ReflectSegContext extends SegContext {
95
95
  }
96
96
 
97
97
  exports.ReflectSegContext = ReflectSegContext;
98
- //# sourceMappingURL=seg-context.js.map
98
+ //# sourceMappingURL=seg-context.js.map
@@ -36,4 +36,4 @@ function flatten_simplify(points, tolerance, highestQuality) {
36
36
  Object.defineProperty(exports, "__esModule", {
37
37
  value: !0
38
38
  }), exports.flatten_simplify = void 0, exports.flatten_simplify = flatten_simplify;
39
- //# sourceMappingURL=simplify.js.map
39
+ //# sourceMappingURL=simplify.js.map
@@ -101,4 +101,4 @@ Object.defineProperty(exports, "__esModule", {
101
101
  value: !0
102
102
  }), exports.findNextGraphic = exports.foreachAsync = exports.foreach = void 0, exports.foreach = foreach,
103
103
  exports.foreachAsync = foreachAsync, exports.findNextGraphic = findNextGraphic;
104
- //# sourceMappingURL=sort.js.map
104
+ //# sourceMappingURL=sort.js.map
@@ -269,4 +269,4 @@ const splitPath = (path, count) => {
269
269
  };
270
270
 
271
271
  exports.splitPath = splitPath;
272
- //# sourceMappingURL=split-path.js.map
272
+ //# sourceMappingURL=split-path.js.map
@@ -34,4 +34,4 @@ function textAttributesToStyle(attrs) {
34
34
 
35
35
  exports.textDrawOffsetY = textDrawOffsetY, exports.textDrawOffsetX = textDrawOffsetX,
36
36
  exports.textLayoutOffsetY = textLayoutOffsetY, exports.textAttributesToStyle = textAttributesToStyle;
37
- //# sourceMappingURL=text.js.map
37
+ //# sourceMappingURL=text.js.map
@@ -71,4 +71,4 @@ const registerOrthoCamera = () => {
71
71
  };
72
72
 
73
73
  exports.registerOrthoCamera = registerOrthoCamera;
74
- //# sourceMappingURL=camera.js.map
74
+ //# sourceMappingURL=camera.js.map
@@ -7,4 +7,4 @@ exports.TransformUtil = Symbol.for("TransformUtil"), exports.GraphicUtil = Symbo
7
7
  exports.LayerService = Symbol.for("LayerService"), exports.StaticLayerHandlerContribution = Symbol.for("StaticLayerHandlerContribution"),
8
8
  exports.DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribution"),
9
9
  exports.VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
10
- //# sourceMappingURL=constants.js.map
10
+ //# sourceMappingURL=constants.js.map
@@ -15,5 +15,4 @@ function bindCoreModules({bind: bind}) {
15
15
  bind(constants_1.LayerService).to(layer_service_1.DefaultLayerService).inSingletonScope();
16
16
  }
17
17
 
18
- exports.bindCoreModules = bindCoreModules, exports.default = bindCoreModules;
19
- //# sourceMappingURL=core-modules.js.map
18
+ exports.bindCoreModules = bindCoreModules, exports.default = bindCoreModules;
@@ -222,4 +222,4 @@ class DefaultGlobal extends event_listener_manager_1.EventListenerManager {
222
222
  }
223
223
 
224
224
  exports.DefaultGlobal = DefaultGlobal;
225
- //# sourceMappingURL=global.js.map
225
+ //# sourceMappingURL=global.js.map
@@ -162,4 +162,4 @@ class DefaultTransformUtil {
162
162
  }
163
163
 
164
164
  exports.DefaultTransformUtil = DefaultTransformUtil;
165
- //# sourceMappingURL=graphic-utils.js.map
165
+ //# sourceMappingURL=graphic-utils.js.map
package/cjs/core/index.js CHANGED
@@ -22,4 +22,4 @@ __exportStar(require("./layer"), exports), __exportStar(require("./stage"), expo
22
22
  __exportStar(require("./graphic-utils"), exports), __exportStar(require("./contributions"), exports),
23
23
  __exportStar(require("./layer-service"), exports), __exportStar(require("./constants"), exports),
24
24
  __exportStar(require("../interface/core"), exports);
25
- //# sourceMappingURL=index.js.map
25
+ //# sourceMappingURL=index.js.map
@@ -81,4 +81,4 @@ class DefaultLayerService {
81
81
 
82
82
  exports.DefaultLayerService = DefaultLayerService, DefaultLayerService.idprefix = "visactor_layer",
83
83
  DefaultLayerService.prefix_count = 0;
84
- //# sourceMappingURL=layer-service.js.map
84
+ //# sourceMappingURL=layer-service.js.map
package/cjs/core/layer.js CHANGED
@@ -116,4 +116,4 @@ class Layer extends group_1.Group {
116
116
  }
117
117
 
118
118
  exports.Layer = Layer;
119
- //# sourceMappingURL=layer.js.map
119
+ //# sourceMappingURL=layer.js.map
package/cjs/core/light.js CHANGED
@@ -29,4 +29,4 @@ const registerDirectionalLight = () => {
29
29
  };
30
30
 
31
31
  exports.registerDirectionalLight = registerDirectionalLight;
32
- //# sourceMappingURL=light.js.map
32
+ //# sourceMappingURL=light.js.map
package/cjs/core/stage.js CHANGED
@@ -565,4 +565,4 @@ class Stage extends group_1.Group {
565
565
  }
566
566
 
567
567
  exports.Stage = Stage;
568
- //# sourceMappingURL=stage.js.map
568
+ //# sourceMappingURL=stage.js.map
@@ -150,4 +150,4 @@ class DefaultWindow extends event_listener_manager_1.EventListenerManager {
150
150
  }
151
151
 
152
152
  exports.DefaultWindow = DefaultWindow;
153
- //# sourceMappingURL=window.js.map
153
+ //# sourceMappingURL=window.js.map
@@ -0,0 +1,12 @@
1
+ import type { IGlobal, IDrawItemInterceptorContribution } from '../interface';
2
+ import { type ILegacyBindingContext } from '../legacy/binding-context';
3
+ export declare const RUNTIME_INSTALLER_STATE_SYMBOL: unique symbol;
4
+ export interface IRuntimeInstallerState {
5
+ runtimeInstallerContext: ILegacyBindingContext;
6
+ preloaded: boolean;
7
+ runtimeGlobal?: IGlobal;
8
+ runtimeEntryKeys: WeakMap<object, Map<string, Set<string>>>;
9
+ runtimeDrawContributions: WeakMap<object, Set<IDrawItemInterceptorContribution>>;
10
+ loadedRuntimeContributionModules: WeakMap<object, WeakSet<object>>;
11
+ }
12
+ export declare function getRuntimeInstallerState(): IRuntimeInstallerState;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.getRuntimeInstallerState = exports.RUNTIME_INSTALLER_STATE_SYMBOL = void 0;
6
+
7
+ const binding_context_1 = require("../legacy/binding-context");
8
+
9
+ function createRuntimeInstallerState() {
10
+ return {
11
+ runtimeInstallerContext: (0, binding_context_1.createLegacyBindingContext)(),
12
+ preloaded: !1,
13
+ runtimeEntryKeys: new WeakMap,
14
+ runtimeDrawContributions: new WeakMap,
15
+ loadedRuntimeContributionModules: new WeakMap
16
+ };
17
+ }
18
+
19
+ function getRuntimeInstallerState() {
20
+ const scope = globalThis;
21
+ return scope[exports.RUNTIME_INSTALLER_STATE_SYMBOL] || (scope[exports.RUNTIME_INSTALLER_STATE_SYMBOL] = createRuntimeInstallerState()),
22
+ scope[exports.RUNTIME_INSTALLER_STATE_SYMBOL];
23
+ }
24
+
25
+ exports.RUNTIME_INSTALLER_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/runtime-installer-state"),
26
+ exports.getRuntimeInstallerState = getRuntimeInstallerState;
27
+ //# sourceMappingURL=runtime-installer-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/entries/runtime-installer-state.ts"],"names":[],"mappings":";;;AACA,+DAAmG;AAEtF,QAAA,8BAA8B,GAAG,MAAM,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;AAW3G,SAAS,2BAA2B;IAClC,OAAO;QACL,uBAAuB,EAAE,IAAA,4CAA0B,GAAE;QACrD,SAAS,EAAE,KAAK;QAChB,gBAAgB,EAAE,IAAI,OAAO,EAAoC;QACjE,wBAAwB,EAAE,IAAI,OAAO,EAAiD;QACtF,gCAAgC,EAAE,IAAI,OAAO,EAA2B;KACzE,CAAC;AACJ,CAAC;AAED,SAAgB,wBAAwB;IACtC,MAAM,KAAK,GAAG,UAA+F,CAAC;IAE9G,IAAI,CAAC,KAAK,CAAC,sCAA8B,CAAC,EAAE;QAC1C,KAAK,CAAC,sCAA8B,CAAC,GAAG,2BAA2B,EAAE,CAAC;KACvE;IAED,OAAO,KAAK,CAAC,sCAA8B,CAA2B,CAAC;AACzE,CAAC;AARD,4DAQC","file":"runtime-installer-state.js","sourcesContent":["import type { IGlobal, IDrawItemInterceptorContribution } from '../interface';\nimport { createLegacyBindingContext, type ILegacyBindingContext } from '../legacy/binding-context';\n\nexport const RUNTIME_INSTALLER_STATE_SYMBOL = Symbol.for('@visactor/vrender-core/runtime-installer-state');\n\nexport interface IRuntimeInstallerState {\n runtimeInstallerContext: ILegacyBindingContext;\n preloaded: boolean;\n runtimeGlobal?: IGlobal;\n runtimeEntryKeys: WeakMap<object, Map<string, Set<string>>>;\n runtimeDrawContributions: WeakMap<object, Set<IDrawItemInterceptorContribution>>;\n loadedRuntimeContributionModules: WeakMap<object, WeakSet<object>>;\n}\n\nfunction createRuntimeInstallerState(): IRuntimeInstallerState {\n return {\n runtimeInstallerContext: createLegacyBindingContext(),\n preloaded: false,\n runtimeEntryKeys: new WeakMap<object, Map<string, Set<string>>>(),\n runtimeDrawContributions: new WeakMap<object, Set<IDrawItemInterceptorContribution>>(),\n loadedRuntimeContributionModules: new WeakMap<object, WeakSet<object>>()\n };\n}\n\nexport function getRuntimeInstallerState(): IRuntimeInstallerState {\n const scope = globalThis as typeof globalThis & { [RUNTIME_INSTALLER_STATE_SYMBOL]?: IRuntimeInstallerState };\n\n if (!scope[RUNTIME_INSTALLER_STATE_SYMBOL]) {\n scope[RUNTIME_INSTALLER_STATE_SYMBOL] = createRuntimeInstallerState();\n }\n\n return scope[RUNTIME_INSTALLER_STATE_SYMBOL] as IRuntimeInstallerState;\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import type { IGlobal, IGraphicPicker } from '../interface';
2
2
  import type { IApp } from './types';
3
3
  import type { ServiceIdentifier } from '../common/explicit-binding';
4
- import { type ILegacyBindingContext } from '../legacy/binding-context';
4
+ import type { ILegacyBindingContext } from '../legacy/binding-context';
5
5
  export type TRuntimeContributionModuleRegistry = (bind: ILegacyBindingContext['bind'], unbind: (serviceIdentifier: ServiceIdentifier) => void, isBound: ILegacyBindingContext['isBound'], rebind: ILegacyBindingContext['rebind']) => void;
6
6
  export type TRuntimeContributionModule = ((context: ILegacyBindingContext) => void) | {
7
7
  registry: TRuntimeContributionModuleRegistry;
@@ -18,6 +18,8 @@ export declare function getRuntimeInstallerBindingContext(): ILegacyBindingConte
18
18
  export declare function refreshRuntimeInstallerContributions(): void;
19
19
  export declare function getRuntimeInstallerGlobal(): IGlobal;
20
20
  export declare function configureRuntimeApplicationForApp(app: IApp): void;
21
+ export { RUNTIME_INSTALLER_STATE_SYMBOL, getRuntimeInstallerState } from './runtime-installer-state';
22
+ export type { IRuntimeInstallerState } from './runtime-installer-state';
21
23
  export declare function installRuntimeGraphicRenderersToApp(app: IApp): void;
22
24
  export declare function installRuntimeDrawContributionsToApp(app: IApp): void;
23
25
  export declare function installRuntimePickersToApp<T extends IGraphicPicker>(app: IApp, serviceIdentifier: ServiceIdentifier<T>): void;
@@ -8,17 +8,13 @@ var __importDefault = this && this.__importDefault || function(mod) {
8
8
 
9
9
  Object.defineProperty(exports, "__esModule", {
10
10
  value: !0
11
- }), exports.installRuntimeContributionModule = exports.installRuntimePickersToApp = exports.installRuntimeDrawContributionsToApp = exports.installRuntimeGraphicRenderersToApp = exports.configureRuntimeApplicationForApp = exports.getRuntimeInstallerGlobal = exports.refreshRuntimeInstallerContributions = exports.getRuntimeInstallerBindingContext = void 0;
11
+ }), exports.installRuntimeContributionModule = exports.installRuntimePickersToApp = exports.installRuntimeDrawContributionsToApp = exports.installRuntimeGraphicRenderersToApp = exports.getRuntimeInstallerState = exports.RUNTIME_INSTALLER_STATE_SYMBOL = exports.configureRuntimeApplicationForApp = exports.getRuntimeInstallerGlobal = exports.refreshRuntimeInstallerContributions = exports.getRuntimeInstallerBindingContext = void 0;
12
12
 
13
- const application_1 = require("../application"), constants_1 = require("../canvas/constants"), contribution_provider_1 = require("../common/contribution-provider"), constants_2 = require("../constants"), modules_1 = __importDefault(require("../core/contributions/modules")), global_1 = require("../core/global"), window_1 = require("../core/window"), core_modules_1 = __importDefault(require("../core/core-modules")), graphic_module_1 = __importDefault(require("../graphic/graphic-service/graphic-module")), binding_context_1 = require("../legacy/binding-context"), bootstrap_1 = require("../legacy/bootstrap"), pick_modules_1 = __importDefault(require("../picker/pick-modules")), constants_3 = require("../render/contributions/render/contributions/constants"), draw_interceptor_1 = require("../render/contributions/render/draw-interceptor"), incremental_area_render_1 = require("../render/contributions/render/incremental-area-render"), incremental_draw_contribution_1 = require("../render/contributions/render/incremental-draw-contribution"), incremental_line_render_1 = require("../render/contributions/render/incremental-line-render"), render_modules_1 = __importDefault(require("../render/render-modules")), symbol_1 = require("../render/contributions/render/symbol"), modules_2 = __importDefault(require("../render/contributions/modules")), constants_4 = require("../plugins/constants"), plugin_service_1 = require("../plugins/plugin-service"), runtimeInstallerContext = (0,
14
- binding_context_1.createLegacyBindingContext)();
15
-
16
- let runtimeGlobal, runtimeInstallerPreloaded = !1;
17
-
18
- const RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer", RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker", runtimeEntryKeys = new WeakMap, runtimeDrawContributions = new WeakMap, loadedRuntimeContributionModules = new WeakMap, DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = [ "graphic-renderer" ], noopUnbindRuntimeContributionService = () => {};
13
+ const application_1 = require("../application"), constants_1 = require("../canvas/constants"), contribution_provider_1 = require("../common/contribution-provider"), constants_2 = require("../constants"), modules_1 = __importDefault(require("../core/contributions/modules")), global_1 = require("../core/global"), window_1 = require("../core/window"), core_modules_1 = __importDefault(require("../core/core-modules")), graphic_module_1 = __importDefault(require("../graphic/graphic-service/graphic-module")), bootstrap_1 = require("../legacy/bootstrap"), pick_modules_1 = __importDefault(require("../picker/pick-modules")), constants_3 = require("../render/contributions/render/contributions/constants"), draw_interceptor_1 = require("../render/contributions/render/draw-interceptor"), incremental_area_render_1 = require("../render/contributions/render/incremental-area-render"), incremental_draw_contribution_1 = require("../render/contributions/render/incremental-draw-contribution"), incremental_line_render_1 = require("../render/contributions/render/incremental-line-render"), render_modules_1 = __importDefault(require("../render/render-modules")), symbol_1 = require("../render/contributions/render/symbol"), modules_2 = __importDefault(require("../render/contributions/modules")), constants_4 = require("../plugins/constants"), plugin_service_1 = require("../plugins/plugin-service"), runtime_installer_state_1 = require("./runtime-installer-state"), runtimeInstallerState = (0,
14
+ runtime_installer_state_1.getRuntimeInstallerState)(), runtimeInstallerContext = runtimeInstallerState.runtimeInstallerContext, RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer", RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker", runtimeEntryKeys = runtimeInstallerState.runtimeEntryKeys, runtimeDrawContributions = runtimeInstallerState.runtimeDrawContributions, loadedRuntimeContributionModules = runtimeInstallerState.loadedRuntimeContributionModules, DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = [ "graphic-renderer" ], noopUnbindRuntimeContributionService = () => {};
19
15
 
20
16
  function ensureRuntimeInstallerPreloaded() {
21
- runtimeInstallerPreloaded || (runtimeInstallerPreloaded = !0, (0, core_modules_1.default)({
17
+ runtimeInstallerState.preloaded || (runtimeInstallerState.preloaded = !0, (0, core_modules_1.default)({
22
18
  bind: runtimeInstallerContext.bind
23
19
  }), (0, graphic_module_1.default)({
24
20
  bind: runtimeInstallerContext.bind
@@ -71,9 +67,10 @@ function refreshRuntimeInstallerContributions() {
71
67
  }
72
68
 
73
69
  function getRuntimeInstallerGlobal() {
74
- return ensureRuntimeInstallerPreloaded(), null != runtimeGlobal || (runtimeGlobal = new global_1.DefaultGlobal((0,
70
+ var _a;
71
+ return ensureRuntimeInstallerPreloaded(), null !== (_a = runtimeInstallerState.runtimeGlobal) && void 0 !== _a || (runtimeInstallerState.runtimeGlobal = new global_1.DefaultGlobal((0,
75
72
  contribution_provider_1.createContributionProvider)(constants_2.EnvContribution, runtimeInstallerContext))),
76
- runtimeGlobal;
73
+ runtimeInstallerState.runtimeGlobal;
77
74
  }
78
75
 
79
76
  function configureRuntimeApplicationForApp(app) {
@@ -89,6 +86,11 @@ function configureRuntimeApplicationForApp(app) {
89
86
  contribution_provider_1.createContributionProvider)(constants_3.AreaRenderContribution, bindingContext)), createAppRegistryContributionProvider(app, draw_interceptor_1.DrawItemInterceptor));
90
87
  }
91
88
 
89
+ exports.getRuntimeInstallerBindingContext = getRuntimeInstallerBindingContext, exports.refreshRuntimeInstallerContributions = refreshRuntimeInstallerContributions,
90
+ exports.getRuntimeInstallerGlobal = getRuntimeInstallerGlobal, exports.configureRuntimeApplicationForApp = configureRuntimeApplicationForApp;
91
+
92
+ var runtime_installer_state_2 = require("./runtime-installer-state");
93
+
92
94
  function installRuntimeGraphicRenderersToApp(app) {
93
95
  var _a;
94
96
  const bindingContext = getRuntimeInstallerBindingContext();
@@ -172,9 +174,17 @@ function installRuntimeContributionModule(module, {app: app, legacy: legacy = !0
172
174
  app && installRuntimeContributionTargetsToApp(app, targets);
173
175
  }
174
176
 
175
- exports.getRuntimeInstallerBindingContext = getRuntimeInstallerBindingContext, exports.refreshRuntimeInstallerContributions = refreshRuntimeInstallerContributions,
176
- exports.getRuntimeInstallerGlobal = getRuntimeInstallerGlobal, exports.configureRuntimeApplicationForApp = configureRuntimeApplicationForApp,
177
- exports.installRuntimeGraphicRenderersToApp = installRuntimeGraphicRenderersToApp,
177
+ Object.defineProperty(exports, "RUNTIME_INSTALLER_STATE_SYMBOL", {
178
+ enumerable: !0,
179
+ get: function() {
180
+ return runtime_installer_state_2.RUNTIME_INSTALLER_STATE_SYMBOL;
181
+ }
182
+ }), Object.defineProperty(exports, "getRuntimeInstallerState", {
183
+ enumerable: !0,
184
+ get: function() {
185
+ return runtime_installer_state_2.getRuntimeInstallerState;
186
+ }
187
+ }), exports.installRuntimeGraphicRenderersToApp = installRuntimeGraphicRenderersToApp,
178
188
  exports.installRuntimeDrawContributionsToApp = installRuntimeDrawContributionsToApp,
179
189
  exports.installRuntimePickersToApp = installRuntimePickersToApp, exports.installRuntimeContributionModule = installRuntimeContributionModule;
180
190
  //# sourceMappingURL=runtime-installer.js.map