@schema-element-editor/host-sdk 2.0.3 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.cjs CHANGED
@@ -23,10 +23,13 @@ __export(core_exports, {
23
23
  createSchemaElementEditorBridge: () => createSchemaElementEditorBridge
24
24
  });
25
25
  module.exports = __toCommonJS(core_exports);
26
+
27
+ // src/constants.ts
26
28
  var DEFAULT_SOURCE_CONFIG = {
27
29
  contentSource: "schema-element-editor-content",
28
30
  hostSource: "schema-element-editor-host"
29
31
  };
32
+ var SDK_COORDINATOR_SOURCE = "schema-element-editor-sdk-coordinator";
30
33
  var DEFAULT_MESSAGE_TYPES = {
31
34
  getSchema: "GET_SCHEMA",
32
35
  updateSchema: "UPDATE_SCHEMA",
@@ -38,8 +41,245 @@ var DEFAULT_MESSAGE_TYPES = {
38
41
  stopRecording: "STOP_RECORDING",
39
42
  schemaPush: "SCHEMA_PUSH"
40
43
  };
44
+ var SDK_COORDINATION_MESSAGE_TYPES = {
45
+ register: "SDK_REGISTER",
46
+ unregister: "SDK_UNREGISTER",
47
+ query: "SDK_QUERY"
48
+ };
49
+
50
+ // src/coordinator.ts
51
+ function generateSdkId() {
52
+ if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
53
+ return crypto.randomUUID();
54
+ }
55
+ return `sdk-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
56
+ }
57
+ var SdkCoordinator = class {
58
+ constructor(config) {
59
+ /**
60
+ * SDK 销毁标志
61
+ *
62
+ * 作用:防止在 cleanup() 执行期间,监听器移除前仍然响应请求
63
+ *
64
+ * 场景:cleanup() 中先调用 destroy()(设置 isDestroyed = true),
65
+ * 然后才移除 handleMessage 监听器。在这个微小的时间窗口内,
66
+ * 如果插件请求到达,没有 isDestroyed 检查会导致已销毁的 SDK 仍然响应。
67
+ */
68
+ this.isDestroyed = false;
69
+ /**
70
+ * 存储比当前 SDK 优先级更高的其他 SDK ID
71
+ * 按方法分类:如果某个方法的集合不为空,说明有更高优先级的 SDK 应该处理该方法
72
+ *
73
+ * 优化:只为当前 SDK 实现了的方法维护优先级集合
74
+ */
75
+ this.higherLevelSDKs = {};
76
+ /**
77
+ * 存储与当前 SDK 优先级相同的其他 SDK ID
78
+ * 按方法分类:用于判断是否需要在执行失败时跳过响应
79
+ *
80
+ * 当有同级竞争者时,SDK在执行失败/无数据时会跳过响应,让其他SDK有机会响应
81
+ */
82
+ this.sameLevelSDKs = {};
83
+ /**
84
+ * 处理 SDK 协调消息
85
+ */
86
+ this.handleCoordinationMessage = (event) => {
87
+ const isFromSelf = event.source === window;
88
+ const isFromParent = window !== window.top && event.source === window.parent;
89
+ if (!isFromSelf && !isFromParent) return;
90
+ const data = event.data;
91
+ if (!data || data.source !== SDK_COORDINATOR_SOURCE) return;
92
+ switch (data.type) {
93
+ case SDK_COORDINATION_MESSAGE_TYPES.query:
94
+ this.sendRegister();
95
+ break;
96
+ case SDK_COORDINATION_MESSAGE_TYPES.register:
97
+ this.handleSdkRegister(data.payload);
98
+ break;
99
+ case SDK_COORDINATION_MESSAGE_TYPES.unregister:
100
+ this.handleSdkUnregister(data.payload.sdkId);
101
+ break;
102
+ }
103
+ };
104
+ this.sdkId = config.sdkId || generateSdkId();
105
+ this.messageSource = config.messageSource;
106
+ this.level = config.level ?? 0;
107
+ this.methodLevels = config.methodLevels ?? {};
108
+ this.implementedMethods = config.implementedMethods;
109
+ this.implementedMethods.forEach((method) => {
110
+ this.higherLevelSDKs[method] = /* @__PURE__ */ new Set();
111
+ this.sameLevelSDKs[method] = /* @__PURE__ */ new Set();
112
+ });
113
+ }
114
+ /**
115
+ * 初始化协调器
116
+ */
117
+ init() {
118
+ window.addEventListener("message", this.handleCoordinationMessage);
119
+ this.sendQuery();
120
+ this.sendRegister();
121
+ }
122
+ /**
123
+ * 销毁协调器
124
+ */
125
+ destroy() {
126
+ this.isDestroyed = true;
127
+ this.sendUnregister();
128
+ window.removeEventListener("message", this.handleCoordinationMessage);
129
+ Object.values(this.higherLevelSDKs).forEach((set) => set.clear());
130
+ Object.values(this.sameLevelSDKs).forEach((set) => set.clear());
131
+ }
132
+ /**
133
+ * 判断是否应该响应某个方法的请求
134
+ * @param method - 方法名
135
+ * @returns 是否应该响应
136
+ */
137
+ shouldRespond(method) {
138
+ if (this.isDestroyed) return false;
139
+ if (!this.implementedMethods.includes(method)) {
140
+ return false;
141
+ }
142
+ const higherSDKs = this.higherLevelSDKs[method];
143
+ return !higherSDKs || higherSDKs.size === 0;
144
+ }
145
+ /**
146
+ * 判断某个方法是否有相同优先级的竞争者
147
+ * @param method - 方法名
148
+ * @returns 是否存在同级竞争者
149
+ */
150
+ hasSameLevelCompetitors(method) {
151
+ const sameSDKs = this.sameLevelSDKs[method];
152
+ return sameSDKs ? sameSDKs.size > 0 : false;
153
+ }
154
+ /**
155
+ * 获取方法的优先级
156
+ */
157
+ getMethodLevel(method) {
158
+ return this.methodLevels[method] ?? this.level;
159
+ }
160
+ /**
161
+ * 处理其他 SDK 的注册
162
+ */
163
+ handleSdkRegister(info) {
164
+ if (info.sdkId === this.sdkId) return;
165
+ if (info.messageSource !== this.messageSource) return;
166
+ this.implementedMethods.forEach((method) => {
167
+ if (!info.implementedMethods.includes(method)) {
168
+ return;
169
+ }
170
+ const myLevel = this.getMethodLevel(method);
171
+ const otherLevel = info.methodLevels[method] ?? info.level;
172
+ if (otherLevel > myLevel) {
173
+ this.higherLevelSDKs[method].add(info.sdkId);
174
+ this.sameLevelSDKs[method].delete(info.sdkId);
175
+ } else if (otherLevel === myLevel) {
176
+ this.sameLevelSDKs[method].add(info.sdkId);
177
+ this.higherLevelSDKs[method].delete(info.sdkId);
178
+ } else {
179
+ this.higherLevelSDKs[method].delete(info.sdkId);
180
+ this.sameLevelSDKs[method].delete(info.sdkId);
181
+ }
182
+ });
183
+ }
184
+ /**
185
+ * 处理其他 SDK 的注销
186
+ */
187
+ handleSdkUnregister(sdkId) {
188
+ Object.values(this.higherLevelSDKs).forEach((set) => {
189
+ set.delete(sdkId);
190
+ });
191
+ Object.values(this.sameLevelSDKs).forEach((set) => {
192
+ set.delete(sdkId);
193
+ });
194
+ }
195
+ /**
196
+ * 发送查询消息
197
+ */
198
+ sendQuery() {
199
+ const message = {
200
+ source: SDK_COORDINATOR_SOURCE,
201
+ type: SDK_COORDINATION_MESSAGE_TYPES.query,
202
+ payload: { sdkId: this.sdkId }
203
+ };
204
+ this.postCoordinationMessage(message);
205
+ }
206
+ /**
207
+ * 发送注册消息
208
+ */
209
+ sendRegister() {
210
+ const message = {
211
+ source: SDK_COORDINATOR_SOURCE,
212
+ type: SDK_COORDINATION_MESSAGE_TYPES.register,
213
+ payload: {
214
+ sdkId: this.sdkId,
215
+ messageSource: this.messageSource,
216
+ level: this.level,
217
+ methodLevels: this.methodLevels,
218
+ implementedMethods: this.implementedMethods
219
+ }
220
+ };
221
+ this.postCoordinationMessage(message);
222
+ }
223
+ /**
224
+ * 发送注销消息
225
+ */
226
+ sendUnregister() {
227
+ const message = {
228
+ source: SDK_COORDINATOR_SOURCE,
229
+ type: SDK_COORDINATION_MESSAGE_TYPES.unregister,
230
+ payload: { sdkId: this.sdkId }
231
+ };
232
+ this.postCoordinationMessage(message);
233
+ }
234
+ /**
235
+ * 发送协调消息
236
+ */
237
+ postCoordinationMessage(message) {
238
+ window.postMessage(message, "*");
239
+ if (window.top && window.top !== window) {
240
+ window.top.postMessage(message, "*");
241
+ }
242
+ }
243
+ };
244
+
245
+ // src/bridge.ts
246
+ var METHOD_NAMES = {
247
+ GET_SCHEMA: "getSchema",
248
+ UPDATE_SCHEMA: "updateSchema",
249
+ CHECK_PREVIEW: "checkPreview",
250
+ RENDER_PREVIEW: "renderPreview",
251
+ CLEANUP_PREVIEW: "cleanupPreview",
252
+ START_RECORDING: "startRecording",
253
+ STOP_RECORDING: "stopRecording"
254
+ };
255
+ function shouldSkipFailedResponse(method, result) {
256
+ switch (method) {
257
+ case METHOD_NAMES.GET_SCHEMA:
258
+ return result.success === true && result.data === void 0;
259
+ case METHOD_NAMES.UPDATE_SCHEMA:
260
+ return result.success === false;
261
+ case METHOD_NAMES.RENDER_PREVIEW:
262
+ case METHOD_NAMES.CLEANUP_PREVIEW:
263
+ return result.success === false;
264
+ case METHOD_NAMES.CHECK_PREVIEW:
265
+ case METHOD_NAMES.START_RECORDING:
266
+ case METHOD_NAMES.STOP_RECORDING:
267
+ return false;
268
+ default:
269
+ return false;
270
+ }
271
+ }
41
272
  function createSchemaElementEditorBridge(config) {
42
- const { getSchema, updateSchema, renderPreview, sourceConfig, messageTypes } = config;
273
+ const {
274
+ getSchema,
275
+ updateSchema,
276
+ renderPreview,
277
+ sourceConfig,
278
+ messageTypes,
279
+ sdkId,
280
+ level,
281
+ methodLevels
282
+ } = config;
43
283
  const mergedSourceConfig = {
44
284
  ...DEFAULT_SOURCE_CONFIG,
45
285
  ...sourceConfig
@@ -48,9 +288,40 @@ function createSchemaElementEditorBridge(config) {
48
288
  ...DEFAULT_MESSAGE_TYPES,
49
289
  ...messageTypes
50
290
  };
291
+ const implementedMethods = [];
292
+ if (typeof getSchema === "function") implementedMethods.push(METHOD_NAMES.GET_SCHEMA);
293
+ if (typeof updateSchema === "function") implementedMethods.push(METHOD_NAMES.UPDATE_SCHEMA);
294
+ if (typeof renderPreview === "function") {
295
+ implementedMethods.push(
296
+ METHOD_NAMES.CHECK_PREVIEW,
297
+ METHOD_NAMES.RENDER_PREVIEW,
298
+ METHOD_NAMES.CLEANUP_PREVIEW
299
+ );
300
+ }
301
+ implementedMethods.push(METHOD_NAMES.START_RECORDING, METHOD_NAMES.STOP_RECORDING);
302
+ const coordinator = new SdkCoordinator({
303
+ sdkId,
304
+ messageSource: mergedSourceConfig.contentSource,
305
+ level,
306
+ methodLevels,
307
+ implementedMethods
308
+ });
309
+ coordinator.init();
51
310
  let previewCleanupFn = null;
52
311
  const recordingParams = /* @__PURE__ */ new Set();
53
312
  const currentConfig = { getSchema, updateSchema, renderPreview };
313
+ const methodTypeToName = {
314
+ [mergedMessageTypes.getSchema]: METHOD_NAMES.GET_SCHEMA,
315
+ [mergedMessageTypes.updateSchema]: METHOD_NAMES.UPDATE_SCHEMA,
316
+ [mergedMessageTypes.checkPreview]: METHOD_NAMES.CHECK_PREVIEW,
317
+ [mergedMessageTypes.renderPreview]: METHOD_NAMES.RENDER_PREVIEW,
318
+ [mergedMessageTypes.cleanupPreview]: METHOD_NAMES.CLEANUP_PREVIEW,
319
+ [mergedMessageTypes.startRecording]: METHOD_NAMES.START_RECORDING,
320
+ [mergedMessageTypes.stopRecording]: METHOD_NAMES.STOP_RECORDING
321
+ };
322
+ const getMethodNameByType = (type) => {
323
+ return methodTypeToName[type] ?? null;
324
+ };
54
325
  const sendResponse = (requestId, result) => {
55
326
  const message = {
56
327
  source: mergedSourceConfig.hostSource,
@@ -83,10 +354,18 @@ function createSchemaElementEditorBridge(config) {
83
354
  if (!event.data || event.data.source !== mergedSourceConfig.contentSource) return;
84
355
  const { type, payload, requestId } = event.data;
85
356
  if (!requestId) return;
357
+ const methodName = getMethodNameByType(type);
358
+ if (!methodName) return;
359
+ if (!coordinator.shouldRespond(methodName)) {
360
+ return;
361
+ }
86
362
  const { getSchema: getSchema2, updateSchema: updateSchema2, renderPreview: renderPreview2 } = currentConfig;
87
363
  let result;
88
364
  switch (type) {
89
365
  case mergedMessageTypes.getSchema: {
366
+ if (typeof getSchema2 !== "function") {
367
+ return;
368
+ }
90
369
  const params = String(payload?.params ?? "");
91
370
  try {
92
371
  const data = getSchema2(params);
@@ -100,6 +379,9 @@ function createSchemaElementEditorBridge(config) {
100
379
  break;
101
380
  }
102
381
  case mergedMessageTypes.updateSchema: {
382
+ if (typeof updateSchema2 !== "function") {
383
+ return;
384
+ }
103
385
  const schema = payload?.schema;
104
386
  const params = String(payload?.params ?? "");
105
387
  try {
@@ -172,11 +454,16 @@ function createSchemaElementEditorBridge(config) {
172
454
  default:
173
455
  return;
174
456
  }
457
+ const hasSameLevelSdks = coordinator.hasSameLevelCompetitors(methodName);
458
+ if (hasSameLevelSdks && shouldSkipFailedResponse(methodName, result)) {
459
+ return;
460
+ }
175
461
  sendResponse(requestId, result);
176
462
  };
177
463
  window.addEventListener("message", handleMessage);
178
464
  return {
179
465
  cleanup: () => {
466
+ coordinator.destroy();
180
467
  window.removeEventListener("message", handleMessage);
181
468
  if (previewCleanupFn) {
182
469
  previewCleanupFn();
package/dist/core.d.cts CHANGED
@@ -1,85 +1,16 @@
1
+ import { b as SchemaElementEditorConfig, c as SchemaElementEditorBridge } from './types-D2ZJx8T_.cjs';
2
+
1
3
  /**
2
- * Schema Element Editor Host SDK - Core
4
+ * Schema Element Editor Host SDK - Bridge
3
5
  * 纯 JS 核心逻辑,无框架依赖
4
6
  */
5
- /**
6
- * Schema 数据类型
7
- * 支持所有 JSON.parse 可返回的类型
8
- */
9
- type SchemaValue = Record<string, unknown> | unknown[] | string | number | boolean | null;
10
- /** postMessage 消息标识配置 */
11
- interface PostMessageSourceConfig {
12
- /** 插件端发送消息的 source 标识 */
13
- contentSource: string;
14
- /** 宿主端响应消息的 source 标识 */
15
- hostSource: string;
16
- }
17
- /** postMessage 消息类型配置 */
18
- interface PostMessageTypeConfig {
19
- getSchema: string;
20
- updateSchema: string;
21
- checkPreview: string;
22
- renderPreview: string;
23
- cleanupPreview: string;
24
- startRecording: string;
25
- stopRecording: string;
26
- schemaPush: string;
27
- }
28
- /**
29
- * Schema Element Editor 配置接口
30
- */
31
- interface SchemaElementEditorConfig {
32
- /**
33
- * 获取 Schema 数据
34
- * @param params - 元素参数(通常是 data-id 的值)
35
- * @returns Schema 数据(支持所有 JSON 类型)
36
- */
37
- getSchema: (params: string) => SchemaValue;
38
- /**
39
- * 更新 Schema 数据
40
- * @param schema - 新的 Schema 数据(支持所有 JSON 类型)
41
- * @param params - 元素参数
42
- * @returns 是否更新成功
43
- */
44
- updateSchema: (schema: SchemaValue, params: string) => boolean;
45
- /**
46
- * 渲染预览(可选)
47
- * @param schema - Schema 数据(支持所有 JSON 类型)
48
- * @param containerId - 预览容器 ID
49
- * @returns 清理函数(可选)
50
- */
51
- renderPreview?: (schema: SchemaValue, containerId: string) => (() => void) | void;
52
- /** 消息标识配置(可选,有默认值) */
53
- sourceConfig?: Partial<PostMessageSourceConfig>;
54
- /** 消息类型配置(可选,有默认值) */
55
- messageTypes?: Partial<PostMessageTypeConfig>;
56
- }
57
- /**
58
- * 录制相关方法
59
- */
60
- interface SchemaElementEditorRecording {
61
- /**
62
- * 推送 Schema 数据(SDK 内部判断是否在录制,未录制时静默忽略)
63
- * @param params - 元素参数(data-id 的值)
64
- * @param data - Schema 数据
65
- */
66
- push: (params: string, data: SchemaValue) => void;
67
- }
68
- /**
69
- * Schema Element Editor 桥接器返回值
70
- */
71
- interface SchemaElementEditorBridge {
72
- /** 清理桥接器,移除事件监听 */
73
- cleanup: () => void;
74
- /** 录制相关方法 */
75
- recording: SchemaElementEditorRecording;
76
- }
7
+
77
8
  /**
78
9
  * 创建 Schema Element Editor 桥接器
79
10
  * 纯 JS 函数,返回桥接器对象
80
11
  *
81
12
  * @param config - Schema Element Editor 配置
82
- * @returns 桥接器对象,包含 cleanup 和 pushSchema 方法
13
+ * @returns 桥接器对象,包含 cleanup 和 recording 方法
83
14
  *
84
15
  * @example
85
16
  * ```js
@@ -92,16 +23,20 @@ interface SchemaElementEditorBridge {
92
23
  * },
93
24
  * })
