@jetprint/editor-sdk 1.2.1 → 1.2.2

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.
@@ -0,0 +1,13 @@
1
+ import LiveRenderWorker from '../components/Editor/liveRender/render.worker.ts?worker&inline';
2
+ import PrefetchWorker from '../components/Editor/liveRender/prefetch.worker.ts?worker&inline';
3
+ type WorkerCtor = new () => Worker;
4
+ /**
5
+ * key = worker 文件名(去掉 .ts/.js 扩展名)。
6
+ * createWorker 按调用路径的 basename 解析到对应构造器。
7
+ */
8
+ export declare const INLINE_WORKER_REGISTRY: Record<string, WorkerCtor>;
9
+ /** 从任意 worker 路径取注册表 key(basename 去 .ts/.js)。 */
10
+ export declare function workerKeyFromPath(workerPath: string): string;
11
+ /** 解析 worker 路径到内联构造器;未注册返回 null(调用方回退到外部文件机制)。 */
12
+ export declare function resolveInlineWorker(workerPath: string): WorkerCtor | null;
13
+ export { LiveRenderWorker, PrefetchWorker };
@@ -3,7 +3,7 @@
3
3
  * 此文件由 vite-plugins/serverEncrypt.ts 在构建时自动生成
4
4
  * 请勿手动编辑
5
5
  *
6
- * 生成时间: 2026-06-18T13:07:20.222Z
6
+ * 生成时间: 2026-06-20T17:12:02.094Z
7
7
  * 构建模式: production
8
8
  * 加密模块数量: 13
9
9
  * 构建种子: Kx9mP2qR5s... (已隐藏)
@@ -18,7 +18,7 @@ export declare class WorkerManager<TRequest = any, TResponse = any> {
18
18
  /**
19
19
  * 创建 Worker
20
20
  */
21
- protected createWorker(workerPath: string, isDev: boolean): Worker;
21
+ protected createWorker(workerPath: string, _isDev: boolean): Worker;
22
22
  /**
23
23
  * 设置 Worker 消息处理
24
24
  */
@@ -1,7 +1,3 @@
1
- /**
2
- * 透视变换 WASM 模块加载器 (Worker 版本)
3
- * 用于在 Web Worker 环境中加载和调用 TinyGo 编译的 WASM 模块
4
- */
5
1
  export interface PerspectivePoint {
6
2
  x: number;
7
3
  y: number;
@@ -33,6 +29,11 @@ export declare class PerspectiveWasmWorker {
33
29
  * @param wasmExecUrl wasm_exec.js 路径
34
30
  */
35
31
  load(wasmUrl?: string, wasmExecUrl?: string): Promise<void>;
32
+ /**
33
+ * 内联执行 wasm_exec.js(默认方式,无需外部 fetch)
34
+ * 把打包进 bundle 的 Go 运行时源码在 Worker 全局上执行,注册 self.Go。
35
+ */
36
+ private evalInlineWasmExec;
36
37
  /**
37
38
  * 在 Worker 中加载 wasm_exec.js
38
39
  * Module Worker 不支持 importScripts(),仅 Classic Worker 可尝试 importScripts,否则用 fetch + eval