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.
Files changed (133) hide show
  1. package/README.md +12 -5
  2. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-callbacks.d.ts +2 -0
  3. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-controller.d.ts +73 -16
  4. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-panel.d.ts +41 -0
  5. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-panel-controller.d.ts +62 -0
  6. package/dist/_internal/engine/browser/controllers/designer-size-tier-controller.d.ts +60 -0
  7. package/dist/_internal/engine/browser/controllers/panel/designer-material-group-navigation-controller.d.ts +2 -0
  8. package/dist/_internal/engine/browser/controllers/panel/designer-panel-controller.d.ts +2 -0
  9. package/dist/_internal/engine/browser/controllers/panel/designer-panel-inspector-controller.d.ts +6 -0
  10. package/dist/_internal/engine/browser/controllers/panel/designer-panel-material-controller.d.ts +1 -0
  11. package/dist/_internal/engine/browser/controllers/workbench/designer-panel-layout-controller.d.ts +22 -1
  12. package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-controller.d.ts +5 -0
  13. package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-tabs-controller.d.ts +1 -0
  14. package/dist/_internal/engine/browser/dom/workspace/designer-workspace-markup.d.ts +2 -0
  15. package/dist/_internal/engine/browser/dom/workspace/designer-workspace-skeleton.d.ts +7 -0
  16. package/dist/_internal/engine/browser/dom/workspace/designer-workspace.d.ts +1 -1
  17. package/dist/_internal/engine/common/ui-text/designer-blueprint-ui-text.d.ts +1 -0
  18. package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +5 -1
  19. package/dist/_internal/engine/designer-blueprint-workbench-panel-C2MoZwKA.js +3548 -0
  20. package/dist/_internal/engine/designer-dataset-controller-CPytVNBK.js +4426 -0
  21. package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +7 -0
  22. package/dist/_internal/engine/designer-element/runtime/designer-element-skeleton.d.ts +14 -0
  23. package/dist/_internal/engine/designer-element/runtime/designer-element-state.d.ts +12 -2
  24. package/dist/_internal/engine/designer-left-panel-groups-dom-WMsH33zw.js +573 -0
  25. package/dist/_internal/engine/designer-ui-primitives-CH4RNiMa.js +2155 -0
  26. package/dist/_internal/engine/host-resource-selection-5Cf_gclK.js +2188 -0
  27. package/dist/_internal/engine/index.js +4944 -17147
  28. package/dist/_internal/renderer/index.js +266 -216
  29. package/dist/_internal/renderer/viewer/viewer-skeleton.d.ts +10 -0
  30. package/dist/_internal/renderer/viewer/viewer-variable-controller.d.ts +2 -0
  31. package/dist/_internal/renderer/viewer/viewer.d.ts +8 -0
  32. package/dist/_internal/sdk/auto-register.js +7 -7
  33. package/dist/_internal/sdk/designer-auto-register.js +2 -2
  34. package/dist/_internal/sdk/designer.d.ts +6 -0
  35. package/dist/_internal/sdk/designer.js +11 -1
  36. package/dist/_internal/sdk/index.d.ts +1 -1
  37. package/dist/_internal/sdk/index.js +6 -6
  38. package/dist/authoring-EcyK2YVN.js +103 -0
  39. package/dist/authoring-EcyK2YVN.js.map +1 -0
  40. package/dist/auto-register.js +12 -10
  41. package/dist/auto-register.js.map +1 -1
  42. package/dist/contracts.js +5 -4
  43. package/dist/contracts.js.map +1 -1
  44. package/dist/{contrast-B4TH-dvm.js → contrast-CZFqj1I5.js} +23 -23
  45. package/dist/{contrast-B4TH-dvm.js.map → contrast-CZFqj1I5.js.map} +1 -1
  46. package/dist/core.js +10 -8
  47. package/dist/core.js.map +1 -1
  48. package/dist/designer-Byw45cUM.js +21 -0
  49. package/dist/designer-Byw45cUM.js.map +1 -0
  50. package/dist/designer-auto-register.js +5 -3
  51. package/dist/designer-auto-register.js.map +1 -1
  52. package/dist/designer-blueprint-workbench-panel-C2MoZwKA-CbXkv78O.js +3517 -0
  53. package/dist/designer-blueprint-workbench-panel-C2MoZwKA-CbXkv78O.js.map +1 -0
  54. package/dist/designer-dataset-controller-CPytVNBK-DWL3SRTP.js +4354 -0
  55. package/dist/designer-dataset-controller-CPytVNBK-DWL3SRTP.js.map +1 -0
  56. package/dist/designer-left-panel-groups-dom-WMsH33zw-B9pl8loh.js +557 -0
  57. package/dist/designer-left-panel-groups-dom-WMsH33zw-B9pl8loh.js.map +1 -0
  58. package/dist/designer-ui-primitives-CH4RNiMa-BNXQwJPZ.js +2146 -0
  59. package/dist/designer-ui-primitives-CH4RNiMa-BNXQwJPZ.js.map +1 -0
  60. package/dist/designer.js +5 -3
  61. package/dist/{dist-CR13A2Yb.js → dist-BHTClwId.js} +4785 -16808
  62. package/dist/dist-BHTClwId.js.map +1 -0
  63. package/dist/{dist-CAdGDmU3.js → dist-DfAV2jGI.js} +277 -227
  64. package/dist/dist-DfAV2jGI.js.map +1 -0
  65. package/dist/editor-descriptor-schema-Be30Wv8w.js +190 -0
  66. package/dist/editor-descriptor-schema-Be30Wv8w.js.map +1 -0
  67. package/dist/engine.js +4 -2
  68. package/dist/hierarchy-BQZrZWbC.js +86 -0
  69. package/dist/hierarchy-BQZrZWbC.js.map +1 -0
  70. package/dist/host-resource-selection-5Cf_gclK-Sv4Z8UXS.js +2141 -0
  71. package/dist/host-resource-selection-5Cf_gclK-Sv4Z8UXS.js.map +1 -0
  72. package/dist/index.js +11 -9
  73. package/dist/{manager-Bhqi_KmD.js → manager-B2CZ2b5I.js} +2 -2
  74. package/dist/{manager-Bhqi_KmD.js.map → manager-B2CZ2b5I.js.map} +1 -1
  75. package/dist/material-BPlvEmDi.js +12 -0
  76. package/dist/material-BPlvEmDi.js.map +1 -0
  77. package/dist/material-auto-register.d.ts +1 -0
  78. package/dist/material-auto-register.js +16 -0
  79. package/dist/material-auto-register.js.map +1 -0
  80. package/dist/{material-definition-BJ4ujhuj.js → material-definition-B9xCZcD-.js} +2 -2
  81. package/dist/{material-definition-BJ4ujhuj.js.map → material-definition-B9xCZcD-.js.map} +1 -1
  82. package/dist/{material-manifest-LdgIkzgH.js → material-manifest-bsGl6vZZ.js} +70 -256
  83. package/dist/material-manifest-bsGl6vZZ.js.map +1 -0
  84. package/dist/material.js +3 -2
  85. package/dist/parse-B0hwp_yj.js +264 -0
  86. package/dist/parse-B0hwp_yj.js.map +1 -0
  87. package/dist/plugin-core.js +3 -2
  88. package/dist/plugin-manager.js +1 -1
  89. package/dist/{plugin-package-BfZLl3ru.js → plugin-package-BT-pCoTt.js} +3 -3
  90. package/dist/{plugin-package-BfZLl3ru.js.map → plugin-package-BT-pCoTt.js.map} +1 -1
  91. package/dist/{plugin-registration-CYtTqIxF.js → plugin-registration-BjS_CXJU.js} +2 -2
  92. package/dist/{plugin-registration-CYtTqIxF.js.map → plugin-registration-BjS_CXJU.js.map} +1 -1
  93. package/dist/plugin-sdk.js +3 -3
  94. package/dist/{plugins-DRaykV9c.js → plugins-B9bwk-t6.js} +2 -2
  95. package/dist/{plugins-DRaykV9c.js.map → plugins-B9bwk-t6.js.map} +1 -1
  96. package/dist/plugins.js +5 -5
  97. package/dist/renderer.js +1 -1
  98. package/dist/runtime-dispatch-Dt9fhcI5.js +360 -0
  99. package/dist/runtime-dispatch-Dt9fhcI5.js.map +1 -0
  100. package/dist/{src-Bm7u11mN-BPS5TRsq.js → src-Bm7u11mN-BMeb9fvV.js} +40 -39
  101. package/dist/{src-Bm7u11mN-BPS5TRsq.js.map → src-Bm7u11mN-BMeb9fvV.js.map} +1 -1
  102. package/dist/{material-2XmHe-aH.js → text-BVzTcUas.js} +44 -52
  103. package/dist/text-BVzTcUas.js.map +1 -0
  104. package/dist/value-ref-y4_YKUP5.js +278 -0
  105. package/dist/value-ref-y4_YKUP5.js.map +1 -0
  106. package/dist/{viewer-CrJupI8I-D2BtwLsA.js → viewer-CrJupI8I-DZZfdHXr.js} +5 -5
  107. package/dist/{viewer-CrJupI8I-D2BtwLsA.js.map → viewer-CrJupI8I-DZZfdHXr.js.map} +1 -1
  108. package/dist/viewer-auto-register.js +2 -2
  109. package/dist/viewer.js +2 -2
  110. package/package.json +12 -17
  111. package/dist/_internal/react/components.d.ts +0 -32
  112. package/dist/_internal/react/index.d.ts +0 -14
  113. package/dist/_internal/react/index.js +0 -215
  114. package/dist/_internal/vue/components.d.ts +0 -36
  115. package/dist/_internal/vue/global-styles.d.ts +0 -10
  116. package/dist/_internal/vue/index.d.ts +0 -14
  117. package/dist/_internal/vue/index.js +0 -290
  118. package/dist/designer-xtN0h7PL.js +0 -11
  119. package/dist/designer-xtN0h7PL.js.map +0 -1
  120. package/dist/dist-CAdGDmU3.js.map +0 -1
  121. package/dist/dist-CR13A2Yb.js.map +0 -1
  122. package/dist/material-2XmHe-aH.js.map +0 -1
  123. package/dist/material-manifest-LdgIkzgH.js.map +0 -1
  124. package/dist/parse-CYwxTDJU.js +0 -364
  125. package/dist/parse-CYwxTDJU.js.map +0 -1
  126. package/dist/react.d.ts +0 -1
  127. package/dist/react.js +0 -213
  128. package/dist/react.js.map +0 -1
  129. package/dist/value-ref-Z0o70Vy6.js +0 -716
  130. package/dist/value-ref-Z0o70Vy6.js.map +0 -1
  131. package/dist/vue.d.ts +0 -1
  132. package/dist/vue.js +0 -288
  133. package/dist/vue.js.map +0 -1
@@ -1,57 +1,57 @@
1
1
  import { MAX_DATA_SOURCE_VALUE_BYTES as e, evaluateScreenDatasetParameters as t, isScreenHostDatasetPort as n, normalizeScreenMaterialError as r, parseScreenDatasetDefinition as i, parseScreenDocument as a, parseScreenJsonValue as o, parseScreenTabularDataset as s, readScreenComponentDataBinding as c, readScreenComponentValueRef as l, readScreenDocumentDataSources as u, readScreenVariableRecord as d, screenDataSourceOrder as f, screenJsonEquals as p, sortScreenDiagnostics as m } from "@base-screen/contracts";