94
25
  *
95
- * // 数据变化时调用 pushSchema 推送数据(录制功能自动可用)
26
+ * // 只提供预览功能,让其他 SDK 处理数据管理
27
+ * const bridge = createSchemaElementEditorBridge({
28
+ * level: 100,
29
+ * renderPreview: (schema, containerId) => {
30
+ * renderMyCustomPreview(schema, containerId)
31
+ * },
32
+ * })
33
+ *
34
+ * // 数据变化时调用 recording.push 推送数据(录制功能自动可用)
96
35
  * sseHandler.onData = (params, data) => {
97
- * bridge.pushSchema(params, data)
36
+ * bridge.recording.push(params, data)
98
37
  * }
99
- *
100
- * // 如需在录制开始/停止时执行额外逻辑,可配置回调(可选)
101
- * // onStartRecording: (params) => console.log('开始录制:', params),
102
- * // onStopRecording: (params) => console.log('停止录制:', params),
103
38
  * ```
104
39
  */
105
40
  declare function createSchemaElementEditorBridge(config: SchemaElementEditorConfig): SchemaElementEditorBridge;
106
41
 
107
- export { type PostMessageSourceConfig, type PostMessageTypeConfig, type SchemaElementEditorBridge, type SchemaElementEditorConfig, type SchemaElementEditorRecording, type SchemaValue, createSchemaElementEditorBridge };
42
+ export { createSchemaElementEditorBridge };
package/dist/core.d.ts CHANGED
@@ -1,85 +1,16 @@
1
+ import { b as SchemaElementEditorConfig, c as SchemaElementEditorBridge } from './types-D2ZJx8T_.js';
2
+
1
3
  /**
2
- * Schema Element Editor Host SDK - Core
4
+ * Schema Element Editor Host SDK - Bridge
3
5
  * 纯 JS 核心逻辑,无框架依赖
4
6
  */
5
- /**
6
- * Schema 数据类型
7
- * 支持所有 JSON.parse 可返回的类型
8
- */
9
- type SchemaValue = Record<string, unknown> | unknown[] | string | number | boolean | null;
10
- /** postMessage 消息标识配置 */
11
- interface PostMessageSourceConfig {
12
- /** 插件端发送消息的 source 标识 */
13
- contentSource: string;
14
- /** 宿主端响应消息的 source 标识 */
15
- hostSource: string;
16
- }
17
- /** postMessage 消息类型配置 */
18
- interface PostMessageTypeConfig {
19
- getSchema: string;
20
- updateSchema: string;
21
- checkPreview: string;
22
- renderPreview: string;
23
- cleanupPreview: string;
24
- startRecording: string;
25
- stopRecording: string;
26
- schemaPush: string;
27
- }
28
- /**
29
- * Schema Element Editor 配置接口
30
- */
31
- interface SchemaElementEditorConfig {
32
- /**
33
- * 获取 Schema 数据
34
- * @param params - 元素参数(通常是 data-id 的值)
35
- * @returns Schema 数据(支持所有 JSON 类型)
36
- */
37
- getSchema: (params: string) => SchemaValue;
38
- /**
39
- * 更新 Schema 数据
40
- * @param schema - 新的 Schema 数据(支持所有 JSON 类型)
41
- * @param params - 元素参数
42
- * @returns 是否更新成功
43
- */
44
- updateSchema: (schema: SchemaValue, params: string) => boolean;
45
- /**
46
- * 渲染预览(可选)
47
- * @param schema - Schema 数据(支持所有 JSON 类型)
48
- * @param containerId - 预览容器 ID
49
- * @returns 清理函数(可选)
50
- */
51
- renderPreview?: (schema: SchemaValue, containerId: string) => (() => void) | void;
52
- /** 消息标识配置(可选,有默认值) */
53
- sourceConfig?: Partial<PostMessageSourceConfig>;
54
- /** 消息类型配置(可选,有默认值) */
55
- messageTypes?: Partial<PostMessageTypeConfig>;
56
- }
57
- /**
58
- * 录制相关方法
59
- */
60
- interface SchemaElementEditorRecording {
61
- /**
62
- * 推送 Schema 数据(SDK 内部判断是否在录制,未录制时静默忽略)
63
- * @param params - 元素参数(data-id 的值)
64
- * @param data - Schema 数据
65
- */
66
- push: (params: string, data: SchemaValue) => void;
67
- }
68
- /**
69
- * Schema Element Editor 桥接器返回值
70
- */
71
- interface SchemaElementEditorBridge {
72
- /** 清理桥接器,移除事件监听 */
73
- cleanup: () => void;
74
- /** 录制相关方法 */
75
- recording: SchemaElementEditorRecording;
76
- }
7
+
77
8
  /**
78
9
  * 创建 Schema Element Editor 桥接器
79
10
  * 纯 JS 函数,返回桥接器对象
80
11
  *
81
12
  * @param config - Schema Element Editor 配置
82
- * @returns 桥接器对象,包含 cleanup 和 pushSchema 方法
13
+ * @returns 桥接器对象,包含 cleanup 和 recording 方法
83
14
  *
84
15
  * @example
85
16
  * ```js
