UNPKG

@visactor/vrender-core

Version:

```typescript import { xxx } from '@visactor/vrender-core'; ```

63 lines (55 loc) 4.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.configureLegacyApplication = exports.layerService = exports.graphicService = exports.transformUtil = exports.graphicUtil = exports.container = exports.getLegacyBindingContext = exports.preLoadAllModule = exports.vglobal = void 0; const application_1 = require("./application"), constants_1 = require("./graphic/constants"), constants_2 = require("./core/constants"), constants_3 = require("./render/constants"), constants_4 = require("./plugins/constants"), constants_5 = require("./picker/constants"), constants_6 = require("./canvas/constants"), symbol_1 = require("./render/contributions/render/symbol"), window_1 = require("./core/window"), global_1 = require("./global"), bootstrap_1 = require("./legacy/bootstrap"); var global_2 = require("./global"); Object.defineProperty(exports, "vglobal", { enumerable: !0, get: function() { return global_2.vglobal; } }); var bootstrap_2 = require("./legacy/bootstrap"); function resolveLegacyWindowHandler(env) { const handler = (0, bootstrap_1.resolveLegacyNamed)(window_1.WindowHandlerContribution, env); if (!handler) throw new Error(`Window handler is not configured for env: ${env}`); return handler; } function configureLegacyApplication() { application_1.application.global = global_1.vglobal, application_1.application.graphicUtil = exports.graphicUtil, application_1.application.transformUtil = exports.transformUtil, application_1.application.graphicService = exports.graphicService, application_1.application.layerService = exports.layerService, application_1.application.canvasFactory = env => (0, bootstrap_1.resolveLegacyNamed)(constants_6.CanvasFactory, env), application_1.application.context2dFactory = env => (0, bootstrap_1.resolveLegacyNamed)(constants_6.Context2dFactory, env), application_1.application.windowFactory = () => new window_1.DefaultWindow(application_1.application.global), application_1.application.windowHandlerFactory = env => resolveLegacyWindowHandler(env), application_1.application.renderServiceFactory = () => (0, bootstrap_1.resolveLegacySingleton)(constants_3.RenderService), application_1.application.renderService = (0, bootstrap_1.createLegacySingletonProxy)((() => (0, bootstrap_1.resolveLegacySingleton)(constants_3.RenderService))), application_1.application.pluginServiceFactory = () => (0, bootstrap_1.resolveLegacySingleton)(constants_4.PluginService), application_1.application.pluginService = (0, bootstrap_1.createLegacySingletonProxy)((() => (0, bootstrap_1.resolveLegacySingleton)(constants_4.PluginService))), application_1.application.pickerServiceFactory = () => (0, bootstrap_1.resolveLegacySingleton)(constants_5.PickerService), application_1.application.layerHandlerFactory = layerMode => "static" === layerMode ? (0, bootstrap_1.resolveLegacySingleton)(constants_2.StaticLayerHandlerContribution) : "dynamic" === layerMode ? (0, bootstrap_1.resolveLegacySingleton)(constants_2.DynamicLayerHandlerContribution) : (0, bootstrap_1.resolveLegacySingleton)(constants_2.VirtualLayerHandlerContribution), application_1.application.incrementalDrawContributionFactory = () => (0, bootstrap_1.resolveLegacySingleton)(symbol_1.IncrementalDrawContribution); } Object.defineProperty(exports, "preLoadAllModule", { enumerable: !0, get: function() { return bootstrap_2.preLoadAllModule; } }), Object.defineProperty(exports, "getLegacyBindingContext", { enumerable: !0, get: function() { return bootstrap_2.getLegacyBindingContext; } }), exports.container = (0, bootstrap_1.getLegacyBindingContext)(), exports.graphicUtil = (0, bootstrap_1.createLegacySingletonProxy)((() => (0, bootstrap_1.resolveLegacySingleton)(constants_2.GraphicUtil))), exports.transformUtil = (0, bootstrap_1.createLegacySingletonProxy)((() => (0, bootstrap_1.resolveLegacySingleton)(constants_2.TransformUtil))), exports.graphicService = (0, bootstrap_1.createLegacySingletonProxy)((() => (0, bootstrap_1.resolveLegacySingleton)(constants_1.GraphicService))), exports.layerService = (0, bootstrap_1.createLegacySingletonProxy)((() => (0, bootstrap_1.resolveLegacySingleton)(constants_2.LayerService))), exports.configureLegacyApplication = configureLegacyApplication, configureLegacyApplication(); //# sourceMappingURL=modules.js.map