@jxsuite/studio 5.0.0 → 5.1.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 (94) hide show
  1. package/dist/chunks/{cf-account-picker-fyf63pmy.js → cf-account-picker-qwkm9zrf.js} +5 -5
  2. package/dist/chunks/{components-2w1f35qs.js → components-vj72gqtq.js} +6 -4
  3. package/dist/chunks/{content-source-3wqeas45.js → content-source-5mex4x1h.js} +20 -20
  4. package/dist/chunks/{convert-to-repeater-d0cgnb6d.js → convert-to-repeater-n64h8znc.js} +20 -20
  5. package/dist/chunks/entry-commands-234hjnqw.js +42 -0
  6. package/dist/chunks/{extension-sections-fy7q4fe9.js → extension-sections-3hpcambp.js} +22 -22
  7. package/dist/chunks/{file-ops-3btj6st0.js → file-ops-8yhd83xr.js} +19 -19
  8. package/dist/chunks/{files-ef8fgs3w.js → files-hnxqxtsg.js} +26 -26
  9. package/dist/chunks/{format-host-3c33nwr8.js → format-host-779sfp2n.js} +2 -2
  10. package/dist/chunks/{fs-events-13tj6sex.js → fs-events-b88z7g4h.js} +4 -4
  11. package/dist/chunks/{git-panel-4wp2rn9b.js → git-panel-xwj8fpab.js} +18 -18
  12. package/dist/chunks/{iframe-host-jgesd924.js → iframe-host-syr0f9sb.js} +9 -9
  13. package/dist/chunks/{layers-1nq5evsh.js → layers-ff81wthn.js} +5 -4
  14. package/dist/chunks/layers-panel-pnnghw12.js +40 -0
  15. package/dist/chunks/{media-picker-2qbetq73.js → media-picker-cqhhxhhe.js} +10 -10
  16. package/dist/chunks/menu-9p2w46gj.js +15 -0
  17. package/dist/chunks/{publish-panel-98f7sr3g.js → publish-panel-5zt840sy.js} +9 -9
  18. package/dist/chunks/quick-search-3748564r.js +45 -0
  19. package/dist/chunks/{references-n553f0e1.js → references-qvvxej7h.js} +3 -3
  20. package/dist/chunks/right-panel-eccz92qt.js +45 -0
  21. package/dist/chunks/{studio-x3rty6tr.js → studio-1knfqgy7.js} +6 -6
  22. package/dist/chunks/{studio-rkstz940.js → studio-1z1kcjv4.js} +17 -8
  23. package/dist/chunks/{studio-qahxvnan.js → studio-3773086z.js} +2 -2
  24. package/dist/chunks/{studio-arfpe389.js → studio-3rz5md06.js} +4 -4
  25. package/dist/chunks/{studio-pm6hgy7r.js → studio-5wt9nvhd.js} +16 -16
  26. package/dist/chunks/{studio-akbww0j5.js → studio-7xnmgv66.js} +19 -19
  27. package/dist/chunks/{studio-26d7myd1.js → studio-8scdew0e.js} +3 -3
  28. package/dist/chunks/{studio-3hxkd92t.js → studio-93zafjcm.js} +8 -8
  29. package/dist/chunks/{studio-5rt7sqa0.js → studio-a79k90n9.js} +11 -17
  30. package/dist/chunks/{studio-3gxv60tn.js → studio-aj37eer3.js} +3 -3
  31. package/dist/chunks/{studio-18avnhjp.js → studio-b0k5tqgp.js} +23 -21
  32. package/dist/chunks/{studio-fabxk6r9.js → studio-b4s9eykd.js} +13 -13
  33. package/dist/chunks/{studio-8qtrpzr3.js → studio-e1pgga3k.js} +5 -5
  34. package/dist/chunks/{studio-8jn5yhyn.js → studio-g3jevyjt.js} +2 -2
  35. package/dist/chunks/{studio-rpyah2ew.js → studio-gb13095a.js} +18 -17
  36. package/dist/chunks/{studio-57mf66w2.js → studio-js8nv53n.js} +5 -5
  37. package/dist/chunks/{studio-vz68yn9e.js → studio-jxp12rnj.js} +4 -4
  38. package/dist/chunks/{studio-az3zd49t.js → studio-k75n7vhp.js} +56 -4
  39. package/dist/chunks/{studio-5jy81t3s.js → studio-kkqkcp3d.js} +221 -16
  40. package/dist/chunks/{studio-tb3ev01j.js → studio-mhhyamxf.js} +4 -4
  41. package/dist/chunks/{studio-81390n6f.js → studio-nq5yf5mp.js} +1 -1
  42. package/dist/chunks/{studio-4m0haseg.js → studio-nzzpvzx9.js} +3 -3
  43. package/dist/chunks/{studio-em9nw8eh.js → studio-pxbgypmg.js} +12 -12
  44. package/dist/chunks/{studio-sgdc5pfc.js → studio-qhhm6hbt.js} +3 -3
  45. package/dist/chunks/{studio-d1ja2x9r.js → studio-qk4bfsq2.js} +3 -3
  46. package/dist/chunks/{studio-25hkdrkw.js → studio-qk90fgqm.js} +9 -9
  47. package/dist/chunks/{studio-s6z853aq.js → studio-r6nvacqs.js} +18 -17
  48. package/dist/chunks/{studio-7xptrg0j.js → studio-sbjyc8bt.js} +6 -6
  49. package/dist/chunks/{studio-5523bpzt.js → studio-syg2tadj.js} +3 -3
  50. package/dist/chunks/{studio-cpvb2ed1.js → studio-tqgryxwg.js} +7 -7
  51. package/dist/chunks/{studio-xsykpvsh.js → studio-try13h8c.js} +11 -11
  52. package/dist/chunks/{studio-erdatzvp.js → studio-vfq8qpjt.js} +34 -5
  53. package/dist/chunks/{studio-79y5sz51.js → studio-vw7mzp6z.js} +2 -2
  54. package/dist/chunks/{studio-9xxz1q69.js → studio-wqz6dggm.js} +5 -5
  55. package/dist/chunks/studio-zdn2g6dt.js +148 -0
  56. package/dist/chunks/{workspace-wrew8zk4.js → workspace-t55jdjbx.js} +3 -3
  57. package/dist/iframe-entry.js +97 -10
  58. package/dist/studio.js +127 -244
  59. package/package.json +6 -6
  60. package/src/canvas/canvas-utils.ts +29 -2
  61. package/src/commands/command-args.ts +37 -2
  62. package/src/commands/registry.ts +18 -8
  63. package/src/commands/run-reported.ts +120 -0
  64. package/src/editor/shortcuts.ts +11 -23
  65. package/src/files/components.ts +39 -0
  66. package/src/files/files.ts +3 -2
  67. package/src/i18n/i18n-commands.ts +10 -0
  68. package/src/packages/pull-package-sync.ts +5 -1
  69. package/src/panels/ai-panel.ts +5 -2
  70. package/src/panels/block-action-bar.ts +7 -2
  71. package/src/panels/i18n-panel.ts +8 -15
  72. package/src/panels/jump-bar.ts +3 -2
  73. package/src/panels/problems-panel.ts +6 -2
  74. package/src/panels/quick-search.ts +6 -12
  75. package/src/panels/settings-menu.ts +5 -15
  76. package/src/panels/tab-strip.ts +3 -3
  77. package/src/services/ai-command-tools.ts +78 -8
  78. package/src/services/ai-project-tools.ts +8 -2
  79. package/src/services/ai-system-prompt.ts +4 -8
  80. package/src/services/ai-tools.ts +8 -69
  81. package/src/services/document-assistant.ts +9 -6
  82. package/src/studio.ts +14 -2
  83. package/src/surfaces/commandbar.json +13 -12
  84. package/src/surfaces/commandbar.ts +6 -5
  85. package/src/surfaces/statusbar.ts +2 -1
  86. package/src/tabs/project-config.ts +45 -11
  87. package/src/ui/layers.ts +4 -1
  88. package/src/workspace/workspace.ts +60 -0
  89. package/dist/chunks/entry-commands-d6g50j7s.js +0 -42
  90. package/dist/chunks/layers-panel-ar2gh90g.js +0 -40
  91. package/dist/chunks/menu-rf7n72mf.js +0 -14
  92. package/dist/chunks/quick-search-srzz83k2.js +0 -45
  93. package/dist/chunks/right-panel-rrgx2dn3.js +0 -45
  94. package/dist/chunks/studio-d055c37e.js +0 -62
