From 8d3145d8cc77718721be2b7d03eb62b1405ca71e Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Mon, 29 Jun 2026 11:45:54 +0800 Subject: [PATCH] fix: expose render symbols from core root Intent: make renderer DI tokens stable for root named imports. Constraints: no runtime, dependency, package version, or default behavior change. Validation: diff check, core compile, core build, and root CJS export smoke. --- packages/vrender-core/src/index.ts | 26 +++++++++ .../src/render/contributions/render/index.ts | 4 ++ .../unit/build-artifact-imports.test.ts | 54 +++++++++++++++++++ .../canvas/contributions/browser/canvas.ts | 3 +- .../canvas/contributions/browser/context.ts | 2 +- .../canvas/contributions/harmony/context.ts | 3 +- .../src/canvas/contributions/lynx/context.ts | 3 +- .../env/contributions/browser-contribution.ts | 4 +- .../src/event/extension/gesture.ts | 3 +- .../vrender-kits/src/graphic/gif-image.ts | 3 +- packages/vrender-kits/src/installers/app.ts | 5 +- packages/vrender-kits/src/jsx/jsx-classic.ts | 3 +- .../vrender-kits/src/picker/canvas-module.ts | 3 +- .../src/picker/canvas-picker-service.ts | 3 +- .../contributions/canvas-picker/arc-module.ts | 2 +- .../canvas-picker/arc3d-module.ts | 2 +- .../canvas-picker/area-module.ts | 2 +- .../canvas-picker/circle-module.ts | 2 +- .../canvas-picker/glyph-module.ts | 2 +- .../canvas-picker/image-module.ts | 2 +- .../canvas-picker/line-module.ts | 2 +- .../canvas-picker/lottie-module.ts | 2 +- .../canvas-picker/path-module.ts | 2 +- .../canvas-picker/polygon-module.ts | 2 +- .../canvas-picker/pyramid3d-module.ts | 2 +- .../canvas-picker/rect-module.ts | 2 +- .../canvas-picker/rect3d-module.ts | 2 +- .../canvas-picker/richtext-module.ts | 2 +- .../canvas-picker/star-module.ts | 2 +- .../canvas-picker/symbol-module.ts | 2 +- .../canvas-picker/text-module.ts | 2 +- .../contributions/math-picker/arc-module.ts | 2 +- .../contributions/math-picker/area-module.ts | 2 +- .../math-picker/circle-module.ts | 2 +- .../contributions/math-picker/glyph-module.ts | 2 +- .../contributions/math-picker/line-module.ts | 2 +- .../contributions/math-picker/path-module.ts | 2 +- .../math-picker/polygon-module.ts | 2 +- .../contributions/math-picker/rect-module.ts | 2 +- .../math-picker/richtext-module.ts | 2 +- .../math-picker/symbol-module.ts | 2 +- .../vrender-kits/src/picker/math-module.ts | 2 +- .../contributions/canvas/gif-image-module.ts | 3 +- .../contributions/canvas/lottie-module.ts | 3 +- .../src/render/contributions/rough/module.ts | 4 +- .../contributions/browser-contribution.ts | 9 ++-- .../contributions/feishu-contribution.ts | 5 +- .../contributions/harmony-contribution.ts | 5 +- .../window/contributions/lynx-contribution.ts | 4 +- .../window/contributions/node-contribution.ts | 5 +- .../window/contributions/taro-contribution.ts | 5 +- .../window/contributions/tt-contribution.ts | 5 +- .../window/contributions/wx-contribution.ts | 4 +- 53 files changed, 162 insertions(+), 65 deletions(-) diff --git a/packages/vrender-core/src/index.ts b/packages/vrender-core/src/index.ts index 5c7a7135a..fcd4eec78 100644 --- a/packages/vrender-core/src/index.ts +++ b/packages/vrender-core/src/index.ts @@ -1,5 +1,6 @@ export * from './core/global'; export * from './graphic'; +export { Group } from './graphic/group'; export { createGraphic, graphicCreator, registerGraphic } from './graphic/graphic-creator'; export { container, graphicUtil, transformUtil, graphicService, layerService } from './modules'; export { @@ -13,12 +14,35 @@ export * from './create'; export * from './event'; export * from './interface'; export * from './render'; +export { + IncrementalDrawContribution, + ArcRender, + Arc3dRender, + AreaRender, + CircleRender, + GraphicRender, + LineRender, + PathRender, + PolygonRender, + RectRender, + Rect3DRender, + SymbolRender, + TextRender, + RichTextRender, + Pyramid3dRender, + GlyphRender, + ImageRender, + RenderSelector, + DrawContribution, + StarRender +} from './render/contributions/render/symbol'; export * from './render/contributions/render/base-render'; export * from './canvas'; export * from './core'; export * from './core/light'; export * from './core/camera'; export * from './picker'; +export { PickerService, PickItemInterceptor, PickServiceInterceptor } from './picker/constants'; export * from './resource-loader/loader'; export * from './color-string'; export * from './factory'; @@ -36,6 +60,7 @@ export * from './common/segment'; export * from './common/canvas-utils'; export * from './common/contribution-provider'; export * from './common/generator'; +export { Generator } from './common/generator'; export * from './common/utils'; export * from './common/shape/arc'; export * from './common/shape/rect'; @@ -66,6 +91,7 @@ export * from './common/xml'; export * from './common/explicit-binding'; export * from './constants'; export * from './application'; +export { application } from './application'; export * from './env-check'; export * from './render/contributions/render/arc-module'; diff --git a/packages/vrender-core/src/render/contributions/render/index.ts b/packages/vrender-core/src/render/contributions/render/index.ts index d8e303f51..461a99105 100644 --- a/packages/vrender-core/src/render/contributions/render/index.ts +++ b/packages/vrender-core/src/render/contributions/render/index.ts @@ -1,13 +1,17 @@ export * from './arc-render'; +export * from './arc3d-render'; +export * from './base-3d-render'; export * from './circle-render'; export * from './line-render'; export * from './area-render'; export * from './path-render'; export * from './rect-render'; +export * from './rect3d-render'; export * from './symbol-render'; export * from './text-render'; export * from './graphic-render'; export * from './polygon-render'; +export * from './pyramid3d-render'; export * from './group-render'; export * from './image-render'; export * from './symbol'; diff --git a/packages/vrender-kits/__tests__/unit/build-artifact-imports.test.ts b/packages/vrender-kits/__tests__/unit/build-artifact-imports.test.ts index 2dd1b8c79..7b2875cd2 100644 --- a/packages/vrender-kits/__tests__/unit/build-artifact-imports.test.ts +++ b/packages/vrender-kits/__tests__/unit/build-artifact-imports.test.ts @@ -6,6 +6,7 @@ const path = require('path'); const process = require('process'); const packageRoot = process.cwd(); +const corePackageRoot = path.resolve(packageRoot, '../vrender-core'); const buildRoots = ['es', 'cjs']; const artifactExtensions = new Set(['.js', '.d.ts']); const forbiddenWorkspaceSourcePatterns = [ @@ -45,3 +46,56 @@ describe('vrender-kits published artifacts', () => { expect(offenders).toEqual([]); }); }); + +function readArtifact(packageDir: string, relativePath: string): string { + return fs.readFileSync(path.join(packageDir, relativePath), 'utf8'); +} + +function collectRootNamedImports(artifact: string): string[] { + const imports = new Set(); + const importPattern = /import\s+\{([^}]+)\}\s+from\s+['"]@visactor\/vrender-core['"]/g; + let match: RegExpExecArray | null; + + while ((match = importPattern.exec(artifact))) { + match[1] + .split(',') + .map(specifier => specifier.trim()) + .filter(Boolean) + .forEach(specifier => { + imports.add(specifier.split(/\s+as\s+/)[0].trim()); + }); + } + + return Array.from(imports).sort(); +} + +function collectBundleNamedExports(artifact: string): string[] { + const exports = new Set(); + const exportPattern = /export\s+\{([^}]+)\}/g; + let match: RegExpExecArray | null; + + while ((match = exportPattern.exec(artifact))) { + match[1] + .split(',') + .map(specifier => specifier.trim()) + .filter(Boolean) + .forEach(specifier => { + const [, exportedName = specifier] = specifier.match(/\s+as\s+([A-Za-z0-9_$]+)$/) ?? []; + exports.add(exportedName.trim()); + }); + } + + return Array.from(exports).sort(); +} + +describe('vrender-kits and vrender-core bundle artifacts', () => { + test('root named imports from vrender-core should exist in the core root bundle export list', () => { + const kitsBundle = readArtifact(packageRoot, 'dist/index.es.js'); + const coreBundle = readArtifact(corePackageRoot, 'dist/index.es.js'); + const coreRootImports = collectRootNamedImports(kitsBundle); + const coreRootExports = new Set(collectBundleNamedExports(coreBundle)); + const missingImports = coreRootImports.filter(name => !coreRootExports.has(name)); + + expect(missingImports).toEqual([]); + }); +}); diff --git a/packages/vrender-kits/src/canvas/contributions/browser/canvas.ts b/packages/vrender-kits/src/canvas/contributions/browser/canvas.ts index 0e46dcd9e..63c05802e 100644 --- a/packages/vrender-kits/src/canvas/contributions/browser/canvas.ts +++ b/packages/vrender-kits/src/canvas/contributions/browser/canvas.ts @@ -1,4 +1,5 @@ -import { application, BaseCanvas } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; +import { BaseCanvas } from '@visactor/vrender-core'; import type { CanvasConfigType, ICanvas, EnvType } from '@visactor/vrender-core'; import { BrowserContext2d } from './context'; diff --git a/packages/vrender-kits/src/canvas/contributions/browser/context.ts b/packages/vrender-kits/src/canvas/contributions/browser/context.ts index 6e36929ce..9a6a1fe61 100644 --- a/packages/vrender-kits/src/canvas/contributions/browser/context.ts +++ b/packages/vrender-kits/src/canvas/contributions/browser/context.ts @@ -34,13 +34,13 @@ import { type ITextMeasureSpec, type IMatrix } from '@visactor/vutils'; +import { application } from '@visactor/vrender-core/application'; import { DefaultFillStyle, DefaultStrokeStyle, DefaultTextStyle, createColor, getScaledStroke, - application, matrixAllocate, transformMat4, createConicalGradient, diff --git a/packages/vrender-kits/src/canvas/contributions/harmony/context.ts b/packages/vrender-kits/src/canvas/contributions/harmony/context.ts index 75caec68a..f8da316dd 100644 --- a/packages/vrender-kits/src/canvas/contributions/harmony/context.ts +++ b/packages/vrender-kits/src/canvas/contributions/harmony/context.ts @@ -1,5 +1,6 @@ // 参考konva -import { createColor, getScaledStroke, application } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; +import { createColor, getScaledStroke } from '@visactor/vrender-core'; import type { IContext2d, EnvType, diff --git a/packages/vrender-kits/src/canvas/contributions/lynx/context.ts b/packages/vrender-kits/src/canvas/contributions/lynx/context.ts index 95d45e801..bf2df8658 100644 --- a/packages/vrender-kits/src/canvas/contributions/lynx/context.ts +++ b/packages/vrender-kits/src/canvas/contributions/lynx/context.ts @@ -1,5 +1,6 @@ // 参考konva -import { createColor, getScaledStroke, application } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; +import { createColor, getScaledStroke } from '@visactor/vrender-core'; import type { IContext2d, EnvType, ISetStrokeStyleParams, IStrokeStyleParams } from '@visactor/vrender-core'; import { BrowserContext2d } from '../browser'; diff --git a/packages/vrender-kits/src/env/contributions/browser-contribution.ts b/packages/vrender-kits/src/env/contributions/browser-contribution.ts index be3e7881a..545821466 100644 --- a/packages/vrender-kits/src/env/contributions/browser-contribution.ts +++ b/packages/vrender-kits/src/env/contributions/browser-contribution.ts @@ -1,4 +1,6 @@ -import { Generator, BaseEnvContribution, application } from '@visactor/vrender-core'; +import { Generator } from '@visactor/vrender-core/common/generator'; +import { application } from '@visactor/vrender-core/application'; +import { BaseEnvContribution } from '@visactor/vrender-core'; import type { ICanvasLike, EnvType, diff --git a/packages/vrender-kits/src/event/extension/gesture.ts b/packages/vrender-kits/src/event/extension/gesture.ts index fb66cd7f4..3d3dedb68 100644 --- a/packages/vrender-kits/src/event/extension/gesture.ts +++ b/packages/vrender-kits/src/event/extension/gesture.ts @@ -1,4 +1,5 @@ -import { application, clock, WILDCARD } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; +import { clock, WILDCARD } from '@visactor/vrender-core'; import type { IEventTarget, IFederatedPointerEvent, FederatedPointerEvent, INode } from '@visactor/vrender-core'; import type { IPointLike } from '@visactor/vutils'; import { EventEmitter } from '@visactor/vutils'; diff --git a/packages/vrender-kits/src/graphic/gif-image.ts b/packages/vrender-kits/src/graphic/gif-image.ts index 2e930233d..e22c40c1a 100644 --- a/packages/vrender-kits/src/graphic/gif-image.ts +++ b/packages/vrender-kits/src/graphic/gif-image.ts @@ -1,5 +1,6 @@ import type { IImageGraphicAttribute, ISetAttributeContext } from '@visactor/vrender-core'; -import { application, Image, ResourceLoader } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; +import { Image, ResourceLoader } from '@visactor/vrender-core'; import type { ITimeline } from '@visactor/vrender-core'; import { isString } from '@visactor/vutils'; import type { ParsedFrame } from 'gifuct-js'; diff --git a/packages/vrender-kits/src/installers/app.ts b/packages/vrender-kits/src/installers/app.ts index 96091611f..95e899c48 100644 --- a/packages/vrender-kits/src/installers/app.ts +++ b/packages/vrender-kits/src/installers/app.ts @@ -1,7 +1,6 @@ +import { PickItemInterceptor, PickServiceInterceptor } from '@visactor/vrender-core/picker/constants'; +import { application } from '@visactor/vrender-core/application'; import { - PickItemInterceptor, - PickServiceInterceptor, - application, arc3dModule, arcModule, areaModule, diff --git a/packages/vrender-kits/src/jsx/jsx-classic.ts b/packages/vrender-kits/src/jsx/jsx-classic.ts index 0c89c4e2a..beb71c31b 100644 --- a/packages/vrender-kits/src/jsx/jsx-classic.ts +++ b/packages/vrender-kits/src/jsx/jsx-classic.ts @@ -1,5 +1,6 @@ import { isArray, isString } from '@visactor/vutils'; -import { Group, graphicCreator } from '@visactor/vrender-core'; +import { Group } from '@visactor/vrender-core/graphic/group'; +import { graphicCreator } from '@visactor/vrender-core'; import { REACT_TO_CANOPUS_EVENTS } from './graphicType'; function flatten(list: any, out: any[]): void { diff --git a/packages/vrender-kits/src/picker/canvas-module.ts b/packages/vrender-kits/src/picker/canvas-module.ts index 0a40cf8d3..c98924d81 100644 --- a/packages/vrender-kits/src/picker/canvas-module.ts +++ b/packages/vrender-kits/src/picker/canvas-module.ts @@ -1,4 +1,5 @@ -import { DrawContribution, PickItemInterceptor, PickerService, PickServiceInterceptor } from '@visactor/vrender-core'; +import { DrawContribution } from '@visactor/vrender-core/render/symbol'; +import { PickItemInterceptor, PickerService, PickServiceInterceptor } from '@visactor/vrender-core/picker/constants'; import { createContributionProvider, resolveContainerBinding } from '../common/explicit-binding'; import { DefaultCanvasPickerService } from './canvas-picker-service'; import { bindCanvasPickerContribution } from './contributions/canvas-picker/module'; diff --git a/packages/vrender-kits/src/picker/canvas-picker-service.ts b/packages/vrender-kits/src/picker/canvas-picker-service.ts index 6349f83a8..f2020266c 100644 --- a/packages/vrender-kits/src/picker/canvas-picker-service.ts +++ b/packages/vrender-kits/src/picker/canvas-picker-service.ts @@ -1,6 +1,7 @@ import type { IMatrix, IPointLike } from '@visactor/vutils'; // eslint-disable-next-line -import { DefaultPickService, canvasAllocate, application } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; +import { DefaultPickService, canvasAllocate } from '@visactor/vrender-core'; import type { ICanvas, IContext2d, diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/arc-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/arc-module.ts index 2c431248f..36a82cbd0 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/arc-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/arc-module.ts @@ -1,4 +1,4 @@ -import { ArcRender } from '@visactor/vrender-core'; +import { ArcRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasArcPicker, CanvasPickerContribution } from '../constants'; import { DefaultCanvasArcPicker } from './arc-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/arc3d-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/arc3d-module.ts index 895f8f46f..1f7ffda5e 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/arc3d-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/arc3d-module.ts @@ -1,4 +1,4 @@ -import { Arc3dRender } from '@visactor/vrender-core'; +import { Arc3dRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasArc3dPicker, CanvasPickerContribution } from '../constants'; import { DefaultCanvasArc3dPicker } from './arc3d-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/area-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/area-module.ts index e9747abd4..bdd284436 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/area-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/area-module.ts @@ -1,4 +1,4 @@ -import { AreaRender } from '@visactor/vrender-core'; +import { AreaRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasAreaPicker, CanvasPickerContribution } from '../constants'; import { DefaultCanvasAreaPicker } from './area-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/circle-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/circle-module.ts index 9e9fea357..66dd40113 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/circle-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/circle-module.ts @@ -1,4 +1,4 @@ -import { CircleRender } from '@visactor/vrender-core'; +import { CircleRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasCirclePicker, CanvasPickerContribution } from '../constants'; import { DefaultCanvasCirclePicker } from './circle-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/glyph-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/glyph-module.ts index 972af3298..454267d61 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/glyph-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/glyph-module.ts @@ -1,4 +1,4 @@ -import { GlyphRender } from '@visactor/vrender-core'; +import { GlyphRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasGlyphPicker, CanvasPickerContribution } from '../constants'; import { DefaultCanvasGlyphPicker } from './glyph-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/image-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/image-module.ts index a56ab1b1d..1f47a4e1b 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/image-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/image-module.ts @@ -1,4 +1,4 @@ -import { ImageRender } from '@visactor/vrender-core'; +import { ImageRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasImagePicker, CanvasPickerContribution } from '../constants'; import { DefaultCanvasImagePicker } from './image-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/line-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/line-module.ts index ede206dd8..9f635ce8b 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/line-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/line-module.ts @@ -1,4 +1,4 @@ -import { LineRender } from '@visactor/vrender-core'; +import { LineRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasLinePicker, CanvasPickerContribution } from '../constants'; import { DefaultCanvasLinePicker } from './line-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/lottie-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/lottie-module.ts index 215581862..a61b57beb 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/lottie-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/lottie-module.ts @@ -1,4 +1,4 @@ -import { RectRender } from '@visactor/vrender-core'; +import { RectRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasLottiePicker, CanvasPickerContribution } from '../constants'; import { DefaultCanvasLottiePicker } from './lottie-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/path-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/path-module.ts index c9f5d0d49..4f866276a 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/path-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/path-module.ts @@ -1,4 +1,4 @@ -import { PathRender } from '@visactor/vrender-core'; +import { PathRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasPathPicker, CanvasPickerContribution } from '../constants'; import { DefaultCanvasPathPicker } from './path-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/polygon-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/polygon-module.ts index 78b062a4e..9e3c39d57 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/polygon-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/polygon-module.ts @@ -1,4 +1,4 @@ -import { PolygonRender } from '@visactor/vrender-core'; +import { PolygonRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasPickerContribution, CanvasPolygonPicker } from '../constants'; import { DefaultCanvasPolygonPicker } from './polygon-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/pyramid3d-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/pyramid3d-module.ts index e0461289c..434ed6eaa 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/pyramid3d-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/pyramid3d-module.ts @@ -1,4 +1,4 @@ -import { Pyramid3dRender } from '@visactor/vrender-core'; +import { Pyramid3dRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasPickerContribution, CanvasPyramid3dPicker } from '../constants'; import { DefaultCanvasPyramid3dPicker } from './pyramid3d-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/rect-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/rect-module.ts index 6609a78bb..55a81d544 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/rect-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/rect-module.ts @@ -1,4 +1,4 @@ -import { RectRender } from '@visactor/vrender-core'; +import { RectRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasPickerContribution, CanvasRectPicker } from '../constants'; import { DefaultCanvasRectPicker } from './rect-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/rect3d-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/rect3d-module.ts index 5adf17dd6..326b2470b 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/rect3d-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/rect3d-module.ts @@ -1,4 +1,4 @@ -import { Rect3DRender } from '@visactor/vrender-core'; +import { Rect3DRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasPickerContribution, CanvasRect3dPicker } from '../constants'; import { DefaultCanvasRect3dPicker } from './rect3d-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/richtext-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/richtext-module.ts index c28d3ebd5..523aa76a6 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/richtext-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/richtext-module.ts @@ -1,4 +1,4 @@ -import { RichTextRender } from '@visactor/vrender-core'; +import { RichTextRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasPickerContribution, CanvasRichTextPicker } from '../constants'; import { DefaultCanvasRichTextPicker } from './richtext-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/star-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/star-module.ts index fe9c85c69..285da4d27 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/star-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/star-module.ts @@ -1,4 +1,4 @@ -import { StarRender } from '@visactor/vrender-core'; +import { StarRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasPickerContribution, CanvasStarPicker } from '../constants'; import { DefaultCanvasStarPicker } from './star-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/symbol-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/symbol-module.ts index a8808f490..e1239c22f 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/symbol-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/symbol-module.ts @@ -1,4 +1,4 @@ -import { SymbolRender } from '@visactor/vrender-core'; +import { SymbolRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasPickerContribution, CanvasSymbolPicker } from '../constants'; import { DefaultCanvasSymbolPicker } from './symbol-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/canvas-picker/text-module.ts b/packages/vrender-kits/src/picker/contributions/canvas-picker/text-module.ts index b94f277f1..de3e4b74d 100644 --- a/packages/vrender-kits/src/picker/contributions/canvas-picker/text-module.ts +++ b/packages/vrender-kits/src/picker/contributions/canvas-picker/text-module.ts @@ -1,4 +1,4 @@ -import { TextRender } from '@visactor/vrender-core'; +import { TextRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { CanvasPickerContribution, CanvasTextPicker } from '../constants'; import { DefaultCanvasTextPicker } from './text-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/arc-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/arc-module.ts index 3eb721486..cf82cdd19 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/arc-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/arc-module.ts @@ -1,4 +1,4 @@ -import { ArcRender } from '@visactor/vrender-core'; +import { ArcRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathArcPicker, MathPickerContribution } from '../constants'; import { DefaultMathArcPicker } from './arc-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/area-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/area-module.ts index 49804774d..28d726004 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/area-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/area-module.ts @@ -1,4 +1,4 @@ -import { AreaRender } from '@visactor/vrender-core'; +import { AreaRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathAreaPicker, MathPickerContribution } from '../constants'; import { DefaultMathAreaPicker } from './area-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/circle-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/circle-module.ts index 8a1d80382..292d1f7e8 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/circle-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/circle-module.ts @@ -1,4 +1,4 @@ -import { CircleRender } from '@visactor/vrender-core'; +import { CircleRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathCirclePicker, MathPickerContribution } from '../constants'; import { DefaultMathCirclePicker } from './circle-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/glyph-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/glyph-module.ts index 930626700..b4107c612 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/glyph-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/glyph-module.ts @@ -1,4 +1,4 @@ -import { GlyphRender } from '@visactor/vrender-core'; +import { GlyphRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathGlyphPicker, MathPickerContribution } from '../constants'; import { DefaultMathGlyphPicker } from './glyph-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/line-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/line-module.ts index b699243f4..ef08345e2 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/line-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/line-module.ts @@ -1,4 +1,4 @@ -import { LineRender } from '@visactor/vrender-core'; +import { LineRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathLinePicker, MathPickerContribution } from '../constants'; import { DefaultMathLinePicker } from './line-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/path-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/path-module.ts index 8116a4196..aab8478f2 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/path-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/path-module.ts @@ -1,4 +1,4 @@ -import { PathRender } from '@visactor/vrender-core'; +import { PathRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathPathPicker, MathPickerContribution } from '../constants'; import { DefaultMathPathPicker } from './path-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/polygon-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/polygon-module.ts index b37c5eb1f..4f63a115f 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/polygon-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/polygon-module.ts @@ -1,4 +1,4 @@ -import { PolygonRender } from '@visactor/vrender-core'; +import { PolygonRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathPickerContribution, MathPolygonPicker } from '../constants'; import { DefaultMathPolygonPicker } from './polygon-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/rect-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/rect-module.ts index 166962ee2..3a1f19f4a 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/rect-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/rect-module.ts @@ -1,4 +1,4 @@ -import { RectRender } from '@visactor/vrender-core'; +import { RectRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathPickerContribution, MathRectPicker } from '../constants'; import { DefaultMathRectPicker } from './rect-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/richtext-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/richtext-module.ts index cd96617fd..788b1ce04 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/richtext-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/richtext-module.ts @@ -1,4 +1,4 @@ -import { RichTextRender } from '@visactor/vrender-core'; +import { RichTextRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathPickerContribution, MathRichTextPicker } from '../constants'; import { DefaultMathRichTextPicker } from './richtext-picker'; diff --git a/packages/vrender-kits/src/picker/contributions/math-picker/symbol-module.ts b/packages/vrender-kits/src/picker/contributions/math-picker/symbol-module.ts index 466f5c820..1d1863560 100644 --- a/packages/vrender-kits/src/picker/contributions/math-picker/symbol-module.ts +++ b/packages/vrender-kits/src/picker/contributions/math-picker/symbol-module.ts @@ -1,4 +1,4 @@ -import { SymbolRender } from '@visactor/vrender-core'; +import { SymbolRender } from '@visactor/vrender-core/render/symbol'; import { resolveContainerBinding } from '../../../common/explicit-binding'; import { MathPickerContribution, MathSymbolPicker } from '../constants'; import { DefaultMathSymbolPicker } from './symbol-picker'; diff --git a/packages/vrender-kits/src/picker/math-module.ts b/packages/vrender-kits/src/picker/math-module.ts index 7683d8768..736c2bbef 100644 --- a/packages/vrender-kits/src/picker/math-module.ts +++ b/packages/vrender-kits/src/picker/math-module.ts @@ -1,4 +1,4 @@ -import { PickItemInterceptor, PickerService, PickServiceInterceptor } from '@visactor/vrender-core'; +import { PickItemInterceptor, PickerService, PickServiceInterceptor } from '@visactor/vrender-core/picker/constants'; import { createContributionProvider } from '../common/explicit-binding'; import { DefaultMathPickerService } from './math-picker-service'; import { bindMathPickerContribution } from './contributions/math-picker/module'; diff --git a/packages/vrender-kits/src/render/contributions/canvas/gif-image-module.ts b/packages/vrender-kits/src/render/contributions/canvas/gif-image-module.ts index 5d99a7382..eb173c210 100644 --- a/packages/vrender-kits/src/render/contributions/canvas/gif-image-module.ts +++ b/packages/vrender-kits/src/render/contributions/canvas/gif-image-module.ts @@ -1,4 +1,5 @@ -import { GraphicRender, ImageRenderContribution } from '@visactor/vrender-core'; +import { GraphicRender } from '@visactor/vrender-core/render/symbol'; +import { ImageRenderContribution } from '@visactor/vrender-core'; import { createContributionProvider } from '../../../common/explicit-binding'; import { DefaultCanvasGifImageRender } from './gif-image-render'; diff --git a/packages/vrender-kits/src/render/contributions/canvas/lottie-module.ts b/packages/vrender-kits/src/render/contributions/canvas/lottie-module.ts index 322c55a4f..79d5ec148 100644 --- a/packages/vrender-kits/src/render/contributions/canvas/lottie-module.ts +++ b/packages/vrender-kits/src/render/contributions/canvas/lottie-module.ts @@ -1,4 +1,5 @@ -import { GraphicRender, RectRenderContribution } from '@visactor/vrender-core'; +import { GraphicRender } from '@visactor/vrender-core/render/symbol'; +import { RectRenderContribution } from '@visactor/vrender-core'; import { createContributionProvider } from '../../../common/explicit-binding'; import { DefaultCanvasLottieRender } from './lottie-render'; diff --git a/packages/vrender-kits/src/render/contributions/rough/module.ts b/packages/vrender-kits/src/render/contributions/rough/module.ts index 94724dae2..a6d763f16 100644 --- a/packages/vrender-kits/src/render/contributions/rough/module.ts +++ b/packages/vrender-kits/src/render/contributions/rough/module.ts @@ -1,3 +1,4 @@ +import { GraphicRender } from '@visactor/vrender-core/render/symbol'; import { AreaRenderContribution, DefaultCanvasArcRender, @@ -5,8 +6,7 @@ import { DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasRectRender, - DefaultCanvasSymbolRender, - GraphicRender + DefaultCanvasSymbolRender } from '@visactor/vrender-core'; import { createContributionProvider, resolveContainerBinding } from '../../../common/explicit-binding'; import { RoughCanvasArcRender } from './rough-arc'; diff --git a/packages/vrender-kits/src/window/contributions/browser-contribution.ts b/packages/vrender-kits/src/window/contributions/browser-contribution.ts index b2007f761..5214b2613 100644 --- a/packages/vrender-kits/src/window/contributions/browser-contribution.ts +++ b/packages/vrender-kits/src/window/contributions/browser-contribution.ts @@ -1,9 +1,6 @@ -import { - Generator, - BaseWindowHandlerContribution, - WindowHandlerContribution, - application -} from '@visactor/vrender-core'; +import { Generator } from '@visactor/vrender-core/common/generator'; +import { application } from '@visactor/vrender-core/application'; +import { BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; import type { IContext2d, ICanvas, diff --git a/packages/vrender-kits/src/window/contributions/feishu-contribution.ts b/packages/vrender-kits/src/window/contributions/feishu-contribution.ts index ed82bdfc6..1e3bfc4e5 100644 --- a/packages/vrender-kits/src/window/contributions/feishu-contribution.ts +++ b/packages/vrender-kits/src/window/contributions/feishu-contribution.ts @@ -1,4 +1,5 @@ -import { Generator, BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; +import { Generator } from '@visactor/vrender-core/common/generator'; +import { BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; import type { EnvType, IGlobal, @@ -10,7 +11,7 @@ import type { } from '@visactor/vrender-core'; import type { IBoundsLike } from '@visactor/vutils'; import { FeishuCanvas } from '../../canvas/contributions/feishu'; -import { application } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; class MiniAppEventManager { addEventListener(type: string, func: EventListenerOrEventListenerObject) { diff --git a/packages/vrender-kits/src/window/contributions/harmony-contribution.ts b/packages/vrender-kits/src/window/contributions/harmony-contribution.ts index 0e794ca8d..c14c590bf 100644 --- a/packages/vrender-kits/src/window/contributions/harmony-contribution.ts +++ b/packages/vrender-kits/src/window/contributions/harmony-contribution.ts @@ -1,4 +1,5 @@ -import { Generator, BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; +import { Generator } from '@visactor/vrender-core/common/generator'; +import { BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; import type { EnvType, IGlobal, @@ -9,7 +10,7 @@ import type { IWindowHandlerContribution } from '@visactor/vrender-core'; import { HarmonyCanvas } from '../../canvas/contributions/harmony'; -import { application } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; class MiniAppEventManager { addEventListener(type: string, func: EventListenerOrEventListenerObject) { diff --git a/packages/vrender-kits/src/window/contributions/lynx-contribution.ts b/packages/vrender-kits/src/window/contributions/lynx-contribution.ts index f6e1a3fec..f09373c2d 100644 --- a/packages/vrender-kits/src/window/contributions/lynx-contribution.ts +++ b/packages/vrender-kits/src/window/contributions/lynx-contribution.ts @@ -1,8 +1,8 @@ +import { Generator } from '@visactor/vrender-core/common/generator'; +import { application } from '@visactor/vrender-core/application'; import { - Generator, BaseWindowHandlerContribution, WindowHandlerContribution, - application, type EnvType, type IGlobal, type IContext2d, diff --git a/packages/vrender-kits/src/window/contributions/node-contribution.ts b/packages/vrender-kits/src/window/contributions/node-contribution.ts index 88e906ea2..cbf5d4cdf 100644 --- a/packages/vrender-kits/src/window/contributions/node-contribution.ts +++ b/packages/vrender-kits/src/window/contributions/node-contribution.ts @@ -1,4 +1,5 @@ -import { Generator, BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; +import { Generator } from '@visactor/vrender-core/common/generator'; +import { BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; import type { IBoundsLike } from '@visactor/vutils'; import type { EnvType, @@ -10,7 +11,7 @@ import type { IWindowParams } from '@visactor/vrender-core'; import { NodeCanvas } from '../../canvas/contributions/node'; -import { application } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; export class NodeWindowHandlerContribution extends BaseWindowHandlerContribution implements IWindowHandlerContribution { static env: EnvType = 'node'; diff --git a/packages/vrender-kits/src/window/contributions/taro-contribution.ts b/packages/vrender-kits/src/window/contributions/taro-contribution.ts index 8487348a6..f8a5be713 100644 --- a/packages/vrender-kits/src/window/contributions/taro-contribution.ts +++ b/packages/vrender-kits/src/window/contributions/taro-contribution.ts @@ -1,4 +1,5 @@ -import { Generator, BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; +import { Generator } from '@visactor/vrender-core/common/generator'; +import { BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; import type { EnvType, IGlobal, @@ -10,7 +11,7 @@ import type { } from '@visactor/vrender-core'; import type { IBoundsLike } from '@visactor/vutils'; import { TaroCanvas } from '../../canvas/contributions/taro'; -import { application } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; class MiniAppEventManager { addEventListener(type: string, func: EventListenerOrEventListenerObject) { diff --git a/packages/vrender-kits/src/window/contributions/tt-contribution.ts b/packages/vrender-kits/src/window/contributions/tt-contribution.ts index 8f6bb6110..6ca1fb927 100644 --- a/packages/vrender-kits/src/window/contributions/tt-contribution.ts +++ b/packages/vrender-kits/src/window/contributions/tt-contribution.ts @@ -1,4 +1,5 @@ -import { Generator, BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; +import { Generator } from '@visactor/vrender-core/common/generator'; +import { BaseWindowHandlerContribution, WindowHandlerContribution } from '@visactor/vrender-core'; import type { EnvType, IGlobal, @@ -10,7 +11,7 @@ import type { } from '@visactor/vrender-core'; import type { IBoundsLike } from '@visactor/vutils'; import { TTCanvas } from '../../canvas/contributions/tt'; -import { application } from '@visactor/vrender-core'; +import { application } from '@visactor/vrender-core/application'; class MiniAppEventManager { addEventListener(type: string, func: EventListenerOrEventListenerObject) { diff --git a/packages/vrender-kits/src/window/contributions/wx-contribution.ts b/packages/vrender-kits/src/window/contributions/wx-contribution.ts index ec2a73dc6..c485cfb5c 100644 --- a/packages/vrender-kits/src/window/contributions/wx-contribution.ts +++ b/packages/vrender-kits/src/window/contributions/wx-contribution.ts @@ -1,8 +1,8 @@ +import { Generator } from '@visactor/vrender-core/common/generator'; +import { application } from '@visactor/vrender-core/application'; import { - Generator, BaseWindowHandlerContribution, WindowHandlerContribution, - application, type EnvType, type IGlobal, type IContext2d,