@visactor/vrender-core 1.1.3 → 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.
- package/cjs/allocator/bounds-allocate.js +1 -2
- package/cjs/allocator/graphic-allocate.js +2 -1
- package/cjs/animate/config.js +1 -1
- package/cjs/application-state.d.ts +27 -0
- package/cjs/application-state.js +22 -0
- package/cjs/application-state.js.map +1 -0
- package/cjs/application.d.ts +2 -22
- package/cjs/application.js +24 -3
- package/cjs/application.js.map +1 -1
- package/cjs/common/bounds-context.js +1 -2
- package/cjs/common/contribution-provider.d.ts +2 -1
- package/cjs/common/contribution-provider.js +20 -2
- package/cjs/common/contribution-provider.js.map +1 -1
- package/cjs/common/contribution-store-state.d.ts +6 -0
- package/cjs/common/contribution-store-state.js +20 -0
- package/cjs/common/contribution-store-state.js.map +1 -0
- package/cjs/common/performance-raf.js +1 -2
- package/cjs/common/render-command-list.js +2 -1
- package/cjs/common/simplify.js +1 -1
- package/cjs/common/sort.js +1 -1
- package/cjs/common/split-path.js +1 -1
- package/cjs/common/text.js +1 -1
- package/cjs/entries/runtime-installer-state.d.ts +12 -0
- package/cjs/entries/runtime-installer-state.js +27 -0
- package/cjs/entries/runtime-installer-state.js.map +1 -0
- package/cjs/entries/runtime-installer.d.ts +3 -1
- package/cjs/entries/runtime-installer.js +23 -13
- package/cjs/entries/runtime-installer.js.map +1 -1
- package/cjs/factory-state.d.ts +5 -0
- package/cjs/factory-state.js +19 -0
- package/cjs/factory-state.js.map +1 -0
- package/cjs/factory.d.ts +2 -0
- package/cjs/factory.js +18 -2
- package/cjs/factory.js.map +1 -1
- package/cjs/graphic/graphic-creator.d.ts +2 -29
- package/cjs/graphic/graphic-creator.js +24 -38
- package/cjs/graphic/graphic-creator.js.map +1 -1
- package/cjs/graphic/graphic-registry.d.ts +36 -0
- package/cjs/graphic/graphic-registry.js +65 -0
- package/cjs/graphic/graphic-registry.js.map +1 -0
- package/cjs/graphic/index.d.ts +2 -0
- package/cjs/graphic/index.js +29 -16
- package/cjs/graphic/index.js.map +1 -1
- package/cjs/legacy/bootstrap-state.d.ts +7 -0
- package/cjs/legacy/bootstrap-state.js +24 -0
- package/cjs/legacy/bootstrap-state.js.map +1 -0
- package/cjs/legacy/bootstrap.d.ts +3 -4
- package/cjs/legacy/bootstrap.js +20 -7
- package/cjs/legacy/bootstrap.js.map +1 -1
- package/dist/index.es.js +110 -22
- package/es/allocator/bounds-allocate.js +1 -2
- package/es/allocator/graphic-allocate.js +2 -1
- package/es/animate/config.js +1 -1
- package/es/application-state.d.ts +27 -0
- package/es/application-state.js +17 -0
- package/es/application-state.js.map +1 -0
- package/es/application.d.ts +2 -22
- package/es/application.js +2 -3
- package/es/application.js.map +1 -1
- package/es/common/bounds-context.js +1 -2
- package/es/common/contribution-provider.d.ts +2 -1
- package/es/common/contribution-provider.js +6 -1
- package/es/common/contribution-provider.js.map +1 -1
- package/es/common/contribution-store-state.d.ts +6 -0
- package/es/common/contribution-store-state.js +14 -0
- package/es/common/contribution-store-state.js.map +1 -0
- package/es/common/performance-raf.js +1 -2
- package/es/common/render-command-list.js +2 -1
- package/es/common/simplify.js +1 -1
- package/es/common/sort.js +1 -1
- package/es/common/split-path.js +1 -1
- package/es/common/text.js +1 -1
- package/es/entries/runtime-installer-state.d.ts +12 -0
- package/es/entries/runtime-installer-state.js +20 -0
- package/es/entries/runtime-installer-state.js.map +1 -0
- package/es/entries/runtime-installer.d.ts +3 -1
- package/es/entries/runtime-installer.js +8 -9
- package/es/entries/runtime-installer.js.map +1 -1
- package/es/factory-state.d.ts +5 -0
- package/es/factory-state.js +14 -0
- package/es/factory-state.js.map +1 -0
- package/es/factory.d.ts +2 -0
- package/es/factory.js +5 -1
- package/es/factory.js.map +1 -1
- package/es/graphic/graphic-creator.d.ts +2 -29
- package/es/graphic/graphic-creator.js +1 -41
- package/es/graphic/graphic-creator.js.map +1 -1
- package/es/graphic/graphic-registry.d.ts +36 -0
- package/es/graphic/graphic-registry.js +57 -0
- package/es/graphic/graphic-registry.js.map +1 -0
- package/es/graphic/index.d.ts +2 -0
- package/es/graphic/index.js +2 -0
- package/es/graphic/index.js.map +1 -1
- package/es/legacy/bootstrap-state.d.ts +7 -0
- package/es/legacy/bootstrap-state.js +17 -0
- package/es/legacy/bootstrap-state.js.map +1 -0
- package/es/legacy/bootstrap.d.ts +3 -4
- package/es/legacy/bootstrap.js +5 -5
- package/es/legacy/bootstrap.js.map +1 -1
- package/package.json +11 -3
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
|
|
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
|
|
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
|
-
|
|
16968
|
+
sharedGraphicRegistry.graphicFactory.register(name, createGraphicCtor(creator));
|
|
16942
16969
|
}
|
|
16943
16970
|
function createGraphic(name, attributes) {
|
|
16944
|
-
return
|
|
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 =
|
|
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
|
|
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 (
|
|
23469
|
+
if (legacyBootstrapState.preloaded) {
|
|
23399
23470
|
return;
|
|
23400
23471
|
}
|
|
23401
|
-
|
|
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
|
|
26838
|
-
|
|
26839
|
-
|
|
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 =
|
|
26843
|
-
const runtimeDrawContributions =
|
|
26844
|
-
const loadedRuntimeContributionModules =
|
|
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 (
|
|
26935
|
+
if (runtimeInstallerState.preloaded) {
|
|
26849
26936
|
return;
|
|
26850
26937
|
}
|
|
26851
|
-
|
|
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 &&
|
|
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 };
|
|
@@ -151,4 +151,5 @@ export class DefaultGraphicMemoryManager {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
export const defaultGraphicMemoryManager = new DefaultGraphicMemoryManager;
|
|
154
|
+
export const defaultGraphicMemoryManager = new DefaultGraphicMemoryManager;
|
|
155
|
+
//# sourceMappingURL=graphic-allocate.js.map
|
package/es/animate/config.js
CHANGED
|
@@ -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"]}
|
package/es/application.d.ts
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
export const application = new Application;
|
|
1
|
+
export { application, Application, APPLICATION_STATE_SYMBOL, getApplicationState } from "./application-state";
|
|
2
|
+
//# sourceMappingURL=application.js.map
|
package/es/application.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/application.ts"],"names":[],"mappings":"
|
|
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"]}
|
|
@@ -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,4 +45,7 @@ export class ContributionStore {
|
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
ContributionStore.store =
|
|
48
|
+
ContributionStore.store = getContributionStoreState().store;
|
|
49
|
+
|
|
50
|
+
export { CONTRIBUTION_STORE_STATE_SYMBOL, getContributionStoreState } from "./contribution-store-state";
|
|
51
|
+
//# sourceMappingURL=contribution-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/common/contribution-provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/common/contribution-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,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,GAAG,yBAAyB,EAAE,CAAC,KAAyE,CAAC;AAwBvH,OAAO,EAAE,+BAA+B,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC","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"]}
|
package/es/common/simplify.js
CHANGED
|
@@ -30,4 +30,4 @@ export function flatten_simplify(points, tolerance, highestQuality) {
|
|
|
30
30
|
if (points.length <= 10) return points;
|
|
31
31
|
return points = highestQuality ? points : simplifyRadialDist(points, void 0 !== tolerance ? tolerance * tolerance : 1);
|
|
32
32
|
}
|
|
33
|
-
//# sourceMappingURL=simplify.js.map
|
|
33
|
+
//# sourceMappingURL=simplify.js.map
|
package/es/common/sort.js
CHANGED
package/es/common/split-path.js
CHANGED
package/es/common/text.js
CHANGED
|
@@ -24,4 +24,4 @@ export function textAttributesToStyle(attrs) {
|
|
|
24
24
|
attrs.underline ? style["text-decoration"] = "underline" : attrs.lineThrough && (style["text-decoration"] = "line-through"),
|
|
25
25
|
attrs.fill && isString(attrs.fill) && (style.color = attrs.fill), style;
|
|
26
26
|
}
|
|
27
|
-
//# sourceMappingURL=text.js.map
|
|
27
|
+
//# sourceMappingURL=text.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,20 @@
|
|
|
1
|
+
import { createLegacyBindingContext } from "../legacy/binding-context";
|
|
2
|
+
|
|
3
|
+
export const RUNTIME_INSTALLER_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/runtime-installer-state");
|
|
4
|
+
|
|
5
|
+
function createRuntimeInstallerState() {
|
|
6
|
+
return {
|
|
7
|
+
runtimeInstallerContext: createLegacyBindingContext(),
|
|
8
|
+
preloaded: !1,
|
|
9
|
+
runtimeEntryKeys: new WeakMap,
|
|
10
|
+
runtimeDrawContributions: new WeakMap,
|
|
11
|
+
loadedRuntimeContributionModules: new WeakMap
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function getRuntimeInstallerState() {
|
|
16
|
+
const scope = globalThis;
|
|
17
|
+
return scope[RUNTIME_INSTALLER_STATE_SYMBOL] || (scope[RUNTIME_INSTALLER_STATE_SYMBOL] = createRuntimeInstallerState()),
|
|
18
|
+
scope[RUNTIME_INSTALLER_STATE_SYMBOL];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=runtime-installer-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/entries/runtime-installer-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAA8B,MAAM,2BAA2B,CAAC;AAEnG,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;AAW3G,SAAS,2BAA2B;IAClC,OAAO;QACL,uBAAuB,EAAE,0BAA0B,EAAE;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,MAAM,UAAU,wBAAwB;IACtC,MAAM,KAAK,GAAG,UAA+F,CAAC;IAE9G,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,EAAE;QAC1C,KAAK,CAAC,8BAA8B,CAAC,GAAG,2BAA2B,EAAE,CAAC;KACvE;IAED,OAAO,KAAK,CAAC,8BAA8B,CAA2B,CAAC;AACzE,CAAC","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 {
|
|
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;
|