@@ -53,6 +53,7 @@ import { effect, effectScope, reactive } from "../reactivity";
53
53
  import { activeTab } from "../workspace/workspace";
54
54
  import { EDITOR_KIND_LABELS } from "../commands/context";
55
55
  import { activeRegistry } from "../commands/active-registry";
56
+ import { runReported } from "../commands/run-reported";
56
57
  import { deployStatusItem } from "../publish/deploy-checklist";
57
58
  import { collabState } from "../collab/collab-state";
58
59
  import { problemCount, problems } from "../services/notify";
@@ -378,7 +379,7 @@ function state(): StatusbarScope {
378
379
  const item = _state?.fields.flatMap((field) => field.items).find((i) => i.key === key);
379
380
  const registry = activeRegistry();
380
381
  if (item?.command && registry) {
381
- void registry.run(item.command, item.args as never);
382
+ void runReported(registry, item.command, item.args as never, "Status Bar");
382
383
  }
383
384
  },
384
385
  }) as StatusbarScope;
@@ -48,12 +48,15 @@
48
48
  * write, and therefore with an empty diff.
49
49
  *
50
50
  * **A real edit is a one-line diff.** The file's layout — which objects sit on one line, where a
51
- * blank line falls — is read once per binding ({@link seedCommitted}) and every serialisation here
52
- * honours it, so what changes on disk is the field that changed.
51
+ * blank line falls — is read once per binding ({@link seedCommitted}), replaced by the record of
52
+ * whatever bytes reached the file another way ({@link adoptProjectConfig}), and every serialisation
53
+ * here honours it, so what changes on disk is the field that changed.
53
54
  *
