@jxsuite/studio 0.23.2 → 0.24.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 (105) hide show
  1. package/dist/studio.js +2230 -714
  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} +7 -5
  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.js → edit-display.ts} +23 -20
  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/{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";
@@ -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,11 @@ 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
261329
262734
  function templateToEditDisplay(str) {
261330
262735
  return str.replace(/\$\{([^}]+)\}/g, "❪ $1 ❫");
261331
262736
  }
@@ -261404,7 +262809,8 @@ function prepareForEditMode(node) {
261404
262809
  out.style = v;
261405
262810
  }
261406
262811
  } else if (typeof v === "string" && v.includes("${")) {
261407
- out[k] = templateToEditDisplay(v);
262812
+ const isUrlAttr = k === "src" || k === "href" || k === "poster" || k === "action";
262813
+ out[k] = isUrlAttr ? "" : templateToEditDisplay(v);
261408
262814
  } else if (v && typeof v === "object" && v.$ref) {
261409
262815
  const ref3 = v.$ref;
261410
262816
  const label = ref3.startsWith("#/state/") ? ref3.slice(8) : ref3;
@@ -261480,7 +262886,7 @@ function prepareForEditMode(node) {
261480
262886
  return out;
261481
262887
  }
261482
262888
 
261483
- // src/editor/content-inline-edit.js
262889
+ // src/editor/content-inline-edit.ts
261484
262890
  function enterInlineEdit(el, path) {
261485
262891
  restoreTemplateExpressions(el);
261486
262892
  for (const p of canvasPanels) {
@@ -261489,7 +262895,7 @@ function enterInlineEdit(el, path) {
261489
262895
  }
261490
262896
  startEditing(el, path, {
261491
262897
  onCommit(commitPath, children, textContent) {
261492
- const node = getNodeAtPath(activeTab.value?.doc.document, commitPath);
262898
+ const node = getNodeAtPath(activeTab.value.doc.document, commitPath);
261493
262899
  if (children) {
261494
262900
  if (node && JSON.stringify(node.children) === JSON.stringify(children))
261495
262901
  return;
@@ -261623,7 +263029,7 @@ function enterInlineEdit(el, path) {
261623
263029
  view.inlineEditCleanup = inlineEditCleanup;
261624
263030
  }
261625
263031
 
261626
- // src/canvas/canvas-utils.js
263032
+ // src/canvas/canvas-utils.ts
261627
263033
  init_lit_html();
261628
263034
  init_ref();
261629
263035
  init_class_map();
@@ -261888,13 +263294,13 @@ function updateActivePanelHeaders() {
261888
263294
  }
261889
263295
  }
261890
263296
 
261891
- // src/canvas/canvas-render.js
263297
+ // src/canvas/canvas-render.ts
261892
263298
  init_lit_html();
261893
263299
  init_ref();
261894
263300
  init_store();
261895
263301
  init_workspace2();
261896
263302
 
261897
- // src/files/file-ops.js
263303
+ // src/files/file-ops.ts
261898
263304
  init_unified();
261899
263305
 
261900
263306
  // ../../node_modules/.bun/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.js
@@ -261910,7 +263316,7 @@ function remarkStringify(options) {
261910
263316
  });
261911
263317
  }
261912
263318
  }
261913
- // src/files/file-ops.js
263319
+ // src/files/file-ops.ts
261914
263320
  init_remark_directive();
261915
263321
  init_remark_gfm();
261916
263322
 
@@ -265042,12 +266448,12 @@ function stringify4(value, replacer2, options) {
265042
266448
  return value.toString(options);
265043
266449
  return new Document2(value, _replacer, options).toString(options);
265044
266450
  }
265045
- // src/markdown/md-convert.js
266451
+ // src/markdown/md-convert.ts
265046
266452
  init_unified();
265047
266453
  init_remark_directive();
265048
266454
  init_remark_gfm();
265049
266455
 
265050
- // src/markdown/md-allowlist.js
266456
+ // src/markdown/md-allowlist.ts
265051
266457
  var MD_BLOCK = new Set([
265052
266458
  "h1",
265053
266459
  "h2",
@@ -265099,7 +266505,7 @@ var MD_NESTING = {
265099
266505
  a: { block: false, inline: true, directive: false, only: null }
265100
266506
  };
265101
266507
 
265102
- // src/markdown/md-convert.js
266508
+ // src/markdown/md-convert.ts
265103
266509
  init_transpile();
265104
266510
  var INLINE_CONTENT_TAGS = new Set([
265105
266511
  "p",
@@ -265291,8 +266697,14 @@ function blockChildren(el) {
265291
266697
  function collectDirectiveAttrs(el) {
265292
266698
  const propsObj = {};
265293
266699
  for (const [key, value2] of Object.entries(el)) {
265294
- if (key === "tagName" || key === "children" || key === "textContent" || key === "innerHTML" || key === "attributes")
266700
+ if (key === "tagName" || key === "textContent" || key === "innerHTML" || key === "attributes")
265295
266701
  continue;
266702
+ if (key === "children") {
266703
+ if (value2 && typeof value2 === "object" && !Array.isArray(value2)) {
266704
+ propsObj.children = value2;
266705
+ }
266706
+ continue;
266707
+ }
265296
266708
  propsObj[key] = value2;
265297
266709
  }
265298
266710
  if (el.attributes) {
@@ -265313,7 +266725,9 @@ function convertToDirective(el, isBlock) {
265313
266725
  children: el.textContent != null ? [{ type: "text", value: String(el.textContent) }] : (el.children ?? []).map((c) => convertJxNode(c, false)).filter(Boolean)
265314
266726
  };
265315
266727
  }
265316
- const childArray = el.children;
266728
+ const rawChildren = el.children;
266729
+ const childrenIsObject = rawChildren && typeof rawChildren === "object" && !Array.isArray(rawChildren);
266730
+ const childArray = childrenIsObject ? undefined : rawChildren;
265317
266731
  if (!childArray?.length && el.textContent == null) {
265318
266732
  return {
265319
266733
  type: "leafDirective",
@@ -265484,7 +266898,7 @@ function collapsePropsToAttrMap(propsObj) {
265484
266898
  return result;
265485
266899
  }
265486
266900
 
265487
- // src/services/code-services.js
266901
+ // src/services/code-services.ts
265488
266902
  init_platform3();
265489
266903
  init_store();
265490
266904
  async function codeService(action, payload) {
@@ -265554,7 +266968,7 @@ function getFunctionArgs(editing, document4) {
265554
266968
  return ["state", "event"];
265555
266969
  }
265556
266970
 
265557
- // src/files/file-ops.js
266971
+ // src/files/file-ops.ts
265558
266972
  init_platform3();
265559
266973
  init_workspace2();
265560
266974
  async function loadMarkdown(source) {
@@ -265567,11 +266981,17 @@ async function loadMarkdown(source) {
265567
266981
  const children = doc.children ?? [];
265568
266982
  if (children.length === 0)
265569
266983
  children.push({ tagName: "p", children: [] });
266984
+ const documentKeys = new Set(["state", "imports"]);
265570
266985
  const contentDoc = { children };
265571
266986
  const frontmatter2 = {};
265572
266987
  for (const [key, value2] of Object.entries(doc)) {
265573
- if (key !== "children")
266988
+ if (key === "children")
266989
+ continue;
266990
+ if (documentKeys.has(key)) {
266991
+ contentDoc[key] = value2;
266992
+ } else {
265574
266993
  frontmatter2[key] = value2;
266994
+ }
265575
266995
  }
265576
266996
  return { document: contentDoc, frontmatter: frontmatter2 };
265577
266997
  }
@@ -265642,7 +267062,8 @@ async function exportFile() {
265642
267062
  function serializeDocument(tab) {
265643
267063
  if (tab.doc.sourceFormat === "md") {
265644
267064
  const fm = tab.doc.content?.frontmatter || {};
265645
- const fullDoc = { ...fm, children: tab.doc.document.children ?? [] };
267065
+ const doc = tab.doc.document;
267066
+ const fullDoc = { ...fm, ...doc, children: doc.children ?? [] };
265646
267067
  return jxDocToMd(fullDoc);
265647
267068
  }
265648
267069
  if (tab.doc.mode === "content") {
@@ -265659,10 +267080,10 @@ ${md}` : md;
265659
267080
  return JSON.stringify(tab.doc.document, null, 2);
265660
267081
  }
265661
267082
 
265662
- // src/panels/welcome-screen.js
267083
+ // src/panels/welcome-screen.ts
265663
267084
  init_lit_html();
265664
267085
 
265665
- // src/recent-projects.js
267086
+ // src/recent-projects.ts
265666
267087
  var STORAGE_KEY = "jx-studio-recent-projects";
265667
267088
  var FILES_STORAGE_KEY = "jx-studio-recent-files";
265668
267089
  var MAX_RECENT = 8;
@@ -265702,7 +267123,7 @@ function trackRecentFile(file) {
265702
267123
  localStorage.setItem(FILES_STORAGE_KEY, JSON.stringify(recent));
265703
267124
  }
265704
267125
 
265705
- // src/panels/git-panel.js
267126
+ // src/panels/git-panel.ts
265706
267127
  init_lit_html();
265707
267128
  init_live();
265708
267129
  init_repeat();
@@ -265710,11 +267131,11 @@ init_platform3();
265710
267131
  init_store();
265711
267132
  init_workspace2();
265712
267133
 
265713
- // src/github/github-publish.js
267134
+ // src/github/github-publish.ts
265714
267135
  init_lit_html();
265715
267136
  init_ref();
265716
267137
 
265717
- // src/github/github-auth.js
267138
+ // src/github/github-auth.ts
265718
267139
  init_lit_html();
265719
267140
  var CLIENT_ID = "Ov23liYVlMFpgjOEPXJH";
265720
267141
  var STORAGE_KEY2 = "jx_github_token";
@@ -265809,7 +267230,7 @@ async function authenticateGithub() {
265809
267230
  });
265810
267231
  }
265811
267232
 
265812
- // src/github/github-publish.js
267233
+ // src/github/github-publish.ts
265813
267234
  init_platform3();
265814
267235
  async function publishToGithub({ projectName }) {
265815
267236
  const token = await authenticateGithub();
@@ -265909,7 +267330,7 @@ async function publishToGithub({ projectName }) {
265909
267330
  return true;
265910
267331
  }
265911
267332
 
265912
- // src/panels/git-panel.js
267333
+ // src/panels/git-panel.ts
265913
267334
  async function refreshGitStatus() {
265914
267335
  if (!projectState)
265915
267336
  return;
@@ -266471,7 +267892,7 @@ function _relativeDate(iso) {
266471
267892
  return d2.toLocaleDateString();
266472
267893
  }
266473
267894
 
266474
- // src/panels/welcome-screen.js
267895
+ // src/panels/welcome-screen.ts
266475
267896
  var _ctx5 = null;
266476
267897
  function initWelcome(ctx) {
266477
267898
  _ctx5 = ctx;
@@ -266558,7 +267979,7 @@ function shortenPath(path2) {
266558
267979
  }
266559
267980
  return path2;
266560
267981
  }
266561
- // src/utils/canvas-media.js
267982
+ // src/utils/canvas-media.ts
266562
267983
  function parseMediaEntries(mediaDef) {
266563
267984
  if (!mediaDef)
266564
267985
  return { sizeBreakpoints: [], featureQueries: [], baseWidth: 320 };
@@ -266606,7 +268027,7 @@ function applyCanvasStyle(el, styleDef, activeBreakpoints, featureToggles) {
266606
268027
  }
266607
268028
  }
266608
268029
  for (const [key, val] of Object.entries(styleDef)) {
266609
- if (!key.startsWith("@") || typeof val !== "object")
268030
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
266610
268031
  continue;
266611
268032
  const mediaName = key.slice(1);
266612
268033
  if (mediaName === "--")
@@ -266678,7 +268099,7 @@ function applyOverridesToCanvas(canvasEl, overrides) {
266678
268099
  }
266679
268100
  }
266680
268101
 
266681
- // src/site-context.js
268102
+ // src/site-context.ts
266682
268103
  init_store();
266683
268104
  init_platform3();
266684
268105
  function getEffectiveMedia(docMedia) {
@@ -266832,15 +268253,15 @@ async function updateSiteConfig(patch2) {
266832
268253
  setProjectState({ ...requireProjectState(), projectConfig: config });
266833
268254
  }
266834
268255
 
266835
- // src/canvas/canvas-live-render.js
268256
+ // src/canvas/canvas-live-render.ts
266836
268257
  init_store();
266837
268258
  init_workspace2();
266838
268259
  init_reactivity();
266839
268260
 
266840
- // ../runtime/src/runtime.js
268261
+ // ../runtime/src/runtime.ts
266841
268262
  init_reactivity_esm_bundler();
266842
268263
 
266843
- // ../runtime/src/expression.js
268264
+ // ../runtime/src/expression.ts
266844
268265
  var MUTATING_OPS = new Set([
266845
268266
  "=",
266846
268267
  "+=",
@@ -267059,28 +268480,43 @@ function evaluateExpression(node2, state, event, iterCtx) {
267059
268480
  }
267060
268481
  if (operator === "map") {
267061
268482
  return arr.map((item, index2) => {
267062
- return evaluateExpression(value2, state, event, { ...iterCtx, item, index: index2 });
268483
+ return evaluateExpression(value2, state, event, {
268484
+ ...iterCtx,
268485
+ item,
268486
+ index: index2
268487
+ });
267063
268488
  });
267064
268489
  }
267065
268490
  if (operator === "filter") {
267066
268491
  return arr.filter((item, index2) => {
267067
- return evaluateExpression(value2, state, event, { ...iterCtx, item, index: index2 });
268492
+ return evaluateExpression(value2, state, event, {
268493
+ ...iterCtx,
268494
+ item,
268495
+ index: index2
268496
+ });
267068
268497
  });
267069
268498
  }
267070
268499
  }
268500
+ return;
267071
268501
  }
267072
268502
  function getPath(obj, path2) {
267073
268503
  return path2.split(/[./]/).reduce((o, k) => o?.[k], obj);
267074
268504
  }
267075
268505
 
267076
- // ../runtime/src/runtime.js
268506
+ // ../runtime/src/runtime.ts
268507
+ var _resolveCache = new Map;
267077
268508
  async function resolve3(source) {
267078
268509
  if (typeof source !== "string")
267079
268510
  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();
268511
+ if (_resolveCache.has(source))
268512
+ return _resolveCache.get(source);
268513
+ const p = fetch(source).then((res) => {
268514
+ if (!res.ok)
268515
+ throw new Error(`Jx: failed to fetch ${source} (${res.status})`);
268516
+ return res.json();
268517
+ });
268518
+ _resolveCache.set(source, p);
268519
+ return p;
267084
268520
  }
267085
268521
  var SCHEMA_KEYWORDS = new Set([
267086
268522
  "type",
@@ -267133,17 +268569,18 @@ async function buildScope(doc, parentScope = {}, base2 = location.href) {
267133
268569
  continue;
267134
268570
  }
267135
268571
  if (typeof def3 === "object") {
267136
- if (def3.$prototype)
268572
+ const d2 = def3;
268573
+ if (d2.$prototype)
267137
268574
  continue;
267138
- if ("$expression" in def3)
268575
+ if ("$expression" in d2)
267139
268576
  continue;
267140
- if (def3.timing === "server" && def3.$src && def3.$export)
268577
+ if (d2.timing === "server" && d2.$src && d2.$export)
267141
268578
  continue;
267142
- if ("default" in def3) {
267143
- raw[key] = def3.default;
268579
+ if ("default" in d2) {
268580
+ raw[key] = d2.default;
267144
268581
  continue;
267145
268582
  }
267146
- if (hasSchemaKeywords(def3))
268583
+ if (hasSchemaKeywords(d2))
267147
268584
  continue;
267148
268585
  raw[key] = def3;
267149
268586
  }
@@ -267381,12 +268818,13 @@ function applyProperties(el, def3, state) {
267381
268818
  function bindProperty(el, key, val, state) {
267382
268819
  const target = el;
267383
268820
  if (isRefObj(val)) {
268821
+ const refVal = val;
267384
268822
  if (key === "id") {
267385
- target[key] = resolveRef(val.$ref, state);
268823
+ target[key] = resolveRef(refVal.$ref, state);
267386
268824
  return;
267387
268825
  }
267388
268826
  effect(() => {
267389
- target[key] = resolveRef(val.$ref, state);
268827
+ target[key] = resolveRef(refVal.$ref, state);
267390
268828
  });
267391
268829
  return;
267392
268830
  }
@@ -267812,6 +269250,10 @@ async function importAndInstantiate(def3, src, exportName, base2) {
267812
269250
  async function resolveClassJson(def3, state, key, base2) {
267813
269251
  const src = def3.$src;
267814
269252
  let classDef;
269253
+ const isBareSpecifier = !src.startsWith(".") && !src.startsWith("/") && !src.startsWith("http") && !src.startsWith("file:");
269254
+ if (isBareSpecifier) {
269255
+ return resolveViaDevProxy(def3, state, key, base2);
269256
+ }
267815
269257
  try {
267816
269258
  const url = base2 ? new URL(src, base2).href : src;
267817
269259
  const res = await fetch(url);
@@ -268118,9 +269560,13 @@ async function registerElements(elements, base2) {
268118
269560
  await defineElement(doc, href);
268119
269561
  }
268120
269562
  }
269563
+ var _definedSources = new Set;
268121
269564
  async function defineElement(source, base2) {
268122
269565
  if (typeof source === "string") {
268123
269566
  base2 = new URL(source, base2 ?? location.href).href;
269567
+ if (_definedSources.has(base2))
269568
+ return;
269569
+ _definedSources.add(base2);
268124
269570
  source = await resolve3(source);
268125
269571
  }
268126
269572
  base2 = base2 ?? location.href;
@@ -268138,6 +269584,8 @@ async function defineElement(source, base2) {
268138
269584
  const def3 = source_;
268139
269585
  const observedAttrs = def3.observedAttributes ?? [];
268140
269586
  const ElementClass = class extends HTMLElement {
269587
+ _jxInitialized = false;
269588
+ _state = null;
268141
269589
  static get observedAttributes() {
268142
269590
  return observedAttrs;
268143
269591
  }
@@ -268190,29 +269638,26 @@ async function defineElement(source, base2) {
268190
269638
  }
268191
269639
  }
268192
269640
  disconnectedCallback() {
268193
- const self2 = this;
268194
- if (typeof self2._state?.onUnmount === "function") {
268195
- self2._state.onUnmount(self2._state);
269641
+ if (typeof this._state?.onUnmount === "function") {
269642
+ this._state.onUnmount(this._state);
268196
269643
  }
268197
269644
  }
268198
269645
  adoptedCallback() {
268199
- const self2 = this;
268200
- if (typeof self2._state?.onAdopted === "function") {
268201
- self2._state.onAdopted(self2._state);
269646
+ if (typeof this._state?.onAdopted === "function") {
269647
+ this._state.onAdopted(this._state);
268202
269648
  }
268203
269649
  }
268204
269650
  attributeChangedCallback(name, oldVal, newVal) {
268205
- const self2 = this;
268206
- if (!self2._state || oldVal === newVal)
269651
+ if (!this._state || oldVal === newVal)
268207
269652
  return;
268208
269653
  const camelKey = name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
268209
- const current = self2._state[camelKey];
269654
+ const current = this._state[camelKey];
268210
269655
  if (typeof current === "number")
268211
- self2._state[camelKey] = Number(newVal);
269656
+ this._state[camelKey] = Number(newVal);
268212
269657
  else if (typeof current === "boolean")
268213
- self2._state[camelKey] = newVal !== null && newVal !== "false";
269658
+ this._state[camelKey] = newVal !== null && newVal !== "false";
268214
269659
  else
268215
- self2._state[camelKey] = newVal;
269660
+ this._state[camelKey] = newVal;
268216
269661
  }
268217
269662
  };
268218
269663
  customElements.define(tagName, ElementClass);
@@ -268223,10 +269668,11 @@ function renderCustomElementWithProps(def3, state, options, path2) {
268223
269668
  options.onNodeCreated(el, path2 ?? [], def3);
268224
269669
  for (const [key, val] of Object.entries(def3.$props ?? {})) {
268225
269670
  if (isRefObj(val)) {
268226
- const resolved = resolveRef(val.$ref, state);
269671
+ const refVal = val;
269672
+ const resolved = resolveRef(refVal.$ref, state);
268227
269673
  el[key] = resolved;
268228
269674
  effect(() => {
268229
- el[key] = resolveRef(val.$ref, state);
269675
+ el[key] = resolveRef(refVal.$ref, state);
268230
269676
  });
268231
269677
  } else if (isTemplateString(val)) {
268232
269678
  effect(() => {
@@ -268275,10 +269721,10 @@ function distributeSlots(host, slottedChildren) {
268275
269721
  }
268276
269722
  }
268277
269723
 
268278
- // src/canvas/canvas-live-render.js
269724
+ // src/canvas/canvas-live-render.ts
268279
269725
  init_components();
268280
269726
 
268281
- // src/canvas/nested-site-style.js
269727
+ // src/canvas/nested-site-style.ts
268282
269728
  function buildNestedSiteCSS(styleObj, scope) {
268283
269729
  let css = "";
268284
269730
  function emit(parentSel, rules) {
@@ -268305,7 +269751,7 @@ function camelToKebab2(s2) {
268305
269751
  return s2.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
268306
269752
  }
268307
269753
 
268308
- // src/canvas/canvas-live-render.js
269754
+ // src/canvas/canvas-live-render.ts
268309
269755
  function _preventNav(e) {
268310
269756
  if (e.target.closest("a[href]")) {
268311
269757
  e.preventDefault();
@@ -268439,7 +269885,7 @@ async function renderCanvasLive(gen, doc, canvasEl) {
268439
269885
  for (const tag3 of collectTags(renderDoc)) {
268440
269886
  const comp = componentRegistry.find((c) => c.tagName === tag3);
268441
269887
  if (comp && comp.source !== "npm") {
268442
- const relPath = computeRelativePath(S.documentPath, comp.path);
269888
+ const relPath = computeRelativePath(S.documentPath ?? null, comp.path);
268443
269889
  if (!existingRefs.has(relPath)) {
268444
269890
  effectiveElements.push({ $ref: relPath });
268445
269891
  existingRefs.add(relPath);
@@ -268553,7 +269999,7 @@ async function renderCanvasLive(gen, doc, canvasEl) {
268553
269999
  continue;
268554
270000
  const el2 = document.createElement(tag3);
268555
270001
  for (const [k, v] of Object.entries(attrs))
268556
- el2.setAttribute(k, v);
270002
+ el2.setAttribute(k, String(v));
268557
270003
  if (entry.textContent)
268558
270004
  el2.textContent = entry.textContent;
268559
270005
  document.head.appendChild(el2);
@@ -268639,21 +270085,29 @@ async function renderCanvasLive(gen, doc, canvasEl) {
268639
270085
  }
268640
270086
  }
268641
270087
 
268642
- // src/panels/preview-render.js
270088
+ // src/panels/preview-render.ts
268643
270089
  init_store();
268644
270090
  init_workspace2();
268645
270091
 
268646
- // src/panels/signals-panel.js
270092
+ // src/panels/signals-panel.ts
268647
270093
  init_lit_html();
268648
270094
  init_class_map();
268649
270095
  init_if_defined();
268650
270096
  init_style_map();
268651
270097
  init_workspace2();
268652
270098
 
268653
- // src/ui/field-row.js
270099
+ // src/ui/field-row.ts
268654
270100
  init_lit_html();
268655
270101
  init_class_map();
268656
- function renderFieldRow({ prop, label: label4, hasValue, onClear, widget, span, warning }) {
270102
+ function renderFieldRow({
270103
+ prop,
270104
+ label: label4,
270105
+ hasValue,
270106
+ onClear,
270107
+ widget,
270108
+ span,
270109
+ warning
270110
+ }) {
268657
270111
  return html3`
268658
270112
  <div
268659
270113
  class=${classMap({ "style-row": true, "style-row--warning": !!warning })}
@@ -268676,7 +270130,7 @@ function renderFieldRow({ prop, label: label4, hasValue, onClear, widget, span,
268676
270130
  `;
268677
270131
  }
268678
270132
 
268679
- // src/ui/expression-editor.js
270133
+ // src/ui/expression-editor.ts
268680
270134
  init_lit_html();
268681
270135
  init_live();
268682
270136
  var UNARY_OPS2 = new Set(["!", "-"]);
@@ -268991,7 +270445,8 @@ function renderExpressionEditor(node2, onChange, opts) {
268991
270445
  }
268992
270446
  if (newInfo.needsValue) {
268993
270447
  if (newInfo.valueIsNode) {
268994
- updated.value = safeNode.value?.operator ? safeNode.value : { operator: "!", target: null };
270448
+ const val = safeNode.value;
270449
+ updated.value = val?.operator ? safeNode.value : { operator: "!", target: null };
268995
270450
  } else if (newInfo.spliceArray) {
268996
270451
  updated.value = Array.isArray(safeNode.value) ? safeNode.value : [null];
268997
270452
  } else {
@@ -269058,7 +270513,7 @@ function renderExpressionEditor(node2, onChange, opts) {
269058
270513
  `;
269059
270514
  }
269060
270515
 
269061
- // src/ui/media-picker.js
270516
+ // src/ui/media-picker.ts
269062
270517
  init_lit_html();
269063
270518
  init_live();
269064
270519
  init_platform3();
@@ -269169,7 +270624,7 @@ function renderMediaPicker(prop, value2, onCommit) {
269169
270624
  `;
269170
270625
  }
269171
270626
 
269172
- // src/panels/signals-panel.js
270627
+ // src/panels/signals-panel.ts
269173
270628
  var expandedSignal = null;
269174
270629
  var advancedParamOpen = new Set;
269175
270630
  var DEF_TEMPLATES = {
@@ -269312,7 +270767,6 @@ function resolveDefaultForCanvas(value2, defs) {
269312
270767
  return `{${defName}}`;
269313
270768
  }
269314
270769
  function signalFieldRow(label4, value2, onChange) {
269315
- let debounce;
269316
270770
  return renderFieldRow({
269317
270771
  prop: label4,
269318
270772
  label: label4,
@@ -269320,10 +270774,11 @@ function signalFieldRow(label4, value2, onChange) {
269320
270774
  widget: html3`
269321
270775
  <sp-textfield
269322
270776
  size="s"
269323
- value=${value2}
269324
- @input=${(e) => {
269325
- clearTimeout(debounce);
269326
- debounce = setTimeout(() => onChange(e.target.value), 400);
270777
+ .value=${value2}
270778
+ @change=${(e) => {
270779
+ const v = e.target.value;
270780
+ if (v !== value2)
270781
+ onChange(v);
269327
270782
  }}
269328
270783
  ></sp-textfield>
269329
270784
  `
@@ -269422,7 +270877,7 @@ function renderSignalsTemplate(S, ctx) {
269422
270877
  transactDoc(activeTab.value, (t) => mutateAddDef(t, n3, { $prototype: protoName }));
269423
270878
  expandedSignal = n3;
269424
270879
  if (src) {
269425
- fetchPluginSchema({ $prototype: protoName, $src: src }, S).then(() => ctx.renderLeftPanel());
270880
+ fetchPluginSchema({ $prototype: protoName, $src: src }, { ...S.documentPath != null && { documentPath: S.documentPath } }).then(() => ctx.renderLeftPanel());
269426
270881
  } else {
269427
270882
  ctx.renderLeftPanel();
269428
270883
  }
@@ -269729,10 +271184,7 @@ function renderParameterEditorTemplate(S, name, def3, ctx) {
269729
271184
  @keydown=${(e) => {
269730
271185
  if (e.key === "Enter" && e.target.value.trim()) {
269731
271186
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, {
269732
- parameters: [
269733
- ...params,
269734
- { name: e.target.value.trim() }
269735
- ]
271187
+ parameters: [...params, { name: e.target.value.trim() }]
269736
271188
  }));
269737
271189
  }
269738
271190
  }}
@@ -269775,10 +271227,9 @@ function renderParameterEditorTemplate(S, name, def3, ctx) {
269775
271227
  style="flex:1"
269776
271228
  @change=${(e) => {
269777
271229
  const next2 = [...params];
269778
- next2[i2] = {
269779
- ...next2[i2],
269780
- type: e.target.value ? { text: e.target.value } : undefined
269781
- };
271230
+ const val = e.target.value;
271231
+ const { type: _t, ...rest } = next2[i2];
271232
+ next2[i2] = val ? { ...rest, type: { text: val } } : rest;
269782
271233
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { parameters: next2 }));
269783
271234
  }}
269784
271235
  />
@@ -269789,10 +271240,9 @@ function renderParameterEditorTemplate(S, name, def3, ctx) {
269789
271240
  style="flex:2"
269790
271241
  @change=${(e) => {
269791
271242
  const next2 = [...params];
269792
- next2[i2] = {
269793
- ...next2[i2],
269794
- description: e.target.value || undefined
269795
- };
271243
+ const val = e.target.value;
271244
+ const { description: _d, ...rest } = next2[i2];
271245
+ next2[i2] = val ? { ...rest, description: val } : rest;
269796
271246
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { parameters: next2 }));
269797
271247
  }}
269798
271248
  />
@@ -269802,10 +271252,9 @@ function renderParameterEditorTemplate(S, name, def3, ctx) {
269802
271252
  .checked=${!!p.optional}
269803
271253
  @change=${(e) => {
269804
271254
  const next2 = [...params];
269805
- next2[i2] = {
269806
- ...next2[i2],
269807
- optional: e.target.checked || undefined
269808
- };
271255
+ const checked = e.target.checked;
271256
+ const { optional: _o, ...rest } = next2[i2];
271257
+ next2[i2] = checked ? { ...rest, optional: true } : rest;
269809
271258
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { parameters: next2 }));
269810
271259
  }}
269811
271260
  />
@@ -269867,10 +271316,9 @@ function renderEmitsEditorTemplate(S, name, def3) {
269867
271316
  style="flex:1"
269868
271317
  @change=${(e) => {
269869
271318
  const next2 = [...emits];
269870
- next2[i2] = {
269871
- ...next2[i2],
269872
- type: e.target.value ? { text: e.target.value } : undefined
269873
- };
271319
+ const val = e.target.value;
271320
+ const { type: _t, ...rest } = next2[i2];
271321
+ next2[i2] = val ? { ...rest, type: { text: val } } : rest;
269874
271322
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { emits: next2 }));
269875
271323
  }}
269876
271324
  />
@@ -269881,10 +271329,9 @@ function renderEmitsEditorTemplate(S, name, def3) {
269881
271329
  style="flex:2"
269882
271330
  @change=${(e) => {
269883
271331
  const next2 = [...emits];
269884
- next2[i2] = {
269885
- ...next2[i2],
269886
- description: e.target.value || undefined
269887
- };
271332
+ const val = e.target.value;
271333
+ const { description: _d, ...rest } = next2[i2];
271334
+ next2[i2] = val ? { ...rest, description: val } : rest;
269888
271335
  transactDoc(activeTab.value, (t) => mutateUpdateDef(t, name, { emits: next2 }));
269889
271336
  }}
269890
271337
  />
@@ -270172,7 +271619,9 @@ function renderExternalPrototypeEditorTemplate(S, name, def3, ctx) {
270172
271619
  >
270173
271620
  Loading schema…
270174
271621
  </div>`;
270175
- fetchPluginSchema(def3, S).then((schema4) => {
271622
+ fetchPluginSchema(def3, {
271623
+ ...S.documentPath != null && { documentPath: S.documentPath }
271624
+ }).then((schema4) => {
270176
271625
  if (schema4)
270177
271626
  ctx.renderLeftPanel();
270178
271627
  });
@@ -270196,7 +271645,7 @@ function renderExternalPrototypeEditorTemplate(S, name, def3, ctx) {
270196
271645
  `;
270197
271646
  }
270198
271647
 
270199
- // src/panels/preview-render.js
271648
+ // src/panels/preview-render.ts
270200
271649
  function renderCanvasNode(node2, path2, parent, activeBreakpoints, featureToggles) {
270201
271650
  if (typeof node2 === "string" || typeof node2 === "number" || typeof node2 === "boolean") {
270202
271651
  parent.appendChild(document.createTextNode(String(node2)));
@@ -270263,7 +271712,7 @@ function renderCanvasNode(node2, path2, parent, activeBreakpoints, featureToggle
270263
271712
  return el;
270264
271713
  }
270265
271714
 
270266
- // src/panels/canvas-dnd.js
271715
+ // src/panels/canvas-dnd.ts
270267
271716
  init_store();
270268
271717
  init_workspace2();
270269
271718
  // ../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
@@ -270452,12 +271901,12 @@ function extractInstruction(userData) {
270452
271901
  return (_ref5 = userData[uniqueKey]) !== null && _ref5 !== undefined ? _ref5 : null;
270453
271902
  }
270454
271903
 
270455
- // src/panels/dnd.js
271904
+ // src/panels/dnd.ts
270456
271905
  init_store();
270457
271906
  init_workspace2();
270458
271907
  init_components();
270459
271908
 
270460
- // src/panels/stylebook-panel.js
271909
+ // src/panels/stylebook-panel.ts
270461
271910
  init_lit_html();
270462
271911
  init_ref();
270463
271912
  init_class_map();
@@ -270672,7 +272121,7 @@ registerBlockType( name, settings );`
270672
272121
  }
270673
272122
  };
270674
272123
 
270675
- // src/panels/stylebook-panel.js
272124
+ // src/panels/stylebook-panel.ts
270676
272125
  function _resolveNestedStyle(style2, tagPath) {
270677
272126
  const parts = tagPath.split(" ");
270678
272127
  let obj = style2;
@@ -270719,7 +272168,10 @@ function renderStylebookMode(ctx) {
270719
272168
  @input=${onFilterInput2}
270720
272169
  />
270721
272170
  <button
270722
- class=${classMap({ "tb-toggle": true, active: tab?.session.ui.stylebookCustomizedOnly })}
272171
+ class=${classMap({
272172
+ "tb-toggle": true,
272173
+ active: !!tab?.session.ui.stylebookCustomizedOnly
272174
+ })}
270723
272175
  @click=${onCustomizedToggle}
270724
272176
  >
270725
272177
  Customized
@@ -270826,7 +272278,7 @@ function refreshStylebookStyles() {
270826
272278
  }
270827
272279
  if (activeBreakpoints.size > 0) {
270828
272280
  for (const [key, val] of Object.entries(tagStyle)) {
270829
- if (!key.startsWith("@") || typeof val !== "object")
272281
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
270830
272282
  continue;
270831
272283
  const mediaName = key.slice(1);
270832
272284
  if (mediaName === "--")
@@ -270845,7 +272297,7 @@ function refreshStylebookStyles() {
270845
272297
  }
270846
272298
  if (activeBreakpoints.size > 0) {
270847
272299
  for (const [key, val] of Object.entries(rootStyle)) {
270848
- if (!key.startsWith("@") || typeof val !== "object")
272300
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
270849
272301
  continue;
270850
272302
  const mediaName = key.slice(1);
270851
272303
  if (mediaName === "--")
@@ -270945,7 +272397,7 @@ function buildStylebookElement(entry, rootStyle, activeBreakpoints, parentTag =
270945
272397
  }
270946
272398
  if (activeBreakpoints) {
270947
272399
  for (const [key, val] of Object.entries(tagStyle)) {
270948
- if (!key.startsWith("@") || typeof val !== "object")
272400
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
270949
272401
  continue;
270950
272402
  const mediaName = key.slice(1);
270951
272403
  if (mediaName === "--")
@@ -270965,7 +272417,7 @@ function buildStylebookElement(entry, rootStyle, activeBreakpoints, parentTag =
270965
272417
  if (activeBreakpoints) {
270966
272418
  const tagPath = compoundTag || entry.tag;
270967
272419
  for (const [key, val] of Object.entries(rootStyle)) {
270968
- if (!key.startsWith("@") || typeof val !== "object")
272420
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
270969
272421
  continue;
270970
272422
  const mediaName = key.slice(1);
270971
272423
  if (mediaName === "--")
@@ -271030,7 +272482,7 @@ function hasTagStyle(rootStyle, tag3) {
271030
272482
  if (s2 && typeof s2 === "object" && Object.keys(s2).length > 0)
271031
272483
  return true;
271032
272484
  for (const [key, val] of Object.entries(rootStyle)) {
271033
- if (!key.startsWith("@") || typeof val !== "object")
272485
+ if (!key.startsWith("@") || typeof val !== "object" || val === null)
271034
272486
  continue;
271035
272487
  const ms = _resolveNestedStyle(val, tag3);
271036
272488
  if (ms && typeof ms === "object" && Object.keys(ms).length > 0)
@@ -271218,7 +272670,7 @@ function findStylebookEl(canvasEl, tag3) {
271218
272670
  return null;
271219
272671
  }
271220
272672
 
271221
- // src/panels/dnd.js
272673
+ // src/panels/dnd.ts
271222
272674
  function registerLayersDnD() {
271223
272675
  requestAnimationFrame(() => {
271224
272676
  const container = leftPanel?.querySelector(".layers-container");
@@ -271483,7 +272935,7 @@ function applyDropInstruction(instruction, srcData, targetPath) {
271483
272935
  return ref3 && (ref3 === `./${comp.path}` || ref3.endsWith(comp.path.split("/").pop()));
271484
272936
  });
271485
272937
  if (!alreadyImported) {
271486
- const relPath = computeRelativePath(tab?.documentPath, comp.path);
272938
+ const relPath = computeRelativePath(tab?.documentPath ?? null, comp.path);
271487
272939
  transact(activeTab.value, (doc2) => {
271488
272940
  if (!doc2.$elements)
271489
272941
  doc2.$elements = [];
@@ -271496,7 +272948,7 @@ function applyDropInstruction(instruction, srcData, targetPath) {
271496
272948
  }
271497
272949
  }
271498
272950
 
271499
- // src/panels/canvas-dnd.js
272951
+ // src/panels/canvas-dnd.ts
271500
272952
  var _activeDropEl = null;
271501
272953
  function registerPanelDnD(panel) {
271502
272954
  const { canvas, dropLine } = panel;
@@ -271645,18 +273097,18 @@ function showCanvasDropIndicator(el, elPath, isLeaf2, panel) {
271645
273097
  dropLine.className = "canvas-drop-indicator line";
271646
273098
  }
271647
273099
 
271648
- // src/panels/panel-events.js
273100
+ // src/panels/panel-events.ts
271649
273101
  init_store();
271650
273102
  init_workspace2();
271651
273103
 
271652
- // src/editor/context-menu.js
273104
+ // src/editor/context-menu.ts
271653
273105
  init_lit_html();
271654
273106
  init_ref();
271655
273107
  init_html_to_jx();
271656
273108
  init_store();
271657
273109
  init_workspace2();
271658
273110
 
271659
- // src/editor/convert-to-repeater.js
273111
+ // src/editor/convert-to-repeater.ts
271660
273112
  init_lit_html();
271661
273113
  init_ref();
271662
273114
  init_store();
@@ -271703,8 +273155,24 @@ async function convertToRepeater() {
271703
273155
  };
271704
273156
  });
271705
273157
  }
271706
- function promptRepeaterConfig(defs) {
273158
+ async function promptRepeaterConfig(defs) {
271707
273159
  const arrayDefs = Object.entries(defs).filter(([, d2]) => d2?.type === "array" || Array.isArray(d2?.default) || d2?.$prototype === "Array");
273160
+ const tab = activeTab.value;
273161
+ const docPath = tab?.documentPath;
273162
+ for (const [name, d2] of Object.entries(defs)) {
273163
+ const def3 = d2;
273164
+ if (!def3?.$prototype || def3.$prototype === "Function" || def3.$prototype === "Array")
273165
+ continue;
273166
+ if (arrayDefs.some(([n2]) => n2 === name))
273167
+ continue;
273168
+ const schema4 = await fetchPluginSchema({
273169
+ ...def3.$src != null && { $src: def3.$src },
273170
+ $prototype: def3.$prototype
273171
+ }, { ...docPath != null && { documentPath: docPath } });
273172
+ if (schema4?.returns?.type === "array") {
273173
+ arrayDefs.push([name, d2]);
273174
+ }
273175
+ }
271708
273176
  const fnDefs = Object.entries(defs).filter(([, d2]) => defCategory(d2) === "function");
271709
273177
  let source = arrayDefs.length > 0 ? arrayDefs[0][0] : "__new__";
271710
273178
  let newDefName = "";
@@ -271731,16 +273199,16 @@ function promptRepeaterConfig(defs) {
271731
273199
  return;
271732
273200
  }
271733
273201
  done({
271734
- items: { $ref: `#/$defs/${name}` },
271735
- filter: filterDef ? { $ref: `#/$defs/${filterDef}` } : undefined,
271736
- sort: sortDef ? { $ref: `#/$defs/${sortDef}` } : undefined,
273202
+ items: { $ref: `#/state/${name}` },
273203
+ ...filterDef && { filter: { $ref: `#/state/${filterDef}` } },
273204
+ ...sortDef && { sort: { $ref: `#/state/${sortDef}` } },
271737
273205
  newDef: { name }
271738
273206
  });
271739
273207
  } else {
271740
273208
  done({
271741
- items: { $ref: `#/$defs/${source}` },
271742
- filter: filterDef ? { $ref: `#/$defs/${filterDef}` } : undefined,
271743
- sort: sortDef ? { $ref: `#/$defs/${sortDef}` } : undefined
273209
+ items: { $ref: `#/state/${source}` },
273210
+ ...filterDef && { filter: { $ref: `#/state/${filterDef}` } },
273211
+ ...sortDef && { sort: { $ref: `#/state/${sortDef}` } }
271744
273212
  });
271745
273213
  }
271746
273214
  }
@@ -271848,10 +273316,10 @@ function promptRepeaterConfig(defs) {
271848
273316
  });
271849
273317
  }
271850
273318
 
271851
- // src/editor/context-menu.js
273319
+ // src/editor/context-menu.ts
271852
273320
  init_components();
271853
273321
 
271854
- // src/panels/layers-panel.js
273322
+ // src/panels/layers-panel.ts
271855
273323
  init_lit_html();
271856
273324
  init_class_map();
271857
273325
  init_if_defined();
@@ -271866,14 +273334,17 @@ function startLayerTitleEdit(path2, rerender) {
271866
273334
  if (!label4)
271867
273335
  return;
271868
273336
  const tab = activeTab.value;
271869
- const node2 = getNodeAtPath(tab?.doc.document, path2);
273337
+ if (!tab)
273338
+ return;
273339
+ const node2 = getNodeAtPath(tab.doc.document, path2);
271870
273340
  if (!node2)
271871
273341
  return;
271872
273342
  label4.style.display = "none";
271873
273343
  const input = document.createElement("input");
271874
273344
  input.className = "layer-title-input";
271875
273345
  input.value = node2.$title || "";
271876
- input.placeholder = nodeLabel({ ...node2, $title: undefined });
273346
+ const { $title: _, ...nodeWithoutTitle } = node2;
273347
+ input.placeholder = nodeLabel(nodeWithoutTitle);
271877
273348
  label4.after(input);
271878
273349
  input.focus();
271879
273350
  input.select();
@@ -271888,7 +273359,7 @@ function startLayerTitleEdit(path2, rerender) {
271888
273359
  committed = true;
271889
273360
  cleanup();
271890
273361
  const val = input.value.trim();
271891
- transactDoc(activeTab.value, (t) => mutateUpdateProperty(t, path2, "$title", val || undefined));
273362
+ transactDoc(tab, (t) => mutateUpdateProperty(t, path2, "$title", val || undefined));
271892
273363
  rerender();
271893
273364
  };
271894
273365
  const cancel = () => {
@@ -271915,7 +273386,7 @@ function renderLayersTemplate(ctx) {
271915
273386
  for (const fn of view.dndCleanups)
271916
273387
  fn();
271917
273388
  view.dndCleanups = [];
271918
- const rows = flattenTree(tab?.doc.document);
273389
+ const rows = flattenTree(tab.doc.document);
271919
273390
  const collapsed2 = view._layersCollapsed || (view._layersCollapsed = new Set);
271920
273391
  const layerRows = [];
271921
273392
  for (const { node: node2, path: path2, depth, nodeType } of rows) {
@@ -271949,12 +273420,12 @@ function renderLayersTemplate(ctx) {
271949
273420
  const jxNode = node2;
271950
273421
  if (path2.length >= 2 && nodeType === "element") {
271951
273422
  const pPath = parentElementPath(path2);
271952
- const parentNode2 = pPath ? getNodeAtPath(tab?.doc.document, pPath) : null;
273423
+ const parentNode2 = pPath ? getNodeAtPath(tab.doc.document, pPath) : null;
271953
273424
  if (parentNode2 && isInlineElement(jxNode, parentNode2))
271954
273425
  continue;
271955
273426
  }
271956
273427
  const key = pathKey(path2);
271957
- const isSelected = pathsEqual(path2, tab?.session.selection);
273428
+ const isSelected = pathsEqual(path2, tab.session.selection);
271958
273429
  const hasChildren = Array.isArray(jxNode.children) && jxNode.children.length > 0;
271959
273430
  const hasMapChildren = jxNode.children && typeof jxNode.children === "object" && jxNode.children.$prototype === "Array";
271960
273431
  const hasCases = jxNode.$switch && jxNode.cases && typeof jxNode.cases === "object" && Object.keys(jxNode.cases).length > 0;
@@ -271993,7 +273464,7 @@ function renderLayersTemplate(ctx) {
271993
273464
  const isRoot = tab?.doc.mode === "content" ? path2.length === 0 : path2.length < 2;
271994
273465
  const idx = isElement ? childIndex(path2) : 0;
271995
273466
  const parentPath = isElement && !isRoot ? parentElementPath(path2) : null;
271996
- const parentNode = parentPath ? getNodeAtPath(tab?.doc.document, parentPath) : null;
273467
+ const parentNode = parentPath ? getNodeAtPath(tab.doc.document, parentPath) : null;
271997
273468
  const siblingCount = parentNode?.children?.length || 0;
271998
273469
  const canMoveUp = isElement && !isRoot && idx > 0;
271999
273470
  const canMoveDown = isElement && !isRoot && idx < siblingCount - 1;
@@ -272086,7 +273557,7 @@ function renderLayersTemplate(ctx) {
272086
273557
  e.currentTarget.blur();
272087
273558
  const pp = parentPath;
272088
273559
  const prevPath = [...pp, idx - 1];
272089
- const prev = getNodeAtPath(activeTab.value?.doc.document, prevPath);
273560
+ const prev = getNodeAtPath(activeTab.value.doc.document, prevPath);
272090
273561
  const len = prev?.children?.length || 0;
272091
273562
  transactDoc(activeTab.value, (t) => mutateMoveNode(t, path2, prevPath, len));
272092
273563
  }}
@@ -272152,7 +273623,7 @@ function renderLayersTemplate(ctx) {
272152
273623
  `;
272153
273624
  }
272154
273625
 
272155
- // src/editor/context-menu.js
273626
+ // src/editor/context-menu.ts
272156
273627
  var JX_MIME = "web application/jx+json";
272157
273628
  function nodeToHtml(node2) {
272158
273629
  if (typeof node2 === "string")
@@ -272292,7 +273763,9 @@ function showContextMenu(e, path2, opts = {}) {
272292
273763
  e.preventDefault();
272293
273764
  dismissContextMenu();
272294
273765
  const tab = activeTab.value;
272295
- const node2 = getNodeAtPath(tab?.doc.document, path2);
273766
+ if (!tab)
273767
+ return;
273768
+ const node2 = getNodeAtPath(tab.doc.document, path2);
272296
273769
  if (!node2)
272297
273770
  return;
272298
273771
  tab.session.selection = path2;
@@ -272452,7 +273925,7 @@ function showContextMenu(e, path2, opts = {}) {
272452
273925
  });
272453
273926
  }
272454
273927
 
272455
- // src/editor/insertion-helper.js
273928
+ // src/editor/insertion-helper.ts
272456
273929
  init_workspace2();
272457
273930
  var _ctx8 = null;
272458
273931
  var _helper = null;
@@ -272629,7 +274102,7 @@ function onSlashSelect(cmd, point4) {
272629
274102
  hide2();
272630
274103
  }
272631
274104
 
272632
- // src/panels/panel-events.js
274105
+ // src/panels/panel-events.ts
272633
274106
  var _ctx9 = null;
272634
274107
  function initPanelEvents(ctx) {
272635
274108
  _ctx9 = ctx;
@@ -272798,7 +274271,7 @@ function registerPanelEvents(panel) {
272798
274271
  view.canvasEventCleanups.push(() => unmount());
272799
274272
  }
272800
274273
 
272801
- // src/canvas/canvas-diff.js
274274
+ // src/canvas/canvas-diff.ts
272802
274275
  function valuesEqual(a, b) {
272803
274276
  if (a === b)
272804
274277
  return true;
@@ -272896,7 +274369,7 @@ function computeDocumentDiff(originalDoc, currentDoc) {
272896
274369
  return { byPath: diffMap, allPaths };
272897
274370
  }
272898
274371
 
272899
- // src/panels/pseudo-preview.js
274372
+ // src/panels/pseudo-preview.ts
272900
274373
  init_store();
272901
274374
  init_workspace2();
272902
274375
  var pseudoStyleHost = document.createElement("div");
@@ -272940,7 +274413,7 @@ function updateForcedPseudoPreview() {
272940
274413
  view.forcedStyleTag = tag3;
272941
274414
  }
272942
274415
 
272943
- // src/panels/editors.js
274416
+ // src/panels/editors.ts
272944
274417
  init_lit_html();
272945
274418
  init_ref();
272946
274419
  init_store();
@@ -273107,7 +274580,7 @@ function registerFunctionCompletions() {
273107
274580
  });
273108
274581
  }
273109
274582
 
273110
- // src/panels/overlays.js
274583
+ // src/panels/overlays.ts
273111
274584
  init_lit_html();
273112
274585
  init_style_map();
273113
274586
  init_store();
@@ -273237,7 +274710,7 @@ function _flush() {
273237
274710
  _ctx10.renderBlockActionBar();
273238
274711
  }
273239
274712
 
273240
- // src/canvas/canvas-render.js
274713
+ // src/canvas/canvas-render.ts
273241
274714
  var _ctx11 = null;
273242
274715
  var _prevStylebookFilter = "";
273243
274716
  var _prevStylebookCustomizedOnly = false;
@@ -273385,6 +274858,8 @@ function renderCanvas() {
273385
274858
  clearTimeout(debounce);
273386
274859
  debounce = setTimeout(() => {
273387
274860
  const tab2 = activeTab.value;
274861
+ if (!tab2)
274862
+ return;
273388
274863
  if (lang === "json") {
273389
274864
  try {
273390
274865
  tab2.doc.document = JSON.parse(editor2.getValue());
@@ -273544,10 +275019,15 @@ function renderCanvas() {
273544
275019
  ${panelEntries.map((e) => e.tpl)}
273545
275020
  </div>
273546
275021
  `, canvasWrap);
273547
- for (const { panel, activeSet } of panelEntries) {
275022
+ for (let i2 = 0;i2 < panelEntries.length; i2++) {
275023
+ const { panel, activeSet } = panelEntries[i2];
273548
275024
  const p = panel;
273549
275025
  canvasPanels.push(p);
273550
- renderCanvasIntoPanel(p, activeSet, featureToggles);
275026
+ if (i2 === 0) {
275027
+ renderCanvasIntoPanel(p, activeSet, featureToggles);
275028
+ } else {
275029
+ setTimeout(() => renderCanvasIntoPanel(p, activeSet, featureToggles), 0);
275030
+ }
273551
275031
  }
273552
275032
  updateActivePanelHeaders();
273553
275033
  applyTransform();
@@ -273662,7 +275142,7 @@ function renderOverlays() {
273662
275142
  render4();
273663
275143
  }
273664
275144
 
273665
- // src/files/files.js
275145
+ // src/files/files.ts
273666
275146
  init_lit_html();
273667
275147
  init_class_map();
273668
275148
  init_ref();
@@ -273715,7 +275195,10 @@ async function loadProject() {
273715
275195
  }
273716
275196
  } catch {}
273717
275197
  }
273718
- async function openProject({ renderActivityBar, renderLeftPanel }) {
275198
+ async function openProject({
275199
+ renderActivityBar,
275200
+ renderLeftPanel
275201
+ }) {
273719
275202
  try {
273720
275203
  const platform3 = getPlatform();
273721
275204
  const result = await platform3.openProject();
@@ -274327,7 +275810,7 @@ async function openFileInTab(path2) {
274327
275810
  id,
274328
275811
  documentPath: path2,
274329
275812
  document: document4,
274330
- frontmatter: frontmatter2,
275813
+ ...frontmatter2 != null && { frontmatter: frontmatter2 },
274331
275814
  sourceFormat: path2.endsWith(".md") ? "md" : null
274332
275815
  });
274333
275816
  requireProjectState().selectedPath = path2;
@@ -274364,7 +275847,7 @@ async function reloadFileInTab(path2) {
274364
275847
  }
274365
275848
  }
274366
275849
 
274367
- // src/panels/imports-panel.js
275850
+ // src/panels/imports-panel.ts
274368
275851
  init_lit_html();
274369
275852
  init_components();
274370
275853
  init_store();
@@ -274629,9 +276112,7 @@ function renderDocumentLevelImports({
274629
276112
  <div class="imports-list">
274630
276113
  ${refEntries.map((entry) => html3`
274631
276114
  <div class="import-row">
274632
- <span
274633
- class="import-path"
274634
- title=${entry.$ref}
276115
+ <span class="import-path" title=${entry.$ref}
274635
276116
  >${entry.$ref}</span
274636
276117
  >
274637
276118
  <sp-action-button
@@ -274717,19 +276198,22 @@ function renderDocumentLevelImports({
274717
276198
  `;
274718
276199
  }
274719
276200
 
274720
- // src/panels/head-panel.js
276201
+ // src/panels/head-panel.ts
274721
276202
  init_lit_html();
274722
276203
  init_live();
274723
276204
  init_store();
274724
276205
  init_workspace2();
274725
276206
 
274726
- // src/utils/studio-utils.js
276207
+ // src/utils/studio-utils.ts
274727
276208
  function camelToKebab3(str) {
274728
276209
  return str.replace(/[A-Z]/g, (c) => "-" + c.toLowerCase());
274729
276210
  }
274730
276211
  function camelToLabel(prop) {
274731
276212
  return prop.replace(/([A-Z])/g, " $1").replace(/^./, (c) => c.toUpperCase());
274732
276213
  }
276214
+ function toCamelCase(str) {
276215
+ return str.replace(/[^a-zA-Z0-9]+(.)?/g, (_, c) => c ? c.toUpperCase() : "").replace(/^[A-Z]/, (c) => c.toLowerCase());
276216
+ }
274733
276217
  function kebabToLabel(val) {
274734
276218
  return val.replace(/(^|-)(\w)/g, (_, sep2, c) => (sep2 ? " " : "") + c.toUpperCase());
274735
276219
  }
@@ -274834,7 +276318,7 @@ function parseCemType(typeText) {
274834
276318
  return { kind: "text" };
274835
276319
  }
274836
276320
 
274837
- // src/utils/google-fonts.js
276321
+ // src/utils/google-fonts.ts
274838
276322
  var GFONTS_CSS_PREFIX = "https://fonts.googleapis.com/css2?";
274839
276323
  var GFONTS_PRECONNECT_ORIGINS = [
274840
276324
  "https://fonts.googleapis.com",
@@ -274874,7 +276358,7 @@ function cleanupGoogleFontPreconnects(head) {
274874
276358
  return head;
274875
276359
  }
274876
276360
 
274877
- // src/panels/head-panel.js
276361
+ // src/panels/head-panel.ts
274878
276362
  init_platform3();
274879
276363
  var layoutEntries = null;
274880
276364
  async function loadLayoutEntries() {
@@ -275018,7 +276502,11 @@ function renderMetaFieldRow(field, head, applyMutation) {
275018
276502
  widget
275019
276503
  });
275020
276504
  }
275021
- function renderHeadTemplate({ document: doc, applyMutation, renderLeftPanel }) {
276505
+ function renderHeadTemplate({
276506
+ document: doc,
276507
+ applyMutation,
276508
+ renderLeftPanel
276509
+ }) {
275022
276510
  const head = doc.$head ?? [];
275023
276511
  const title = doc.title ?? "";
275024
276512
  const iconEntry = findLinkEntry(head, "icon");
@@ -275236,8 +276724,9 @@ function renderFrontmatterSection() {
275236
276724
  return nothing;
275237
276725
  const fm = tab.doc.content?.frontmatter || {};
275238
276726
  const col = findContentTypeSchema(tab.documentPath, projectState?.projectConfig);
275239
- const schemaProps = col?.schema?.properties;
275240
- const requiredFields = new Set(col?.schema?.required || []);
276727
+ const schema4 = col?.schema;
276728
+ const schemaProps = schema4?.properties;
276729
+ const requiredFields = new Set(schema4?.required || []);
275241
276730
  const fields = [];
275242
276731
  if (schemaProps) {
275243
276732
  for (const [field, fieldSchema] of Object.entries(schemaProps)) {
@@ -275384,10 +276873,10 @@ function renderFmField(field, entry, value2, requiredFields) {
275384
276873
  });
275385
276874
  }
275386
276875
 
275387
- // src/studio.js
276876
+ // src/studio.ts
275388
276877
  init_platform3();
275389
276878
 
275390
- // src/platforms/devserver.js
276879
+ // src/platforms/devserver.ts
275391
276880
  function createDevServerPlatform() {
275392
276881
  let _projectRoot = "";
275393
276882
  function serverPath(rel) {
@@ -275807,7 +277296,7 @@ function createDevServerPlatform() {
275807
277296
  };
275808
277297
  }
275809
277298
 
275810
- // src/resize-edges.js
277299
+ // src/resize-edges.ts
275811
277300
  var g2 = globalThis;
275812
277301
  var EDGES = [
275813
277302
  "top",
@@ -275874,7 +277363,7 @@ async function startResize(e, edge, wc) {
275874
277363
  document.addEventListener("mouseup", onUp);
275875
277364
  }
275876
277365
 
275877
- // src/studio.js
277366
+ // src/studio.ts
275878
277367
  init_components();
275879
277368
  init_lit_html();
275880
277369
  // data/webdata.json
@@ -277494,7 +278983,7 @@ var webdata_default = {
277494
278983
  ]
277495
278984
  };
277496
278985
 
277497
- // src/panels/data-explorer.js
278986
+ // src/panels/data-explorer.ts
277498
278987
  init_lit_html();
277499
278988
  init_class_map();
277500
278989
  var expandedDataKeys = new Set;
@@ -277580,8 +279069,8 @@ function renderDataTreeTemplate(value2, depth, maxDepth = 5) {
277580
279069
  </div>`;
277581
279070
  }
277582
279071
  if (Array.isArray(value2)) {
277583
- const cap3 = 20;
277584
- const items2 = value2.slice(0, cap3).map((item, i2) => {
279072
+ const cap4 = 20;
279073
+ const items2 = value2.slice(0, cap4).map((item, i2) => {
277585
279074
  if (item === null || item === undefined || typeof item !== "object") {
277586
279075
  const valText = typeof item === "string" && item.length > 80 ? `"${item.slice(0, 80)}…"` : JSON.stringify(item);
277587
279076
  return html3`<div class="data-branch" style="padding-left:${indent2}">
@@ -277598,14 +279087,14 @@ function renderDataTreeTemplate(value2, depth, maxDepth = 5) {
277598
279087
  ${renderDataTreeTemplate(item, depth + 1, maxDepth)}
277599
279088
  `;
277600
279089
  });
277601
- return html3`${items2}${value2.length > cap3 ? html3`<div class="data-leaf data-ellipsis" style="padding-left:${indent2}">
277602
- … ${value2.length - cap3} more
279090
+ return html3`${items2}${value2.length > cap4 ? html3`<div class="data-leaf data-ellipsis" style="padding-left:${indent2}">
279091
+ … ${value2.length - cap4} more
277603
279092
  </div>` : nothing}`;
277604
279093
  }
277605
279094
  const obj = value2;
277606
279095
  const keys = Object.keys(obj);
277607
- const cap2 = 30;
277608
- const items = keys.slice(0, cap2).map((key) => {
279096
+ const cap3 = 30;
279097
+ const items = keys.slice(0, cap3).map((key) => {
277609
279098
  const v = obj[key];
277610
279099
  if (v === null || v === undefined || typeof v !== "object") {
277611
279100
  const valText = typeof v === "string" && v.length > 80 ? `"${v.slice(0, 80)}…"` : JSON.stringify(v);
@@ -277623,8 +279112,8 @@ function renderDataTreeTemplate(value2, depth, maxDepth = 5) {
277623
279112
  ${renderDataTreeTemplate(v, depth + 1, maxDepth)}
277624
279113
  `;
277625
279114
  });
277626
- return html3`${items}${keys.length > cap2 ? html3`<div class="data-leaf data-ellipsis" style="padding-left:${indent2}">
277627
- … ${keys.length - cap2} more
279115
+ return html3`${items}${keys.length > cap3 ? html3`<div class="data-leaf data-ellipsis" style="padding-left:${indent2}">
279116
+ … ${keys.length - cap3} more
277628
279117
  </div>` : nothing}`;
277629
279118
  }
277630
279119
 
@@ -281663,7 +283152,7 @@ __decorateClass21([
281663
283152
  query("#form")
281664
283153
  ], Search.prototype, "form", 2);
281665
283154
 
281666
- // src/ui/spectrum.js
283155
+ // src/ui/spectrum.ts
281667
283156
  init_Popover_dev();
281668
283157
 
281669
283158
  // ../../node_modules/.bun/@spectrum-web-components+menu@1.12.1/node_modules/@spectrum-web-components/menu/src/Menu.dev.js
@@ -289832,10 +291321,10 @@ function $6c7bd7858deea686$var$getSymbols(locale, formatter2, intlOptions, origi
289832
291321
  index: index2
289833
291322
  };
289834
291323
  }
289835
- function $6c7bd7858deea686$var$replaceAll(str, find2, replace2) {
291324
+ function $6c7bd7858deea686$var$replaceAll(str, find3, replace2) {
289836
291325
  if (str.replaceAll)
289837
- return str.replaceAll(find2, replace2);
289838
- return str.split(find2).join(replace2);
291326
+ return str.replaceAll(find3, replace2);
291327
+ return str.split(find3).join(replace2);
289839
291328
  }
289840
291329
  function $6c7bd7858deea686$var$escapeRegex(string6) {
289841
291330
  return string6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -293597,7 +295086,7 @@ class Divider extends DividerBase {
293597
295086
  }
293598
295087
  Divider.styles = [divider_css_default];
293599
295088
 
293600
- // src/ui/spectrum.js
295089
+ // src/ui/spectrum.ts
293601
295090
  init_Tooltip_dev();
293602
295091
  init_Overlay_dev();
293603
295092
 
@@ -294749,7 +296238,7 @@ __decorateClass50([
294749
296238
  property({ reflect: true })
294750
296239
  ], HelpText.prototype, "variant", 2);
294751
296240
 
294752
- // src/ui/spectrum.js
296241
+ // src/ui/spectrum.ts
294753
296242
  init_Underlay_dev();
294754
296243
 
294755
296244
  // ../../node_modules/.bun/@spectrum-web-components+accordion@1.12.1/node_modules/@spectrum-web-components/accordion/src/Accordion.dev.js
@@ -300766,7 +302255,7 @@ class IconCheckmark extends IconBase {
300766
302255
  }
300767
302256
  }
300768
302257
 
300769
- // src/ui/value-selector.js
302258
+ // src/ui/value-selector.ts
300770
302259
  init_lit();
300771
302260
  init_live2();
300772
302261
 
@@ -300867,7 +302356,7 @@ class JxValueSelector extends LitElement {
300867
302356
  }
300868
302357
  }
300869
302358
 
300870
- // src/ui/color-selector.js
302359
+ // src/ui/color-selector.ts
300871
302360
  init_lit();
300872
302361
  init_lit_html();
300873
302362
  init_live();
@@ -301097,7 +302586,7 @@ function isColorPopoverOpen() {
301097
302586
  return !!document.querySelector(".style-input-color sp-overlay[open]");
301098
302587
  }
301099
302588
 
301100
- // src/ui/spectrum.js
302589
+ // src/ui/spectrum.ts
301101
302590
  var components = [
301102
302591
  ["sp-theme", Theme],
301103
302592
  ["sp-tabs", Tabs],
@@ -301234,7 +302723,7 @@ Theme.registerThemeFragment("spectrum", "system", theme_css_default);
301234
302723
  Theme.registerThemeFragment("dark", "color", theme_dark_css_default);
301235
302724
  Theme.registerThemeFragment("medium", "scale", scale_medium_css_default);
301236
302725
 
301237
- // src/ui/panel-resize.js
302726
+ // src/ui/panel-resize.ts
301238
302727
  var STORAGE_KEY3 = "jx-studio-panel-widths";
301239
302728
  var MIN_WIDTH2 = 160;
301240
302729
  var MAX_RATIO = 0.5;
@@ -301303,11 +302792,11 @@ if (resizeLeft)
301303
302792
  if (resizeRight)
301304
302793
  setupHandle(resizeRight, "--panel-w-right", "right", DEFAULT_RIGHT);
301305
302794
 
301306
- // src/editor/shortcuts.js
302795
+ // src/editor/shortcuts.ts
301307
302796
  init_store();
301308
302797
  init_workspace2();
301309
302798
 
301310
- // src/panels/quick-search.js
302799
+ // src/panels/quick-search.ts
301311
302800
  init_lit_html();
301312
302801
  init_class_map();
301313
302802
  init_live();
@@ -301454,7 +302943,7 @@ function renderOverlay() {
301454
302943
  render2(tpl, container);
301455
302944
  }
301456
302945
 
301457
- // src/editor/shortcuts.js
302946
+ // src/editor/shortcuts.ts
301458
302947
  function initShortcuts(getContext) {
301459
302948
  canvasWrap.addEventListener("wheel", (e20) => {
301460
302949
  const { canvasMode, panX, panY, setPan, applyTransform: applyTransform2 } = getContext();
@@ -301706,23 +303195,23 @@ function navigateSelection(direction = -1) {
301706
303195
  }
301707
303196
  }
301708
303197
 
301709
- // src/panels/activity-bar.js
303198
+ // src/panels/activity-bar.ts
301710
303199
  init_lit_html();
301711
303200
  init_store();
301712
303201
  init_reactivity();
301713
303202
  init_workspace2();
301714
303203
 
301715
- // src/settings/settings-modal.js
303204
+ // src/settings/settings-modal.ts
301716
303205
  init_lit_html();
301717
303206
  init_class_map();
301718
303207
  init_ref();
301719
303208
 
301720
- // src/settings/defs-editor.js
303209
+ // src/settings/defs-editor.ts
301721
303210
  init_lit_html();
301722
303211
  init_platform3();
301723
303212
  init_store();
301724
303213
 
301725
- // src/settings/schema-field-ui.js
303214
+ // src/settings/schema-field-ui.ts
301726
303215
  init_lit_html();
301727
303216
  var FIELD_TYPES = ["string", "number", "boolean", "array", "object", "reference"];
301728
303217
  var FORMAT_OPTIONS = ["", "image", "date", "color"];
@@ -301747,6 +303236,9 @@ function fieldCardTpl(fieldName, fieldSchema, isRequired, handlers, contentTypeN
301747
303236
  return html3`
301748
303237
  <div class="schema-field-card">
301749
303238
  <div class="schema-field-row">
303239
+ <sp-field-label size="s" class="schema-field-label"
303240
+ >${camelToLabel(fieldName)}</sp-field-label
303241
+ >
301750
303242
  <sp-textfield
301751
303243
  size="s"
301752
303244
  quiet
@@ -302011,7 +303503,7 @@ function yamlDefault(type2, format3) {
302011
303503
  }
302012
303504
  }
302013
303505
 
302014
- // src/settings/defs-editor.js
303506
+ // src/settings/defs-editor.ts
302015
303507
  var selectedDef = null;
302016
303508
  var showAddField = false;
302017
303509
  var newFieldState = { name: "", type: "string", format: "", required: false };
@@ -302341,7 +303833,7 @@ function renderDefsEditor(container) {
302341
303833
  render2(tpl, container);
302342
303834
  }
302343
303835
 
302344
- // src/settings/content-types-editor.js
303836
+ // src/settings/content-types-editor.ts
302345
303837
  init_lit_html();
302346
303838
  init_repeat();
302347
303839
  init_platform3();
@@ -302385,9 +303877,10 @@ function handleNewContentType(rerender) {
302385
303877
  });
302386
303878
  }
302387
303879
  function handleAddField2(rerender) {
302388
- const name = newFieldState2.name.trim();
302389
- if (!name || !selectedContentType)
303880
+ const raw = newFieldState2.name.trim();
303881
+ if (!raw || !selectedContentType)
302390
303882
  return;
303883
+ const name = toCamelCase(raw);
302391
303884
  const schema4 = getSelectedSchema();
302392
303885
  if (!schema4)
302393
303886
  return;
@@ -302432,15 +303925,16 @@ function handleToggleRequired2(fieldName, rerender) {
302432
303925
  }
302433
303926
  function handleRenameField2(oldName, newName, rerender) {
302434
303927
  const schema4 = getSelectedSchema();
302435
- if (!schema4?.properties || !newName || schema4.properties[newName])
303928
+ const normalized = toCamelCase(newName);
303929
+ if (!schema4?.properties || !normalized || schema4.properties[normalized])
302436
303930
  return;
302437
303931
  const newProps = {};
302438
303932
  for (const [key, val] of Object.entries(schema4.properties)) {
302439
- newProps[key === oldName ? newName : key] = val;
303933
+ newProps[key === oldName ? normalized : key] = val;
302440
303934
  }
302441
303935
  schema4.properties = newProps;
302442
303936
  if (schema4.required) {
302443
- schema4.required = schema4.required.map((r8) => r8 === oldName ? newName : r8);
303937
+ schema4.required = schema4.required.map((r8) => r8 === oldName ? normalized : r8);
302444
303938
  }
302445
303939
  rerender();
302446
303940
  saveProjectConfig2();
@@ -302477,14 +303971,17 @@ function handleAddNestedField2(parentName, fieldState, rerender) {
302477
303971
  const parent = schema4?.properties?.[parentName];
302478
303972
  if (!parent)
302479
303973
  return;
303974
+ const name = toCamelCase(fieldState.name);
303975
+ if (!name)
303976
+ return;
302480
303977
  if (!parent.properties)
302481
303978
  parent.properties = {};
302482
- parent.properties[fieldState.name] = schemaForType(fieldState.type);
303979
+ parent.properties[name] = schemaForType(fieldState.type);
302483
303980
  if (fieldState.required) {
302484
303981
  if (!parent.required)
302485
303982
  parent.required = [];
302486
- if (!parent.required.includes(fieldState.name))
302487
- parent.required.push(fieldState.name);
303983
+ if (!parent.required.includes(name))
303984
+ parent.required.push(name);
302488
303985
  }
302489
303986
  rerender();
302490
303987
  saveProjectConfig2();
@@ -302519,15 +304016,16 @@ function handleToggleNestedRequired2(parentName, childName, rerender) {
302519
304016
  function handleRenameNested2(parentName, oldChild, newChild, rerender) {
302520
304017
  const schema4 = getSelectedSchema();
302521
304018
  const parent = schema4?.properties?.[parentName];
302522
- if (!parent?.properties || !newChild || parent.properties[newChild])
304019
+ const normalized = toCamelCase(newChild);
304020
+ if (!parent?.properties || !normalized || parent.properties[normalized])
302523
304021
  return;
302524
304022
  const newProps = {};
302525
304023
  for (const [key, val] of Object.entries(parent.properties)) {
302526
- newProps[key === oldChild ? newChild : key] = val;
304024
+ newProps[key === oldChild ? normalized : key] = val;
302527
304025
  }
302528
304026
  parent.properties = newProps;
302529
304027
  if (parent.required) {
302530
- parent.required = parent.required.map((r8) => r8 === oldChild ? newChild : r8);
304028
+ parent.required = parent.required.map((r8) => r8 === oldChild ? normalized : r8);
302531
304029
  }
302532
304030
  rerender();
302533
304031
  saveProjectConfig2();
@@ -302688,7 +304186,7 @@ function renderContentTypesEditor(container) {
302688
304186
  render2(tpl, container);
302689
304187
  }
302690
304188
 
302691
- // src/settings/css-vars-editor.js
304189
+ // src/settings/css-vars-editor.ts
302692
304190
  init_lit_html();
302693
304191
  init_ref();
302694
304192
  init_store();
@@ -302912,7 +304410,7 @@ function renderAddRow(prefix, placeholder, valuePlaceholder, addVar) {
302912
304410
  `;
302913
304411
  }
302914
304412
 
302915
- // src/settings/head-editor.js
304413
+ // src/settings/head-editor.ts
302916
304414
  init_lit_html();
302917
304415
  init_store();
302918
304416
  function renderHeadEditor(container) {
@@ -303150,7 +304648,7 @@ function renderGoogleFontsSection(headEntries, save, rerender) {
303150
304648
  `;
303151
304649
  }
303152
304650
 
303153
- // src/settings/general-settings.js
304651
+ // src/settings/general-settings.ts
303154
304652
  init_lit_html();
303155
304653
  init_store();
303156
304654
  init_platform3();
@@ -303300,7 +304798,7 @@ function renderGeneralSettings(container) {
303300
304798
  render2(tpl, container);
303301
304799
  }
303302
304800
 
303303
- // src/settings/settings-modal.js
304801
+ // src/settings/settings-modal.ts
303304
304802
  var _handle = null;
303305
304803
  var _activeSection = "general";
303306
304804
  var _contentEl = null;
@@ -303395,7 +304893,7 @@ function renderActiveSection() {
303395
304893
  }
303396
304894
  }
303397
304895
 
303398
- // src/panels/activity-bar.js
304896
+ // src/panels/activity-bar.ts
303399
304897
  var _scope3 = null;
303400
304898
  function mount4() {
303401
304899
  _scope3 = effectScope();
@@ -303507,18 +305005,18 @@ function renderActivityBar() {
303507
305005
  render2(tpl, activityBar);
303508
305006
  }
303509
305007
 
303510
- // src/panels/toolbar.js
305008
+ // src/panels/toolbar.ts
303511
305009
  init_lit_html();
303512
305010
  init_store();
303513
305011
  init_reactivity();
303514
305012
  init_workspace2();
303515
305013
  init_platform3();
303516
305014
 
303517
- // src/browse/browse-modal.js
305015
+ // src/browse/browse-modal.ts
303518
305016
  init_lit_html();
303519
305017
  init_ref();
303520
305018
 
303521
- // src/browse/browse.js
305019
+ // src/browse/browse.ts
303522
305020
  init_lit_html();
303523
305021
  init_ref();
303524
305022
  init_repeat();
@@ -304149,7 +305647,7 @@ function invalidateBrowseCache() {
304149
305647
  _previewCache.clear();
304150
305648
  }
304151
305649
 
304152
- // src/browse/browse-modal.js
305650
+ // src/browse/browse-modal.ts
304153
305651
  var _handle2 = null;
304154
305652
  var _escHandler = null;
304155
305653
  function openBrowseModal() {
@@ -304199,7 +305697,7 @@ function closeBrowseModal() {
304199
305697
  _handle2 = null;
304200
305698
  }
304201
305699
 
304202
- // src/new-project/new-project-modal.js
305700
+ // src/new-project/new-project-modal.ts
304203
305701
  init_lit_html();
304204
305702
  init_platform3();
304205
305703
  var _handle3 = null;
@@ -304359,7 +305857,7 @@ function renderModal2() {
304359
305857
  }
304360
305858
  var _dirDerived = true;
304361
305859
 
304362
- // src/panels/toolbar.js
305860
+ // src/panels/toolbar.ts
304363
305861
  var _rootEl = null;
304364
305862
  var _ctx12 = null;
304365
305863
  var _scope4 = null;
@@ -304619,7 +306117,9 @@ function toolbarTemplate() {
304619
306117
  ctx.setCanvasMode(m3.key);
304620
306118
  view.panX = 0;
304621
306119
  view.panY = 0;
304622
- const uiPatch = { editingFunction: null };
306120
+ const uiPatch = {
306121
+ editingFunction: null
306122
+ };
304623
306123
  if (m3.key === "stylebook")
304624
306124
  uiPatch.rightTab = "style";
304625
306125
  updateSession({ ui: uiPatch });
@@ -304771,13 +306271,13 @@ function toolbarTemplate() {
304771
306271
  `;
304772
306272
  }
304773
306273
 
304774
- // src/panels/right-panel.js
306274
+ // src/panels/right-panel.ts
304775
306275
  init_lit_html();
304776
306276
  init_store();
304777
306277
  init_reactivity();
304778
306278
  init_workspace2();
304779
306279
 
304780
- // src/panels/events-panel.js
306280
+ // src/panels/events-panel.ts
304781
306281
  init_store();
304782
306282
  init_lit_html();
304783
306283
  init_live();
@@ -304805,7 +306305,7 @@ function eventsSidebarTemplate(helpers) {
304805
306305
  if (!node2)
304806
306306
  return html3`<div class="empty-state">Node not found</div>`;
304807
306307
  const defs = document4.state || {};
304808
- const functionDefs = Object.entries(defs).filter(([, d3]) => d3.$prototype === "Function" || d3.$handler);
306308
+ const functionDefs = Object.entries(defs).filter(([, d3]) => d3?.$prototype === "Function" || d3?.$handler);
304809
306309
  let declaredEventsT = nothing;
304810
306310
  if (isCustomElementDoc2()) {
304811
306311
  const allEmits = [];
@@ -304823,7 +306323,9 @@ function eventsSidebarTemplate(helpers) {
304823
306323
  <div class="declared-event-row" title=${ev.description || ""}>
304824
306324
  <code class="event-code">${ev.name || "(unnamed)"}</code>
304825
306325
  <span class="event-source">← ${ev._fn}</span>
304826
- ${ev.type?.text ? html3`<span class="event-type">${ev.type.text}</span>` : nothing}
306326
+ ${ev.type?.text ? html3`<span class="event-type"
306327
+ >${ev.type.text}</span
306328
+ >` : nothing}
304827
306329
  </div>
304828
306330
  `)}
304829
306331
  </div>
@@ -304994,14 +306496,14 @@ function eventsSidebarTemplate(helpers) {
304994
306496
  `;
304995
306497
  }
304996
306498
 
304997
- // src/panels/style-panel.js
306499
+ // src/panels/style-panel.ts
304998
306500
  init_lit_html();
304999
306501
  init_live();
305000
306502
  init_if_defined();
305001
306503
  init_store();
305002
306504
  init_workspace2();
305003
306505
 
305004
- // src/utils/inherited-style.js
306506
+ // src/utils/inherited-style.ts
305005
306507
  function computeInheritedStyle(style2, mediaNames, activeTab2, activeSelector = null) {
305006
306508
  if (activeTab2 === null || mediaNames.length === 0)
305007
306509
  return {};
@@ -305039,7 +306541,7 @@ function computeInheritedStyle(style2, mediaNames, activeTab2, activeSelector =
305039
306541
  return inherited;
305040
306542
  }
305041
306543
 
305042
- // src/panels/style-utils.js
306544
+ // src/panels/style-utils.ts
305043
306545
  init_store();
305044
306546
  init_workspace2();
305045
306547
  // data/css-meta.json
@@ -306531,7 +308033,7 @@ var css_meta_default = {
306531
308033
  }
306532
308034
  };
306533
308035
 
306534
- // src/panels/style-utils.js
308036
+ // src/panels/style-utils.ts
306535
308037
  var cssInitialMap = new Map;
306536
308038
  function initCssData(webdata) {
306537
308039
  cssInitialMap = new Map(webdata.cssProps);
@@ -306683,19 +308185,19 @@ function currentFontFamily() {
306683
308185
  return raw;
306684
308186
  }
306685
308187
 
306686
- // src/panels/style-inputs.js
308188
+ // src/panels/style-inputs.ts
306687
308189
  init_lit_html();
306688
308190
  init_live();
306689
308191
  init_store();
306690
308192
  init_workspace2();
306691
308193
 
306692
- // src/ui/widgets.js
308194
+ // src/ui/widgets.ts
306693
308195
  init_lit_html();
306694
308196
  init_live();
306695
308197
  init_if_defined();
306696
308198
  init_store();
306697
308199
 
306698
- // src/ui/unit-selector.js
308200
+ // src/ui/unit-selector.ts
306699
308201
  init_lit_html();
306700
308202
  init_live();
306701
308203
  init_class_map();
@@ -306773,11 +308275,11 @@ function renderUnitSelector(entry, prop, value2, onChange, placeholder = "") {
306773
308275
  `;
306774
308276
  }
306775
308277
 
306776
- // src/ui/button-group.js
308278
+ // src/ui/button-group.ts
306777
308279
  init_lit_html();
306778
308280
  init_class_map();
306779
308281
 
306780
- // src/ui/icons.js
308282
+ // src/ui/icons.ts
306781
308283
  init_lit();
306782
308284
  var icons = {
306783
308285
  "arrow-right": html3`<sp-icon-arrow-right slot="icon"></sp-icon-arrow-right>`,
@@ -306816,7 +308318,7 @@ var icons = {
306816
308318
  };
306817
308319
  var icons_default = icons;
306818
308320
 
306819
- // src/ui/button-group.js
308321
+ // src/ui/button-group.ts
306820
308322
  function renderButtonGroup(entry, prop, value2, onChange) {
306821
308323
  const values2 = entry.$buttonValues || entry.enum || [];
306822
308324
  const iconMap = entry.$icons || {};
@@ -306825,7 +308327,7 @@ function renderButtonGroup(entry, prop, value2, onChange) {
306825
308327
  const extra = buttonValues && enumValues && enumValues.length > buttonValues.length ? enumValues.filter((v) => !buttonValues.includes(v)) : [];
306826
308328
  const menuId = `style-btngrp-${prop}`;
306827
308329
  const hasExtra = extra.length > 0;
306828
- const extraSelected = hasExtra && extra.includes(value2);
308330
+ const extraSelected = hasExtra && extra.includes(String(value2));
306829
308331
  return html3`
306830
308332
  <div class=${classMap({ "button-group-combo": true, "has-overflow": hasExtra })}>
306831
308333
  <sp-action-group size="s" compact>
@@ -306870,7 +308372,7 @@ function renderButtonGroup(entry, prop, value2, onChange) {
306870
308372
  `;
306871
308373
  }
306872
308374
 
306873
- // src/ui/widgets.js
308375
+ // src/ui/widgets.ts
306874
308376
  function renderTextInput(prop, value2, onChange, placeholder = "") {
306875
308377
  return html3`
306876
308378
  <sp-textfield
@@ -306928,7 +308430,7 @@ function widgetForType(type2, entry, prop, value2, onCommit, opts = {}) {
306928
308430
  }
306929
308431
  }
306930
308432
 
306931
- // src/panels/style-inputs.js
308433
+ // src/panels/style-inputs.ts
306932
308434
  function renderKeywordInput(options, prop, value2, onChange) {
306933
308435
  const cssInitialMap2 = getCssInitialMap();
306934
308436
  const isTypoPreview = TYPO_PREVIEW_PROPS.has(prop) || prop === "fontWeight";
@@ -307042,7 +308544,7 @@ function widgetForType2(type2, entry, prop, value2, onCommit, opts = {}) {
307042
308544
  });
307043
308545
  }
307044
308546
 
307045
- // src/panels/style-panel.js
308547
+ // src/panels/style-panel.ts
307046
308548
  function isTagPath(selector) {
307047
308549
  return /^[a-z]/.test(selector);
307048
308550
  }
@@ -307060,13 +308562,14 @@ function renderStyleRow(entry, prop, value2, onCommit, onDelete, isWarning, grid
307060
308562
  const type2 = inferInputType(entry);
307061
308563
  const hasVal = value2 !== undefined && value2 !== "";
307062
308564
  const placeholder = !hasVal && inheritedValue ? String(inheritedValue) : "";
308565
+ const spanVal = gridMode && entry.$span === 2 ? 2 : undefined;
307063
308566
  return renderFieldRow({
307064
308567
  prop,
307065
308568
  label: propLabel(entry, prop),
307066
308569
  hasValue: hasVal,
307067
308570
  onClear: onDelete,
307068
308571
  widget: widgetForType2(type2, entry, prop, value2, onCommit, { placeholder }),
307069
- span: gridMode && entry.$span === 2 ? 2 : undefined,
308572
+ ...spanVal != null && { span: spanVal },
307070
308573
  warning: isWarning
307071
308574
  });
307072
308575
  }
@@ -307135,12 +308638,12 @@ function renderShorthandRow(shortProp, entry, style2, mutateFn, _deleteFn, inher
307135
308638
  return longhands.map(({ name, entry: lEntry }, idx) => {
307136
308639
  const lVal = style2[name] ?? (expanded2 ? expanded2[idx] : "");
307137
308640
  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) => {
308641
+ <div class="style-row style-row--child" data-prop=${name}>
308642
+ <div class="style-row-label">
308643
+ ${lVal !== undefined && lVal !== "" ? html3`<span
308644
+ class="set-dot"
308645
+ title="Clear ${name}"
308646
+ @click=${(e20) => {
307144
308647
  e20.stopPropagation();
307145
308648
  const vals = longhands.map((l, i7) => i7 === idx ? emptyVal : style2[l.name] ?? (expanded2 ? expanded2[i7] : emptyVal));
307146
308649
  transactDoc(activeTab.value, (t15) => {
@@ -307151,12 +308654,10 @@ function renderShorthandRow(shortProp, entry, style2, mutateFn, _deleteFn, inher
307151
308654
  mutateFn(t15, shortProp, compress2(vals));
307152
308655
  });
307153
308656
  }}
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) => {
308657
+ ></span>` : nothing}
308658
+ <sp-field-label size="s" title=${name}>${propLabel(lEntry, name)}</sp-field-label>
308659
+ </div>
308660
+ ${widgetForType2(inferInputType(lEntry), lEntry, name, lVal, (newVal) => {
307160
308661
  const vals = longhands.map((l, i7) => i7 === idx ? newVal || emptyVal : style2[l.name] ?? (expanded2 ? expanded2[i7] : emptyVal));
307161
308662
  transactDoc(activeTab.value, (t15) => {
307162
308663
  for (const l of longhands) {
@@ -307166,8 +308667,8 @@ function renderShorthandRow(shortProp, entry, style2, mutateFn, _deleteFn, inher
307166
308667
  mutateFn(t15, shortProp, compress2(vals));
307167
308668
  });
307168
308669
  }, { placeholder: !lVal && inherited[name] ? String(inherited[name]) : "" })}
307169
- </div>
307170
- `;
308670
+ </div>
308671
+ `;
307171
308672
  });
307172
308673
  })() : nothing}
307173
308674
  `;
@@ -307307,7 +308808,8 @@ function styleSidebarTemplate(node2, activeMediaTab, activeSelector, effectiveSt
307307
308808
  commitMutate = (t15, prop, val) => mutateUpdateNestedStylePath(t15, sel, stylePath, prop, val);
307308
308809
  commitStyle = (prop, val) => transactDoc(activeTab.value, (t15) => commitMutate(t15, prop, val));
307309
308810
  } else if (activeSelector && mediaTab && mediaNames.length > 0) {
307310
- activeStyle = (style2[`@${mediaTab}`] || {})[activeSelector] || {};
308811
+ const mediaObj = style2[`@${mediaTab}`] || {};
308812
+ activeStyle = mediaObj[activeSelector] || {};
307311
308813
  commitMutate = (t15, prop, val) => mutateUpdateMediaNestedStyle(t15, sel, mediaTab, activeSelector, prop, val);
307312
308814
  commitStyle = (prop, val) => transactDoc(activeTab.value, (t15) => commitMutate(t15, prop, val));
307313
308815
  } else if (activeSelector) {
@@ -307634,7 +309136,7 @@ function renderStylePanelTemplate(ctx) {
307634
309136
  return styleSidebarTemplate(node2, tab.session.ui.activeMedia, tab.session.ui.activeSelector);
307635
309137
  }
307636
309138
 
307637
- // src/panels/properties-panel.js
309139
+ // src/panels/properties-panel.ts
307638
309140
  init_lit_html();
307639
309141
  init_live();
307640
309142
  init_store();
@@ -308001,7 +309503,7 @@ var html_meta_default = {
308001
309503
  }
308002
309504
  };
308003
309505
 
308004
- // src/panels/properties-panel.js
309506
+ // src/panels/properties-panel.ts
308005
309507
  function friendlyNameToMedia(name) {
308006
309508
  return friendlyNameToVar(name, "--");
308007
309509
  }
@@ -308018,7 +309520,7 @@ function bindableFieldRow(label4, type2, rawValue, onChange, filterFn = null, ex
308018
309520
  const tab = activeTab.value;
308019
309521
  const defs = tab.doc.document.state || {};
308020
309522
  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");
309523
+ const signalDefs = Object.entries(defs).filter(([, d3]) => filterFn ? filterFn(d3) : !d3?.$handler && d3?.$prototype !== "Function");
308022
309524
  let debounce;
308023
309525
  const onInput2 = (e20) => {
308024
309526
  clearTimeout(debounce);
@@ -308219,7 +309721,7 @@ function renderComponentPropsFieldsTemplate(node2, path2, mapSignals, navigateTo
308219
309721
  const currentVals = isNpm ? node2.attributes || {} : node2.$props || {};
308220
309722
  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
309723
  const defs = tab.doc.document.state || {};
308222
- const signalDefs = Object.entries(defs).filter(([, d3]) => !d3.$handler && d3.$prototype !== "Function");
309724
+ const signalDefs = Object.entries(defs).filter(([, d3]) => !d3?.$handler && d3?.$prototype !== "Function");
308223
309725
  const extraSignals = mapSignals;
308224
309726
  return html3`
308225
309727
  ${comp.props.map((prop) => {
@@ -308228,6 +309730,7 @@ function renderComponentPropsFieldsTemplate(node2, path2, mapSignals, navigateTo
308228
309730
  const hasVal = rawValue !== undefined && rawValue !== null;
308229
309731
  const parsed = parseCemType(prop.type);
308230
309732
  const onChange = (v) => updateFn(prop.name, v);
309733
+ const staticVal = isBound ? "" : String(rawValue ?? "");
308231
309734
  const clearProp = (e20) => {
308232
309735
  e20.stopPropagation();
308233
309736
  updateFn(prop.name, undefined);
@@ -308270,7 +309773,6 @@ function renderComponentPropsFieldsTemplate(node2, path2, mapSignals, navigateTo
308270
309773
  </sp-picker>
308271
309774
  `;
308272
309775
  let debounce;
308273
- const staticVal = isBound ? "" : rawValue ?? "";
308274
309776
  let widgetTpl;
308275
309777
  if (prop.format === "image") {
308276
309778
  widgetTpl = renderMediaPicker(prop.name, staticVal, onChange);
@@ -308855,24 +310357,27 @@ function renderPropertiesPanelTemplate(ctx) {
308855
310357
  <div class="style-section-body">
308856
310358
  ${entries2.length === 0 ? html3`<div class="empty-state">
308857
310359
  No attributes declared. Set "attribute" on a state entry.
308858
- </div>` : entries2.map(([key, d3]) => html3`
310360
+ </div>` : entries2.map(([key, d3]) => {
310361
+ const def3 = d3;
310362
+ return html3`
308859
310363
  <div
308860
310364
  style="display:flex;gap:6px;align-items:center;padding:2px 0;font-size:11px"
308861
310365
  >
308862
310366
  <code style="font-family:monospace;color:var(--accent)"
308863
- >${d3.attribute}</code
310367
+ >${def3.attribute}</code
308864
310368
  >
308865
310369
  <span style="color:var(--fg-dim)"> → </span>
308866
310370
  <span>${key}</span>
308867
- ${d3.type ? html3`<span style="margin-left:auto;color:var(--fg-dim);font-size:10px"
308868
- >${d3.type}</span
310371
+ ${def3.type ? html3`<span style="margin-left:auto;color:var(--fg-dim);font-size:10px"
310372
+ >${def3.type}</span
308869
310373
  >` : nothing}
308870
- ${d3.reflects ? html3`<span
310374
+ ${def3.reflects ? html3`<span
308871
310375
  style="font-size:9px;background:var(--bg-hover);padding:1px 4px;border-radius:3px"
308872
310376
  >reflects</span
308873
310377
  >` : nothing}
308874
310378
  </div>
308875
- `)}
310379
+ `;
310380
+ })}
308876
310381
  </div>
308877
310382
  </sp-accordion-item>
308878
310383
  `;
@@ -308983,7 +310488,7 @@ function renderPropertiesPanelTemplate(ctx) {
308983
310488
  return tpl;
308984
310489
  }
308985
310490
 
308986
- // src/panels/ai-panel.js
310491
+ // src/panels/ai-panel.ts
308987
310492
  init_lit_html();
308988
310493
  init_ref();
308989
310494
 
@@ -309673,7 +311178,7 @@ var q = function() {
309673
311178
  }();
309674
311179
  q.quikdown = k;
309675
311180
 
309676
- // src/panels/ai-panel.js
311181
+ // src/panels/ai-panel.ts
309677
311182
  init_platform3();
309678
311183
  var messages2 = [];
309679
311184
  var streaming = false;
@@ -309695,14 +311200,15 @@ function mountAiPanel() {
309695
311200
  mounted2 = true;
309696
311201
  checkAuth();
309697
311202
  }
311203
+ var _g = globalThis;
309698
311204
  function rerenderPanel() {
309699
- const { render: render6 } = globalThis.__jxRightPanelRender || {};
311205
+ const { render: render6 } = _g.__jxRightPanelRender || {};
309700
311206
  if (render6)
309701
311207
  render6();
309702
311208
  requestAnimationFrame(() => mountQuikChat());
309703
311209
  }
309704
311210
  function registerRightPanelRender(fn) {
309705
- globalThis.__jxRightPanelRender = { render: fn };
311211
+ _g.__jxRightPanelRender = { render: fn };
309706
311212
  }
309707
311213
  function mountQuikChat() {
309708
311214
  const container = _quikChatEl;
@@ -309993,7 +311499,7 @@ function renderAiPanelTemplate() {
309993
311499
  `;
309994
311500
  }
309995
311501
 
309996
- // src/panels/right-panel.js
311502
+ // src/panels/right-panel.ts
309997
311503
  var _ctx13 = null;
309998
311504
  var _scope5 = null;
309999
311505
  var _rendering = false;
@@ -310169,13 +311675,13 @@ function _flush2() {
310169
311675
  _ctx13.updateForcedPseudoPreview();
310170
311676
  }
310171
311677
 
310172
- // src/panels/left-panel.js
311678
+ // src/panels/left-panel.ts
310173
311679
  init_lit_html();
310174
311680
  init_store();
310175
311681
  init_reactivity();
310176
311682
  init_workspace2();
310177
311683
 
310178
- // src/panels/stylebook-layers-panel.js
311684
+ // src/panels/stylebook-layers-panel.ts
310179
311685
  init_lit_html();
310180
311686
  init_class_map();
310181
311687
  init_workspace2();
@@ -310255,7 +311761,7 @@ function renderStylebookLayersTemplate(ctx) {
310255
311761
  }
310256
311762
  }
310257
311763
 
310258
- // src/panels/elements-panel.js
311764
+ // src/panels/elements-panel.ts
310259
311765
  init_lit_html();
310260
311766
  init_store();
310261
311767
  init_workspace2();
@@ -310286,7 +311792,7 @@ function renderElementsTemplate(ctx) {
310286
311792
  @click=${() => {
310287
311793
  const t16 = activeTab.value;
310288
311794
  const parentPath = t16?.session.selection || [];
310289
- const parent = getNodeAtPath(t16?.doc.document, parentPath);
311795
+ const parent = getNodeAtPath(t16.doc.document, parentPath);
310290
311796
  const idx = parent?.children ? parent.children.length : 0;
310291
311797
  transactDoc(t16, (tr) => mutateInsertNode(tr, parentPath, idx, structuredClone(def3)));
310292
311798
  }}
@@ -310335,7 +311841,7 @@ function renderElementsTemplate(ctx) {
310335
311841
  @click=${() => {
310336
311842
  const t16 = activeTab.value;
310337
311843
  const parentPath = t16?.session.selection || [];
310338
- const parent = getNodeAtPath(t16?.doc.document, parentPath);
311844
+ const parent = getNodeAtPath(t16.doc.document, parentPath);
310339
311845
  const idx = parent?.children ? parent.children.length : 0;
310340
311846
  const instanceDef = {
310341
311847
  tagName: comp.tagName,
@@ -310374,7 +311880,7 @@ function renderElementsTemplate(ctx) {
310374
311880
  `;
310375
311881
  }
310376
311882
 
310377
- // src/panels/left-panel.js
311883
+ // src/panels/left-panel.ts
310378
311884
  var _ctx14 = null;
310379
311885
  var _scope6 = null;
310380
311886
  var _rendering2 = false;
@@ -310549,7 +312055,7 @@ function _render() {
310549
312055
  ctx.registerLayersDnD();
310550
312056
  }
310551
312057
 
310552
- // src/panels/tab-strip.js
312058
+ // src/panels/tab-strip.ts
310553
312059
  init_lit_html();
310554
312060
  init_class_map();
310555
312061
  init_repeat();
@@ -310636,7 +312142,7 @@ async function requestClose(id) {
310636
312142
  closeTab(id);
310637
312143
  }
310638
312144
 
310639
- // src/studio.js
312145
+ // src/studio.ts
310640
312146
  function getCanvasMode() {
310641
312147
  return activeTab.value?.session.ui.canvasMode ?? "design";
310642
312148
  }
@@ -310770,10 +312276,20 @@ render2(html3`
310770
312276
  <datalist id="tag-names">
310771
312277
  ${webdata_default.allTags.map((tag5) => html3`<option value=${tag5}></option>`)}
310772
312278
  </datalist>
310773
- <datalist id="css-props">
310774
- ${webdata_default.cssProps.map(([name]) => html3`<option value=${name}></option>`)}
310775
- </datalist>
312279
+ <datalist id="css-props"></datalist>
310776
312280
  `, datalistHost);
312281
+ requestIdleCallback(() => {
312282
+ const dl = document.getElementById("css-props");
312283
+ if (!dl)
312284
+ return;
312285
+ const frag = document.createDocumentFragment();
312286
+ for (const [name] of webdata_default.cssProps) {
312287
+ const opt = document.createElement("option");
312288
+ opt.value = name;
312289
+ frag.appendChild(opt);
312290
+ }
312291
+ dl.appendChild(frag);
312292
+ });
310777
312293
  initCssData(webdata_default);
310778
312294
  if (!hasPlatform()) {
310779
312295
  registerPlatform(createDevServerPlatform());
@@ -311010,7 +312526,7 @@ if (_projectParam) {
311010
312526
  id: fileRelPath,
311011
312527
  documentPath: fileRelPath,
311012
312528
  document: parsedDoc,
311013
- frontmatter: frontmatter2,
312529
+ ...frontmatter2 != null && { frontmatter: frontmatter2 },
311014
312530
  sourceFormat: isMd ? "md" : null
311015
312531
  });
311016
312532
  if (isMd && activeTab.value)
@@ -311145,5 +312661,5 @@ effect(() => {
311145
312661
  scheduleAutosave();
311146
312662
  });
311147
312663
 
311148
- //# debugId=9E9829984105751D64756E2164756E21
312664
+ //# debugId=764A387CBBA5D51564756E2164756E21
311149
312665
  //# sourceMappingURL=studio.js.map