@jxsuite/studio 0.23.2 → 0.25.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 (106) hide show
  1. package/dist/studio.js +2311 -718
  2. package/dist/studio.js.map +121 -104
  3. package/package.json +8 -7
  4. package/src/browse/{browse-modal.js → browse-modal.ts} +9 -10
  5. package/src/browse/{browse.js → browse.ts} +109 -84
  6. package/src/canvas/{canvas-diff.js → canvas-diff.ts} +42 -35
  7. package/src/canvas/{canvas-helpers.js → canvas-helpers.ts} +25 -19
  8. package/src/canvas/{canvas-live-render.js → canvas-live-render.ts} +53 -63
  9. package/src/canvas/{canvas-render.js → canvas-render.ts} +110 -121
  10. package/src/canvas/{canvas-utils.js → canvas-utils.ts} +48 -44
  11. package/src/canvas/{nested-site-style.js → nested-site-style.ts} +3 -3
  12. package/src/editor/{component-inline-edit.js → component-inline-edit.ts} +45 -33
  13. package/src/editor/{content-inline-edit.js → content-inline-edit.ts} +27 -45
  14. package/src/editor/{context-menu.js → context-menu.ts} +38 -36
  15. package/src/editor/{convert-targets.js → convert-targets.ts} +15 -12
  16. package/src/editor/{convert-to-component.js → convert-to-component.ts} +25 -26
  17. package/src/editor/{convert-to-repeater.js → convert-to-repeater.ts} +60 -40
  18. package/src/editor/{inline-edit.js → inline-edit.ts} +91 -55
  19. package/src/editor/{inline-format.js → inline-format.ts} +46 -51
  20. package/src/editor/{insertion-helper.js → insertion-helper.ts} +47 -63
  21. package/src/editor/{shortcuts.js → shortcuts.ts} +45 -31
  22. package/src/editor/{slash-menu.js → slash-menu.ts} +34 -35
  23. package/src/files/{components.js → components.ts} +12 -15
  24. package/src/files/{file-ops.js → file-ops.ts} +36 -29
  25. package/src/files/{files.js → files.ts} +102 -84
  26. package/src/github/{github-auth.js → github-auth.ts} +3 -3
  27. package/src/github/{github-publish.js → github-publish.ts} +20 -18
  28. package/src/markdown/{md-allowlist.js → md-allowlist.ts} +5 -2
  29. package/src/markdown/{md-convert.js → md-convert.ts} +146 -169
  30. package/src/new-project/{new-project-modal.js → new-project-modal.ts} +16 -18
  31. package/src/panels/{activity-bar.js → activity-bar.ts} +26 -34
  32. package/src/panels/{ai-panel.js → ai-panel.ts} +30 -30
  33. package/src/panels/{block-action-bar.js → block-action-bar.ts} +64 -73
  34. package/src/panels/{canvas-dnd.js → canvas-dnd.ts} +44 -49
  35. package/src/panels/{data-explorer.js → data-explorer.ts} +21 -15
  36. package/src/panels/dnd.ts +417 -0
  37. package/src/panels/{editors.js → editors.ts} +43 -50
  38. package/src/panels/{elements-panel.js → elements-panel.ts} +30 -27
  39. package/src/panels/{events-panel.js → events-panel.ts} +33 -25
  40. package/src/panels/{git-panel.js → git-panel.ts} +97 -83
  41. package/src/panels/{head-panel.js → head-panel.ts} +117 -139
  42. package/src/panels/{imports-panel.js → imports-panel.ts} +69 -89
  43. package/src/panels/{layers-panel.js → layers-panel.ts} +61 -57
  44. package/src/panels/{left-panel.js → left-panel.ts} +56 -63
  45. package/src/panels/{overlays.js → overlays.ts} +28 -36
  46. package/src/panels/{panel-events.js → panel-events.ts} +53 -51
  47. package/src/panels/{preview-render.js → preview-render.ts} +20 -15
  48. package/src/panels/{properties-panel.js → properties-panel.ts} +212 -246
  49. package/src/panels/{pseudo-preview.js → pseudo-preview.ts} +9 -8
  50. package/src/panels/{quick-search.js → quick-search.ts} +16 -17
  51. package/src/panels/{right-panel.js → right-panel.ts} +41 -59
  52. package/src/panels/{shared.js → shared.ts} +8 -6
  53. package/src/panels/{signals-panel.js → signals-panel.ts} +322 -362
  54. package/src/panels/{statusbar.js → statusbar.ts} +14 -14
  55. package/src/panels/{style-inputs.js → style-inputs.ts} +66 -48
  56. package/src/panels/{style-panel.js → style-panel.ts} +235 -290
  57. package/src/panels/{style-utils.js → style-utils.ts} +32 -31
  58. package/src/panels/{stylebook-layers-panel.js → stylebook-layers-panel.ts} +22 -14
  59. package/src/panels/{stylebook-panel.js → stylebook-panel.ts} +127 -140
  60. package/src/panels/{tab-strip.js → tab-strip.ts} +12 -14
  61. package/src/panels/{toolbar.js → toolbar.ts} +68 -70
  62. package/src/panels/{welcome-screen.js → welcome-screen.ts} +14 -16
  63. package/src/{platform.js → platform.ts} +5 -3
  64. package/src/platforms/{devserver.js → devserver.ts} +53 -44
  65. package/src/{recent-projects.js → recent-projects.ts} +17 -12
  66. package/src/{resize-edges.js → resize-edges.ts} +18 -13
  67. package/src/services/{cem-export.js → cem-export.ts} +14 -7
  68. package/src/services/{code-services.js → code-services.ts} +29 -20
  69. package/src/services/{monaco-setup.js → monaco-setup.ts} +2 -3
  70. package/src/settings/{content-types-editor.js → content-types-editor.ts} +88 -67
  71. package/src/settings/{css-vars-editor.js → css-vars-editor.ts} +78 -51
  72. package/src/settings/{defs-editor.js → defs-editor.ts} +70 -56
  73. package/src/settings/{general-settings.js → general-settings.ts} +29 -28
  74. package/src/settings/{head-editor.js → head-editor.ts} +37 -35
  75. package/src/settings/{schema-field-ui.js → schema-field-ui.ts} +86 -76
  76. package/src/settings/{settings-modal.js → settings-modal.ts} +14 -16
  77. package/src/{site-context.js → site-context.ts} +35 -32
  78. package/src/{state.js → state.ts} +95 -78
  79. package/src/{store.js → store.ts} +60 -63
  80. package/src/{studio.js → studio.ts} +117 -119
  81. package/src/tabs/tab.ts +196 -0
  82. package/src/tabs/{transact.js → transact.ts} +107 -60
  83. package/src/types.ts +185 -0
  84. package/src/ui/{button-group.js → button-group.ts} +21 -21
  85. package/src/ui/{color-selector.js → color-selector.ts} +44 -37
  86. package/src/ui/{expression-editor.js → expression-editor.ts} +65 -40
  87. package/src/ui/{field-row.js → field-row.ts} +19 -2
  88. package/src/ui/{icons.js → icons.ts} +2 -2
  89. package/src/ui/{layers.js → layers.ts} +33 -24
  90. package/src/ui/{media-picker.js → media-picker.ts} +13 -9
  91. package/src/ui/{panel-resize.js → panel-resize.ts} +9 -4
  92. package/src/ui/{spectrum.js → spectrum.ts} +4 -4
  93. package/src/ui/{unit-selector.js → unit-selector.ts} +16 -19
  94. package/src/ui/{value-selector.js → value-selector.ts} +28 -28
  95. package/src/ui/{widgets.js → widgets.ts} +62 -15
  96. package/src/utils/{canvas-media.js → canvas-media.ts} +29 -14
  97. package/src/utils/edit-display.ts +298 -0
  98. package/src/utils/{google-fonts.js → google-fonts.ts} +14 -13
  99. package/src/utils/{inherited-style.js → inherited-style.ts} +15 -10
  100. package/src/utils/{studio-utils.js → studio-utils.ts} +35 -23
  101. package/src/{view.js → view.ts} +53 -55
  102. package/src/workspace/{workspace.js → workspace.ts} +44 -33
  103. package/src/panels/dnd.js +0 -426
  104. package/src/tabs/tab.js +0 -192
  105. package/src/utils/edit-display.js +0 -203
  106. /package/src/{reactivity.js → reactivity.ts} +0 -0
package/dist/studio.js CHANGED
@@ -194710,12 +194710,12 @@ var init_reactivity_esm_bundler = __esm(() => {
194710
194710
  shallowReadonlyMap = /* @__PURE__ */ new WeakMap;
194711
194711
  });
194712
194712
 
194713
- // src/reactivity.js
194713
+ // src/reactivity.ts
194714
194714
  var init_reactivity = __esm(() => {
194715
194715
  init_reactivity_esm_bundler();
194716
194716
  });
194717
194717
 