54
55
  * **Collaboration.** `project.json` is out of collab replication; the gate is in
55
56
  * `collab/collab-session.ts`'s `ensureCollab`, which is what would otherwise register the Yjs
56
57
  * history delegate over this tab.
58
+ *
59
+ * @docs studio/projects/settings
57
60
  */
58
61
 
59
62
  import { errorMessage } from "@jxsuite/schema/parse";
@@ -64,7 +67,7 @@ import { requireProjectState, setProjectState } from "../state";
64
67
  import { setWorkspaceProject, workspace } from "../workspace/workspace";
65
68
  import { PROJECT_CONFIG_PATH, createTab, disposeTab } from "./tab";
66
69
  import { transactDoc } from "./transact";
67
- import { parseJsonDocument, serializeJson } from "../files/json-layout";
70
+ import { deriveJsonLayout, parseJsonDocument, serializeJson } from "../files/json-layout";
68
71
  import type { JsonLayout } from "../files/json-layout";
69
72
 
70
73
  import type { Tab } from "./tab";
@@ -114,8 +117,9 @@ let _detached: Tab | null = null;
114
117
  let _committed: string | null = null;
115
118
 
116
119
  /**
117
- * The layout the file was read in ({@link seedCommitted}), for a binding with no open tab to carry
118
- * it. Reset with the binding: a different project is a different file.
120
+ * The layout the file was read in ({@link seedCommitted}) or last written in ({@link
121
+ * adoptProjectConfig}), for a binding with no open tab to carry it. Reset with the binding: a
122
+ * different project is a different file.
119
123
  */
120
124
  let _layout: JsonLayout | null = null;
121
125
 
@@ -241,16 +245,28 @@ function liveConfig(): ProjectConfig | null {
241
245
  }
242
246
 