@@ -92,16 +23,20 @@ interface SchemaElementEditorBridge {
92
23
  * },
93
24
  * })
94
25
  *
95
- * // 数据变化时调用 pushSchema 推送数据(录制功能自动可用)
26
+ * // 只提供预览功能,让其他 SDK 处理数据管理
27
+ * const bridge = createSchemaElementEditorBridge({
28
+ * level: 100,
29
+ * renderPreview: (schema, containerId) => {
30
+ * renderMyCustomPreview(schema, containerId)
31
+ * },
32
+ * })
33
+ *
34
+ * // 数据变化时调用 recording.push 推送数据(录制功能自动可用)
96
35
  * sseHandler.onData = (params, data) => {
97
- * bridge.pushSchema(params, data)
36
+ * bridge.recording.push(params, data)
98
37
  * }
99
- *
100
- * // 如需在录制开始/停止时执行额外逻辑,可配置回调(可选)
101
- * // onStartRecording: (params) => console.log('开始录制:', params),
102
- * // onStopRecording: (params) => console.log('停止录制:', params),
103
38
  * ```
104
39
  */
105
40
  declare function createSchemaElementEditorBridge(config: SchemaElementEditorConfig): SchemaElementEditorBridge;
106
41
 
107
- export { type PostMessageSourceConfig, type PostMessageTypeConfig, type SchemaElementEditorBridge, type SchemaElementEditorConfig, type SchemaElementEditorRecording, type SchemaValue, createSchemaElementEditorBridge };
42
+ export { createSchemaElementEditorBridge };
package/dist/core.js CHANGED
@@ -1,6 +1,7 @@
1
+ import "./chunk-432BCQVI.js";
1
2
  import {
2
3
  createSchemaElementEditorBridge
3
- } from "./chunk-52EFKQHQ.js";
4
+ } from "./chunk-DLMX4NDA.js";
4
5
  export {
5
6
  createSchemaElementEditorBridge
6
7
  };