194718
- // src/tabs/tab.js
194718
+ // src/tabs/tab.ts
194719
194719
  function createDefaultUi() {
194720
194720
  return {
194721
194721
  rightTab: "properties",
@@ -194800,7 +194800,7 @@ var init_tab = __esm(() => {
194800
194800
  ALL_MODES = ["edit", "design", "preview", "source", "stylebook"];
194801
194801
  });
194802
194802
 
194803
- // src/workspace/workspace.js
194803
+ // src/workspace/workspace.ts
194804
194804
  function openTab(opts) {
194805
194805
  const tab = createTab(opts);
194806
194806
  workspace.tabs.set(tab.id, tab);
@@ -194887,7 +194887,7 @@ var init_workspace2 = __esm(() => {
194887
194887
  activeTab = computed(() => workspace.activeTabId ? workspace.tabs.get(workspace.activeTabId) ?? null : null);
194888
194888
  });
194889
194889
 
194890
- // src/state.js
194890
+ // src/state.ts
194891
194891
  function getNodeAtPath(doc, path) {
194892
194892
  let node = doc;
194893
194893
  for (const key of path) {
@@ -194933,7 +194933,12 @@ function flattenTree(doc, path = [], depth = 0) {
194933
194933
  rows.push(...flattenTree(children[i2], childPath, depth + 1));
194934
194934
  }
194935
194935
  } else if (children && typeof children === "object" && children.$prototype === "Array") {
194936
- rows.push({ node: children, path: [...path, "children"], depth: depth + 1, nodeType: "map" });
194936
+ rows.push({
194937
+ node: children,
194938
+ path: [...path, "children"],
194939
+ depth: depth + 1,
194940
+ nodeType: "map"
194941
+ });
194937
194942
  const mapDef = children.map;
194938
194943
  if (mapDef && typeof mapDef === "object") {
194939
194944
  rows.push(...flattenTree(mapDef, [...path, "children", "map"], depth + 2));
@@ -194943,9 +194948,19 @@ function flattenTree(doc, path = [], depth = 0) {
194943
194948
  for (const [caseName, caseDef] of Object.entries(doc.cases)) {
194944
194949
  const casePath = [...path, "cases", caseName];
194945
194950
  if (caseDef && typeof caseDef === "object" && caseDef.$ref) {
194946
- rows.push({ node: caseDef, path: casePath, depth: depth + 1, nodeType: "case-ref" });
194951
+ rows.push({
194952
+ node: caseDef,
194953
+ path: casePath,
194954
+ depth: depth + 1,
194955
+ nodeType: "case-ref"
194956
+ });
194947
194957
  } else if (caseDef && typeof caseDef === "object") {
194948
- rows.push({ node: caseDef, path: casePath, depth: depth + 1, nodeType: "case" });
194958
+ rows.push({
194959
+ node: caseDef,
194960
+ path: casePath,
194961
+ depth: depth + 1,
194962
+ nodeType: "case"
194963
+ });
194949
194964
  const caseChildren = flattenTree(caseDef, casePath, depth + 2);
194950
194965
  rows.push(...caseChildren.slice(1));
194951
194966
  }
@@ -194979,7 +194994,7 @@ function requireProjectState() {
194979
194994
  }
194980
194995
  var projectState = null;
194981
194996
 
194982
- // src/store.js
194997
+ // src/store.ts
194983
194998
  function initShellRefs() {
194984
194999
  canvasWrap = document.querySelector("#canvas-wrap");
194985
195000
  activityBar = document.querySelector("#activity-bar");
@@ -195059,20 +195074,19 @@ function renderOnly(...names) {
195059
195074
  function updateSession(patch) {
195060
195075
  const tab = activeTab.value;
195061
195076
  if (tab) {
195062
- const p = patch;
195063
- if (p.selection !== undefined)
195064
- tab.session.selection = p.selection;
195065
- if (p.hover !== undefined)
195066
- tab.session.hover = p.hover;
195067
- if (p.clipboard !== undefined)
195068
- tab.session.clipboard = p.clipboard;
195069
- if (p.ui) {
195070
- for (const [k, v] of Object.entries(p.ui)) {
195077
+ if (patch.selection !== undefined)
195078
+ tab.session.selection = patch.selection;
195079
+ if (patch.hover !== undefined)
195080
+ tab.session.hover = patch.hover;
195081
+ if (patch.clipboard !== undefined)
195082
+ tab.session.clipboard = patch.clipboard;
195083
+ if (patch.ui) {
195084
+ for (const [k, v] of Object.entries(patch.ui)) {
195071
195085
  tab.session.ui[k] = v;
195072
195086
  }
195073
195087
  }
195074
- if (p.canvas) {
195075
- for (const [k, v] of Object.entries(p.canvas)) {
195088
+ if (patch.canvas) {
195089
+ for (const [k, v] of Object.entries(patch.canvas)) {
195076
195090
  tab.session.canvas[k] = v;
195077
195091
  }
195078
195092
  }
@@ -196343,7 +196357,7 @@ var require_dist = __commonJS((exports) => {
196343
196357
  } });
196344
196358
  });
196345
196359
 
196346
- // src/platform.js
196360
+ // src/platform.ts
196347
196361
  function registerPlatform(platform3) {
196348
196362
  g.__jxPlatform = platform3;
196349
196363
  }
@@ -196360,7 +196374,7 @@ var init_platform3 = __esm(() => {
196360
196374
  g = globalThis;
196361
196375
  });
196362
196376
 
196363
- // src/files/components.js
196377
+ // src/files/components.ts
196364
196378
  var exports_components = {};
196365
196379
  __export(exports_components, {
196366
196380
  loadComponentRegistry: () => loadComponentRegistry,
@@ -225734,7 +225748,1201 @@ var init_hast_util_whitespace = __esm(() => {
225734
225748
  init_lib29();
225735
225749
  });
225736
225750
 
225737
- // ../parser/src/html-to-jx.js
225751
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/util/schema.js
225752
+ class Schema4 {
225753
+ constructor(property, normal, space) {
225754
+ this.normal = normal;
225755
+ this.property = property;
225756
+ if (space) {
225757
+ this.space = space;
225758
+ }
225759
+ }
225760
+ }
225761
+ var init_schema2 = __esm(() => {
225762
+ Schema4.prototype.normal = {};
225763
+ Schema4.prototype.property = {};
225764
+ Schema4.prototype.space = undefined;
225765
+ });
225766
+
225767
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/util/merge.js
225768
+ function merge3(definitions, space) {
225769
+ const property = {};
225770
+ const normal = {};
225771
+ for (const definition3 of definitions) {
225772
+ Object.assign(property, definition3.property);
225773
+ Object.assign(normal, definition3.normal);
225774
+ }
225775
+ return new Schema4(property, normal, space);
225776
+ }
225777
+ var init_merge2 = __esm(() => {
225778
+ init_schema2();
225779
+ });
225780
+
225781
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/normalize.js
225782
+ function normalize5(value2) {
225783
+ return value2.toLowerCase();
225784
+ }
225785
+
225786
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/util/info.js
225787
+ class Info2 {
225788
+ constructor(property, attribute) {
225789
+ this.attribute = attribute;
225790
+ this.property = property;
225791
+ }
225792
+ }
225793
+ var init_info2 = __esm(() => {
225794
+ Info2.prototype.attribute = "";
225795
+ Info2.prototype.booleanish = false;
225796
+ Info2.prototype.boolean = false;
225797
+ Info2.prototype.commaOrSpaceSeparated = false;
225798
+ Info2.prototype.commaSeparated = false;
225799
+ Info2.prototype.defined = false;
225800
+ Info2.prototype.mustUseProperty = false;
225801
+ Info2.prototype.number = false;
225802
+ Info2.prototype.overloadedBoolean = false;
225803
+ Info2.prototype.property = "";
225804
+ Info2.prototype.spaceSeparated = false;
225805
+ Info2.prototype.space = undefined;
225806
+ });
225807
+
225808
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/util/types.js
225809
+ var exports_types2 = {};
225810
+ __export(exports_types2, {
225811
+ spaceSeparated: () => spaceSeparated2,
225812
+ overloadedBoolean: () => overloadedBoolean2,
225813
+ number: () => number2,
225814
+ commaSeparated: () => commaSeparated2,
225815
+ commaOrSpaceSeparated: () => commaOrSpaceSeparated2,
225816
+ booleanish: () => booleanish2,
225817
+ boolean: () => boolean3
225818
+ });
225819
+ function increment2() {
225820
+ return 2 ** ++powers2;
225821
+ }
225822
+ var powers2 = 0, boolean3, booleanish2, overloadedBoolean2, number2, spaceSeparated2, commaSeparated2, commaOrSpaceSeparated2;
225823
+ var init_types5 = __esm(() => {
225824
+ boolean3 = increment2();
225825
+ booleanish2 = increment2();
225826
+ overloadedBoolean2 = increment2();
225827
+ number2 = increment2();
225828
+ spaceSeparated2 = increment2();
225829
+ commaSeparated2 = increment2();
225830
+ commaOrSpaceSeparated2 = increment2();
225831
+ });
225832
+
225833
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/util/defined-info.js
225834
+ function mark2(values2, key, value2) {
225835
+ if (value2) {
225836
+ values2[key] = value2;
225837
+ }
225838
+ }
225839
+ var checks2, DefinedInfo2;
225840
+ var init_defined_info2 = __esm(() => {
225841
+ init_info2();
225842
+ init_types5();
225843
+ checks2 = Object.keys(exports_types2);
225844
+ DefinedInfo2 = class DefinedInfo2 extends Info2 {
225845
+ constructor(property, attribute, mask, space) {
225846
+ let index2 = -1;
225847
+ super(property, attribute);
225848
+ mark2(this, "space", space);
225849
+ if (typeof mask === "number") {
225850
+ while (++index2 < checks2.length) {
225851
+ const check = checks2[index2];
225852
+ mark2(this, checks2[index2], (mask & exports_types2[check]) === exports_types2[check]);
225853
+ }
225854
+ }
225855
+ }
225856
+ };
225857
+ DefinedInfo2.prototype.defined = true;
225858
+ });
225859
+
225860
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/util/create.js
225861
+ function create5(definition3) {
225862
+ const properties = {};
225863
+ const normals = {};
225864
+ for (const [property, value2] of Object.entries(definition3.properties)) {
225865
+ const info = new DefinedInfo2(property, definition3.transform(definition3.attributes || {}, property), value2, definition3.space);
225866
+ if (definition3.mustUseProperty && definition3.mustUseProperty.includes(property)) {
225867
+ info.mustUseProperty = true;
225868
+ }
225869
+ properties[property] = info;
225870
+ normals[normalize5(property)] = property;
225871
+ normals[normalize5(info.attribute)] = property;
225872
+ }
225873
+ return new Schema4(properties, normals, definition3.space);
225874
+ }
225875
+ var init_create2 = __esm(() => {
225876
+ init_defined_info2();
225877
+ init_schema2();
225878
+ });
225879
+
225880
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/aria.js
225881
+ var aria2;
225882
+ var init_aria4 = __esm(() => {
225883
+ init_create2();
225884
+ init_types5();
225885
+ aria2 = create5({
225886
+ properties: {
225887
+ ariaActiveDescendant: null,
225888
+ ariaAtomic: booleanish2,
225889
+ ariaAutoComplete: null,
225890
+ ariaBusy: booleanish2,
225891
+ ariaChecked: booleanish2,
225892
+ ariaColCount: number2,
225893
+ ariaColIndex: number2,
225894
+ ariaColSpan: number2,
225895
+ ariaControls: spaceSeparated2,
225896
+ ariaCurrent: null,
225897
+ ariaDescribedBy: spaceSeparated2,
225898
+ ariaDetails: null,
225899
+ ariaDisabled: booleanish2,
225900
+ ariaDropEffect: spaceSeparated2,
225901
+ ariaErrorMessage: null,
225902
+ ariaExpanded: booleanish2,
225903
+ ariaFlowTo: spaceSeparated2,
225904
+ ariaGrabbed: booleanish2,
225905
+ ariaHasPopup: null,
225906
+ ariaHidden: booleanish2,
225907
+ ariaInvalid: null,
225908
+ ariaKeyShortcuts: null,
225909
+ ariaLabel: null,
225910
+ ariaLabelledBy: spaceSeparated2,
225911
+ ariaLevel: number2,
225912
+ ariaLive: null,
225913
+ ariaModal: booleanish2,
225914
+ ariaMultiLine: booleanish2,
225915
+ ariaMultiSelectable: booleanish2,
225916
+ ariaOrientation: null,
225917
+ ariaOwns: spaceSeparated2,
225918
+ ariaPlaceholder: null,
225919
+ ariaPosInSet: number2,
225920
+ ariaPressed: booleanish2,
225921
+ ariaReadOnly: booleanish2,
225922
+ ariaRelevant: null,
225923
+ ariaRequired: booleanish2,
225924
+ ariaRoleDescription: spaceSeparated2,
225925
+ ariaRowCount: number2,
225926
+ ariaRowIndex: number2,
225927
+ ariaRowSpan: number2,
225928
+ ariaSelected: booleanish2,
225929
+ ariaSetSize: number2,
225930
+ ariaSort: null,
225931
+ ariaValueMax: number2,
225932
+ ariaValueMin: number2,
225933
+ ariaValueNow: number2,
225934
+ ariaValueText: null,
225935
+ role: null
225936
+ },
225937
+ transform(_, property) {
225938
+ return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
225939
+ }
225940
+ });
225941
+ });
225942
+
225943
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/util/case-sensitive-transform.js
225944
+ function caseSensitiveTransform2(attributes4, attribute) {
225945
+ return attribute in attributes4 ? attributes4[attribute] : attribute;
225946
+ }
225947
+
225948
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/util/case-insensitive-transform.js
225949
+ function caseInsensitiveTransform2(attributes4, property) {
225950
+ return caseSensitiveTransform2(attributes4, property.toLowerCase());
225951
+ }
225952
+ var init_case_insensitive_transform2 = () => {};
225953
+
225954
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/html.js
225955
+ var html7;
225956
+ var init_html4 = __esm(() => {
225957
+ init_case_insensitive_transform2();
225958
+ init_create2();
225959
+ init_types5();
225960
+ html7 = create5({
225961
+ attributes: {
225962
+ acceptcharset: "accept-charset",
225963
+ classname: "class",
225964
+ htmlfor: "for",
225965
+ httpequiv: "http-equiv"
225966
+ },
225967
+ mustUseProperty: ["checked", "multiple", "muted", "selected"],
225968
+ properties: {
225969
+ abbr: null,
225970
+ accept: commaSeparated2,
225971
+ acceptCharset: spaceSeparated2,
225972
+ accessKey: spaceSeparated2,
225973
+ action: null,
225974
+ allow: null,
225975
+ allowFullScreen: boolean3,
225976
+ allowPaymentRequest: boolean3,
225977
+ allowUserMedia: boolean3,
225978
+ alpha: boolean3,
225979
+ alt: null,
225980
+ as: null,
225981
+ async: boolean3,
225982
+ autoCapitalize: null,
225983
+ autoComplete: spaceSeparated2,
225984
+ autoFocus: boolean3,
225985
+ autoPlay: boolean3,
225986
+ blocking: spaceSeparated2,
225987
+ capture: null,
225988
+ charSet: null,
225989
+ checked: boolean3,
225990
+ cite: null,
225991
+ className: spaceSeparated2,
225992
+ closedBy: null,
225993
+ colorSpace: null,
225994
+ cols: number2,
225995
+ colSpan: number2,
225996
+ command: null,
225997
+ commandFor: null,
225998
+ content: null,
225999
+ contentEditable: booleanish2,
226000
+ controls: boolean3,
226001
+ controlsList: spaceSeparated2,
226002
+ coords: number2 | commaSeparated2,
226003
+ crossOrigin: null,
226004
+ data: null,
226005
+ dateTime: null,
226006
+ decoding: null,
226007
+ default: boolean3,
226008
+ defer: boolean3,
226009
+ dir: null,
226010
+ dirName: null,
226011
+ disabled: boolean3,
226012
+ download: overloadedBoolean2,
226013
+ draggable: booleanish2,
226014
+ encType: null,
226015
+ enterKeyHint: null,
226016
+ fetchPriority: null,
226017
+ form: null,
226018
+ formAction: null,
226019
+ formEncType: null,
226020
+ formMethod: null,
226021
+ formNoValidate: boolean3,
226022
+ formTarget: null,
226023
+ headers: spaceSeparated2,
226024
+ height: number2,
226025
+ hidden: overloadedBoolean2,
226026
+ high: number2,
226027
+ href: null,
226028
+ hrefLang: null,
226029
+ htmlFor: spaceSeparated2,
226030
+ httpEquiv: spaceSeparated2,
226031
+ id: null,
226032
+ imageSizes: null,
226033
+ imageSrcSet: null,
226034
+ inert: boolean3,
226035
+ inputMode: null,
226036
+ integrity: null,
226037
+ is: null,
226038
+ isMap: boolean3,
226039
+ itemId: null,
226040
+ itemProp: spaceSeparated2,
226041
+ itemRef: spaceSeparated2,
226042
+ itemScope: boolean3,
226043
+ itemType: spaceSeparated2,
226044
+ kind: null,
226045
+ label: null,
226046
+ lang: null,
226047
+ language: null,
226048
+ list: null,
226049
+ loading: null,
226050
+ loop: boolean3,
226051
+ low: number2,
226052
+ manifest: null,
226053
+ max: null,
226054
+ maxLength: number2,
226055
+ media: null,
226056
+ method: null,
226057
+ min: null,
226058
+ minLength: number2,
226059
+ multiple: boolean3,
226060
+ muted: boolean3,
226061
+ name: null,
226062
+ nonce: null,
226063
+ noModule: boolean3,
226064
+ noValidate: boolean3,
226065
+ onAbort: null,
226066
+ onAfterPrint: null,
226067
+ onAuxClick: null,
226068
+ onBeforeMatch: null,
226069
+ onBeforePrint: null,
226070
+ onBeforeToggle: null,
226071
+ onBeforeUnload: null,
226072
+ onBlur: null,
226073
+ onCancel: null,
226074
+ onCanPlay: null,
226075
+ onCanPlayThrough: null,
226076
+ onChange: null,
226077
+ onClick: null,
226078
+ onClose: null,
226079
+ onContextLost: null,
226080
+ onContextMenu: null,
226081
+ onContextRestored: null,
226082
+ onCopy: null,
226083
+ onCueChange: null,
226084
+ onCut: null,
226085
+ onDblClick: null,
226086
+ onDrag: null,
226087
+ onDragEnd: null,
226088
+ onDragEnter: null,
226089
+ onDragExit: null,
226090
+ onDragLeave: null,
226091
+ onDragOver: null,
226092
+ onDragStart: null,
226093
+ onDrop: null,
226094
+ onDurationChange: null,
226095
+ onEmptied: null,
226096
+ onEnded: null,
226097
+ onError: null,
226098
+ onFocus: null,
226099
+ onFormData: null,
226100
+ onHashChange: null,
226101
+ onInput: null,
226102
+ onInvalid: null,
226103
+ onKeyDown: null,
226104
+ onKeyPress: null,
226105
+ onKeyUp: null,
226106
+ onLanguageChange: null,
226107
+ onLoad: null,
226108
+ onLoadedData: null,
226109
+ onLoadedMetadata: null,
226110
+ onLoadEnd: null,
226111
+ onLoadStart: null,
226112
+ onMessage: null,
226113
+ onMessageError: null,
226114
+ onMouseDown: null,
226115
+ onMouseEnter: null,
226116
+ onMouseLeave: null,
226117
+ onMouseMove: null,
226118
+ onMouseOut: null,
226119
+ onMouseOver: null,
226120
+ onMouseUp: null,
226121
+ onOffline: null,
226122
+ onOnline: null,
226123
+ onPageHide: null,
226124
+ onPageShow: null,
226125
+ onPaste: null,
226126
+ onPause: null,
226127
+ onPlay: null,
226128
+ onPlaying: null,
226129
+ onPopState: null,
226130
+ onProgress: null,
226131
+ onRateChange: null,
226132
+ onRejectionHandled: null,
226133
+ onReset: null,
226134
+ onResize: null,
226135
+ onScroll: null,
226136
+ onScrollEnd: null,
226137
+ onSecurityPolicyViolation: null,
226138
+ onSeeked: null,
226139
+ onSeeking: null,
226140
+ onSelect: null,
226141
+ onSlotChange: null,
226142
+ onStalled: null,
226143
+ onStorage: null,
226144
+ onSubmit: null,
226145
+ onSuspend: null,
226146
+ onTimeUpdate: null,
226147
+ onToggle: null,
226148
+ onUnhandledRejection: null,
226149
+ onUnload: null,
226150
+ onVolumeChange: null,
226151
+ onWaiting: null,
226152
+ onWheel: null,
226153
+ open: boolean3,
226154
+ optimum: number2,
226155
+ pattern: null,
226156
+ ping: spaceSeparated2,
226157
+ placeholder: null,
226158
+ playsInline: boolean3,
226159
+ popover: null,
226160
+ popoverTarget: null,
226161
+ popoverTargetAction: null,
226162
+ poster: null,
226163
+ preload: null,
226164
+ readOnly: boolean3,
226165
+ referrerPolicy: null,
226166
+ rel: spaceSeparated2,
226167
+ required: boolean3,
226168
+ reversed: boolean3,
226169
+ rows: number2,
226170
+ rowSpan: number2,
226171
+ sandbox: spaceSeparated2,
226172
+ scope: null,
226173
+ scoped: boolean3,
226174
+ seamless: boolean3,
226175
+ selected: boolean3,
226176
+ shadowRootClonable: boolean3,
226177
+ shadowRootCustomElementRegistry: boolean3,
226178
+ shadowRootDelegatesFocus: boolean3,
226179
+ shadowRootMode: null,
226180
+ shadowRootSerializable: boolean3,
226181
+ shape: null,
226182
+ size: number2,
226183
+ sizes: null,
226184
+ slot: null,
226185
+ span: number2,
226186
+ spellCheck: booleanish2,
226187
+ src: null,
226188
+ srcDoc: null,
226189
+ srcLang: null,
226190
+ srcSet: null,
226191
+ start: number2,
226192
+ step: null,
226193
+ style: null,
226194
+ tabIndex: number2,
226195
+ target: null,
226196
+ title: null,
226197
+ translate: null,
226198
+ type: null,
226199
+ typeMustMatch: boolean3,
226200
+ useMap: null,
226201
+ value: booleanish2,
226202
+ width: number2,
226203
+ wrap: null,
226204
+ writingSuggestions: null,
226205
+ align: null,
226206
+ aLink: null,
226207
+ archive: spaceSeparated2,
226208
+ axis: null,
226209
+ background: null,
226210
+ bgColor: null,
226211
+ border: number2,
226212
+ borderColor: null,
226213
+ bottomMargin: number2,
226214
+ cellPadding: null,
226215
+ cellSpacing: null,
226216
+ char: null,
226217
+ charOff: null,
226218
+ classId: null,
226219
+ clear: null,
226220
+ code: null,
226221
+ codeBase: null,
226222
+ codeType: null,
226223
+ color: null,
226224
+ compact: boolean3,
226225
+ declare: boolean3,
226226
+ event: null,
226227
+ face: null,
226228
+ frame: null,
226229
+ frameBorder: null,
226230
+ hSpace: number2,
226231
+ leftMargin: number2,
226232
+ link: null,
226233
+ longDesc: null,
226234
+ lowSrc: null,
226235
+ marginHeight: number2,
226236
+ marginWidth: number2,
226237
+ noResize: boolean3,
226238
+ noHref: boolean3,
226239
+ noShade: boolean3,
226240
+ noWrap: boolean3,
226241
+ object: null,
226242
+ profile: null,
226243
+ prompt: null,
226244
+ rev: null,
226245
+ rightMargin: number2,
226246
+ rules: null,
226247
+ scheme: null,
226248
+ scrolling: booleanish2,
226249
+ standby: null,
226250
+ summary: null,
226251
+ text: null,
226252
+ topMargin: number2,
226253
+ valueType: null,
226254
+ version: null,
226255
+ vAlign: null,
226256
+ vLink: null,
226257
+ vSpace: number2,
226258
+ allowTransparency: null,
226259
+ autoCorrect: null,
226260
+ autoSave: null,
226261
+ credentialless: boolean3,
226262
+ disablePictureInPicture: boolean3,
226263
+ disableRemotePlayback: boolean3,
226264
+ exportParts: commaSeparated2,
226265
+ part: spaceSeparated2,
226266
+ prefix: null,
226267
+ property: null,
226268
+ results: number2,
226269
+ security: null,
226270
+ unselectable: null
226271
+ },
226272
+ space: "html",
226273
+ transform: caseInsensitiveTransform2
226274
+ });
226275
+ });
226276
+
226277
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/svg.js
226278
+ var svg5;
226279
+ var init_svg2 = __esm(() => {
226280
+ init_create2();
226281
+ init_types5();
226282
+ svg5 = create5({
226283
+ attributes: {
226284
+ accentHeight: "accent-height",
226285
+ alignmentBaseline: "alignment-baseline",
226286
+ arabicForm: "arabic-form",
226287
+ baselineShift: "baseline-shift",
226288
+ capHeight: "cap-height",
226289
+ className: "class",
226290
+ clipPath: "clip-path",
226291
+ clipRule: "clip-rule",
226292
+ colorInterpolation: "color-interpolation",
226293
+ colorInterpolationFilters: "color-interpolation-filters",
226294
+ colorProfile: "color-profile",
226295
+ colorRendering: "color-rendering",
226296
+ crossOrigin: "crossorigin",
226297
+ dataType: "datatype",
226298
+ dominantBaseline: "dominant-baseline",
226299
+ enableBackground: "enable-background",
226300
+ fillOpacity: "fill-opacity",
226301
+ fillRule: "fill-rule",
226302
+ floodColor: "flood-color",
226303
+ floodOpacity: "flood-opacity",
226304
+ fontFamily: "font-family",
226305
+ fontSize: "font-size",
226306
+ fontSizeAdjust: "font-size-adjust",
226307
+ fontStretch: "font-stretch",
226308
+ fontStyle: "font-style",
226309
+ fontVariant: "font-variant",
226310
+ fontWeight: "font-weight",
226311
+ glyphName: "glyph-name",
226312
+ glyphOrientationHorizontal: "glyph-orientation-horizontal",
226313
+ glyphOrientationVertical: "glyph-orientation-vertical",
226314
+ hrefLang: "hreflang",
226315
+ horizAdvX: "horiz-adv-x",
226316
+ horizOriginX: "horiz-origin-x",
226317
+ horizOriginY: "horiz-origin-y",
226318
+ imageRendering: "image-rendering",
226319
+ letterSpacing: "letter-spacing",
226320
+ lightingColor: "lighting-color",
226321
+ markerEnd: "marker-end",
226322
+ markerMid: "marker-mid",
226323
+ markerStart: "marker-start",
226324
+ maskType: "mask-type",
226325
+ navDown: "nav-down",
226326
+ navDownLeft: "nav-down-left",
226327
+ navDownRight: "nav-down-right",
226328
+ navLeft: "nav-left",
226329
+ navNext: "nav-next",
226330
+ navPrev: "nav-prev",
226331
+ navRight: "nav-right",
226332
+ navUp: "nav-up",
226333
+ navUpLeft: "nav-up-left",
226334
+ navUpRight: "nav-up-right",
226335
+ onAbort: "onabort",
226336
+ onActivate: "onactivate",
226337
+ onAfterPrint: "onafterprint",
226338
+ onBeforePrint: "onbeforeprint",
226339
+ onBegin: "onbegin",
226340
+ onCancel: "oncancel",
226341
+ onCanPlay: "oncanplay",
226342
+ onCanPlayThrough: "oncanplaythrough",
226343
+ onChange: "onchange",
226344
+ onClick: "onclick",
226345
+ onClose: "onclose",
226346
+ onCopy: "oncopy",
226347
+ onCueChange: "oncuechange",
226348
+ onCut: "oncut",
226349
+ onDblClick: "ondblclick",
226350
+ onDrag: "ondrag",
226351
+ onDragEnd: "ondragend",
226352
+ onDragEnter: "ondragenter",
226353
+ onDragExit: "ondragexit",
226354
+ onDragLeave: "ondragleave",
226355
+ onDragOver: "ondragover",
226356
+ onDragStart: "ondragstart",
226357
+ onDrop: "ondrop",
226358
+ onDurationChange: "ondurationchange",
226359
+ onEmptied: "onemptied",
226360
+ onEnd: "onend",
226361
+ onEnded: "onended",
226362
+ onError: "onerror",
226363
+ onFocus: "onfocus",
226364
+ onFocusIn: "onfocusin",
226365
+ onFocusOut: "onfocusout",
226366
+ onHashChange: "onhashchange",
226367
+ onInput: "oninput",
226368
+ onInvalid: "oninvalid",
226369
+ onKeyDown: "onkeydown",
226370
+ onKeyPress: "onkeypress",
226371
+ onKeyUp: "onkeyup",
226372
+ onLoad: "onload",
226373
+ onLoadedData: "onloadeddata",
226374
+ onLoadedMetadata: "onloadedmetadata",
226375
+ onLoadStart: "onloadstart",
226376
+ onMessage: "onmessage",
226377
+ onMouseDown: "onmousedown",
226378
+ onMouseEnter: "onmouseenter",
226379
+ onMouseLeave: "onmouseleave",
226380
+ onMouseMove: "onmousemove",
226381
+ onMouseOut: "onmouseout",
226382
+ onMouseOver: "onmouseover",
226383
+ onMouseUp: "onmouseup",
226384
+ onMouseWheel: "onmousewheel",
226385
+ onOffline: "onoffline",
226386
+ onOnline: "ononline",
226387
+ onPageHide: "onpagehide",
226388
+ onPageShow: "onpageshow",
226389
+ onPaste: "onpaste",
226390
+ onPause: "onpause",
226391
+ onPlay: "onplay",
226392
+ onPlaying: "onplaying",
226393
+ onPopState: "onpopstate",
226394
+ onProgress: "onprogress",
226395
+ onRateChange: "onratechange",
226396
+ onRepeat: "onrepeat",
226397
+ onReset: "onreset",
226398
+ onResize: "onresize",
226399
+ onScroll: "onscroll",
226400
+ onSeeked: "onseeked",
226401
+ onSeeking: "onseeking",
226402
+ onSelect: "onselect",
226403
+ onShow: "onshow",
226404
+ onStalled: "onstalled",
226405
+ onStorage: "onstorage",
226406
+ onSubmit: "onsubmit",
226407
+ onSuspend: "onsuspend",
226408
+ onTimeUpdate: "ontimeupdate",
226409
+ onToggle: "ontoggle",
226410
+ onUnload: "onunload",
226411
+ onVolumeChange: "onvolumechange",
226412
+ onWaiting: "onwaiting",
226413
+ onZoom: "onzoom",
226414
+ overlinePosition: "overline-position",
226415
+ overlineThickness: "overline-thickness",
226416
+ paintOrder: "paint-order",
226417
+ panose1: "panose-1",
226418
+ pointerEvents: "pointer-events",
226419
+ referrerPolicy: "referrerpolicy",
226420
+ renderingIntent: "rendering-intent",
226421
+ shapeRendering: "shape-rendering",
226422
+ stopColor: "stop-color",
226423
+ stopOpacity: "stop-opacity",
226424
+ strikethroughPosition: "strikethrough-position",
226425
+ strikethroughThickness: "strikethrough-thickness",
226426
+ strokeDashArray: "stroke-dasharray",
226427
+ strokeDashOffset: "stroke-dashoffset",
226428
+ strokeLineCap: "stroke-linecap",
226429
+ strokeLineJoin: "stroke-linejoin",
226430
+ strokeMiterLimit: "stroke-miterlimit",
226431
+ strokeOpacity: "stroke-opacity",
226432
+ strokeWidth: "stroke-width",
226433
+ tabIndex: "tabindex",
226434
+ textAnchor: "text-anchor",
226435
+ textDecoration: "text-decoration",
226436
+ textRendering: "text-rendering",
226437
+ transformOrigin: "transform-origin",
226438
+ typeOf: "typeof",
226439
+ underlinePosition: "underline-position",
226440
+ underlineThickness: "underline-thickness",
226441
+ unicodeBidi: "unicode-bidi",
226442
+ unicodeRange: "unicode-range",
226443
+ unitsPerEm: "units-per-em",
226444
+ vAlphabetic: "v-alphabetic",
226445
+ vHanging: "v-hanging",
226446
+ vIdeographic: "v-ideographic",
226447
+ vMathematical: "v-mathematical",
226448
+ vectorEffect: "vector-effect",
226449
+ vertAdvY: "vert-adv-y",
226450
+ vertOriginX: "vert-origin-x",
226451
+ vertOriginY: "vert-origin-y",
226452
+ wordSpacing: "word-spacing",
226453
+ writingMode: "writing-mode",
226454
+ xHeight: "x-height",
226455
+ playbackOrder: "playbackorder",
226456
+ timelineBegin: "timelinebegin"
226457
+ },
226458
+ properties: {
226459
+ about: commaOrSpaceSeparated2,
226460
+ accentHeight: number2,
226461
+ accumulate: null,
226462
+ additive: null,
226463
+ alignmentBaseline: null,
226464
+ alphabetic: number2,
226465
+ amplitude: number2,
226466
+ arabicForm: null,
226467
+ ascent: number2,
226468
+ attributeName: null,
226469
+ attributeType: null,
226470
+ azimuth: number2,
226471
+ bandwidth: null,
226472
+ baselineShift: null,
226473
+ baseFrequency: null,
226474
+ baseProfile: null,
226475
+ bbox: null,
226476
+ begin: null,
226477
+ bias: number2,
226478
+ by: null,
226479
+ calcMode: null,
226480
+ capHeight: number2,
226481
+ className: spaceSeparated2,
226482
+ clip: null,
226483
+ clipPath: null,
226484
+ clipPathUnits: null,
226485
+ clipRule: null,
226486
+ color: null,
226487
+ colorInterpolation: null,
226488
+ colorInterpolationFilters: null,
226489
+ colorProfile: null,
226490
+ colorRendering: null,
226491
+ content: null,
226492
+ contentScriptType: null,
226493
+ contentStyleType: null,
226494
+ crossOrigin: null,
226495
+ cursor: null,
226496
+ cx: null,
226497
+ cy: null,
226498
+ d: null,
226499
+ dataType: null,
226500
+ defaultAction: null,
226501
+ descent: number2,
226502
+ diffuseConstant: number2,
226503
+ direction: null,
226504
+ display: null,
226505
+ dur: null,
226506
+ divisor: number2,
226507
+ dominantBaseline: null,
226508
+ download: boolean3,
226509
+ dx: null,
226510
+ dy: null,
226511
+ edgeMode: null,
226512
+ editable: null,
226513
+ elevation: number2,
226514
+ enableBackground: null,
226515
+ end: null,
226516
+ event: null,
226517
+ exponent: number2,
226518
+ externalResourcesRequired: null,
226519
+ fill: null,
226520
+ fillOpacity: number2,
226521
+ fillRule: null,
226522
+ filter: null,
226523
+ filterRes: null,
226524
+ filterUnits: null,
226525
+ floodColor: null,
226526
+ floodOpacity: null,
226527
+ focusable: null,
226528
+ focusHighlight: null,
226529
+ fontFamily: null,
226530
+ fontSize: null,
226531
+ fontSizeAdjust: null,
226532
+ fontStretch: null,
226533
+ fontStyle: null,
226534
+ fontVariant: null,
226535
+ fontWeight: null,
226536
+ format: null,
226537
+ fr: null,
226538
+ from: null,
226539
+ fx: null,
226540
+ fy: null,
226541
+ g1: commaSeparated2,
226542
+ g2: commaSeparated2,
226543
+ glyphName: commaSeparated2,
226544
+ glyphOrientationHorizontal: null,
226545
+ glyphOrientationVertical: null,
226546
+ glyphRef: null,
226547
+ gradientTransform: null,
226548
+ gradientUnits: null,
226549
+ handler: null,
226550
+ hanging: number2,
226551
+ hatchContentUnits: null,
226552
+ hatchUnits: null,
226553
+ height: null,
226554
+ href: null,
226555
+ hrefLang: null,
226556
+ horizAdvX: number2,
226557
+ horizOriginX: number2,
226558
+ horizOriginY: number2,
226559
+ id: null,
226560
+ ideographic: number2,
226561
+ imageRendering: null,
226562
+ initialVisibility: null,
226563
+ in: null,
226564
+ in2: null,
226565
+ intercept: number2,
226566
+ k: number2,
226567
+ k1: number2,
226568
+ k2: number2,
226569
+ k3: number2,
226570
+ k4: number2,
226571
+ kernelMatrix: commaOrSpaceSeparated2,
226572
+ kernelUnitLength: null,
226573
+ keyPoints: null,
226574
+ keySplines: null,
226575
+ keyTimes: null,
226576
+ kerning: null,
226577
+ lang: null,
226578
+ lengthAdjust: null,
226579
+ letterSpacing: null,
226580
+ lightingColor: null,
226581
+ limitingConeAngle: number2,
226582
+ local: null,
226583
+ markerEnd: null,
226584
+ markerMid: null,
226585
+ markerStart: null,
226586
+ markerHeight: null,
226587
+ markerUnits: null,
226588
+ markerWidth: null,
226589
+ mask: null,
226590
+ maskContentUnits: null,
226591
+ maskType: null,
226592
+ maskUnits: null,
226593
+ mathematical: null,
226594
+ max: null,
226595
+ media: null,
226596
+ mediaCharacterEncoding: null,
226597
+ mediaContentEncodings: null,
226598
+ mediaSize: number2,
226599
+ mediaTime: null,
226600
+ method: null,
226601
+ min: null,
226602
+ mode: null,
226603
+ name: null,
226604
+ navDown: null,
226605
+ navDownLeft: null,
226606
+ navDownRight: null,
226607
+ navLeft: null,
226608
+ navNext: null,
226609
+ navPrev: null,
226610
+ navRight: null,
226611
+ navUp: null,
226612
+ navUpLeft: null,
226613
+ navUpRight: null,
226614
+ numOctaves: null,
226615
+ observer: null,
226616
+ offset: null,
226617
+ onAbort: null,
226618
+ onActivate: null,
226619
+ onAfterPrint: null,
226620
+ onBeforePrint: null,
226621
+ onBegin: null,
226622
+ onCancel: null,
226623
+ onCanPlay: null,
226624
+ onCanPlayThrough: null,
226625
+ onChange: null,
226626
+ onClick: null,
226627
+ onClose: null,
226628
+ onCopy: null,
226629
+ onCueChange: null,
226630
+ onCut: null,
226631
+ onDblClick: null,
226632
+ onDrag: null,
226633
+ onDragEnd: null,
226634
+ onDragEnter: null,
226635
+ onDragExit: null,
226636
+ onDragLeave: null,
226637
+ onDragOver: null,
226638
+ onDragStart: null,
226639
+ onDrop: null,
226640
+ onDurationChange: null,
226641
+ onEmptied: null,
226642
+ onEnd: null,
226643
+ onEnded: null,
226644
+ onError: null,
226645
+ onFocus: null,
226646
+ onFocusIn: null,
226647
+ onFocusOut: null,
226648
+ onHashChange: null,
226649
+ onInput: null,
226650
+ onInvalid: null,
226651
+ onKeyDown: null,
226652
+ onKeyPress: null,
226653
+ onKeyUp: null,
226654
+ onLoad: null,
226655
+ onLoadedData: null,
226656
+ onLoadedMetadata: null,
226657
+ onLoadStart: null,
226658
+ onMessage: null,
226659
+ onMouseDown: null,
226660
+ onMouseEnter: null,
226661
+ onMouseLeave: null,
226662
+ onMouseMove: null,
226663
+ onMouseOut: null,
226664
+ onMouseOver: null,
226665
+ onMouseUp: null,
226666
+ onMouseWheel: null,
226667
+ onOffline: null,
226668
+ onOnline: null,
226669
+ onPageHide: null,
226670
+ onPageShow: null,
226671
+ onPaste: null,
226672
+ onPause: null,
226673
+ onPlay: null,
226674
+ onPlaying: null,
226675
+ onPopState: null,
226676
+ onProgress: null,
226677
+ onRateChange: null,
226678
+ onRepeat: null,
226679
+ onReset: null,
226680
+ onResize: null,
226681
+ onScroll: null,
226682
+ onSeeked: null,
226683
+ onSeeking: null,
226684
+ onSelect: null,
226685
+ onShow: null,
226686
+ onStalled: null,
226687
+ onStorage: null,
226688
+ onSubmit: null,
226689
+ onSuspend: null,
226690
+ onTimeUpdate: null,
226691
+ onToggle: null,
226692
+ onUnload: null,
226693
+ onVolumeChange: null,
226694
+ onWaiting: null,
226695
+ onZoom: null,
226696
+ opacity: null,
226697
+ operator: null,
226698
+ order: null,
226699
+ orient: null,
226700
+ orientation: null,
226701
+ origin: null,
226702
+ overflow: null,
226703
+ overlay: null,
226704
+ overlinePosition: number2,
226705
+ overlineThickness: number2,
226706
+ paintOrder: null,
226707
+ panose1: null,
226708
+ path: null,
226709
+ pathLength: number2,
226710
+ patternContentUnits: null,
226711
+ patternTransform: null,
226712
+ patternUnits: null,
226713
+ phase: null,
226714
+ ping: spaceSeparated2,
226715
+ pitch: null,
226716
+ playbackOrder: null,
226717
+ pointerEvents: null,
226718
+ points: null,
226719
+ pointsAtX: number2,
226720
+ pointsAtY: number2,
226721
+ pointsAtZ: number2,
226722
+ preserveAlpha: null,
226723
+ preserveAspectRatio: null,
226724
+ primitiveUnits: null,
226725
+ propagate: null,
226726
+ property: commaOrSpaceSeparated2,
226727
+ r: null,
226728
+ radius: null,
226729
+ referrerPolicy: null,
226730
+ refX: null,
226731
+ refY: null,
226732
+ rel: commaOrSpaceSeparated2,
226733
+ rev: commaOrSpaceSeparated2,
226734
+ renderingIntent: null,
226735
+ repeatCount: null,
226736
+ repeatDur: null,
226737
+ requiredExtensions: commaOrSpaceSeparated2,
226738
+ requiredFeatures: commaOrSpaceSeparated2,
226739
+ requiredFonts: commaOrSpaceSeparated2,
226740
+ requiredFormats: commaOrSpaceSeparated2,
226741
+ resource: null,
226742
+ restart: null,
226743
+ result: null,
226744
+ rotate: null,
226745
+ rx: null,
226746
+ ry: null,
226747
+ scale: null,
226748
+ seed: null,
226749
+ shapeRendering: null,
226750
+ side: null,
226751
+ slope: null,
226752
+ snapshotTime: null,
226753
+ specularConstant: number2,
226754
+ specularExponent: number2,
226755
+ spreadMethod: null,
226756
+ spacing: null,
226757
+ startOffset: null,
226758
+ stdDeviation: null,
226759
+ stemh: null,
226760
+ stemv: null,
226761
+ stitchTiles: null,
226762
+ stopColor: null,
226763
+ stopOpacity: null,
226764
+ strikethroughPosition: number2,
226765
+ strikethroughThickness: number2,
226766
+ string: null,
226767
+ stroke: null,
226768
+ strokeDashArray: commaOrSpaceSeparated2,
226769
+ strokeDashOffset: null,
226770
+ strokeLineCap: null,
226771
+ strokeLineJoin: null,
226772
+ strokeMiterLimit: number2,
226773
+ strokeOpacity: number2,
226774
+ strokeWidth: null,
226775
+ style: null,
226776
+ surfaceScale: number2,
226777
+ syncBehavior: null,
226778
+ syncBehaviorDefault: null,
226779
+ syncMaster: null,
226780
+ syncTolerance: null,
226781
+ syncToleranceDefault: null,
226782
+ systemLanguage: commaOrSpaceSeparated2,
226783
+ tabIndex: number2,
226784
+ tableValues: null,
226785
+ target: null,
226786
+ targetX: number2,
226787
+ targetY: number2,
226788
+ textAnchor: null,
226789
+ textDecoration: null,
226790
+ textRendering: null,
226791
+ textLength: null,
226792
+ timelineBegin: null,
226793
+ title: null,
226794
+ transformBehavior: null,
226795
+ type: null,
226796
+ typeOf: commaOrSpaceSeparated2,
226797
+ to: null,
226798
+ transform: null,
226799
+ transformOrigin: null,
226800
+ u1: null,
226801
+ u2: null,
226802
+ underlinePosition: number2,
226803
+ underlineThickness: number2,
226804
+ unicode: null,
226805
+ unicodeBidi: null,
226806
+ unicodeRange: null,
226807
+ unitsPerEm: number2,
226808
+ values: null,
226809
+ vAlphabetic: number2,
226810
+ vMathematical: number2,
226811
+ vectorEffect: null,
226812
+ vHanging: number2,
226813
+ vIdeographic: number2,
226814
+ version: null,
226815
+ vertAdvY: number2,
226816
+ vertOriginX: number2,
226817
+ vertOriginY: number2,
226818
+ viewBox: null,
226819
+ viewTarget: null,
226820
+ visibility: null,
226821
+ width: null,
226822
+ widths: null,
226823
+ wordSpacing: null,
226824
+ writingMode: null,
226825
+ x: null,
226826
+ x1: null,
226827
+ x2: null,
226828
+ xChannelSelector: null,
226829
+ xHeight: number2,
226830
+ y: null,
226831
+ y1: null,
226832
+ y2: null,
226833
+ yChannelSelector: null,
226834
+ z: null,
226835
+ zoomAndPan: null
226836
+ },
226837
+ space: "svg",
226838
+ transform: caseSensitiveTransform2
226839
+ });
226840
+ });
226841
+
226842
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/xlink.js
226843
+ var xlink2;
226844
+ var init_xlink2 = __esm(() => {
226845
+ init_create2();
226846
+ xlink2 = create5({
226847
+ properties: {
226848
+ xLinkActuate: null,
226849
+ xLinkArcRole: null,
226850
+ xLinkHref: null,
226851
+ xLinkRole: null,
226852
+ xLinkShow: null,
226853
+ xLinkTitle: null,
226854
+ xLinkType: null
226855
+ },
226856
+ space: "xlink",
226857
+ transform(_, property) {
226858
+ return "xlink:" + property.slice(5).toLowerCase();
226859
+ }
226860
+ });
226861
+ });
226862
+
226863
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/xmlns.js
226864
+ var xmlns2;
226865
+ var init_xmlns2 = __esm(() => {
226866
+ init_create2();
226867
+ init_case_insensitive_transform2();
226868
+ xmlns2 = create5({
226869
+ attributes: { xmlnsxlink: "xmlns:xlink" },
226870
+ properties: { xmlnsXLink: null, xmlns: null },
226871
+ space: "xmlns",
226872
+ transform: caseInsensitiveTransform2
226873
+ });
226874
+ });
226875
+
226876
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/xml.js
226877
+ var xml3;
226878
+ var init_xml2 = __esm(() => {
226879
+ init_create2();
226880
+ xml3 = create5({
226881
+ properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
226882
+ space: "xml",
226883
+ transform(_, property) {
226884
+ return "xml:" + property.slice(3).toLowerCase();
226885
+ }
226886
+ });
226887
+ });
226888
+
226889
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/lib/find.js
226890
+ function find2(schema4, value2) {
226891
+ const normal = normalize5(value2);
226892
+ let property = value2;
226893
+ let Type2 = Info2;
226894
+ if (normal in schema4.normal) {
226895
+ return schema4.property[schema4.normal[normal]];
226896
+ }
226897
+ if (normal.length > 4 && normal.slice(0, 4) === "data" && valid2.test(value2)) {
226898
+ if (value2.charAt(4) === "-") {
226899
+ const rest = value2.slice(5).replace(dash2, camelcase3);
226900
+ property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
226901
+ } else {
226902
+ const rest = value2.slice(4);
226903
+ if (!dash2.test(rest)) {
226904
+ let dashes = rest.replace(cap2, kebab2);
226905
+ if (dashes.charAt(0) !== "-") {
226906
+ dashes = "-" + dashes;
226907
+ }
226908
+ value2 = "data" + dashes;
226909
+ }
226910
+ }
226911
+ Type2 = DefinedInfo2;
226912
+ }
226913
+ return new Type2(property, value2);
226914
+ }
226915
+ function kebab2($0) {
226916
+ return "-" + $0.toLowerCase();
226917
+ }
226918
+ function camelcase3($0) {
226919
+ return $0.charAt(1).toUpperCase();
226920
+ }
226921
+ var cap2, dash2, valid2;
226922
+ var init_find2 = __esm(() => {
226923
+ init_defined_info2();
226924
+ init_info2();
226925
+ cap2 = /[A-Z]/g;
226926
+ dash2 = /-[a-z]/g;
226927
+ valid2 = /^data[-\w.:]+$/i;
226928
+ });
226929
+
226930
+ // ../../node_modules/.bun/property-information@7.2.0/node_modules/property-information/index.js
226931
+ var html8, svg6;
226932
+ var init_property_information2 = __esm(() => {
226933
+ init_merge2();
226934
+ init_aria4();
226935
+ init_html4();
226936
+ init_svg2();
226937
+ init_xlink2();
226938
+ init_xmlns2();
226939
+ init_xml2();
226940
+ init_find2();
226941
+ html8 = merge3([aria2, html7, xlink2, xmlns2, xml3], "html");
226942
+ svg6 = merge3([aria2, svg5, xlink2, xmlns2, xml3], "svg");
226943
+ });
226944
+
226945
+ // ../parser/src/html-to-jx.ts
225738
226946
  function htmlToJx(htmlString) {
225739
226947
  const hast = fromHtml(htmlString, { fragment: true });
225740
226948
  return convertHastChildren(hast.children);
@@ -225779,7 +226987,7 @@ function hastPropsToJx(properties) {
225779
226987
  for (const [key, value2] of Object.entries(properties)) {
225780
226988
  if (value2 === false || value2 === undefined || value2 === null)
225781
226989
  continue;
225782
- const info = find(html6, key);
226990
+ const info = find2(html8, key);
225783
226991
  const name = info.attribute;
225784
226992
  if (name === "style" && typeof value2 === "string") {
225785
226993
  parseInlineStyle(value2, style2);
@@ -225809,10 +227017,10 @@ function parseInlineStyle(styleStr, out) {
225809
227017
  var init_html_to_jx = __esm(() => {
225810
227018
  init_hast_util_from_html();
225811
227019
  init_hast_util_whitespace();
225812
- init_property_information();
227020
+ init_property_information2();
225813
227021
  });
225814
227022
 
225815
- // ../parser/src/transpile.js
227023
+ // ../parser/src/transpile.ts
225816
227024
  var exports_transpile = {};
225817
227025
  __export(exports_transpile, {
225818
227026
  transpileJxMarkdown: () => transpileJxMarkdown,
@@ -225971,7 +227179,7 @@ function mdastNodeToJx(node2) {
225971
227179
  break;
225972
227180
  }
225973
227181
  case "inlineCode":
225974
- el.textContent = node2.value;
227182
+ el.textContent = node2.value ?? null;
225975
227183
  break;
225976
227184
  case "link":
225977
227185
  el.attributes = { href: node2.url };
@@ -226003,7 +227211,7 @@ function mdastNodeToJx(node2) {
226003
227211
  el.children = [
226004
227212
  {
226005
227213
  tagName: "code",
226006
- textContent: node2.value,
227214
+ textContent: node2.value ?? null,
226007
227215
  ...node2.lang ? { className: `language-${node2.lang}` } : {}
226008
227216
  }
226009
227217
  ];
@@ -230825,15 +232033,15 @@ function getClientRects(element3) {
230825
232033
  return Array.from(element3.getClientRects());
230826
232034
  }
230827
232035
  function getDocumentRect(element3) {
230828
- const html7 = getDocumentElement(element3);
232036
+ const html9 = getDocumentElement(element3);
230829
232037
  const scroll = getNodeScroll(element3);
230830
232038
  const body = element3.ownerDocument.body;
230831
- const width2 = max(html7.scrollWidth, html7.clientWidth, body.scrollWidth, body.clientWidth);
230832
- const height = max(html7.scrollHeight, html7.clientHeight, body.scrollHeight, body.clientHeight);
232039
+ const width2 = max(html9.scrollWidth, html9.clientWidth, body.scrollWidth, body.clientWidth);
232040
+ const height = max(html9.scrollHeight, html9.clientHeight, body.scrollHeight, body.clientHeight);
230833
232041
  let x = -scroll.scrollLeft + getWindowScrollBarX(element3);
230834
232042
  const y = -scroll.scrollTop;
230835
232043
  if (getComputedStyle3(body).direction === "rtl") {
230836
- x += max(html7.clientWidth, body.clientWidth) - width2;
232044
+ x += max(html9.clientWidth, body.clientWidth) - width2;
230837
232045
  }
230838
232046
  return {
230839
232047
  width: width2,
@@ -230844,10 +232052,10 @@ function getDocumentRect(element3) {
230844
232052
  }
230845
232053
  function getViewportRect(element3, strategy) {
230846
232054
  const win = getWindow2(element3);
230847
- const html7 = getDocumentElement(element3);
232055
+ const html9 = getDocumentElement(element3);
230848
232056
  const visualViewport = win.visualViewport;
230849
- let width2 = html7.clientWidth;
230850
- let height = html7.clientHeight;
232057
+ let width2 = html9.clientWidth;
232058
+ let height = html9.clientHeight;
230851
232059
  let x = 0;
230852
232060
  let y = 0;
230853
232061
  if (visualViewport) {
@@ -230859,13 +232067,13 @@ function getViewportRect(element3, strategy) {
230859
232067
  y = visualViewport.offsetTop;
230860
232068
  }
230861
232069
  }
230862
- const windowScrollbarX = getWindowScrollBarX(html7);
232070
+ const windowScrollbarX = getWindowScrollBarX(html9);
230863
232071
  if (windowScrollbarX <= 0) {
230864
- const doc = html7.ownerDocument;
232072
+ const doc = html9.ownerDocument;
230865
232073
  const body = doc.body;
230866
232074
  const bodyStyles = getComputedStyle(body);
230867
232075
  const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
230868
- const clippingStableScrollbarWidth = Math.abs(html7.clientWidth - body.clientWidth - bodyMarginInline);
232076
+ const clippingStableScrollbarWidth = Math.abs(html9.clientWidth - body.clientWidth - bodyMarginInline);
230869
232077
  if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
230870
232078
  width2 -= clippingStableScrollbarWidth;
230871
232079
  }
@@ -235000,7 +236208,7 @@ if (monacoEnvironment2?.globalAPI) {
235000
236208
  // ../../node_modules/.bun/monaco-editor@0.55.1/node_modules/monaco-editor/esm/vs/editor/editor.api.js
235001
236209
  init_editor_api2();
235002
236210
 
235003
- // src/services/monaco-setup.js
236211
+ // src/services/monaco-setup.ts
235004
236212
  init_monaco_contribution();
235005
236213
 
235006
236214
  // ../../node_modules/.bun/monaco-editor@0.55.1/node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js
@@ -235776,6 +236984,9 @@ var schema_default = {
235776
236984
  }
235777
236985
  }
235778
236986
  ]
236987
+ },
236988
+ description: {
236989
+ type: "string"
235779
236990
  }
235780
236991
  }
235781
236992
  },
@@ -236059,6 +237270,339 @@ var schema_default = {
236059
237270
  }
236060
237271
  }
236061
237272
  },
237273
+ ExpressionPointer: {
237274
+ description: "A JSON Pointer $ref operand within an expression node.",
237275
+ type: "object",
237276
+ properties: {
237277
+ $ref: {
237278
+ type: "string",
237279
+ pattern: "^(\\$map/|\\$reduce/|event#/|#/|parent#/|window#/|document#/)"
237280
+ }
237281
+ },
237282
+ required: [
237283
+ "$ref"
237284
+ ],
237285
+ additionalProperties: false
237286
+ },
237287
+ ExpressionLiteral: {
237288
+ description: "A non-reactive operand: scalar or array of operands.",
237289
+ anyOf: [
237290
+ {
237291
+ type: "string",
237292
+ not: {
237293
+ pattern: "\\$\\{"
237294
+ }
237295
+ },
237296
+ {
237297
+ type: "number"
237298
+ },
237299
+ {
237300
+ type: "boolean"
237301
+ },
237302
+ {
237303
+ type: "null"
237304
+ },
237305
+ {
237306
+ type: "array",
237307
+ items: {
237308
+ $ref: "#/$defs/ExpressionOperand"
237309
+ }
237310
+ }
237311
+ ]
237312
+ },
237313
+ ExpressionOperand: {
237314
+ description: "Anything that may appear in target or value: a pointer, a literal, or a nested expression node.",
237315
+ anyOf: [
237316
+ {
237317
+ $ref: "#/$defs/ExpressionPointer"
237318
+ },
237319
+ {
237320
+ $ref: "#/$defs/ExpressionNode"
237321
+ },
237322
+ {
237323
+ $ref: "#/$defs/ExpressionLiteral"
237324
+ }
237325
+ ]
237326
+ },
237327
+ UnaryOperator: {
237328
+ enum: [
237329
+ "!",
237330
+ "-"
237331
+ ]
237332
+ },
237333
+ BinaryOperator: {
237334
+ enum: [
237335
+ "+",
237336
+ "-",
237337
+ "*",
237338
+ "/",
237339
+ "%",
237340
+ "===",
237341
+ "!==",
237342
+ "<",
237343
+ "<=",
237344
+ ">",
237345
+ ">=",
237346
+ "&&",
237347
+ "||"
237348
+ ]
237349
+ },
237350
+ AssignmentOperator: {
237351
+ enum: [
237352
+ "=",
237353
+ "+=",
237354
+ "-=",
237355
+ "*=",
237356
+ "/="
237357
+ ]
237358
+ },
237359
+ NoArgMethod: {
237360
+ enum: [
237361
+ "pop",
237362
+ "shift"
237363
+ ]
237364
+ },
237365
+ OneArgMethod: {
237366
+ enum: [
237367
+ "push",
237368
+ "unshift"
237369
+ ]
237370
+ },
237371
+ SpliceMethod: {
237372
+ const: "splice"
237373
+ },
237374
+ ReduceMethod: {
237375
+ const: "reduce"
237376
+ },
237377
+ MapFilterMethod: {
237378
+ enum: [
237379
+ "map",
237380
+ "filter"
237381
+ ]
237382
+ },
237383
+ ExpressionNode: {
237384
+ description: "The core expression node. operator + target, with value gated by arity.",
237385
+ type: "object",
237386
+ required: [
237387
+ "operator",
237388
+ "target"
237389
+ ],
237390
+ additionalProperties: false,
237391
+ properties: {
237392
+ operator: {
237393
+ type: "string"
237394
+ },
237395
+ target: {
237396
+ $ref: "#/$defs/ExpressionOperand"
237397
+ },
237398
+ value: {
237399
+ $ref: "#/$defs/ExpressionOperand"
237400
+ },
237401
+ initial: {
237402
+ $ref: "#/$defs/ExpressionOperand"
237403
+ }
237404
+ },
237405
+ oneOf: [
237406
+ {
237407
+ title: "Unary — target only, no value",
237408
+ properties: {
237409
+ operator: {
237410
+ $ref: "#/$defs/UnaryOperator"
237411
+ }
237412
+ },
237413
+ required: [
237414
+ "operator"
237415
+ ],
237416
+ not: {
237417
+ anyOf: [
237418
+ {
237419
+ required: [
237420
+ "value"
237421
+ ]
237422
+ },
237423
+ {
237424
+ required: [
237425
+ "initial"
237426
+ ]
237427
+ }
237428
+ ]
237429
+ }
237430
+ },
237431
+ {
237432
+ title: "Binary — left in target, right in value",
237433
+ properties: {
237434
+ operator: {
237435
+ $ref: "#/$defs/BinaryOperator"
237436
+ }
237437
+ },
237438
+ required: [
237439
+ "operator",
237440
+ "value"
237441
+ ],
237442
+ not: {
237443
+ required: [
237444
+ "initial"
237445
+ ]
237446
+ }
237447
+ },
237448
+ {
237449
+ title: "Assignment — writable target, value required",
237450
+ properties: {
237451
+ operator: {
237452
+ $ref: "#/$defs/AssignmentOperator"
237453
+ },
237454
+ target: {
237455
+ $ref: "#/$defs/ExpressionPointer"
237456
+ }
237457
+ },
237458
+ required: [
237459
+ "operator",
237460
+ "value"
237461
+ ],
237462
+ not: {
237463
+ required: [
237464
+ "initial"
237465
+ ]
237466
+ }
237467
+ },
237468
+ {
237469
+ title: "pop / shift — array receiver, no value",
237470
+ properties: {
237471
+ operator: {
237472
+ $ref: "#/$defs/NoArgMethod"
237473
+ },
237474
+ target: {
237475
+ $ref: "#/$defs/ExpressionPointer"
237476
+ }
237477
+ },
237478
+ required: [
237479
+ "operator"
237480
+ ],
237481
+ not: {
237482
+ anyOf: [
237483
+ {
237484
+ required: [
237485
+ "value"
237486
+ ]
237487
+ },
237488
+ {
237489
+ required: [
237490
+ "initial"
237491
+ ]
237492
+ }
237493
+ ]
237494
+ }
237495
+ },
237496
+ {
237497
+ title: "push / unshift — array receiver, single value argument",
237498
+ properties: {
237499
+ operator: {
237500
+ $ref: "#/$defs/OneArgMethod"
237501
+ },
237502
+ target: {
237503
+ $ref: "#/$defs/ExpressionPointer"
237504
+ }
237505
+ },
237506
+ required: [
237507
+ "operator",
237508
+ "value"
237509
+ ],
237510
+ not: {
237511
+ required: [
237512
+ "initial"
237513
+ ]
237514
+ }
237515
+ },
237516
+ {
237517
+ title: "splice — array receiver, [start, deleteCount, ...items]",
237518
+ properties: {
237519
+ operator: {
237520
+ $ref: "#/$defs/SpliceMethod"
237521
+ },
237522
+ target: {
237523
+ $ref: "#/$defs/ExpressionPointer"
237524
+ },
237525
+ value: {
237526
+ type: "array",
237527
+ items: {
237528
+ $ref: "#/$defs/ExpressionOperand"
237529
+ },
237530
+ minItems: 1
237531
+ }
237532
+ },
237533
+ required: [
237534
+ "operator",
237535
+ "value"
237536
+ ],
237537
+ not: {
237538
+ required: [
237539
+ "initial"
237540
+ ]
237541
+ }
237542
+ },
237543
+ {
237544
+ title: "reduce — pure fold; per-item expression in value, seed in initial",
237545
+ properties: {
237546
+ operator: {
237547
+ $ref: "#/$defs/ReduceMethod"
237548
+ },
237549
+ target: {
237550
+ $ref: "#/$defs/ExpressionPointer"
237551
+ },
237552
+ value: {
237553
+ $ref: "#/$defs/ExpressionNode"
237554
+ }
237555
+ },
237556
+ required: [
237557
+ "operator",
237558
+ "value",
237559
+ "initial"
237560
+ ]
237561
+ },
237562
+ {
237563
+ title: "map / filter — pure; per-item expression in value, no initial",
237564
+ properties: {
237565
+ operator: {
237566
+ $ref: "#/$defs/MapFilterMethod"
237567
+ },
237568
+ target: {
237569
+ $ref: "#/$defs/ExpressionPointer"
237570
+ },
237571
+ value: {
237572
+ $ref: "#/$defs/ExpressionNode"
237573
+ }
237574
+ },
237575
+ required: [
237576
+ "operator",
237577
+ "value"
237578
+ ],
237579
+ not: {
237580
+ required: [
237581
+ "initial"
237582
+ ]
237583
+ }
237584
+ }
237585
+ ]
237586
+ },
237587
+ ExpressionEntry: {
237588
+ description: "A declarative expression entry (Shape 5). Used as a state entry or inline event handler.",
237589
+ type: "object",
237590
+ required: [
237591
+ "$expression"
237592
+ ],
237593
+ properties: {
237594
+ $expression: {
237595
+ $ref: "#/$defs/ExpressionNode"
237596
+ },
237597
+ $title: {
237598
+ type: "string"
237599
+ },
237600
+ $description: {
237601
+ type: "string"
237602
+ }
237603
+ },
237604
+ additionalProperties: false
237605
+ },
236062
237606
  ElementDef: {
236063
237607
  description: "A Jx element definition. Maps directly to a DOM element.",
236064
237608
  type: "object",
@@ -255995,339 +257539,6 @@ var schema_default = {
255995
257539
  "$map/item/done"
255996
257540
  ]
255997
257541
  },
255998
- ExpressionPointer: {
255999
- description: "A JSON Pointer $ref operand within an expression node.",
256000
- type: "object",
256001
- properties: {
256002
- $ref: {
256003
- type: "string",
256004
- pattern: "^(\\$map/|\\$reduce/|event#/|#/|parent#/|window#/|document#/)"
256005
- }
256006
- },
256007
- required: [
256008
- "$ref"
256009
- ],
256010
- additionalProperties: false
256011
- },
256012
- ExpressionLiteral: {
256013
- description: "A non-reactive operand: scalar or array of operands.",
256014
- anyOf: [
256015
- {
256016
- type: "string",
256017
- not: {
256018
- pattern: "\\$\\{"
256019
- }
256020
- },
256021
- {
256022
- type: "number"
256023
- },
256024
- {
256025
- type: "boolean"
256026
- },
256027
- {
256028
- type: "null"
256029
- },
256030
- {
256031
- type: "array",
256032
- items: {
256033
- $ref: "#/$defs/ExpressionOperand"
256034
- }
256035
- }
256036
- ]
256037
- },
256038
- ExpressionOperand: {
256039
- description: "Anything that may appear in target or value: a pointer, a literal, or a nested expression node.",
256040
- anyOf: [
256041
- {
256042
- $ref: "#/$defs/ExpressionPointer"
256043
- },
256044
- {
256045
- $ref: "#/$defs/ExpressionNode"
256046
- },
256047
- {
256048
- $ref: "#/$defs/ExpressionLiteral"
256049
- }
256050
- ]
256051
- },
256052
- UnaryOperator: {
256053
- enum: [
256054
- "!",
256055
- "-"
256056
- ]
256057
- },
256058
- BinaryOperator: {
256059
- enum: [
256060
- "+",
256061
- "-",
256062
- "*",
256063
- "/",
256064
- "%",
256065
- "===",
256066
- "!==",
256067
- "<",
256068
- "<=",
256069
- ">",
256070
- ">=",
256071
- "&&",
256072
- "||"
256073
- ]
256074
- },
256075
- AssignmentOperator: {
256076
- enum: [
256077
- "=",
256078
- "+=",
256079
- "-=",
256080
- "*=",
256081
- "/="
256082
- ]
256083
- },
256084
- NoArgMethod: {
256085
- enum: [
256086
- "pop",
256087
- "shift"
256088
- ]
256089
- },
256090
- OneArgMethod: {
256091
- enum: [
256092
- "push",
256093
- "unshift"
256094
- ]
256095
- },
256096
- SpliceMethod: {
256097
- const: "splice"
256098
- },
256099
- ReduceMethod: {
256100
- const: "reduce"
256101
- },
256102
- MapFilterMethod: {
256103
- enum: [
256104
- "map",
256105
- "filter"
256106
- ]
256107
- },
256108
- ExpressionNode: {
256109
- description: "The core expression node. operator + target, with value gated by arity.",
256110
- type: "object",
256111
- required: [
256112
- "operator",
256113
- "target"
256114
- ],
256115
- additionalProperties: false,
256116
- properties: {
256117
- operator: {
256118
- type: "string"
256119
- },
256120
- target: {
256121
- $ref: "#/$defs/ExpressionOperand"
256122
- },
256123
- value: {
256124
- $ref: "#/$defs/ExpressionOperand"
256125
- },
256126
- initial: {
256127
- $ref: "#/$defs/ExpressionOperand"
256128
- }
256129
- },
256130
- oneOf: [
256131
- {
256132
- title: "Unary — target only, no value",
256133
- properties: {
256134
- operator: {
256135
- $ref: "#/$defs/UnaryOperator"
256136
- }
256137
- },
256138
- required: [
256139
- "operator"
256140
- ],
256141
- not: {
256142
- anyOf: [
256143
- {
256144
- required: [
256145
- "value"
256146
- ]
256147
- },
256148
- {
256149
- required: [
256150
- "initial"
256151
- ]
256152
- }
256153
- ]
256154
- }
256155
- },
256156
- {
256157
- title: "Binary — left in target, right in value",
256158
- properties: {
256159
- operator: {
256160
- $ref: "#/$defs/BinaryOperator"
256161
- }
256162
- },
256163
- required: [
256164
- "operator",
256165
- "value"
256166
- ],
256167
- not: {
256168
- required: [
256169
- "initial"
256170
- ]
256171
- }
256172
- },
256173
- {
256174
- title: "Assignment — writable target, value required",
256175
- properties: {
256176
- operator: {
256177
- $ref: "#/$defs/AssignmentOperator"
256178
- },
256179
- target: {
256180
- $ref: "#/$defs/ExpressionPointer"
256181
- }
256182
- },
256183
- required: [
256184
- "operator",
256185
- "value"
256186
- ],
256187
- not: {
256188
- required: [
256189
- "initial"
256190
- ]
256191
- }
256192
- },
256193
- {
256194
- title: "pop / shift — array receiver, no value",
256195
- properties: {
256196
- operator: {
256197
- $ref: "#/$defs/NoArgMethod"
256198
- },
256199
- target: {
256200
- $ref: "#/$defs/ExpressionPointer"
256201
- }
256202
- },
256203
- required: [
256204
- "operator"
256205
- ],
256206
- not: {
256207
- anyOf: [
256208
- {
256209
- required: [
256210
- "value"
256211
- ]
256212
- },
256213
- {
256214
- required: [
256215
- "initial"
256216
- ]
256217
- }
256218
- ]
256219
- }
256220
- },
256221
- {
256222
- title: "push / unshift — array receiver, single value argument",
256223
- properties: {
256224
- operator: {
256225
- $ref: "#/$defs/OneArgMethod"
256226
- },
256227
- target: {
256228
- $ref: "#/$defs/ExpressionPointer"
256229
- }
256230
- },
256231
- required: [
256232
- "operator",
256233
- "value"
256234
- ],
256235
- not: {
256236
- required: [
256237
- "initial"
256238
- ]
256239
- }
256240
- },
256241
- {
256242
- title: "splice — array receiver, [start, deleteCount, ...items]",
256243
- properties: {
256244
- operator: {
256245
- $ref: "#/$defs/SpliceMethod"
256246
- },
256247
- target: {
256248
- $ref: "#/$defs/ExpressionPointer"
256249
- },
256250
- value: {
256251
- type: "array",
256252
- items: {
256253
- $ref: "#/$defs/ExpressionOperand"
256254
- },
256255
- minItems: 1
256256
- }
256257
- },
256258
- required: [
256259
- "operator",
256260
- "value"
256261
- ],
256262
- not: {
256263
- required: [
256264
- "initial"
256265
- ]
256266
- }
256267
- },
256268
- {
256269
- title: "reduce — pure fold; per-item expression in value, seed in initial",
256270
- properties: {
256271
- operator: {
256272
- $ref: "#/$defs/ReduceMethod"
256273
- },
256274
- target: {
256275
- $ref: "#/$defs/ExpressionPointer"
256276
- },
256277
- value: {
256278
- $ref: "#/$defs/ExpressionNode"
256279
- }
256280
- },
256281
- required: [
256282
- "operator",
256283
- "value",
256284
- "initial"
256285
- ]
256286
- },
256287
- {
256288
- title: "map / filter — pure; per-item expression in value, no initial",
256289
- properties: {
256290
- operator: {
256291
- $ref: "#/$defs/MapFilterMethod"
256292
- },
256293
- target: {
256294
- $ref: "#/$defs/ExpressionPointer"
256295
- },
256296
- value: {
256297
- $ref: "#/$defs/ExpressionNode"
256298
- }
256299
- },
256300
- required: [
256301
- "operator",
256302
- "value"
256303
- ],
256304
- not: {
256305
- required: [
256306
- "initial"
256307
- ]
256308
- }
256309
- }
256310
- ]
256311
- },
256312
- ExpressionEntry: {
256313
- description: "A declarative expression entry (Shape 5). Used as a state entry or inline event handler.",
256314
- type: "object",
256315
- required: [
256316
- "$expression"
256317
- ],
256318
- properties: {
256319
- $expression: {
256320
- $ref: "#/$defs/ExpressionNode"
256321
- },
256322
- $title: {
256323
- type: "string"
256324
- },
256325
- $description: {
256326
- type: "string"
256327
- }
256328
- },
256329
- additionalProperties: false
256330
- },
256331
257542
  ElementPropertyValue: {
256332
257543
  oneOf: [
256333
257544
  {
@@ -256664,6 +257875,134 @@ var schema_default = {
256664
257875
  "object",
256665
257876
  "null"
256666
257877
  ]
257878
+ },
257879
+ HeadEntry: {
257880
+ description: "A page-level <head> entry. Defines meta tags, link tags, script tags, etc.",
257881
+ type: "object",
257882
+ required: [
257883
+ "tagName"
257884
+ ],
257885
+ properties: {
257886
+ tagName: {
257887
+ type: "string"
257888
+ },
257889
+ attributes: {
257890
+ type: "object",
257891
+ additionalProperties: {
257892
+ oneOf: [
257893
+ {
257894
+ type: "string"
257895
+ },
257896
+ {
257897
+ type: "boolean"
257898
+ }
257899
+ ]
257900
+ }
257901
+ },
257902
+ textContent: {
257903
+ type: "string"
257904
+ },
257905
+ children: {
257906
+ type: "array",
257907
+ items: {
257908
+ $ref: "#/$defs/HeadEntry"
257909
+ }
257910
+ }
257911
+ },
257912
+ additionalProperties: true
257913
+ },
257914
+ ImageConfig: {
257915
+ description: "Image optimization configuration for the project.",
257916
+ type: "object",
257917
+ properties: {
257918
+ optimize: {
257919
+ type: "boolean"
257920
+ },
257921
+ widths: {
257922
+ type: "array",
257923
+ items: {
257924
+ type: "number"
257925
+ }
257926
+ },
257927
+ formats: {
257928
+ type: "array",
257929
+ items: {
257930
+ type: "string"
257931
+ }
257932
+ },
257933
+ quality: {
257934
+ type: "object",
257935
+ properties: {
257936
+ webp: {
257937
+ type: "number"
257938
+ },
257939
+ avif: {
257940
+ type: "number"
257941
+ },
257942
+ jpeg: {
257943
+ type: "number"
257944
+ },
257945
+ png: {
257946
+ type: "number"
257947
+ }
257948
+ }
257949
+ },
257950
+ sizes: {
257951
+ type: "string"
257952
+ },
257953
+ lazyLoad: {
257954
+ type: "boolean"
257955
+ }
257956
+ }
257957
+ },
257958
+ ContentTypeDef: {
257959
+ description: "Content type definition. Defines the source directory, frontmatter schema, and element dependencies.",
257960
+ type: "object",
257961
+ properties: {
257962
+ source: {
257963
+ description: "Path to the content directory relative to the project root.",
257964
+ type: "string",
257965
+ examples: [
257966
+ "./content/blog/",
257967
+ "./content/docs/"
257968
+ ]
257969
+ },
257970
+ format: {
257971
+ type: "string",
257972
+ enum: [
257973
+ "md",
257974
+ "json",
257975
+ "csv",
257976
+ "yaml"
257977
+ ]
257978
+ },
257979
+ schema: {
257980
+ description: "JSON Schema for validating frontmatter of content type entries.",
257981
+ type: "object"
257982
+ },
257983
+ $elements: {
257984
+ description: "Custom elements available in markdown directives for this content type.",
257985
+ type: "array",
257986
+ items: {
257987
+ oneOf: [
257988
+ {
257989
+ type: "object",
257990
+ required: [
257991
+ "$ref"
257992
+ ],
257993
+ properties: {
257994
+ $ref: {
257995
+ type: "string"
257996
+ }
257997
+ }
257998
+ },
257999
+ {
258000
+ type: "string"
258001
+ }
258002
+ ]
258003
+ }
258004
+ }
258005
+ }
256667
258006
  }
256668
258007
  }
256669
258008
  };
@@ -256830,47 +258169,15 @@ var project_schema_default = {
256830
258169
  description: "Site-wide reactive state available to all pages.",
256831
258170
  type: "object"
256832
258171
  },
258172
+ $defs: {
258173
+ description: "Global type definitions available to all pages.",
258174
+ type: "object"
258175
+ },
256833
258176
  contentTypes: {
256834
258177
  description: "Content type definitions. Each key is a content type name; the value defines the source directory, frontmatter schema, and element dependencies.",
256835
258178
  type: "object",
256836
258179
  additionalProperties: {
256837
- type: "object",
256838
- properties: {
256839
- source: {
256840
- description: "Path to the content directory relative to the project root.",
256841
- type: "string",
256842
- examples: [
256843
- "./content/blog/",
256844
- "./content/docs/"
256845
- ]
256846
- },
256847
- schema: {
256848
- description: "JSON Schema for validating frontmatter of content type entries.",
256849
- type: "object"
256850
- },
256851
- $elements: {
256852
- description: "Custom elements available in markdown directives for this content type.",
256853
- type: "array",
256854
- items: {
256855
- oneOf: [
256856
- {
256857
- type: "object",
256858
- required: [
256859
- "$ref"
256860
- ],
256861
- properties: {
256862
- $ref: {
256863
- type: "string"
256864
- }
256865
- }
256866
- },
256867
- {
256868
- type: "string"
256869
- }
256870
- ]
256871
- }
256872
- }
256873
- }
258180
+ $ref: "#/$defs/ContentTypeDef"
256874
258181
  }
256875
258182
  },
256876
258183
  redirects: {
@@ -256931,6 +258238,9 @@ var project_schema_default = {
256931
258238
  }
256932
258239
  }
256933
258240
  },
258241
+ images: {
258242
+ $ref: "#/$defs/ImageConfig"
258243
+ },
256934
258244
  i18n: {
256935
258245
  description: "Internationalization configuration.",
256936
258246
  type: "object",
@@ -256967,10 +258277,105 @@ var project_schema_default = {
256967
258277
  }
256968
258278
  }
256969
258279
  },
256970
- additionalProperties: false
258280
+ additionalProperties: false,
258281
+ $defs: {
258282
+ ImageConfig: {
258283
+ description: "Image optimization configuration for the project.",
258284
+ type: "object",
258285
+ properties: {
258286
+ optimize: {
258287
+ type: "boolean"
258288
+ },
258289
+ widths: {
258290
+ type: "array",
258291
+ items: {
258292
+ type: "number"
258293
+ }
258294
+ },
258295
+ formats: {
258296
+ type: "array",
258297
+ items: {
258298
+ type: "string"
258299
+ }
258300
+ },
258301
+ quality: {
258302
+ type: "object",
258303
+ properties: {
258304
+ webp: {
258305
+ type: "number"
258306
+ },
258307
+ avif: {
258308
+ type: "number"
258309
+ },
258310
+ jpeg: {
258311
+ type: "number"
258312
+ },
258313
+ png: {
258314
+ type: "number"
258315
+ }
258316
+ }
258317
+ },
258318
+ sizes: {
258319
+ type: "string"
258320
+ },
258321
+ lazyLoad: {
258322
+ type: "boolean"
258323
+ }
258324
+ }
258325
+ },
258326
+ ContentTypeDef: {
258327
+ description: "Content type definition. Defines the source directory, frontmatter schema, and element dependencies.",
258328
+ type: "object",
258329
+ properties: {
258330
+ source: {
258331
+ description: "Path to the content directory relative to the project root.",
258332
+ type: "string",
258333
+ examples: [
258334
+ "./content/blog/",
258335
+ "./content/docs/"
258336
+ ]
258337
+ },
258338
+ format: {
258339
+ type: "string",
258340
+ enum: [
258341
+ "md",
258342
+ "json",
258343
+ "csv",
258344
+ "yaml"
258345
+ ]
258346
+ },
258347
+ schema: {
258348
+ description: "JSON Schema for validating frontmatter of content type entries.",
258349
+ type: "object"
258350
+ },
258351
+ $elements: {
258352
+ description: "Custom elements available in markdown directives for this content type.",
258353
+ type: "array",
258354
+ items: {
258355
+ oneOf: [
258356
+ {
258357
+ type: "object",
258358
+ required: [
258359
+ "$ref"
258360
+ ],
258361
+ properties: {
258362
+ $ref: {
258363
+ type: "string"
258364
+ }
258365
+ }
258366
+ },
258367
+ {
258368
+ type: "string"
258369
+ }
258370
+ ]
258371
+ }
258372
+ }
258373
+ }
258374
+ }
258375
+ }
256971
258376
  };
256972
258377
 
256973
- // src/services/monaco-setup.js
258378
+ // src/services/monaco-setup.ts
256974
258379
  var WORKER_PATHS = {
256975
258380
  json: "/monaco-editor/esm/vs/language/json/json.worker.js",
256976
258381
  typescript: "/monaco-editor/esm/vs/language/typescript/ts.worker.js",
@@ -257009,11 +258414,11 @@ jsonDefaults.setDiagnosticsOptions({
257009
258414
  ]
257010
258415
  });
257011
258416
 
257012
- // src/studio.js
258417
+ // src/studio.ts
257013
258418
  init_store();
257014
258419
  init_workspace2();
257015
258420
 
257016
- // src/tabs/transact.js
258421
+ // src/tabs/transact.ts
257017
258422
  init_reactivity();
257018
258423
  var HISTORY_LIMIT = 100;
257019
258424
  function transactDoc(tab, mutationFn, { skipHistory = false } = {}) {
@@ -257357,10 +258762,10 @@ function mutateUpdateFrontmatter(tab, field, value) {
257357
258762
  tab.doc.dirty = true;
257358
258763
  }
257359
258764
 
257360
- // src/studio.js
258765
+ // src/studio.ts
257361
258766
  init_reactivity();
257362
258767
 
257363
- // src/view.js
258768
+ // src/view.ts
257364
258769
  var view = {
257365
258770
  panzoomWrap: null,
257366
258771
  renderGeneration: 0,
@@ -257659,7 +259064,7 @@ var elements_meta_default = {
257659
259064
  }
257660
259065
  };
257661
259066
 
257662
- // src/editor/inline-format.js
259067
+ // src/editor/inline-format.ts
257663
259068
  var FORMAT_TAGS = new Set([
257664
259069
  "strong",
257665
259070
  "em",
@@ -258012,11 +259417,11 @@ function findTemplateExpressions(text2) {
258012
259417
  return results;
258013
259418
  }
258014
259419
 
258015
- // src/editor/slash-menu.js
259420
+ // src/editor/slash-menu.ts
258016
259421
  init_lit_html();
258017
259422
  init_ref();
258018
259423
 
258019
- // src/ui/layers.js
259424
+ // src/ui/layers.ts
258020
259425
  init_lit_html();
258021
259426
  var _popoverLayer;
258022
259427
  var _modalLayer;
@@ -258126,7 +259531,7 @@ function getLayerSlot(layer, id) {
258126
259531
  return slot;
258127
259532
  }
258128
259533
 
258129
- // src/editor/slash-menu.js
259534
+ // src/editor/slash-menu.ts
258130
259535
  var SLASH_COMMANDS = [
258131
259536
  { label: "Heading 1", tag: "h1", description: "Large heading" },
258132
259537
  { label: "Heading 2", tag: "h2", description: "Medium heading" },
@@ -258297,7 +259702,7 @@ function onKeydown(e) {
258297
259702
  }
258298
259703
  }
258299
259704
 
258300
- // src/editor/inline-edit.js
259705
+ // src/editor/inline-edit.ts
258301
259706
  var INLINE_TAGS = new Set([
258302
259707
  "em",
258303
259708
  "strong",
@@ -258711,11 +260116,11 @@ function handleSlashSelect(cmd) {
258711
260116
  insert(path, cmd, commitResult);
258712
260117
  }
258713
260118
 
258714
- // src/editor/component-inline-edit.js
260119
+ // src/editor/component-inline-edit.ts
258715
260120
  init_store();
258716
260121
  init_workspace2();
258717
260122
 
258718
- // src/panels/block-action-bar.js
260123
+ // src/panels/block-action-bar.ts
258719
260124
  init_lit_html();
258720
260125
  init_style_map();
258721
260126
  init_ref();
@@ -260279,12 +261684,12 @@ function draggable(args) {
260279
261684
  }));
260280
261685
  return once(cleanup);
260281
261686
  }
260282
- // src/panels/block-action-bar.js
261687
+ // src/panels/block-action-bar.ts
260283
261688
  init_store();
260284
261689
  init_workspace2();
260285
261690
  init_components();
260286
261691
 
260287
- // src/editor/convert-to-component.js
261692
+ // src/editor/convert-to-component.ts
260288
261693
  init_lit_html();
260289
261694
  init_ref();
260290
261695
  init_store();
@@ -260292,7 +261697,7 @@ init_workspace2();
260292
261697
  init_components();
260293
261698
  init_platform3();
260294
261699
 
260295
- // src/panels/statusbar.js
261700
+ // src/panels/statusbar.ts
260296
261701
  init_store();
260297
261702
  init_reactivity();
260298
261703
  init_workspace2();
@@ -260371,7 +261776,7 @@ function statusMessage(msg, duration = 3000) {
260371
261776
  }, duration);
260372
261777
  }
260373
261778
 
260374
- // src/editor/convert-to-component.js
261779
+ // src/editor/convert-to-component.ts
260375
261780
  var VALID_NAME = /^[a-z][a-z0-9]*(-[a-z0-9]+)+$/;
260376
261781
  async function convertToComponent() {
260377
261782
  const tab = activeTab.value;
@@ -260509,7 +261914,7 @@ function promptComponentName(defaultName) {
260509
261914
  });
260510
261915
  }
260511
261916
 
260512
- // src/canvas/canvas-helpers.js
261917
+ // src/canvas/canvas-helpers.ts
260513
261918
  init_store();
260514
261919
  init_workspace2();
260515
261920
  var _ctx = null;
@@ -260598,7 +262003,7 @@ function overlayBoxDescriptor(el, type, panel) {
260598
262003
  };
260599
262004
  }
260600
262005
 
260601
- // src/editor/convert-targets.js
262006
+ // src/editor/convert-targets.ts
260602
262007
  var TAG_LABELS = {
260603
262008
  p: "Paragraph",
260604
262009
  h1: "Heading 1",
@@ -260640,7 +262045,7 @@ function getConvertTargets(currentTag, isEmpty) {
260640
262045
  }));
260641
262046
  }
260642
262047
 
260643
- // src/panels/block-action-bar.js
262048
+ // src/panels/block-action-bar.ts
260644
262049
  var _ctx2 = null;
260645
262050
  function initBlockActionBar(ctx) {
260646
262051
  _ctx2 = ctx;
@@ -260731,7 +262136,7 @@ function renderMoveArrows() {
260731
262136
  const sel = tab.session.selection;
260732
262137
  const idx = childIndex(sel);
260733
262138
  const pPath = parentElementPath(sel);
260734
- const parentNode = getNodeAtPath(tab.doc.document, pPath);
262139
+ const parentNode = pPath ? getNodeAtPath(tab.doc.document, pPath) : null;
260735
262140
  const siblings = parentNode?.children;
260736
262141
  return html3`
260737
262142
  <sp-action-button
@@ -261014,7 +262419,7 @@ function renderBlockActionBar() {
261014
262419
  });
261015
262420
  }
261016
262421
 
261017
- // src/panels/shared.js
262422
+ // src/panels/shared.ts
261018
262423
  function mediaDisplayName(name) {
261019
262424
  if (name === "--")
261020
262425
  return "Base";
@@ -261051,7 +262456,7 @@ function defaultDef(tag3) {
261051
262456
  else if (tag3 === "input")
261052
262457
  def3.attributes = { type: "text", placeholder: "Enter text..." };
261053
262458
  else if (tag3 === "img")
261054
- def3.attributes = { src: "", alt: "Image" };
262459
+ def3.attributes = { alt: "Image" };
261055
262460
  else if (tag3 === "iframe")
261056
262461
  def3.attributes = { src: "" };
261057
262462
  else if (tag3 === "select")
@@ -261082,7 +262487,7 @@ function defaultDef(tag3) {
261082
262487
  return def3;
261083
262488
  }
261084
262489
 
261085
- // src/editor/component-inline-edit.js
262490
+ // src/editor/component-inline-edit.ts
261086
262491
  var _ctx3 = null;
261087
262492
  function initComponentInlineEdit(ctx) {
261088
262493
  _ctx3 = ctx;
@@ -261091,7 +262496,7 @@ function enterComponentInlineEdit(el, path) {
261091
262496
  if (view.componentInlineEdit && view.componentInlineEdit.el === el) {
261092
262497
  return;
261093
262498
  }
261094
- const node = getNodeAtPath(activeTab.value?.doc.document, path);
262499
+ const node = getNodeAtPath(activeTab.value.doc.document, path);
261095
262500
  if (!node)
261096
262501
  return;
261097
262502
  const tc = node.textContent;
@@ -261321,11 +262726,13 @@ function handleComponentSlashSelect(cmd) {
261321
262726
  updateUi("pendingInlineEdit", { path: newPath, mediaName });
261322
262727
  }
261323
262728
 
261324
- // src/editor/content-inline-edit.js
262729
+ // src/editor/content-inline-edit.ts
261325
262730
  init_store();
261326
262731
  init_workspace2();
261327
262732
 
261328
- // src/utils/edit-display.js
262733
+ // src/utils/edit-display.ts
262734
+ var mediaTags = new Set(["img", "video", "source", "iframe", "audio"]);
262735
+ var TRANSPARENT_PX = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
261329
262736
  function templateToEditDisplay(str) {
261330
262737
  return str.replace(/\$\{([^}]+)\}/g, "❪ $1 ❫");
261331
262738
  }
@@ -261345,9 +262752,38 @@ function prepareForEditMode(node) {
261345
262752
  return node.map(prepareForEditMode);
261346
262753
  const obj = node;
261347
262754
  const out = {};
262755
+ let needsMediaPlaceholder = false;
262756
+ const isMediaElement = mediaTags.has(obj.tagName || "");
262757
+ if (isMediaElement) {
262758
+ const attrs = obj.attributes;
262759
+ const topSrc = obj.src;
262760
+ const attrSrc = attrs?.src;
262761
+ const topPoster = obj.poster;
262762
+ const attrPoster = attrs?.poster;
262763
+ const hasSrc = topSrc && topSrc !== "" || attrSrc && attrSrc !== "";
262764
+ const hasPoster = topPoster && topPoster !== "" || attrPoster && attrPoster !== "";
262765
+ if (!hasSrc && !hasPoster) {
262766
+ needsMediaPlaceholder = true;
262767
+ }
262768
+ }
261348
262769
  for (const [k, v] of Object.entries(obj)) {
261349
- if (k === "state" || k === "$media" || k === "$props" || k === "$elements") {
262770
+ if (k === "state" || k === "$media" || k === "$elements") {
261350
262771
  out[k] = v;
262772
+ } else if (k === "$props" && v && typeof v === "object") {
262773
+ const propsOut = {};
262774
+ for (const [pk, pv] of Object.entries(v)) {
262775
+ if (typeof pv === "string" && pv.includes("${")) {
262776
+ const isUrlAttr = pk === "src" || pk === "href" || pk === "poster" || pk === "action";
262777
+ propsOut[pk] = isUrlAttr ? "" : templateToEditDisplay(pv);
262778
+ } else if (pv && typeof pv === "object" && pv.$ref) {
262779
+ const ref3 = pv.$ref;
262780
+ const label = ref3.startsWith("#/state/") ? ref3.slice(8) : ref3;
262781
+ propsOut[pk] = `{${label}}`;
262782
+ } else {
262783
+ propsOut[pk] = pv;
262784
+ }
262785
+ }
262786
+ out[k] = propsOut;
261351
262787
  } else if (k === "children") {
261352
262788
  if (Array.isArray(v)) {
261353
262789
  out.children = v.map(prepareForEditMode);
@@ -261393,6 +262829,29 @@ function prepareForEditMode(node) {
261393
262829
  ];
261394
262830
  }
261395
262831
  }
262832
+ } else if (k === "attributes" && isMediaElement && v && typeof v === "object") {
262833
+ const attrs = v;
262834
+ const processed = {};
262835
+ for (const [ak, av] of Object.entries(attrs)) {
262836
+ if (ak === "src" || ak === "poster") {
262837
+ if (typeof av === "string" && av !== "" && !av.includes("${")) {
262838
+ processed[ak] = av;
262839
+ } else {
262840
+ needsMediaPlaceholder = true;
262841
+ processed[ak] = TRANSPARENT_PX;
262842
+ }
262843
+ } else if (typeof av === "string" && av.includes("${")) {
262844
+ const isUrlAttr = ak === "href" || ak === "action";
262845
+ processed[ak] = isUrlAttr ? "" : templateToEditDisplay(av);
262846
+ } else if (av && typeof av === "object" && av.$ref) {
262847
+ const ref3 = av.$ref;
262848
+ const label = ref3.startsWith("#/state/") ? ref3.slice(8) : ref3;
262849
+ processed[ak] = `{${label}}`;
262850
+ } else {
262851
+ processed[ak] = av;
262852
+ }
262853
+ }
262854
+ out.attributes = processed;
261396
262855
  } else if (k === "style") {
261397
262856
  if (v && typeof v === "object") {
261398
262857
  const s = {};
@@ -261404,13 +262863,31 @@ function prepareForEditMode(node) {
261404
262863
  out.style = v;
261405
262864
  }
261406
262865
  } else if (typeof v === "string" && v.includes("${")) {
261407
- out[k] = templateToEditDisplay(v);
262866
+ const isMediaSrc = (k === "src" || k === "poster") && mediaTags.has(obj.tagName || "");
262867
+ if (isMediaSrc) {
262868
+ needsMediaPlaceholder = true;
262869
+ out[k] = TRANSPARENT_PX;
262870
+ } else {
262871
+ const isUrlAttr = k === "src" || k === "href" || k === "poster" || k === "action";
262872
+ out[k] = isUrlAttr ? "" : templateToEditDisplay(v);
262873
+ }
261408
262874
  } else if (v && typeof v === "object" && v.$ref) {
261409
262875
  const ref3 = v.$ref;
261410
262876
  const label = ref3.startsWith("#/state/") ? ref3.slice(8) : ref3;
261411
- out[k] = `{${label}}`;
262877
+ const isMediaSrc = (k === "src" || k === "poster") && mediaTags.has(obj.tagName || "");
262878
+ if (isMediaSrc) {
262879
+ needsMediaPlaceholder = true;
262880
+ out[k] = TRANSPARENT_PX;
262881
+ } else {
262882
+ out[k] = `{${label}}`;
262883
+ }
261412
262884
  } else {
261413
- out[k] = prepareForEditMode(v);
262885
+ if ((k === "src" || k === "poster") && v === "" && mediaTags.has(obj.tagName || "")) {
262886
+ needsMediaPlaceholder = true;
262887
+ out[k] = TRANSPARENT_PX;
262888
+ } else {
262889
+ out[k] = prepareForEditMode(v);
262890
+ }
261414
262891
  }
261415
262892
  }
261416
262893
  if (out.tagName && !out.textContent && !out.innerHTML) {
@@ -261477,10 +262954,16 @@ function prepareForEditMode(node) {
261477
262954
  }
261478
262955
  }
261479
262956
  }
262957
+ if (needsMediaPlaceholder) {
262958
+ const cls = out.className || "";
262959
+ if (!cls.includes("empty-media-placeholder")) {
262960
+ out.className = cls ? cls + " empty-media-placeholder" : "empty-media-placeholder";
262961
+ }
262962
+ }
261480
262963
  return out;
261481
262964
  }
261482
262965
 
261483
- // src/editor/content-inline-edit.js
262966
+ // src/editor/content-inline-edit.ts
261484
262967
  function enterInlineEdit(el, path) {
261485
262968
  restoreTemplateExpressions(el);
261486
262969
  for (const p of canvasPanels) {
@@ -261489,7 +262972,7 @@ function enterInlineEdit(el, path) {
261489
262972
  }
261490
262973
  startEditing(el, path, {
261491
262974
  onCommit(commitPath, children, textContent) {
261492
- const node = getNodeAtPath(activeTab.value?.doc.document, commitPath);
262975
+ const node = getNodeAtPath(activeTab.value.doc.document, commitPath);
261493
262976
  if (children) {
261494
262977
  if (node && JSON.stringify(node.children) === JSON.stringify(children))
261495
262978
  return;
@@ -261623,7 +263106,7 @@ function enterInlineEdit(el, path) {
261623
263106
  view.inlineEditCleanup = inlineEditCleanup;
261624
263107
  }
261625
263108
 
261626
- // src/canvas/canvas-utils.js
263109
+ // src/canvas/canvas-utils.ts
261627
263110
  init_lit_html();
261628
263111
  init_ref();
261629
263112
  init_class_map();
@@ -261888,13 +263371,13 @@ function updateActivePanelHeaders() {
261888
263371
  }
261889
263372
  }
261890
263373
 
261891
- // src/canvas/canvas-render.js
263374
+ // src/canvas/canvas-render.ts
261892
263375
  init_lit_html();
261893
263376
  init_ref();
261894
263377
  init_store();
261895
263378
  init_workspace2();
261896
263379
 
261897
- // src/files/file-ops.js
263380
+ // src/files/file-ops.ts
261898
263381
  init_unified();
261899
263382
 
261900
263383
  // ../../node_modules/.bun/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.js
@@ -261910,7 +263393,7 @@ function remarkStringify(options) {
261910
263393
  });
261911
263394
  }
261912
263395
  }
261913
- // src/files/file-ops.js
263396
+ // src/files/file-ops.ts
261914
263397
  init_remark_directive();
261915
263398
  init_remark_gfm();
261916
263399
 
@@ -265042,12 +266525,12 @@ function stringify4(value, replacer2, options) {
265042
266525
  return value.toString(options);
265043
266526
  return new Document2(value, _replacer, options).toString(options);
265044
266527
  }
265045
- // src/markdown/md-convert.js
266528
+ // src/markdown/md-convert.ts
265046
266529
  init_unified();
265047
266530
  init_remark_directive();
265048
266531
  init_remark_gfm();
265049
266532
 
265050
- // src/markdown/md-allowlist.js
266533
+ // src/markdown/md-allowlist.ts
265051
266534
  var MD_BLOCK = new Set([
265052
266535
  "h1",
265053
266536
  "h2",
@@ -265099,7 +266582,7 @@ var MD_NESTING = {
265099
266582
  a: { block: false, inline: true, directive: false, only: null }
265100
266583
  };
265101
266584
 
265102
- // src/markdown/md-convert.js
266585
+ // src/markdown/md-convert.ts
265103
266586
  init_transpile();
265104
266587
  var INLINE_CONTENT_TAGS = new Set([
265105
266588
  "p",
@@ -265291,8 +266774,14 @@ function blockChildren(el) {
265291
266774
  function collectDirectiveAttrs(el) {
265292
266775
  const propsObj = {};
265293
266776
  for (const [key, value2] of Object.entries(el)) {
265294
- if (key === "tagName" || key === "children" || key === "textContent" || key === "innerHTML" || key === "attributes")
266777
+ if (key === "tagName" || key === "textContent" || key === "innerHTML" || key === "attributes")
265295
266778
  continue;
266779
+ if (key === "children") {
266780
+ if (value2 && typeof value2 === "object" && !Array.isArray(value2)) {
266781
+ propsObj.children = value2;
266782
+ }
266783
+ continue;
266784
+ }
265296
266785
  propsObj[key] = value2;
265297
266786
  }
265298
266787
  if (el.attributes) {
@@ -265313,7 +266802,9 @@ function convertToDirective(el, isBlock) {
265313
266802
  children: el.textContent != null ? [{ type: "text", value: String(el.textContent) }] : (el.children ?? []).map((c) => convertJxNode(c, false)).filter(Boolean)
265314
266803
  };
265315
266804
  }
265316
- const childArray = el.children;
266805
+ const rawChildren = el.children;
266806
+ const childrenIsObject = rawChildren && typeof rawChildren === "object" && !Array.isArray(rawChildren);
266807
+ const childArray = childrenIsObject ? undefined : rawChildren;
265317
266808
  if (!childArray?.length && el.textContent == null) {
265318
266809
  return {
265319
266810
  type: "leafDirective",
@@ -265484,7 +266975,7 @@ function collapsePropsToAttrMap(propsObj) {
265484
266975
  return result;
265485
266976
  }
265486
266977
 
265487
- // src/services/code-services.js
266978
+ // src/services/code-services.ts
265488
266979
  init_platform3();
265489
266980
  init_store();
265490
266981
  async function codeService(action, payload) {
@@ -265554,7 +267045,7 @@ function getFunctionArgs(editing, document4) {
265554
267045
  return ["state", "event"];
265555
267046
  }
265556
267047
 
265557
- // src/files/file-ops.js
267048
+ // src/files/file-ops.ts
265558
267049
  init_platform3();
265559
267050
  init_workspace2();
265560
267051
  async function loadMarkdown(source) {
@@ -265567,11 +267058,17 @@ async function loadMarkdown(source) {
265567
267058
  const children = doc.children ?? [];
265568
267059
  if (children.length === 0)
265569
267060
  children.push({ tagName: "p", children: [] });
267061
+ const documentKeys = new Set(["state", "imports"]);
265570
267062
  const contentDoc = { children };
265571
267063
  const frontmatter2 = {};
265572
267064
  for (const [key, value2] of Object.entries(doc)) {
265573
- if (key !== "children")
267065
+ if (key === "children")
267066
+ continue;
267067
+ if (documentKeys.has(key)) {
267068
+ contentDoc[key] = value2;
267069
+ } else {
265574
267070
  frontmatter2[key] = value2;
267071
+ }
265575
267072
  }
265576
267073
  return { document: contentDoc, frontmatter: frontmatter2 };
265577
267074
  }
@@ -265642,7 +267139,8 @@ async function exportFile() {
265642
267139
  function serializeDocument(tab) {
265643
267140
  if (tab.doc.sourceFormat === "md") {
265644
267141
  const fm = tab.doc.content?.frontmatter || {};
265645
- const fullDoc = { ...fm, children: tab.doc.document.children ?? [] };
267142
+ const doc = tab.doc.document;
267143
+ const fullDoc = { ...fm, ...doc, children: doc.children ?? [] };
265646
267144
  return jxDocToMd(fullDoc);
265647
267145
  }
265648
267146
  if (tab.doc.mode === "content") {
@@ -265659,10 +267157,10 @@ ${md}` : md;
265659
267157
  return JSON.stringify(tab.doc.document, null, 2);
265660
267158
  }
265661
267159
 
265662
- // src/panels/welcome-screen.js
267160
+ // src/panels/welcome-screen.ts
265663
267161
  init_lit_html();
265664
267162
 
265665
- // src/recent-projects.js
267163
+ // src/recent-projects.ts
265666
267164
  var STORAGE_KEY = "jx-studio-recent-projects";
265667
267165
  var FILES_STORAGE_KEY = "jx-studio-recent-files";
265668
267166
  var MAX_RECENT = 8;
@@ -265702,7 +267200,7 @@ function trackRecentFile(file) {
265702
267200
  localStorage.setItem(FILES_STORAGE_KEY, JSON.stringify(recent));
265703
267201
  }
265704
267202
 
265705
- // src/panels/git-panel.js
267203
+ // src/panels/git-panel.ts
265706
267204
  init_lit_html();
265707
267205
  init_live();
265708
267206
  init_repeat();
@@ -265710,11 +267208,11 @@ init_platform3();
265710
267208
  init_store();
265711
267209
  init_workspace2();
265712
267210
 
265713
- // src/github/github-publish.js
267211
+ // src/github/github-publish.ts
265714
267212
  init_lit_html();
265715
267213
  init_ref();
265716
267214
 
265717
- // src/github/github-auth.js
267215
+ // src/github/github-auth.ts
265718
267216
  init_lit_html();
265719
267217
  var CLIENT_ID = "Ov23liYVlMFpgjOEPXJH";
265720
267218
  var STORAGE_KEY2 = "jx_github_token";
@@ -265809,7 +267307,7 @@ async function authenticateGithub() {
265809
267307
  });
265810
267308
  }
265811
267309
 
265812
- // src/github/github-publish.js
267310
+ // src/github/github-publish.ts
265813
267311
  init_platform3();
265814
267312
  async function publishToGithub({ projectName }) {
265815
267313
  const token = await authenticateGithub();
@@ -265909,7 +267407,7 @@ async function publishToGithub({ projectName }) {
265909
267407
  return true;
265910
267408
  }
265911
267409
 
265912
- // src/panels/git-panel.js
267410
+ // src/panels/git-panel.ts
265913
267411
  async function refreshGitStatus() {
265914
267412
  if (!projectState)
265915
267413
  return;
@@ -266471,7 +267969,7 @@ function _relativeDate(iso) {
266471
267969
  return d2.toLocaleDateString();
266472
267970
  }
266473
267971
 
266474
- // src/panels/welcome-screen.js
267972
+ // src/panels/welcome-screen.ts
266475
267973
  var _ctx5 = null;
266476
267974
  function initWelcome(ctx) {
266477
267975
  _ctx5 = ctx;
@@ -266558,7 +268056,7 @@ function shortenPath(path2) {
266558
268056
  }
266559
268057
  return path2;
266560
268058
  }
266561
- // src/utils/canvas-media.js
268059
+ // src/utils/canvas-media.ts
266562
268060
  function parseMediaEntries(mediaDef) {
266563
268061
  if (!mediaDef)
266564
268062
  return { sizeBreakpoints: [], featureQueries: [], baseWidth: 320 };
@@ -266606,7 +268104,7 @@ function applyCanvasStyle(el, styleDef, activeBreakpoints, featureToggles) {
266606
268104
  }
266607
268105
  }
266608
268106
  for (const [key, val] of Object.entries(styleDef)) {
266609
- if (!key.startsWith("@") || typeof val !== "object")
268107
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
266610
268108
  continue;
266611
268109
  const mediaName = key.slice(1);
266612
268110
  if (mediaName === "--")
@@ -266678,7 +268176,7 @@ function applyOverridesToCanvas(canvasEl, overrides) {
266678
268176
  }
266679
268177
  }
266680
268178
 
266681
- // src/site-context.js
268179
+ // src/site-context.ts
266682
268180
  init_store();
266683
268181
  init_platform3();
266684
268182
  function getEffectiveMedia(docMedia) {
@@ -266832,15 +268330,15 @@ async function updateSiteConfig(patch2) {
266832
268330
  setProjectState({ ...requireProjectState(), projectConfig: config });
266833
268331
  }
266834
268332
 
266835
- // src/canvas/canvas-live-render.js
268333
+ // src/canvas/canvas-live-render.ts
266836
268334
  init_store();
266837
268335
  init_workspace2();
266838
268336
  init_reactivity();
266839
268337
 
266840
- // ../runtime/src/runtime.js
268338
+ // ../runtime/src/runtime.ts
266841
268339
  init_reactivity_esm_bundler();
266842
268340
 
266843
- // ../runtime/src/expression.js
268341
+ // ../runtime/src/expression.ts
266844
268342
  var MUTATING_OPS = new Set([
266845
268343
  "=",
266846
268344
  "+=",
@@ -267059,28 +268557,43 @@ function evaluateExpression(node2, state, event, iterCtx) {
267059
268557
  }
267060
268558
  if (operator === "map") {
267061
268559
  return arr.map((item, index2) => {
267062
- return evaluateExpression(value2, state, event, { ...iterCtx, item, index: index2 });
268560
+ return evaluateExpression(value2, state, event, {
268561
+ ...iterCtx,
268562
+ item,
268563
+ index: index2
268564
+ });
267063
268565
  });
267064
268566
  }
267065
268567
  if (operator === "filter") {
267066
268568
  return arr.filter((item, index2) => {
267067
- return evaluateExpression(value2, state, event, { ...iterCtx, item, index: index2 });
268569
+ return evaluateExpression(value2, state, event, {
268570
+ ...iterCtx,
268571
+ item,
268572
+ index: index2
268573
+ });
267068
268574
  });
267069
268575
  }
267070
268576
  }
268577
+ return;
267071
268578
  }
267072
268579
  function getPath(obj, path2) {
267073
268580
  return path2.split(/[./]/).reduce((o, k) => o?.[k], obj);
267074
268581
  }
267075
268582
 
267076
- // ../runtime/src/runtime.js
268583
+ // ../runtime/src/runtime.ts
268584
+ var _resolveCache = new Map;
267077
268585
  async function resolve3(source) {
267078
268586
  if (typeof source !== "string")
267079
268587
  return source;
267080
- const res = await fetch(source);
267081
- if (!res.ok)
267082
- throw new Error(`Jx: failed to fetch ${source} (${res.status})`);
267083
- return res.json();
268588
+ if (_resolveCache.has(source))
268589
+ return _resolveCache.get(source);
268590
+ const p = fetch(source).then((res) => {
268591
+ if (!res.ok)
268592
+ throw new Error(`Jx: failed to fetch ${source} (${res.status})`);
268593
+ return res.json();
268594
+ });
268595
+ _resolveCache.set(source, p);
268596
+ return p;
267084
268597
  }
267085
268598
  var SCHEMA_KEYWORDS = new Set([
267086
268599
  "type",
@@ -267133,17 +268646,18 @@ async function buildScope(doc, parentScope = {}, base2 = location.href) {
267133
268646
  continue;
267134
268647
  }
267135
268648
  if (typeof def3 === "object") {
267136
- if (def3.$prototype)
268649
+ const d2 = def3;
268650
+ if (d2.$prototype)
267137
268651
  continue;
267138
- if ("$expression" in def3)
268652
+ if ("$expression" in d2)
267139
268653
  continue;
267140
- if (def3.timing === "server" && def3.$src && def3.$export)
268654
+ if (d2.timing === "server" && d2.$src && d2.$export)
267141
268655
  continue;
267142
- if ("default" in def3) {
267143
- raw[key] = def3.default;
268656
+ if ("default" in d2) {
268657
+ raw[key] = d2.default;
267144
268658
  continue;
267145
268659
  }
267146
- if (hasSchemaKeywords(def3))
268660
+ if (hasSchemaKeywords(d2))
267147
268661
  continue;
267148
268662
  raw[key] = def3;
267149
268663
  }
@@ -267381,12 +268895,13 @@ function applyProperties(el, def3, state) {
267381
268895
  function bindProperty(el, key, val, state) {
267382
268896
  const target = el;
267383
268897
  if (isRefObj(val)) {
268898
+ const refVal = val;
267384
268899
  if (key === "id") {
267385
- target[key] = resolveRef(val.$ref, state);
268900
+ target[key] = resolveRef(refVal.$ref, state);
267386
268901
  return;
267387
268902
  }
267388
268903
  effect(() => {
267389
- target[key] = resolveRef(val.$ref, state);
268904
+ target[key] = resolveRef(refVal.$ref, state);
267390
268905
  });
267391
268906
  return;
267392
268907
  }
@@ -267812,6 +269327,10 @@ async function importAndInstantiate(def3, src, exportName, base2) {
267812
269327
  async function resolveClassJson(def3, state, key, base2) {
267813
269328
  const src = def3.$src;
267814
269329
  let classDef;
269330
+ const isBareSpecifier = !src.startsWith(".") && !src.startsWith("/") && !src.startsWith("http") && !src.startsWith("file:");
269331
+ if (isBareSpecifier) {
269332
+ return resolveViaDevProxy(def3, state, key, base2);
269333
+ }
267815
269334
  try {
267816
269335
  const url = base2 ? new URL(src, base2).href : src;
267817
269336
  const res = await fetch(url);
@@ -268118,9 +269637,13 @@ async function registerElements(elements, base2) {
268118
269637
  await defineElement(doc, href);
268119
269638
  }
268120
269639
  }
269640
+ var _definedSources = new Set;
268121
269641
  async function defineElement(source, base2) {
268122
269642
  if (typeof source === "string") {
268123
269643
  base2 = new URL(source, base2 ?? location.href).href;
269644
+ if (_definedSources.has(base2))
269645
+ return;
269646
+ _definedSources.add(base2);
268124
269647
  source = await resolve3(source);
268125
269648
  }
268126
269649
  base2 = base2 ?? location.href;
@@ -268138,6 +269661,8 @@ async function defineElement(source, base2) {
268138
269661
  const def3 = source_;
268139
269662
  const observedAttrs = def3.observedAttributes ?? [];
268140
269663
  const ElementClass = class extends HTMLElement {
269664
+ _jxInitialized = false;
269665
+ _state = null;
268141
269666
  static get observedAttributes() {
268142
269667
  return observedAttrs;
268143
269668
  }
@@ -268190,29 +269715,26 @@ async function defineElement(source, base2) {
268190
269715
  }
268191
269716
  }
268192
269717
  disconnectedCallback() {
268193
- const self2 = this;
268194
- if (typeof self2._state?.onUnmount === "function") {
268195
- self2._state.onUnmount(self2._state);
269718
+ if (typeof this._state?.onUnmount === "function") {
269719
+ this._state.onUnmount(this._state);
268196
269720
  }
268197
269721
  }
268198
269722
  adoptedCallback() {
268199
- const self2 = this;
268200
- if (typeof self2._state?.onAdopted === "function") {
268201
- self2._state.onAdopted(self2._state);
269723
+ if (typeof this._state?.onAdopted === "function") {
269724
+ this._state.onAdopted(this._state);
268202
269725
  }
268203
269726
  }
268204
269727
  attributeChangedCallback(name, oldVal, newVal) {
268205
- const self2 = this;
268206
- if (!self2._state || oldVal === newVal)
269728
+ if (!this._state || oldVal === newVal)
268207
269729
  return;
268208
269730
  const camelKey = name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
268209
- const current = self2._state[camelKey];
269731
+ const current = this._state[camelKey];
268210
269732
  if (typeof current === "number")
268211
- self2._state[camelKey] = Number(newVal);
269733
+ this._state[camelKey] = Number(newVal);
268212
269734
  else if (typeof current === "boolean")
268213
- self2._state[camelKey] = newVal !== null && newVal !== "false";
269735
+ this._state[camelKey] = newVal !== null && newVal !== "false";
268214
269736
  else
268215
- self2._state[camelKey] = newVal;
269737
+ this._state[camelKey] = newVal;
268216
269738
  }
268217
269739
  };
268218
269740
  customElements.define(tagName, ElementClass);
@@ -268223,10 +269745,11 @@ function renderCustomElementWithProps(def3, state, options, path2) {
268223
269745
  options.onNodeCreated(el, path2 ?? [], def3);
268224
269746
  for (const [key, val] of Object.entries(def3.$props ?? {})) {
268225
269747
  if (isRefObj(val)) {
268226
- const resolved = resolveRef(val.$ref, state);
269748
+ const refVal = val;
269749
+ const resolved = resolveRef(refVal.$ref, state);
268227
269750
  el[key] = resolved;
268228
269751
  effect(() => {
268229
- el[key] = resolveRef(val.$ref, state);
269752
+ el[key] = resolveRef(refVal.$ref, state);
268230
269753
  });
268231
269754
  } else if (isTemplateString(val)) {
268232
269755
  effect(() => {
@@ -268275,10 +269798,10 @@ function distributeSlots(host, slottedChildren) {
268275
269798
  }
268276
269799
  }
268277
269800
 
268278
- // src/canvas/canvas-live-render.js
269801
+ // src/canvas/canvas-live-render.ts
268279
269802
  init_components();
268280
269803
 
268281
- // src/canvas/nested-site-style.js
269804
+ // src/canvas/nested-site-style.ts
268282
269805
  function buildNestedSiteCSS(styleObj, scope) {
268283
269806
  let css = "";
268284
269807
  function emit(parentSel, rules) {
@@ -268305,7 +269828,7 @@ function camelToKebab2(s2) {
268305
269828
  return s2.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
268306
269829
  }
268307
269830
 
268308
- // src/canvas/canvas-live-render.js
269831
+ // src/canvas/canvas-live-render.ts
268309
269832
  function _preventNav(e) {
268310
269833
  if (e.target.closest("a[href]")) {
268311
269834
  e.preventDefault();
@@ -268439,7 +269962,7 @@ async function renderCanvasLive(gen, doc, canvasEl) {
268439
269962
  for (const tag3 of collectTags(renderDoc)) {
268440
269963
  const comp = componentRegistry.find((c) => c.tagName === tag3);
268441
269964
  if (comp && comp.source !== "npm") {
268442
- const relPath = computeRelativePath(S.documentPath, comp.path);
269965
+ const relPath = computeRelativePath(S.documentPath ?? null, comp.path);
268443
269966
  if (!existingRefs.has(relPath)) {
268444
269967
  effectiveElements.push({ $ref: relPath });
268445
269968
  existingRefs.add(relPath);
@@ -268553,7 +270076,7 @@ async function renderCanvasLive(gen, doc, canvasEl) {
268553
270076
  continue;
268554
270077
  const el2 = document.createElement(tag3);
268555
270078
  for (const [k, v] of Object.entries(attrs))
268556
- el2.setAttribute(k, v);
270079
+ el2.setAttribute(k, String(v));
268557
270080
  if (entry.textContent)
268558
270081
  el2.textContent = entry.textContent;
268559
270082
  document.head.appendChild(el2);
@@ -268639,21 +270162,29 @@ async function renderCanvasLive(gen, doc, canvasEl) {
268639
270162
  }
268640
270163
  }
268641
270164
 
268642
- // src/panels/preview-render.js
270165
+ // src/panels/preview-render.ts
268643
270166
  init_store();
268644
270167
  init_workspace2();
268645
270168
 
268646
- // src/panels/signals-panel.js
270169
+ // src/panels/signals-panel.ts
268647
270170
  init_lit_html();
268648
270171
  init_class_map();
268649
270172
  init_if_defined();
268650
270173
  init_style_map();
268651
270174
  init_workspace2();
268652
270175
 
268653
- // src/ui/field-row.js
270176
+ // src/ui/field-row.ts
268654
270177
  init_lit_html();
268655
270178
  init_class_map();
268656
- function renderFieldRow({ prop, label: label4, hasValue, onClear, widget, span, warning }) {
270179
+ function renderFieldRow({
270180
+ prop,
270181
+ label: label4,
270182
+ hasValue,
270183
+ onClear,
270184
+ widget,
270185
+ span,
270186
+ warning
270187
+ }) {
268657
270188
  return html3`
268658
270189
  <div
268659
270190
  class=${classMap({ "style-row": true, "style-row--warning": !!warning })}
@@ -268676,7 +270207,7 @@ function renderFieldRow({ prop, label: label4, hasValue, onClear, widget, span,
268676
270207
  `;
268677
270208
  }
268678
270209
 
268679
- // src/ui/expression-editor.js
270210
+ // src/ui/expression-editor.ts
268680
270211
  init_lit_html();
268681
270212
  init_live();
268682
270213
  var UNARY_OPS2 = new Set(["!", "-"]);
@@ -268991,7 +270522,8 @@ function renderExpressionEditor(node2, onChange, opts) {
268991
270522
  }
268992
270523
  if (newInfo.needsValue) {
268993
270524
  if (newInfo.valueIsNode) {
268994
- updated.value = safeNode.value?.operator ? safeNode.value : { operator: "!", target: null };
270525
+ const val = safeNode.value;
270526
+ updated.value = val?.operator ? safeNode.value : { operator: "!", target: null };
268995
270527
  } else if (newInfo.spliceArray) {
268996
270528
  updated.value = Array.isArray(safeNode.value) ? safeNode.value : [null];
268997
270529
  } else {
@@ -269058,7 +270590,7 @@ function renderExpressionEditor(node2, onChange, opts) {
269058
270590
  `;
269059
270591
  }
269060
270592
 
269061
- // src/ui/media-picker.js
270593
+ // src/ui/media-picker.ts
269062
270594
  init_lit_html();
269063
270595
  init_live();
269064
270596
  init_platform3();
@@ -269169,7 +270701,7 @@ function renderMediaPicker(prop, value2, onCommit) {
269169
270701
  `;
269170
270702
  }
269171
270703
 
269172
- // src/panels/signals-panel.js
270704
+ // src/panels/signals-panel.ts
269173
270705
  var expandedSignal = null;
269174
270706
  var advancedParamOpen = new Set;
269175
270707
  var DEF_TEMPLATES = {
@@ -269312,7 +270844,6 @@ function resolveDefaultForCanvas(value2, defs) {
269312
270844
  return `{${defName}}`;
269313
270845
  }
269314
270846
  function signalFieldRow(label4, value2, onChange) {
269315
- let debounce;
269316
270847
  return renderFieldRow({
269317
270848
  prop: label4,
269318
270849
  label: label4,
@@ -269320,10 +270851,11 @@ function signalFieldRow(label4, value2, onChange) {
269320
270851
  widget: html3`
269321
270852
  <sp-textfield
269322
270853
  size="s"
269323
- value=${value2}
269324
- @input=${(e) => {
269325
- clearTimeout(debounce);
269326
- debounce = setTimeout(() => onChange(e.target.value), 400);
270854
+ .value=${value2}
270855
+ @change=${(e) => {
270856
+ const v = e.target.value;
270857
+ if (v !== value2)
270858
+ onChange(v);
269327
270859
  }}
269328
270860
  ></sp-textfield>
269329
270861
  `
@@ -269422,7 +270954,7 @@ function renderSignalsTemplate(S, ctx) {
269422
270954
  transactDoc(activeTab.value, (t) => mutateAddDef(t, n3, { $prototype: protoName }));
269423
270955
  expandedSignal = n3;
269424
270956
  if (src) {
269425
- fetchPluginSchema({ $prototype: protoName, $src: src }, S).then(() => ctx.renderLeftPanel());
270957
+ fetchPluginSchema({ $prototype: protoName, $src: src }, { ...S.documentPath != null && { documentPath: S.documentPath } }).then(() => ctx.renderLeftPanel());
269426
270958
  } else {
269427
270959
  ctx.renderLeftPanel();
269428
270960
  }
@@ -269729,10 +271261,7 @@ function renderParameterEditorTemplate(S, name, def3, ctx) {
269729
271261
  @keydown=${(e) => {
269730
271262
  if (e.key === "Enter" && e.target.value.trim()) {
269731
271263
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, {
269732
- parameters: [
269733
- ...params,
269734
- { name: e.target.value.trim() }
269735
- ]
271264
+ parameters: [...params, { name: e.target.value.trim() }]
269736
271265
  }));
269737
271266
  }
269738
271267
  }}
@@ -269775,10 +271304,9 @@ function renderParameterEditorTemplate(S, name, def3, ctx) {
269775
271304
  style="flex:1"
269776
271305
  @change=${(e) => {
269777
271306
  const next2 = [...params];
269778
- next2[i2] = {
269779
- ...next2[i2],
269780
- type: e.target.value ? { text: e.target.value } : undefined
269781
- };
271307
+ const val = e.target.value;
271308
+ const { type: _t, ...rest } = next2[i2];
271309
+ next2[i2] = val ? { ...rest, type: { text: val } } : rest;
269782
271310
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { parameters: next2 }));
269783
271311
  }}
269784
271312
  />
@@ -269789,10 +271317,9 @@ function renderParameterEditorTemplate(S, name, def3, ctx) {
269789
271317
  style="flex:2"
269790
271318
  @change=${(e) => {
269791
271319
  const next2 = [...params];
269792
- next2[i2] = {
269793
- ...next2[i2],
269794
- description: e.target.value || undefined
269795
- };
271320
+ const val = e.target.value;
271321
+ const { description: _d, ...rest } = next2[i2];
271322
+ next2[i2] = val ? { ...rest, description: val } : rest;
269796
271323
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { parameters: next2 }));
269797
271324
  }}
269798
271325
  />
@@ -269802,10 +271329,9 @@ function renderParameterEditorTemplate(S, name, def3, ctx) {
269802
271329
  .checked=${!!p.optional}
269803
271330
  @change=${(e) => {
269804
271331
  const next2 = [...params];
269805
- next2[i2] = {
269806
- ...next2[i2],
269807
- optional: e.target.checked || undefined
269808
- };
271332
+ const checked = e.target.checked;
271333
+ const { optional: _o, ...rest } = next2[i2];
271334
+ next2[i2] = checked ? { ...rest, optional: true } : rest;
269809
271335
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { parameters: next2 }));
269810
271336
  }}
269811
271337
  />
@@ -269867,10 +271393,9 @@ function renderEmitsEditorTemplate(S, name, def3) {
269867
271393
  style="flex:1"
269868
271394
  @change=${(e) => {
269869
271395
  const next2 = [...emits];
269870
- next2[i2] = {
269871
- ...next2[i2],
269872
- type: e.target.value ? { text: e.target.value } : undefined
269873
- };
271396
+ const val = e.target.value;
271397
+ const { type: _t, ...rest } = next2[i2];
271398
+ next2[i2] = val ? { ...rest, type: { text: val } } : rest;
269874
271399
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { emits: next2 }));
269875
271400
  }}
269876
271401
  />
@@ -269881,10 +271406,9 @@ function renderEmitsEditorTemplate(S, name, def3) {
269881
271406
  style="flex:2"
269882
271407
  @change=${(e) => {
269883
271408
  const next2 = [...emits];
269884
- next2[i2] = {
269885
- ...next2[i2],
269886
- description: e.target.value || undefined
269887
- };
271409
+ const val = e.target.value;
271410
+ const { description: _d, ...rest } = next2[i2];
271411
+ next2[i2] = val ? { ...rest, description: val } : rest;
269888
271412
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { emits: next2 }));
269889
271413
  }}
269890
271414
  />
@@ -270172,7 +271696,9 @@ function renderExternalPrototypeEditorTemplate(S, name, def3, ctx) {
270172
271696
  >
270173
271697
  Loading schema…
270174
271698
  </div>`;
270175
- fetchPluginSchema(def3, S).then((schema4) => {
271699
+ fetchPluginSchema(def3, {
271700
+ ...S.documentPath != null && { documentPath: S.documentPath }
271701
+ }).then((schema4) => {
270176
271702
  if (schema4)
270177
271703
  ctx.renderLeftPanel();
270178
271704
  });
@@ -270196,7 +271722,7 @@ function renderExternalPrototypeEditorTemplate(S, name, def3, ctx) {
270196
271722
  `;
270197
271723
  }
270198
271724
 
270199
- // src/panels/preview-render.js
271725
+ // src/panels/preview-render.ts
270200
271726
  function renderCanvasNode(node2, path2, parent, activeBreakpoints, featureToggles) {
270201
271727
  if (typeof node2 === "string" || typeof node2 === "number" || typeof node2 === "boolean") {
270202
271728
  parent.appendChild(document.createTextNode(String(node2)));
@@ -270263,7 +271789,7 @@ function renderCanvasNode(node2, path2, parent, activeBreakpoints, featureToggle
270263
271789
  return el;
270264
271790
  }
270265
271791
 
270266
- // src/panels/canvas-dnd.js
271792
+ // src/panels/canvas-dnd.ts
270267
271793
  init_store();
270268
271794
  init_workspace2();
270269
271795
  // ../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
@@ -270452,12 +271978,12 @@ function extractInstruction(userData) {
270452
271978
  return (_ref5 = userData[uniqueKey]) !== null && _ref5 !== undefined ? _ref5 : null;
270453
271979
  }
270454
271980
 
270455
- // src/panels/dnd.js
271981
+ // src/panels/dnd.ts
270456
271982
  init_store();
270457
271983
  init_workspace2();
270458
271984
  init_components();
270459
271985
 
270460
- // src/panels/stylebook-panel.js
271986
+ // src/panels/stylebook-panel.ts
270461
271987
  init_lit_html();
270462
271988
  init_ref();
270463
271989
  init_class_map();
@@ -270672,7 +272198,7 @@ registerBlockType( name, settings );`
270672
272198
  }
270673
272199
  };
270674
272200
 
270675
- // src/panels/stylebook-panel.js
272201
+ // src/panels/stylebook-panel.ts
270676
272202
  function _resolveNestedStyle(style2, tagPath) {
270677
272203
  const parts = tagPath.split(" ");
270678
272204
  let obj = style2;
@@ -270719,7 +272245,10 @@ function renderStylebookMode(ctx) {
270719
272245
  @input=${onFilterInput2}
270720
272246
  />
270721
272247
  <button
270722
- class=${classMap({ "tb-toggle": true, active: tab?.session.ui.stylebookCustomizedOnly })}
272248
+ class=${classMap({
272249
+ "tb-toggle": true,
272250
+ active: !!tab?.session.ui.stylebookCustomizedOnly
272251
+ })}
270723
272252
  @click=${onCustomizedToggle}
270724
272253
  >
270725
272254
  Customized
@@ -270826,7 +272355,7 @@ function refreshStylebookStyles() {
270826
272355
  }
270827
272356
  if (activeBreakpoints.size > 0) {
270828
272357
  for (const [key, val] of Object.entries(tagStyle)) {
270829
- if (!key.startsWith("@") || typeof val !== "object")
272358
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
270830
272359
  continue;
270831
272360
  const mediaName = key.slice(1);
270832
272361
  if (mediaName === "--")
@@ -270845,7 +272374,7 @@ function refreshStylebookStyles() {
270845
272374
  }
270846
272375
  if (activeBreakpoints.size > 0) {
270847
272376
  for (const [key, val] of Object.entries(rootStyle)) {
270848
- if (!key.startsWith("@") || typeof val !== "object")
272377
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
270849
272378
  continue;
270850
272379
  const mediaName = key.slice(1);
270851
272380
  if (mediaName === "--")
@@ -270945,7 +272474,7 @@ function buildStylebookElement(entry, rootStyle, activeBreakpoints, parentTag =
270945
272474
  }
270946
272475
  if (activeBreakpoints) {
270947
272476
  for (const [key, val] of Object.entries(tagStyle)) {
270948
- if (!key.startsWith("@") || typeof val !== "object")
272477
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
270949
272478
  continue;
270950
272479
  const mediaName = key.slice(1);
270951
272480
  if (mediaName === "--")
@@ -270965,7 +272494,7 @@ function buildStylebookElement(entry, rootStyle, activeBreakpoints, parentTag =
270965
272494
  if (activeBreakpoints) {
270966
272495
  const tagPath = compoundTag || entry.tag;
270967
272496
  for (const [key, val] of Object.entries(rootStyle)) {
270968
- if (!key.startsWith("@") || typeof val !== "object")
272497
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
270969
272498
  continue;
270970
272499
  const mediaName = key.slice(1);
270971
272500
  if (mediaName === "--")
@@ -271030,7 +272559,7 @@ function hasTagStyle(rootStyle, tag3) {
271030
272559
  if (s2 && typeof s2 === "object" && Object.keys(s2).length > 0)
271031
272560
  return true;
271032
272561
  for (const [key, val] of Object.entries(rootStyle)) {
271033
- if (!key.startsWith("@") || typeof val !== "object")
272562
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
271034
272563
  continue;
271035
272564
  const ms = _resolveNestedStyle(val, tag3);
271036
272565
  if (ms && typeof ms === "object" && Object.keys(ms).length > 0)
@@ -271218,7 +272747,7 @@ function findStylebookEl(canvasEl, tag3) {
271218
272747
  return null;
271219
272748
  }
271220
272749
 
271221
- // src/panels/dnd.js
272750
+ // src/panels/dnd.ts
271222
272751
  function registerLayersDnD() {
271223
272752
  requestAnimationFrame(() => {
271224
272753
  const container = leftPanel?.querySelector(".layers-container");
@@ -271483,7 +273012,7 @@ function applyDropInstruction(instruction, srcData, targetPath) {
271483
273012
  return ref3 && (ref3 === `./${comp.path}` || ref3.endsWith(comp.path.split("/").pop()));
271484
273013
  });
271485
273014
  if (!alreadyImported) {
271486
- const relPath = computeRelativePath(tab?.documentPath, comp.path);
273015
+ const relPath = computeRelativePath(tab?.documentPath ?? null, comp.path);
271487
273016
  transact(activeTab.value, (doc2) => {
271488
273017
  if (!doc2.$elements)
271489
273018
  doc2.$elements = [];
@@ -271496,7 +273025,7 @@ function applyDropInstruction(instruction, srcData, targetPath) {
271496
273025
  }
271497
273026
  }
271498
273027
 
271499
- // src/panels/canvas-dnd.js
273028
+ // src/panels/canvas-dnd.ts
271500
273029
  var _activeDropEl = null;
271501
273030
  function registerPanelDnD(panel) {
271502
273031
  const { canvas, dropLine } = panel;
@@ -271645,18 +273174,18 @@ function showCanvasDropIndicator(el, elPath, isLeaf2, panel) {
271645
273174
  dropLine.className = "canvas-drop-indicator line";
271646
273175
  }
271647
273176
 
271648
- // src/panels/panel-events.js
273177
+ // src/panels/panel-events.ts
271649
273178
  init_store();
271650
273179
  init_workspace2();
271651
273180
 
271652
- // src/editor/context-menu.js
273181
+ // src/editor/context-menu.ts
271653
273182
  init_lit_html();
271654
273183
  init_ref();
271655
273184
  init_html_to_jx();
271656
273185
  init_store();
271657
273186
  init_workspace2();
271658
273187
 
271659
- // src/editor/convert-to-repeater.js
273188
+ // src/editor/convert-to-repeater.ts
271660
273189
  init_lit_html();
271661
273190
  init_ref();
271662
273191
  init_store();
@@ -271703,8 +273232,24 @@ async function convertToRepeater() {
271703
273232
  };
271704
273233
  });
271705
273234
  }
271706
- function promptRepeaterConfig(defs) {
273235
+ async function promptRepeaterConfig(defs) {
271707
273236
  const arrayDefs = Object.entries(defs).filter(([, d2]) => d2?.type === "array" || Array.isArray(d2?.default) || d2?.$prototype === "Array");
273237
+ const tab = activeTab.value;
273238
+ const docPath = tab?.documentPath;
273239
+ for (const [name, d2] of Object.entries(defs)) {
273240
+ const def3 = d2;
273241
+ if (!def3?.$prototype || def3.$prototype === "Function" || def3.$prototype === "Array")
273242
+ continue;
273243
+ if (arrayDefs.some(([n2]) => n2 === name))
273244
+ continue;
273245
+ const schema4 = await fetchPluginSchema({
273246
+ ...def3.$src != null && { $src: def3.$src },
273247
+ $prototype: def3.$prototype
273248
+ }, { ...docPath != null && { documentPath: docPath } });
273249
+ if (schema4?.returns?.type === "array") {
273250
+ arrayDefs.push([name, d2]);
273251
+ }
273252
+ }
271708
273253
  const fnDefs = Object.entries(defs).filter(([, d2]) => defCategory(d2) === "function");
271709
273254
  let source = arrayDefs.length > 0 ? arrayDefs[0][0] : "__new__";
271710
273255
  let newDefName = "";
@@ -271731,16 +273276,16 @@ function promptRepeaterConfig(defs) {
271731
273276
  return;
271732
273277
  }
271733
273278
  done({
271734
- items: { $ref: `#/$defs/${name}` },
271735
- filter: filterDef ? { $ref: `#/$defs/${filterDef}` } : undefined,
271736
- sort: sortDef ? { $ref: `#/$defs/${sortDef}` } : undefined,
273279
+ items: { $ref: `#/state/${name}` },
273280
+ ...filterDef && { filter: { $ref: `#/state/${filterDef}` } },
273281
+ ...sortDef && { sort: { $ref: `#/state/${sortDef}` } },
271737
273282
  newDef: { name }
271738
273283
  });
271739
273284
  } else {
271740
273285
  done({
271741
- items: { $ref: `#/$defs/${source}` },
271742
- filter: filterDef ? { $ref: `#/$defs/${filterDef}` } : undefined,
271743
- sort: sortDef ? { $ref: `#/$defs/${sortDef}` } : undefined
273286
+ items: { $ref: `#/state/${source}` },
273287
+ ...filterDef && { filter: { $ref: `#/state/${filterDef}` } },
273288
+ ...sortDef && { sort: { $ref: `#/state/${sortDef}` } }
271744
273289
  });
271745
273290
  }
271746
273291
  }
@@ -271848,10 +273393,10 @@ function promptRepeaterConfig(defs) {
271848
273393
  });
271849
273394
  }
271850
273395
 
271851
- // src/editor/context-menu.js
273396
+ // src/editor/context-menu.ts
271852
273397
  init_components();
271853
273398
 
271854
- // src/panels/layers-panel.js
273399
+ // src/panels/layers-panel.ts
271855
273400
  init_lit_html();
271856
273401
  init_class_map();
271857
273402
  init_if_defined();
@@ -271866,14 +273411,17 @@ function startLayerTitleEdit(path2, rerender) {
271866
273411
  if (!label4)
271867
273412
  return;
271868
273413
  const tab = activeTab.value;
271869
- const node2 = getNodeAtPath(tab?.doc.document, path2);
273414
+ if (!tab)
273415
+ return;
273416
+ const node2 = getNodeAtPath(tab.doc.document, path2);
271870
273417
  if (!node2)
271871
273418
  return;
271872
273419
  label4.style.display = "none";
271873
273420
  const input = document.createElement("input");
271874
273421
  input.className = "layer-title-input";
271875
273422
  input.value = node2.$title || "";
271876
- input.placeholder = nodeLabel({ ...node2, $title: undefined });
273423
+ const { $title: _, ...nodeWithoutTitle } = node2;
273424
+ input.placeholder = nodeLabel(nodeWithoutTitle);
271877
273425
  label4.after(input);
271878
273426
  input.focus();
271879
273427
  input.select();
@@ -271888,7 +273436,7 @@ function startLayerTitleEdit(path2, rerender) {
271888
273436
  committed = true;
271889
273437
  cleanup();
271890
273438
  const val = input.value.trim();
271891
- transactDoc(activeTab.value, (t) => mutateUpdateProperty(t, path2, "$title", val || undefined));
273439
+ transactDoc(tab, (t) => mutateUpdateProperty(t, path2, "$title", val || undefined));
271892
273440
  rerender();
271893
273441
  };
271894
273442
  const cancel = () => {
@@ -271915,7 +273463,7 @@ function renderLayersTemplate(ctx) {
271915
273463
  for (const fn of view.dndCleanups)
271916
273464
  fn();
271917
273465
  view.dndCleanups = [];
271918
- const rows = flattenTree(tab?.doc.document);
273466
+ const rows = flattenTree(tab.doc.document);
271919
273467
  const collapsed2 = view._layersCollapsed || (view._layersCollapsed = new Set);
271920
273468
  const layerRows = [];
271921
273469
  for (const { node: node2, path: path2, depth, nodeType } of rows) {
@@ -271949,12 +273497,12 @@ function renderLayersTemplate(ctx) {
271949
273497
  const jxNode = node2;
271950
273498
  if (path2.length >= 2 && nodeType === "element") {
271951
273499
  const pPath = parentElementPath(path2);
271952
- const parentNode2 = pPath ? getNodeAtPath(tab?.doc.document, pPath) : null;
273500
+ const parentNode2 = pPath ? getNodeAtPath(tab.doc.document, pPath) : null;
271953
273501
  if (parentNode2 && isInlineElement(jxNode, parentNode2))
271954
273502
  continue;
271955
273503
  }
271956
273504
  const key = pathKey(path2);
271957
- const isSelected = pathsEqual(path2, tab?.session.selection);
273505
+ const isSelected = pathsEqual(path2, tab.session.selection);
271958
273506
  const hasChildren = Array.isArray(jxNode.children) && jxNode.children.length > 0;
271959
273507
  const hasMapChildren = jxNode.children && typeof jxNode.children === "object" && jxNode.children.$prototype === "Array";
271960
273508
  const hasCases = jxNode.$switch && jxNode.cases && typeof jxNode.cases === "object" && Object.keys(jxNode.cases).length > 0;
@@ -271993,7 +273541,7 @@ function renderLayersTemplate(ctx) {
271993
273541
  const isRoot = tab?.doc.mode === "content" ? path2.length === 0 : path2.length < 2;
271994
273542
  const idx = isElement ? childIndex(path2) : 0;
271995
273543
  const parentPath = isElement && !isRoot ? parentElementPath(path2) : null;
271996
- const parentNode = parentPath ? getNodeAtPath(tab?.doc.document, parentPath) : null;
273544
+ const parentNode = parentPath ? getNodeAtPath(tab.doc.document, parentPath) : null;
271997
273545
  const siblingCount = parentNode?.children?.length || 0;
271998
273546
  const canMoveUp = isElement && !isRoot && idx > 0;
271999
273547
  const canMoveDown = isElement && !isRoot && idx < siblingCount - 1;
@@ -272086,7 +273634,7 @@ function renderLayersTemplate(ctx) {
272086
273634
  e.currentTarget.blur();
272087
273635
  const pp = parentPath;
272088
273636
  const prevPath = [...pp, idx - 1];
272089
- const prev = getNodeAtPath(activeTab.value?.doc.document, prevPath);
273637
+ const prev = getNodeAtPath(activeTab.value.doc.document, prevPath);
272090
273638
  const len = prev?.children?.length || 0;
272091
273639
  transactDoc(activeTab.value, (t) => mutateMoveNode(t, path2, prevPath, len));
272092
273640
  }}
@@ -272152,7 +273700,7 @@ function renderLayersTemplate(ctx) {
272152
273700
  `;
272153
273701
  }
272154
273702
 
272155
- // src/editor/context-menu.js
273703
+ // src/editor/context-menu.ts
272156
273704
  var JX_MIME = "web application/jx+json";
272157
273705
  function nodeToHtml(node2) {
272158
273706
  if (typeof node2 === "string")
@@ -272292,7 +273840,9 @@ function showContextMenu(e, path2, opts = {}) {
272292
273840
  e.preventDefault();
272293
273841
  dismissContextMenu();
272294
273842
  const tab = activeTab.value;
272295
- const node2 = getNodeAtPath(tab?.doc.document, path2);
273843
+ if (!tab)
273844
+ return;
273845
+ const node2 = getNodeAtPath(tab.doc.document, path2);
272296
273846
  if (!node2)
272297
273847
  return;
272298
273848
  tab.session.selection = path2;
@@ -272452,7 +274002,7 @@ function showContextMenu(e, path2, opts = {}) {
272452
274002
  });
272453
274003
  }
272454
274004
 
272455
- // src/editor/insertion-helper.js
274005
+ // src/editor/insertion-helper.ts
272456
274006
  init_workspace2();
272457
274007
  var _ctx8 = null;
272458
274008
  var _helper = null;
@@ -272629,7 +274179,7 @@ function onSlashSelect(cmd, point4) {
272629
274179
  hide2();
272630
274180
  }
272631
274181
 
272632
- // src/panels/panel-events.js
274182
+ // src/panels/panel-events.ts
272633
274183
  var _ctx9 = null;
272634
274184
  function initPanelEvents(ctx) {
272635
274185
  _ctx9 = ctx;
@@ -272798,7 +274348,7 @@ function registerPanelEvents(panel) {
272798
274348
  view.canvasEventCleanups.push(() => unmount());
272799
274349
  }
272800
274350
 
272801
- // src/canvas/canvas-diff.js
274351
+ // src/canvas/canvas-diff.ts
272802
274352
  function valuesEqual(a, b) {
272803
274353
  if (a === b)
272804
274354
  return true;
@@ -272896,7 +274446,7 @@ function computeDocumentDiff(originalDoc, currentDoc) {
272896
274446
  return { byPath: diffMap, allPaths };
272897
274447
  }
272898
274448
 
272899
- // src/panels/pseudo-preview.js
274449
+ // src/panels/pseudo-preview.ts
272900
274450
  init_store();
272901
274451
  init_workspace2();
272902
274452
  var pseudoStyleHost = document.createElement("div");
@@ -272940,7 +274490,7 @@ function updateForcedPseudoPreview() {
272940
274490
  view.forcedStyleTag = tag3;
272941
274491
  }
272942
274492
 
272943
- // src/panels/editors.js
274493
+ // src/panels/editors.ts
272944
274494
  init_lit_html();
272945
274495
  init_ref();
272946
274496
  init_store();
@@ -273107,7 +274657,7 @@ function registerFunctionCompletions() {
273107
274657
  });
273108
274658
  }
273109
274659
 
273110
- // src/panels/overlays.js
274660
+ // src/panels/overlays.ts
273111
274661
  init_lit_html();
273112
274662
  init_style_map();
273113
274663
  init_store();
@@ -273237,7 +274787,7 @@ function _flush() {
273237
274787
  _ctx10.renderBlockActionBar();
273238
274788
  }
273239
274789
 
273240
- // src/canvas/canvas-render.js
274790
+ // src/canvas/canvas-render.ts
273241
274791
  var _ctx11 = null;
273242
274792
  var _prevStylebookFilter = "";
273243
274793
  var _prevStylebookCustomizedOnly = false;
@@ -273385,6 +274935,8 @@ function renderCanvas() {
273385
274935
  clearTimeout(debounce);
273386
274936
  debounce = setTimeout(() => {
273387
274937
  const tab2 = activeTab.value;
274938
+ if (!tab2)
274939
+ return;
273388
274940
  if (lang === "json") {
273389
274941
  try {
273390
274942
  tab2.doc.document = JSON.parse(editor2.getValue());
@@ -273544,10 +275096,15 @@ function renderCanvas() {
273544
275096
  ${panelEntries.map((e) => e.tpl)}
273545
275097
  </div>
273546
275098
  `, canvasWrap);
273547
- for (const { panel, activeSet } of panelEntries) {
275099
+ for (let i2 = 0;i2 < panelEntries.length; i2++) {
275100
+ const { panel, activeSet } = panelEntries[i2];
273548
275101
  const p = panel;
273549
275102
  canvasPanels.push(p);
273550
- renderCanvasIntoPanel(p, activeSet, featureToggles);
275103
+ if (i2 === 0) {
275104
+ renderCanvasIntoPanel(p, activeSet, featureToggles);
275105
+ } else {
275106
+ setTimeout(() => renderCanvasIntoPanel(p, activeSet, featureToggles), 0);
275107
+ }
273551
275108
  }
273552
275109
  updateActivePanelHeaders();
273553
275110
  applyTransform();
@@ -273662,7 +275219,7 @@ function renderOverlays() {
273662
275219
  render4();
273663
275220
  }
273664
275221
 
273665
- // src/files/files.js
275222
+ // src/files/files.ts
273666
275223
  init_lit_html();
273667
275224
  init_class_map();
273668
275225
  init_ref();
@@ -273715,7 +275272,10 @@ async function loadProject() {
273715
275272
  }
273716
275273
  } catch {}
273717
275274
  }
273718
- async function openProject({ renderActivityBar, renderLeftPanel }) {
275275
+ async function openProject({
275276
+ renderActivityBar,
275277
+ renderLeftPanel
275278
+ }) {
273719
275279
  try {
273720
275280
  const platform3 = getPlatform();
273721
275281
  const result = await platform3.openProject();
@@ -274327,7 +275887,7 @@ async function openFileInTab(path2) {
274327
275887
  id,
274328
275888
  documentPath: path2,
274329
275889
  document: document4,
274330
- frontmatter: frontmatter2,
275890
+ ...frontmatter2 != null && { frontmatter: frontmatter2 },
274331
275891
  sourceFormat: path2.endsWith(".md") ? "md" : null
274332
275892
  });
274333
275893
  requireProjectState().selectedPath = path2;
@@ -274364,7 +275924,7 @@ async function reloadFileInTab(path2) {
274364
275924
  }
274365
275925
  }
274366
275926
 
274367
- // src/panels/imports-panel.js
275927
+ // src/panels/imports-panel.ts
274368
275928
  init_lit_html();
274369
275929
  init_components();
274370
275930
  init_store();
@@ -274629,9 +276189,7 @@ function renderDocumentLevelImports({
274629
276189
  <div class="imports-list">
274630
276190
  ${refEntries.map((entry) => html3`
274631
276191
  <div class="import-row">
274632
- <span
274633
- class="import-path"
274634
- title=${entry.$ref}
276192
+ <span class="import-path" title=${entry.$ref}
274635
276193
  >${entry.$ref}</span
274636
276194
  >
274637
276195
  <sp-action-button
@@ -274717,19 +276275,22 @@ function renderDocumentLevelImports({
274717
276275
  `;
274718
276276
  }
274719
276277
 
274720
- // src/panels/head-panel.js
276278
+ // src/panels/head-panel.ts
274721
276279
  init_lit_html();
274722
276280
  init_live();
274723
276281
  init_store();
274724
276282
  init_workspace2();
274725
276283
 
274726
- // src/utils/studio-utils.js
276284
+ // src/utils/studio-utils.ts
274727
276285
  function camelToKebab3(str) {
274728
276286
  return str.replace(/[A-Z]/g, (c) => "-" + c.toLowerCase());
274729
276287
  }
274730
276288
  function camelToLabel(prop) {
274731
276289
  return prop.replace(/([A-Z])/g, " $1").replace(/^./, (c) => c.toUpperCase());
274732
276290
  }
276291
+ function toCamelCase(str) {
276292
+ return str.replace(/[^a-zA-Z0-9]+(.)?/g, (_, c) => c ? c.toUpperCase() : "").replace(/^[A-Z]/, (c) => c.toLowerCase());
276293
+ }
274733
276294
  function kebabToLabel(val) {
274734
276295
  return val.replace(/(^|-)(\w)/g, (_, sep2, c) => (sep2 ? " " : "") + c.toUpperCase());
274735
276296
  }
@@ -274834,7 +276395,7 @@ function parseCemType(typeText) {
274834
276395
  return { kind: "text" };
274835
276396
  }
274836
276397
 
274837
- // src/utils/google-fonts.js
276398
+ // src/utils/google-fonts.ts
274838
276399
  var GFONTS_CSS_PREFIX = "https://fonts.googleapis.com/css2?";
274839
276400
  var GFONTS_PRECONNECT_ORIGINS = [
274840
276401
  "https://fonts.googleapis.com",
@@ -274874,7 +276435,7 @@ function cleanupGoogleFontPreconnects(head) {
274874
276435
  return head;
274875
276436
  }
274876
276437
 
274877
- // src/panels/head-panel.js
276438
+ // src/panels/head-panel.ts
274878
276439
  init_platform3();
274879
276440
  var layoutEntries = null;
274880
276441
  async function loadLayoutEntries() {
@@ -275018,7 +276579,11 @@ function renderMetaFieldRow(field, head, applyMutation) {
275018
276579
  widget
275019
276580
  });
275020
276581
  }
275021
- function renderHeadTemplate({ document: doc, applyMutation, renderLeftPanel }) {
276582
+ function renderHeadTemplate({
276583
+ document: doc,
276584
+ applyMutation,
276585
+ renderLeftPanel
276586
+ }) {
275022
276587
  const head = doc.$head ?? [];
275023
276588
  const title = doc.title ?? "";
275024
276589
  const iconEntry = findLinkEntry(head, "icon");
@@ -275236,8 +276801,9 @@ function renderFrontmatterSection() {
275236
276801
  return nothing;
275237
276802
  const fm = tab.doc.content?.frontmatter || {};
275238
276803
  const col = findContentTypeSchema(tab.documentPath, projectState?.projectConfig);
275239
- const schemaProps = col?.schema?.properties;
275240
- const requiredFields = new Set(col?.schema?.required || []);
276804
+ const schema4 = col?.schema;
276805
+ const schemaProps = schema4?.properties;
276806
+ const requiredFields = new Set(schema4?.required || []);
275241
276807
  const fields = [];
275242
276808
  if (schemaProps) {
275243
276809
  for (const [field, fieldSchema] of Object.entries(schemaProps)) {
@@ -275384,10 +276950,10 @@ function renderFmField(field, entry, value2, requiredFields) {
275384
276950
  });
275385
276951
  }
275386
276952
 
275387
- // src/studio.js
276953
+ // src/studio.ts
275388
276954
  init_platform3();
275389
276955
 
275390
- // src/platforms/devserver.js
276956
+ // src/platforms/devserver.ts
275391
276957
  function createDevServerPlatform() {
275392
276958
  let _projectRoot = "";
275393
276959
  function serverPath(rel) {
@@ -275807,7 +277373,7 @@ function createDevServerPlatform() {
275807
277373
  };
275808
277374
  }
275809
277375
 
275810
- // src/resize-edges.js
277376
+ // src/resize-edges.ts
275811
277377
  var g2 = globalThis;
275812
277378
  var EDGES = [
275813
277379
  "top",
@@ -275874,7 +277440,7 @@ async function startResize(e, edge, wc) {
275874
277440
  document.addEventListener("mouseup", onUp);
275875
277441
  }
275876
277442
 
275877
- // src/studio.js
277443
+ // src/studio.ts
275878
277444
  init_components();
275879
277445
  init_lit_html();
275880
277446
  // data/webdata.json
@@ -277494,7 +279060,7 @@ var webdata_default = {
277494
279060
  ]
277495
279061
  };
277496
279062
 
277497
- // src/panels/data-explorer.js
279063
+ // src/panels/data-explorer.ts
277498
279064
  init_lit_html();
277499
279065
  init_class_map();
277500
279066
  var expandedDataKeys = new Set;
@@ -277580,8 +279146,8 @@ function renderDataTreeTemplate(value2, depth, maxDepth = 5) {
277580
279146
  </div>`;
277581
279147
  }
277582
279148
  if (Array.isArray(value2)) {
277583
- const cap3 = 20;
277584
- const items2 = value2.slice(0, cap3).map((item, i2) => {
279149
+ const cap4 = 20;
279150
+ const items2 = value2.slice(0, cap4).map((item, i2) => {
277585
279151
  if (item === null || item === undefined || typeof item !== "object") {
277586
279152
  const valText = typeof item === "string" && item.length > 80 ? `"${item.slice(0, 80)}…"` : JSON.stringify(item);
277587
279153
  return html3`<div class="data-branch" style="padding-left:${indent2}">
@@ -277598,14 +279164,14 @@ function renderDataTreeTemplate(value2, depth, maxDepth = 5) {
277598
279164
  ${renderDataTreeTemplate(item, depth + 1, maxDepth)}
277599
279165
  `;
277600
279166
  });
277601
- return html3`${items2}${value2.length > cap3 ? html3`<div class="data-leaf data-ellipsis" style="padding-left:${indent2}">
277602
- … ${value2.length - cap3} more
279167
+ return html3`${items2}${value2.length > cap4 ? html3`<div class="data-leaf data-ellipsis" style="padding-left:${indent2}">
279168
+ … ${value2.length - cap4} more
277603
279169
  </div>` : nothing}`;
277604
279170
  }
277605
279171
  const obj = value2;
277606
279172
  const keys = Object.keys(obj);
277607
- const cap2 = 30;
277608
- const items = keys.slice(0, cap2).map((key) => {
279173
+ const cap3 = 30;
279174
+ const items = keys.slice(0, cap3).map((key) => {
277609
279175
  const v = obj[key];
277610
279176
  if (v === null || v === undefined || typeof v !== "object") {
277611
279177
  const valText = typeof v === "string" && v.length > 80 ? `"${v.slice(0, 80)}…"` : JSON.stringify(v);
@@ -277623,8 +279189,8 @@ function renderDataTreeTemplate(value2, depth, maxDepth = 5) {
277623
279189
  ${renderDataTreeTemplate(v, depth + 1, maxDepth)}
277624
279190
  `;
277625
279191
  });
277626
- return html3`${items}${keys.length > cap2 ? html3`<div class="data-leaf data-ellipsis" style="padding-left:${indent2}">
277627
- … ${keys.length - cap2} more
279192
+ return html3`${items}${keys.length > cap3 ? html3`<div class="data-leaf data-ellipsis" style="padding-left:${indent2}">
279193
+ … ${keys.length - cap3} more
277628
279194
  </div>` : nothing}`;
277629
279195
  }
277630
279196
 
@@ -281663,7 +283229,7 @@ __decorateClass21([
281663
283229
  query("#form")
281664
283230
  ], Search.prototype, "form", 2);
281665
283231
 
281666
- // src/ui/spectrum.js
283232
+ // src/ui/spectrum.ts
281667
283233
  init_Popover_dev();
281668
283234
 
281669
283235
  // ../../node_modules/.bun/@spectrum-web-components+menu@1.12.1/node_modules/@spectrum-web-components/menu/src/Menu.dev.js
@@ -289832,10 +291398,10 @@ function $6c7bd7858deea686$var$getSymbols(locale, formatter2, intlOptions, origi
289832
291398
  index: index2
289833
291399
  };
289834
291400
  }
289835
- function $6c7bd7858deea686$var$replaceAll(str, find2, replace2) {
291401
+ function $6c7bd7858deea686$var$replaceAll(str, find3, replace2) {
289836
291402
  if (str.replaceAll)
289837
- return str.replaceAll(find2, replace2);
289838
- return str.split(find2).join(replace2);
291403
+ return str.replaceAll(find3, replace2);
291404
+ return str.split(find3).join(replace2);
289839
291405
  }
289840
291406
  function $6c7bd7858deea686$var$escapeRegex(string6) {
289841
291407
  return string6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -293597,7 +295163,7 @@ class Divider extends DividerBase {
293597
295163
  }
293598
295164
  Divider.styles = [divider_css_default];
293599
295165
 
293600
- // src/ui/spectrum.js
295166
+ // src/ui/spectrum.ts
293601
295167
  init_Tooltip_dev();
293602
295168
  init_Overlay_dev();
293603
295169
 
@@ -294749,7 +296315,7 @@ __decorateClass50([
294749
296315
  property({ reflect: true })
294750
296316
  ], HelpText.prototype, "variant", 2);
294751
296317
 
294752
- // src/ui/spectrum.js
296318
+ // src/ui/spectrum.ts
294753
296319
  init_Underlay_dev();
294754
296320
 
294755
296321
  // ../../node_modules/.bun/@spectrum-web-components+accordion@1.12.1/node_modules/@spectrum-web-components/accordion/src/Accordion.dev.js
@@ -300766,7 +302332,7 @@ class IconCheckmark extends IconBase {
300766
302332
  }
300767
302333
  }
300768
302334
 
300769
- // src/ui/value-selector.js
302335
+ // src/ui/value-selector.ts
300770
302336
  init_lit();
300771
302337
  init_live2();
300772
302338
 
@@ -300867,7 +302433,7 @@ class JxValueSelector extends LitElement {
300867
302433
  }
300868
302434
  }
300869
302435
 
300870
- // src/ui/color-selector.js
302436
+ // src/ui/color-selector.ts
300871
302437
  init_lit();
300872
302438
  init_lit_html();
300873
302439
  init_live();
@@ -301097,7 +302663,7 @@ function isColorPopoverOpen() {
301097
302663
  return !!document.querySelector(".style-input-color sp-overlay[open]");
301098
302664
  }
301099
302665
 
301100
- // src/ui/spectrum.js
302666
+ // src/ui/spectrum.ts
301101
302667
  var components = [
301102
302668
  ["sp-theme", Theme],
301103
302669
  ["sp-tabs", Tabs],
@@ -301234,7 +302800,7 @@ Theme.registerThemeFragment("spectrum", "system", theme_css_default);
301234
302800
  Theme.registerThemeFragment("dark", "color", theme_dark_css_default);
301235
302801
  Theme.registerThemeFragment("medium", "scale", scale_medium_css_default);
301236
302802
 
301237
- // src/ui/panel-resize.js
302803
+ // src/ui/panel-resize.ts
301238
302804
  var STORAGE_KEY3 = "jx-studio-panel-widths";
301239
302805
  var MIN_WIDTH2 = 160;
301240
302806
  var MAX_RATIO = 0.5;
@@ -301303,11 +302869,11 @@ if (resizeLeft)
301303
302869
  if (resizeRight)
301304
302870
  setupHandle(resizeRight, "--panel-w-right", "right", DEFAULT_RIGHT);
301305
302871
 
301306
- // src/editor/shortcuts.js
302872
+ // src/editor/shortcuts.ts
301307
302873
  init_store();
301308
302874
  init_workspace2();
301309
302875
 
301310
- // src/panels/quick-search.js
302876
+ // src/panels/quick-search.ts
301311
302877
  init_lit_html();
301312
302878
  init_class_map();
301313
302879
  init_live();
@@ -301454,7 +303020,7 @@ function renderOverlay() {
301454
303020
  render2(tpl, container);
301455
303021
  }
301456
303022
 
301457
- // src/editor/shortcuts.js
303023
+ // src/editor/shortcuts.ts
301458
303024
  function initShortcuts(getContext) {
301459
303025
  canvasWrap.addEventListener("wheel", (e20) => {
301460
303026
  const { canvasMode, panX, panY, setPan, applyTransform: applyTransform2 } = getContext();
@@ -301706,23 +303272,23 @@ function navigateSelection(direction = -1) {
301706
303272
  }
301707
303273
  }
301708
303274
 
301709
- // src/panels/activity-bar.js
303275
+ // src/panels/activity-bar.ts
301710
303276
  init_lit_html();
301711
303277
  init_store();
301712
303278
  init_reactivity();
301713
303279
  init_workspace2();
301714
303280
 
301715
- // src/settings/settings-modal.js
303281
+ // src/settings/settings-modal.ts
301716
303282
  init_lit_html();
301717
303283
  init_class_map();
301718
303284
  init_ref();
301719
303285
 
301720
- // src/settings/defs-editor.js
303286
+ // src/settings/defs-editor.ts
301721
303287
  init_lit_html();
301722
303288
  init_platform3();
301723
303289
  init_store();
301724
303290
 
301725
- // src/settings/schema-field-ui.js
303291
+ // src/settings/schema-field-ui.ts
301726
303292
  init_lit_html();
301727
303293
  var FIELD_TYPES = ["string", "number", "boolean", "array", "object", "reference"];
301728
303294
  var FORMAT_OPTIONS = ["", "image", "date", "color"];
@@ -301747,6 +303313,9 @@ function fieldCardTpl(fieldName, fieldSchema, isRequired, handlers, contentTypeN
301747
303313
  return html3`
301748
303314
  <div class="schema-field-card">
301749
303315
  <div class="schema-field-row">
303316
+ <sp-field-label size="s" class="schema-field-label"
303317
+ >${camelToLabel(fieldName)}</sp-field-label
303318
+ >
301750
303319
  <sp-textfield
301751
303320
  size="s"
301752
303321
  quiet
@@ -302011,7 +303580,7 @@ function yamlDefault(type2, format3) {
302011
303580
  }
302012
303581
  }
302013
303582
 
302014
- // src/settings/defs-editor.js
303583
+ // src/settings/defs-editor.ts
302015
303584
  var selectedDef = null;
302016
303585
  var showAddField = false;
302017
303586
  var newFieldState = { name: "", type: "string", format: "", required: false };
@@ -302341,7 +303910,7 @@ function renderDefsEditor(container) {
302341
303910
  render2(tpl, container);
302342
303911
  }
302343
303912
 
302344
- // src/settings/content-types-editor.js
303913
+ // src/settings/content-types-editor.ts
302345
303914
  init_lit_html();
302346
303915
  init_repeat();
302347
303916
  init_platform3();
@@ -302385,9 +303954,10 @@ function handleNewContentType(rerender) {
302385
303954
  });
302386
303955
  }
302387
303956
  function handleAddField2(rerender) {
302388
- const name = newFieldState2.name.trim();
302389
- if (!name || !selectedContentType)
303957
+ const raw = newFieldState2.name.trim();
303958
+ if (!raw || !selectedContentType)
302390
303959
  return;
303960
+ const name = toCamelCase(raw);
302391
303961
  const schema4 = getSelectedSchema();
302392
303962
  if (!schema4)
302393
303963
  return;
@@ -302432,15 +304002,16 @@ function handleToggleRequired2(fieldName, rerender) {
302432
304002
  }
302433
304003
  function handleRenameField2(oldName, newName, rerender) {
302434
304004
  const schema4 = getSelectedSchema();
302435
- if (!schema4?.properties || !newName || schema4.properties[newName])
304005
+ const normalized = toCamelCase(newName);
304006
+ if (!schema4?.properties || !normalized || schema4.properties[normalized])
302436
304007
  return;
302437
304008
  const newProps = {};
302438
304009
  for (const [key, val] of Object.entries(schema4.properties)) {
302439
- newProps[key === oldName ? newName : key] = val;
304010
+ newProps[key === oldName ? normalized : key] = val;
302440
304011
  }
302441
304012
  schema4.properties = newProps;
302442
304013
  if (schema4.required) {
302443
- schema4.required = schema4.required.map((r8) => r8 === oldName ? newName : r8);
304014
+ schema4.required = schema4.required.map((r8) => r8 === oldName ? normalized : r8);
302444
304015
  }
302445
304016
  rerender();
302446
304017
  saveProjectConfig2();
@@ -302477,14 +304048,17 @@ function handleAddNestedField2(parentName, fieldState, rerender) {
302477
304048
  const parent = schema4?.properties?.[parentName];
302478
304049
  if (!parent)
302479
304050
  return;
304051
+ const name = toCamelCase(fieldState.name);
304052
+ if (!name)
304053
+ return;
302480
304054
  if (!parent.properties)
302481
304055
  parent.properties = {};
302482
- parent.properties[fieldState.name] = schemaForType(fieldState.type);
304056
+ parent.properties[name] = schemaForType(fieldState.type);
302483
304057
  if (fieldState.required) {
302484
304058
  if (!parent.required)
302485
304059
  parent.required = [];
302486
- if (!parent.required.includes(fieldState.name))
302487
- parent.required.push(fieldState.name);
304060
+ if (!parent.required.includes(name))
304061
+ parent.required.push(name);
302488
304062
  }
302489
304063
  rerender();
302490
304064
  saveProjectConfig2();
@@ -302519,15 +304093,16 @@ function handleToggleNestedRequired2(parentName, childName, rerender) {
302519
304093
  function handleRenameNested2(parentName, oldChild, newChild, rerender) {
302520
304094
  const schema4 = getSelectedSchema();
302521
304095
  const parent = schema4?.properties?.[parentName];
302522
- if (!parent?.properties || !newChild || parent.properties[newChild])
304096
+ const normalized = toCamelCase(newChild);
304097
+ if (!parent?.properties || !normalized || parent.properties[normalized])
302523
304098
  return;
302524
304099
  const newProps = {};
302525
304100
  for (const [key, val] of Object.entries(parent.properties)) {
302526
- newProps[key === oldChild ? newChild : key] = val;
304101
+ newProps[key === oldChild ? normalized : key] = val;
302527
304102
  }
302528
304103
  parent.properties = newProps;
302529
304104
  if (parent.required) {
302530
- parent.required = parent.required.map((r8) => r8 === oldChild ? newChild : r8);
304105
+ parent.required = parent.required.map((r8) => r8 === oldChild ? normalized : r8);
302531
304106
  }
302532
304107
  rerender();
302533
304108
  saveProjectConfig2();
@@ -302688,7 +304263,7 @@ function renderContentTypesEditor(container) {
302688
304263
  render2(tpl, container);
302689
304264
  }
302690
304265
 
302691
- // src/settings/css-vars-editor.js
304266
+ // src/settings/css-vars-editor.ts
302692
304267
  init_lit_html();
302693
304268
  init_ref();
302694
304269
  init_store();
@@ -302912,7 +304487,7 @@ function renderAddRow(prefix, placeholder, valuePlaceholder, addVar) {
302912
304487
  `;
302913
304488
  }
302914
304489
 
302915
- // src/settings/head-editor.js
304490
+ // src/settings/head-editor.ts
302916
304491
  init_lit_html();
302917
304492
  init_store();
302918
304493
  function renderHeadEditor(container) {
@@ -303150,7 +304725,7 @@ function renderGoogleFontsSection(headEntries, save, rerender) {
303150
304725
  `;
303151
304726
  }
303152
304727
 
303153
- // src/settings/general-settings.js
304728
+ // src/settings/general-settings.ts
303154
304729
  init_lit_html();
303155
304730
  init_store();
303156
304731
  init_platform3();
@@ -303300,7 +304875,7 @@ function renderGeneralSettings(container) {
303300
304875
  render2(tpl, container);
303301
304876
  }
303302
304877
 
303303
- // src/settings/settings-modal.js
304878
+ // src/settings/settings-modal.ts
303304
304879
  var _handle = null;
303305
304880
  var _activeSection = "general";
303306
304881
  var _contentEl = null;
@@ -303395,7 +304970,7 @@ function renderActiveSection() {
303395
304970
  }
303396
304971
  }
303397
304972
 
303398
- // src/panels/activity-bar.js
304973
+ // src/panels/activity-bar.ts
303399
304974
  var _scope3 = null;
303400
304975
  function mount4() {
303401
304976
  _scope3 = effectScope();
@@ -303507,18 +305082,18 @@ function renderActivityBar() {
303507
305082
  render2(tpl, activityBar);
303508
305083
  }
303509
305084
 
303510
- // src/panels/toolbar.js
305085
+ // src/panels/toolbar.ts
303511
305086
  init_lit_html();
303512
305087
  init_store();
303513
305088
  init_reactivity();
303514
305089
  init_workspace2();
303515
305090
  init_platform3();
303516
305091
 
303517
- // src/browse/browse-modal.js
305092
+ // src/browse/browse-modal.ts
303518
305093
  init_lit_html();
303519
305094
  init_ref();
303520
305095
 
303521
- // src/browse/browse.js
305096
+ // src/browse/browse.ts
303522
305097
  init_lit_html();
303523
305098
  init_ref();
303524
305099
  init_repeat();
@@ -304149,7 +305724,7 @@ function invalidateBrowseCache() {
304149
305724
  _previewCache.clear();
304150
305725
  }
304151
305726
 
304152
- // src/browse/browse-modal.js
305727
+ // src/browse/browse-modal.ts
304153
305728
  var _handle2 = null;
304154
305729
  var _escHandler = null;
304155
305730
  function openBrowseModal() {
@@ -304199,7 +305774,7 @@ function closeBrowseModal() {
304199
305774
  _handle2 = null;
304200
305775
  }
304201
305776
 
304202
- // src/new-project/new-project-modal.js
305777
+ // src/new-project/new-project-modal.ts
304203
305778
  init_lit_html();
304204
305779
  init_platform3();
304205
305780
  var _handle3 = null;
@@ -304359,7 +305934,7 @@ function renderModal2() {
304359
305934
  }
304360
305935
  var _dirDerived = true;
304361
305936
 
304362
- // src/panels/toolbar.js
305937
+ // src/panels/toolbar.ts
304363
305938
  var _rootEl = null;
304364
305939
  var _ctx12 = null;
304365
305940
  var _scope4 = null;
@@ -304619,7 +306194,9 @@ function toolbarTemplate() {
304619
306194
  ctx.setCanvasMode(m3.key);
304620
306195
  view.panX = 0;
304621
306196
  view.panY = 0;
304622
- const uiPatch = { editingFunction: null };
306197
+ const uiPatch = {
306198
+ editingFunction: null
306199
+ };
304623
306200
  if (m3.key === "stylebook")
304624
306201
  uiPatch.rightTab = "style";
304625
306202
  updateSession({ ui: uiPatch });
@@ -304771,13 +306348,13 @@ function toolbarTemplate() {
304771
306348
  `;
304772
306349
  }
304773
306350
 
304774
- // src/panels/right-panel.js
306351
+ // src/panels/right-panel.ts
304775
306352
  init_lit_html();
304776
306353
  init_store();
304777
306354
  init_reactivity();
304778
306355
  init_workspace2();
304779
306356
 
304780
- // src/panels/events-panel.js
306357
+ // src/panels/events-panel.ts
304781
306358
  init_store();
304782
306359
  init_lit_html();
304783
306360
  init_live();
@@ -304805,7 +306382,7 @@ function eventsSidebarTemplate(helpers) {
304805
306382
  if (!node2)
304806
306383
  return html3`<div class="empty-state">Node not found</div>`;
304807
306384
  const defs = document4.state || {};
304808
- const functionDefs = Object.entries(defs).filter(([, d3]) => d3.$prototype === "Function" || d3.$handler);
306385
+ const functionDefs = Object.entries(defs).filter(([, d3]) => d3?.$prototype === "Function" || d3?.$handler);
304809
306386
  let declaredEventsT = nothing;
304810
306387
  if (isCustomElementDoc2()) {
304811
306388
  const allEmits = [];
@@ -304823,7 +306400,9 @@ function eventsSidebarTemplate(helpers) {
304823
306400
  <div class="declared-event-row" title=${ev.description || ""}>
304824
306401
  <code class="event-code">${ev.name || "(unnamed)"}</code>
304825
306402
  <span class="event-source">← ${ev._fn}</span>
304826
- ${ev.type?.text ? html3`<span class="event-type">${ev.type.text}</span>` : nothing}
306403
+ ${ev.type?.text ? html3`<span class="event-type"
306404
+ >${ev.type.text}</span
306405
+ >` : nothing}
304827
306406
  </div>
304828
306407
  `)}
304829
306408
  </div>
@@ -304994,14 +306573,14 @@ function eventsSidebarTemplate(helpers) {
304994
306573
  `;
304995
306574
  }
304996
306575
 
304997
- // src/panels/style-panel.js
306576
+ // src/panels/style-panel.ts
304998
306577
  init_lit_html();
304999
306578
  init_live();
305000
306579
  init_if_defined();
305001
306580
  init_store();
305002
306581
  init_workspace2();
305003
306582
 
305004
- // src/utils/inherited-style.js
306583
+ // src/utils/inherited-style.ts
305005
306584
  function computeInheritedStyle(style2, mediaNames, activeTab2, activeSelector = null) {
305006
306585
  if (activeTab2 === null || mediaNames.length === 0)
305007
306586
  return {};
@@ -305039,7 +306618,7 @@ function computeInheritedStyle(style2, mediaNames, activeTab2, activeSelector =
305039
306618
  return inherited;
305040
306619
  }
305041
306620
 
305042
- // src/panels/style-utils.js
306621
+ // src/panels/style-utils.ts
305043
306622
  init_store();
305044
306623
  init_workspace2();
305045
306624
  // data/css-meta.json
@@ -306531,7 +308110,7 @@ var css_meta_default = {
306531
308110
  }
306532
308111
  };
306533
308112
 
306534
- // src/panels/style-utils.js
308113
+ // src/panels/style-utils.ts
306535
308114
  var cssInitialMap = new Map;
306536
308115
  function initCssData(webdata) {
306537
308116
  cssInitialMap = new Map(webdata.cssProps);
@@ -306683,19 +308262,19 @@ function currentFontFamily() {
306683
308262
  return raw;
306684
308263
  }
306685
308264
 
306686
- // src/panels/style-inputs.js
308265
+ // src/panels/style-inputs.ts
306687
308266
  init_lit_html();
306688
308267
  init_live();
306689
308268
  init_store();
306690
308269
  init_workspace2();
306691
308270
 
306692
- // src/ui/widgets.js
308271
+ // src/ui/widgets.ts
306693
308272
  init_lit_html();
306694
308273
  init_live();
306695
308274
  init_if_defined();
306696
308275
  init_store();
306697
308276
 
306698
- // src/ui/unit-selector.js
308277
+ // src/ui/unit-selector.ts
306699
308278
  init_lit_html();
306700
308279
  init_live();
306701
308280
  init_class_map();
@@ -306773,11 +308352,11 @@ function renderUnitSelector(entry, prop, value2, onChange, placeholder = "") {
306773
308352
  `;
306774
308353
  }
306775
308354
 
306776
- // src/ui/button-group.js
308355
+ // src/ui/button-group.ts
306777
308356
  init_lit_html();
306778
308357
  init_class_map();
306779
308358
 
306780
- // src/ui/icons.js
308359
+ // src/ui/icons.ts
306781
308360
  init_lit();
306782
308361
  var icons = {
306783
308362
  "arrow-right": html3`<sp-icon-arrow-right slot="icon"></sp-icon-arrow-right>`,
@@ -306816,7 +308395,7 @@ var icons = {
306816
308395
  };
306817
308396
  var icons_default = icons;
306818
308397
 
306819
- // src/ui/button-group.js
308398
+ // src/ui/button-group.ts
306820
308399
  function renderButtonGroup(entry, prop, value2, onChange) {
306821
308400
  const values2 = entry.$buttonValues || entry.enum || [];
306822
308401
  const iconMap = entry.$icons || {};
@@ -306825,7 +308404,7 @@ function renderButtonGroup(entry, prop, value2, onChange) {
306825
308404
  const extra = buttonValues && enumValues && enumValues.length > buttonValues.length ? enumValues.filter((v) => !buttonValues.includes(v)) : [];
306826
308405
  const menuId = `style-btngrp-${prop}`;
306827
308406
  const hasExtra = extra.length > 0;
306828
- const extraSelected = hasExtra && extra.includes(value2);
308407
+ const extraSelected = hasExtra && extra.includes(String(value2));
306829
308408
  return html3`
306830
308409
  <div class=${classMap({ "button-group-combo": true, "has-overflow": hasExtra })}>
306831
308410
  <sp-action-group size="s" compact>
@@ -306870,7 +308449,7 @@ function renderButtonGroup(entry, prop, value2, onChange) {
306870
308449
  `;
306871
308450
  }
306872
308451
 
306873
- // src/ui/widgets.js
308452
+ // src/ui/widgets.ts
306874
308453
  function renderTextInput(prop, value2, onChange, placeholder = "") {
306875
308454
  return html3`
306876
308455
  <sp-textfield
@@ -306928,7 +308507,7 @@ function widgetForType(type2, entry, prop, value2, onCommit, opts = {}) {
306928
308507
  }
306929
308508
  }
306930
308509
 
306931
- // src/panels/style-inputs.js
308510
+ // src/panels/style-inputs.ts
306932
308511
  function renderKeywordInput(options, prop, value2, onChange) {
306933
308512
  const cssInitialMap2 = getCssInitialMap();
306934
308513
  const isTypoPreview = TYPO_PREVIEW_PROPS.has(prop) || prop === "fontWeight";
@@ -307042,7 +308621,7 @@ function widgetForType2(type2, entry, prop, value2, onCommit, opts = {}) {
307042
308621
  });
307043
308622
  }
307044
308623
 
307045
- // src/panels/style-panel.js
308624
+ // src/panels/style-panel.ts
307046
308625
  function isTagPath(selector) {
307047
308626
  return /^[a-z]/.test(selector);
307048
308627
  }
@@ -307060,13 +308639,14 @@ function renderStyleRow(entry, prop, value2, onCommit, onDelete, isWarning, grid
307060
308639
  const type2 = inferInputType(entry);
307061
308640
  const hasVal = value2 !== undefined && value2 !== "";
307062
308641
  const placeholder = !hasVal && inheritedValue ? String(inheritedValue) : "";
308642
+ const spanVal = gridMode && entry.$span === 2 ? 2 : undefined;
307063
308643
  return renderFieldRow({
307064
308644
  prop,
307065
308645
  label: propLabel(entry, prop),
307066
308646
  hasValue: hasVal,
307067
308647
  onClear: onDelete,
307068
308648
  widget: widgetForType2(type2, entry, prop, value2, onCommit, { placeholder }),
307069
- span: gridMode && entry.$span === 2 ? 2 : undefined,
308649
+ ...spanVal != null && { span: spanVal },
307070
308650
  warning: isWarning
307071
308651
  });
307072
308652
  }
@@ -307135,12 +308715,12 @@ function renderShorthandRow(shortProp, entry, style2, mutateFn, _deleteFn, inher
307135
308715
  return longhands.map(({ name, entry: lEntry }, idx) => {
307136
308716
  const lVal = style2[name] ?? (expanded2 ? expanded2[idx] : "");
307137
308717
  return html3`
307138
- <div class="style-row style-row--child" data-prop=${name}>
307139
- <div class="style-row-label">
307140
- ${lVal !== undefined && lVal !== "" ? html3`<span
307141
- class="set-dot"
307142
- title="Clear ${name}"
307143
- @click=${(e20) => {
308718
+ <div class="style-row style-row--child" data-prop=${name}>
308719
+ <div class="style-row-label">
308720
+ ${lVal !== undefined && lVal !== "" ? html3`<span
308721
+ class="set-dot"
308722
+ title="Clear ${name}"
308723
+ @click=${(e20) => {
307144
308724
  e20.stopPropagation();
307145
308725
  const vals = longhands.map((l, i7) => i7 === idx ? emptyVal : style2[l.name] ?? (expanded2 ? expanded2[i7] : emptyVal));
307146
308726
  transactDoc(activeTab.value, (t15) => {
@@ -307151,12 +308731,10 @@ function renderShorthandRow(shortProp, entry, style2, mutateFn, _deleteFn, inher
307151
308731
  mutateFn(t15, shortProp, compress2(vals));
307152
308732
  });
307153
308733
  }}
307154
- ></span>` : nothing}
307155
- <sp-field-label size="s" title=${name}
307156
- >${propLabel(lEntry, name)}</sp-field-label
307157
- >
307158
- </div>
307159
- ${widgetForType2(inferInputType(lEntry), lEntry, name, lVal, (newVal) => {
308734
+ ></span>` : nothing}
308735
+ <sp-field-label size="s" title=${name}>${propLabel(lEntry, name)}</sp-field-label>
308736
+ </div>
308737
+ ${widgetForType2(inferInputType(lEntry), lEntry, name, lVal, (newVal) => {
307160
308738
  const vals = longhands.map((l, i7) => i7 === idx ? newVal || emptyVal : style2[l.name] ?? (expanded2 ? expanded2[i7] : emptyVal));
307161
308739
  transactDoc(activeTab.value, (t15) => {
307162
308740
  for (const l of longhands) {
@@ -307166,8 +308744,8 @@ function renderShorthandRow(shortProp, entry, style2, mutateFn, _deleteFn, inher
307166
308744
  mutateFn(t15, shortProp, compress2(vals));
307167
308745
  });
307168
308746
  }, { placeholder: !lVal && inherited[name] ? String(inherited[name]) : "" })}
307169
- </div>
307170
- `;
308747
+ </div>
308748
+ `;
307171
308749
  });
307172
308750
  })() : nothing}
307173
308751
  `;
@@ -307307,7 +308885,8 @@ function styleSidebarTemplate(node2, activeMediaTab, activeSelector, effectiveSt
307307
308885
  commitMutate = (t15, prop, val) => mutateUpdateNestedStylePath(t15, sel, stylePath, prop, val);
307308
308886
  commitStyle = (prop, val) => transactDoc(activeTab.value, (t15) => commitMutate(t15, prop, val));
307309
308887
  } else if (activeSelector && mediaTab && mediaNames.length > 0) {
307310
- activeStyle = (style2[`@${mediaTab}`] || {})[activeSelector] || {};
308888
+ const mediaObj = style2[`@${mediaTab}`] || {};
308889
+ activeStyle = mediaObj[activeSelector] || {};
307311
308890
  commitMutate = (t15, prop, val) => mutateUpdateMediaNestedStyle(t15, sel, mediaTab, activeSelector, prop, val);
307312
308891
  commitStyle = (prop, val) => transactDoc(activeTab.value, (t15) => commitMutate(t15, prop, val));
307313
308892
  } else if (activeSelector) {
@@ -307634,7 +309213,7 @@ function renderStylePanelTemplate(ctx) {
307634
309213
  return styleSidebarTemplate(node2, tab.session.ui.activeMedia, tab.session.ui.activeSelector);
307635
309214
  }
307636
309215
 
307637
- // src/panels/properties-panel.js
309216
+ // src/panels/properties-panel.ts
307638
309217
  init_lit_html();
307639
309218
  init_live();
307640
309219
  init_store();
@@ -308001,7 +309580,7 @@ var html_meta_default = {
308001
309580
  }
308002
309581
  };
308003
309582
 
308004
- // src/panels/properties-panel.js
309583
+ // src/panels/properties-panel.ts
308005
309584
  function friendlyNameToMedia(name) {
308006
309585
  return friendlyNameToVar(name, "--");
308007
309586
  }
@@ -308018,7 +309597,7 @@ function bindableFieldRow(label4, type2, rawValue, onChange, filterFn = null, ex
308018
309597
  const tab = activeTab.value;
308019
309598
  const defs = tab.doc.document.state || {};
308020
309599
  const isBound = typeof rawValue === "object" && rawValue !== null && rawValue.$ref;
308021
- const signalDefs = Object.entries(defs).filter(([, d3]) => filterFn ? filterFn(d3) : !d3.$handler && d3.$prototype !== "Function");
309600
+ const signalDefs = Object.entries(defs).filter(([, d3]) => filterFn ? filterFn(d3) : !d3?.$handler && d3?.$prototype !== "Function");
308022
309601
  let debounce;
308023
309602
  const onInput2 = (e20) => {
308024
309603
  clearTimeout(debounce);
@@ -308219,7 +309798,7 @@ function renderComponentPropsFieldsTemplate(node2, path2, mapSignals, navigateTo
308219
309798
  const currentVals = isNpm ? node2.attributes || {} : node2.$props || {};
308220
309799
  const updateFn = isNpm ? (name, v) => transactDoc(activeTab.value, (t15) => mutateUpdateAttribute(t15, path2, name, v === "" ? undefined : v)) : (name, v) => transactDoc(activeTab.value, (t15) => mutateUpdateProp(t15, path2, name, v));
308221
309800
  const defs = tab.doc.document.state || {};
308222
- const signalDefs = Object.entries(defs).filter(([, d3]) => !d3.$handler && d3.$prototype !== "Function");
309801
+ const signalDefs = Object.entries(defs).filter(([, d3]) => !d3?.$handler && d3?.$prototype !== "Function");
308223
309802
  const extraSignals = mapSignals;
308224
309803
  return html3`
308225
309804
  ${comp.props.map((prop) => {
@@ -308228,6 +309807,7 @@ function renderComponentPropsFieldsTemplate(node2, path2, mapSignals, navigateTo
308228
309807
  const hasVal = rawValue !== undefined && rawValue !== null;
308229
309808
  const parsed = parseCemType(prop.type);
308230
309809
  const onChange = (v) => updateFn(prop.name, v);
309810
+ const staticVal = isBound ? "" : String(rawValue ?? "");
308231
309811
  const clearProp = (e20) => {
308232
309812
  e20.stopPropagation();
308233
309813
  updateFn(prop.name, undefined);
@@ -308270,7 +309850,6 @@ function renderComponentPropsFieldsTemplate(node2, path2, mapSignals, navigateTo
308270
309850
  </sp-picker>
308271
309851
  `;
308272
309852
  let debounce;
308273
- const staticVal = isBound ? "" : rawValue ?? "";
308274
309853
  let widgetTpl;
308275
309854
  if (prop.format === "image") {
308276
309855
  widgetTpl = renderMediaPicker(prop.name, staticVal, onChange);
@@ -308855,24 +310434,27 @@ function renderPropertiesPanelTemplate(ctx) {
308855
310434
  <div class="style-section-body">
308856
310435
  ${entries2.length === 0 ? html3`<div class="empty-state">
308857
310436
  No attributes declared. Set "attribute" on a state entry.
308858
- </div>` : entries2.map(([key, d3]) => html3`
310437
+ </div>` : entries2.map(([key, d3]) => {
310438
+ const def3 = d3;
310439
+ return html3`
308859
310440
  <div
308860
310441
  style="display:flex;gap:6px;align-items:center;padding:2px 0;font-size:11px"
308861
310442
  >
308862
310443
  <code style="font-family:monospace;color:var(--accent)"
308863
- >${d3.attribute}</code
310444
+ >${def3.attribute}</code
308864
310445
  >
308865
310446
  <span style="color:var(--fg-dim)"> → </span>
308866
310447
  <span>${key}</span>
308867
- ${d3.type ? html3`<span style="margin-left:auto;color:var(--fg-dim);font-size:10px"
308868
- >${d3.type}</span
310448
+ ${def3.type ? html3`<span style="margin-left:auto;color:var(--fg-dim);font-size:10px"
310449
+ >${def3.type}</span
308869
310450
  >` : nothing}
308870
- ${d3.reflects ? html3`<span
310451
+ ${def3.reflects ? html3`<span
308871
310452
  style="font-size:9px;background:var(--bg-hover);padding:1px 4px;border-radius:3px"
308872
310453
  >reflects</span
308873
310454
  >` : nothing}
308874
310455
  </div>
308875
- `)}
310456
+ `;
310457
+ })}
308876
310458
  </div>
308877
310459
  </sp-accordion-item>
308878
310460
  `;
@@ -308983,7 +310565,7 @@ function renderPropertiesPanelTemplate(ctx) {
308983
310565
  return tpl;
308984
310566
  }
308985
310567
 
308986
- // src/panels/ai-panel.js
310568
+ // src/panels/ai-panel.ts
308987
310569
  init_lit_html();
308988
310570
  init_ref();
308989
310571
 
@@ -309673,7 +311255,7 @@ var q = function() {
309673
311255
  }();
309674
311256
  q.quikdown = k;
309675
311257
 
309676
- // src/panels/ai-panel.js
311258
+ // src/panels/ai-panel.ts
309677
311259
  init_platform3();
309678
311260
  var messages2 = [];
309679
311261
  var streaming = false;
@@ -309695,14 +311277,15 @@ function mountAiPanel() {
309695
311277
  mounted2 = true;
309696
311278
  checkAuth();
309697
311279
  }
311280
+ var _g = globalThis;
309698
311281
  function rerenderPanel() {
309699
- const { render: render6 } = globalThis.__jxRightPanelRender || {};
311282
+ const { render: render6 } = _g.__jxRightPanelRender || {};
309700
311283
  if (render6)
309701
311284
  render6();
309702
311285
  requestAnimationFrame(() => mountQuikChat());
309703
311286
  }
309704
311287
  function registerRightPanelRender(fn) {
309705
- globalThis.__jxRightPanelRender = { render: fn };
311288
+ _g.__jxRightPanelRender = { render: fn };
309706
311289
  }
309707
311290
  function mountQuikChat() {
309708
311291
  const container = _quikChatEl;
@@ -309993,7 +311576,7 @@ function renderAiPanelTemplate() {
309993
311576
  `;
309994
311577
  }
309995
311578
 
309996
- // src/panels/right-panel.js
311579
+ // src/panels/right-panel.ts
309997
311580
  var _ctx13 = null;
309998
311581
  var _scope5 = null;
309999
311582
  var _rendering = false;
@@ -310169,13 +311752,13 @@ function _flush2() {
310169
311752
  _ctx13.updateForcedPseudoPreview();
310170
311753
  }
310171
311754
 
310172
- // src/panels/left-panel.js
311755
+ // src/panels/left-panel.ts
310173
311756
  init_lit_html();
310174
311757
  init_store();
310175
311758
  init_reactivity();
310176
311759
  init_workspace2();
310177
311760
 
310178
- // src/panels/stylebook-layers-panel.js
311761
+ // src/panels/stylebook-layers-panel.ts
310179
311762
  init_lit_html();
310180
311763
  init_class_map();
310181
311764
  init_workspace2();
@@ -310255,7 +311838,7 @@ function renderStylebookLayersTemplate(ctx) {
310255
311838
  }
310256
311839
  }
310257
311840
 
310258
- // src/panels/elements-panel.js
311841
+ // src/panels/elements-panel.ts
310259
311842
  init_lit_html();
310260
311843
  init_store();
310261
311844
  init_workspace2();
@@ -310286,7 +311869,7 @@ function renderElementsTemplate(ctx) {
310286
311869
  @click=${() => {
310287
311870
  const t16 = activeTab.value;
310288
311871
  const parentPath = t16?.session.selection || [];
310289
- const parent = getNodeAtPath(t16?.doc.document, parentPath);
311872
+ const parent = getNodeAtPath(t16.doc.document, parentPath);
310290
311873
  const idx = parent?.children ? parent.children.length : 0;
310291
311874
  transactDoc(t16, (tr) => mutateInsertNode(tr, parentPath, idx, structuredClone(def3)));
310292
311875
  }}
@@ -310335,7 +311918,7 @@ function renderElementsTemplate(ctx) {
310335
311918
  @click=${() => {
310336
311919
  const t16 = activeTab.value;
310337
311920
  const parentPath = t16?.session.selection || [];
310338
- const parent = getNodeAtPath(t16?.doc.document, parentPath);
311921
+ const parent = getNodeAtPath(t16.doc.document, parentPath);
310339
311922
  const idx = parent?.children ? parent.children.length : 0;
310340
311923
  const instanceDef = {
310341
311924
  tagName: comp.tagName,
@@ -310374,7 +311957,7 @@ function renderElementsTemplate(ctx) {
310374
311957
  `;
310375
311958
  }
310376
311959
 
310377
- // src/panels/left-panel.js
311960
+ // src/panels/left-panel.ts
310378
311961
  var _ctx14 = null;
310379
311962
  var _scope6 = null;
310380
311963
  var _rendering2 = false;
@@ -310549,7 +312132,7 @@ function _render() {
310549
312132
  ctx.registerLayersDnD();
310550
312133
  }
310551
312134
 
310552
- // src/panels/tab-strip.js
312135
+ // src/panels/tab-strip.ts
310553
312136
  init_lit_html();
310554
312137
  init_class_map();
310555
312138
  init_repeat();
@@ -310636,7 +312219,7 @@ async function requestClose(id) {
310636
312219
  closeTab(id);
310637
312220
  }
310638
312221
 
310639
- // src/studio.js
312222
+ // src/studio.ts
310640
312223
  function getCanvasMode() {
310641
312224
  return activeTab.value?.session.ui.canvasMode ?? "design";
310642
312225
  }
@@ -310770,10 +312353,20 @@ render2(html3`
310770
312353
  <datalist id="tag-names">
310771
312354
  ${webdata_default.allTags.map((tag5) => html3`<option value=${tag5}></option>`)}
310772
312355
  </datalist>
310773
- <datalist id="css-props">
310774
- ${webdata_default.cssProps.map(([name]) => html3`<option value=${name}></option>`)}
310775
- </datalist>
312356
+ <datalist id="css-props"></datalist>
310776
312357
  `, datalistHost);
312358
+ requestIdleCallback(() => {
312359
+ const dl = document.getElementById("css-props");
312360
+ if (!dl)
312361
+ return;
312362
+ const frag = document.createDocumentFragment();
312363
+ for (const [name] of webdata_default.cssProps) {
312364
+ const opt = document.createElement("option");
312365
+ opt.value = name;
312366
+ frag.appendChild(opt);
312367
+ }
312368
+ dl.appendChild(frag);
312369
+ });
310777
312370
  initCssData(webdata_default);
310778
312371
  if (!hasPlatform()) {
310779
312372
  registerPlatform(createDevServerPlatform());
@@ -311010,7 +312603,7 @@ if (_projectParam) {
311010
312603
  id: fileRelPath,
311011
312604
  documentPath: fileRelPath,
311012
312605
  document: parsedDoc,
311013
- frontmatter: frontmatter2,
312606
+ ...frontmatter2 != null && { frontmatter: frontmatter2 },
311014
312607
  sourceFormat: isMd ? "md" : null
311015
312608
  });
311016
312609
  if (isMd && activeTab.value)
@@ -311145,5 +312738,5 @@ effect(() => {
311145
312738
  scheduleAutosave();
311146
312739
  });
311147
312740
 
311148
- //# debugId=9E9829984105751D64756E2164756E21
312741
+ //# debugId=8A6CA76BD8515F1464756E2164756E21
311149
312742
  //# sourceMappingURL=studio.js.map