@jxsuite/studio 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/css-meta.json +1487 -0
- package/data/elements-meta.json +370 -0
- package/data/html-meta.json +366 -0
- package/data/stylebook-meta.json +200 -0
- package/data/webdata.json +1621 -0
- package/dist/chunks/{Overlay.dev-ymy3et3y.js → Overlay.dev-d2ajy6sj.js} +7 -7
- package/dist/chunks/{content-source-r2n7v682.js → content-source-56xpvx83.js} +13 -12
- package/dist/chunks/{convert-to-repeater-cnpyvj74.js → convert-to-repeater-0xh9wwek.js} +12 -11
- package/dist/chunks/{extension-sections-vpcm4jvx.js → extension-sections-g34239vm.js} +17 -16
- package/dist/chunks/{files-zeg88k2d.js → files-gkz202dp.js} +18 -19
- package/dist/chunks/{format-host-taymsw55.js → format-host-pej3srnw.js} +2 -2
- package/dist/chunks/{git-panel-qp4rrwr9.js → git-panel-4j6xbh8g.js} +12 -11
- package/dist/chunks/{layers-panel-kj93w2zg.js → layers-panel-8mvn8sgd.js} +15 -14
- package/dist/chunks/{monaco-setup-xy3bs05d.js → monaco-setup-a5wkmbgh.js} +6 -3
- package/dist/chunks/{publish-panel-6qz6kp41.js → publish-panel-ptddc3kg.js} +6 -6
- package/dist/chunks/{quick-search-9wwa09hh.js → quick-search-j88azfs2.js} +19 -18
- package/dist/chunks/right-panel-egkaxy89.js +38 -0
- package/dist/chunks/{sp-overlay.dev-h6kdx076.js → sp-overlay.dev-s18hymn9.js} +8 -8
- package/dist/chunks/sp-progress-circle.dev-0zxcyz3r.js +15 -0
- package/dist/chunks/sp-tooltip.dev-5c6d1kjz.js +15 -0
- package/dist/chunks/{studio-753znj4c.js → studio-0e4h32g6.js} +5 -5
- package/dist/chunks/{studio-yz9s88s0.js → studio-10s469da.js} +25 -9
- package/dist/chunks/{studio-6f0am8f2.js → studio-2w11grav.js} +2 -2
- package/dist/chunks/{studio-zqv3w24n.js → studio-3q65xvzv.js} +5 -5
- package/dist/chunks/{studio-qhh8r5fz.js → studio-4058pg09.js} +4 -4
- package/dist/chunks/{studio-hekaagev.js → studio-4enps87v.js} +17 -17
- package/dist/chunks/{studio-tqemhphj.js → studio-50eed4c9.js} +4 -4
- package/dist/chunks/studio-53n8bp04.js +16 -0
- package/dist/chunks/{studio-nqq8jk8f.js → studio-5amdrjm4.js} +14 -14
- package/dist/chunks/{studio-6zzbyx17.js → studio-5ne8mdx9.js} +2 -2
- package/dist/chunks/{studio-3z8jjm2p.js → studio-7ejemhej.js} +3 -3
- package/dist/chunks/{studio-1kgfcv7s.js → studio-a11d3a1b.js} +12 -11
- package/dist/chunks/{studio-rgwcpast.js → studio-ay8wcr2b.js} +2 -2
- package/dist/chunks/{studio-fys6z73y.js → studio-bak2cyjr.js} +7 -7
- package/dist/chunks/{studio-xmvbhg31.js → studio-c31yb4t6.js} +2 -2
- package/dist/chunks/{studio-8sdyjfd6.js → studio-cf4rk7kv.js} +2 -2
- package/dist/chunks/{studio-yphy4z9m.js → studio-cv606rs1.js} +5 -5
- package/dist/chunks/{studio-5kt960pk.js → studio-hk523hby.js} +133 -147
- package/dist/chunks/{studio-x0et2z9g.js → studio-hs8x23fv.js} +15 -15
- package/dist/chunks/{studio-p471gg5n.js → studio-kvfx9z2c.js} +7 -3
- package/dist/chunks/{studio-22xr4q8q.js → studio-ncnet0ba.js} +18 -29
- package/dist/chunks/{studio-ckwz4d3x.js → studio-twsafr1e.js} +2 -2
- package/dist/chunks/{studio-qrsfh1w7.js → studio-tzx3xmvx.js} +5 -5
- package/dist/chunks/{studio-g8t7g0gp.js → studio-vdpcpada.js} +3 -3
- package/dist/chunks/{studio-6a0h7sne.js → studio-vhk5fmfv.js} +2 -2
- package/dist/chunks/{studio-hrajjyt2.js → studio-wdt9y92a.js} +2 -2
- package/dist/chunks/{studio-r8vx7bkz.js → studio-x3etxs0s.js} +14 -13
- package/dist/chunks/{studio-pv8m0h4a.js → studio-yxzgjq8q.js} +28 -23
- package/dist/chunks/{studio-300zsz1k.js → studio-zdkgwhkv.js} +6 -6
- package/dist/codicon.ttf +0 -0
- package/dist/iframe-entry.js +8 -1
- package/dist/manifest.json +82 -0
- package/dist/studio.js +232 -103
- package/index.html +0 -50
- package/package.json +12 -5
- package/src/canvas/iframe-entry.ts +5 -0
- package/src/canvas/iframe-host.ts +45 -4
- package/src/content/entry-editor.ts +2 -1
- package/src/editor/context-menu.ts +13 -2
- package/src/editor/slash-menu.ts +26 -11
- package/src/files/files.ts +11 -23
- package/src/grid/grid-panel.ts +27 -6
- package/src/hosting/document.ts +109 -0
- package/src/hosting/layout.ts +211 -0
- package/src/hosting/stage.ts +166 -0
- package/src/hosting/tsconfig.json +18 -0
- package/src/panels/ai-chat/chat-view.ts +25 -14
- package/src/panels/git-panel.ts +17 -14
- package/src/panels/head-panel.ts +32 -14
- package/src/panels/imports-panel.ts +32 -13
- package/src/panels/layers-panel.ts +9 -1
- package/src/panels/panel-registry.ts +0 -1
- package/src/panels/properties-panel.ts +3 -3
- package/src/panels/settings-pane.ts +1 -1
- package/src/panels/style-panel.ts +3 -3
- package/src/panels/stylebook-panel.ts +10 -1
- package/src/panels/toolbar.ts +1 -1
- package/src/services/bundle-base.ts +69 -0
- package/src/services/monaco-setup.ts +19 -13
- package/src/shell/tree.ts +155 -0
- package/src/shell.ts +0 -2
- package/src/studio.ts +22 -2
- package/src/types.ts +15 -0
- package/src/ui/regions.ts +10 -45
- package/styles/overlays.css +35 -0
- package/dist/chunks/2020-xp8vnwma.js.map +0 -24
- package/dist/chunks/Overlay.dev-ymy3et3y.js.map +0 -9
- package/dist/chunks/adapter-jkcyhgtr.js.map +0 -9
- package/dist/chunks/cf-settings-g5fbf2zp.js.map +0 -9
- package/dist/chunks/components-z6cnkyy1.js.map +0 -9
- package/dist/chunks/content-source-r2n7v682.js.map +0 -9
- package/dist/chunks/convert-to-repeater-cnpyvj74.js.map +0 -10
- package/dist/chunks/editor-cptq5jp1.js.map +0 -9
- package/dist/chunks/extension-sections-vpcm4jvx.js.map +0 -11
- package/dist/chunks/files-zeg88k2d.js.map +0 -9
- package/dist/chunks/flow-qbfgrpeh.js.map +0 -12
- package/dist/chunks/focus-trap.esm-ggawf1hy.js.map +0 -11
- package/dist/chunks/focus-visible-6eg70z18.js.map +0 -10
- package/dist/chunks/format-host-taymsw55.js.map +0 -9
- package/dist/chunks/git-panel-qp4rrwr9.js.map +0 -9
- package/dist/chunks/index-nj44jpzj.js.map +0 -14
- package/dist/chunks/index-zqxmqxmh.js.map +0 -9
- package/dist/chunks/javascript-q8kpmfah.js.map +0 -11
- package/dist/chunks/jsonMode-dkr040ga.js.map +0 -18
- package/dist/chunks/jx-validate-jj9rnt4n.js.map +0 -9
- package/dist/chunks/layers-panel-kj93w2zg.js.map +0 -9
- package/dist/chunks/monaco-binding-rj6xpx9y.js.map +0 -10
- package/dist/chunks/monaco-setup-xy3bs05d.js.map +0 -15
- package/dist/chunks/publish-panel-6qz6kp41.js.map +0 -9
- package/dist/chunks/quick-search-9wwa09hh.js.map +0 -9
- package/dist/chunks/right-panel-faf816ch.js +0 -37
- package/dist/chunks/right-panel-faf816ch.js.map +0 -9
- package/dist/chunks/section-registry-sx1ykvkw.js.map +0 -9
- package/dist/chunks/sp-overlay.dev-h6kdx076.js.map +0 -9
- package/dist/chunks/sp-popover.dev-dj9x7e7a.js.map +0 -9
- package/dist/chunks/sp-progress-circle.dev-0fpvhm52.js +0 -15
- package/dist/chunks/sp-progress-circle.dev-0fpvhm52.js.map +0 -9
- package/dist/chunks/sp-tooltip.dev-rvepkw4r.js +0 -15
- package/dist/chunks/sp-tooltip.dev-rvepkw4r.js.map +0 -9
- package/dist/chunks/sp-tray.dev-64v4pxw8.js.map +0 -12
- package/dist/chunks/studio-0a5qrh01.js.map +0 -9
- package/dist/chunks/studio-0rqqhrdy.js.map +0 -12
- package/dist/chunks/studio-18j3bmcz.js.map +0 -10
- package/dist/chunks/studio-1kgfcv7s.js.map +0 -13
- package/dist/chunks/studio-22xr4q8q.js.map +0 -13
- package/dist/chunks/studio-300zsz1k.js.map +0 -39
- package/dist/chunks/studio-3fk1ac9z.js.map +0 -12
- package/dist/chunks/studio-3n4ndrzh.js.map +0 -41
- package/dist/chunks/studio-3z8jjm2p.js.map +0 -13
- package/dist/chunks/studio-4mqb9a0j.js.map +0 -14
- package/dist/chunks/studio-4q0wznzf.js.map +0 -73
- package/dist/chunks/studio-5ehhackm.js.map +0 -10
- package/dist/chunks/studio-5kt960pk.js.map +0 -38
- package/dist/chunks/studio-5x5774ak.js.map +0 -10
- package/dist/chunks/studio-685s0ytq.js.map +0 -76
- package/dist/chunks/studio-6a0h7sne.js.map +0 -15
- package/dist/chunks/studio-6f0am8f2.js.map +0 -10
- package/dist/chunks/studio-6kv3apa9.js.map +0 -10
- package/dist/chunks/studio-6zzbyx17.js.map +0 -12
- package/dist/chunks/studio-753znj4c.js.map +0 -16
- package/dist/chunks/studio-7afd21nw.js.map +0 -10
- package/dist/chunks/studio-8jpzqk5s.js.map +0 -10
- package/dist/chunks/studio-8q517dfr.js.map +0 -10
- package/dist/chunks/studio-8sdyjfd6.js.map +0 -10
- package/dist/chunks/studio-a0tswy0w.js.map +0 -9
- package/dist/chunks/studio-a7pzveq1.js.map +0 -11
- package/dist/chunks/studio-ahnzd9rg.js.map +0 -10
- package/dist/chunks/studio-b9b6t1dg.js.map +0 -651
- package/dist/chunks/studio-bw5dz6km.js.map +0 -21
- package/dist/chunks/studio-cjm7fdjf.js.map +0 -14
- package/dist/chunks/studio-ckwz4d3x.js.map +0 -12
- package/dist/chunks/studio-d1ks410h.js.map +0 -10
- package/dist/chunks/studio-dg7zyt5x.js.map +0 -10
- package/dist/chunks/studio-fys6z73y.js.map +0 -10
- package/dist/chunks/studio-g1wdche0.js.map +0 -56
- package/dist/chunks/studio-g8t7g0gp.js.map +0 -10
- package/dist/chunks/studio-h4rxscfc.js.map +0 -10
- package/dist/chunks/studio-hekaagev.js.map +0 -18
- package/dist/chunks/studio-hrajjyt2.js.map +0 -10
- package/dist/chunks/studio-nqq8jk8f.js.map +0 -14
- package/dist/chunks/studio-p471gg5n.js.map +0 -14
- package/dist/chunks/studio-pv8m0h4a.js.map +0 -98
- package/dist/chunks/studio-qhh8r5fz.js.map +0 -13
- package/dist/chunks/studio-qrsfh1w7.js.map +0 -41
- package/dist/chunks/studio-r8vx7bkz.js.map +0 -235
- package/dist/chunks/studio-rgwcpast.js.map +0 -12
- package/dist/chunks/studio-s519zc99.js.map +0 -10
- package/dist/chunks/studio-sas7mt3k.js.map +0 -10
- package/dist/chunks/studio-t5wqwzdh.js.map +0 -10
- package/dist/chunks/studio-tqemhphj.js.map +0 -11
- package/dist/chunks/studio-tr20m8g8.js.map +0 -9
- package/dist/chunks/studio-tvgyw9xw.js.map +0 -14
- package/dist/chunks/studio-x0et2z9g.js.map +0 -32
- package/dist/chunks/studio-xm3dbxvn.js.map +0 -19
- package/dist/chunks/studio-xmvbhg31.js.map +0 -10
- package/dist/chunks/studio-ynxwkrzd.js.map +0 -246
- package/dist/chunks/studio-yphy4z9m.js.map +0 -10
- package/dist/chunks/studio-yz9s88s0.js.map +0 -54
- package/dist/chunks/studio-z6nw2ek2.js.map +0 -10
- package/dist/chunks/studio-zqv3w24n.js.map +0 -11
- package/dist/chunks/tsMode-76kr53q0.js.map +0 -13
- package/dist/chunks/ws-client-6shc5rze.js.map +0 -12
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/collab/monaco-binding.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/**\n * Monaco ↔ `Y.Text`: two-way character-level sync plus remote in-buffer cursors.\n *\n * This is the first-party replacement for `y-monaco`, which was abandonware — last published\n * 2024-07-31 — and was the one thing pinning Studio to `monaco-editor@0.55`, because 0.56 replaced\n * the deep `esm/vs/...` entrypoints it imports with a tree-shakable export map (studio.md §11.1).\n * The upstream module was ~220 lines, Studio built exactly one of them and called exactly one\n * method on it, so owning it costs less than working around it.\n *\n * **It touches no Monaco value at runtime, deliberately.** Upstream reaches for `new\n * monaco.Range(...)`, `new monaco.Selection(...)`, `Selection.createWithDirection(...)` and the\n * `SelectionDirection` enum — none of which is necessary, because every API it feeds takes a plain\n * object: `applyEdits` takes an `IRange` literal, `createDecorationsCollection` takes `IRange` too,\n * and `setSelection` has an `ISelection` overload where **direction is the field order** —\n * `selectionStart*` is the anchor, `position*` is the head — so the enum answers a question the\n * shape already answers. Monaco is therefore a TYPES-ONLY import here: the module stays off the\n * eager graph, and its tests drive it with structural doubles rather than a real editor, the same\n * way `services/monaco-buffer.ts` is tested and for the same reason `attachCursorStyles` takes\n * `document` as a parameter.\n *\n * Yjs is a real import, but through `@jxsuite/collab` — the single yjs import point (see the\n * comment on its barrel). Safe for the lazy graph because `canvas/canvas-render.ts` reaches THIS\n * module through `await import()`, which is what defers the payload (studio.md §11.1).\n *\n * The presence field it publishes is `selection`, reserved for it by\n * `@jxsuite/collab/awareness-types`, and the CSS class names it decorates with are the ones\n * `./monaco-cursors.ts` writes rules for. Both are wire-compatible with y-monaco, so a peer on an\n * older Studio still sees this client's caret and this client still sees theirs.\n *\n * @docs studio/publish/collaboration\n */\n\nimport {\n createAbsolutePositionFromRelativePosition,\n createRelativePositionFromTypeIndex,\n} from \"@jxsuite/collab\";\nimport type * as Y from \"yjs\";\nimport type { editor } from \"monaco-editor\";\nimport type { AwarenessLike } from \"./monaco-cursors\";\n\n/**\n * The slice of y-protocols Awareness the binding uses: {@link AwarenessLike} (which\n * `./monaco-cursors.ts` already defines for the style manager) plus the one writer it needs.\n */\nexport interface BindingAwareness extends AwarenessLike {\n setLocalStateField: (field: string, value: unknown) => void;\n}\n\nexport interface MonacoYTextBindingOptions {\n /** The shared text. Must be attached to a `Y.Doc`. */\n text: Y.Text;\n /** The model to keep in sync with it. */\n model: editor.ITextModel;\n /** Editors whose carets are preserved across remote edits and published to peers. */\n editors?: Iterable<editor.ICodeEditor>;\n /** Presence connection. Omit (or pass null) for sync without cursors. */\n awareness?: BindingAwareness | null;\n /** Transaction origin for local keystrokes. */\n origin?: unknown;\n}\n\n/** A caret snapshotted as two positions that survive a concurrent edit. */\ninterface RelativeSelection {\n anchor: Y.RelativePosition;\n head: Y.RelativePosition;\n}\n\n/** A peer's published caret, as it arrives over the wire (JSON, hence `unknown` halves). */\ninterface PeerSelectionState {\n selection?: { anchor?: unknown; head?: unknown } | null;\n}\n\n/**\n * The `Y.Doc` a bound text must belong to.\n *\n * Every `RelativePosition` this module mints or resolves is resolved against it, so a detached\n * `Y.Text` is not a degraded binding — it is one whose cursors and remote deltas can never work.\n * Returning it non-nullable also keeps the closures below free of `!`: TypeScript does not carry a\n * narrowing across a function boundary, and the type it needs is simply `Y.Doc`.\n */\nfunction docOf(text: Y.Text): Y.Doc {\n const { doc } = text;\n if (!doc) {\n throw new Error(\"bindMonacoToYText: the Y.Text has no Y.Doc — nothing to sync against\");\n }\n return doc;\n}\n\n/**\n * Bind `model` to `text`, both ways, until the returned disposer is called.\n *\n * The disposer is idempotent and releases everything: listeners, decorations, and this client's\n * published caret. That last one is not tidiness — a client that leaves Code view without clearing\n * the field keeps drawing its caret and name flag in every peer's editor, at its last position, for\n * the life of the session.\n *\n * @param options - {@link MonacoYTextBindingOptions}\n * @returns Teardown. Also runs by itself when the model is disposed.\n */\nexport function bindMonacoToYText(options: MonacoYTextBindingOptions): () => void {\n const { awareness = null, model, origin, text } = options;\n const editors = [...(options.editors ?? [])];\n const doc = docOf(text);\n\n /* THE RE-ENTRANCY GUARD, and it is load-bearing in both directions.\n `model.applyEdits` fires `onDidChangeContent` SYNCHRONOUSLY, so applying a remote delta would\n otherwise write straight back into the Y.Text as if the user had typed it; and a local\n keystroke's transaction fires the Y observer, which would re-apply it to the model. Upstream\n spelled this `lib0/mutex`; it is one boolean. */\n let inApply = false;\n function guarded(run: () => void): void {\n if (inApply) {\n return;\n }\n inApply = true;\n try {\n run();\n } finally {\n inApply = false;\n }\n }\n\n let savedSelections = new Map<editor.ICodeEditor, RelativeSelection>();\n const decorations = new Map<editor.ICodeEditor, editor.IEditorDecorationsCollection>();\n\n /** An editor's caret as two `RelativePosition`s — also exactly the wire shape peers read. */\n function relativeSelectionOf(codeEditor: editor.ICodeEditor): RelativeSelection | null {\n const selection = codeEditor.getSelection();\n if (!selection) {\n return null;\n }\n return {\n anchor: createRelativePositionFromTypeIndex(\n text,\n model.getOffsetAt({\n column: selection.selectionStartColumn,\n lineNumber: selection.selectionStartLineNumber,\n }),\n ),\n head: createRelativePositionFromTypeIndex(\n text,\n model.getOffsetAt({\n column: selection.positionColumn,\n lineNumber: selection.positionLineNumber,\n }),\n ),\n };\n }\n\n /** Put a snapshotted caret back where the text moved it to. */\n function restoreSelection(codeEditor: editor.ICodeEditor, saved: RelativeSelection): void {\n const anchor = createAbsolutePositionFromRelativePosition(saved.anchor, doc);\n const head = createAbsolutePositionFromRelativePosition(saved.head, doc);\n if (!anchor || !head || anchor.type !== text || head.type !== text) {\n return;\n }\n const anchorPos = model.getPositionAt(anchor.index);\n const headPos = model.getPositionAt(head.index);\n /* Direction is the field order, which is why no `SelectionDirection` appears in this file:\n anchor first, head second, and an RTL selection is simply one whose head precedes it. */\n codeEditor.setSelection({\n positionColumn: headPos.column,\n positionLineNumber: headPos.lineNumber,\n selectionStartColumn: anchorPos.column,\n selectionStartLineNumber: anchorPos.lineNumber,\n });\n }\n\n /** Every peer caret that resolves against THIS text, as decorations over the current model. */\n function remoteDecorations(): editor.IModelDeltaDecoration[] {\n const result: editor.IModelDeltaDecoration[] = [];\n if (!awareness) {\n return result;\n }\n for (const [clientId, raw] of awareness.getStates()) {\n /* Filtered on the AWARENESS clientID, not the doc's, so this pairs with the self-filter in\n `./monaco-cursors.ts` — the module that writes the rules these class names need. */\n if (clientId === awareness.clientID) {\n continue;\n }\n const { selection } = (raw ?? {}) as PeerSelectionState;\n if (!selection?.anchor || !selection.head) {\n continue;\n }\n const anchor = createAbsolutePositionFromRelativePosition(\n selection.anchor as Y.RelativePosition,\n doc,\n );\n const head = createAbsolutePositionFromRelativePosition(\n selection.head as Y.RelativePosition,\n doc,\n );\n if (!anchor || !head || anchor.type !== text || head.type !== text) {\n continue;\n }\n const forward = anchor.index < head.index;\n const from = model.getPositionAt(forward ? anchor.index : head.index);\n const to = model.getPositionAt(forward ? head.index : anchor.index);\n // The caret sits at the HEAD end of the band, so which side carries it flips with direction.\n const headClass = `yRemoteSelectionHead yRemoteSelectionHead-${clientId}`;\n result.push({\n options: {\n className: `yRemoteSelection yRemoteSelection-${clientId}`,\n ...(forward\n ? { afterContentClassName: headClass }\n : { beforeContentClassName: headClass }),\n },\n range: {\n endColumn: to.column,\n endLineNumber: to.lineNumber,\n startColumn: from.column,\n startLineNumber: from.lineNumber,\n },\n });\n }\n return result;\n }\n\n /**\n * Repaint peer carets in every bound editor.\n *\n * Upstream held the decoration ids and called the deprecated `deltaDecorations`; a collection is\n * both the supported API and the one that can be CLEARED, which matters for an editor whose model\n * outlives the binding — it kept the last frame of everyone's cursors otherwise.\n */\n function renderRemoteSelections(): void {\n if (!awareness) {\n return;\n }\n const next = remoteDecorations();\n for (const codeEditor of editors) {\n if (codeEditor.getModel() !== model) {\n decorations.get(codeEditor)?.clear();\n continue;\n }\n let collection = decorations.get(codeEditor);\n if (!collection) {\n collection = codeEditor.createDecorationsCollection();\n decorations.set(codeEditor, collection);\n }\n collection.set(next);\n }\n }\n\n /* Snapshot every caret BEFORE the transaction moves the text under it, so the observer below has\n something position-independent to restore. Guarded, because a local keystroke's own transaction\n fires this too and its caret is already where the user put it. */\n function beforeTransaction(): void {\n guarded(() => {\n savedSelections = new Map();\n for (const codeEditor of editors) {\n if (codeEditor.getModel() !== model) {\n continue;\n }\n const saved = relativeSelectionOf(codeEditor);\n if (saved) {\n savedSelections.set(codeEditor, saved);\n }\n }\n });\n }\n\n /** Inbound: a remote (or undo) delta, walked into `model.applyEdits`. */\n function onTextChanged(event: Y.YTextEvent): void {\n guarded(() => {\n let index = 0;\n for (const op of event.delta) {\n if (op.retain !== undefined) {\n index += op.retain;\n continue;\n }\n if (op.delete !== undefined) {\n const from = model.getPositionAt(index);\n const to = model.getPositionAt(index + op.delete);\n model.applyEdits([\n {\n range: {\n endColumn: to.column,\n endLineNumber: to.lineNumber,\n startColumn: from.column,\n startLineNumber: from.lineNumber,\n },\n text: \"\",\n },\n ]);\n continue;\n }\n /* Not a retain and not a delete, so it must be an insert of text. `Y.Text` can also hold\n embeds (`insert` is then an object or another type), and a Monaco buffer has nowhere to\n put one — upstream cast the field to string and produced `\"[object Object]\"` in the\n document. The same clause catches an op carrying none of the three fields. */\n if (typeof op.insert !== \"string\") {\n throw new TypeError(\n \"bindMonacoToYText: unsupported Y.Text delta op — a text buffer can only apply \" +\n \"string inserts\",\n );\n }\n const at = model.getPositionAt(index);\n model.applyEdits([\n {\n range: {\n endColumn: at.column,\n endLineNumber: at.lineNumber,\n startColumn: at.column,\n startLineNumber: at.lineNumber,\n },\n text: op.insert,\n },\n ]);\n index += op.insert.length;\n }\n for (const [codeEditor, saved] of savedSelections) {\n restoreSelection(codeEditor, saved);\n }\n });\n renderRemoteSelections();\n }\n\n /** Outbound: the author typed. */\n function onModelChanged(event: editor.IModelContentChangedEvent): void {\n guarded(() => {\n doc.transact(() => {\n /* Right to left. Every `rangeOffset` in the event indexes the PRE-edit text, so applying\n them in document order would shift every offset after the first. Copied before sorting —\n `event.changes` is the model's own readonly array. */\n for (const change of [...event.changes].toSorted((a, b) => b.rangeOffset - a.rangeOffset)) {\n text.delete(change.rangeOffset, change.rangeLength);\n text.insert(change.rangeOffset, change.text);\n }\n }, origin);\n });\n }\n\n const disposables: { dispose: () => void }[] = [];\n let disposed = false;\n\n function destroy(): void {\n if (disposed) {\n return;\n }\n disposed = true;\n for (const disposable of disposables) {\n disposable.dispose();\n }\n disposables.length = 0;\n text.unobserve(onTextChanged);\n doc.off(\"beforeAllTransactions\", beforeTransaction);\n for (const collection of decorations.values()) {\n collection.clear();\n }\n decorations.clear();\n savedSelections.clear();\n if (awareness) {\n awareness.off(\"change\", renderRemoteSelections);\n /* AND STOP PUBLISHING THIS CLIENT'S CARET. `null` is a legal value for the field\n (awareness-types.ts), and without it every peer still in Code view keeps drawing our caret\n and name flag at the position we left, for as long as the session lasts. */\n awareness.setLocalStateField(\"selection\", null);\n }\n }\n\n doc.on(\"beforeAllTransactions\", beforeTransaction);\n text.observe(onTextChanged);\n\n /* Seed the buffer BEFORE the change handler exists, so the seed is not echoed back at the room\n as if the author had typed the whole document. */\n const shared = text.toString();\n if (model.getValue() !== shared) {\n model.setValue(shared);\n }\n\n disposables.push(model.onDidChangeContent(onModelChanged), model.onWillDispose(destroy));\n\n if (awareness) {\n for (const codeEditor of editors) {\n disposables.push(\n codeEditor.onDidChangeCursorSelection(() => {\n if (codeEditor.getModel() !== model) {\n return;\n }\n const selection = relativeSelectionOf(codeEditor);\n if (selection) {\n awareness.setLocalStateField(\"selection\", selection);\n }\n }),\n );\n }\n /* ONCE, outside the loop. Upstream registered this per editor and unregistered it once, which\n was correct only because lib0's Observable happens to dedupe listeners in a Set. */\n awareness.on(\"change\", renderRemoteSelections);\n /* Paint once at bind time. Peers already in the buffer have a published caret, and waiting for\n their next keystroke to draw it makes a room that is merely quiet look like a room that is\n empty. */\n renderRemoteSelections();\n }\n\n return destroy;\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;;;AAgFA,SAAS,KAAK,CAAC,MAAqB;AAAA,EAClC,QAAQ,QAAQ;AAAA,EAChB,IAAI,CAAC,KAAK;AAAA,IACR,MAAM,IAAI,MAAM,sEAAsE;AAAA,EACxF;AAAA,EACA,OAAO;AAAA;AAcF,SAAS,iBAAiB,CAAC,SAAgD;AAAA,EAChF,QAAQ,YAAY,MAAM,OAAO,QAAQ,SAAS;AAAA,EAClD,MAAM,UAAU,CAAC,GAAI,QAAQ,WAAW,CAAC,CAAE;AAAA,EAC3C,MAAM,MAAM,MAAM,IAAI;AAAA,EAOtB,IAAI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AAU,mBAAmB,aAAa,IAAI;AAAA,IAChD;AAAA;AAAA,EAGF,IAAI,GAAG,yBAAyB,iBAAiB;AAAA,EACjD,KAAK,QAAQ,aAAa;AAAA,EAI1B,MAAM,SAAS,KAAK,SAAS;AAAA,EAC7B,IAAI,MAAM,SAAS,MAAM,QAAQ;AAAA,IAC/B,MAAM,SAAS,MAAM;AAAA,EACvB;AAAA,EAEA,YAAY,KAAK,MAAM,mBAAmB,cAAc,GAAG,MAAM,cAAc,OAAO,CAAC;AAAA,EAEvF,IAAI,WAAW;AAAA,IACb,WAAW,cAAc,SAAS;AAAA,MAChC,YAAY,KACV,WAAW,2BAA2B,MAAM;AAAA,QAC1C,IAAI,WAAW,SAAS,MAAM,OAAO;AAAA,UACnC;AAAA,QACF;AAAA,QACA,MAAM,YAAY,oBAAoB,UAAU;AAAA,QAChD,IAAI,WAAW;AAAA,UACb,UAAU,mBAAmB,aAAa,SAAS;AAAA,QACrD;AAAA,OACD,CACH;AAAA,IACF;AAAA,IAGA,UAAU,GAAG,UAAU,sBAAsB;AAAA,IAI7C,uBAAuB;AAAA,EACzB;AAAA,EAEA,OAAO;AAAA;",
|
|
8
|
-
"debugId": "C9D4EE27836B1C1364756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../node_modules/monaco-editor/esm/vs/features/find/register.js", "../../../node_modules/monaco-editor/esm/vs/languages/features/json/register.js", "../../../node_modules/monaco-editor/esm/vs/languages/definitions/_.contribution.js", "../../../node_modules/monaco-editor/esm/vs/languages/definitions/javascript/register.js", "../../schema/src/project-schemas.ts", "../src/services/monaco-setup.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import '../../editor/contrib/find/browser/findController.js';\nimport { FindWidget } from '../../editor/contrib/find/browser/findWidget.js';\n\nconst tabIndexPatchKey = \"__monacoFindWidgetTabIndexPatchApplied\";\nconst originalTabIndexKey = \"__monacoFindWidgetOriginalTabIndex\";\nfunction setFindWidgetTabbableState(widget, visible) {\n const domNode = widget?._domNode;\n if (!domNode) {\n return;\n }\n const focusableElements = domNode.querySelectorAll('input, textarea, [tabindex], [role=\"button\"], [role=\"checkbox\"]');\n for (const element of focusableElements) {\n if (!(element instanceof HTMLElement)) {\n continue;\n }\n if (visible) {\n if (!(originalTabIndexKey in element.dataset)) {\n continue;\n }\n const originalTabIndex = element.dataset[originalTabIndexKey];\n if (originalTabIndex === \"\") {\n element.removeAttribute(\"tabindex\");\n } else {\n element.tabIndex = Number(originalTabIndex);\n }\n delete element.dataset[originalTabIndexKey];\n } else {\n if (!(originalTabIndexKey in element.dataset)) {\n element.dataset[originalTabIndexKey] = element.getAttribute(\"tabindex\") ?? \"\";\n }\n element.tabIndex = -1;\n }\n }\n}\nif (!FindWidget[tabIndexPatchKey]) {\n const originalReveal = FindWidget.prototype._reveal;\n const originalHide = FindWidget.prototype._hide;\n FindWidget.prototype._reveal = function(...args) {\n originalReveal.apply(this, args);\n setFindWidgetTabbableState(this, true);\n };\n FindWidget.prototype._hide = function(...args) {\n originalHide.apply(this, args);\n setFindWidgetTabbableState(this, false);\n };\n FindWidget[tabIndexPatchKey] = true;\n}\n",
|
|
6
|
-
"import { languages, Emitter } from '../../../editor/editor.api.js';\n\nclass LanguageServiceDefaultsImpl {\n constructor(languageId, diagnosticsOptions, modeConfiguration) {\n this._onDidChange = new Emitter();\n this._languageId = languageId;\n this.setDiagnosticsOptions(diagnosticsOptions);\n this.setModeConfiguration(modeConfiguration);\n }\n get onDidChange() {\n return this._onDidChange.event;\n }\n get languageId() {\n return this._languageId;\n }\n get modeConfiguration() {\n return this._modeConfiguration;\n }\n get diagnosticsOptions() {\n return this._diagnosticsOptions;\n }\n setDiagnosticsOptions(options) {\n this._diagnosticsOptions = options || /* @__PURE__ */ Object.create(null);\n this._onDidChange.fire(this);\n }\n setModeConfiguration(modeConfiguration) {\n this._modeConfiguration = modeConfiguration || /* @__PURE__ */ Object.create(null);\n this._onDidChange.fire(this);\n }\n}\nconst diagnosticDefault = {\n validate: true,\n allowComments: true,\n schemas: [],\n enableSchemaRequest: false,\n schemaRequest: \"warning\",\n schemaValidation: \"warning\",\n comments: \"error\",\n trailingCommas: \"error\"\n};\nconst modeConfigurationDefault = {\n documentFormattingEdits: true,\n documentRangeFormattingEdits: true,\n completionItems: true,\n hovers: true,\n documentSymbols: true,\n tokens: true,\n colors: true,\n foldingRanges: true,\n diagnostics: true,\n selectionRanges: true\n};\nconst jsonDefaults = new LanguageServiceDefaultsImpl(\n \"json\",\n diagnosticDefault,\n modeConfigurationDefault\n);\nconst getWorker = () => getMode().then((mode2) => mode2.getWorker());\nfunction getMode() {\n return import('./jsonMode.js');\n}\nlanguages.register({\n id: \"json\",\n extensions: [\".json\", \".bowerrc\", \".jshintrc\", \".jscsrc\", \".eslintrc\", \".babelrc\", \".har\"],\n aliases: [\"JSON\", \"json\"],\n mimetypes: [\"application/json\"]\n});\nlanguages.onLanguage(\"json\", () => {\n getMode().then((mode2) => mode2.setupMode(jsonDefaults));\n});\n\nexport { getWorker, jsonDefaults };\n",
|
|
7
|
-
"import { languages } from '../../editor/editor.api.js';\n\nconst languageDefinitions = {};\nconst lazyLanguageLoaders = {};\nclass LazyLanguageLoader {\n static getOrCreate(languageId) {\n if (!lazyLanguageLoaders[languageId]) {\n lazyLanguageLoaders[languageId] = new LazyLanguageLoader(languageId);\n }\n return lazyLanguageLoaders[languageId];\n }\n constructor(languageId) {\n this._languageId = languageId;\n this._loadingTriggered = false;\n this._lazyLoadPromise = new Promise((resolve, reject) => {\n this._lazyLoadPromiseResolve = resolve;\n this._lazyLoadPromiseReject = reject;\n });\n }\n load() {\n if (!this._loadingTriggered) {\n this._loadingTriggered = true;\n languageDefinitions[this._languageId].loader().then(\n (mod) => this._lazyLoadPromiseResolve(mod),\n (err) => this._lazyLoadPromiseReject(err)\n );\n }\n return this._lazyLoadPromise;\n }\n}\nfunction registerLanguage(def) {\n const languageId = def.id;\n languageDefinitions[languageId] = def;\n languages.register(def);\n const lazyLanguageLoader = LazyLanguageLoader.getOrCreate(languageId);\n languages.registerTokensProviderFactory(languageId, {\n create: async () => {\n const mod = await lazyLanguageLoader.load();\n return mod.language;\n }\n });\n languages.onLanguageEncountered(languageId, async () => {\n const mod = await lazyLanguageLoader.load();\n languages.setLanguageConfiguration(languageId, mod.conf);\n });\n}\n\nexport { registerLanguage };\n",
|
|
8
|
-
"import { registerLanguage } from '../_.contribution.js';\n\nregisterLanguage({\n id: \"javascript\",\n extensions: [\".js\", \".es6\", \".jsx\", \".mjs\", \".cjs\"],\n firstLine: \"^#!.*\\\\bnode\",\n filenames: [\"jakefile\"],\n aliases: [\"JavaScript\", \"javascript\", \"js\"],\n mimetypes: [\"text/javascript\"],\n loader: () => import('./javascript.js')\n});\n",
|
|
9
|
-
"/**\n * Per-project schema emitters (specs/extensions.md §5.2).\n *\n * Pure functions: they emit the generated entry documents (project.schema.json and\n * document.schema.json) from already-resolved, project-relative fragment paths. All composition is\n * standard JSON Schema 2020-12:\n *\n * - A plain `allOf` over fragment `$ref`s, closed with `unevaluatedProperties: false`;\n * - The two well-known union resources (`PROJECT_FIELDS_SCHEMA_ID`, `DOCUMENT_PATHS_SCHEMA_ID`)\n * re-embedded under `$defs` with their canonical `$id`s, carrying the _effective_ unions.\n * Compound-document `$id` resolution makes every fragment's `$ref` to those URIs land on the\n * entry document's embed instead of the shipped defaults — the override mechanism.\n *\n * Inside the embeds all refs are canonical URIs (never relative paths): a `$ref` inside a resource\n * with an absolute `$id` resolves against that `$id`. Relative `./node_modules/...` paths appear\n * only in the entry document's own `allOf`/`$ref`, resolved against the file location. Hosts\n * validating with ajv should inject an `$id` set to the entry file's URL at load time so those\n * relative refs resolve (the committed files stay machine-path-free).\n */\n\nimport {\n DOCUMENT_PATHS_SCHEMA_ID,\n PROJECT_FIELDS_SCHEMA_ID,\n documentPathsCoreMembers,\n} from \"../defs/field-schema.schema\";\n\nexport { DOCUMENT_PATHS_SCHEMA_ID, PROJECT_FIELDS_SCHEMA_ID } from \"../defs/field-schema.schema\";\n\n/** The canonical $id of the core project fragment. */\nexport const PROJECT_CORE_SCHEMA_ID = \"https://jxsuite.com/schema/project/core/v2\";\n\nexport const GENERATED_SCHEMA_COMMENT =\n \"Generated by `jx schema` from project.json#/extensions — do not edit.\";\n\nexport interface ProjectSchemaInputs {\n /**\n * Project-relative path of the core fragment, e.g.\n * \"./node_modules/@jxsuite/schema/schemas/project.core.schema.json\".\n */\n corePath: string;\n /** Project-relative extension fragment paths, in extension declaration order. */\n fragments: string[];\n /**\n * Additional field-union members beyond the core field shape and RelationshipRef, as canonical\n * \"uri#/pointer\" refs (e.g. a connector's column extras). Never relative paths — they resolve\n * against the embed's $id.\n */\n fieldSchemaRefs?: string[];\n}\n\n/** Emit the `project.schema.json` entry document for a project. */\nexport function emitProjectSchema(inputs: ProjectSchemaInputs): Record<string, unknown> {\n const { corePath, fragments, fieldSchemaRefs = [] } = inputs;\n return {\n $comment: GENERATED_SCHEMA_COMMENT,\n $defs: {\n Fields: {\n $id: PROJECT_FIELDS_SCHEMA_ID,\n anyOf: [\n { $ref: `${PROJECT_CORE_SCHEMA_ID}#/$defs/JxFieldSchema` },\n { $ref: `${PROJECT_CORE_SCHEMA_ID}#/$defs/RelationshipRef` },\n ...fieldSchemaRefs.map((ref) => ({ $ref: ref })),\n ],\n },\n },\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n allOf: [{ $ref: corePath }, ...fragments.map((ref) => ({ $ref: ref }))],\n type: \"object\",\n unevaluatedProperties: false,\n };\n}\n\n// ─── Generic bundler (specs/extensions.md §5.4) ──────────────────────────────\n\n/** Injected JSON loader for {@link bundleSchema} — receives a normalized, slash-separated path. */\nexport type SchemaJsonLoader = (path: string) => Promise<Record<string, unknown>>;\n\n/**\n * Bundle an entry document into a single self-contained compound schema for hosts that cannot fetch\n * files (editor schema registration, cloud studio). Every relative-path `$ref` target is loaded\n * through the injected loader and embedded under the entry's `$defs`, keyed by its `$id` (or a\n * generated `urn:jx:bundled:*` one when the file declares none); the referencing `$ref`s are\n * rewritten to those canonical URIs. Resource boundaries are preserved: embedded resources keep\n * their `$id`s, refs inside an embedded absolute-`$id` resource are canonical and stay untouched,\n * and a resource whose `$id` is already present in the compound document is not embedded twice.\n *\n * @param {Record<string, unknown>} entry - The entry document (e.g. a parsed project.schema.json)\n * @param {SchemaJsonLoader} loadJson - Loader for `$ref` target files (host-restricted)\n * @param {string} baseDir - Directory the entry document's relative refs resolve against\n * @param {string[]} [alsoEmbed] - Relative paths of resources to embed even though no path-`$ref`\n * reaches them, because they are referenced only by canonical `$id` (a document fragment whose\n * `$defs` feed the paths union). Without this they would stay dangling.\n * @returns {Promise<Record<string, unknown>>} A new, self-contained schema (the input is not\n * mutated)\n */\nexport async function bundleSchema(\n entry: Record<string, unknown>,\n loadJson: SchemaJsonLoader,\n baseDir: string,\n alsoEmbed: string[] = [],\n): Promise<Record<string, unknown>> {\n const bundled = structuredClone(entry);\n const embeddedByPath = new Map<string, string>();\n const embeddedIds = new Set<string>();\n collectResourceIds(bundled, embeddedIds);\n let generatedCount = 0;\n\n /** Ordered queue of embeds so $defs insertion happens after the entry walk (stable output). */\n const embed = async (path: string): Promise<string> => {\n const normalized = normalizeSchemaPath(path);\n const prior = embeddedByPath.get(normalized);\n if (prior !== undefined) {\n return prior;\n }\n let resource: Record<string, unknown>;\n try {\n resource = structuredClone(await loadJson(normalized));\n } catch (error) {\n throw new Error(\n `bundleSchema: cannot load $ref target \"${normalized}\": ${errorText(error)}`,\n { cause: error },\n );\n }\n const ownId =\n typeof resource.$id === \"string\" && hasUriScheme(resource.$id) ? resource.$id : null;\n generatedCount += ownId === null ? 1 : 0;\n const id = ownId ?? `urn:jx:bundled:${generatedCount}`;\n embeddedByPath.set(normalized, id);\n if (embeddedIds.has(id)) {\n // The canonical resource is already part of the compound document — refs land on it.\n return id;\n }\n embeddedIds.add(id);\n resource.$id = id;\n await rewrite(resource, schemaDirOf(normalized), true);\n const defs = (bundled.$defs ??= {}) as Record<string, unknown>;\n defs[id] = resource;\n return id;\n };\n\n /**\n * Walk a (sub)schema rewriting relative-path `$ref`s. `fileDir` is the directory relative refs\n * resolve against, or null inside an embedded absolute-`$id` resource (canonical scope).\n */\n const rewrite = async (node: unknown, fileDir: string | null, isRoot = false): Promise<void> => {\n if (Array.isArray(node)) {\n for (const item of node) {\n await rewrite(item, fileDir);\n }\n return;\n }\n if (node === null || typeof node !== \"object\") {\n return;\n }\n const obj = node as Record<string, unknown>;\n let scope = fileDir;\n if (!isRoot && typeof obj.$id === \"string\" && hasUriScheme(obj.$id)) {\n // Entering an embedded resource with a canonical $id: refs inside resolve against that\n // $id (never the file location), so there is nothing to inline.\n scope = null;\n }\n const ref = obj.$ref;\n if (typeof ref === \"string\" && scope !== null && !ref.startsWith(\"#\") && !hasUriScheme(ref)) {\n const hashIndex = ref.indexOf(\"#\");\n const target = hashIndex === -1 ? ref : ref.slice(0, hashIndex);\n const fragment = hashIndex === -1 ? \"\" : ref.slice(hashIndex);\n if (target) {\n const id = await embed(`${scope}/${target}`);\n obj.$ref = `${id}${fragment}`;\n }\n }\n for (const value of Object.values(obj)) {\n await rewrite(value, scope);\n }\n };\n\n await rewrite(bundled, normalizeSchemaPath(baseDir), true);\n for (const path of alsoEmbed) {\n await embed(`${normalizeSchemaPath(baseDir)}/${path}`);\n }\n return bundled;\n}\n\n// ─── Single-resource flattening (specs/extensions.md §5.4) ───────────────────\n\n/**\n * Keywords whose value is a single subschema (or, for draft-07 tuple `items`, an array of them).\n * The flattener walks ONLY these keyword positions, never every object key: `examples`, `default`,\n * `const` and `enum` hold arbitrary instance data, and Jx document examples legitimately contain\n * `$ref` strings (`#/state/cart`) that must survive untouched.\n */\nconst SINGLE_SUBSCHEMA_KEYWORDS = [\n \"additionalItems\",\n \"additionalProperties\",\n \"contains\",\n \"contentSchema\",\n \"else\",\n \"if\",\n \"items\",\n \"not\",\n \"propertyNames\",\n \"then\",\n \"unevaluatedItems\",\n \"unevaluatedProperties\",\n] as const;\n\n/** Keywords whose value maps names to subschemas. */\nconst MAP_SUBSCHEMA_KEYWORDS = [\n \"$defs\",\n \"definitions\",\n \"dependencies\",\n \"dependentSchemas\",\n \"patternProperties\",\n \"properties\",\n] as const;\n\n/** Keywords whose value is an array of subschemas. */\nconst LIST_SUBSCHEMA_KEYWORDS = [\"allOf\", \"anyOf\", \"oneOf\", \"prefixItems\"] as const;\n\n/** True for a plain object node (a candidate subschema); booleans and arrays are not. */\nfunction isSchemaObject(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/** Escape a `$defs` key for use as a JSON Pointer segment (RFC 6901). */\nfunction escapePointerSegment(segment: string): string {\n return segment.replaceAll(\"~\", \"~0\").replaceAll(\"/\", \"~1\");\n}\n\n/**\n * Walk the known subschema keyword positions of `node`.\n *\n * @param {Record<string, unknown>} node - The schema object to walk\n * @param {string} pointer - JSON Pointer of `node` within the document\n * @yields {[Record<string, unknown>, string]} Each subschema paired with its own JSON Pointer\n */\nfunction* subschemaEntries(\n node: Record<string, unknown>,\n pointer: string,\n): Generator<[Record<string, unknown>, string]> {\n for (const keyword of SINGLE_SUBSCHEMA_KEYWORDS) {\n const value = node[keyword];\n if (Array.isArray(value)) {\n for (const [index, item] of value.entries()) {\n if (isSchemaObject(item)) {\n yield [item, `${pointer}/${keyword}/${index}`];\n }\n }\n } else if (isSchemaObject(value)) {\n yield [value, `${pointer}/${keyword}`];\n }\n }\n for (const keyword of MAP_SUBSCHEMA_KEYWORDS) {\n const value = node[keyword];\n if (!isSchemaObject(value)) {\n continue;\n }\n for (const [name, item] of Object.entries(value)) {\n if (isSchemaObject(item)) {\n yield [item, `${pointer}/${keyword}/${escapePointerSegment(name)}`];\n }\n }\n }\n for (const keyword of LIST_SUBSCHEMA_KEYWORDS) {\n const value = node[keyword];\n if (!Array.isArray(value)) {\n continue;\n }\n for (const [index, item] of value.entries()) {\n if (isSchemaObject(item)) {\n yield [item, `${pointer}/${keyword}/${index}`];\n }\n }\n }\n}\n\n/**\n * A readable, collision-free `$defs` key for an embedded resource's `$id`: drop the scheme, the\n * authority, and the conventional `schema/` namespace segment, then join the remainder with dashes\n * (`https://jxsuite.com/schema/project/core/v2` → `project-core-v2`, `urn:jx:bundled:1` →\n * `jx-bundled-1`). Collisions get a numeric suffix, so output stays deterministic given the\n * emitters' stable `$defs` order.\n *\n * @param {string} id - The resource's canonical `$id`\n * @param {Set<string>} used - Keys already taken in the target `$defs` (mutated)\n * @returns {string}\n */\nfunction slugForSchemaId(id: string, used: Set<string>): string {\n let rest = id.replace(/^[a-zA-Z][a-zA-Z\\d+.-]*:/, \"\");\n if (rest.startsWith(\"//\")) {\n const slash = rest.indexOf(\"/\", 2);\n rest = slash === -1 ? \"\" : rest.slice(slash + 1);\n }\n rest = rest.replace(/^schema\\//, \"\");\n const base =\n rest\n .split(/[^a-zA-Z0-9]+/)\n .filter(Boolean)\n .join(\"-\") || \"resource\";\n let key = base;\n for (let n = 2; used.has(key); n += 1) {\n key = `${base}-${n}`;\n }\n used.add(key);\n return key;\n}\n\n/**\n * Collapse a bundled compound document into a SINGLE schema resource: embedded resources are\n * rekeyed from their canonical `$id`s to readable `$defs` slugs, their `$id`s are dropped, and\n * every `$ref` becomes a root-relative JSON Pointer (`#/$defs/project-core-v2/$defs/StyleObject`).\n *\n * Why this is required rather than cosmetic: VS Code's JSON language service (and Monaco, which\n * embeds it) implements neither half of compound-document resolution. It resolves a `#/pointer` ref\n * against the DOCUMENT ROOT — never re-based on an enclosing `$id` — so a fragment's own\n * `#/$defs/StyleObject` reports \"can not be resolved\"; and it treats any ref with a non-empty part\n * before `#` as EXTERNAL, fetching `https://jxsuite.com/schema/...` over the network instead of\n * matching the embedded resource, which fails offline and (when it succeeds) silently substitutes\n * the shipped defaults for the project's effective unions. Root-pointer-only refs are the one form\n * every consumer resolves identically — ajv, the language service, and Monaco alike.\n *\n * `$id` shadowing (§5.3) still decides the outcome; it is simply resolved AT FLATTEN TIME, since\n * refs to a shadowed `$id` rewrite to the pointer of the entry document's embed.\n *\n * @param {Record<string, unknown>} entry - A bundled compound document (output of\n * {@link bundleSchema})\n * @returns {Record<string, unknown>} A new single-resource schema (the input is not mutated)\n */\nexport function flattenSchema(entry: Record<string, unknown>): Record<string, unknown> {\n const flat = structuredClone(entry);\n\n // 1. Rekey URI-keyed `$defs` entries to readable slugs (pointers address them by key).\n if (isSchemaObject(flat.$defs)) {\n const used = new Set(Object.keys(flat.$defs).filter((key) => !hasUriScheme(key)));\n const renamed: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(flat.$defs)) {\n const id = isSchemaObject(value) && typeof value.$id === \"string\" ? value.$id : key;\n renamed[hasUriScheme(key) ? slugForSchemaId(id, used) : key] = value;\n }\n flat.$defs = renamed;\n }\n\n // 2. Map each embedded resource's `$id` to its pointer here (first wins, as the bundler embeds).\n const idToPointer = new Map<string, string>();\n const scan = (node: Record<string, unknown>, pointer: string): void => {\n const { $id } = node;\n if (typeof $id === \"string\" && hasUriScheme($id) && !idToPointer.has($id)) {\n idToPointer.set($id, pointer);\n }\n for (const [child, childPointer] of subschemaEntries(node, pointer)) {\n scan(child, childPointer);\n }\n };\n scan(flat, \"#\");\n\n // 3. Rewrite refs against the enclosing resource, then dissolve the resource boundary.\n const rewrite = (node: Record<string, unknown>, scope: string): void => {\n let inner = scope;\n const { $id } = node;\n if (typeof $id === \"string\" && hasUriScheme($id)) {\n inner = idToPointer.get($id) ?? scope;\n if (inner !== \"#\") {\n // The root keeps its identity; nested resources must not remain ref targets.\n delete node.$id;\n }\n }\n const ref = node.$ref;\n if (typeof ref === \"string\") {\n const hashIndex = ref.indexOf(\"#\");\n const target = hashIndex === -1 ? ref : ref.slice(0, hashIndex);\n const fragment = hashIndex === -1 ? \"\" : ref.slice(hashIndex + 1);\n if (target === \"\") {\n // A local pointer resolves against the resource it appears in, not the file.\n if (fragment.startsWith(\"/\")) {\n node.$ref = `${inner}${fragment}`;\n }\n } else {\n const base = idToPointer.get(target);\n if (base !== undefined) {\n node.$ref = fragment ? `${base}${fragment}` : base;\n }\n }\n }\n for (const [child] of subschemaEntries(node, inner)) {\n rewrite(child, inner);\n }\n };\n rewrite(flat, \"#\");\n return flat;\n}\n\n/** Collect every absolute `$id` already present in a document (embeds like the field union). */\nfunction collectResourceIds(node: unknown, out: Set<string>): void {\n if (Array.isArray(node)) {\n for (const item of node) {\n collectResourceIds(item, out);\n }\n return;\n }\n if (node === null || typeof node !== \"object\") {\n return;\n }\n const obj = node as Record<string, unknown>;\n if (typeof obj.$id === \"string\" && hasUriScheme(obj.$id)) {\n out.add(obj.$id);\n }\n for (const value of Object.values(obj)) {\n collectResourceIds(value, out);\n }\n}\n\n/** True when a ref/id carries a URI scheme (https:, urn:, file:) — i.e. is not a relative path. */\nfunction hasUriScheme(ref: string): boolean {\n return /^[a-zA-Z][a-zA-Z\\d+.-]*:/.test(ref);\n}\n\n/** Normalize a path to forward slashes, resolving \".\" and \"..\" segments (environment-agnostic). */\nfunction normalizeSchemaPath(path: string): string {\n const slashed = path.replaceAll(\"\\\\\", \"/\");\n const absolute = slashed.startsWith(\"/\");\n const parts: string[] = [];\n for (const segment of slashed.split(\"/\")) {\n if (segment === \"\" || segment === \".\") {\n continue;\n }\n if (segment === \"..\") {\n if (parts.length > 0 && parts.at(-1) !== \"..\") {\n parts.pop();\n } else if (!absolute) {\n parts.push(\"..\");\n }\n continue;\n }\n parts.push(segment);\n }\n return (absolute ? \"/\" : \"\") + parts.join(\"/\");\n}\n\n/** The directory portion of a normalized schema path (\".\" when there is none). */\nfunction schemaDirOf(path: string): string {\n const index = path.lastIndexOf(\"/\");\n if (index === -1) {\n return \".\";\n }\n return index === 0 ? \"/\" : path.slice(0, index);\n}\n\nfunction errorText(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nexport interface DocumentSchemaInputs {\n /**\n * Project-relative path of the core document schema, e.g.\n * \"./node_modules/@jxsuite/schema/schema.json\".\n */\n corePath: string;\n /** Canonical \"uri#/pointer\" refs unioned into the paths resource, in declaration order. */\n pathsValueRefs: string[];\n}\n\n/**\n * Emit the `document.schema.json` entry document for a project.\n *\n * The core reference goes in a single-member `allOf`, never a root-level `$ref`. They are\n * equivalent to a compliant validator, but VS Code's JSON language service resolves a `$ref` by\n * SHALLOW-MERGING the target's keys into the referencing node — from the root, that overwrites the\n * root's own `$defs` with the core resource's `$defs`, and every later `#/$defs/<embed>/...`\n * pointer stops resolving. Wrapping in `allOf` keeps the merge target off the root.\n *\n * @param {DocumentSchemaInputs} inputs - Core path and the contributed paths-union refs\n * @returns {Record<string, unknown>}\n */\nexport function emitDocumentSchema(inputs: DocumentSchemaInputs): Record<string, unknown> {\n const { corePath, pathsValueRefs } = inputs;\n return {\n $comment: GENERATED_SCHEMA_COMMENT,\n $defs: {\n /* The EFFECTIVE paths union: the core source shapes plus every extension-contributed one.\n Carrying the core members here (rather than leaving them to the core schema) is what makes\n the override additive — this embed shadows the shipped default by $id, so anything it omits\n stops validating. Mirrors the field union in emitProjectSchema, which names its core\n members the same way. */\n PathsValue: {\n $id: DOCUMENT_PATHS_SCHEMA_ID,\n anyOf: [...documentPathsCoreMembers, ...pathsValueRefs.map((ref) => ({ $ref: ref }))],\n },\n },\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n allOf: [{ $ref: corePath }],\n };\n}\n\n// ─── Composition (specs/extensions.md §5.2) ──────────────────────────────────\n\n/** Loader-resolvable refs to one extension's shipped schema fragments, as its manifest names them. */\nexport interface ExtensionFragmentRefs {\n /** Project fragment — plain `properties` for the extension's section keys. */\n project?: string | undefined;\n /** Document fragment — its `$defs` become `$paths` source-union members. */\n document?: string | undefined;\n /** Fields fragment — its `$defs` become Field-schema union members. */\n fields?: string | undefined;\n}\n\nexport interface ComposeProjectSchemasInputs {\n /** Ref to the core project fragment (`@jxsuite/schema/schemas/project.core.schema.json`). */\n coreProjectRef: string;\n /** Ref to the core document schema (`@jxsuite/schema/schema.json`). */\n coreDocumentRef: string;\n /** Enabled extensions in registry order; each contributes the fragments it ships. */\n extensions: ExtensionFragmentRefs[];\n /** Loads a ref's JSON. Every ref above and every `$ref` inside resolves through this ALONE. */\n loadJson: SchemaJsonLoader;\n /** Directory the refs resolve against (\"\" for hosts addressing by bare specifier). */\n baseDir: string;\n}\n\n/**\n * Compose a project's two committed entry documents from the core schemas and its enabled\n * extensions' fragments — bundled, then flattened to root JSON pointers (§5.2/§5.4).\n *\n * Host-agnostic by construction: every file it needs arrives through `loadJson`, so the same\n * composition runs over a filesystem (`jx schema`) and over a virtual tree of bundled artifacts\n * (the cloud session, which has no `node_modules` and no filesystem). That shared path is the point\n * — a project's schemas must not depend on which host generated them.\n *\n * @param {ComposeProjectSchemasInputs} inputs - Core refs, extension fragments, loader, base\n * @returns {Promise<{ project: Record<string, unknown>; document: Record<string, unknown> }>} The\n * self-contained entry documents, ready to write or to hand an editor\n */\nexport async function composeProjectSchemas(inputs: ComposeProjectSchemasInputs): Promise<{\n project: Record<string, unknown>;\n document: Record<string, unknown>;\n}> {\n const { baseDir, coreDocumentRef, coreProjectRef, extensions, loadJson } = inputs;\n\n const fragments: string[] = [];\n const pathsValueRefs: string[] = [];\n const documentFragments: string[] = [];\n const fieldSchemaRefs: string[] = [];\n for (const ext of extensions) {\n if (ext.project) {\n fragments.push(ext.project);\n }\n if (ext.document) {\n const documentRefs = await fragmentDefsRefs(ext.document, loadJson, baseDir);\n pathsValueRefs.push(...documentRefs);\n /* The paths union names this fragment's shapes by canonical $id only, so the bundler needs\n the path handed to it explicitly or those refs stay dangling. A fragment that contributed\n nothing (no $id, or no $defs) is left out rather than embedded unreferenced. */\n if (documentRefs.length > 0) {\n documentFragments.push(ext.document);\n }\n }\n // The `schemas.fields` manifest convention: a fragment whose $defs members are extension\n // Field extras, unioned into the per-project field resource (specs/extensions.md §5.3).\n if (ext.fields) {\n fieldSchemaRefs.push(...(await fragmentDefsRefs(ext.fields, loadJson, baseDir)));\n fragments.push(ext.fields);\n }\n }\n\n // Bundle then flatten: the emitted relative refs are an intermediate form only.\n const projectEntry = emitProjectSchema({ corePath: coreProjectRef, fieldSchemaRefs, fragments });\n const documentEntry = emitDocumentSchema({ corePath: coreDocumentRef, pathsValueRefs });\n return {\n document: flattenSchema(\n await bundleSchema(documentEntry, loadJson, baseDir, documentFragments),\n ),\n project: flattenSchema(await bundleSchema(projectEntry, loadJson, baseDir)),\n };\n}\n\n/**\n * Canonical \"uri#/pointer\" refs into a fragment's `$defs` shapes: one per `$defs` entry, addressed\n * by the fragment's own `$id` (refs inside the entry document's embeds resolve against canonical\n * URIs, never file paths). An `$id`-less or `$defs`-less fragment contributes no union members —\n * that is simply the shape of a fragment declaring only `properties`.\n *\n * An UNREADABLE fragment contributes nothing here but still fails the composition, because the\n * bundler goes on to embed the same ref and throws. That is deliberate: silently dropping it would\n * emit an entry document that under-validates the project with nothing to show for it. A host that\n * cannot supply an extension's fragments must leave that extension out of `extensions` entirely —\n * which is exactly what the cloud session does for packages it does not bundle.\n *\n * @param {string} ref - Loader-resolvable ref to the fragment, relative to `baseDir`\n * @param {SchemaJsonLoader} loadJson - The host's loader\n * @param {string} baseDir - Directory the ref resolves against\n * @returns {Promise<string[]>} One ref per `$defs` member, in declaration order\n */\nasync function fragmentDefsRefs(\n ref: string,\n loadJson: SchemaJsonLoader,\n baseDir: string,\n): Promise<string[]> {\n let fragment: { $id?: unknown; $defs?: Record<string, unknown> };\n try {\n fragment = await loadJson(normalizeSchemaPath(`${normalizeSchemaPath(baseDir)}/${ref}`));\n } catch {\n return [];\n }\n const { $id } = fragment;\n if (typeof $id !== \"string\" || !fragment.$defs) {\n return [];\n }\n return Object.keys(fragment.$defs).map((name) => `${$id}#/$defs/${name}`);\n}\n",
|
|
10
|
-
"/**\n * Monaco editor setup — workers, the editor feature set, language services, and JX schema\n * registration.\n *\n * **The list below is Studio's STATEMENT of what the code editor can do.** Monaco 0.55 had no way\n * to say it: importing `language/json/monaco.contribution.js` transitively dragged in every one of\n * the 59 editor contributions, so the editor Studio shipped was whatever the language services\n * happened to reach. 0.56 puts a supported export map in front of them (`\"./*\" → ./esm/vs/*.js`)\n * with one `register` module per capability, so adding an editor capability means adding its import\n * here.\n *\n * Three things about that, and none of them is discoverable from the code:\n *\n * - **A missing register is SILENT.** The editor simply lacks the capability: no error, no warning,\n * no console line. `specs/studio.md` §11.1 makes the list normative for that reason, and the\n * browser pass in a Studio change set is the gate. `monaco-editor/features/register.all` restores\n * the whole set exactly if you ever need to bisect against it.\n * - **`features/suggest/register` is not what makes completion work.** It registers the provider that\n * turns suggest items into inline (ghost) text; the suggest WIDGET is\n * `contrib/suggest/browser/suggestController.js`, and the only public entry that reaches it is\n * `features/inlineCompletions/register`. Without that line, `jsonDefaults`' schema completions\n * and the `state.*` completions in the Logic tab (`panels/editors.ts`) both register successfully\n * and then never appear.\n * - **THE EXCLUSIONS DO NOT TAKE EFFECT YET, and it is worth knowing before you try to make them.**\n * In 0.56.0 the contrib modules import one another densely, and the suggest stack this file\n * cannot do without reaches almost all of them: every one of the 33 features named \"not\n * registered\" below is still in the bundle and still calls `registerEditorContribution` at module\n * scope. Measured on the built output — `register.all` 14,186,780 B, this list 14,189,667 B, this\n * list with a deep `suggestController` import instead of `inlineCompletions` 14,192,867 B.\n * Curating costs about 3 KB and currently saves nothing.\n *\n * It is kept because it is the true statement of intent and it is where the saving lands the day\n * monaco untangles that graph. Do not cite it as evidence that a feature is off — check the\n * metafile. The only variant where the exclusions bite drops the suggest widget too, which takes\n * schema completion with it.\n */\n\nimport \"monaco-editor/editor\";\n// Core widget, icons, tokenization.\nimport \"monaco-editor/features/codeEditor/register\";\nimport \"monaco-editor/features/codicon/register\";\nimport \"monaco-editor/features/tokenization/register\";\n// Editing. `linesOperations` is also what pulls in `browser/coreCommands.js`.\nimport \"monaco-editor/features/clipboard/register\";\nimport \"monaco-editor/features/comment/register\";\nimport \"monaco-editor/features/cursorUndo/register\";\nimport \"monaco-editor/features/dnd/register\";\nimport \"monaco-editor/features/indentation/register\";\nimport \"monaco-editor/features/lineSelection/register\";\nimport \"monaco-editor/features/linesOperations/register\";\nimport \"monaco-editor/features/multicursor/register\";\nimport \"monaco-editor/features/smartSelect/register\";\nimport \"monaco-editor/features/wordOperations/register\";\nimport \"monaco-editor/features/wordPartOperations/register\";\n// Navigation & search.\nimport \"monaco-editor/features/find/register\";\nimport \"monaco-editor/features/folding/register\";\nimport \"monaco-editor/features/gotoError/register\"; // F8 over the oxlint markers\nimport \"monaco-editor/features/gotoLine/register\";\n// The surfaces the JSON / TypeScript language services feed.\nimport \"monaco-editor/features/bracketMatching/register\";\nimport \"monaco-editor/features/codeAction/register\";\nimport \"monaco-editor/features/format/register\";\nimport \"monaco-editor/features/hover/register\";\nimport \"monaco-editor/features/links/register\";\nimport \"monaco-editor/features/parameterHints/register\";\nimport \"monaco-editor/features/snippet/register\";\nimport \"monaco-editor/features/suggest/register\";\nimport \"monaco-editor/features/inlineCompletions/register\"; // Carries the suggest WIDGET — see above\n// Chrome & safety.\nimport \"monaco-editor/features/contextmenu/register\";\nimport \"monaco-editor/features/readOnlyMessage/register\"; // ReadOnly is set on collab failure\nimport \"monaco-editor/features/toggleTabFocusMode/register\";\nimport \"monaco-editor/features/unicodeHighlighter/register\";\n// Languages.\nimport { jsonDefaults } from \"monaco-editor/languages/features/json/register\";\nimport \"monaco-editor/languages/features/typescript/register\";\nimport \"monaco-editor/languages/definitions/javascript/register\";\n\nimport { flattenSchema } from \"@jxsuite/schema/project-schemas\";\nimport jxSchema from \"@jxsuite/schema/schema.json\";\nimport projectSchema from \"@jxsuite/schema/project-schema.json\";\n\n/* Re-exported for the modules that already imported it from here. New callers should reach for\n `./model-uri` directly — it is Monaco-free, and importing this module loads the editor. */\nexport { modelUriFor } from \"./model-uri\";\n\nconst WORKER_FILES: Record<string, string> = {\n editorWorkerService: \"editor.worker.js\",\n javascript: \"ts.worker.js\",\n json: \"json.worker.js\",\n typescript: \"ts.worker.js\",\n};\n\n/**\n * Resolve a Monaco worker to the PRE-BUNDLED copy that ships NEXT TO this bundle — `workers/`\n * beside `dist/studio.js`, written by scripts/build-workers.ts.\n *\n * Self-location via `import.meta.url` (Bun emits it verbatim for browser targets) is what makes one\n * expression correct on every host, because none of them agree on a prefix and two of them cannot\n * be served by one: the repo dev server mounts the shell at `/packages/studio/index.html`, the\n * packaged desktop app at `views://studio/index.html`, the desktop loopback server under\n * `/__studio__/`, and the cloud at `/edit/:owner/:repo@:branch` — a DEEP path, so even a\n * document-relative URL would resolve into the wrong directory there. The only invariant is the\n * bundle's own location.\n *\n * A root-absolute `/monaco-editor/esm/vs/...` (what this used to emit) resolved on exactly one of\n * them, the repo dev server, which serves bare specifiers out of the monorepo's `node_modules`.\n * Everywhere else it 404s — and a Monaco worker that fails to start takes the whole JSON language\n * service with it: no schema validation, no completion, no hover, and no error the user can see.\n *\n * @param {string} label - Monaco worker label (\"json\", \"typescript\", …)\n * @returns {string} Absolute URL of the worker bundle\n */\nexport function workerUrl(label: string): string {\n const file = WORKER_FILES[label] || WORKER_FILES.editorWorkerService!;\n return new URL(`workers/${file}`, import.meta.url).href;\n}\n\nself.MonacoEnvironment = {\n getWorker(_, label: string) {\n return new Worker(workerUrl(label), { type: \"module\" });\n },\n};\n\n/* Monaco caches glyph widths when an editor is created. JetBrains Mono is a\n vendored webfont (index.html @font-face) and may finish loading after the\n first editor mounts, so remeasure once all document fonts are ready to keep\n cursor and selection alignment correct. */\nif (typeof document !== \"undefined\" && document.fonts?.ready) {\n // oxlint-disable-next-line unicorn/prefer-top-level-await -- fire-and-forget: awaiting fonts.ready at top level would block module evaluation (and studio startup) until webfonts load\n void document.fonts.ready.then(async () => {\n const monaco = await import(\"monaco-editor/editor\");\n monaco.editor.remeasureFonts();\n });\n}\n\n/** Folder globs whose JSON files validate against the (per-project or core) document schema. */\nconst DOCUMENT_FILE_MATCH = [\n \"pages/*.json\",\n \"pages/**/*.json\",\n \"layouts/*.json\",\n \"layouts/**/*.json\",\n \"components/*.json\",\n \"components/**/*.json\",\n \"elements/*.json\",\n \"elements/**/*.json\",\n];\n\n/**\n * Model ids the committed entry documents are bound by. A Jx project binds its files with a\n * RELATIVE in-document pointer (extensions.md §5.2/§5.4) — `project.json` carries `\"$schema\":\n * \"./project.schema.json\"` — and Monaco mounts every studio model at\n * `file:///<project-relative-path>` (canvas/canvas-render.ts), so the language service resolves\n * that pointer against the model's own directory and lands on the project root.\n *\n * The document id is the same target for a document that spells its pointer at the RIGHT depth\n * (`../document.schema.json` from `pages/`, `../../` from `pages/blog/`). A pointer with too few\n * `../` resolves to a file that does not exist and fails everywhere — Monaco, VS Code and ajv alike\n * — so it is an authoring error, not something to paper over with extra registrations.\n */\nconst PROJECT_ENTRY_SCHEMA_ID = \"file:///project.schema.json\";\nconst DOCUMENT_ENTRY_SCHEMA_ID = \"file:///document.schema.json\";\n\n/** The project-root files those ids belong to (`jx schema` writes exactly these two names). */\n\n/**\n * Register the JSON diagnostics schemas. Fetched per-project schemas are inline OBJECTS (never URLs\n * — `enableSchemaRequest` stays off), so backends must serve them PRE-BUNDLED; the bundled core\n * schemas remain the offline fallback.\n *\n * Each schema registers TWICE: once under its canonical `https://jxsuite.com/…` uri with the\n * fileMatch patterns that cover documents carrying no `$schema` of their own, and again under the\n * `file:///…` id above. The second registration is what makes the `$schema` binding work offline.\n * An in-document `$schema` takes ABSOLUTE precedence over fileMatch in the language service\n * (`getSchemaForResource` consults it first and returns early), and resolution goes through\n * `getOrAddSchemaHandle`, which checks the by-id registry BEFORE reaching for a request service.\n * Without the id registered there is no service to reach for, so every `project.json` reported\n * `Unable to load schema from '/project.schema.json'. No schema request service available` — and,\n * worse, resolved to an empty schema, so the fileMatch registration never ran and REAL violations\n * went unreported behind that one diagnostic.\n */\nfunction applyJsonSchemas(documentSchema: unknown, projectJsonSchema: unknown) {\n jsonDefaults.setDiagnosticsOptions({\n allowComments: false,\n schemas: [\n {\n fileMatch: DOCUMENT_FILE_MATCH,\n schema: documentSchema,\n uri: \"https://jxsuite.com/schema/v1\",\n },\n {\n fileMatch: [\"project.json\"],\n schema: projectJsonSchema,\n uri: \"https://jxsuite.com/schema/project/v1\",\n },\n { schema: projectJsonSchema, uri: PROJECT_ENTRY_SCHEMA_ID },\n { schema: documentSchema, uri: DOCUMENT_ENTRY_SCHEMA_ID },\n ],\n validate: true,\n });\n}\n\n/* Flattened once at module load: the shipped core schemas reference the well-known union resources\n by canonical $id (the `$paths` source union, extensions.md §5.3), and Monaco resolves anything with\n a URI before the `#` by FETCHING it — with `enableSchemaRequest` off that just fails, leaving\n `$paths` reporting an unresolvable ref. Flattening rewrites those refs onto the shipped defaults\n embedded in the same document, which is exactly the right fallback semantics. */\nconst FALLBACK_DOCUMENT_SCHEMA = flattenSchema(jxSchema as Record<string, unknown>);\nconst FALLBACK_PROJECT_SCHEMA = flattenSchema(projectSchema as Record<string, unknown>);\n\n// Bundled core schemas register at module init — the offline fallback every platform starts from.\napplyJsonSchemas(FALLBACK_DOCUMENT_SCHEMA, FALLBACK_PROJECT_SCHEMA);\n\n/**\n * Swap Monaco's JSON diagnostics to the ACTIVE project's generated entry documents — the\n * pre-bundled payload behind the platform's optional `fetchProjectSchemas` member (dev server:\n * `/__studio/project-schemas`; desktop: RPC into the project session). Called on project\n * activation, after a `project.json` write, and on `extensions` changes.\n *\n * Takes an ALREADY-FETCHED payload rather than the platform, so ONE fetch can feed both Monaco and\n * the AI assistant's validator (format/format-host.ts). The backends regenerate stale entry\n * documents on demand and write them to disk, so a second concurrent fetch is not a harmless\n * duplicate — it races the first on the same two files.\n *\n * @param {object | null} schemas - Pre-bundled `{ document, project }` payload\n * @returns {boolean} True when per-project schemas were applied; false on fallback\n */\nexport function applyProjectSchemas(\n schemas: { project?: unknown; document?: unknown } | null | undefined,\n): boolean {\n const { document, project } = schemas ?? {};\n if (!document && !project) {\n return false;\n }\n applyJsonSchemas(document ?? FALLBACK_DOCUMENT_SCHEMA, project ?? FALLBACK_PROJECT_SCHEMA);\n return true;\n}\n\n/** Restore the bundled core schemas (project closed / tests). */\nexport function resetProjectSchemas(): void {\n applyJsonSchemas(FALLBACK_DOCUMENT_SCHEMA, FALLBACK_PROJECT_SCHEMA);\n}\n"
|
|
11
|
-
],
|
|
12
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,mBAAmB;AACzB,IAAM,sBAAsB;AAC5B,SAAS,0BAA0B,CAAC,QAAQ,SAAS;AAAA,EACnD,MAAM,UAAU,QAAQ;AAAA,EACxB,IAAI,CAAC,SAAS;AAAA,IACZ;AAAA,EACF;AAAA,EACA,MAAM,oBAAoB,QAAQ,iBAAiB,iEAAiE;AAAA,EACpH,WAAW,WAAW,mBAAmB;AAAA,IACvC,IAAI,EAAE,mBAAmB,cAAc;AAAA,MACrC;AAAA,IACF;AAAA,IACA,IAAI,SAAS;AAAA,MACX,IAAI,EAAE,uBAAuB,QAAQ,UAAU;AAAA,QAC7C;AAAA,MACF;AAAA,MACA,MAAM,mBAAmB,QAAQ,QAAQ;AAAA,MACzC,IAAI,qBAAqB,IAAI;AAAA,QAC3B,QAAQ,gBAAgB,UAAU;AAAA,MACpC,EAAO;AAAA,QACL,QAAQ,WAAW,OAAO,gBAAgB;AAAA;AAAA,MAE5C,OAAO,QAAQ,QAAQ;AAAA,IACzB,EAAO;AAAA,MACL,IAAI,EAAE,uBAAuB,QAAQ,UAAU;AAAA,QAC7C,QAAQ,QAAQ,uBAAuB,QAAQ,aAAa,UAAU,KAAK;AAAA,MAC7E;AAAA,MACA,QAAQ,WAAW;AAAA;AAAA,EAEvB;AAAA;AAEF,IAAI,CAAC,WAAW,mBAAmB;AAAA,EACjC,MAAM,iBAAiB,WAAW,UAAU;AAAA,EAC5C,MAAM,eAAe,WAAW,UAAU;AAAA,EAC1C,WAAW,UAAU,UAAU,QAAQ,IAAI,MAAM;AAAA,IAC/C,eAAe,MAAM,MAAM,IAAI;AAAA,IAC/B,2BAA2B,MAAM,IAAI;AAA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OAAO;AAAA;AAIF,SAAS,mBAAmB,GAAS;AAAA,EAC1C,iBAAiB,0BAA0B,uBAAuB;AAAA;",
|
|
13
|
-
"debugId": "98F583527A84F4BD64756E2164756E21",
|
|
14
|
-
"names": []
|
|
15
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
inspectorTab,
|
|
3
|
-
mount,
|
|
4
|
-
render,
|
|
5
|
-
setInspectorTab,
|
|
6
|
-
unmount
|
|
7
|
-
} from "./studio-nqq8jk8f.js";
|
|
8
|
-
import"./studio-1kgfcv7s.js";
|
|
9
|
-
import"./studio-x0et2z9g.js";
|
|
10
|
-
import"./studio-0rqqhrdy.js";
|
|
11
|
-
import"./studio-8jpzqk5s.js";
|
|
12
|
-
import"./studio-300zsz1k.js";
|
|
13
|
-
import"./studio-xmvbhg31.js";
|
|
14
|
-
import"./studio-qhh8r5fz.js";
|
|
15
|
-
import"./studio-yz9s88s0.js";
|
|
16
|
-
import"./studio-5kt960pk.js";
|
|
17
|
-
import"./studio-ckwz4d3x.js";
|
|
18
|
-
import"./studio-p471gg5n.js";
|
|
19
|
-
import"./studio-5x5774ak.js";
|
|
20
|
-
import"./studio-g1wdche0.js";
|
|
21
|
-
import"./studio-s519zc99.js";
|
|
22
|
-
import"./studio-cjm7fdjf.js";
|
|
23
|
-
import"./studio-tqemhphj.js";
|
|
24
|
-
import"./studio-sas7mt3k.js";
|
|
25
|
-
import"./studio-5ehhackm.js";
|
|
26
|
-
import"./studio-t5wqwzdh.js";
|
|
27
|
-
import"./studio-a0tswy0w.js";
|
|
28
|
-
export {
|
|
29
|
-
inspectorTab,
|
|
30
|
-
mount,
|
|
31
|
-
render,
|
|
32
|
-
setInspectorTab,
|
|
33
|
-
unmount
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
//# debugId=ABA0D4BF53D8338064756E2164756E21
|
|
37
|
-
//# sourceMappingURL=right-panel-faf816ch.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import"./studio-6a0h7sne.js";
|
|
2
|
-
import"./studio-ahnzd9rg.js";
|
|
3
|
-
import"./studio-rgwcpast.js";
|
|
4
|
-
import"./studio-18j3bmcz.js";
|
|
5
|
-
import"./studio-xm3dbxvn.js";
|
|
6
|
-
import"./studio-0rqqhrdy.js";
|
|
7
|
-
import"./studio-xmvbhg31.js";
|
|
8
|
-
import"./studio-6f0am8f2.js";
|
|
9
|
-
import"./studio-ckwz4d3x.js";
|
|
10
|
-
import"./studio-p471gg5n.js";
|
|
11
|
-
import"./studio-5x5774ak.js";
|
|
12
|
-
import"./studio-a0tswy0w.js";
|
|
13
|
-
|
|
14
|
-
//# debugId=6CCEFD43C09F3F2A64756E2164756E21
|
|
15
|
-
//# sourceMappingURL=sp-progress-circle.dev-0fpvhm52.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import"./studio-3z8jjm2p.js";
|
|
2
|
-
import"./studio-rgwcpast.js";
|
|
3
|
-
import"./studio-8q517dfr.js";
|
|
4
|
-
import"./studio-18j3bmcz.js";
|
|
5
|
-
import"./studio-xm3dbxvn.js";
|
|
6
|
-
import"./studio-0rqqhrdy.js";
|
|
7
|
-
import"./studio-xmvbhg31.js";
|
|
8
|
-
import"./studio-6f0am8f2.js";
|
|
9
|
-
import"./studio-ckwz4d3x.js";
|
|
10
|
-
import"./studio-p471gg5n.js";
|
|
11
|
-
import"./studio-5x5774ak.js";
|
|
12
|
-
import"./studio-a0tswy0w.js";
|
|
13
|
-
|
|
14
|
-
//# debugId=6CCEFD43C09F3F2A64756E2164756E21
|
|
15
|
-
//# sourceMappingURL=sp-tooltip.dev-rvepkw4r.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../node_modules/@spectrum-web-components/tray/src/tray.css.js", "../../../node_modules/@spectrum-web-components/tray/src/Tray.dev.js", "../../../node_modules/@spectrum-web-components/tray/sp-tray.dev.js"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"\"use strict\";import{css as a}from\"@spectrum-web-components/base\";const r=a`\n :host{justify-content:center;inline-size:100%;display:flex;position:fixed;inset-block-end:0;inset-inline-start:0}.tray{--spectrum-tray-max-inline-size:var(--mod-tray-max-inline-size,375px);--spectrum-tray-spacing-edge-to-tray-safe-zone:var(--mod-tray-spacing-edge-to-tray-safe-zone,64px);--spectrum-tray-entry-animation-delay:var(--mod-tray-entry-animation-delay,.16s);--spectrum-tray-entry-animation-duration:var(--mod-tray-entry-animation-duration,var(--spectrum-animation-duration-500));--spectrum-tray-exit-animation-delay:var(--mod-tray-exit-animation-delay,0s);--spectrum-tray-exit-animation-duration:var(--mod-tray-exit-animation-duration,var(--spectrum-animation-duration-100));--spectrum-tray-corner-radius:var(--mod-tray-corner-radius,var(--spectrum-corner-radius-100));--spectrum-tray-background-color:var(--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-background-layer-2-color)));--mod-modal-max-width:100%;box-sizing:border-box;max-block-size:calc(100vh - 64px);inline-size:100%;max-inline-size:100%;max-block-size:calc(100vh - var(--spectrum-tray-spacing-edge-to-tray-safe-zone));background-color:var(--spectrum-tray-background-color);border-radius:0;border-radius:var(--mod-tray-corner-radius-portrait,0)var(--mod-tray-corner-radius-portrait,0)0 0;transition:opacity var(--spectrum-tray-exit-animation-duration)cubic-bezier(.5,0,1,1)0s,visibility var(--spectrum-tray-exit-animation-duration)linear calc(var(--spectrum-tray-exit-animation-duration)),transform var(--spectrum-tray-exit-animation-duration)cubic-bezier(.5,0,1,1)0s;transition:opacity var(--spectrum-tray-exit-animation-duration)cubic-bezier(.5,0,1,1)var(--spectrum-tray-exit-animation-delay),visibility var(--spectrum-tray-exit-animation-duration)linear calc(var(--spectrum-tray-exit-animation-delay) + var(--spectrum-tray-exit-animation-duration)),transform var(--spectrum-tray-exit-animation-duration)cubic-bezier(.5,0,1,1)var(--spectrum-tray-exit-animation-delay);outline:none;margin-block-start:var(--spectrum-tray-spacing-edge-to-tray-safe-zone);padding-block-start:var(--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area));padding-block-end:var(--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area));overflow:auto;transform:translateY(100%)}:host([open]) .tray{transition:transform var(--spectrum-tray-entry-animation-duration)cubic-bezier(0,0,.4,1)var(--spectrum-tray-entry-animation-delay),opacity var(--spectrum-tray-entry-animation-duration)cubic-bezier(0,0,.4,1)var(--spectrum-tray-entry-animation-delay);transform:translateY(0)}@media screen and (orientation:landscape){.tray{max-inline-size:var(--spectrum-tray-max-inline-size);border-start-start-radius:var(--spectrum-tray-corner-radius);border-start-end-radius:var(--spectrum-tray-corner-radius)}}@media (forced-colors:active){.tray{--highcontrast-tray-background-color:Canvas;border:solid}.tray ::slotted(*){border:none}}:host{align-items:flex-end;max-height:100dvh;position:fixed!important}sp-underlay{touch-action:none}.tray{overscroll-behavior:contain;display:inline-flex}.visually-hidden,::slotted(.visually-hidden){white-space:nowrap;clip-path:inset(50%);border:0;width:1px;height:1px;margin:0 -1px -1px 0;padding:0;position:absolute;overflow:hidden}\n`;export default r;\n//# sourceMappingURL=tray.css.js.map\n",
|
|
6
|
-
"\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __decorateClass = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result) __defProp(target, key, result);\n return result;\n};\nimport {\n html,\n nothing,\n SpectrumElement\n} from \"@spectrum-web-components/base\";\nimport {\n property,\n query,\n state\n} from \"@spectrum-web-components/base/src/decorators.js\";\nimport modalStyles from \"@spectrum-web-components/modal/src/modal.css.js\";\nimport { MatchMediaController } from \"@spectrum-web-components/reactive-controllers/src/MatchMedia.js\";\nimport { firstFocusableIn } from \"@spectrum-web-components/shared/src/first-focusable-in.js\";\nimport \"@spectrum-web-components/underlay/sp-underlay.js\";\nimport styles from \"./tray.css.js\";\nexport class Tray extends SpectrumElement {\n constructor() {\n super(...arguments);\n this.open = false;\n this.prefersMotion = new MatchMediaController(\n this,\n \"(prefers-reduced-motion: no-preference)\"\n );\n this.transitionPromise = Promise.resolve();\n this.resolveTransitionPromise = () => {\n };\n this.animating = false;\n this.hasKeyboardDismissButton = false;\n this.needsDismissHelper = true;\n }\n static get styles() {\n return [modalStyles, styles];\n }\n focus() {\n const firstFocusable = firstFocusableIn(this);\n if (firstFocusable) {\n firstFocusable.focus();\n } else if (this.children.length === 1) {\n this.tray.focus();\n } else {\n super.focus();\n }\n }\n overlayWillCloseCallback() {\n if (!this.open) {\n return this.animating;\n }\n this.close();\n return true;\n }\n close() {\n this.open = false;\n if (!this.prefersMotion.matches) {\n this.dispatchClosed();\n }\n }\n /**\n * Returns a visually hidden dismiss button for mobile screen reader accessibility.\n * This button is placed before and after tray content to allow mobile screen reader\n * users (particularly VoiceOver on iOS) to easily dismiss the overlay.\n */\n get dismissHelper() {\n return html`\n <div class=\"visually-hidden\">\n <button aria-label=\"Dismiss\" @click=${this.close}></button>\n </div>\n `;\n }\n /**\n * Check if slotted content has keyboard-accessible dismiss buttons.\n * Looks for buttons in light DOM and checks for known components with built-in dismiss.\n */\n checkForDismissButtons() {\n if (!this.contentSlot) {\n this.needsDismissHelper = true;\n return;\n }\n const slottedElements = this.contentSlot.assignedElements({\n flatten: true\n });\n if (slottedElements.length === 0) {\n this.needsDismissHelper = true;\n return;\n }\n const hasDismissButton = slottedElements.some((element) => {\n if (element.tagName === \"SP-BUTTON\" || element.tagName === \"SP-CLOSE-BUTTON\" || element.tagName === \"BUTTON\") {\n return true;\n }\n if (element.tagName === \"SP-DIALOG\" && element.hasAttribute(\"dismissable\")) {\n return true;\n }\n if (element.tagName === \"SP-DIALOG-WRAPPER\" && element.hasAttribute(\"dismissable\")) {\n return true;\n }\n const buttons = element.querySelectorAll(\n \"sp-button, sp-close-button, button\"\n );\n if (buttons.length > 0) {\n return true;\n }\n return false;\n });\n this.needsDismissHelper = !hasDismissButton;\n }\n handleSlotChange() {\n this.checkForDismissButtons();\n }\n dispatchClosed() {\n this.dispatchEvent(\n new Event(\"close\", {\n bubbles: true\n })\n );\n }\n handleUnderlayTransitionend() {\n if (!this.open) {\n this.resolveTransitionPromise();\n this.dispatchClosed();\n }\n }\n handleTrayTransitionend() {\n if (this.open) {\n this.resolveTransitionPromise();\n }\n }\n firstUpdated(changes) {\n super.firstUpdated(changes);\n this.checkForDismissButtons();\n }\n update(changes) {\n if (changes.has(\"open\") && changes.get(\"open\") !== void 0 && this.prefersMotion.matches) {\n this.animating = true;\n this.transitionPromise = new Promise((res) => {\n this.resolveTransitionPromise = () => {\n this.animating = false;\n res();\n };\n });\n }\n super.update(changes);\n }\n render() {\n return html`\n <sp-underlay\n ?open=${this.open}\n @close=${this.close}\n @transitionend=${this.handleUnderlayTransitionend}\n ></sp-underlay>\n <div\n class=\"tray modal\"\n tabindex=\"-1\"\n @transitionend=${this.handleTrayTransitionend}\n >\n ${!this.hasKeyboardDismissButton && this.needsDismissHelper ? this.dismissHelper : nothing}\n <slot @slotchange=${this.handleSlotChange}></slot>\n ${!this.hasKeyboardDismissButton && this.needsDismissHelper ? this.dismissHelper : nothing}\n </div>\n `;\n }\n /**\n * Bind the open/close transition into the update complete lifecycle so\n * that the overlay system can wait for it to be \"visibly ready\" before\n * attempting to throw focus into the content contained herein. Not\n * waiting for this can cause small amounts of page scroll to happen\n * while opening the Tray when focusable content is included: e.g. Menu\n * elements whose selected Menu Item is not the first Menu Item.\n */\n async getUpdateComplete() {\n const complete = await super.getUpdateComplete();\n await this.transitionPromise;\n return complete;\n }\n}\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], Tray.prototype, \"open\", 2);\n__decorateClass([\n query(\".tray\")\n], Tray.prototype, \"tray\", 2);\n__decorateClass([\n query(\"slot\")\n], Tray.prototype, \"contentSlot\", 2);\n__decorateClass([\n property({ type: Boolean, attribute: \"has-keyboard-dismiss\" })\n], Tray.prototype, \"hasKeyboardDismissButton\", 2);\n__decorateClass([\n state()\n], Tray.prototype, \"needsDismissHelper\", 2);\n//# sourceMappingURL=Tray.dev.js.map\n",
|
|
7
|
-
"\"use strict\";\nimport { defineElement } from \"@spectrum-web-components/base/src/define-element.js\";\nimport { Tray } from \"./src/Tray.dev.js\";\ndefineElement(\"sp-tray\", Tray);\n//# sourceMappingURL=sp-tray.dev.js.map\n"
|
|
8
|
-
],
|
|
9
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAiE,IAAM,IAAE;AAAA;AAAA;AAEvE,IAAe;;;ACDjB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,kBAAkB,CAAC,YAAY,QAAQ,KAAK,SAAS;AAAA,EACvD,IAAI,SAAS,OAAO,IAAS,YAAI,OAAO,iBAAiB,QAAQ,GAAG,IAAI;AAAA,EACxE,SAAS,IAAI,WAAW,SAAS,GAAG,UAAW,KAAK,GAAG;AAAA,IACrD,IAAI,YAAY,WAAW;AAAA,MACzB,UAAU,OAAO,UAAU,QAAQ,KAAK,MAAM,IAAI,UAAU,MAAM,MAAM;AAAA,EAC5E,IAAI,QAAQ;AAAA,IAAQ,UAAU,QAAQ,KAAK,MAAM;AAAA,EACjD,OAAO;AAAA;AAAA;AAiBF,MAAM,aAAa,gBAAgB;AAAA,EACxC,WAAW,GAAG;AAAA,IACZ,MAAM,GAAG,SAAS;AAAA,IAClB,KAAK,OAAO;AAAA,IACZ,KAAK,gBAAgB,IAAI,qBACvB,MACA,yCACF;AAAA,IACA,KAAK,oBAAoB,QAAQ,QAAQ;AAAA,IACzC,KAAK,2BAA2B,MAAM;AAAA,IAEtC,KAAK,YAAY;AAAA,IACjB,KAAK,2BAA2B;AAAA,IAChC,KAAK,qBAAqB;AAAA;AAAA,aAEjB,MAAM,GAAG;A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