2
2
  import { collectScreenValueRefDependencies as h, compileScreenBlueprint as g, dispatchScreenBlueprintEvent as _, evaluateScreenValueRef as v, getPainterOrder as ee, validateScreenDataBinding as te } from "@base-screen/core";
3
- import { diffBaseScreenMaterialCatalogs as y, parseBaseScreenMaterialEventDetail as b, screenValueRefAccepted as x, validateBaseScreenMaterialProps as S, validateBaseScreenMaterialStyle as C } from "@base-screen/plugin-core";
3
+ import { diffBaseScreenMaterialCatalogs as ne, parseBaseScreenMaterialEventDetail as y, screenValueRefAccepted as b, validateBaseScreenMaterialProps as x, validateBaseScreenMaterialStyle as S } from "@base-screen/plugin-core";
4
4
  //#region src/canvas-background.ts
5
- function ne(e, t) {
5
+ function re(e, t) {
6
6
  let n = t.background;
7
7
  e.style.backgroundColor = n?.type === "solid" ? n.color : t.backgroundColor;
8
8
  let r = [], i = [];
9
- t.backgroundImage !== void 0 && (r.push(`url("${ie(t.backgroundImage)}")`), i.push(t.backgroundImageFit === "contain" ? "contain" : "cover"));
10
- let a = n === void 0 ? void 0 : re(n);
9
+ t.backgroundImage !== void 0 && (r.push(`url("${ae(t.backgroundImage)}")`), i.push(t.backgroundImageFit === "contain" ? "contain" : "cover"));
10
+ let a = n === void 0 ? void 0 : ie(n);
11
11
  if (a !== void 0 && (r.push(a), i.push("100% 100%")), r.length === 0) {
12
12
  e.style.backgroundImage = "", e.style.backgroundSize = "", e.style.backgroundPosition = "", e.style.backgroundRepeat = "";
13
13
  return;
14
14
  }
15
15
  e.style.backgroundImage = r.join(", "), e.style.backgroundSize = i.join(", "), e.style.backgroundPosition = r.map(() => "center").join(", "), e.style.backgroundRepeat = r.map(() => "no-repeat").join(", ");
16
16
  }
17
- function re(e) {
17
+ function ie(e) {
18
18
  if (e.type === "solid") return;
19
19
  let t = e.stops.map((e) => `${e.color} ${e.position}%`).join(", ");
20
20
  return e.type === "linear-gradient" ? `linear-gradient(${e.angle}deg, ${t})` : `radial-gradient(circle at ${e.position.x}% ${e.position.y}%, ${t})`;
21
21
  }
22
- function ie(e) {
22
+ function ae(e) {
23
23
  return e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
24
24
  }
25
25
  //#endregion
26
26
  //#region src/canonical-json.ts
27
- function w(e) {
27
+ function C(e) {
28
28
  if (e === null) return "null";
29
29
  if (typeof e == "boolean") return e ? "true" : "false";
30
30
  if (typeof e == "number" || typeof e == "string") return JSON.stringify(e);
31
- if (Array.isArray(e)) return `[${e.map((e) => w(e)).join(",")}]`;
31
+ if (Array.isArray(e)) return `[${e.map((e) => C(e)).join(",")}]`;
32
32
  let t = e;
33
- return `{${Object.keys(t).sort().map((e) => `${JSON.stringify(e)}:${w(t[e])}`).join(",")}}`;
33
+ return `{${Object.keys(t).sort().map((e) => `${JSON.stringify(e)}:${C(t[e])}`).join(",")}}`;
34
34
  }
35
35
  //#endregion
36
36
  //#region src/resource/resource-state.ts
37
- function ae() {
37
+ function oe() {
38
38
  return {
39
39
  projectionKey: void 0,
40
40
  dataState: { status: "idle" }
41
41
  };
42
42
  }
43
- function oe(e) {
44
- return w(e);
43
+ function se(e) {
44
+ return C(e);
45
45
  }
46
46
  //#endregion
47
47
  //#region src/renderer/renderer-diagnostics.ts
48
- function T(e, t) {
48
+ function w(e, t) {
49
49
  return e.map((e) => ({
50
50
  ...e,
51
51
  path: [...t, ...e.path]
52
52
  }));
53
53
  }
54
- function E(e, t, n) {
54
+ function T(e, t, n) {
55
55
  return {
56
56
  severity: "error",
57
57
  code: e,
@@ -59,13 +59,13 @@ function E(e, t, n) {
59
59
  message: n
60
60
  };
61
61
  }
62
- function D(e, t, n) {
62
+ function E(e, t, n) {
63
63
  return {
64
64
  ok: !1,
65
- diagnostics: [E(e, t, n)]
65
+ diagnostics: [T(e, t, n)]
66
66
  };
67
67
  }
68
- function O(e, t) {
68
+ function D(e, t) {
69
69
  return {
70
70
  severity: "error",
71
71
  code: "PLUGIN_CORE_RENDER_FAILED",
@@ -73,18 +73,18 @@ function O(e, t) {
73
73
  message: t
74
74
  };
75
75
  }
76
- function se(e) {
76
+ function ce(e) {
77
77
  return m(e);
78
78
  }
79
79
  //#endregion
80
80
  //#region src/renderer/renderer-data-source.ts
81
- function ce(e, t, n, r, i) {
81
+ function le(e, t, n, r, i) {
82
82
  if (n === null) return {
83
83
  status: "ready",
84
84
  value: t
85
85
  };
86
86
  let a = s(t);
87
- return a.ok ? A(e, a.value, n, r, i, {
87
+ return a.ok ? k(e, a.value, n, r, i, {
88
88
  bindingCode: "Host dataset binding is invalid.",
89
89
  adapterCode: "Host dataset adapter failed."
90
90
  }) : {
@@ -93,7 +93,7 @@ function ce(e, t, n, r, i) {
93
93
  message: "Host dataset is invalid."
94
94
  };
95
95
  }
96
- function k(e, t, n) {
96
+ function O(e, t, n) {
97
97
  if (e.manifest.staticData?.kind !== "tabular") return {
98
98
  status: "ready",
99
99
  value: t
@@ -103,7 +103,7 @@ function k(e, t, n) {
103
103
  status: "error",
104
104
  code: "HOST_DATASET_BINDING_INVALID",
105
105
  message: "Static dataset binding is invalid."
106
- } : A(e, r.value, n, void 0, void 0, {
106
+ } : k(e, r.value, n, void 0, void 0, {
107
107
  bindingCode: "Static dataset binding is invalid.",
108
108
  adapterCode: "Static dataset adapter failed."
109
109
  }) : {
@@ -112,7 +112,7 @@ function k(e, t, n) {
112
112
  message: "Static dataset is invalid."
113
113
  };
114
114
  }
115
- function A(e, t, n, r, i, a) {
115
+ function k(e, t, n, r, i, a) {
116
116
  let s = e.manifest.dataBinding, c = e.tabularDataAdapter;
117
117
  if (s === void 0 || c === void 0) return {
118
118
  status: "error",
@@ -145,7 +145,7 @@ function A(e, t, n, r, i, a) {
145
145
  message: a.adapterCode
146
146
  };
147
147
  } catch {
148
- return r !== void 0 && i?.(E("PLUGIN_CORE_RENDER_FAILED", [
148
+ return r !== void 0 && i?.(T("PLUGIN_CORE_RENDER_FAILED", [
149
149
  "components",
150
150
  r,
151
151
  "dataBinding"
@@ -158,12 +158,12 @@ function A(e, t, n, r, i, a) {
158
158
  }
159
159
  //#endregion
160
160
  //#region src/renderer/renderer-candidates.ts
161
- function j(e, t, n, r, i, a, o, s = "fail") {
161
+ function A(e, t, n, r, i, a, o, s = "fail") {
162
162
  let c = [], l = [], u = /* @__PURE__ */ new Map();
163
163
  for (let s = 0; s < e.components.length; s++) {
164
164
  let d = e.components[s], f = t.get(d.type);
165
165
  if (f === void 0) {
166
- l.push(E("PLUGIN_CORE_IDENTITY_INVALID", [
166
+ l.push(T("PLUGIN_CORE_IDENTITY_INVALID", [
167
167
  "components",
168
168
  s,
169
169
  "type"
@@ -173,18 +173,18 @@ function j(e, t, n, r, i, a, o, s = "fail") {
173
173
  let p = o.entries.get(d), m, h;
174
174
  if (p !== void 0 && p.entry === f) m = p.props, h = p.style, u.set(d, p);
175
175
  else {
176
- let e = S(d.props, f.manifest.propsSchema);
176
+ let e = x(d.props, f.manifest.propsSchema);
177
177
  if (!e.ok) {
178
- l.push(...T(e.diagnostics, [
178
+ l.push(...w(e.diagnostics, [
179
179
  "components",
180
180
  s,
181
181
  "props"
182
182
  ]));
183
183
  continue;
184
184
  }
185
- let t = C(d.style, f.manifest.styleSchema);
185
+ let t = S(d.style, f.manifest.styleSchema);
186
186
  if (!t.ok) {
187
- l.push(...T(t.diagnostics, [
187
+ l.push(...w(t.diagnostics, [
188
188
  "components",
189
189
  s,
190
190
  "style"
@@ -193,12 +193,12 @@ function j(e, t, n, r, i, a, o, s = "fail") {
193
193
  }
194
194
  let n = d.styleRules ?? [], r = !0;
195
195
  for (let e = 0; e < n.length; e++) {
196
- let i = C({
196
+ let i = S({
197
197
  ...t.value,
198
198
  ...n[e].style
199
199
  }, f.manifest.styleSchema);
200
200
  if (!i.ok) {
201
- l.push(...T(i.diagnostics, [
201
+ l.push(...w(i.diagnostics, [
202
202
  "components",
203
203
  s,
204
204
  "styleRules",
@@ -215,7 +215,7 @@ function j(e, t, n, r, i, a, o, s = "fail") {
215
215
  style: h
216
216
  });
217
217
  }
218
- let g = M(a, d, f, i, ["components", s]);
218
+ let g = j(a, d, f, i, ["components", s]);
219
219
  if ("diagnostic" in g) {
220
220
  l.push(g.diagnostic);
221
221
  continue;
@@ -244,7 +244,7 @@ function j(e, t, n, r, i, a, o, s = "fail") {
244
244
  value: c,
245
245
  diagnostics: []
246
246
  };
247
- let d = se(l);
247
+ let d = ce(l);
248
248
  return s === "skip" ? {
249
249
  ok: !0,
250
250
  value: c,
@@ -254,21 +254,21 @@ function j(e, t, n, r, i, a, o, s = "fail") {
254
254
  diagnostics: d
255
255
  };
256
256
  }
257
- function M(e, t, n, r, i, a) {
257
+ function j(e, t, n, r, i, a) {
258
258
  let o = l(t), s = c(t);
259
259
  if (o === null) return s !== null || n.manifest.defaultData === void 0 ? {
260
260
  dataState: { status: "idle" },
261
261
  dataSource: void 0,
262
262
  epoch: void 0
263
263
  } : {
264
- dataState: k(n, n.manifest.defaultData, n.manifest.staticData?.kind === "tabular" ? n.manifest.staticData.defaultBinding : null),
264
+ dataState: O(n, n.manifest.defaultData, n.manifest.staticData?.kind === "tabular" ? n.manifest.staticData.defaultBinding : null),
265
265
  dataSource: void 0,
266
266
  epoch: void 0
267
267
  };
268
268
  let u = o.kind === "data-source-field" ? e.read(o.dataSourceId) : void 0, d = u?.source;
269
- if (!x(n.manifest.dataCapabilities, o, d)) return { diagnostic: E("PLUGIN_CORE_MANIFEST_FIELD_INVALID", [...i, "dataValue"], "Material does not accept the configured data source.") };
269
+ if (!b(n.manifest.dataCapabilities, o, d)) return { diagnostic: T("PLUGIN_CORE_MANIFEST_FIELD_INVALID", [...i, "dataValue"], "Material does not accept the configured data source.") };
270
270
  if (o.kind !== "data-source-field") return {
271
- dataState: N(e.evaluate(o), n, s),
271
+ dataState: M(e.evaluate(o), n, s),
272
272
  dataSource: void 0,
273
273
  epoch: e.variablesKey
274
274
  };
@@ -281,11 +281,11 @@ function M(e, t, n, r, i, a) {
281
281
  dataSource: void 0,
282
282
  epoch: void 0
283
283
  };
284
- let f = le(d.kind === "host-resource" ? d.resourceType : void 0, r, i);
284
+ let f = ue(d.kind === "host-resource" ? d.resourceType : void 0, r, i);
285
285
  if (f !== void 0) return { diagnostic: f };
286
286
  let p = {
287
287
  dataSourceId: o.dataSourceId,
288
- projectionKey: oe(s)
288
+ projectionKey: se(s)
289
289
  };
290
290
  if (s !== null && (n.manifest.dataBinding === void 0 || n.tabularDataAdapter === void 0)) return {
291
291
  dataState: {
@@ -307,16 +307,16 @@ function M(e, t, n, r, i, a) {
307
307
  dataSource: p,
308
308
  epoch: u.dataState
309
309
  } : {
310
- dataState: ce(n, m.value, s, t.id, a),
310
+ dataState: le(n, m.value, s, t.id, a),
311
311
  dataSource: p,
312
312
  epoch: u.dataState
313
313
  } : {
314
- dataState: N(m, n, s),
314
+ dataState: M(m, n, s),
315
315
  dataSource: p,
316
316
  epoch: u.dataState
317
317
  };
318
318
  }
319
- function N(e, t, n) {
319
+ function M(e, t, n) {
320
320
  switch (e.kind) {
321
321
  case "pending": return { status: "loading" };
322
322
  case "failed": return e.reason === "variable-missing" ? {
@@ -332,11 +332,11 @@ function N(e, t, n) {
332
332
  code: "HOST_RESOURCE_FAILED",
333
333
  message: "Host resource request failed."
334
334
  };
335
- default: return e.value === void 0 ? { status: "idle" } : k(t, e.value, n);
335
+ default: return e.value === void 0 ? { status: "idle" } : O(t, e.value, n);
336
336
  }
337
337
  }
338
- function le(e, t, n) {
339
- if (e !== void 0 && t !== void 0 && t.getResourceType(e) === void 0) return E("PLUGIN_CORE_CONTRIBUTION_UNKNOWN", [
338
+ function ue(e, t, n) {
339
+ if (e !== void 0 && t !== void 0 && t.getResourceType(e) === void 0) return T("PLUGIN_CORE_CONTRIBUTION_UNKNOWN", [
340
340
  ...n,
341
341
  "dataSource",
342
342
  "resourceType"
@@ -344,17 +344,17 @@ function le(e, t, n) {
344
344
  }
345
345
  //#endregion
346
346
  //#region src/style-rules.ts
347
- function ue(e, t) {
347
+ function de(e, t) {
348
348
  if (e === void 0 || e.length === 0 || t.status !== "ready") return;
349
349
  let n;
350
- for (let r of e) de(r, t.value) && (n = {
350
+ for (let r of e) fe(r, t.value) && (n = {
351
351
  ...n ?? {},
352
352
  ...r.style
353
353
  });
354
354
  return n;
355
355
  }
356
- function de(e, t) {
357
- let n = fe(t, e.when.path);
356
+ function fe(e, t) {
357
+ let n = pe(t, e.when.path);
358
358
  if (e.when.operator === "exists") return n.ok;
359
359
  if (!n.ok) return !1;
360
360
  let r = n.value, i = e.when.value;
@@ -364,12 +364,12 @@ function de(e, t) {
364
364
  case "gt":
365
365
  case "gte":
366
366
  case "lt":
367
- case "lte": return !P(r) || !P(i) ? !1 : e.when.operator === "gt" ? r > i : e.when.operator === "gte" ? r >= i : e.when.operator === "lt" ? r < i : r <= i;
367
+ case "lte": return !N(r) || !N(i) ? !1 : e.when.operator === "gt" ? r > i : e.when.operator === "gte" ? r >= i : e.when.operator === "lt" ? r < i : r <= i;
368
368
  case "contains": return typeof r == "string" ? typeof i == "string" && r.includes(i) : Array.isArray(r) && r.some((e) => p(e, i));
369
369
  default: return !1;
370
370
  }
371
371
  }
372
- function fe(e, t) {
372
+ function pe(e, t) {
373
373
  let n = e;
374
374
  for (let e of t) {
375
375
  if (typeof n != "object" || !n) return { ok: !1 };
@@ -388,25 +388,25 @@ function fe(e, t) {
388
388
  value: n
389
389
  };
390
390
  }
391
- function P(e) {
391
+ function N(e) {
392
392
  return typeof e == "number" && Number.isFinite(e);
393
393
  }
394
394
  //#endregion
395
395
  //#region src/renderer/renderer-effective-style.ts
396
- function F(e, t, n) {
397
- let r = ue(t.component.styleRules, n), i = r === void 0 ? t.model.style : {
396
+ function P(e, t, n) {
397
+ let r = de(t.component.styleRules, n), i = r === void 0 ? t.model.style : {
398
398
  ...t.model.style,
399
399
  ...r
400
400
  }, a = e.options.conditionalStylePort;
401
401
  if (a !== void 0) {
402
- let r = pe(e, a, t.component.id, n);
402
+ let r = me(e, a, t.component.id, n);
403
403
  if (r !== void 0) {
404
- let n = C({
404
+ let n = S({
405
405
  ...i,
406
406
  ...r
407
407
  }, t.entry.manifest.styleSchema);
408
408
  if (n.ok) i = n.value;
409
- else for (let r of T(n.diagnostics, [
409
+ else for (let r of w(n.diagnostics, [
410
410
  "components",
411
411
  t.component.id,
412
412
  "conditionalStyle"
@@ -419,14 +419,14 @@ function F(e, t, n) {
419
419
  style: i
420
420
  };
421
421
  }
422
- function pe(e, t, n, r) {
422
+ function me(e, t, n, r) {
423
423
  try {
424
424
  return t.resolve({
425
425
  componentId: n,
426
426
  dataState: r
427
427
  });
428
428
  } catch {
429
- e.options.onDiagnostic?.(E("PLUGIN_CORE_RENDER_FAILED", [
429
+ e.options.onDiagnostic?.(T("PLUGIN_CORE_RENDER_FAILED", [
430
430
  "components",
431
431
  n,
432
432
  "conditionalStyle"
@@ -436,10 +436,10 @@ function pe(e, t, n, r) {
436
436
  }
437
437
  //#endregion
438
438
  //#region src/renderer/renderer-material-dom.ts
439
- function I(e, t, n, r, i) {
440
- L(e, t, n, i), e.model = n, R(e, r);
439
+ function F(e, t, n, r, i) {
440
+ I(e, t, n, i), e.model = n, L(e, r);
441
441
  }
442
- function L(e, t, n, r) {
442
+ function I(e, t, n, r) {
443
443
  let i = t.position, a = e.style;
444
444
  a.position !== "absolute" && (a.position = "absolute");
445
445
  let o = `${i.x}px`;
@@ -457,26 +457,26 @@ function L(e, t, n, r) {
457
457
  let h = typeof n.style.opacity == "number" && Number.isFinite(n.style.opacity) ? String(Math.min(1, Math.max(0, n.style.opacity))) : "";
458
458
  a.opacity !== h && (a.opacity = h);
459
459
  }
460
- function R(e, t) {
460
+ function L(e, t) {
461
461
  let n = t ? "none" : "block";
462
462
  e.style.display !== n && (e.style.display = n);
463
463
  }
464
464
  //#endregion
465
465
  //#region src/renderer/renderer-mounted-material.ts
466
- function z(e, t, n, r) {
466
+ function R(e, t, n, r) {
467
467
  n.stackOrder = r, n.projection.projectionKey = t.dataSource?.projectionKey, n.projection.dataState = t.model.dataState;
468
- let i = V(e, t, r);
469
- if (n.applied !== void 0 && n.appliedModel !== void 0 && me(n.applied, i)) {
470
- L(n.element, t.component, n.appliedModel, r), R(n.element, e.visibility.isHidden(t.component.id));
468
+ let i = B(e, t, r);
469
+ if (n.applied !== void 0 && n.appliedModel !== void 0 && he(n.applied, i)) {
470
+ I(n.element, t.component, n.appliedModel, r), L(n.element, e.visibility.isHidden(t.component.id));
471
471
  return;
472
472
  }
473
- B(e, t, n, r);
473
+ z(e, t, n, r);
474
474
  }
475
- function B(e, t, n, r) {
476
- let i = F(e, t, t.model.dataState);
477
- I(n.element, t.component, i, e.visibility.isHidden(t.component.id), r), n.applied = V(e, t, r), n.appliedModel = i;
475
+ function z(e, t, n, r) {
476
+ let i = P(e, t, t.model.dataState);
477
+ F(n.element, t.component, i, e.visibility.isHidden(t.component.id), r), n.applied = B(e, t, r), n.appliedModel = i;
478
478
  }
479
- function V(e, t, n) {
479
+ function B(e, t, n) {
480
480
  return {
481
481
  component: t.component,
482
482
  entry: t.entry,
@@ -486,18 +486,18 @@ function V(e, t, n) {
486
486
  dataEpoch: t.dataEpoch
487
487
  };
488
488
  }
489
- function me(e, t) {
489
+ function he(e, t) {
490
490
  return e.component === t.component && e.entry === t.entry && e.interactive === t.interactive && e.stackOrder === t.stackOrder && e.hidden === t.hidden && e.dataEpoch === t.dataEpoch;
491
491
  }
492
- function he(e, t, n) {
493
- let r = F(e, t, t.model.dataState);
492
+ function ge(e, t, n) {
493
+ let r = P(e, t, t.model.dataState);
494
494
  n.element.model = r, n.appliedModel = r;
495
495
  }
496
- function ge(e, t, n) {
496
+ function _e(e, t, n) {
497
497
  if (n.bubbles !== !0 || n.composed !== !0 || n.type !== "base-screen-material-event") return;
498
498
  let r = e.candidates.get(t.component.id) ?? t;
499
499
  if (r.model.interactive !== !0) return;
500
- let i = b(n.detail);
500
+ let i = y(n.detail);
501
501
  if (!(!i.ok || !r.entry.manifest.events.includes(i.value.name))) {
502
502
  n.stopPropagation();
503
503
  try {
@@ -519,7 +519,7 @@ function ge(e, t, n) {
519
519
  }
520
520
  //#endregion
521
521
  //#region src/blueprint-visibility.ts
522
- var _e = class {
522
+ var ve = class {
523
523
  root;
524
524
  #e = /* @__PURE__ */ new Map();
525
525
  #t = /* @__PURE__ */ new Map();
@@ -600,7 +600,7 @@ var _e = class {
600
600
  ...d ? { translate: "0 12px" } : {}
601
601
  }], p = t.animate(f, {
602
602
  duration: r.durationMs,
603
- easing: ve(r.easing),
603
+ easing: ye(r.easing),
604
604
  fill: "none"
605
605
  });
606
606
  this.#n.set(e, p), p.finished.then(() => {
@@ -608,16 +608,16 @@ var _e = class {
608
608
  }).catch(() => void 0);
609
609
  }
610
610
  };
611
- function ve(e) {
611
+ function ye(e) {
612
612
  return e === "ease-in-out-quad" ? "cubic-bezier(0.455, 0.03, 0.515, 0.955)" : e === "ease-in-out-expo" ? "cubic-bezier(1, 0, 0, 1)" : "linear";
613
613
  }
614
614
  //#endregion
615
615
  //#region src/resource/source-query-port.ts
616
- var ye = "#source-dataset", be = "#source-resource", xe = "#source";
617
- function Se(e) {
618
- return e.kind === "dataset" ? ye : e.kind === "host-resource" ? be : xe;
616
+ var be = "#source-dataset", xe = "#source-resource", Se = "#source";
617
+ function Ce(e) {
618
+ return e.kind === "dataset" ? be : e.kind === "host-resource" ? xe : Se;
619
619
  }
620
- var Ce = class {
620
+ var we = class {
621
621
  resources;
622
622
  datasets;
623
623
  hostCatalog;
@@ -644,51 +644,51 @@ var Ce = class {
644
644
  resourceType: e.source.resourceType,
645
645
  resourceId: e.source.resourceId,
646
646
  params: e.params
647
- }, t) ?? Promise.resolve(H());
647
+ }, t) ?? Promise.resolve(V());
648
648
  default: return this.hostCatalog?.resolve({
649
649
  sourceId: e.source.sourceId,
650
650
  params: e.params,
651
651
  purpose: "runtime",
652
652
  signal: t.signal
653
- }) ?? Promise.resolve(H());
653
+ }) ?? Promise.resolve(V());
654
654
  }
655
655
  }
656
656
  async queryDataset(e, n, r) {
657
- if (this.datasets === void 0) return H();
657
+ if (this.datasets === void 0) return V();
658
658
  let a = this.#t, o = () => !r.signal.aborted && a === this.#t;
659
- if (!o()) return W();
659
+ if (!o()) return U();
660
660
  let c = this.#e.get(n);
661
661
  if (c === void 0) {
662
662
  let e = await this.datasets.describe({
663
663
  datasetId: n,
664
664
  signal: r.signal
665
665
  });
666
- if (!o()) return W();
666
+ if (!o()) return U();
667
667
  if (!e.ok) return e;
668
668
  let t = i(e.value);
669
669
  if (!t.ok) return t;
670
- if (t.value.datasetId !== n) return U();
670
+ if (t.value.datasetId !== n) return H();
671
671
  c = t.value, this.#e.size >= 32 && this.#e.delete(this.#e.keys().next().value), this.#e.set(n, c);
672
672
  }
673
673
  let l = t(c.parameters, e.params);
674
674
  if (!l.ok) return l;
675
- if (!o()) return W();
675
+ if (!o()) return U();
676
676
  let u = await this.datasets.query({
677
677
  datasetId: n,
678
678
  dataSourceId: e.dataSourceId,
679
679
  params: l.value
680
680
  }, r);
681
- if (!o()) return W();
681
+ if (!o()) return U();
682
682
  if (!u.ok) return u;
683
683
  let d = s(u.value);
684
- return d.ok ? w(d.value.fields) === w(c.fields) ? {
684
+ return d.ok ? C(d.value.fields) === C(c.fields) ? {
685
685
  ok: !0,
686
686
  value: d.value,
687
687
  diagnostics: []
688
- } : U() : d;
688
+ } : H() : d;
689
689
  }
690
690
  };
691
- function H() {
691
+ function V() {
692
692
  return {
693
693
  ok: !1,
694
694
  diagnostics: [{
@@ -699,7 +699,7 @@ function H() {
699
699
  }]
700
700
  };
701
701
  }
702
- function U() {
702
+ function H() {
703
703
  return {
704
704
  ok: !1,
705
705
  diagnostics: [{
@@ -710,7 +710,7 @@ function U() {
710
710
  }]
711
711
  };
712
712
  }
713
- function W() {
713
+ function U() {
714
714
  return {
715
715
  ok: !1,
716
716
  diagnostics: []
@@ -718,12 +718,12 @@ function W() {
718
718
  }
719
719
  //#endregion
720
720
  //#region src/resource/data-source-runtime.ts
721
- var we = class {
721
+ var Te = class {
722
722
  options;
723
723
  #e = /* @__PURE__ */ new Map();
724
724
  #t;
725
725
  #n = {};
726
- #r = w({});
726
+ #r = C({});
727
727
  constructor(e) {
728
728
  this.options = e;
729
729
  }
@@ -731,12 +731,12 @@ var we = class {
731
731
  return this.#r;
732
732
  }
733
733
  ensure(e, t, n, r = {}) {
734
- this.#t = e, t !== this.#n && (this.#n = t, this.#r = w(t));
734
+ this.#t = e, t !== this.#n && (this.#n = t, this.#r = C(t));
735
735
  let i = {
736
736
  variableValues: t,
737
737
  dataSourceValues: /* @__PURE__ */ new Map(),
738
738
  dataSourceErrors: /* @__PURE__ */ new Map()
739
- }, a = Te(e);
739
+ }, a = Ee(e);
740
740
  for (let e of a) {
741
741
  let t = this.#i(e.id);
742
742
  t.source = e.source, this.#a(t, e, i, n, r.startOnly);
@@ -747,7 +747,7 @@ var we = class {
747
747
  reportProjection(e, t, n) {
748
748
  let r = this.#e.get(e);
749
749
  if (r === void 0) return;
750
- let i = G(n);
750
+ let i = W(n);
751
751
  this.#u(r, "adapted", {
752
752
  startedAt: r.startedAt,
753
753
  ...i
@@ -763,7 +763,7 @@ var we = class {
763
763
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
764
764
  if (e.kind === "data-source-field") {
765
765
  let r = this.#e.get(e.dataSourceId);
766
- r?.dataState.status === "ready" && r.rawValue !== void 0 ? t.set(e.dataSourceId, r.rawValue) : r?.dataState.status === "error" && n.set(e.dataSourceId, r.rawError ?? K("Host data source failed."));
766
+ r?.dataState.status === "ready" && r.rawValue !== void 0 ? t.set(e.dataSourceId, r.rawValue) : r?.dataState.status === "error" && n.set(e.dataSourceId, r.rawError ?? G("Host data source failed."));
767
767
  }
768
768
  let r = {
769
769
  variableValues: this.#n,
@@ -788,7 +788,7 @@ var we = class {
788
788
  }
789
789
  clear() {
790
790
  for (let e of this.#e.values()) this.#l(e);
791
- this.#e.clear(), this.#t = void 0, this.#n = {}, this.#r = w({});
791
+ this.#e.clear(), this.#t = void 0, this.#n = {}, this.#r = C({});
792
792
  }
793
793
  #i(e) {
794
794
  let t = this.#e.get(e);
@@ -819,14 +819,14 @@ var we = class {
819
819
  this.#c(e, a.diagnostic), n.dataSourceErrors.set(e.dataSourceId, a.diagnostic);
820
820
  return;
821
821
  }
822
- let o = Ee(e.dataSourceId, t.source, a.params);
822
+ let o = De(e.dataSourceId, t.source, a.params);
823
823
  if (e.requestKey !== o && (this.#l(e), e.requestKey = o, e.params = a.params, e.dataState = { status: "loading" }, e.rawValue = void 0, e.rawError = void 0), e.requestSlotId === void 0) {
824
824
  if (e.dataState.status === "ready") {
825
825
  e.rawValue !== void 0 && n.dataSourceValues.set(e.dataSourceId, e.rawValue);
826
826
  return;
827
827
  }
828
828
  if (e.dataState.status === "error") {
829
- n.dataSourceErrors.set(e.dataSourceId, e.rawError ?? K("Host data source failed."));
829
+ n.dataSourceErrors.set(e.dataSourceId, e.rawError ?? G("Host data source failed."));
830
830
  return;
831
831
  }
832
832
  i !== void 0 && !i.has(e.dataSourceId) || this.#s(e, r);
@@ -842,11 +842,11 @@ var we = class {
842
842
  }
843
843
  if (e.kind === "failed") return {
844
844
  kind: "failed",
845
- diagnostic: K(e.reason === "variable-missing" ? "Data source parameter references a variable without a value." : "Data source parameter is invalid.")
845
+ diagnostic: G(e.reason === "variable-missing" ? "Data source parameter references a variable without a value." : "Data source parameter is invalid.")
846
846
  };
847
847
  if (e.value === void 0) return {
848
848
  kind: "failed",
849
- diagnostic: K("Data source parameter resolved to no value.")
849
+ diagnostic: G("Data source parameter resolved to no value.")
850
850
  };
851
851
  n[i] = e.value;
852
852
  }
@@ -879,7 +879,7 @@ var we = class {
879
879
  }
880
880
  let c = ++t.generation, l = this.options.createExecutionContext(n, t.dataSourceId), u = Date.now(), d = `${t.dataSourceId}:${t.requestKey}:${c}`;
881
881
  t.executionContext = l, t.startedAt = u, t.requestId = d;
882
- let { resolution: f, slotId: p } = s.request(t.requestKey, Se(i), t.dataSourceId, {
882
+ let { resolution: f, slotId: p } = s.request(t.requestKey, Ce(i), t.dataSourceId, {
883
883
  dataSourceId: t.dataSourceId,
884
884
  source: i,
885
885
  params: t.params
@@ -899,7 +899,7 @@ var we = class {
899
899
  return;
900
900
  }
901
901
  if (n.kind === "failure") {
902
- let e = n.diagnostics.diagnostics[0], i = e === void 0 ? K() : e;
902
+ let e = n.diagnostics.diagnostics[0], i = e === void 0 ? G() : e;
903
903
  this.#c(t, i, { emitStarted: !1 }), this.#u(t, "failed", {
904
904
  startedAt: u,
905
905
  code: r(i).code
@@ -924,7 +924,7 @@ var we = class {
924
924
  status: "ready",
925
925
  value: i.value
926
926
  }, t.rawValue = i.value, t.rawError = void 0;
927
- let a = G(i.value);
927
+ let a = W(i.value);
928
928
  this.#u(t, "succeeded", {
929
929
  startedAt: u,
930
930
  ...a
@@ -950,7 +950,7 @@ var we = class {
950
950
  #u(e, t, n, r) {
951
951
  let i = e.source;
952
952
  if (i === void 0) return;
953
- let a = De(i), o = e.executionContext ?? this.options.createExecutionContext({
953
+ let a = Oe(i), o = e.executionContext ?? this.options.createExecutionContext({
954
954
  trigger: "manual",
955
955
  traceId: ""
956
956
  }, e.dataSourceId);
@@ -977,7 +977,7 @@ var we = class {
977
977
  return e;
978
978
  }
979
979
  };
980
- function Te(e) {
980
+ function Ee(e) {
981
981
  let t = u(e), n = new Map(t.map((e) => [e.id, e])), r = [];
982
982
  for (let t of f(e)) {
983
983
  let e = n.get(t);
@@ -986,10 +986,10 @@ function Te(e) {
986
986
  for (let e of t) n.has(e.id) && r.push(e);
987
987
  return r;
988
988
  }
989
- function Ee(e, t, n) {
990
- return `ds:${e}:${w(t)}:${w(n)}`;
989
+ function De(e, t, n) {
990
+ return `ds:${e}:${C(t)}:${C(n)}`;
991
991
  }
992
- function De(e) {
992
+ function Oe(e) {
993
993
  switch (e.kind) {
994
994
  case "dataset": return {
995
995
  resourceType: "dataset",
@@ -1005,7 +1005,7 @@ function De(e) {
1005
1005
  };
1006
1006
  }
1007
1007
  }
1008
- function G(e) {
1008
+ function W(e) {
1009
1009
  if (e === void 0 || typeof e != "object" || !e || Array.isArray(e)) return {};
1010
1010
  let t = e.fields, n = e.rows;
1011
1011
  return {
@@ -1013,7 +1013,7 @@ function G(e) {
1013
1013
  ...Array.isArray(n) ? { rowCount: n.length } : {}
1014
1014
  };
1015
1015
  }
1016
- function K(e = "Host resource request failed.") {
1016
+ function G(e = "Host resource request failed.") {
1017
1017
  return {
1018
1018
  severity: "error",
1019
1019
  code: "HOST_RESOURCE_FAILED",
@@ -1023,7 +1023,7 @@ function K(e = "Host resource request failed.") {
1023
1023
  }
1024
1024
  //#endregion
1025
1025
  //#region src/resource/request-coordinator.ts
1026
- var Oe = class {
1026
+ var ke = class {
1027
1027
  resourcePort;
1028
1028
  isShareable;
1029
1029
  timeoutMs;
@@ -1116,16 +1116,16 @@ var Oe = class {
1116
1116
  };
1117
1117
  //#endregion
1118
1118
  //#region src/renderer/renderer-state.ts
1119
- function ke(e) {
1120
- if (!Pe(e.resourceTimeoutMs ?? 15e3)) throw RangeError("resourceTimeoutMs must be an integer between 100 and 60000.");
1121
- let t = new Ce(e.resourcePort, e.datasetPort, e.hostCatalogPort), n, r = e.resourcePort !== void 0 || e.datasetPort !== void 0 || e.hostCatalogPort !== void 0 ? new Oe({ resolve: (e, n) => t.query(e, n) }, (t) => Ae(t, e), e.resourceTimeoutMs ?? 15e3) : void 0, i = new we({
1119
+ function Ae(e) {
1120
+ if (!Fe(e.resourceTimeoutMs ?? 15e3)) throw RangeError("resourceTimeoutMs must be an integer between 100 and 60000.");
1121
+ let t = new we(e.resourcePort, e.datasetPort, e.hostCatalogPort), n, r = e.resourcePort !== void 0 || e.datasetPort !== void 0 || e.hostCatalogPort !== void 0 ? new ke({ resolve: (e, n) => t.query(e, n) }, (t) => je(t, e), e.resourceTimeoutMs ?? 15e3) : void 0, i = new Te({
1122
1122
  sourcePort: t,
1123
1123
  coordinator: r,
1124
1124
  isSuspended: () => n.dataSuspended,
1125
- createExecutionContext: (e, t) => Ne(n, t, e),
1126
- emit: (e) => Me(n, e),
1125
+ createExecutionContext: (e, t) => Pe(n, t, e),
1126
+ emit: (e) => Ne(n, e),
1127
1127
  onChanged: (e) => n.onDataSourceChanged(e),
1128
- validateParams: (e, t) => je(n, e, t)
1128
+ validateParams: (e, t) => Me(n, e, t)
1129
1129
  });
1130
1130
  return n = {
1131
1131
  options: e,
@@ -1142,14 +1142,14 @@ function ke(e) {
1142
1142
  coordinator: r,
1143
1143
  sourceQueries: t,
1144
1144
  dataSources: i,
1145
- visibility: new _e(e.root),
1145
+ visibility: new ve(e.root),
1146
1146
  onDataSourceChanged: () => {}
1147
1147
  }, n;
1148
1148
  }
1149
- function Ae(e, t) {
1149
+ function je(e, t) {
1150
1150
  return e === "#source-dataset" ? t.datasetPort?.queryScope === "dataset" : e === "#source-resource";
1151
1151
  }
1152
- function je(e, t, n) {
1152
+ function Me(e, t, n) {
1153
1153
  if (t.kind !== "host-resource") return;
1154
1154
  let r = e.options.contributionIndex;
1155
1155
  if (r === void 0) return;
@@ -1160,14 +1160,14 @@ function je(e, t, n) {
1160
1160
  path: [],
1161
1161
  message: "Host resource type is not enabled by an active plugin contribution."
1162
1162
  };
1163
- if (!S(n, i.configSchema).ok) return {
1163
+ if (!x(n, i.configSchema).ok) return {
1164
1164
  severity: "error",
1165
1165
  code: "HOST_RESOURCE_FAILED",
1166
1166
  path: [],
1167
1167
  message: "Host resource request failed."
1168
1168
  };
1169
1169
  }
1170
- function Me(e, t) {
1170
+ function Ne(e, t) {
1171
1171
  let n = e.options.observer;
1172
1172
  if (n !== void 0) try {
1173
1173
  n({
@@ -1184,7 +1184,7 @@ function Me(e, t) {
1184
1184
  });
1185
1185
  } catch {}
1186
1186
  }
1187
- function Ne(e, t, n) {
1187
+ function Pe(e, t, n) {
1188
1188
  return {
1189
1189
  instanceId: e.options.instanceId ?? "renderer",
1190
1190
  mode: e.options.executionMode ?? "viewer",
@@ -1194,22 +1194,22 @@ function Ne(e, t, n) {
1194
1194
  ...e.options.documentRevision === void 0 ? {} : { documentRevision: e.options.documentRevision }
1195
1195
  };
1196
1196
  }
1197
- function Pe(e) {
1197
+ function Fe(e) {
1198
1198
  return Number.isInteger(e) && e >= 100 && e <= 6e4;
1199
1199
  }
1200
1200
  //#endregion
1201
1201
  //#region src/renderer/renderer.ts
1202
- function q(e) {
1203
- return new Fe(e);
1202
+ function K(e) {
1203
+ return new Ie(e);
1204
1204
  }
1205
- var Fe = class {
1205
+ var Ie = class {
1206
1206
  #e;
1207
1207
  #t = /* @__PURE__ */ new Map();
1208
1208
  constructor(e) {
1209
- this.#e = ke(e), this.#e.onDataSourceChanged = (e) => this.#n(e);
1209
+ this.#e = Ae(e), this.#e.onDataSourceChanged = (e) => this.#n(e);
1210
1210
  }
1211
1211
  render(e, t) {
1212
- if (this.#e.disposed) return D("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1212
+ if (this.#e.disposed) return E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1213
1213
  let n = e === this.#e.lastValidatedInput && this.#e.document !== void 0 ? {
1214
1214
  ok: !0,
1215
1215
  value: this.#e.document,
@@ -1220,8 +1220,8 @@ var Fe = class {
1220
1220
  trigger: t?.trigger ?? "manual",
1221
1221
  traceId: t?.traceId ?? ""
1222
1222
  };
1223
- this.#e.dataSources.ensure(n.value, this.#e.variables, r), this.#t = J(n.value);
1224
- let i = j(n.value, this.#e.catalog, this.#e.options.mode, this.#e.interactive, this.#e.options.contributionIndex, this.#e.dataSources, this.#e.validationCache, this.#e.options.componentFailurePolicy ?? "fail");
1223
+ this.#e.dataSources.ensure(n.value, this.#e.variables, r), this.#t = q(n.value);
1224
+ let i = A(n.value, this.#e.catalog, this.#e.options.mode, this.#e.interactive, this.#e.options.contributionIndex, this.#e.dataSources, this.#e.validationCache, this.#e.options.componentFailurePolicy ?? "fail");
1225
1225
  if (!i.ok) return i;
1226
1226
  let o = new Map(ee(n.value).map((e, t) => [e, t]));
1227
1227
  this.#e.visibility.prepare(n.value);
@@ -1230,9 +1230,9 @@ var Fe = class {
1230
1230
  let t = o.get(e.component.id), n = this.#e.mounted.get(e.component.id);
1231
1231
  if (n !== void 0 && n.type === e.component.type) {
1232
1232
  try {
1233
- z(this.#e, e, n, t);
1233
+ R(this.#e, e, n, t);
1234
1234
  } catch {
1235
- l.push(O(e, "Material model update raised an exception."));
1235
+ l.push(D(e, "Material model update raised an exception."));
1236
1236
  }
1237
1237
  c.set(e.component.id, n);
1238
1238
  continue;
@@ -1242,16 +1242,16 @@ var Fe = class {
1242
1242
  try {
1243
1243
  r = new e.entry.constructor();
1244
1244
  } catch {
1245
- l.push(O(e, "Material constructor raised an exception."));
1245
+ l.push(D(e, "Material constructor raised an exception."));
1246
1246
  continue;
1247
1247
  }
1248
- let i = (t) => ge(this.#e, e, t);
1248
+ let i = (t) => _e(this.#e, e, t);
1249
1249
  r.addEventListener("base-screen-material-event", i);
1250
1250
  let a;
1251
1251
  try {
1252
- a = F(this.#e, e, e.model.dataState), I(r, e.component, a, this.#e.visibility.isHidden(e.component.id), t);
1252
+ a = P(this.#e, e, e.model.dataState), F(r, e.component, a, this.#e.visibility.isHidden(e.component.id), t);
1253
1253
  } catch {
1254
- l.push(O(e, "Material render raised an exception."));
1254
+ l.push(D(e, "Material render raised an exception."));
1255
1255
  continue;
1256
1256
  }
1257
1257
  this.#e.options.root.appendChild(r);
@@ -1259,15 +1259,15 @@ var Fe = class {
1259
1259
  type: e.component.type,
1260
1260
  element: r,
1261
1261
  onEvent: i,
1262
- projection: ae(),
1262
+ projection: oe(),
1263
1263
  stackOrder: t,
1264
- applied: V(this.#e, e, t),
1264
+ applied: B(this.#e, e, t),
1265
1265
  appliedModel: a
1266
1266
  };
1267
1267
  s.projection.dataState = e.model.dataState, s.projection.projectionKey = e.dataSource?.projectionKey, c.set(e.component.id, s);
1268
1268
  }
1269
1269
  for (let [e, t] of this.#e.mounted) c.has(e) || (t.element.removeEventListener("base-screen-material-event", t.onEvent), t.element.remove());
1270
- if (this.#e.options.root.style.position = "relative", this.#e.options.root.style.width = `${n.value.canvas.width}px`, this.#e.options.root.style.height = `${n.value.canvas.height}px`, this.#e.options.mode !== "design" && this.#e.options.root.style.overflow !== "hidden" && (this.#e.options.root.style.overflow = "hidden"), ne(this.#e.options.root, n.value.canvas), this.#e.mounted = c, this.#e.candidates = new Map(s.map((e) => [e.component.id, e])), this.#e.document = n.value, this.#e.lastValidatedInput = e, l.length > 0) for (let e of l) this.#e.options.onDiagnostic?.(e);
1270
+ if (this.#e.options.root.style.position = "relative", this.#e.options.root.style.width = `${n.value.canvas.width}px`, this.#e.options.root.style.height = `${n.value.canvas.height}px`, this.#e.options.mode !== "design" && this.#e.options.root.style.overflow !== "hidden" && (this.#e.options.root.style.overflow = "hidden"), re(this.#e.options.root, n.value.canvas), this.#e.mounted = c, this.#e.candidates = new Map(s.map((e) => [e.component.id, e])), this.#e.document = n.value, this.#e.lastValidatedInput = e, l.length > 0) for (let e of l) this.#e.options.onDiagnostic?.(e);
1271
1271
  return {
1272
1272
  ok: !0,
1273
1273
  value: null,
@@ -1276,25 +1276,25 @@ var Fe = class {
1276
1276
  }
1277
1277
  setVariables(e) {
1278
1278
  let t = o(e, { maxBytes: 2097152 });
1279
- return !t.ok || t.value === null || Array.isArray(t.value) || typeof t.value != "object" ? D("HOST_DATASET_VARIABLE_INVALID", [], "Runtime variables are invalid.") : (this.#e.variables = t.value, this.#e.dataSuspended = !1, {
1279
+ return !t.ok || t.value === null || Array.isArray(t.value) || typeof t.value != "object" ? E("HOST_DATASET_VARIABLE_INVALID", [], "Runtime variables are invalid.") : (this.#e.variables = t.value, this.#e.dataSuspended = !1, {
1280
1280
  ok: !0,
1281
1281
  value: null,
1282
1282
  diagnostics: []
1283
1283
  });
1284
1284
  }
1285
1285
  setInteractive(e) {
1286
- return this.#e.disposed ? D("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.") : this.#e.interactive === e || (this.#e.interactive = e, this.#e.document === void 0) ? {
1286
+ return this.#e.disposed ? E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.") : this.#e.interactive === e || (this.#e.interactive = e, this.#e.document === void 0) ? {
1287
1287
  ok: !0,
1288
1288
  value: null,
1289
1289
  diagnostics: []
1290
1290
  } : this.render(this.#e.document);
1291
1291
  }
1292
1292
  validateCatalog(e, t) {
1293
- if (this.#e.disposed) return D("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1293
+ if (this.#e.disposed) return E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1294
1294
  let n = a(e, this.#e.lastValidatedInput);
1295
1295
  if (!n.ok) return n;
1296
1296
  try {
1297
- let e = j(n.value, t, this.#e.options.mode, this.#e.interactive, this.#e.options.contributionIndex, this.#e.dataSources, { entries: /* @__PURE__ */ new Map() }, "fail");
1297
+ let e = A(n.value, t, this.#e.options.mode, this.#e.interactive, this.#e.options.contributionIndex, this.#e.dataSources, { entries: /* @__PURE__ */ new Map() }, "fail");
1298
1298
  return e.ok ? {
1299
1299
  ok: !0,
1300
1300
  value: null,
@@ -1304,17 +1304,17 @@ var Fe = class {
1304
1304
  diagnostics: e.diagnostics
1305
1305
  };
1306
1306
  } catch {
1307
- return D("PLUGIN_CORE_RENDER_FAILED", [], "Catalog validation failed.");
1307
+ return E("PLUGIN_CORE_RENDER_FAILED", [], "Catalog validation failed.");
1308
1308
  }
1309
1309
  }
1310
1310
  setCatalog(e) {
1311
- if (this.#e.disposed) return D("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1311
+ if (this.#e.disposed) return E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1312
1312
  if (e === this.#e.catalog) return {
1313
1313
  ok: !0,
1314
1314
  value: null,
1315
1315
  diagnostics: []
1316
1316
  };
1317
- let t = y(this.#e.catalog, e), n = new Set(t.implementationChanged), r = new Set(t.removed);
1317
+ let t = ne(this.#e.catalog, e), n = new Set(t.implementationChanged), r = new Set(t.removed);
1318
1318
  for (let [e, t] of this.#e.mounted) !n.has(t.type) && !r.has(t.type) || (t.element.removeEventListener("base-screen-material-event", t.onEvent), t.element.remove(), this.#e.mounted.delete(e), this.#e.candidates.delete(e));
1319
1319
  let i = new Set(t.unchanged);
1320
1320
  for (let t of this.#e.mounted.values()) {
@@ -1332,7 +1332,7 @@ var Fe = class {
1332
1332
  };
1333
1333
  }
1334
1334
  applyBlueprintVisibilityEffects(e) {
1335
- return this.#e.disposed ? D("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.") : this.#e.visibility.apply(e, this.#e.document, this.#e.mounted);
1335
+ return this.#e.disposed ? E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.") : this.#e.visibility.apply(e, this.#e.document, this.#e.mounted);
1336
1336
  }
1337
1337
  resetBlueprintVisibility() {
1338
1338
  this.#e.visibility.reset();
@@ -1371,9 +1371,9 @@ var Fe = class {
1371
1371
  for (let e of t) {
1372
1372
  let t = this.#e.candidates.get(e), n = this.#e.mounted.get(e);
1373
1373
  if (t !== void 0 && n !== void 0) try {
1374
- he(this.#e, t, n);
1374
+ ge(this.#e, t, n);
1375
1375
  } catch {
1376
- this.#e.options.onDiagnostic?.(E("PLUGIN_CORE_RENDER_FAILED", [
1376
+ this.#e.options.onDiagnostic?.(T("PLUGIN_CORE_RENDER_FAILED", [
1377
1377
  "components",
1378
1378
  e,
1379
1379
  "conditionalStyle"
@@ -1387,7 +1387,7 @@ var Fe = class {
1387
1387
  i.ok && (this.#e.dataSources.ensure(i.value, t, {
1388
1388
  trigger: n?.trigger ?? "manual",
1389
1389
  traceId: n?.traceId ?? ""
1390
- }, r === void 0 ? {} : { startOnly: r }), this.#t = J(i.value));
1390
+ }, r === void 0 ? {} : { startOnly: r }), this.#t = q(i.value));
1391
1391
  }
1392
1392
  refreshDataSource(e, t) {
1393
1393
  this.#e.dataSources.refresh(e, {
@@ -1425,7 +1425,7 @@ var Fe = class {
1425
1425
  for (let t of this.#t.get(e) ?? []) {
1426
1426
  let r = n.get(t), i = this.#e.candidates.get(t), a = this.#e.mounted.get(t);
1427
1427
  if (r === void 0 || i === void 0 || a === void 0) continue;
1428
- let o = M(this.#e.dataSources, r, i.entry, this.#e.options.contributionIndex, ["components", t], (e) => this.#e.options.onDiagnostic?.(e));
1428
+ let o = j(this.#e.dataSources, r, i.entry, this.#e.options.contributionIndex, ["components", t], (e) => this.#e.options.onDiagnostic?.(e));
1429
1429
  if ("diagnostic" in o) continue;
1430
1430
  let s = {
1431
1431
  ...i,
@@ -1436,11 +1436,11 @@ var Fe = class {
1436
1436
  dataSource: o.dataSource,
1437
1437
  dataEpoch: o.epoch
1438
1438
  };
1439
- this.#e.candidates.set(t, s), o.dataState.status === "ready" && this.#e.dataSources.reportProjection(e, t, o.dataState.value), a.projection.dataState = o.dataState, a.projection.projectionKey = o.dataSource?.projectionKey, B(this.#e, s, a, a.stackOrder);
1439
+ this.#e.candidates.set(t, s), o.dataState.status === "ready" && this.#e.dataSources.reportProjection(e, t, o.dataState.value), a.projection.dataState = o.dataState, a.projection.projectionKey = o.dataSource?.projectionKey, z(this.#e, s, a, a.stackOrder);
1440
1440
  }
1441
1441
  }
1442
1442
  };
1443
- function J(e) {
1443
+ function q(e) {
1444
1444
  let t = /* @__PURE__ */ new Map();
1445
1445
  for (let n of e.components) {
1446
1446
  let e = l(n);
@@ -1452,9 +1452,9 @@ function J(e) {
1452
1452
  }
1453
1453
  //#endregion
1454
1454
  //#region src/viewer/viewer-blueprint-runtime.ts
1455
- function Ie(e, t, n, r) {
1455
+ function Le(e, t, n, r) {
1456
1456
  let i = [];
1457
- if (w(n) !== w(r.variables)) {
1457
+ if (C(n) !== C(r.variables)) {
1458
1458
  let n = e.setVariables(r.variables);
1459
1459
  if (n.ok) {
1460
1460
  let n = e.render(t, { trigger: "variable" });
@@ -1469,13 +1469,13 @@ function Ie(e, t, n, r) {
1469
1469
  }
1470
1470
  //#endregion
1471
1471
  //#region src/viewer/viewer-configuration-guards.ts
1472
- function Y(e) {
1472
+ function J(e) {
1473
1473
  return typeof e == "object" && !!e && typeof e.get == "function" && typeof e.has == "function" && typeof e.list == "function";
1474
1474
  }
1475
- function Le(e) {
1475
+ function Re(e) {
1476
1476
  return typeof e == "object" && !!e && typeof e.resolve == "function";
1477
1477
  }
1478
- function Re(e) {
1478
+ function ze(e) {
1479
1479
  if (typeof e != "object" || !e) return !1;
1480
1480
  let t = e;
1481
1481
  return [
@@ -1484,21 +1484,21 @@ function Re(e) {
1484
1484
  "resolve"
1485
1485
  ].every((e) => typeof t[e] == "function");
1486
1486
  }
1487
- function ze(e) {
1487
+ function Be(e) {
1488
1488
  return typeof e == "object" && !!e && typeof e.getResourceType == "function" && typeof e.hasBlueprintCapability == "function";
1489
1489
  }
1490
- function Be(e) {
1490
+ function Ve(e) {
1491
1491
  return typeof e == "object" && !!e && typeof e.emit == "function";
1492
1492
  }
1493
- function Ve(e) {
1493
+ function He(e) {
1494
1494
  return typeof e == "object" && !!e && typeof e.resolve == "function";
1495
1495
  }
1496
- function He(e) {
1496
+ function Ue(e) {
1497
1497
  return typeof e == "object" && !!e && typeof e.execute == "function";
1498
1498
  }
1499
1499
  //#endregion
1500
1500
  //#region src/viewer/viewer-lifecycle.ts
1501
- function X(e) {
1501
+ function Y(e) {
1502
1502
  return {
1503
1503
  ok: !1,
1504
1504
  diagnostics: [{
@@ -1511,11 +1511,11 @@ function X(e) {
1511
1511
  }
1512
1512
  //#endregion
1513
1513
  //#region src/viewer/viewer-configuration.ts
1514
- function Ue(e) {
1515
- if (!Y(e.catalog)) return X("Viewer catalog 必须是合法的物料目录。");
1516
- if (e.datasetPort !== void 0 && !n(e.datasetPort)) return X("Viewer dataset port must provide list, describe and query.");
1514
+ function We(e) {
1515
+ if (!J(e.catalog)) return Y("Viewer catalog 必须是合法的物料目录。");
1516
+ if (e.datasetPort !== void 0 && !n(e.datasetPort)) return Y("Viewer dataset port must provide list, describe and query.");
1517
1517
  let t = e.resourceTimeoutMs ?? 15e3;
1518
- return !Number.isInteger(t) || t < 100 || t > 6e4 ? X("resourceTimeoutMs 必须是 100..60000 的整数。") : e.resourcePort !== void 0 && !Le(e.resourcePort) ? X("Viewer resource port 必须是含 resolve 的对象。") : e.hostCatalogPort !== void 0 && !Re(e.hostCatalogPort) ? X("Viewer host catalog port 必须同时提供 list、describe 与 resolve。") : e.conditionalStylePort !== void 0 && !Ve(e.conditionalStylePort) ? X("Viewer conditional style port 必须是含 resolve 的对象。") : e.runtimeContributions !== void 0 && !ze(e.runtimeContributions) ? X("Viewer runtime contributions 必须是含 getResourceType 的对象。") : e.blueprintRuntimePort !== void 0 && !Be(e.blueprintRuntimePort) ? X("Viewer blueprint runtime port 必须是含 emit 的对象。") : e.blueprintHostActionPort !== void 0 && !He(e.blueprintHostActionPort) ? X("Viewer blueprint host action port 必须是含 execute 的对象。") : {
1518
+ return !Number.isInteger(t) || t < 100 || t > 6e4 ? Y("resourceTimeoutMs 必须是 100..60000 的整数。") : e.resourcePort !== void 0 && !Re(e.resourcePort) ? Y("Viewer resource port 必须是含 resolve 的对象。") : e.hostCatalogPort !== void 0 && !ze(e.hostCatalogPort) ? Y("Viewer host catalog port 必须同时提供 list、describe 与 resolve。") : e.conditionalStylePort !== void 0 && !He(e.conditionalStylePort) ? Y("Viewer conditional style port 必须是含 resolve 的对象。") : e.runtimeContributions !== void 0 && !Be(e.runtimeContributions) ? Y("Viewer runtime contributions 必须是含 getResourceType 的对象。") : e.blueprintRuntimePort !== void 0 && !Ve(e.blueprintRuntimePort) ? Y("Viewer blueprint runtime port 必须是含 emit 的对象。") : e.blueprintHostActionPort !== void 0 && !Ue(e.blueprintHostActionPort) ? Y("Viewer blueprint host action port 必须是含 execute 的对象。") : {
1519
1519
  ok: !0,
1520
1520
  value: {
1521
1521
  ...e,
@@ -1526,7 +1526,7 @@ function Ue(e) {
1526
1526
  }
1527
1527
  //#endregion
1528
1528
  //#region src/viewer/viewer-data-source-scheduler.ts
1529
- var Z = class {
1529
+ var X = class {
1530
1530
  host;
1531
1531
  #e = /* @__PURE__ */ new Map();
1532
1532
  #t = !1;
@@ -1536,7 +1536,7 @@ var Z = class {
1536
1536
  sync(e) {
1537
1537
  let t = /* @__PURE__ */ new Map();
1538
1538
  for (let n of e === void 0 ? [] : u(e)) {
1539
- let e = We(n);
1539
+ let e = Ge(n);
1540
1540
  e !== void 0 && t.set(n.id, e);
1541
1541
  }
1542
1542
  for (let [e, n] of this.#e) t.get(e) !== n.intervalSeconds && (clearTimeout(n.timer), this.#e.delete(e));
@@ -1566,12 +1566,47 @@ var Z = class {
1566
1566
  });
1567
1567
  }
1568
1568
  };
1569
- function We(e) {
1569
+ function Ge(e) {
1570
1570
  return e.updatePolicy?.mode === "auto" ? e.updatePolicy.intervalSeconds : void 0;
1571
1571
  }
1572
1572
  //#endregion
1573
+ //#region src/viewer/viewer-skeleton.ts
1574
+ var Z = "data-viewer-skeleton", Ke = `
1575
+ [${Z}] {
1576
+ display: block;
1577
+ box-sizing: border-box;
1578
+ width: 100%;
1579
+ height: 100%;
1580
+ background: rgba(127, 127, 127, 0.12);
1581
+ background: color-mix(in srgb, currentColor 10%, transparent);
1582
+ animation: base-screen-viewer-skeleton-pulse 1.4s ease-in-out infinite;
1583
+ }
1584
+ @keyframes base-screen-viewer-skeleton-pulse {
1585
+ 0%,
1586
+ 100% {
1587
+ opacity: 0.6;
1588
+ }
1589
+ 50% {
1590
+ opacity: 1;
1591
+ }
1592
+ }
1593
+ @media (prefers-reduced-motion: reduce) {
1594
+ [${Z}] {
1595
+ animation: none;
1596
+ }
1597
+ }
1598
+ `;
1599
+ function qe(e) {
1600
+ let t = e.createElement("style");
1601
+ return t.setAttribute("data-viewer-skeleton-style", "true"), t.textContent = Ke, t;
1602
+ }
1603
+ function Je(e) {
1604
+ let t = e.createElement("div");
1605
+ return t.setAttribute(Z, "true"), t.setAttribute("aria-hidden", "true"), t;
1606
+ }
1607
+ //#endregion
1573
1608
  //#region src/viewer/viewer-variable-controller.ts
1574
- var Ge = class {
1609
+ var Ye = class {
1575
1610
  #e;
1576
1611
  #t = /* @__PURE__ */ new Map();
1577
1612
  #n = 0;
@@ -1696,7 +1731,7 @@ var Ge = class {
1696
1731
  }
1697
1732
  s.diagnostics.length > 0 && this.#e.emitDiagnostics(s.diagnostics), this.#e.writeBlueprintVariables(c), a || (this.#c = !0), a && o.refreshData(t, n === "polling" ? "polling" : "manual", r);
1698
1733
  } finally {
1699
- this.#r = !1;
1734
+ this.#r = !1, this.#e.onRenderSettled?.();
1700
1735
  }
1701
1736
  this.#i && (this.#i = !1, this.#f("variable"));
1702
1737
  }
@@ -1705,7 +1740,7 @@ var Ge = class {
1705
1740
  let t = this.#e.readRenderer(), n = this.#e.readDocument(), r = this.#e.readBlueprintPlan();
1706
1741
  if (t === void 0 || n === void 0 || r === void 0) return;
1707
1742
  let i = this.#p(n, r, t), a = this.#e.readBlueprintVariables();
1708
- if (a !== void 0 && w(a) === w(i)) return;
1743
+ if (a !== void 0 && C(a) === C(i)) return;
1709
1744
  let o = ++this.#n;
1710
1745
  this.#r = !0;
1711
1746
  try {
@@ -1765,7 +1800,7 @@ function Q(e) {
1765
1800
  }]
1766
1801
  };
1767
1802
  }
1768
- function Ke(e, t, n) {
1803
+ function Xe(e, t, n) {
1769
1804
  if (e === void 0) return n;
1770
1805
  let r;
1771
1806
  for (let i of e.variables) {
@@ -1774,7 +1809,7 @@ function Ke(e, t, n) {
1774
1809
  }
1775
1810
  return r ?? n;
1776
1811
  }
1777
- var qe = class {
1812
+ var Ze = class {
1778
1813
  host;
1779
1814
  #e = /* @__PURE__ */ new Map();
1780
1815
  constructor(e) {
@@ -1824,7 +1859,7 @@ function $(e, t) {
1824
1859
  }
1825
1860
  //#endregion
1826
1861
  //#region src/viewer/viewer.ts
1827
- var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1862
+ var Qe = globalThis.HTMLElement ?? class {}, $e = class extends Qe {
1828
1863
  #e;
1829
1864
  #t;
1830
1865
  #n;
@@ -1844,13 +1879,16 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1844
1879
  #g;
1845
1880
  #_;
1846
1881
  #v;
1847
- #y = new qe({
1882
+ #y = !1;
1883
+ #b;
1884
+ #x;
1885
+ #S = new Ze({
1848
1886
  readDocument: () => this.#c,
1849
1887
  readVariables: () => this.#u,
1850
1888
  setValue: (e, t) => this.setVariableValue(e, t),
1851
1889
  reportListenerFailure: () => this.emitLifecycleDiagnostic("Variable change listener failed.")
1852
1890
  });
1853
- #b = new Ge({
1891
+ #C = new Ye({
1854
1892
  readRenderer: () => this.#h,
1855
1893
  readDocument: () => this.#c,
1856
1894
  readBlueprintPlan: () => this.#l,
@@ -1858,18 +1896,19 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1858
1896
  writeBlueprintVariables: (e) => {
1859
1897
  this.writeBlueprintVariables(e, !0);
1860
1898
  },
1861
- emitDiagnostics: (e) => this.emitDiagnostics(e)
1899
+ emitDiagnostics: (e) => this.emitDiagnostics(e),
1900
+ onRenderSettled: () => this.markRendered()
1862
1901
  });
1863
- #x = new Z({
1902
+ #w = new X({
1864
1903
  readRenderer: () => this.#h,
1865
1904
  readDocument: () => this.#c
1866
1905
  });
1867
1906
  configure(e) {
1868
- if (this.#h !== void 0) return X("Viewer 已初始化,请先 unload 再重新配置。");
1869
- let t = Ue(e);
1907
+ if (this.#h !== void 0) return Y("Viewer 已初始化,请先 unload 再重新配置。");
1908
+ let t = We(e);
1870
1909
  if (!t.ok) return t;
1871
1910
  let n = t.value;
1872
- return this.#e = n.catalog, this.#t = n.resourcePort, this.#n = n.datasetPort, this.#r = n.hostCatalogPort, this.#i = n.conditionalStylePort, this.#a = n.runtimeContributions, this.#o = n.blueprintRuntimePort, this.#s = n.blueprintHostActionPort, this.#d = n.resourceTimeoutMs, this.#f = n.instanceId ?? "viewer", this.#p = n.mode ?? "viewer", this.#m = n.observer, this.#_ = n.projectId, this.#v = n.documentRevision, this.initialize(), this.#b.start(void 0, !1, !0), this.#x.sync(this.#c), {
1911
+ return this.#e = n.catalog, this.#t = n.resourcePort, this.#n = n.datasetPort, this.#r = n.hostCatalogPort, this.#i = n.conditionalStylePort, this.#a = n.runtimeContributions, this.#o = n.blueprintRuntimePort, this.#s = n.blueprintHostActionPort, this.#d = n.resourceTimeoutMs, this.#f = n.instanceId ?? "viewer", this.#p = n.mode ?? "viewer", this.#m = n.observer, this.#b = n.projectId, this.#x = n.documentRevision, this.initialize(), this.#C.start(void 0, !1, !0), this.#w.sync(this.#c), {
1873
1912
  ok: !0,
1874
1913
  value: null,
1875
1914
  diagnostics: []
@@ -1887,7 +1926,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1887
1926
  }
1888
1927
  refreshCatalog(e) {
1889
1928
  let t = this.#e;
1890
- if (t === void 0 || !Y(e)) return X("Viewer must have a configured catalog before refreshing a valid catalog.");
1929
+ if (t === void 0 || !J(e)) return Y("Viewer must have a configured catalog before refreshing a valid catalog.");
1891
1930
  if (t === e) return {
1892
1931
  ok: !0,
1893
1932
  value: null,
@@ -1898,12 +1937,12 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1898
1937
  ok: !0,
1899
1938
  value: null,
1900
1939
  diagnostics: []
1901
- }) : X("Catalog refresh requires an initialized renderer while a document is loaded.");
1940
+ }) : Y("Catalog refresh requires an initialized renderer while a document is loaded.");
1902
1941
  if (r !== void 0) {
1903
1942
  let t = n.validateCatalog(r, e);
1904
1943
  if (!t.ok) return t;
1905
1944
  }
1906
- let i = this.#b.hasDeferredDocument;
1945
+ let i = this.#C.hasDeferredDocument;
1907
1946
  try {
1908
1947
  let a = n.setCatalog(e);
1909
1948
  if (!a.ok) return a;
@@ -1919,7 +1958,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1919
1958
  diagnostics: [...o.diagnostics, ...c.diagnostics]
1920
1959
  };
1921
1960
  } catch {
1922
- let e = X("Viewer catalog refresh failed.");
1961
+ let e = Y("Viewer catalog refresh failed.");
1923
1962
  try {
1924
1963
  let a = n.setCatalog(t), o = a.ok && r !== void 0 && !i ? n.render(r) : a;
1925
1964
  return {
@@ -1929,7 +1968,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1929
1968
  } catch {
1930
1969
  return {
1931
1970
  ok: !1,
1932
- diagnostics: [...e.diagnostics, ...X("Viewer catalog rollback failed.").diagnostics]
1971
+ diagnostics: [...e.diagnostics, ...Y("Viewer catalog rollback failed.").diagnostics]
1933
1972
  };
1934
1973
  }
1935
1974
  }
@@ -2004,33 +2043,33 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2004
2043
  return this.#c;
2005
2044
  }
2006
2045
  set document(e) {
2007
- this.#b.cancel(), this.#x.suspend(), this.#h?.resetBlueprintVisibility(), this.#c = e, this.compileBlueprint(), this.initialize(), this.#b.start(void 0, !1, !0), this.#x.resume();
2046
+ this.#C.cancel(), this.#w.suspend(), this.#h?.resetBlueprintVisibility(), this.#c = e, this.compileBlueprint(), e !== void 0 && this.ensureSkeleton(), this.initialize(), this.#C.start(void 0, !1, !0), this.#w.resume(), e === void 0 ? this.clearSkeleton() : this.#l === void 0 && this.markRendered();
2008
2047
  }
2009
2048
  connectedCallback() {
2010
- this.initialize(), this.#b.start(void 0, !1, !0), this.#x.resume();
2049
+ this.ensureSkeleton(), this.initialize(), this.#C.start(void 0, !1, !0), this.#w.resume();
2011
2050
  }
2012
2051
  disconnectedCallback() {
2013
- this.#x.suspend(), this.#b.cancel(), this.#h?.clear();
2052
+ this.#w.suspend(), this.#C.cancel(), this.#h?.clear();
2014
2053
  }
2015
2054
  unload() {
2016
- this.#x.dispose(), this.#b.reset(), this.#y.clear(), this.disposeRenderer(), this.#c = void 0, this.compileBlueprint();
2055
+ this.#w.dispose(), this.#C.reset(), this.#S.clear(), this.disposeRenderer(), this.#c = void 0, this.compileBlueprint(), this.#y = !1;
2017
2056
  }
2018
2057
  refreshData(e) {
2019
- this.#b.refreshData(e);
2058
+ this.#C.refreshData(e);
2020
2059
  }
2021
2060
  refreshVariables(e) {
2022
- this.#b.refreshVariables(e);
2061
+ this.#C.refreshVariables(e);
2023
2062
  }
2024
2063
  refreshConditionalStyles(e) {
2025
2064
  this.#h?.refreshConditionalStyles(e);
2026
2065
  }
2027
2066
  getVariable(e) {
2028
- return this.#y.get(e);
2067
+ return this.#S.get(e);
2029
2068
  }
2030
2069
  initialize() {
2031
2070
  if (!this.isConnected || this.#e === void 0 || this.#h !== void 0) return;
2032
2071
  let e = this.shadowRoot ?? this.attachShadow({ mode: "open" });
2033
- this.#g = this.ownerDocument.createElement("div"), e.appendChild(this.#g), this.#h = q({
2072
+ this.#g = this.ownerDocument.createElement("div"), e.appendChild(this.#g), this.#h = K({
2034
2073
  root: this.#g,
2035
2074
  catalog: this.#e,
2036
2075
  mode: "viewer",
@@ -2046,19 +2085,30 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2046
2085
  resourcePort: this.#t,
2047
2086
  ...this.#n === void 0 ? {} : { datasetPort: this.#n },
2048
2087
  ...this.#r === void 0 ? {} : { hostCatalogPort: this.#r },
2049
- onDataSourceSettled: (e) => this.#b.handleDataSourceSettled(e),
2088
+ onDataSourceSettled: (e) => this.#C.handleDataSourceSettled(e),
2050
2089
  ...this.#i === void 0 ? {} : { conditionalStylePort: this.#i },
2051
2090
  resourceTimeoutMs: this.#d,
2052
2091
  ...this.#a === void 0 ? {} : { contributionIndex: this.#a },
2053
2092
  ...this.#m === void 0 ? {} : { observer: this.#m },
2054
2093
  ...this.#f === void 0 ? {} : { instanceId: this.#f },
2055
2094
  ...this.#p === void 0 ? {} : { executionMode: this.#p },
2056
- ...this.#_ === void 0 ? {} : { projectId: this.#_ },
2057
- ...this.#v === void 0 ? {} : { documentRevision: this.#v }
2095
+ ...this.#b === void 0 ? {} : { projectId: this.#b },
2096
+ ...this.#x === void 0 ? {} : { documentRevision: this.#x }
2058
2097
  });
2059
2098
  }
2099
+ ensureSkeleton() {
2100
+ if (this.#y || this.#_ !== void 0) return;
2101
+ let e = this.shadowRoot ?? this.attachShadow({ mode: "open" });
2102
+ this.#v === void 0 && (this.#v = qe(this.ownerDocument), e.appendChild(this.#v)), this.#_ = Je(this.ownerDocument), e.appendChild(this.#_), this.setAttribute("data-viewer-state", "loading"), this.setAttribute("aria-busy", "true");
2103
+ }
2104
+ markRendered() {
2105
+ this.#y = !0, this.clearSkeleton(), this.isConnected && (this.setAttribute("data-viewer-state", "ready"), this.removeAttribute("aria-busy"));
2106
+ }
2107
+ clearSkeleton() {
2108
+ this.#_?.remove(), this.#_ = void 0, this.#v?.remove(), this.#v = void 0;
2109
+ }
2060
2110
  disposeRenderer() {
2061
- this.#h?.dispose(), this.#h = void 0, this.#g?.remove(), this.#g = void 0;
2111
+ this.#h?.dispose(), this.#h = void 0, this.#g?.remove(), this.#g = void 0, this.clearSkeleton();
2062
2112
  }
2063
2113
  compileBlueprint() {
2064
2114
  if (this.#c === void 0) {
@@ -2093,10 +2143,10 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2093
2143
  }
2094
2144
  let i = this.#h, a = this.#c, o = {
2095
2145
  ...r.value,
2096
- variables: Ke(a, n, r.value.variables)
2146
+ variables: Xe(a, n, r.value.variables)
2097
2147
  }, s = this.writeBlueprintVariables(o.variables, !1);
2098
2148
  if (i !== void 0 && a !== void 0) {
2099
- let e = Ie(i, a, n, o);
2149
+ let e = Le(i, a, n, o);
2100
2150
  e.length > 0 && this.emitDiagnostics(e);
2101
2151
  }
2102
2152
  for (let e of r.value.hostEvents) this.#o === void 0 ? this.dispatchEvent(new CustomEvent("base-screen-blueprint-event", { detail: e })) : Promise.resolve(this.#o.emit(e)).catch(() => {
@@ -2106,7 +2156,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2106
2156
  this.emitLifecycleDiagnostic("Blueprint host action failed.");
2107
2157
  });
2108
2158
  for (let e of r.value.componentDataRequests) i?.refreshData(e);
2109
- r.value.variableRequests.length > 0 && this.#b.refreshVariables({ variableIds: [...new Set(r.value.variableRequests)] });
2159
+ r.value.variableRequests.length > 0 && this.#C.refreshVariables({ variableIds: [...new Set(r.value.variableRequests)] });
2110
2160
  for (let e of s) this.handleBlueprintEvent({
2111
2161
  type: "variable-event",
2112
2162
  variableId: e,
@@ -2118,7 +2168,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2118
2168
  let n = o(t);
2119
2169
  if (!n.ok) return n;
2120
2170
  let r = this.#h, i = this.#c, a = this.#u, s = i?.variables.find((t) => t.id === e);
2121
- if (r === void 0 || i === void 0 || a === void 0 || s === void 0) return X("Viewer variable is unavailable.");
2171
+ if (r === void 0 || i === void 0 || a === void 0 || s === void 0) return Y("Viewer variable is unavailable.");
2122
2172
  let c = Q(s);
2123
2173
  if (c !== void 0) return c;
2124
2174
  if ($(a[e], n.value)) return {
@@ -2146,7 +2196,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2146
2196
  writeBlueprintVariables(e, t = !1) {
2147
2197
  let n = this.#u;
2148
2198
  if (this.#u = e, n === void 0) return [];
2149
- let r = this.#y.notify(n, e);
2199
+ let r = this.#S.notify(n, e);
2150
2200
  if (t) for (let t of r) this.handleBlueprintEvent({
2151
2201
  type: "variable-event",
2152
2202
  variableId: t,
@@ -2168,6 +2218,6 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2168
2218
  }
2169
2219
  };
2170
2220
  //#endregion
2171
- export { Ye as BaseScreenViewerElement, q as createBaseScreenRenderer };
2221
+ export { $e as BaseScreenViewerElement, K as createBaseScreenRenderer };
2172
2222
 
2173
2223
  //# sourceMappingURL=index.js.map