243
247
  /**
244
- * Make `target` hold exactly `source`'s keys — assignment alone would leave the removals behind.
248
+ * Make `target` hold exactly `source`'s keys, in `source`'s ORDER.
249
+ *
250
+ * Every key goes, the ones `source` keeps included, before `source` is assigned over the empty
251
+ * object. Assignment alone would leave the removals behind; deleting only the removals would leave
252
+ * the ORDER behind, because a key that survives keeps the position it had and only a new one takes
253
+ * `source`'s. Key order is what the serializer writes the file in, so a document holding the
254
+ * assistant's configuration in the previous file's order re-lays the file the assistant just wrote
255
+ * on the next commit — even a no-op one, which then disagrees with {@link _committed} (issue 331).
256
+ * The rival handover in {@link commitProjectConfig} is the same case from the other side: the
257
+ * object of record is the source, and its order is the file's.
258
+ *
259
+ * The transient — an observer of a single key would see it gone and back within the transaction —
260
+ * is one the removals already had, and nothing observes the configuration document key by key: the
261
+ * settings surfaces render from `projectState` and mutate it in place, and every reader of the
262
+ * document follows the root reference {@link transactDoc} replaces when the transaction ends.
245
263
  *
246
264
  * @param {Record<string, unknown>} target
247
265
  * @param {ProjectConfig} source
248
266
  */
249
267
  function replaceContents(target: Record<string, unknown>, source: ProjectConfig): void {
250
268
  for (const key of Object.keys(target)) {
251
- if (!Object.hasOwn(source, key)) {
252
- delete target[key];
253
- }
269
+ delete target[key];
254
270
  }
255
271
  Object.assign(target, source);
256
272
  }
@@ -444,14 +460,26 @@ export async function commitProjectConfig(
444
460
  * assistant's write back out of existence. Putting the bytes into the document instead keeps the
445
461
  * one-object rule true, and the state sync follows from the bind effect like every other change.
446
462
  *
463
+ * **The layout record travels with the write.** The assistant authored the whole file, and the text
464
+ * it wrote is the file now — so the record the next commit honours is derived from THAT text
465
+ * (`json-layout.ts`'s `deriveJsonLayout`), exactly as a reload from disk would derive it, and it
466
+ * replaces both the seed's record and the open tab's. Keeping the record the chokepoint read BEFORE
467
+ * the write is what turned the settings edit after an assistant rewrite into a whole-file diff: the
468
+ * file was on disk in the assistant's layout and the commit re-laid it in the previous one (issue
469
+ * 331). The key order travels the same way: {@link replaceContents} installs `config`'s order on
470
+ * the document, so a rewrite that moved a top-level key stays moved. Nothing here re-reads the file
471
+ * to learn any of this: the caller just produced the bytes, and a second parse of `project.json` is
472
+ * the rival object this door exists to prevent.
473
+ *
447
474
  * `skipHistory`, because this is a RELOAD and not an edit: the file already says this, and
448
475
  * `write_file` tells the model in as many words that its disk writes are not undoable. A history
449
476
  * entry here would offer ⌘Z a change it could not take back from the file.
450
477
  *
451
478
  * @param {ProjectConfig} config The configuration as written — already past the schema gate.
479
+ * @param {string} text The bytes that reached the file, which `config` is the parse of.
452
480
  * @returns {Promise<void>}
453
481
  */
454
- export async function adoptProjectConfig(config: ProjectConfig): Promise<void> {
482
+ export async function adoptProjectConfig(config: ProjectConfig, text: string): Promise<void> {
455
483
  if (!requireProjectState()) {
456
484
  // No project state is no configuration document either ({@link projectConfigDocument} reads
457
485
  // One). The workspace copy is then the only thing there is to keep true.
@@ -466,7 +494,13 @@ export async function adoptProjectConfig(config: ProjectConfig): Promise<void> {
466
494
  );
467
495
  tab.doc.dirty = false;
468
496
  // Settle a read already in flight before saying what the file holds, or it would resolve after
469
- // This line with the PREVIOUS bytes and make the next real commit look like a no-op.
497
+ // These lines with the PREVIOUS bytes and record, and make the next real commit look like a
498
+ // No-op — or re-lay the file the assistant just formatted.
470
499
  await seedCommitted();
500
+ // The record of the bytes just written, on the tab as well as on the seed: `configLayout`
501
+ // Prefers the open tab's, and the tab's is the record of the file it opened, which the write has
502
+ // Just replaced. The tab holds the config now; it holds the config's layout too.
503
+ _layout = deriveJsonLayout(text);
504
+ tab.doc.layout = _layout;
471
505
  _committed = serializeProjectConfig(config);
472
506
  }
package/src/ui/layers.ts CHANGED
@@ -19,6 +19,7 @@ import { mountSurface, registerSurface } from "./surface";
19
19
  import toastsDoc from "../surfaces/toasts.json";
20
20
  import { dismiss, toasts } from "../services/notify";
21
21
  import { activeRegistry } from "../commands/active-registry";
22
+ import { runReported } from "../commands/run-reported";
22
23
  import { effect, effectScope, reactive } from "../reactivity";
23
24
  import type { DialogChoiceOption, DialogSurfaceOptions } from "../surfaces/dialog";
24
25
  import type { Notification, Severity } from "../services/notify";
@@ -602,7 +603,9 @@ function toastScope(): ToastScope {
602
603
  return;
603
604
  }
604
605
  retireToast(id);
605
- void registry.run(record.action, record.actionArgs);
606
+ // The toast is gone by the time the action refuses, so the refusal has to land somewhere the
607
+ // Person can still read it: Problems, through `commands/run-reported.ts`.
608
+ void runReported(registry, record.action, record.actionArgs, "Notifications");
606
609
  },
607
610
  toasts: [],
608
611
  }) as ToastScope;
