base-screen 0.1.2 → 0.2.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/README.md +12 -5
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-callbacks.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-controller.d.ts +73 -16
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-panel.d.ts +41 -0
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-panel-controller.d.ts +62 -0
- package/dist/_internal/engine/browser/controllers/designer-size-tier-controller.d.ts +60 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-material-group-navigation-controller.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-controller.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-inspector-controller.d.ts +6 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-material-controller.d.ts +1 -0
- package/dist/_internal/engine/browser/controllers/workbench/designer-panel-layout-controller.d.ts +22 -1
- package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-controller.d.ts +5 -0
- package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-tabs-controller.d.ts +1 -0
- package/dist/_internal/engine/browser/dom/workspace/designer-workspace-markup.d.ts +2 -0
- package/dist/_internal/engine/browser/dom/workspace/designer-workspace-skeleton.d.ts +7 -0
- package/dist/_internal/engine/browser/dom/workspace/designer-workspace.d.ts +1 -1
- package/dist/_internal/engine/common/ui-text/designer-blueprint-ui-text.d.ts +1 -0
- package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +5 -1
- package/dist/_internal/engine/designer-blueprint-workbench-panel-C2MoZwKA.js +3548 -0
- package/dist/_internal/engine/designer-dataset-controller-CPytVNBK.js +4426 -0
- package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +7 -0
- package/dist/_internal/engine/designer-element/runtime/designer-element-skeleton.d.ts +14 -0
- package/dist/_internal/engine/designer-element/runtime/designer-element-state.d.ts +12 -2
- package/dist/_internal/engine/designer-left-panel-groups-dom-WMsH33zw.js +573 -0
- package/dist/_internal/engine/designer-ui-primitives-CH4RNiMa.js +2155 -0
- package/dist/_internal/engine/host-resource-selection-5Cf_gclK.js +2188 -0
- package/dist/_internal/engine/index.js +4944 -17147
- package/dist/_internal/renderer/index.js +266 -216
- package/dist/_internal/renderer/viewer/viewer-skeleton.d.ts +10 -0
- package/dist/_internal/renderer/viewer/viewer-variable-controller.d.ts +2 -0
- package/dist/_internal/renderer/viewer/viewer.d.ts +8 -0
- package/dist/_internal/sdk/auto-register.js +7 -7
- package/dist/_internal/sdk/designer-auto-register.js +2 -2
- package/dist/_internal/sdk/designer.d.ts +6 -0
- package/dist/_internal/sdk/designer.js +11 -1
- package/dist/_internal/sdk/index.d.ts +1 -1
- package/dist/_internal/sdk/index.js +6 -6
- package/dist/authoring-EcyK2YVN.js +103 -0
- package/dist/authoring-EcyK2YVN.js.map +1 -0
- package/dist/auto-register.js +12 -10
- package/dist/auto-register.js.map +1 -1
- package/dist/contracts.js +5 -4
- package/dist/contracts.js.map +1 -1
- package/dist/{contrast-B4TH-dvm.js → contrast-CZFqj1I5.js} +23 -23
- package/dist/{contrast-B4TH-dvm.js.map → contrast-CZFqj1I5.js.map} +1 -1
- package/dist/core.js +10 -8
- package/dist/core.js.map +1 -1
- package/dist/designer-Byw45cUM.js +21 -0
- package/dist/designer-Byw45cUM.js.map +1 -0
- package/dist/designer-auto-register.js +5 -3
- package/dist/designer-auto-register.js.map +1 -1
- package/dist/designer-blueprint-workbench-panel-C2MoZwKA-CbXkv78O.js +3517 -0
- package/dist/designer-blueprint-workbench-panel-C2MoZwKA-CbXkv78O.js.map +1 -0
- package/dist/designer-dataset-controller-CPytVNBK-DWL3SRTP.js +4354 -0
- package/dist/designer-dataset-controller-CPytVNBK-DWL3SRTP.js.map +1 -0
- package/dist/designer-left-panel-groups-dom-WMsH33zw-B9pl8loh.js +557 -0
- package/dist/designer-left-panel-groups-dom-WMsH33zw-B9pl8loh.js.map +1 -0
- package/dist/designer-ui-primitives-CH4RNiMa-BNXQwJPZ.js +2146 -0
- package/dist/designer-ui-primitives-CH4RNiMa-BNXQwJPZ.js.map +1 -0
- package/dist/designer.js +5 -3
- package/dist/{dist-CR13A2Yb.js → dist-BHTClwId.js} +4785 -16808
- package/dist/dist-BHTClwId.js.map +1 -0
- package/dist/{dist-CAdGDmU3.js → dist-DfAV2jGI.js} +277 -227
- package/dist/dist-DfAV2jGI.js.map +1 -0
- package/dist/editor-descriptor-schema-Be30Wv8w.js +190 -0
- package/dist/editor-descriptor-schema-Be30Wv8w.js.map +1 -0
- package/dist/engine.js +4 -2
- package/dist/hierarchy-BQZrZWbC.js +86 -0
- package/dist/hierarchy-BQZrZWbC.js.map +1 -0
- package/dist/host-resource-selection-5Cf_gclK-Sv4Z8UXS.js +2141 -0
- package/dist/host-resource-selection-5Cf_gclK-Sv4Z8UXS.js.map +1 -0
- package/dist/index.js +11 -9
- package/dist/{manager-Bhqi_KmD.js → manager-B2CZ2b5I.js} +2 -2
- package/dist/{manager-Bhqi_KmD.js.map → manager-B2CZ2b5I.js.map} +1 -1
- package/dist/material-BPlvEmDi.js +12 -0
- package/dist/material-BPlvEmDi.js.map +1 -0
- package/dist/material-auto-register.d.ts +1 -0
- package/dist/material-auto-register.js +16 -0
- package/dist/material-auto-register.js.map +1 -0
- package/dist/{material-definition-BJ4ujhuj.js → material-definition-B9xCZcD-.js} +2 -2
- package/dist/{material-definition-BJ4ujhuj.js.map → material-definition-B9xCZcD-.js.map} +1 -1
- package/dist/{material-manifest-LdgIkzgH.js → material-manifest-bsGl6vZZ.js} +70 -256
- package/dist/material-manifest-bsGl6vZZ.js.map +1 -0
- package/dist/material.js +3 -2
- package/dist/parse-B0hwp_yj.js +264 -0
- package/dist/parse-B0hwp_yj.js.map +1 -0
- package/dist/plugin-core.js +3 -2
- package/dist/plugin-manager.js +1 -1
- package/dist/{plugin-package-BfZLl3ru.js → plugin-package-BT-pCoTt.js} +3 -3
- package/dist/{plugin-package-BfZLl3ru.js.map → plugin-package-BT-pCoTt.js.map} +1 -1
- package/dist/{plugin-registration-CYtTqIxF.js → plugin-registration-BjS_CXJU.js} +2 -2
- package/dist/{plugin-registration-CYtTqIxF.js.map → plugin-registration-BjS_CXJU.js.map} +1 -1
- package/dist/plugin-sdk.js +3 -3
- package/dist/{plugins-DRaykV9c.js → plugins-B9bwk-t6.js} +2 -2
- package/dist/{plugins-DRaykV9c.js.map → plugins-B9bwk-t6.js.map} +1 -1
- package/dist/plugins.js +5 -5
- package/dist/renderer.js +1 -1
- package/dist/runtime-dispatch-Dt9fhcI5.js +360 -0
- package/dist/runtime-dispatch-Dt9fhcI5.js.map +1 -0
- package/dist/{src-Bm7u11mN-BPS5TRsq.js → src-Bm7u11mN-BMeb9fvV.js} +40 -39
- package/dist/{src-Bm7u11mN-BPS5TRsq.js.map → src-Bm7u11mN-BMeb9fvV.js.map} +1 -1
- package/dist/{material-2XmHe-aH.js → text-BVzTcUas.js} +44 -52
- package/dist/text-BVzTcUas.js.map +1 -0
- package/dist/value-ref-y4_YKUP5.js +278 -0
- package/dist/value-ref-y4_YKUP5.js.map +1 -0
- package/dist/{viewer-CrJupI8I-D2BtwLsA.js → viewer-CrJupI8I-DZZfdHXr.js} +5 -5
- package/dist/{viewer-CrJupI8I-D2BtwLsA.js.map → viewer-CrJupI8I-DZZfdHXr.js.map} +1 -1
- package/dist/viewer-auto-register.js +2 -2
- package/dist/viewer.js +2 -2
- package/package.json +12 -17
- package/dist/_internal/react/components.d.ts +0 -32
- package/dist/_internal/react/index.d.ts +0 -14
- package/dist/_internal/react/index.js +0 -215
- package/dist/_internal/vue/components.d.ts +0 -36
- package/dist/_internal/vue/global-styles.d.ts +0 -10
- package/dist/_internal/vue/index.d.ts +0 -14
- package/dist/_internal/vue/index.js +0 -290
- package/dist/designer-xtN0h7PL.js +0 -11
- package/dist/designer-xtN0h7PL.js.map +0 -1
- package/dist/dist-CAdGDmU3.js.map +0 -1
- package/dist/dist-CR13A2Yb.js.map +0 -1
- package/dist/material-2XmHe-aH.js.map +0 -1
- package/dist/material-manifest-LdgIkzgH.js.map +0 -1
- package/dist/parse-CYwxTDJU.js +0 -364
- package/dist/parse-CYwxTDJU.js.map +0 -1
- package/dist/react.d.ts +0 -1
- package/dist/react.js +0 -213
- package/dist/react.js.map +0 -1
- package/dist/value-ref-Z0o70Vy6.js +0 -716
- package/dist/value-ref-Z0o70Vy6.js.map +0 -1
- package/dist/vue.d.ts +0 -1
- package/dist/vue.js +0 -288
- package/dist/vue.js.map +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function createViewerSkeletonStyle(ownerDocument: Document): HTMLStyleElement;
|
|
2
|
+
/**
|
|
3
|
+
* Viewer 首帧骨架:runtime、catalog 或文档就绪前先铺满整个查看区域,
|
|
4
|
+
* 避免宿主已经挂载 `<base-screen-viewer>` 却看到空白。
|
|
5
|
+
*
|
|
6
|
+
* 骨架留在 Shadow Root 上而不是渲染器挂载根里:文档未渲染时挂载根还没有
|
|
7
|
+
* 画布尺寸,放进去会塌成 0 高。首次渲染落定后整体移除。
|
|
8
|
+
*/
|
|
9
|
+
export declare function createViewerSkeleton(ownerDocument: Document): HTMLDivElement;
|
|
10
|
+
//# sourceMappingURL=viewer-skeleton.d.ts.map
|
|
@@ -9,6 +9,8 @@ export interface ViewerVariableControllerHost {
|
|
|
9
9
|
readonly readBlueprintVariables: () => ScreenJsonObject | undefined;
|
|
10
10
|
readonly writeBlueprintVariables: (variables: ScreenJsonObject) => void;
|
|
11
11
|
readonly emitDiagnostics: (diagnostics: readonly ScreenDiagnostic[]) => void;
|
|
12
|
+
/** 一次渲染尝试落定(成功或失败)后回调;Viewer 用它撤掉首帧骨架。 */
|
|
13
|
+
readonly onRenderSettled?: () => void;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* 变量值 = 文档里的取值引用在当前实例结果上的求值。
|
|
@@ -50,6 +50,14 @@ export declare class BaseScreenViewerElement extends ElementBase {
|
|
|
50
50
|
refreshConditionalStyles(componentIds?: readonly string[]): void;
|
|
51
51
|
getVariable(id: string): ScreenVariableHandle | undefined;
|
|
52
52
|
private initialize;
|
|
53
|
+
/**
|
|
54
|
+
* 首帧骨架:元素已上屏但 catalog/文档还没到时先铺满查看区,避免白屏。
|
|
55
|
+
* 已经渲染过文档(例如热更新后重连)不再重置为加载态。
|
|
56
|
+
*/
|
|
57
|
+
private ensureSkeleton;
|
|
58
|
+
/** 首次渲染落定(成功或失败)后撤掉骨架,之后的重渲染不再回到加载态。 */
|
|
59
|
+
private markRendered;
|
|
60
|
+
private clearSkeleton;
|
|
53
61
|
private disposeRenderer;
|
|
54
62
|
private compileBlueprint;
|
|
55
63
|
private handleMaterialEvent;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT as e, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT as t, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME as n, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT as r, BASE_SCREEN_CHANGE_STATE_EVENT as i, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT as a, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT as o, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT as s, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS as c, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX as l, BASE_SCREEN_DESIGNER_TAG_NAME as u, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT as d, BASE_SCREEN_GUARD_CHANGE_EVENT as f, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME as p, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT as m, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT as h, BASE_SCREEN_METRIC_EVENT as g, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT as _, BASE_SCREEN_SCENE_CHANGE_EVENT as v, BaseScreenDesignerElement as y, baseScreenDesignerLeftPanelSlotName as b, createBaseScreenCorePluginCommandPort as x, createBaseScreenCorePluginDesignReadPort as S, defineBaseScreenDesigner as C,
|
|
2
|
-
import { l as
|
|
3
|
-
import { a as
|
|
4
|
-
import { createBaseScreenBlueprintCapabilityPlugin as
|
|
5
|
-
import { BASE_SCREEN_OFFICIAL_GROUP_MATERIAL_TYPE as
|
|
1
|
+
import { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT as e, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT as t, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME as n, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT as r, BASE_SCREEN_CHANGE_STATE_EVENT as i, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT as a, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT as o, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT as s, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS as c, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX as l, BASE_SCREEN_DESIGNER_TAG_NAME as u, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT as d, BASE_SCREEN_GUARD_CHANGE_EVENT as f, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME as p, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT as m, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT as h, BASE_SCREEN_METRIC_EVENT as g, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT as _, BASE_SCREEN_SCENE_CHANGE_EVENT as v, BaseScreenDesignerElement as y, baseScreenDesignerLeftPanelSlotName as b, createBaseScreenCorePluginCommandPort as x, createBaseScreenCorePluginDesignReadPort as S, defineBaseScreenDesigner as C, mountBaseScreenDesignerSkeleton as w, parseBaseScreenBlueprintCanvasCommand as T, parseBaseScreenDesignerLeftPanelGroups as E, parseBaseScreenHostResourceAuthoringIntent as D, parseBaseScreenMaterialLibraryGrouping as O, parseBaseScreenMaterialLibraryItems as k, parseBaseScreenMaterialLibraryState as A, prepareDesignerScenePreview as j, writeBaseScreenHostResourceDragData as M } from "./designer.js";
|
|
2
|
+
import { l as N, n as P, r as F, t as I } from "./viewer-CrJupI8I.js";
|
|
3
|
+
import { a as L, i as R, n as z, o as B, r as V, t as H } from "./src-Bm7u11mN.js";
|
|
4
|
+
import { createBaseScreenBlueprintCapabilityPlugin as U } from "./plugins.js";
|
|
5
|
+
import { BASE_SCREEN_OFFICIAL_GROUP_MATERIAL_TYPE as W, BASE_SCREEN_OFFICIAL_TOOL_MATERIAL_TYPES as G } from "./material.js";
|
|
6
6
|
//#region src/auto-register.ts
|
|
7
|
-
if (!
|
|
7
|
+
if (!z().ok) throw Error("Base Screen product element registration failed.");
|
|
8
8
|
//#endregion
|
|
9
|
-
export { e as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, t as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, n as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, r as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, i as BASE_SCREEN_CHANGE_STATE_EVENT, a as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, o as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, s as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, l as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, u as BASE_SCREEN_DESIGNER_TAG_NAME, d as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, f as BASE_SCREEN_GUARD_CHANGE_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, h as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, g as BASE_SCREEN_METRIC_EVENT,
|
|
9
|
+
export { e as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, t as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, n as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, r as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, i as BASE_SCREEN_CHANGE_STATE_EVENT, a as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, o as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, s as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, l as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, u as BASE_SCREEN_DESIGNER_TAG_NAME, d as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, f as BASE_SCREEN_GUARD_CHANGE_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, h as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, g as BASE_SCREEN_METRIC_EVENT, W as BASE_SCREEN_OFFICIAL_GROUP_MATERIAL_TYPE, G as BASE_SCREEN_OFFICIAL_TOOL_MATERIAL_TYPES, _ as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, v as BASE_SCREEN_SCENE_CHANGE_EVENT, I as BASE_SCREEN_VIEWER_TAG_NAME, y as BaseScreenDesignerElement, P as BaseScreenViewerElement, H as SCREEN_AUTHORING_REQUEST_EVENT, V as adoptBaseScreenRuntime, b as baseScreenDesignerLeftPanelSlotName, U as createBaseScreenBlueprintCapabilityPlugin, x as createBaseScreenCorePluginCommandPort, S as createBaseScreenCorePluginDesignReadPort, L as createBaseScreenDesignerMountController, N as createBaseScreenMountHandle, R as createBaseScreenRuntime, B as createBaseScreenViewerMountController, C as defineBaseScreenDesigner, z as defineBaseScreenElements, F as defineBaseScreenViewer, w as mountBaseScreenDesignerSkeleton, T as parseBaseScreenBlueprintCanvasCommand, E as parseBaseScreenDesignerLeftPanelGroups, D as parseBaseScreenHostResourceAuthoringIntent, O as parseBaseScreenMaterialLibraryGrouping, k as parseBaseScreenMaterialLibraryItems, A as parseBaseScreenMaterialLibraryState, j as prepareDesignerScenePreview, M as writeBaseScreenHostResourceDragData };
|
|
10
10
|
|
|
11
11
|
//# sourceMappingURL=auto-register.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT as e, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT as t, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME as n, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT as r, BASE_SCREEN_CHANGE_STATE_EVENT as i, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT as a, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT as o, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT as s, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS as c, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX as l, BASE_SCREEN_DESIGNER_TAG_NAME as u, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT as d, BASE_SCREEN_GUARD_CHANGE_EVENT as f, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME as p, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT as m, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT as h, BASE_SCREEN_METRIC_EVENT as g, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT as _, BASE_SCREEN_SCENE_CHANGE_EVENT as v, BaseScreenDesignerElement as y, baseScreenDesignerLeftPanelSlotName as b, createBaseScreenCorePluginCommandPort as x, createBaseScreenCorePluginDesignReadPort as S, defineBaseScreenDesigner as C,
|
|
1
|
+
import { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT as e, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT as t, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME as n, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT as r, BASE_SCREEN_CHANGE_STATE_EVENT as i, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT as a, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT as o, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT as s, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS as c, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX as l, BASE_SCREEN_DESIGNER_TAG_NAME as u, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT as d, BASE_SCREEN_GUARD_CHANGE_EVENT as f, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME as p, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT as m, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT as h, BASE_SCREEN_METRIC_EVENT as g, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT as _, BASE_SCREEN_SCENE_CHANGE_EVENT as v, BaseScreenDesignerElement as y, baseScreenDesignerLeftPanelSlotName as b, createBaseScreenCorePluginCommandPort as x, createBaseScreenCorePluginDesignReadPort as S, defineBaseScreenDesigner as C, mountBaseScreenDesignerSkeleton as w, parseBaseScreenBlueprintCanvasCommand as T, parseBaseScreenDesignerLeftPanelGroups as E, parseBaseScreenHostResourceAuthoringIntent as D, parseBaseScreenMaterialLibraryGrouping as O, parseBaseScreenMaterialLibraryItems as k, parseBaseScreenMaterialLibraryState as A, prepareDesignerScenePreview as j, writeBaseScreenHostResourceDragData as M } from "./designer.js";
|
|
2
2
|
//#region src/designer-auto-register.ts
|
|
3
3
|
if (!C().ok) throw Error("Base Screen Designer registration failed.");
|
|
4
4
|
//#endregion
|
|
5
|
-
export { e as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, t as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, n as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, r as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, i as BASE_SCREEN_CHANGE_STATE_EVENT, a as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, o as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, s as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, l as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, u as BASE_SCREEN_DESIGNER_TAG_NAME, d as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, f as BASE_SCREEN_GUARD_CHANGE_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, h as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, g as BASE_SCREEN_METRIC_EVENT, _ as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, v as BASE_SCREEN_SCENE_CHANGE_EVENT, y as BaseScreenDesignerElement, b as baseScreenDesignerLeftPanelSlotName, x as createBaseScreenCorePluginCommandPort, S as createBaseScreenCorePluginDesignReadPort, C as defineBaseScreenDesigner, w as
|
|
5
|
+
export { e as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, t as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, n as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, r as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, i as BASE_SCREEN_CHANGE_STATE_EVENT, a as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, o as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, s as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, l as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, u as BASE_SCREEN_DESIGNER_TAG_NAME, d as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, f as BASE_SCREEN_GUARD_CHANGE_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, h as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, g as BASE_SCREEN_METRIC_EVENT, _ as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, v as BASE_SCREEN_SCENE_CHANGE_EVENT, y as BaseScreenDesignerElement, b as baseScreenDesignerLeftPanelSlotName, x as createBaseScreenCorePluginCommandPort, S as createBaseScreenCorePluginDesignReadPort, C as defineBaseScreenDesigner, w as mountBaseScreenDesignerSkeleton, T as parseBaseScreenBlueprintCanvasCommand, E as parseBaseScreenDesignerLeftPanelGroups, D as parseBaseScreenHostResourceAuthoringIntent, O as parseBaseScreenMaterialLibraryGrouping, k as parseBaseScreenMaterialLibraryItems, A as parseBaseScreenMaterialLibraryState, j as prepareDesignerScenePreview, M as writeBaseScreenHostResourceDragData };
|
|
6
6
|
|
|
7
7
|
//# sourceMappingURL=designer-auto-register.js.map
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { ScreenParseResult } from '../contracts/index.js';
|
|
2
|
+
import { BaseScreenDesignerElement } from '../engine/index.js';
|
|
2
3
|
export declare const BASE_SCREEN_DESIGNER_TAG_NAME: 'base-screen-designer';
|
|
3
4
|
export { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, BASE_SCREEN_CHANGE_STATE_EVENT, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, BASE_SCREEN_GUARD_CHANGE_EVENT, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, BASE_SCREEN_METRIC_EVENT, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, BASE_SCREEN_SCENE_CHANGE_EVENT, type BaseScreenBlueprintCanvasCommand, type BaseScreenBlueprintCanvasCommandEventDetail, type BaseScreenBlueprintCanvasCommandResult, type BaseScreenBlueprintCanvasEdge, type BaseScreenBlueprintCanvasEventOption, type BaseScreenBlueprintCanvasGraph, type BaseScreenBlueprintCanvasInsertNode, type BaseScreenBlueprintCanvasNode, type BaseScreenBlueprintCanvasNodePosition, type BaseScreenBlueprintCanvasSelection, type BaseScreenBlueprintCanvasState, type BaseScreenBlueprintCanvasStateEventDetail, type BaseScreenBlueprintCanvasTrace, type BaseScreenCanvasPresentationChangeEventDetail, type BaseScreenCanvasScaleMode, type BaseScreenDesignerBackRequestEventDetail, type BaseScreenDesignerChangeProposalSummary, type BaseScreenDesignerChangeStateDetail, type BaseScreenDesignerChangeUnitSummary, type BaseScreenDesignerConfiguration, BaseScreenDesignerElement, type BaseScreenDesignerLeftPanelGroup, type BaseScreenDesignerLeftPanelGroupChangeEventDetail, type BaseScreenDesignerLeftPanelGroupIcon, type BaseScreenDesignerSetWorkbenchModeOptions, type BaseScreenDesignerWorkbenchFocus, type BaseScreenDesignerWorkbenchMode, type BaseScreenDesignerWorkbenchModeChangeEventDetail, type BaseScreenDesignerWorkbenchModeChangeReason, type BaseScreenHostResourceAuthoringIntent, type BaseScreenHostResourceDragDataTransfer, type BaseScreenHostResourceSelection, type BaseScreenHostResourceSelectionCommit, type BaseScreenHostResourceSelectionCurrent, type BaseScreenHostResourceSelectionRequest, type BaseScreenHostResourceSelectionRequestEventDetail, type BaseScreenHostResourceSelectionTarget, type BaseScreenMaterialCatalogRefreshResult, type BaseScreenMaterialLibraryAction, type BaseScreenMaterialLibraryActionEventDetail, type BaseScreenMaterialLibraryGroup, type BaseScreenMaterialLibraryGrouping, type BaseScreenMaterialLibraryItem, type BaseScreenMaterialLibraryState, type BaseScreenMaterialLibraryStatus, type BaseScreenMetricEventDetail, type BaseScreenProjectStateChangeEventDetail, type BaseScreenSceneChangeDetail, baseScreenDesignerLeftPanelSlotName, type CreateBaseScreenCorePluginCommandPortOptions, type CreateBaseScreenCorePluginDesignReadPortOptions, createBaseScreenCorePluginCommandPort, createBaseScreenCorePluginDesignReadPort, type DesignerGuardSnapshot, type DesignerSceneDescriptor, type DesignerSceneHandler, type DesignerScenePlan, type DesignerScenePrepareResult, type DesignerScenePreview, type DesignerSceneRequest, parseBaseScreenBlueprintCanvasCommand, parseBaseScreenDesignerLeftPanelGroups, parseBaseScreenHostResourceAuthoringIntent, parseBaseScreenMaterialLibraryGrouping, parseBaseScreenMaterialLibraryItems, parseBaseScreenMaterialLibraryState, prepareDesignerScenePreview, type ScreenProjectPhase, type ScreenProjectState, writeBaseScreenHostResourceDragData, } from '../engine/index.js';
|
|
4
5
|
export declare function defineBaseScreenDesigner(): ScreenParseResult<CustomElementConstructor>;
|
|
6
|
+
/**
|
|
7
|
+
* 先把设计器元素挂进页面显示首帧骨架,再异步准备运行时并向 `mountDesigner`
|
|
8
|
+
* 传入同一个 `element`。catalog 到达前元素保持骨架;配置完成后原位替换为完整工作区。
|
|
9
|
+
*/
|
|
10
|
+
export declare function mountBaseScreenDesignerSkeleton(container: Element): ScreenParseResult<BaseScreenDesignerElement>;
|
|
5
11
|
//# sourceMappingURL=designer.d.ts.map
|
|
@@ -5,7 +5,17 @@ var M = "base-screen-designer";
|
|
|
5
5
|
function N() {
|
|
6
6
|
return e(M, b);
|
|
7
7
|
}
|
|
8
|
+
function P(e) {
|
|
9
|
+
let t = N();
|
|
10
|
+
if (!t.ok) return t;
|
|
11
|
+
let n = e.ownerDocument.createElement(M);
|
|
12
|
+
return e.append(n), {
|
|
13
|
+
ok: !0,
|
|
14
|
+
value: n,
|
|
15
|
+
diagnostics: []
|
|
16
|
+
};
|
|
17
|
+
}
|
|
8
18
|
//#endregion
|
|
9
|
-
export { t as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, n as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, r as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, i as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, a as BASE_SCREEN_CHANGE_STATE_EVENT, o as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, s as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, l as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, u as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, M as BASE_SCREEN_DESIGNER_TAG_NAME, d as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, f as BASE_SCREEN_GUARD_CHANGE_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, h as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, g as BASE_SCREEN_METRIC_EVENT, _ as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, v as BASE_SCREEN_SCENE_CHANGE_EVENT, y as BaseScreenDesignerElement, x as baseScreenDesignerLeftPanelSlotName, S as createBaseScreenCorePluginCommandPort, C as createBaseScreenCorePluginDesignReadPort, N as defineBaseScreenDesigner, w as parseBaseScreenBlueprintCanvasCommand, T as parseBaseScreenDesignerLeftPanelGroups, E as parseBaseScreenHostResourceAuthoringIntent, D as parseBaseScreenMaterialLibraryGrouping, O as parseBaseScreenMaterialLibraryItems, k as parseBaseScreenMaterialLibraryState, A as prepareDesignerScenePreview, j as writeBaseScreenHostResourceDragData };
|
|
19
|
+
export { t as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, n as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, r as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, i as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, a as BASE_SCREEN_CHANGE_STATE_EVENT, o as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, s as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, l as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, u as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, M as BASE_SCREEN_DESIGNER_TAG_NAME, d as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, f as BASE_SCREEN_GUARD_CHANGE_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, h as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, g as BASE_SCREEN_METRIC_EVENT, _ as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, v as BASE_SCREEN_SCENE_CHANGE_EVENT, y as BaseScreenDesignerElement, x as baseScreenDesignerLeftPanelSlotName, S as createBaseScreenCorePluginCommandPort, C as createBaseScreenCorePluginDesignReadPort, N as defineBaseScreenDesigner, P as mountBaseScreenDesignerSkeleton, w as parseBaseScreenBlueprintCanvasCommand, T as parseBaseScreenDesignerLeftPanelGroups, E as parseBaseScreenHostResourceAuthoringIntent, D as parseBaseScreenMaterialLibraryGrouping, O as parseBaseScreenMaterialLibraryItems, k as parseBaseScreenMaterialLibraryState, A as prepareDesignerScenePreview, j as writeBaseScreenHostResourceDragData };
|
|
10
20
|
|
|
11
21
|
//# sourceMappingURL=designer.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ScreenParseResult } from '../contracts/index.js';
|
|
2
2
|
export type { ScreenAuthoringEditorContext, ScreenAuthoringEditorLimits, ScreenAuthoringRequest, ScreenAuthoringRequestEventDetail, ScreenComponentTextCommitRequest, ScreenComponentTextTarget, } from '../contracts/index.js';
|
|
3
3
|
export { SCREEN_AUTHORING_REQUEST_EVENT } from '../contracts/index.js';
|
|
4
|
-
export { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, BASE_SCREEN_CHANGE_STATE_EVENT, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, BASE_SCREEN_DESIGNER_TAG_NAME, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, BASE_SCREEN_GUARD_CHANGE_EVENT, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, BASE_SCREEN_METRIC_EVENT, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, BASE_SCREEN_SCENE_CHANGE_EVENT, type BaseScreenBlueprintCanvasCommand, type BaseScreenBlueprintCanvasCommandEventDetail, type BaseScreenBlueprintCanvasCommandResult, type BaseScreenBlueprintCanvasEdge, type BaseScreenBlueprintCanvasEventOption, type BaseScreenBlueprintCanvasGraph, type BaseScreenBlueprintCanvasInsertNode, type BaseScreenBlueprintCanvasNode, type BaseScreenBlueprintCanvasNodePosition, type BaseScreenBlueprintCanvasSelection, type BaseScreenBlueprintCanvasState, type BaseScreenBlueprintCanvasStateEventDetail, type BaseScreenBlueprintCanvasTrace, type BaseScreenCanvasPresentationChangeEventDetail, type BaseScreenCanvasScaleMode, type BaseScreenDesignerBackRequestEventDetail, type BaseScreenDesignerChangeProposalSummary, type BaseScreenDesignerChangeStateDetail, type BaseScreenDesignerChangeUnitSummary, type BaseScreenDesignerConfiguration, BaseScreenDesignerElement, type BaseScreenDesignerLeftPanelGroup, type BaseScreenDesignerLeftPanelGroupChangeEventDetail, type BaseScreenDesignerLeftPanelGroupIcon, type BaseScreenDesignerSetWorkbenchModeOptions, type BaseScreenDesignerWorkbenchFocus, type BaseScreenDesignerWorkbenchMode, type BaseScreenDesignerWorkbenchModeChangeEventDetail, type BaseScreenDesignerWorkbenchModeChangeReason, type BaseScreenHostResourceAuthoringIntent, type BaseScreenHostResourceDragDataTransfer, type BaseScreenHostResourceSelection, type BaseScreenHostResourceSelectionCommit, type BaseScreenHostResourceSelectionCurrent, type BaseScreenHostResourceSelectionRequest, type BaseScreenHostResourceSelectionRequestEventDetail, type BaseScreenHostResourceSelectionTarget, type BaseScreenMaterialCatalogRefreshResult, type BaseScreenMaterialLibraryAction, type BaseScreenMaterialLibraryActionEventDetail, type BaseScreenMaterialLibraryGroup, type BaseScreenMaterialLibraryGrouping, type BaseScreenMaterialLibraryItem, type BaseScreenMaterialLibraryState, type BaseScreenMaterialLibraryStatus, type BaseScreenMetricEventDetail, type BaseScreenProjectStateChangeEventDetail, type BaseScreenSceneChangeDetail, baseScreenDesignerLeftPanelSlotName, type CreateBaseScreenCorePluginCommandPortOptions, type CreateBaseScreenCorePluginDesignReadPortOptions, createBaseScreenCorePluginCommandPort, createBaseScreenCorePluginDesignReadPort, type DesignerGuardSnapshot, type DesignerSceneDescriptor, type DesignerSceneHandler, type DesignerScenePlan, type DesignerScenePrepareResult, type DesignerScenePreview, type DesignerSceneRequest, defineBaseScreenDesigner, parseBaseScreenBlueprintCanvasCommand, parseBaseScreenDesignerLeftPanelGroups, parseBaseScreenHostResourceAuthoringIntent, parseBaseScreenMaterialLibraryGrouping, parseBaseScreenMaterialLibraryItems, parseBaseScreenMaterialLibraryState, prepareDesignerScenePreview, type ScreenProjectPhase, type ScreenProjectState, writeBaseScreenHostResourceDragData, } from './designer.js';
|
|
4
|
+
export { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, BASE_SCREEN_CHANGE_STATE_EVENT, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, BASE_SCREEN_DESIGNER_TAG_NAME, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, BASE_SCREEN_GUARD_CHANGE_EVENT, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, BASE_SCREEN_METRIC_EVENT, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, BASE_SCREEN_SCENE_CHANGE_EVENT, type BaseScreenBlueprintCanvasCommand, type BaseScreenBlueprintCanvasCommandEventDetail, type BaseScreenBlueprintCanvasCommandResult, type BaseScreenBlueprintCanvasEdge, type BaseScreenBlueprintCanvasEventOption, type BaseScreenBlueprintCanvasGraph, type BaseScreenBlueprintCanvasInsertNode, type BaseScreenBlueprintCanvasNode, type BaseScreenBlueprintCanvasNodePosition, type BaseScreenBlueprintCanvasSelection, type BaseScreenBlueprintCanvasState, type BaseScreenBlueprintCanvasStateEventDetail, type BaseScreenBlueprintCanvasTrace, type BaseScreenCanvasPresentationChangeEventDetail, type BaseScreenCanvasScaleMode, type BaseScreenDesignerBackRequestEventDetail, type BaseScreenDesignerChangeProposalSummary, type BaseScreenDesignerChangeStateDetail, type BaseScreenDesignerChangeUnitSummary, type BaseScreenDesignerConfiguration, BaseScreenDesignerElement, type BaseScreenDesignerLeftPanelGroup, type BaseScreenDesignerLeftPanelGroupChangeEventDetail, type BaseScreenDesignerLeftPanelGroupIcon, type BaseScreenDesignerSetWorkbenchModeOptions, type BaseScreenDesignerWorkbenchFocus, type BaseScreenDesignerWorkbenchMode, type BaseScreenDesignerWorkbenchModeChangeEventDetail, type BaseScreenDesignerWorkbenchModeChangeReason, type BaseScreenHostResourceAuthoringIntent, type BaseScreenHostResourceDragDataTransfer, type BaseScreenHostResourceSelection, type BaseScreenHostResourceSelectionCommit, type BaseScreenHostResourceSelectionCurrent, type BaseScreenHostResourceSelectionRequest, type BaseScreenHostResourceSelectionRequestEventDetail, type BaseScreenHostResourceSelectionTarget, type BaseScreenMaterialCatalogRefreshResult, type BaseScreenMaterialLibraryAction, type BaseScreenMaterialLibraryActionEventDetail, type BaseScreenMaterialLibraryGroup, type BaseScreenMaterialLibraryGrouping, type BaseScreenMaterialLibraryItem, type BaseScreenMaterialLibraryState, type BaseScreenMaterialLibraryStatus, type BaseScreenMetricEventDetail, type BaseScreenProjectStateChangeEventDetail, type BaseScreenSceneChangeDetail, baseScreenDesignerLeftPanelSlotName, type CreateBaseScreenCorePluginCommandPortOptions, type CreateBaseScreenCorePluginDesignReadPortOptions, createBaseScreenCorePluginCommandPort, createBaseScreenCorePluginDesignReadPort, type DesignerGuardSnapshot, type DesignerSceneDescriptor, type DesignerSceneHandler, type DesignerScenePlan, type DesignerScenePrepareResult, type DesignerScenePreview, type DesignerSceneRequest, defineBaseScreenDesigner, mountBaseScreenDesignerSkeleton, parseBaseScreenBlueprintCanvasCommand, parseBaseScreenDesignerLeftPanelGroups, parseBaseScreenHostResourceAuthoringIntent, parseBaseScreenMaterialLibraryGrouping, parseBaseScreenMaterialLibraryItems, parseBaseScreenMaterialLibraryState, prepareDesignerScenePreview, type ScreenProjectPhase, type ScreenProjectState, writeBaseScreenHostResourceDragData, } from './designer.js';
|
|
5
5
|
export { type BaseScreenMountController, type BaseScreenMountControllerReady, type CreateBaseScreenDesignerMountControllerOptions, type CreateBaseScreenViewerMountControllerOptions, createBaseScreenDesignerMountController, createBaseScreenViewerMountController, } from './mount-controller.js';
|
|
6
6
|
export { type BaseScreenMountElement, type BaseScreenMountHandle, type CreateBaseScreenMountHandleOptions, createBaseScreenMountHandle, } from './mount-handle.js';
|
|
7
7
|
export { type BaseScreenBlueprintCapabilityPlugin, type CreateBaseScreenBlueprintCapabilityPluginOptions, createBaseScreenBlueprintCapabilityPlugin, } from './plugins.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT as e, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT as t, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME as n, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT as r, BASE_SCREEN_CHANGE_STATE_EVENT as i, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT as a, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT as o, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT as s, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS as c, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX as l, BASE_SCREEN_DESIGNER_TAG_NAME as u, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT as d, BASE_SCREEN_GUARD_CHANGE_EVENT as f, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME as p, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT as m, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT as h, BASE_SCREEN_METRIC_EVENT as g, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT as _, BASE_SCREEN_SCENE_CHANGE_EVENT as v, BaseScreenDesignerElement as y, baseScreenDesignerLeftPanelSlotName as b, createBaseScreenCorePluginCommandPort as x, createBaseScreenCorePluginDesignReadPort as S, defineBaseScreenDesigner as C,
|
|
2
|
-
import { l as
|
|
3
|
-
import { a as
|
|
4
|
-
import { createBaseScreenBlueprintCapabilityPlugin as
|
|
5
|
-
import { BASE_SCREEN_OFFICIAL_GROUP_MATERIAL_TYPE as
|
|
6
|
-
export { e as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, t as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, n as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, r as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, i as BASE_SCREEN_CHANGE_STATE_EVENT, a as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, o as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, s as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, l as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, u as BASE_SCREEN_DESIGNER_TAG_NAME, d as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, f as BASE_SCREEN_GUARD_CHANGE_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, h as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, g as BASE_SCREEN_METRIC_EVENT,
|
|
1
|
+
import { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT as e, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT as t, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME as n, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT as r, BASE_SCREEN_CHANGE_STATE_EVENT as i, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT as a, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT as o, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT as s, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS as c, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX as l, BASE_SCREEN_DESIGNER_TAG_NAME as u, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT as d, BASE_SCREEN_GUARD_CHANGE_EVENT as f, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME as p, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT as m, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT as h, BASE_SCREEN_METRIC_EVENT as g, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT as _, BASE_SCREEN_SCENE_CHANGE_EVENT as v, BaseScreenDesignerElement as y, baseScreenDesignerLeftPanelSlotName as b, createBaseScreenCorePluginCommandPort as x, createBaseScreenCorePluginDesignReadPort as S, defineBaseScreenDesigner as C, mountBaseScreenDesignerSkeleton as w, parseBaseScreenBlueprintCanvasCommand as T, parseBaseScreenDesignerLeftPanelGroups as E, parseBaseScreenHostResourceAuthoringIntent as D, parseBaseScreenMaterialLibraryGrouping as O, parseBaseScreenMaterialLibraryItems as k, parseBaseScreenMaterialLibraryState as A, prepareDesignerScenePreview as j, writeBaseScreenHostResourceDragData as M } from "./designer.js";
|
|
2
|
+
import { l as N, n as P, r as F, t as I } from "./viewer-CrJupI8I.js";
|
|
3
|
+
import { a as L, i as R, n as z, o as B, r as V, t as H } from "./src-Bm7u11mN.js";
|
|
4
|
+
import { createBaseScreenBlueprintCapabilityPlugin as U } from "./plugins.js";
|
|
5
|
+
import { BASE_SCREEN_OFFICIAL_GROUP_MATERIAL_TYPE as W, BASE_SCREEN_OFFICIAL_TOOL_MATERIAL_TYPES as G } from "./material.js";
|
|
6
|
+
export { e as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, t as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, n as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, r as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, i as BASE_SCREEN_CHANGE_STATE_EVENT, a as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, o as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, s as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, l as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, u as BASE_SCREEN_DESIGNER_TAG_NAME, d as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, f as BASE_SCREEN_GUARD_CHANGE_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, h as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, g as BASE_SCREEN_METRIC_EVENT, W as BASE_SCREEN_OFFICIAL_GROUP_MATERIAL_TYPE, G as BASE_SCREEN_OFFICIAL_TOOL_MATERIAL_TYPES, _ as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, v as BASE_SCREEN_SCENE_CHANGE_EVENT, I as BASE_SCREEN_VIEWER_TAG_NAME, y as BaseScreenDesignerElement, P as BaseScreenViewerElement, H as SCREEN_AUTHORING_REQUEST_EVENT, V as adoptBaseScreenRuntime, b as baseScreenDesignerLeftPanelSlotName, U as createBaseScreenBlueprintCapabilityPlugin, x as createBaseScreenCorePluginCommandPort, S as createBaseScreenCorePluginDesignReadPort, L as createBaseScreenDesignerMountController, N as createBaseScreenMountHandle, R as createBaseScreenRuntime, B as createBaseScreenViewerMountController, C as defineBaseScreenDesigner, z as defineBaseScreenElements, F as defineBaseScreenViewer, w as mountBaseScreenDesignerSkeleton, T as parseBaseScreenBlueprintCanvasCommand, E as parseBaseScreenDesignerLeftPanelGroups, D as parseBaseScreenHostResourceAuthoringIntent, O as parseBaseScreenMaterialLibraryGrouping, k as parseBaseScreenMaterialLibraryItems, A as parseBaseScreenMaterialLibraryState, j as prepareDesignerScenePreview, M as writeBaseScreenHostResourceDragData };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
//#region ../contracts/dist/types/authoring.js
|
|
2
|
+
var e = "base-screen-authoring-request", t = 128, n = 262144, r = 32, i = 262144, a = 1048576, o = /* @__PURE__ */ new Set([
|
|
3
|
+
"kind",
|
|
4
|
+
"requestId",
|
|
5
|
+
"documentRevision"
|
|
6
|
+
]);
|
|
7
|
+
function s(e) {
|
|
8
|
+
if (typeof e != "object" || !e || Array.isArray(e)) return p("AUTHORING_REQUEST_INVALID", [], "Authoring request must be an object.");
|
|
9
|
+
let t = e;
|
|
10
|
+
if (t.kind === "component-text") {
|
|
11
|
+
for (let e of Object.keys(t)) if (!o.has(e) && e !== "componentId" && e !== "maxBytes" && e !== "target" && e !== "source" && e !== "format") return p("AUTHORING_REQUEST_INVALID", [e], "Unknown request field.");
|
|
12
|
+
return u(t.requestId) ? typeof t.componentId != "string" || t.componentId.length === 0 ? p("AUTHORING_REQUEST_INVALID", ["componentId"], "Component id is invalid.") : t.documentRevision !== null && typeof t.documentRevision != "string" ? p("AUTHORING_REQUEST_INVALID", ["documentRevision"], "Document revision must be a string or null.") : t.target !== "props" && t.target !== "style" && t.target !== "data" ? p("AUTHORING_REQUEST_INVALID", ["target"], "Target is unsupported.") : typeof t.source == "string" ? f(t.source) > 262144 ? p("AUTHORING_LIMIT_EXCEEDED", ["source"], "Source exceeds the authoring byte limit.") : t.format !== "json" && t.format !== "expression" ? p("AUTHORING_REQUEST_INVALID", ["format"], "Format is unsupported.") : d(t.maxBytes) ? {
|
|
13
|
+
ok: !0,
|
|
14
|
+
value: {
|
|
15
|
+
kind: "component-text",
|
|
16
|
+
requestId: t.requestId,
|
|
17
|
+
componentId: t.componentId,
|
|
18
|
+
documentRevision: t.documentRevision,
|
|
19
|
+
target: t.target,
|
|
20
|
+
source: t.source,
|
|
21
|
+
format: t.format,
|
|
22
|
+
maxBytes: t.maxBytes
|
|
23
|
+
},
|
|
24
|
+
diagnostics: []
|
|
25
|
+
} : p("AUTHORING_REQUEST_INVALID", ["maxBytes"], "Byte budget is invalid.") : p("AUTHORING_REQUEST_INVALID", ["source"], "Source must be a string.") : p("AUTHORING_REQUEST_INVALID", ["requestId"], "Request id is invalid.");
|
|
26
|
+
}
|
|
27
|
+
return p("AUTHORING_REQUEST_INVALID", ["kind"], "Request kind is unsupported.");
|
|
28
|
+
}
|
|
29
|
+
function c(e) {
|
|
30
|
+
if (typeof e != "object" || !e || Array.isArray(e)) return m("AUTHORING_REQUEST_INVALID", [], "Editor context must be an object.");
|
|
31
|
+
let t = e;
|
|
32
|
+
if (typeof t.instanceId != "string" || t.instanceId.length === 0) return m("AUTHORING_REQUEST_INVALID", ["instanceId"], "Instance id is invalid.");
|
|
33
|
+
if (!u(t.requestId)) return m("AUTHORING_REQUEST_INVALID", ["requestId"], "Request id is invalid.");
|
|
34
|
+
if (t.componentId !== null && typeof t.componentId != "string") return m("AUTHORING_REQUEST_INVALID", ["componentId"], "Component id must be a string or null.");
|
|
35
|
+
if (t.documentRevision !== null && typeof t.documentRevision != "string") return m("AUTHORING_REQUEST_INVALID", ["documentRevision"], "Document revision must be a string or null.");
|
|
36
|
+
for (let e of [
|
|
37
|
+
"componentSnapshot",
|
|
38
|
+
"manifest",
|
|
39
|
+
"blueprint"
|
|
40
|
+
]) if (t[e] !== null && (t[e] === void 0 || t[e] === null || typeof t[e] != "object")) return m("AUTHORING_REQUEST_INVALID", [e], "Detached snapshot is invalid.");
|
|
41
|
+
let n = t.limits;
|
|
42
|
+
return typeof n != "object" || !n || !d(n.maxSourceBytes) || !d(n.maxCandidateBytes) || typeof n.maxJsonDepth != "number" || !Number.isInteger(n.maxJsonDepth) || n.maxJsonDepth < 1 || n.maxJsonDepth > 128 ? m("AUTHORING_REQUEST_INVALID", ["limits"], "Editor limits are invalid.") : {
|
|
43
|
+
ok: !0,
|
|
44
|
+
value: t,
|
|
45
|
+
diagnostics: []
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function l(e) {
|
|
49
|
+
return s(e).ok;
|
|
50
|
+
}
|
|
51
|
+
function u(e) {
|
|
52
|
+
return typeof e == "string" && e.length > 0 && e.length <= 128;
|
|
53
|
+
}
|
|
54
|
+
function d(e) {
|
|
55
|
+
return typeof e == "number" && Number.isInteger(e) && e >= 1024 && e <= 262144;
|
|
56
|
+
}
|
|
57
|
+
function f(e) {
|
|
58
|
+
let t = 0;
|
|
59
|
+
for (let n = 0; n < e.length; n++) {
|
|
60
|
+
let r = e.charCodeAt(n);
|
|
61
|
+
t += r <= 127 ? 1 : r <= 2047 ? 2 : r >= 55296 && r <= 57343 ? 4 : 3;
|
|
62
|
+
}
|
|
63
|
+
return t;
|
|
64
|
+
}
|
|
65
|
+
function p(e, t, n) {
|
|
66
|
+
return {
|
|
67
|
+
ok: !1,
|
|
68
|
+
diagnostics: [{
|
|
69
|
+
severity: "error",
|
|
70
|
+
code: e,
|
|
71
|
+
path: t,
|
|
72
|
+
message: n
|
|
73
|
+
}]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function m(e, t, n) {
|
|
77
|
+
return {
|
|
78
|
+
ok: !1,
|
|
79
|
+
diagnostics: [{
|
|
80
|
+
severity: "error",
|
|
81
|
+
code: e,
|
|
82
|
+
path: t,
|
|
83
|
+
message: n
|
|
84
|
+
}]
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function h(e) {
|
|
88
|
+
if (Array.isArray(e)) {
|
|
89
|
+
let t = 0;
|
|
90
|
+
for (let n of e) t = Math.max(t, h(n));
|
|
91
|
+
return t + 1;
|
|
92
|
+
}
|
|
93
|
+
if (typeof e == "object" && e) {
|
|
94
|
+
let t = 0, n = e;
|
|
95
|
+
for (let e of Object.keys(n)) t = Math.max(t, h(n[e]));
|
|
96
|
+
return t + 1;
|
|
97
|
+
}
|
|
98
|
+
return 0;
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
export { n as a, h as c, t as i, c as l, a as n, e as o, r, l as s, i as t, s as u };
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=authoring-EcyK2YVN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring-EcyK2YVN.js","names":[],"sources":["../../contracts/dist/types/authoring.js"],"sourcesContent":["export const SCREEN_AUTHORING_REQUEST_EVENT = 'base-screen-authoring-request';\nexport const MAX_AUTHORING_REQUEST_ID_LENGTH = 128;\nexport const MAX_AUTHORING_SOURCE_BYTES = 256 * 1024;\nexport const MAX_AUTHORING_JSON_DEPTH = 32;\nexport const MAX_AUTHORING_CANDIDATE_BYTES = 256 * 1024;\nexport const MAX_AUTHORING_COMPONENT_SNAPSHOT_BYTES = 1024 * 1024;\nconst REQUEST_FIELDS_COMMON = new Set(['kind', 'requestId', 'documentRevision']);\nexport function parseScreenAuthoringRequest(input) {\n if (input === null || typeof input !== 'object' || Array.isArray(input)) {\n return authoringFailure('AUTHORING_REQUEST_INVALID', [], 'Authoring request must be an object.');\n }\n const record = input;\n const kind = record.kind;\n if (kind === 'component-text') {\n for (const key of Object.keys(record)) {\n if (!REQUEST_FIELDS_COMMON.has(key) &&\n key !== 'componentId' &&\n key !== 'maxBytes' &&\n key !== 'target' &&\n key !== 'source' &&\n key !== 'format') {\n return authoringFailure('AUTHORING_REQUEST_INVALID', [key], 'Unknown request field.');\n }\n }\n if (!isRequestId(record.requestId)) {\n return authoringFailure('AUTHORING_REQUEST_INVALID', ['requestId'], 'Request id is invalid.');\n }\n if (typeof record.componentId !== 'string' || record.componentId.length === 0) {\n return authoringFailure('AUTHORING_REQUEST_INVALID', ['componentId'], 'Component id is invalid.');\n }\n if (record.documentRevision !== null && typeof record.documentRevision !== 'string') {\n return authoringFailure('AUTHORING_REQUEST_INVALID', ['documentRevision'], 'Document revision must be a string or null.');\n }\n if (record.target !== 'props' && record.target !== 'style' && record.target !== 'data') {\n return authoringFailure('AUTHORING_REQUEST_INVALID', ['target'], 'Target is unsupported.');\n }\n if (typeof record.source !== 'string') {\n return authoringFailure('AUTHORING_REQUEST_INVALID', ['source'], 'Source must be a string.');\n }\n if (byteLength(record.source) > MAX_AUTHORING_SOURCE_BYTES) {\n return authoringFailure('AUTHORING_LIMIT_EXCEEDED', ['source'], 'Source exceeds the authoring byte limit.');\n }\n if (record.format !== 'json' && record.format !== 'expression') {\n return authoringFailure('AUTHORING_REQUEST_INVALID', ['format'], 'Format is unsupported.');\n }\n if (!isByteBudget(record.maxBytes)) {\n return authoringFailure('AUTHORING_REQUEST_INVALID', ['maxBytes'], 'Byte budget is invalid.');\n }\n return {\n ok: true,\n value: {\n kind: 'component-text',\n requestId: record.requestId,\n componentId: record.componentId,\n documentRevision: record.documentRevision,\n target: record.target,\n source: record.source,\n format: record.format,\n maxBytes: record.maxBytes,\n },\n diagnostics: [],\n };\n }\n return authoringFailure('AUTHORING_REQUEST_INVALID', ['kind'], 'Request kind is unsupported.');\n}\nexport function parseScreenAuthoringEditorContext(input) {\n if (input === null || typeof input !== 'object' || Array.isArray(input)) {\n return contextFailure('AUTHORING_REQUEST_INVALID', [], 'Editor context must be an object.');\n }\n const record = input;\n if (typeof record.instanceId !== 'string' || record.instanceId.length === 0) {\n return contextFailure('AUTHORING_REQUEST_INVALID', ['instanceId'], 'Instance id is invalid.');\n }\n if (!isRequestId(record.requestId)) {\n return contextFailure('AUTHORING_REQUEST_INVALID', ['requestId'], 'Request id is invalid.');\n }\n if (record.componentId !== null && typeof record.componentId !== 'string') {\n return contextFailure('AUTHORING_REQUEST_INVALID', ['componentId'], 'Component id must be a string or null.');\n }\n if (record.documentRevision !== null && typeof record.documentRevision !== 'string') {\n return contextFailure('AUTHORING_REQUEST_INVALID', ['documentRevision'], 'Document revision must be a string or null.');\n }\n for (const field of ['componentSnapshot', 'manifest', 'blueprint']) {\n if (record[field] !== null &&\n (record[field] === undefined || record[field] === null || typeof record[field] !== 'object')) {\n return contextFailure('AUTHORING_REQUEST_INVALID', [field], 'Detached snapshot is invalid.');\n }\n }\n const limits = record.limits;\n if (limits === null ||\n typeof limits !== 'object' ||\n !isByteBudget(limits.maxSourceBytes) ||\n !isByteBudget(limits.maxCandidateBytes) ||\n typeof limits.maxJsonDepth !== 'number' ||\n !Number.isInteger(limits.maxJsonDepth) ||\n limits.maxJsonDepth < 1 ||\n limits.maxJsonDepth > 128) {\n return contextFailure('AUTHORING_REQUEST_INVALID', ['limits'], 'Editor limits are invalid.');\n }\n return {\n ok: true,\n value: record,\n diagnostics: [],\n };\n}\nexport function isScreenAuthoringRequest(value) {\n return parseScreenAuthoringRequest(value).ok;\n}\nfunction isRequestId(value) {\n return (typeof value === 'string' && value.length > 0 && value.length <= MAX_AUTHORING_REQUEST_ID_LENGTH);\n}\nfunction isByteBudget(value) {\n return (typeof value === 'number' &&\n Number.isInteger(value) &&\n value >= 1024 &&\n value <= MAX_AUTHORING_CANDIDATE_BYTES);\n}\nfunction byteLength(value) {\n let bytes = 0;\n for (let index = 0; index < value.length; index++) {\n const code = value.charCodeAt(index);\n bytes += code <= 0x7f ? 1 : code <= 0x7ff ? 2 : code >= 0xd800 && code <= 0xdfff ? 4 : 3;\n }\n return bytes;\n}\nfunction authoringFailure(code, path, message) {\n return { ok: false, diagnostics: [{ severity: 'error', code, path, message }] };\n}\nfunction contextFailure(code, path, message) {\n return { ok: false, diagnostics: [{ severity: 'error', code, path, message }] };\n}\nexport function jsonDepth(value) {\n if (Array.isArray(value)) {\n let depth = 0;\n for (const item of value)\n depth = Math.max(depth, jsonDepth(item));\n return depth + 1;\n }\n if (value !== null && typeof value === 'object') {\n let depth = 0;\n const record = value;\n for (const key of Object.keys(record))\n depth = Math.max(depth, jsonDepth(record[key]));\n return depth + 1;\n }\n return 0;\n}\n//# sourceMappingURL=authoring.js.map"],"mappings":"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"}
|
package/dist/auto-register.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { o as e } from "./authoring-EcyK2YVN.js";
|
|
2
|
+
import { S as t, _ as n, b as r, g as i, h as a, l as o, n as s, o as c, s as l, x as u, y as d } from "./designer-left-panel-groups-dom-WMsH33zw-B9pl8loh.js";
|
|
3
|
+
import { b as f, g as p, k as m, y as h } from "./host-resource-selection-5Cf_gclK-Sv4Z8UXS.js";
|
|
4
|
+
import { t as g } from "./dist-DfAV2jGI.js";
|
|
5
|
+
import { _, c as v, f as y, g as b, h as x, i as S, l as C, m as w, n as T, o as E, p as D, r as O, s as k, u as A, v as j } from "./dist-BHTClwId.js";
|
|
6
|
+
import { n as M, r as N, t as P } from "./designer-Byw45cUM.js";
|
|
7
|
+
import { i as F, l as I, u as L } from "./viewer-CrJupI8I-DZZfdHXr.js";
|
|
8
|
+
import { t as R } from "./plugins-B9bwk-t6.js";
|
|
9
|
+
import { n as z, t as B } from "./material-BPlvEmDi.js";
|
|
10
|
+
import { a as V, i as H, n as U, r as W, t as G } from "./src-Bm7u11mN-BMeb9fvV.js";
|
|
9
11
|
//#region ../sdk/dist/auto-register.js
|
|
10
|
-
if (!
|
|
12
|
+
if (!W().ok) throw Error("Base Screen product element registration failed.");
|
|
11
13
|
//#endregion
|
|
12
|
-
export {
|
|
14
|
+
export { r as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, s as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, c as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, E as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, C as BASE_SCREEN_CHANGE_STATE_EVENT, k as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, u as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, t as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, i as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, a as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, P as BASE_SCREEN_DESIGNER_TAG_NAME, l as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, S as BASE_SCREEN_GUARD_CHANGE_EVENT, h as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, f as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, D as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, w as BASE_SCREEN_METRIC_EVENT, z as BASE_SCREEN_OFFICIAL_GROUP_MATERIAL_TYPE, B as BASE_SCREEN_OFFICIAL_TOOL_MATERIAL_TYPES, y as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, O as BASE_SCREEN_SCENE_CHANGE_EVENT, F as BASE_SCREEN_VIEWER_TAG_NAME, j as BaseScreenDesignerElement, g as BaseScreenViewerElement, e as SCREEN_AUTHORING_REQUEST_EVENT, U as adoptBaseScreenRuntime, n as baseScreenDesignerLeftPanelSlotName, R as createBaseScreenBlueprintCapabilityPlugin, _ as createBaseScreenCorePluginCommandPort, x as createBaseScreenCorePluginDesignReadPort, V as createBaseScreenDesignerMountController, I as createBaseScreenMountHandle, H as createBaseScreenRuntime, G as createBaseScreenViewerMountController, M as defineBaseScreenDesigner, W as defineBaseScreenElements, L as defineBaseScreenViewer, N as mountBaseScreenDesignerSkeleton, o as parseBaseScreenBlueprintCanvasCommand, d as parseBaseScreenDesignerLeftPanelGroups, m as parseBaseScreenHostResourceAuthoringIntent, b as parseBaseScreenMaterialLibraryGrouping, v as parseBaseScreenMaterialLibraryItems, T as parseBaseScreenMaterialLibraryState, A as prepareDesignerScenePreview, p as writeBaseScreenHostResourceDragData };
|
|
13
15
|
|
|
14
16
|
//# sourceMappingURL=auto-register.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-register.js","names":["
|
|
1
|
+
{"version":3,"file":"auto-register.js","names":["z"],"sources":["../../sdk/dist/auto-register.js"],"sourcesContent":["import { BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT as e, BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT as t, BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME as n, BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT as r, BASE_SCREEN_CHANGE_STATE_EVENT as i, BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT as a, BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT as o, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT as s, BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS as c, BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX as l, BASE_SCREEN_DESIGNER_TAG_NAME as u, BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT as d, BASE_SCREEN_GUARD_CHANGE_EVENT as f, BASE_SCREEN_HOST_RESOURCE_DRAG_MIME as p, BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT as m, BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT as h, BASE_SCREEN_METRIC_EVENT as g, BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT as _, BASE_SCREEN_SCENE_CHANGE_EVENT as v, BaseScreenDesignerElement as y, baseScreenDesignerLeftPanelSlotName as b, createBaseScreenCorePluginCommandPort as x, createBaseScreenCorePluginDesignReadPort as S, defineBaseScreenDesigner as C, mountBaseScreenDesignerSkeleton as w, parseBaseScreenBlueprintCanvasCommand as T, parseBaseScreenDesignerLeftPanelGroups as E, parseBaseScreenHostResourceAuthoringIntent as D, parseBaseScreenMaterialLibraryGrouping as O, parseBaseScreenMaterialLibraryItems as k, parseBaseScreenMaterialLibraryState as A, prepareDesignerScenePreview as j, writeBaseScreenHostResourceDragData as M } from \"./designer.js\";\nimport { l as N, n as P, r as F, t as I } from \"./viewer-CrJupI8I.js\";\nimport { a as L, i as R, n as z, o as B, r as V, t as H } from \"./src-Bm7u11mN.js\";\nimport { createBaseScreenBlueprintCapabilityPlugin as U } from \"./plugins.js\";\nimport { BASE_SCREEN_OFFICIAL_GROUP_MATERIAL_TYPE as W, BASE_SCREEN_OFFICIAL_TOOL_MATERIAL_TYPES as G } from \"./material.js\";\n//#region src/auto-register.ts\nif (!z().ok) throw Error(\"Base Screen product element registration failed.\");\n//#endregion\nexport { e as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, t as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, n as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, r as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, i as BASE_SCREEN_CHANGE_STATE_EVENT, a as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, o as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, s as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, l as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, u as BASE_SCREEN_DESIGNER_TAG_NAME, d as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, f as BASE_SCREEN_GUARD_CHANGE_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, h as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, g as BASE_SCREEN_METRIC_EVENT, W as BASE_SCREEN_OFFICIAL_GROUP_MATERIAL_TYPE, G as BASE_SCREEN_OFFICIAL_TOOL_MATERIAL_TYPES, _ as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, v as BASE_SCREEN_SCENE_CHANGE_EVENT, I as BASE_SCREEN_VIEWER_TAG_NAME, y as BaseScreenDesignerElement, P as BaseScreenViewerElement, H as SCREEN_AUTHORING_REQUEST_EVENT, V as adoptBaseScreenRuntime, b as baseScreenDesignerLeftPanelSlotName, U as createBaseScreenBlueprintCapabilityPlugin, x as createBaseScreenCorePluginCommandPort, S as createBaseScreenCorePluginDesignReadPort, L as createBaseScreenDesignerMountController, N as createBaseScreenMountHandle, R as createBaseScreenRuntime, B as createBaseScreenViewerMountController, C as defineBaseScreenDesigner, z as defineBaseScreenElements, F as defineBaseScreenViewer, w as mountBaseScreenDesignerSkeleton, T as parseBaseScreenBlueprintCanvasCommand, E as parseBaseScreenDesignerLeftPanelGroups, D as parseBaseScreenHostResourceAuthoringIntent, O as parseBaseScreenMaterialLibraryGrouping, k as parseBaseScreenMaterialLibraryItems, A as parseBaseScreenMaterialLibraryState, j as prepareDesignerScenePreview, M as writeBaseScreenHostResourceDragData };\n\n//# sourceMappingURL=auto-register.js.map"],"mappings":";;;;;;;;;;;AAMA,IAAI,CAACA,EAAE,CAAC,CAAC,IAAI,MAAM,MAAM,kDAAkD"}
|
package/dist/contracts.js
CHANGED
|
@@ -5,9 +5,10 @@ import { a as f, i as p, n as m, r as h, t as g } from "./dataset-port-CUsMmX2x.
|
|
|
5
5
|
import { A as _, B as v, C as y, F as b, H as x, I as S, L as C, M as w, N as T, O as E, R as D, S as O, T as k, U as A, V as j, d as M, f as N, g as P, j as F, k as I, n as L, r as R, t as z, u as B, w as V, x as H, z as U } from "./schema-C38FI_z2.js";
|
|
6
6
|
import { a as W, c as G, l as K, n as q, o as J, r as Y, s as X, t as ie, u as ae } from "./parse-BQw3u9_4.js";
|
|
7
7
|
import { a as oe, i as se, n as ce, r as le, t as ue } from "./read-data-value-WmMKWshv.js";
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
8
|
+
import { a as de, i as fe, n as pe, o as me, r as he, s as ge, t as _e } from "./parse-B0hwp_yj.js";
|
|
9
|
+
import { t as ve } from "./equality-DjZ9cv4u.js";
|
|
10
|
+
import { t as ye } from "./migrate-document-BJUN7NPv.js";
|
|
11
|
+
import { a as be, c as xe, i as Se, l as Ce, n as we, o as Te, r as Ee, s as De, t as Oe, u as ke } from "./authoring-EcyK2YVN.js";
|
|
11
12
|
import { z as Z } from "zod";
|
|
12
13
|
//#region ../contracts/dist/document/json-schema.js
|
|
13
14
|
var Ae = "urn:base-screen:schema:screen-document";
|
|
@@ -98,6 +99,6 @@ function $(e) {
|
|
|
98
99
|
}
|
|
99
100
|
var Ie = je();
|
|
100
101
|
//#endregion
|
|
101
|
-
export { z as COMPONENT_ID_PATTERN,
|
|
102
|
+
export { z as COMPONENT_ID_PATTERN, Oe as MAX_AUTHORING_CANDIDATE_BYTES, we as MAX_AUTHORING_COMPONENT_SNAPSHOT_BYTES, Ee as MAX_AUTHORING_JSON_DEPTH, Se as MAX_AUTHORING_REQUEST_ID_LENGTH, be as MAX_AUTHORING_SOURCE_BYTES, te as MAX_DATASET_BYTES, s as MAX_DATASET_FIELDS, a as MAX_DATASET_FIELD_FORMAT_LENGTH, ee as MAX_DATASET_FIELD_UNIT_LENGTH, ne as MAX_DATASET_PAGE_ITEMS, o as MAX_DATASET_ROWS, H as MAX_DATA_SOURCES, O as MAX_DATA_SOURCE_NAME_CODE_POINTS, y as MAX_DATA_SOURCE_PARAMS, V as MAX_DATA_SOURCE_UPDATE_INTERVAL_SECONDS, k as MAX_DATA_SOURCE_VALUE_BYTES, _e as MAX_HOST_CATALOG_BYTES, pe as MAX_HOST_CATALOG_PAGE_ITEMS, m as MAX_SCREEN_MATERIAL_ERROR_MESSAGE_LENGTH, E as MAX_STYLE_RULES_PER_COMPONENT, I as MAX_STYLE_RULE_ID_CODE_POINTS, _ as MAX_STYLE_RULE_PATH_SEGMENTS, F as MAX_STYLE_RULE_PATH_SEGMENT_CODE_POINTS, w as MAX_STYLE_RULE_VALUE_BYTES, T as MAX_VALUE_REF_PATH_SEGMENTS, b as MIN_DATA_SOURCE_UPDATE_INTERVAL_SECONDS, Te as SCREEN_AUTHORING_REQUEST_EVENT, v as SCREEN_BLUEPRINT_CAPABILITIES, j as SCREEN_BLUEPRINT_CAPABILITY_IDS, x as SCREEN_BLUEPRINT_COMPONENT_VISIBILITY_CAPABILITY, A as SCREEN_BLUEPRINT_MATERIAL_EVENT_CAPABILITY, X as SCREEN_CANVAS_BACKGROUND_TYPES, G as SCREEN_CANVAS_FIELDS, Ie as SCREEN_DOCUMENT_JSON_SCHEMA, h as SCREEN_MATERIAL_ERROR_CODES, me as ScreenSerializationError, L as VALUE_REF_PATH_SEGMENT_PATTERN, R as VARIABLE_NAME_PATTERN, n as compareScreenDiagnostics, S as deriveScreenBlueprintRules, ue as derivedDataSourceId, W as diagnoseDataSourceCycles, d as evaluateScreenDatasetParameters, i as isBoundedScreenImageUrl, De as isScreenAuthoringRequest, K as isScreenCanvasBackground, ae as isScreenCanvasPaletteColor, M as isScreenComponentId, g as isScreenHostDatasetPort, p as isScreenMaterialErrorCode, r as isScreenMaterialType, N as isScreenVariableName, xe as jsonDepth, ye as migrateScreenDocument, f as normalizeScreenMaterialError, Ce as parseScreenAuthoringEditorContext, ke as parseScreenAuthoringRequest, ie as parseScreenDataSource, l as parseScreenDatasetDefinition, u as parseScreenDatasetEntries, c as parseScreenDatasetGroups, q as parseScreenDocument, he as parseScreenHostCatalogDescriptor, fe as parseScreenHostCatalogPage, e as parseScreenJsonValue, Y as parseScreenProjectEnvelope, re as parseScreenTabularDataset, C as readScreenBlueprintRelationCategory, ce as readScreenComponentDataBinding, le as readScreenComponentValueRef, se as readScreenDocumentDataSources, oe as readScreenVariableRecord, D as relationCapabilities, U as screenBlueprintEffectTargetKind, J as screenDataSourceOrder, ve as screenJsonEquals, ge as serializeScreenDocument, t as sortScreenDiagnostics, de as validateScreenDesignerHostAdapter };
|
|
102
103
|
|
|
103
104
|
//# sourceMappingURL=contracts.js.map
|
package/dist/contracts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","names":[],"sources":["../../contracts/dist/document/json-schema.js"],"sourcesContent":["import { z } from 'zod';\nimport { MAX_BACKGROUND_COLOR_CODE_POINTS, MAX_BACKGROUND_IMAGE_CODE_POINTS, MAX_BLUEPRINT_EXPRESSION_CONTAINERS, MAX_NAME_CODE_POINTS, } from './limits.js';\nimport { documentSchema } from './schema.js';\nexport const SCREEN_DOCUMENT_JSON_SCHEMA_ID = 'urn:base-screen:schema:screen-document';\nexport function generateScreenDocumentJsonSchema() {\n const generated = z.toJSONSchema(documentSchema);\n generated.$id = SCREEN_DOCUMENT_JSON_SCHEMA_ID;\n const properties = getObject(generated.properties);\n const canvas = getObject(getObject(properties.canvas).properties);\n getObject(canvas.backgroundColor).maxLength = MAX_BACKGROUND_COLOR_CODE_POINTS;\n getObject(canvas.backgroundImage).maxLength = MAX_BACKGROUND_IMAGE_CODE_POINTS;\n const components = getObject(properties.components);\n const component = getObject(components.items);\n const componentProperties = getObject(component.properties);\n getObject(componentProperties.name).maxLength = MAX_NAME_CODE_POINTS;\n const styleRuleWhen = getObject(getObject(getObject(getObject(componentProperties.styleRules).items).properties).when);\n styleRuleWhen.allOf = [\n {\n if: { properties: { operator: { const: 'exists' } }, required: ['operator'] },\n then: { not: { required: ['value'] } },\n else: { required: ['value'] },\n },\n ];\n // 数据源实例的刷新策略交叉约束:auto 必须带 intervalSeconds,其余模式禁止带。\n const updatePolicy = getObject(getObject(getObject(getObject(properties.dataSources).items).properties).updatePolicy);\n updatePolicy.allOf = [\n {\n if: { properties: { mode: { const: 'auto' } }, required: ['mode'] },\n then: { required: ['intervalSeconds'] },\n else: { not: { required: ['intervalSeconds'] } },\n },\n ];\n const behaviorRelation = findObjectWithTypeConst(generated, 'behavior');\n const condition = getObject(getObject(behaviorRelation.properties).condition);\n condition.allOf = [\n {\n if: { properties: { operator: { const: 'exists' } }, required: ['operator'] },\n then: { not: { required: ['right'] } },\n else: { required: ['right'] },\n },\n ];\n const expression = findExpressionDefinition(generated);\n const objectExpression = expression.anyOf.find((branch) => getObject(getObject(getObject(branch).properties).kind).const === 'object');\n const objectProperties = getObject(getObject(objectExpression).properties).properties;\n getObject(objectProperties).maxProperties = MAX_BLUEPRINT_EXPRESSION_CONTAINERS;\n return generated;\n}\nfunction findExpressionDefinition(generated) {\n const definitions = getObject(generated.$defs);\n for (const value of Object.values(definitions)) {\n if (isExpressionSchema(value))\n return getObject(value);\n }\n throw new Error('Blueprint expression definition is missing from the screen document schema.');\n}\nfunction isExpressionSchema(value) {\n if (value === null || typeof value !== 'object')\n return false;\n const anyOf = value.anyOf;\n if (!Array.isArray(anyOf))\n return false;\n return anyOf.some((branch) => {\n if (branch === null || typeof branch !== 'object')\n return false;\n const properties = branch.properties;\n if (properties === null || typeof properties !== 'object')\n return false;\n const kind = properties.kind;\n return (kind !== null && typeof kind === 'object' && kind.const === 'object');\n });\n}\nfunction findObjectWithTypeConst(root, constant) {\n const found = searchObjectWithTypeConst(root, constant);\n if (found === undefined) {\n throw new Error(`Schema branch with type \"${constant}\" is missing.`);\n }\n return found;\n}\nfunction searchObjectWithTypeConst(value, constant) {\n if (value === null || typeof value !== 'object')\n return undefined;\n if (Array.isArray(value)) {\n for (const item of value) {\n const found = searchObjectWithTypeConst(item, constant);\n if (found !== undefined)\n return found;\n }\n return undefined;\n }\n const direct = tryFindObjectWithTypeConst(value, constant);\n if (direct !== undefined)\n return direct;\n for (const child of Object.values(value)) {\n const found = searchObjectWithTypeConst(child, constant);\n if (found !== undefined)\n return found;\n }\n return undefined;\n}\nfunction tryFindObjectWithTypeConst(value, constant) {\n if (value === null || typeof value !== 'object' || Array.isArray(value))\n return undefined;\n const properties = value.properties;\n if (properties === null || typeof properties !== 'object')\n return undefined;\n const type = properties.type;\n if (type === null || typeof type !== 'object')\n return undefined;\n return type.const === constant\n ? value\n : undefined;\n}\nfunction getObject(value) {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) {\n throw new Error('Invalid JSON Schema structure in screen document schema generation.');\n }\n return value;\n}\nexport const SCREEN_DOCUMENT_JSON_SCHEMA = generateScreenDocumentJsonSchema();\n//# sourceMappingURL=json-schema.js.map"],"mappings":"
|
|
1
|
+
{"version":3,"file":"contracts.js","names":[],"sources":["../../contracts/dist/document/json-schema.js"],"sourcesContent":["import { z } from 'zod';\nimport { MAX_BACKGROUND_COLOR_CODE_POINTS, MAX_BACKGROUND_IMAGE_CODE_POINTS, MAX_BLUEPRINT_EXPRESSION_CONTAINERS, MAX_NAME_CODE_POINTS, } from './limits.js';\nimport { documentSchema } from './schema.js';\nexport const SCREEN_DOCUMENT_JSON_SCHEMA_ID = 'urn:base-screen:schema:screen-document';\nexport function generateScreenDocumentJsonSchema() {\n const generated = z.toJSONSchema(documentSchema);\n generated.$id = SCREEN_DOCUMENT_JSON_SCHEMA_ID;\n const properties = getObject(generated.properties);\n const canvas = getObject(getObject(properties.canvas).properties);\n getObject(canvas.backgroundColor).maxLength = MAX_BACKGROUND_COLOR_CODE_POINTS;\n getObject(canvas.backgroundImage).maxLength = MAX_BACKGROUND_IMAGE_CODE_POINTS;\n const components = getObject(properties.components);\n const component = getObject(components.items);\n const componentProperties = getObject(component.properties);\n getObject(componentProperties.name).maxLength = MAX_NAME_CODE_POINTS;\n const styleRuleWhen = getObject(getObject(getObject(getObject(componentProperties.styleRules).items).properties).when);\n styleRuleWhen.allOf = [\n {\n if: { properties: { operator: { const: 'exists' } }, required: ['operator'] },\n then: { not: { required: ['value'] } },\n else: { required: ['value'] },\n },\n ];\n // 数据源实例的刷新策略交叉约束:auto 必须带 intervalSeconds,其余模式禁止带。\n const updatePolicy = getObject(getObject(getObject(getObject(properties.dataSources).items).properties).updatePolicy);\n updatePolicy.allOf = [\n {\n if: { properties: { mode: { const: 'auto' } }, required: ['mode'] },\n then: { required: ['intervalSeconds'] },\n else: { not: { required: ['intervalSeconds'] } },\n },\n ];\n const behaviorRelation = findObjectWithTypeConst(generated, 'behavior');\n const condition = getObject(getObject(behaviorRelation.properties).condition);\n condition.allOf = [\n {\n if: { properties: { operator: { const: 'exists' } }, required: ['operator'] },\n then: { not: { required: ['right'] } },\n else: { required: ['right'] },\n },\n ];\n const expression = findExpressionDefinition(generated);\n const objectExpression = expression.anyOf.find((branch) => getObject(getObject(getObject(branch).properties).kind).const === 'object');\n const objectProperties = getObject(getObject(objectExpression).properties).properties;\n getObject(objectProperties).maxProperties = MAX_BLUEPRINT_EXPRESSION_CONTAINERS;\n return generated;\n}\nfunction findExpressionDefinition(generated) {\n const definitions = getObject(generated.$defs);\n for (const value of Object.values(definitions)) {\n if (isExpressionSchema(value))\n return getObject(value);\n }\n throw new Error('Blueprint expression definition is missing from the screen document schema.');\n}\nfunction isExpressionSchema(value) {\n if (value === null || typeof value !== 'object')\n return false;\n const anyOf = value.anyOf;\n if (!Array.isArray(anyOf))\n return false;\n return anyOf.some((branch) => {\n if (branch === null || typeof branch !== 'object')\n return false;\n const properties = branch.properties;\n if (properties === null || typeof properties !== 'object')\n return false;\n const kind = properties.kind;\n return (kind !== null && typeof kind === 'object' && kind.const === 'object');\n });\n}\nfunction findObjectWithTypeConst(root, constant) {\n const found = searchObjectWithTypeConst(root, constant);\n if (found === undefined) {\n throw new Error(`Schema branch with type \"${constant}\" is missing.`);\n }\n return found;\n}\nfunction searchObjectWithTypeConst(value, constant) {\n if (value === null || typeof value !== 'object')\n return undefined;\n if (Array.isArray(value)) {\n for (const item of value) {\n const found = searchObjectWithTypeConst(item, constant);\n if (found !== undefined)\n return found;\n }\n return undefined;\n }\n const direct = tryFindObjectWithTypeConst(value, constant);\n if (direct !== undefined)\n return direct;\n for (const child of Object.values(value)) {\n const found = searchObjectWithTypeConst(child, constant);\n if (found !== undefined)\n return found;\n }\n return undefined;\n}\nfunction tryFindObjectWithTypeConst(value, constant) {\n if (value === null || typeof value !== 'object' || Array.isArray(value))\n return undefined;\n const properties = value.properties;\n if (properties === null || typeof properties !== 'object')\n return undefined;\n const type = properties.type;\n if (type === null || typeof type !== 'object')\n return undefined;\n return type.const === constant\n ? value\n : undefined;\n}\nfunction getObject(value) {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) {\n throw new Error('Invalid JSON Schema structure in screen document schema generation.');\n }\n return value;\n}\nexport const SCREEN_DOCUMENT_JSON_SCHEMA = generateScreenDocumentJsonSchema();\n//# sourceMappingURL=json-schema.js.map"],"mappings":"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"}
|