@@ -10,6 +10,7 @@ import {
10
10
  stringArg,
11
11
  stringProperty,
12
12
  } from "../commands/command-args";
13
+ import { EDITOR_KIND_LABELS } from "../commands/context";
13
14
  import type { Tab, TabOrigin } from "../tabs/tab";
14
15
  import type { JsonLayout } from "../files/json-layout";
15
16
 
@@ -1297,6 +1298,65 @@ export function tabCommands(deps: TabCommandDeps): AnyCommand[] {
1297
1298
  cycleTab(-1);
1298
1299
  },
1299
1300
  },
1301
+ {
1302
+ args: argsSchema({
1303
+ path: stringProperty(
1304
+ 'Project-relative path of the file to open, e.g. "pages/about.json" or ' +
1305
+ '"components/nav-bar.json". It must exist.',
1306
+ ),
1307
+ }),
1308
+ id: "document.open",
1309
+ title: "Open Document",
1310
+ category: "Document",
1311
+ /* PROJECT level, though the namespace says document: the level is what a record acts on, and
1312
+ this one acts on the workspace — it adds a tab — from a state where no document is open
1313
+ at all. A document-level record would be gated on the one thing it exists to produce. */
1314
+ level: "project",
1315
+ menus: ["palette"],
1316
+ group: "1_file",
1317
+ when: (ctx) => ctx.project.open,
1318
+ requires: "an open project",
1319
+ aiTool: {
1320
+ description:
1321
+ "Open a project file as the active document; the document tools then operate on it. " +
1322
+ "Use it when the user should SEE the page, or for iterative visual refinement after " +
1323
+ "creating a page or component.",
1324
+ name: "open_document",
1325
+ /* The person's own read: `activeTab` is what the tab strip highlights, and `editor.kind`
1326
+ is the fact the document-tree tier is gated on. Both are named so the model learns in one
1327
+ round whether the tree tools reach the file it opened — a `.csv` lands in the Grid, a
1328
+ `.png` in the Media viewer, and neither is an element tree. The `.value` read is module
1329
+ state, which a projected `report` may close over (§12.4); `after` alone cannot say WHICH
1330
+ document is active. */
1331
+ report: ({ after, args }) => {
1332
+ const path = stringArg("document.open", args, "path");
1333
+ const active = activeTab.value?.documentPath ?? null;
1334
+ if (active !== path) {
1335
+ return `Opened "${path}", but the active document is ${active === null ? "none" : `"${active}"`}.`;
1336
+ }
1337
+ const where =
1338
+ after.editor.kind === "canvas"
1339
+ ? "on the canvas; the document tools now operate on it"
1340
+ : `in the ${EDITOR_KIND_LABELS[after.editor.kind]} editor, which is not an element tree the document tools can edit`;
1341
+ return `"${path}" is the active document, ${where}.`;
1342
+ },
1343
+ },
1344
+ /* Refuses by THROWING (§12.4's first review rule). `openFileInTab` reports a file it cannot
1345
+ open as a Problem and returns normally — the right answer for a click in the Files tree,
1346
+ where the toast is in front of the person — so the record has to look for the tab itself.
1347
+ The hand tool this replaced read `getTab()` after the open and called whatever it found a
1348
+ success, so a missing file left the PREVIOUS document active and reported "Switched to". */
1349
+ run: async (_ctx, args) => {
1350
+ const path = stringArg("document.open", args, "path");
1351
+ await deps.openFile(path);
1352
+ if (![...workspace.tabs.values()].some((tab) => tab.documentPath === path)) {
1353
+ throw new RangeError(
1354
+ `command "document.open" argument "path": "${path}" could not be opened — it does ` +
1355
+ `not exist, or no editor claims its format. Problems has the reason.`,
1356
+ );
1357
+ }
1358
+ },
1359
+ },
1300
1360
  {
1301
1361
  id: "document.reopenClosed",
1302
1362
  title: "Reopen Closed Document",
@@ -1,42 +0,0 @@
1
- import {
2
- createEntry2,
3
- registerContentCommands2
4
- } from "./studio-fabxk6r9.js";
5
- import"./studio-sgdc5pfc.js";
6
- import"./studio-57mf66w2.js";
7
- import"./studio-x3rty6tr.js";
8
- import"./studio-rpyah2ew.js";
9
- import"./studio-8jn5yhyn.js";
10
- import"./studio-q0a3yk4n.js";
11
- import"./studio-qahxvnan.js";
12
- import"./studio-cpvb2ed1.js";
13
- import"./studio-tb3ev01j.js";
14
- import"./studio-26d7myd1.js";
15
- import"./studio-81390n6f.js";
16
- import"./studio-rkstz940.js";
17
- import"./studio-25hkdrkw.js";
18
- import"./studio-d055c37e.js";
19
- import"./studio-y9zedyjn.js";
20
- import"./studio-vz68yn9e.js";
21
- import"./studio-4m0haseg.js";
22
- import"./studio-az3zd49t.js";
23
- import"./studio-q3x06vmj.js";
24
- import"./studio-6ewqv390.js";
25
- import"./studio-yxa81f45.js";
26
- import"./studio-esrxgwh6.js";
27
- import"./studio-79y5sz51.js";
28
- import"./studio-6nzaktvy.js";
29
- import"./studio-3gxv60tn.js";
30
- import"./studio-erdatzvp.js";
31
- import"./studio-1k325pwf.js";
32
- import"./studio-5jy81t3s.js";
33
- import"./studio-p1dw8wfw.js";
34
- import"./studio-7r42c6ca.js";
35
- import"./studio-tjjk7jvk.js";
36
- export {
37
- createEntry2 as createEntry,
38
- registerContentCommands2 as registerContentCommands
39
- };
40
-
41
- //# debugId=474288D19E3E71A764756E2164756E21
42
- //# sourceMappingURL=entry-commands-d6g50j7s.js.map
@@ -1,40 +0,0 @@
1
- import {
2
- startLayerTitleEdit2,
3
- registerLayersPanel2
4
- } from "./studio-s6z853aq.js";
5
- import"./studio-3hxkd92t.js";
6
- import"./studio-akbww0j5.js";
7
- import"./studio-8qtrpzr3.js";
8
- import"./studio-5523bpzt.js";
9
- import"./studio-57mf66w2.js";
10
- import"./studio-q0a3yk4n.js";
11
- import"./studio-qahxvnan.js";
12
- import"./studio-26d7myd1.js";
13
- import"./studio-81390n6f.js";
14
- import"./studio-rkstz940.js";
15
- import"./studio-25hkdrkw.js";
16
- import"./studio-d055c37e.js";
17
- import"./studio-y9zedyjn.js";
18
- import"./studio-vz68yn9e.js";
19
- import"./studio-4m0haseg.js";
20
- import"./studio-az3zd49t.js";
21
- import"./studio-q3x06vmj.js";
22
- import"./studio-6ewqv390.js";
23
- import"./studio-yxa81f45.js";
24
- import"./studio-esrxgwh6.js";
25
- import"./studio-79y5sz51.js";
26
- import"./studio-6nzaktvy.js";
27
- import"./studio-3gxv60tn.js";
28
- import"./studio-erdatzvp.js";
29
- import"./studio-1k325pwf.js";
30
- import"./studio-5jy81t3s.js";
31
- import"./studio-p1dw8wfw.js";
32
- import"./studio-7r42c6ca.js";
33
- import"./studio-tjjk7jvk.js";
34
- export {
35
- registerLayersPanel2 as registerLayersPanel,
36
- startLayerTitleEdit2 as startLayerTitleEdit
37
- };
38
-
39
- //# debugId=0A17594D4CFC8C3764756E2164756E21
40
- //# sourceMappingURL=layers-panel-ar2gh90g.js.map
@@ -1,14 +0,0 @@
1
- import {
2
- openMenu2
3
- } from "./studio-3gxv60tn.js";
4
- import"./studio-erdatzvp.js";
5
- import"./studio-1k325pwf.js";
6
- import"./studio-5jy81t3s.js";
7
- import"./studio-p1dw8wfw.js";
8
- import"./studio-7r42c6ca.js";
9
- export {
10
- openMenu2 as openMenu
11
- };
12
-
13
- //# debugId=01236C6F8174726964756E2164756E21
14
- //# sourceMappingURL=menu-rf7n72mf.js.map
@@ -1,45 +0,0 @@
1
- import {
2
- initQuickSearch2,
3
- openQuickSearch2
4
- } from "./studio-5rt7sqa0.js";
5
- import"./studio-18avnhjp.js";
6
- import"./studio-pm6hgy7r.js";
7
- import"./studio-d1ja2x9r.js";
8
- import"./studio-5523bpzt.js";
9
- import"./studio-sgdc5pfc.js";
10
- import"./studio-em9nw8eh.js";
11
- import"./studio-x3rty6tr.js";
12
- import"./studio-rpyah2ew.js";
13
- import"./studio-8jn5yhyn.js";
14
- import"./studio-q0a3yk4n.js";
15
- import"./studio-qahxvnan.js";
16
- import"./studio-cpvb2ed1.js";
17
- import"./studio-tb3ev01j.js";
18
- import"./studio-26d7myd1.js";
19
- import"./studio-81390n6f.js";
20
- import"./studio-rkstz940.js";
21
- import"./studio-25hkdrkw.js";
22
- import"./studio-d055c37e.js";
23
- import"./studio-y9zedyjn.js";
24
- import"./studio-vz68yn9e.js";
25
- import"./studio-4m0haseg.js";
26
- import"./studio-az3zd49t.js";
27
- import"./studio-q3x06vmj.js";
28
- import"./studio-6ewqv390.js";
29
- import"./studio-yxa81f45.js";
30
- import"./studio-esrxgwh6.js";
31
- import"./studio-79y5sz51.js";
32
- import"./studio-6nzaktvy.js";
33
- import"./studio-3gxv60tn.js";
34
- import"./studio-erdatzvp.js";
35
- import"./studio-1k325pwf.js";
36
- import"./studio-5jy81t3s.js";
37
- import"./studio-p1dw8wfw.js";
38
- import"./studio-7r42c6ca.js";
39
- export {
40
- initQuickSearch2 as initQuickSearch,
41
- openQuickSearch2 as openQuickSearch
42
- };
43
-
44
- //# debugId=67B6A208739F532164756E2164756E21
45
- //# sourceMappingURL=quick-search-srzz83k2.js.map
@@ -1,45 +0,0 @@
1
- import {
2
- mount2,
3
- unmount2,
4
- render2,
5
- inspectorTab2,
6
- setInspectorTab2
7
- } from "./studio-xsykpvsh.js";
8
- import"./studio-3hxkd92t.js";
9
- import"./studio-akbww0j5.js";
10
- import"./studio-8qtrpzr3.js";
11
- import"./studio-5523bpzt.js";
12
- import"./studio-57mf66w2.js";
13
- import"./studio-qahxvnan.js";
14
- import"./studio-26d7myd1.js";
15
- import"./studio-81390n6f.js";
16
- import"./studio-rkstz940.js";
17
- import"./studio-25hkdrkw.js";
18
- import"./studio-d055c37e.js";
19
- import"./studio-y9zedyjn.js";
20
- import"./studio-vz68yn9e.js";
21
- import"./studio-4m0haseg.js";
22
- import"./studio-az3zd49t.js";
23
- import"./studio-q3x06vmj.js";
24
- import"./studio-6ewqv390.js";
25
- import"./studio-yxa81f45.js";
26
- import"./studio-esrxgwh6.js";
27
- import"./studio-79y5sz51.js";
28
- import"./studio-6nzaktvy.js";
29
- import"./studio-3gxv60tn.js";
30
- import"./studio-erdatzvp.js";
31
- import"./studio-1k325pwf.js";
32
- import"./studio-5jy81t3s.js";
33
- import"./studio-p1dw8wfw.js";
34
- import"./studio-7r42c6ca.js";
35
- import"./studio-tjjk7jvk.js";
36
- export {
37
- inspectorTab2 as inspectorTab,
38
- mount2 as mount,
39
- render2 as render,
40
- setInspectorTab2 as setInspectorTab,
41
- unmount2 as unmount
42
- };
43
-
44
- //# debugId=ACC2FC3785A3466764756E2164756E21
45
- //# sourceMappingURL=right-panel-rrgx2dn3.js.map
@@ -1,62 +0,0 @@
1
- import {
2
- getPlatform2
3
- } from "./studio-6nzaktvy.js";
4
- import {
5
- projectState
6
- } from "./studio-6ewqv390.js";
7
-
8
- // src/files/components.ts
9
- var componentRegistry2 = [];
10
- var _componentRegistryLoaded = false;
11
- async function loadComponentRegistry2() {
12
- try {
13
- const platform = getPlatform2();
14
- componentRegistry2 = await platform.discoverComponents(projectState?.projectRoot || undefined);
15
- _componentRegistryLoaded = true;
16
- } catch {
17
- _componentRegistryLoaded = true;
18
- }
19
- }
20
- function buildComponentInstance2(comp) {
21
- const $props = Object.fromEntries((comp.props ?? []).map((p) => [p.name, p.default !== undefined ? p.default : ""]));
22
- const children = [];
23
- for (const slot of comp.slots ?? []) {
24
- for (const child of structuredClone(slot.fallback ?? [])) {
25
- if (!slot.name) {
26
- children.push(child);
27
- } else if (typeof child === "object" && child !== null && typeof child.tagName === "string") {
28
- child.attributes = { slot: slot.name, ...child.attributes };
29
- children.push(child);
30
- } else {
31
- children.push({ attributes: { slot: slot.name }, children: [child], tagName: "span" });
32
- }
33
- }
34
- }
35
- return {
36
- $props,
37
- tagName: comp.tagName,
38
- ...children.length > 0 ? { children } : {}
39
- };
40
- }
41
- function computeRelativePath2(fromDocPath, toCompPath) {
42
- if (!fromDocPath) {
43
- return `./${toCompPath}`;
44
- }
45
- const from = fromDocPath.replaceAll("\\", "/");
46
- const to = toCompPath.replaceAll("\\", "/");
47
- const fromDir = from.includes("/") ? from.slice(0, from.lastIndexOf("/")) : "";
48
- const fromParts = fromDir.split("/").filter(Boolean);
49
- const toParts = to.split("/").filter(Boolean);
50
- let common = 0;
51
- while (common < fromParts.length && common < toParts.length && fromParts[common] === toParts[common]) {
52
- common += 1;
53
- }
54
- const ups = fromParts.length - common;
55
- const remaining = toParts.slice(common);
56
- return (ups > 0 ? "../".repeat(ups) : "./") + remaining.join("/");
57
- }
58
-
59
- export { componentRegistry2, loadComponentRegistry2, buildComponentInstance2, computeRelativePath2 };
60
-
61
- //# debugId=771ED3632A98E38064756E2164756E21
62
- //# sourceMappingURL=studio-d055c37e.js.map