@jxsuite/studio 2.2.2 → 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 +11 -4
- 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,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/services/cem-export.ts", "../../../node_modules/hast-util-whitespace/lib/index.js", "../../../node_modules/devlop/lib/development.js", "../../../node_modules/unist-util-stringify-position/lib/index.js", "../../../node_modules/vfile-message/lib/index.js", "../../../node_modules/vfile/lib/minpath.browser.js", "../../../node_modules/vfile/lib/minproc.browser.js", "../../../node_modules/vfile/lib/minurl.shared.js", "../../../node_modules/vfile/lib/minurl.browser.js", "../../../node_modules/vfile/lib/index.js", "../../../node_modules/comma-separated-tokens/index.js", "../../../node_modules/space-separated-tokens/index.js"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/// <reference lib=\"dom\" />\nimport type { CemParameter, JxMutableNode, JxStateObject } from \"@jxsuite/schema/types\";\nimport {\n displayTagName,\n isFunctionDef,\n isJsonObject,\n isPrivateStateKey,\n} from \"@jxsuite/schema/guards\";\n\n/** Collect slot elements from the document tree. Whitespace-only names count as unnamed. */\nexport function collectSlots(node?: JxMutableNode | null, slots: string[] = []) {\n if (node?.tagName === \"slot\") {\n const name = node.attributes?.name;\n slots.push(typeof name === \"string\" ? name.trim() : \"\");\n }\n if (Array.isArray(node?.children)) {\n for (const c of node.children) {\n collectSlots(typeof c === \"string\" ? undefined : c, slots);\n }\n }\n return slots;\n}\n\n/**\n * Validate slot usage in a component definition. Returns a warning message or null when valid. Only\n * static children are walked — slots inside $switch cases are mutually exclusive branches and are\n * not counted (v1 limitation).\n */\nexport function validateComponentSlots(doc: JxMutableNode): string | null {\n const names = collectSlots(doc);\n const unnamed = names.filter((n) => n === \"\").length;\n if (unnamed > 1) {\n return `Component has ${unnamed} unnamed <slot> elements — only one default slot is allowed. Give extra slots a name attribute.`;\n }\n const seen = new Set<string>();\n for (const n of names) {\n if (n && seen.has(n)) {\n return `Duplicate slot name \"${n}\" — slot names must be unique within a component.`;\n }\n seen.add(n);\n }\n return null;\n}\n\n/**\n * Generate and download a CEM 2.1.0 manifest for the current document.\n *\n * @param {{ document: JxMutableNode }} S - Studio state\n * @param {{\n * defCategory: (d: unknown) => string;\n * normParam: (p: string | CemParameter) => CemParameter;\n * collectCssParts: (node: JxMutableNode) => { name: string }[];\n * }} helpers\n */\nexport function exportCemManifest(\n S: { document: JxMutableNode },\n helpers: {\n defCategory: (d: unknown) => string;\n normParam: (p: string | CemParameter) => CemParameter;\n collectCssParts: (node: JxMutableNode) => { name: string }[];\n },\n) {\n const { defCategory, normParam, collectCssParts } = helpers;\n const doc = S.document;\n const { tagName } = doc;\n if (!tagName || !displayTagName(tagName).includes(\"-\")) {\n return;\n }\n\n const state = doc.state || {};\n const members: Record<string, unknown>[] = [];\n const attributes: Record<string, unknown>[] = [];\n const events: Record<string, unknown>[] = [];\n const seenEvents = new Set<string>();\n\n for (const [key, d] of Object.entries(state)) {\n if (isPrivateStateKey(key)) {\n continue;\n } // Private (spec.md §5.6)\n\n const cat = defCategory(d);\n\n if (cat === \"function\") {\n if (isFunctionDef(d)) {\n members.push({\n kind: \"method\",\n name: key,\n ...(d.description ? { description: d.description } : {}),\n ...(d.parameters ? { parameters: d.parameters.map(normParam) } : {}),\n ...(d.deprecated\n ? { deprecated: typeof d.deprecated === \"string\" ? d.deprecated : true }\n : {}),\n });\n // Collect emits\n for (const ev of d.emits ?? []) {\n if (ev.name && !seenEvents.has(ev.name)) {\n seenEvents.add(ev.name);\n events.push({\n name: ev.name,\n ...(ev.type !== undefined ? { type: ev.type } : {}),\n ...(ev.description ? { description: ev.description } : {}),\n });\n }\n }\n } else if (isJsonObject(d)) {\n // Legacy $handler entry — emit a bare method member\n const { description } = d;\n members.push({\n kind: \"method\",\n name: key,\n ...(typeof description === \"string\" ? { description } : {}),\n });\n }\n } else if (cat === \"state\") {\n // Naked primitive values carry no metadata; object defs are signals/type defs.\n const def: JxStateObject | null = isJsonObject(d) ? (d as JxStateObject) : null;\n members.push({\n kind: \"field\",\n name: key,\n ...(def?.type ? { type: { text: def.type } } : {}),\n ...(def && def.default !== undefined ? { default: String(def.default) } : {}),\n ...(def?.description ? { description: def.description } : {}),\n ...(def?.attribute ? { attribute: def.attribute } : {}),\n ...(def?.reflects ? { reflects: true } : {}),\n ...(def?.deprecated\n ? { deprecated: typeof def.deprecated === \"string\" ? def.deprecated : true }\n : {}),\n });\n if (def?.attribute) {\n attributes.push({\n name: def.attribute,\n ...(def.type ? { type: { text: def.type } } : {}),\n fieldName: key,\n });\n }\n }\n }\n\n // Slots\n const slotNames = collectSlots(doc);\n const slots = slotNames.map((name: string) => {\n const slot: { name: string; description?: string } = { name: name || \"\" };\n if (!name) {\n slot.description = \"Default slot\";\n }\n return slot;\n });\n\n // CSS custom properties\n const style = doc.style || {};\n const cssProperties = Object.entries(style)\n .filter(([k]) => k.startsWith(\"--\"))\n .map(([name, val]) => ({ default: String(val), name }));\n\n // CSS parts\n const cssParts = collectCssParts(doc).map((p) => ({ name: p.name }));\n\n const manifest = {\n modules: [\n {\n declarations: [\n {\n kind: \"class\",\n members,\n name: tagName,\n tagName,\n ...(attributes.length > 0 ? { attributes } : {}),\n ...(events.length > 0 ? { events } : {}),\n ...(slots.length > 0 ? { slots } : {}),\n ...(cssProperties.length > 0 ? { cssProperties } : {}),\n ...(cssParts.length > 0 ? { cssParts } : {}),\n },\n ],\n kind: \"javascript-module\",\n path: \"\",\n },\n ],\n schemaVersion: \"2.1.0\",\n };\n\n const blob = new Blob([JSON.stringify(manifest, null, 2)], {\n type: \"application/json\",\n });\n const url = URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n a.href = url;\n a.download = `${tagName}.cem.json`;\n a.click();\n URL.revokeObjectURL(url);\n}\n",
|
|
6
|
-
"/**\n * @typedef {import('hast').Nodes} Nodes\n */\n\n// HTML whitespace expression.\n// See <https://infra.spec.whatwg.org/#ascii-whitespace>.\nconst re = /[ \\t\\n\\f\\r]/g\n\n/**\n * Check if the given value is *inter-element whitespace*.\n *\n * @param {Nodes | string} thing\n * Thing to check (`Node` or `string`).\n * @returns {boolean}\n * Whether the `value` is inter-element whitespace (`boolean`): consisting of\n * zero or more of space, tab (`\\t`), line feed (`\\n`), carriage return\n * (`\\r`), or form feed (`\\f`); if a node is passed it must be a `Text` node,\n * whose `value` field is checked.\n */\nexport function whitespace(thing) {\n return typeof thing === 'object'\n ? thing.type === 'text'\n ? empty(thing.value)\n : false\n : empty(thing)\n}\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nfunction empty(value) {\n return value.replace(re, '') === ''\n}\n",
|
|
7
|
-
"import {dequal} from 'dequal'\n\n/**\n * @type {Set<string>}\n */\nconst codesWarned = new Set()\n\nclass AssertionError extends Error {\n name = /** @type {const} */ ('Assertion')\n code = /** @type {const} */ ('ERR_ASSERTION')\n\n /**\n * Create an assertion error.\n *\n * @param {string} message\n * Message explaining error.\n * @param {unknown} actual\n * Value.\n * @param {unknown} expected\n * Baseline.\n * @param {string} operator\n * Name of equality operation.\n * @param {boolean} generated\n * Whether `message` is a custom message or not\n * @returns\n * Instance.\n */\n // eslint-disable-next-line max-params\n constructor(message, actual, expected, operator, generated) {\n super(message)\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor)\n }\n\n /**\n * @type {unknown}\n */\n this.actual = actual\n\n /**\n * @type {unknown}\n */\n this.expected = expected\n\n /**\n * @type {boolean}\n */\n this.generated = generated\n\n /**\n * @type {string}\n */\n this.operator = operator\n }\n}\n\nclass DeprecationError extends Error {\n name = /** @type {const} */ ('DeprecationWarning')\n\n /**\n * Create a deprecation message.\n *\n * @param {string} message\n * Message explaining deprecation.\n * @param {string | undefined} code\n * Deprecation identifier; deprecation messages will be generated only once per code.\n * @returns\n * Instance.\n */\n constructor(message, code) {\n super(message)\n\n /**\n * @type {string | undefined}\n */\n this.code = code\n }\n}\n\n/**\n * Wrap a function or class to show a deprecation message when first called.\n *\n * > 👉 **Important**: only shows a message when the `development` condition is\n * > used, does nothing in production.\n *\n * When the resulting wrapped `fn` is called, emits a warning once to\n * `console.error` (`stderr`).\n * If a code is given, one warning message will be emitted in total per code.\n *\n * @template {Function} T\n * Function or class kind.\n * @param {T} fn\n * Function or class.\n * @param {string} message\n * Message explaining deprecation.\n * @param {string | null | undefined} [code]\n * Deprecation identifier (optional); deprecation messages will be generated\n * only once per code.\n * @returns {T}\n * Wrapped `fn`.\n */\nexport function deprecate(fn, message, code) {\n let warned = false\n\n // The wrapper will keep the same prototype as fn to maintain prototype chain\n Object.setPrototypeOf(deprecated, fn)\n\n // @ts-expect-error: it’s perfect, typescript…\n return deprecated\n\n /**\n * @this {unknown}\n * @param {...Array<unknown>} args\n * @returns {unknown}\n */\n function deprecated(...args) {\n if (!warned) {\n warned = true\n\n if (typeof code === 'string' && codesWarned.has(code)) {\n // Empty.\n } else {\n console.error(new DeprecationError(message, code || undefined))\n\n if (typeof code === 'string') codesWarned.add(code)\n }\n }\n\n return new.target\n ? Reflect.construct(fn, args, new.target)\n : Reflect.apply(fn, this, args)\n }\n}\n\n/**\n * Assert deep strict equivalence.\n *\n * > 👉 **Important**: only asserts when the `development` condition is used,\n * > does nothing in production.\n *\n * @template {unknown} T\n * Expected kind.\n * @param {unknown} actual\n * Value.\n * @param {T} expected\n * Baseline.\n * @param {Error | string | null | undefined} [message]\n * Message for assertion error (default: `'Expected values to be deeply equal'`).\n * @returns {asserts actual is T}\n * Nothing; throws when `actual` is not deep strict equal to `expected`.\n * @throws {AssertionError}\n * Throws when `actual` is not deep strict equal to `expected`.\n */\nexport function equal(actual, expected, message) {\n assert(\n dequal(actual, expected),\n actual,\n expected,\n 'equal',\n 'Expected values to be deeply equal',\n message\n )\n}\n\n/**\n * Assert if `value` is truthy.\n *\n * > 👉 **Important**: only asserts when the `development` condition is used,\n * > does nothing in production.\n *\n * @param {unknown} value\n * Value to assert.\n * @param {Error | string | null | undefined} [message]\n * Message for assertion error (default: `'Expected value to be truthy'`).\n * @returns {asserts value}\n * Nothing; throws when `value` is falsey.\n * @throws {AssertionError}\n * Throws when `value` is falsey.\n */\nexport function ok(value, message) {\n assert(\n Boolean(value),\n false,\n true,\n 'ok',\n 'Expected value to be truthy',\n message\n )\n}\n\n/**\n * Assert that a code path never happens.\n *\n * > 👉 **Important**: only asserts when the `development` condition is used,\n * > does nothing in production.\n *\n * @param {Error | string | null | undefined} [message]\n * Message for assertion error (default: `'Unreachable'`).\n * @returns {never}\n * Nothing; always throws.\n * @throws {AssertionError}\n * Throws when `value` is falsey.\n */\nexport function unreachable(message) {\n assert(false, false, true, 'ok', 'Unreachable', message)\n}\n\n/**\n * @param {boolean} bool\n * Whether to skip this operation.\n * @param {unknown} actual\n * Actual value.\n * @param {unknown} expected\n * Expected value.\n * @param {string} operator\n * Operator.\n * @param {string} defaultMessage\n * Default message for operation.\n * @param {Error | string | null | undefined} userMessage\n * User-provided message.\n * @returns {asserts bool}\n * Nothing; throws when falsey.\n */\n// eslint-disable-next-line max-params\nfunction assert(bool, actual, expected, operator, defaultMessage, userMessage) {\n if (!bool) {\n throw userMessage instanceof Error\n ? userMessage\n : new AssertionError(\n userMessage || defaultMessage,\n actual,\n expected,\n operator,\n !userMessage\n )\n }\n}\n",
|
|
8
|
-
"/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n */\n\n/**\n * Serialize the positional info of a point, position (start and end points),\n * or node.\n *\n * @param {Node | NodeLike | Point | PointLike | Position | PositionLike | null | undefined} [value]\n * Node, position, or point.\n * @returns {string}\n * Pretty printed positional info of a node (`string`).\n *\n * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)\n * or a point `l:c` (when given `point`), where `l` stands for line, `c` for\n * column, `s` for `start`, and `e` for end.\n * An empty string (`''`) is returned if the given value is neither `node`,\n * `position`, nor `point`.\n */\nexport function stringifyPosition(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return ''\n }\n\n // Node.\n if ('position' in value || 'type' in value) {\n return position(value.position)\n }\n\n // Position.\n if ('start' in value || 'end' in value) {\n return position(value)\n }\n\n // Point.\n if ('line' in value || 'column' in value) {\n return point(value)\n }\n\n // ?\n return ''\n}\n\n/**\n * @param {Point | PointLike | null | undefined} point\n * @returns {string}\n */\nfunction point(point) {\n return index(point && point.line) + ':' + index(point && point.column)\n}\n\n/**\n * @param {Position | PositionLike | null | undefined} pos\n * @returns {string}\n */\nfunction position(pos) {\n return point(pos && pos.start) + '-' + point(pos && pos.end)\n}\n\n/**\n * @param {number | null | undefined} value\n * @returns {number}\n */\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1\n}\n",
|
|
9
|
-
"/**\n * @import {Node, Point, Position} from 'unist'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n *\n * @typedef Options\n * Configuration.\n * @property {Array<Node> | null | undefined} [ancestors]\n * Stack of (inclusive) ancestor nodes surrounding the message (optional).\n * @property {Error | null | undefined} [cause]\n * Original error cause of the message (optional).\n * @property {Point | Position | null | undefined} [place]\n * Place of message (optional).\n * @property {string | null | undefined} [ruleId]\n * Category of message (optional, example: `'my-rule'`).\n * @property {string | null | undefined} [source]\n * Namespace of who sent the message (optional, example: `'my-package'`).\n */\n\nimport {stringifyPosition} from 'unist-util-stringify-position'\n\n/**\n * Message.\n */\nexport class VFileMessage extends Error {\n /**\n * Create a message for `reason`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {Options | null | undefined} [options]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns\n * Instance of `VFileMessage`.\n */\n // eslint-disable-next-line complexity\n constructor(causeOrReason, optionsOrParentOrPlace, origin) {\n super()\n\n if (typeof optionsOrParentOrPlace === 'string') {\n origin = optionsOrParentOrPlace\n optionsOrParentOrPlace = undefined\n }\n\n /** @type {string} */\n let reason = ''\n /** @type {Options} */\n let options = {}\n let legacyCause = false\n\n if (optionsOrParentOrPlace) {\n // Point.\n if (\n 'line' in optionsOrParentOrPlace &&\n 'column' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Position.\n else if (\n 'start' in optionsOrParentOrPlace &&\n 'end' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Node.\n else if ('type' in optionsOrParentOrPlace) {\n options = {\n ancestors: [optionsOrParentOrPlace],\n place: optionsOrParentOrPlace.position\n }\n }\n // Options.\n else {\n options = {...optionsOrParentOrPlace}\n }\n }\n\n if (typeof causeOrReason === 'string') {\n reason = causeOrReason\n }\n // Error.\n else if (!options.cause && causeOrReason) {\n legacyCause = true\n reason = causeOrReason.message\n options.cause = causeOrReason\n }\n\n if (!options.ruleId && !options.source && typeof origin === 'string') {\n const index = origin.indexOf(':')\n\n if (index === -1) {\n options.ruleId = origin\n } else {\n options.source = origin.slice(0, index)\n options.ruleId = origin.slice(index + 1)\n }\n }\n\n if (!options.place && options.ancestors && options.ancestors) {\n const parent = options.ancestors[options.ancestors.length - 1]\n\n if (parent) {\n options.place = parent.position\n }\n }\n\n const start =\n options.place && 'start' in options.place\n ? options.place.start\n : options.place\n\n /**\n * Stack of ancestor nodes surrounding the message.\n *\n * @type {Array<Node> | undefined}\n */\n this.ancestors = options.ancestors || undefined\n\n /**\n * Original error cause of the message.\n *\n * @type {Error | undefined}\n */\n this.cause = options.cause || undefined\n\n /**\n * Starting column of message.\n *\n * @type {number | undefined}\n */\n this.column = start ? start.column : undefined\n\n /**\n * State of problem.\n *\n * * `true` — error, file not usable\n * * `false` — warning, change may be needed\n * * `undefined` — change likely not needed\n *\n * @type {boolean | null | undefined}\n */\n this.fatal = undefined\n\n /**\n * Path of a file (used throughout the `VFile` ecosystem).\n *\n * @type {string | undefined}\n */\n this.file = ''\n\n // Field from `Error`.\n /**\n * Reason for message.\n *\n * @type {string}\n */\n this.message = reason\n\n /**\n * Starting line of error.\n *\n * @type {number | undefined}\n */\n this.line = start ? start.line : undefined\n\n // Field from `Error`.\n /**\n * Serialized positional info of message.\n *\n * On normal errors, this would be something like `ParseError`, buit in\n * `VFile` messages we use this space to show where an error happened.\n */\n this.name = stringifyPosition(options.place) || '1:1'\n\n /**\n * Place of message.\n *\n * @type {Point | Position | undefined}\n */\n this.place = options.place || undefined\n\n /**\n * Reason for message, should use markdown.\n *\n * @type {string}\n */\n this.reason = this.message\n\n /**\n * Category of message (example: `'my-rule'`).\n *\n * @type {string | undefined}\n */\n this.ruleId = options.ruleId || undefined\n\n /**\n * Namespace of message (example: `'my-package'`).\n *\n * @type {string | undefined}\n */\n this.source = options.source || undefined\n\n // Field from `Error`.\n /**\n * Stack of message.\n *\n * This is used by normal errors to show where something happened in\n * programming code, irrelevant for `VFile` messages,\n *\n * @type {string}\n */\n this.stack =\n legacyCause && options.cause && typeof options.cause.stack === 'string'\n ? options.cause.stack\n : ''\n\n // The following fields are “well known”.\n // Not standard.\n // Feel free to add other non-standard fields to your messages.\n\n /**\n * Specify the source value that’s being reported, which is deemed\n * incorrect.\n *\n * @type {string | undefined}\n */\n this.actual = undefined\n\n /**\n * Suggest acceptable values that can be used instead of `actual`.\n *\n * @type {Array<string> | undefined}\n */\n this.expected = undefined\n\n /**\n * Long form description of the message (you should use markdown).\n *\n * @type {string | undefined}\n */\n this.note = undefined\n\n /**\n * Link to docs for the message.\n *\n * > 👉 **Note**: this must be an absolute URL that can be passed as `x`\n * > to `new URL(x)`.\n *\n * @type {string | undefined}\n */\n this.url = undefined\n }\n}\n\nVFileMessage.prototype.file = ''\nVFileMessage.prototype.name = ''\nVFileMessage.prototype.reason = ''\nVFileMessage.prototype.message = ''\nVFileMessage.prototype.stack = ''\nVFileMessage.prototype.column = undefined\nVFileMessage.prototype.line = undefined\nVFileMessage.prototype.ancestors = undefined\nVFileMessage.prototype.cause = undefined\nVFileMessage.prototype.fatal = undefined\nVFileMessage.prototype.place = undefined\nVFileMessage.prototype.ruleId = undefined\nVFileMessage.prototype.source = undefined\n",
|
|
10
|
-
"// A derivative work based on:\n// <https://github.com/browserify/path-browserify>.\n// Which is licensed:\n//\n// MIT License\n//\n// Copyright (c) 2013 James Halliday\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A derivative work based on:\n//\n// Parts of that are extracted from Node’s internal `path` module:\n// <https://github.com/nodejs/node/blob/master/lib/path.js>.\n// Which is licensed:\n//\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nexport const minpath = {basename, dirname, extname, join, sep: '/'}\n\n/* eslint-disable max-depth, complexity */\n\n/**\n * Get the basename from a path.\n *\n * @param {string} path\n * File path.\n * @param {string | null | undefined} [extname]\n * Extension to strip.\n * @returns {string}\n * Stem or basename.\n */\nfunction basename(path, extname) {\n if (extname !== undefined && typeof extname !== 'string') {\n throw new TypeError('\"ext\" argument must be a string')\n }\n\n assertPath(path)\n let start = 0\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let seenNonSlash\n\n if (\n extname === undefined ||\n extname.length === 0 ||\n extname.length > path.length\n ) {\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // path component.\n seenNonSlash = true\n end = index + 1\n }\n }\n\n return end < 0 ? '' : path.slice(start, end)\n }\n\n if (extname === path) {\n return ''\n }\n\n let firstNonSlashEnd = -1\n let extnameIndex = extname.length - 1\n\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else {\n if (firstNonSlashEnd < 0) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching.\n seenNonSlash = true\n firstNonSlashEnd = index + 1\n }\n\n if (extnameIndex > -1) {\n // Try to match the explicit extension.\n if (path.codePointAt(index) === extname.codePointAt(extnameIndex--)) {\n if (extnameIndex < 0) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = index\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extnameIndex = -1\n end = firstNonSlashEnd\n }\n }\n }\n }\n\n if (start === end) {\n end = firstNonSlashEnd\n } else if (end < 0) {\n end = path.length\n }\n\n return path.slice(start, end)\n}\n\n/**\n * Get the dirname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\nfunction dirname(path) {\n assertPath(path)\n\n if (path.length === 0) {\n return '.'\n }\n\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n // Prefix `--` is important to not run on `0`.\n while (--index) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n if (unmatchedSlash) {\n end = index\n break\n }\n } else if (!unmatchedSlash) {\n // We saw the first non-path separator\n unmatchedSlash = true\n }\n }\n\n return end < 0\n ? path.codePointAt(0) === 47 /* `/` */\n ? '/'\n : '.'\n : end === 1 && path.codePointAt(0) === 47 /* `/` */\n ? '//'\n : path.slice(0, end)\n}\n\n/**\n * Get an extname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * Extname.\n */\nfunction extname(path) {\n assertPath(path)\n\n let index = path.length\n\n let end = -1\n let startPart = 0\n let startDot = -1\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find.\n let preDotState = 0\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n while (index--) {\n const code = path.codePointAt(index)\n\n if (code === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (unmatchedSlash) {\n startPart = index + 1\n break\n }\n\n continue\n }\n\n if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // extension.\n unmatchedSlash = true\n end = index + 1\n }\n\n if (code === 46 /* `.` */) {\n // If this is our first dot, mark it as the start of our extension.\n if (startDot < 0) {\n startDot = index\n } else if (preDotState !== 1) {\n preDotState = 1\n }\n } else if (startDot > -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension.\n preDotState = -1\n }\n }\n\n if (\n startDot < 0 ||\n end < 0 ||\n // We saw a non-dot character immediately before the dot.\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly `..`.\n (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n ) {\n return ''\n }\n\n return path.slice(startDot, end)\n}\n\n/**\n * Join segments from a path.\n *\n * @param {Array<string>} segments\n * Path segments.\n * @returns {string}\n * File path.\n */\nfunction join(...segments) {\n let index = -1\n /** @type {string | undefined} */\n let joined\n\n while (++index < segments.length) {\n assertPath(segments[index])\n\n if (segments[index]) {\n joined =\n joined === undefined ? segments[index] : joined + '/' + segments[index]\n }\n }\n\n return joined === undefined ? '.' : normalize(joined)\n}\n\n/**\n * Normalize a basic file path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\n// Note: `normalize` is not exposed as `path.normalize`, so some code is\n// manually removed from it.\nfunction normalize(path) {\n assertPath(path)\n\n const absolute = path.codePointAt(0) === 47 /* `/` */\n\n // Normalize the path according to POSIX rules.\n let value = normalizeString(path, !absolute)\n\n if (value.length === 0 && !absolute) {\n value = '.'\n }\n\n if (value.length > 0 && path.codePointAt(path.length - 1) === 47 /* / */) {\n value += '/'\n }\n\n return absolute ? '/' + value : value\n}\n\n/**\n * Resolve `.` and `..` elements in a path with directory names.\n *\n * @param {string} path\n * File path.\n * @param {boolean} allowAboveRoot\n * Whether `..` can move above root.\n * @returns {string}\n * File path.\n */\nfunction normalizeString(path, allowAboveRoot) {\n let result = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let index = -1\n /** @type {number | undefined} */\n let code\n /** @type {number} */\n let lastSlashIndex\n\n while (++index <= path.length) {\n if (index < path.length) {\n code = path.codePointAt(index)\n } else if (code === 47 /* `/` */) {\n break\n } else {\n code = 47 /* `/` */\n }\n\n if (code === 47 /* `/` */) {\n if (lastSlash === index - 1 || dots === 1) {\n // Empty.\n } else if (lastSlash !== index - 1 && dots === 2) {\n if (\n result.length < 2 ||\n lastSegmentLength !== 2 ||\n result.codePointAt(result.length - 1) !== 46 /* `.` */ ||\n result.codePointAt(result.length - 2) !== 46 /* `.` */\n ) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf('/')\n\n if (lastSlashIndex !== result.length - 1) {\n if (lastSlashIndex < 0) {\n result = ''\n lastSegmentLength = 0\n } else {\n result = result.slice(0, lastSlashIndex)\n lastSegmentLength = result.length - 1 - result.lastIndexOf('/')\n }\n\n lastSlash = index\n dots = 0\n continue\n }\n } else if (result.length > 0) {\n result = ''\n lastSegmentLength = 0\n lastSlash = index\n dots = 0\n continue\n }\n }\n\n if (allowAboveRoot) {\n result = result.length > 0 ? result + '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (result.length > 0) {\n result += '/' + path.slice(lastSlash + 1, index)\n } else {\n result = path.slice(lastSlash + 1, index)\n }\n\n lastSegmentLength = index - lastSlash - 1\n }\n\n lastSlash = index\n dots = 0\n } else if (code === 46 /* `.` */ && dots > -1) {\n dots++\n } else {\n dots = -1\n }\n }\n\n return result\n}\n\n/**\n * Make sure `path` is a string.\n *\n * @param {string} path\n * File path.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError(\n 'Path must be a string. Received ' + JSON.stringify(path)\n )\n }\n}\n\n/* eslint-enable max-depth, complexity */\n",
|
|
11
|
-
"// Somewhat based on:\n// <https://github.com/defunctzombie/node-process/blob/master/browser.js>.\n// But I don’t think one tiny line of code can be copyrighted. 😅\nexport const minproc = {cwd}\n\nfunction cwd() {\n return '/'\n}\n",
|
|
12
|
-
"/**\n * Checks if a value has the shape of a WHATWG URL object.\n *\n * Using a symbol or instanceof would not be able to recognize URL objects\n * coming from other implementations (e.g. in Electron), so instead we are\n * checking some well known properties for a lack of a better test.\n *\n * We use `href` and `protocol` as they are the only properties that are\n * easy to retrieve and calculate due to the lazy nature of the getters.\n *\n * We check for auth attribute to distinguish legacy url instance with\n * WHATWG URL instance.\n *\n * @param {unknown} fileUrlOrPath\n * File path or URL.\n * @returns {fileUrlOrPath is URL}\n * Whether it’s a URL.\n */\n// From: <https://github.com/nodejs/node/blob/6a3403c/lib/internal/url.js#L720>\nexport function isUrl(fileUrlOrPath) {\n return Boolean(\n fileUrlOrPath !== null &&\n typeof fileUrlOrPath === 'object' &&\n 'href' in fileUrlOrPath &&\n fileUrlOrPath.href &&\n 'protocol' in fileUrlOrPath &&\n fileUrlOrPath.protocol &&\n // @ts-expect-error: indexing is fine.\n fileUrlOrPath.auth === undefined\n )\n}\n",
|
|
13
|
-
"import {isUrl} from './minurl.shared.js'\n\nexport {isUrl} from './minurl.shared.js'\n\n// See: <https://github.com/nodejs/node/blob/6a3403c/lib/internal/url.js>\n\n/**\n * @param {URL | string} path\n * File URL.\n * @returns {string}\n * File URL.\n */\nexport function urlToPath(path) {\n if (typeof path === 'string') {\n path = new URL(path)\n } else if (!isUrl(path)) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'The \"path\" argument must be of type string or an instance of URL. Received `' +\n path +\n '`'\n )\n error.code = 'ERR_INVALID_ARG_TYPE'\n throw error\n }\n\n if (path.protocol !== 'file:') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError('The URL must be of scheme file')\n error.code = 'ERR_INVALID_URL_SCHEME'\n throw error\n }\n\n return getPathFromURLPosix(path)\n}\n\n/**\n * Get a path from a POSIX URL.\n *\n * @param {URL} url\n * URL.\n * @returns {string}\n * File path.\n */\nfunction getPathFromURLPosix(url) {\n if (url.hostname !== '') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL host must be \"localhost\" or empty on darwin'\n )\n error.code = 'ERR_INVALID_FILE_URL_HOST'\n throw error\n }\n\n const pathname = url.pathname\n let index = -1\n\n while (++index < pathname.length) {\n if (\n pathname.codePointAt(index) === 37 /* `%` */ &&\n pathname.codePointAt(index + 1) === 50 /* `2` */\n ) {\n const third = pathname.codePointAt(index + 2)\n if (third === 70 /* `F` */ || third === 102 /* `f` */) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL path must not include encoded / characters'\n )\n error.code = 'ERR_INVALID_FILE_URL_PATH'\n throw error\n }\n }\n }\n\n return decodeURIComponent(pathname)\n}\n",
|
|
14
|
-
"/**\n * @import {Node, Point, Position} from 'unist'\n * @import {Options as MessageOptions} from 'vfile-message'\n * @import {Compatible, Data, Map, Options, Value} from 'vfile'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n */\n\nimport {VFileMessage} from 'vfile-message'\nimport {minpath} from '#minpath'\nimport {minproc} from '#minproc'\nimport {urlToPath, isUrl} from '#minurl'\n\n/**\n * Order of setting (least specific to most), we need this because otherwise\n * `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a\n * stem can be set.\n */\nconst order = /** @type {const} */ ([\n 'history',\n 'path',\n 'basename',\n 'stem',\n 'extname',\n 'dirname'\n])\n\nexport class VFile {\n /**\n * Create a new virtual file.\n *\n * `options` is treated as:\n *\n * * `string` or `Uint8Array` — `{value: options}`\n * * `URL` — `{path: options}`\n * * `VFile` — shallow copies its data over to the new file\n * * `object` — all fields are shallow copied over to the new file\n *\n * Path related fields are set in the following order (least specific to\n * most specific): `history`, `path`, `basename`, `stem`, `extname`,\n * `dirname`.\n *\n * You cannot set `dirname` or `extname` without setting either `history`,\n * `path`, `basename`, or `stem` too.\n *\n * @param {Compatible | null | undefined} [value]\n * File value.\n * @returns\n * New instance.\n */\n constructor(value) {\n /** @type {Options | VFile} */\n let options\n\n if (!value) {\n options = {}\n } else if (isUrl(value)) {\n options = {path: value}\n } else if (typeof value === 'string' || isUint8Array(value)) {\n options = {value}\n } else {\n options = value\n }\n\n /* eslint-disable no-unused-expressions */\n\n /**\n * Base of `path` (default: `process.cwd()` or `'/'` in browsers).\n *\n * @type {string}\n */\n // Prevent calling `cwd` (which could be expensive) if it’s not needed;\n // the empty string will be overridden in the next block.\n this.cwd = 'cwd' in options ? '' : minproc.cwd()\n\n /**\n * Place to store custom info (default: `{}`).\n *\n * It’s OK to store custom data directly on the file but moving it to\n * `data` is recommended.\n *\n * @type {Data}\n */\n this.data = {}\n\n /**\n * List of file paths the file moved between.\n *\n * The first is the original path and the last is the current path.\n *\n * @type {Array<string>}\n */\n this.history = []\n\n /**\n * List of messages associated with the file.\n *\n * @type {Array<VFileMessage>}\n */\n this.messages = []\n\n /**\n * Raw value.\n *\n * @type {Value}\n */\n this.value\n\n // The below are non-standard, they are “well-known”.\n // As in, used in several tools.\n /**\n * Source map.\n *\n * This type is equivalent to the `RawSourceMap` type from the `source-map`\n * module.\n *\n * @type {Map | null | undefined}\n */\n this.map\n\n /**\n * Custom, non-string, compiled, representation.\n *\n * This is used by unified to store non-string results.\n * One example is when turning markdown into React nodes.\n *\n * @type {unknown}\n */\n this.result\n\n /**\n * Whether a file was saved to disk.\n *\n * This is used by vfile reporters.\n *\n * @type {boolean}\n */\n this.stored\n /* eslint-enable no-unused-expressions */\n\n // Set path related properties in the correct order.\n let index = -1\n\n while (++index < order.length) {\n const field = order[index]\n\n // Note: we specifically use `in` instead of `hasOwnProperty` to accept\n // `vfile`s too.\n if (\n field in options &&\n options[field] !== undefined &&\n options[field] !== null\n ) {\n // @ts-expect-error: TS doesn’t understand basic reality.\n this[field] = field === 'history' ? [...options[field]] : options[field]\n }\n }\n\n /** @type {string} */\n let field\n\n // Set non-path related properties.\n for (field in options) {\n // @ts-expect-error: fine to set other things.\n if (!order.includes(field)) {\n // @ts-expect-error: fine to set other things.\n this[field] = options[field]\n }\n }\n }\n\n /**\n * Get the basename (including extname) (example: `'index.min.js'`).\n *\n * @returns {string | undefined}\n * Basename.\n */\n get basename() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path)\n : undefined\n }\n\n /**\n * Set basename (including extname) (`'index.min.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} basename\n * Basename.\n * @returns {undefined}\n * Nothing.\n */\n set basename(basename) {\n assertNonEmpty(basename, 'basename')\n assertPart(basename, 'basename')\n this.path = minpath.join(this.dirname || '', basename)\n }\n\n /**\n * Get the parent path (example: `'~'`).\n *\n * @returns {string | undefined}\n * Dirname.\n */\n get dirname() {\n return typeof this.path === 'string'\n ? minpath.dirname(this.path)\n : undefined\n }\n\n /**\n * Set the parent path (example: `'~'`).\n *\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} dirname\n * Dirname.\n * @returns {undefined}\n * Nothing.\n */\n set dirname(dirname) {\n assertPath(this.basename, 'dirname')\n this.path = minpath.join(dirname || '', this.basename)\n }\n\n /**\n * Get the extname (including dot) (example: `'.js'`).\n *\n * @returns {string | undefined}\n * Extname.\n */\n get extname() {\n return typeof this.path === 'string'\n ? minpath.extname(this.path)\n : undefined\n }\n\n /**\n * Set the extname (including dot) (example: `'.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} extname\n * Extname.\n * @returns {undefined}\n * Nothing.\n */\n set extname(extname) {\n assertPart(extname, 'extname')\n assertPath(this.dirname, 'extname')\n\n if (extname) {\n if (extname.codePointAt(0) !== 46 /* `.` */) {\n throw new Error('`extname` must start with `.`')\n }\n\n if (extname.includes('.', 1)) {\n throw new Error('`extname` cannot contain multiple dots')\n }\n }\n\n this.path = minpath.join(this.dirname, this.stem + (extname || ''))\n }\n\n /**\n * Get the full path (example: `'~/index.min.js'`).\n *\n * @returns {string}\n * Path.\n */\n get path() {\n return this.history[this.history.length - 1]\n }\n\n /**\n * Set the full path (example: `'~/index.min.js'`).\n *\n * Cannot be nullified.\n * You can set a file URL (a `URL` object with a `file:` protocol) which will\n * be turned into a path with `url.fileURLToPath`.\n *\n * @param {URL | string} path\n * Path.\n * @returns {undefined}\n * Nothing.\n */\n set path(path) {\n if (isUrl(path)) {\n path = urlToPath(path)\n }\n\n assertNonEmpty(path, 'path')\n\n if (this.path !== path) {\n this.history.push(path)\n }\n }\n\n /**\n * Get the stem (basename w/o extname) (example: `'index.min'`).\n *\n * @returns {string | undefined}\n * Stem.\n */\n get stem() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path, this.extname)\n : undefined\n }\n\n /**\n * Set the stem (basename w/o extname) (example: `'index.min'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} stem\n * Stem.\n * @returns {undefined}\n * Nothing.\n */\n set stem(stem) {\n assertNonEmpty(stem, 'stem')\n assertPart(stem, 'stem')\n this.path = minpath.join(this.dirname || '', stem + (this.extname || ''))\n }\n\n // Normal prototypal methods.\n /**\n * Create a fatal message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `true` (error; file not usable)\n * and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {never}\n * Never.\n * @throws {VFileMessage}\n * Message.\n */\n fail(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = true\n\n throw message\n }\n\n /**\n * Create an info message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `undefined` (info; change\n * likely not needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n info(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = undefined\n\n return message\n }\n\n /**\n * Create a message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `false` (warning; change may be\n * needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n message(causeOrReason, optionsOrParentOrPlace, origin) {\n const message = new VFileMessage(\n // @ts-expect-error: the overloads are fine.\n causeOrReason,\n optionsOrParentOrPlace,\n origin\n )\n\n if (this.path) {\n message.name = this.path + ':' + message.name\n message.file = this.path\n }\n\n message.fatal = false\n\n this.messages.push(message)\n\n return message\n }\n\n /**\n * Serialize the file.\n *\n * > **Note**: which encodings are supported depends on the engine.\n * > For info on Node.js, see:\n * > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.\n *\n * @param {string | null | undefined} [encoding='utf8']\n * Character encoding to understand `value` as when it’s a `Uint8Array`\n * (default: `'utf-8'`).\n * @returns {string}\n * Serialized file.\n */\n toString(encoding) {\n if (this.value === undefined) {\n return ''\n }\n\n if (typeof this.value === 'string') {\n return this.value\n }\n\n const decoder = new TextDecoder(encoding || undefined)\n return decoder.decode(this.value)\n }\n}\n\n/**\n * Assert that `part` is not a path (as in, does not contain `path.sep`).\n *\n * @param {string | null | undefined} part\n * File path part.\n * @param {string} name\n * Part name.\n * @returns {undefined}\n * Nothing.\n */\nfunction assertPart(part, name) {\n if (part && part.includes(minpath.sep)) {\n throw new Error(\n '`' + name + '` cannot be a path: did not expect `' + minpath.sep + '`'\n )\n }\n}\n\n/**\n * Assert that `part` is not empty.\n *\n * @param {string | undefined} part\n * Thing.\n * @param {string} name\n * Part name.\n * @returns {asserts part is string}\n * Nothing.\n */\nfunction assertNonEmpty(part, name) {\n if (!part) {\n throw new Error('`' + name + '` cannot be empty')\n }\n}\n\n/**\n * Assert `path` exists.\n *\n * @param {string | undefined} path\n * Path.\n * @param {string} name\n * Dependency name.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path, name) {\n if (!path) {\n throw new Error('Setting `' + name + '` requires `path` to be set too')\n }\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n",
|
|
15
|
-
"/**\n * @typedef Options\n * Configuration for `stringify`.\n * @property {boolean} [padLeft=true]\n * Whether to pad a space before a token.\n * @property {boolean} [padRight=false]\n * Whether to pad a space after a token.\n */\n\n/**\n * @typedef {Options} StringifyOptions\n * Please use `StringifyOptions` instead.\n */\n\n/**\n * Parse comma-separated tokens to an array.\n *\n * @param {string} value\n * Comma-separated tokens.\n * @returns {Array<string>}\n * List of tokens.\n */\nexport function parse(value) {\n /** @type {Array<string>} */\n const tokens = []\n const input = String(value || '')\n let index = input.indexOf(',')\n let start = 0\n /** @type {boolean} */\n let end = false\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n const token = input.slice(start, index).trim()\n\n if (token || !end) {\n tokens.push(token)\n }\n\n start = index + 1\n index = input.indexOf(',', start)\n }\n\n return tokens\n}\n\n/**\n * Serialize an array of strings or numbers to comma-separated tokens.\n *\n * @param {Array<string|number>} values\n * List of tokens.\n * @param {Options} [options]\n * Configuration for `stringify` (optional).\n * @returns {string}\n * Comma-separated tokens.\n */\nexport function stringify(values, options) {\n const settings = options || {}\n\n // Ensure the last empty entry is seen.\n const input = values[values.length - 1] === '' ? [...values, ''] : values\n\n return input\n .join(\n (settings.padRight ? ' ' : '') +\n ',' +\n (settings.padLeft === false ? '' : ' ')\n )\n .trim()\n}\n",
|
|
16
|
-
"/**\n * Parse space-separated tokens to an array of strings.\n *\n * @param {string} value\n * Space-separated tokens.\n * @returns {Array<string>}\n * List of tokens.\n */\nexport function parse(value) {\n const input = String(value || '').trim()\n return input ? input.split(/[ \\t\\n\\r\\f]+/g) : []\n}\n\n/**\n * Serialize an array of strings as space separated-tokens.\n *\n * @param {Array<string|number>} values\n * List of tokens.\n * @returns {string}\n * Space-separated tokens.\n */\nexport function stringify(values) {\n return values.join(' ').trim()\n}\n"
|
|
17
|
-
],
|
|
18
|
-
"mappings": ";AAUO,SAAS,YAAY,CAAC,MAA6B,QAAkB,CAAC,GAAG;AAAA,EAC9E,IAAI,MAAM,YAAY,QAAQ;AAAA,IAC5B,MAAM,OAAO,KAAK,YAAY;AAAA,IAC9B,MAAM,KAAK,OAAO,SAAS,WAAW,KAAK,KAAK,IAAI,EAAE;AAAA,EACxD;AAAA,EACA,IAAI,MAAM,QAAQ,MAAM,QAAQ,GAAG;AAAA,IACjC,WAAW,KAAK,KAAK,UAAU;AAAA,MAC7B,aAAa,OAAO,MAAM,WAAW,YAAY,GAAG,KAAK;AAAA,IAC3D;AAAA,EACF;AAAA,EACA,OAAO;AAAA;AAQF,SAAS,sBAAsB,CAAC,KAAmC;AAAA,EACxE,MAAM,QAAQ,aAAa,GAAG;AAAA,EAC9B,MAAM,UAAU,MAAM,OAAO,CAAC,MAAM,MAAM,EAAE,EAAE;AAAA,EAC9C,IAAI,UAAU,GAAG;AAAA,IACf,OAAO,iBAAiB;AAAA,EAC1B;AAAA,EACA,MAAM,OAAO,IAAI;AAAA,EACjB,WAAW,KAAK,OAAO;AAAA,IACrB,IAAI,KAAK,KAAK,IAAI,CAAC,GAAG;AAAA,MACpB,OAAO,wBAAwB;AAAA,IACjC;AAAA,IACA,KAAK,IAAI,CAAC;AAAA,EACZ;AAAA,EACA,OAAO;AAAA;;;ACnCT,IAAM,KAAK;AAaJ,SAAS,UAAU,CAAC,OAAO;AAAA,EAChC,OAAO,OAAO,UAAU,WACpB,MAAM,SAAS,SACb,MAAM,MAAM,KAAK,IACjB,QACF,MAAM,KAAK;AAAA;AAOjB,SAAS,KAAK,CAAC,OAAO;AAAA,EACpB,OAAO,MAAM,QAAQ,IAAI,EAAE,MAAM;AAAA;;AC3BnC,IAAM,cAAc,IAAI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src/utils/strip-events.ts", "../src/store.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/**\n * Type predicate guards for the Jx document model.\n *\n * These narrow `unknown`/union-typed values to precise domain types so call sites get real property\n * checking instead of casts. Every guard mirrors the runtime's actual detection logic (see\n * buildScope's five-shape algorithm in the runtime).\n */\n\nimport type {\n JsonObject,\n JsonValue,\n JxClassDef,\n JxElement,\n JxEventBinding,\n JxExpressionDef,\n JxFunctionDef,\n JxMappedArray,\n JxMutableNode,\n JxPrototypeDef,\n JxRef,\n JxServerFnDef,\n JxStateObject,\n JxStatement,\n JxStyle,\n JxTagExpression,\n} from \"../types\";\n\n// ─── JSON shape guards ──────────────────────────────────────────────────────────\n\n/** A plain object: not null, not an array. The base check for all object-shaped defs. */\nexport function isJsonObject(value: unknown): value is JsonObject {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n// ─── Binding guards ─────────────────────────────────────────────────────────────\n\n/** A `{ $ref: \"#/...\" }` JSON Pointer reference. */\nexport function isRef(value: unknown): value is JxRef {\n return isJsonObject(value) && typeof value.$ref === \"string\";\n}\n\n// ─── State definition guards (the five-shape algorithm) ────────────────────────\n\n/** Shape 4: a function declaration — `{ $prototype: \"Function\", body | $src }`. */\nexport function isFunctionDef(value: unknown): value is JxFunctionDef {\n return isJsonObject(value) && value.$prototype === \"Function\";\n}\n\n/** Shape 5: a declarative expression entry — `{ $expression: { operator, target } }`. */\nexport function isExpressionDef(value: unknown): value is JxExpressionDef {\n return isJsonObject(value) && isJsonObject(value.$expression);\n}\n\n/**\n * Shape 5 with `parameters`: a named formula — a pure, reusable computation invoked via the `call`\n * operator rather than lowered to a computed value.\n */\nexport function isNamedFormulaDef(\n value: unknown,\n): value is JxExpressionDef & { parameters: unknown[] } {\n return isExpressionDef(value) && Array.isArray(value.parameters) && value.parameters.length > 0;\n}\n\n/**\n * Shape 4 with a structured body: a Function entry whose `body` is a statement array (spec §20)\n * rather than opaque JS source.\n */\nexport function hasStructuredBody(\n value: unknown,\n): value is JxFunctionDef & { body: JxStatement[] } {\n return isFunctionDef(value) && Array.isArray(value.body);\n}\n\n/** A non-Function `$prototype` instance (Request, Storage, ContentCollection, classes, …). */\nexport function isPrototypeDef(value: unknown): value is JxPrototypeDef {\n return (\n isJsonObject(value) && typeof value.$prototype === \"string\" && value.$prototype !== \"Function\"\n );\n}\n\n/** A `timing: \"server\"` function proxy (no `$prototype`, external `$src`/`$export`). */\nexport function isServerFnDef(value: unknown): value is JxServerFnDef {\n return (\n isJsonObject(value) &&\n value.timing === \"server\" &&\n typeof value.$src === \"string\" &&\n typeof value.$export === \"string\" &&\n !value.$prototype\n );\n}\n\n/** Shape 2: an expanded signal — an object carrying a `default` value. */\nexport function isExpandedSignal(value: unknown): value is JxStateObject & { default: JsonValue } {\n return isJsonObject(value) && !value.$prototype && !value.$expression && \"default\" in value;\n}\n\n/**\n * Schema-only keywords used to detect pure type definitions (Shape 2b). An object with ONLY these\n * keys and no `default` is a type def, not a signal.\n */\nexport const SCHEMA_KEYWORDS: ReadonlySet<string> = new Set([\n \"type\",\n \"enum\",\n \"minimum\",\n \"maximum\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n \"items\",\n \"properties\",\n \"required\",\n \"description\",\n \"title\",\n \"$comment\",\n]);\n\n/** Shape 2b: a pure type definition — every key is a JSON Schema keyword. */\nexport function isSchemaOnlyDef(value: unknown): value is JxStateObject {\n if (!isJsonObject(value)) {\n return false;\n }\n for (const k of Object.keys(value)) {\n if (!SCHEMA_KEYWORDS.has(k)) {\n return false;\n }\n }\n return true;\n}\n\n/** True when an object carries at least one JSON Schema keyword. */\nexport function hasSchemaKeywords(value: unknown): value is JxStateObject {\n if (!isJsonObject(value)) {\n return false;\n }\n for (const k of Object.keys(value)) {\n if (SCHEMA_KEYWORDS.has(k)) {\n return true;\n }\n }\n return false;\n}\n\n// ─── Document structure guards ──────────────────────────────────────────────────\n\n/** A mapped (repeater) children object — `{ $prototype: \"Array\", items, map }`. */\nexport function isMappedArray(value: unknown): value is JxMappedArray {\n return isJsonObject(value) && value.$prototype === \"Array\";\n}\n\n/**\n * Whether a node's `children` holds at least one mapped array — either as the bare whole-children\n * slot (legacy) or as a member of the children array. Used by renderers and the compiler to decide\n * if a children list needs inline repeater expansion.\n */\nexport function childrenContainArray(children?: unknown): boolean {\n if (isMappedArray(children)) {\n return true;\n }\n return Array.isArray(children) && children.some((c) => isMappedArray(c));\n}\n\n/** A .class.json schema-defined class document — `{ $prototype: \"Class\" }`. */\nexport function isClassDef(value: unknown): value is JxClassDef {\n return isJsonObject(value) && value.$prototype === \"Class\";\n}\n\n/** An element-shaped node object (vs. a bare string/number child). */\nexport function isNodeObject(value: unknown): value is JxMutableNode & JxElement {\n return isJsonObject(value);\n}\n\n/** A `${...}` template-expression string. */\nexport function isTemplateString(value?: unknown): value is string {\n return typeof value === \"string\" && value.includes(\"${\");\n}\n\n/**\n * Whether a function `body` returns a value — the heuristic that classifies a `$prototype:\n * \"Function\"` as a computed value vs an event handler. Uses a word boundary so identifiers like\n * `returned` do not match. Shared by the runtime interpreter and the compiler so both agree on the\n * classification.\n *\n * A bare `return;` does not count. It is an early-exit guard, which is handler code — reading it as\n * a value return turned any handler with a guard clause into a `computed()`, so the binding that\n * invoked it found a value where it expected a function. The value has to follow on the same line,\n * because a newline after `return` is an ASI bare return.\n */\nexport function bodyReturnsValue(body: string): boolean {\n return /\\breturn\\b[^\\S\\n]*(?![;}\\s]|$)/.test(body);\n}\n\n// ─── Style guards & accessors ───────────────────────────────────────────────────\n\n/** A nested style object (selector/media block), as opposed to a scalar CSS value. */\nexport function isNestedStyle(value: string | number | JxStyle | undefined): value is JxStyle {\n return typeof value === \"object\" && value !== null;\n}\n\n/** Read a nested style block (`:hover`, `@--md`, `& > li`, …), if present. */\nexport function getNestedStyle(style: JxStyle | undefined, key: string): JxStyle | undefined {\n const value = style?.[key];\n return isNestedStyle(value) ? value : undefined;\n}\n\n/** Read a nested style block, creating an empty one in place when absent or scalar. */\nexport function ensureNestedStyle(style: JxStyle, key: string): JxStyle {\n const existing = style[key];\n if (isNestedStyle(existing)) {\n return existing;\n }\n const created: JxStyle = {};\n style[key] = created;\n return created;\n}\n\n// ─── Event binding guards ───────────────────────────────────────────────────────\n\n/**\n * The value of an `on*` document key: a `$ref`, an inline function declaration, or a declarative\n * expression.\n */\nexport function isEventBinding(value: unknown): value is JxEventBinding {\n return isRef(value) || isFunctionDef(value) || isExpressionDef(value);\n}\n\n/** Read the event binding stored under an `on*` key of a node, if there is one. */\nexport function getEventBinding(\n node: JxMutableNode | JxElement,\n key: string,\n): JxEventBinding | undefined {\n const value = node[key];\n return isEventBinding(value) ? value : undefined;\n}\n\n// ─── Parameter helpers ──────────────────────────────────────────────────────────\n\n/** Resolve `parameters` entries (bare strings or CEM objects) to their names. */\nexport function paramNames(parameters: JxFunctionDef[\"parameters\"]): string[] {\n if (!parameters) {\n return [];\n }\n return parameters.map((p) => (typeof p === \"string\" ? p : p.name));\n}\n\n/** Whether an element's `tagName` is a choice rather than a name. */\nexport function isTagExpression(tagName: unknown): tagName is { $expression: JxTagExpression } {\n return isJsonObject(tagName) && isJsonObject(tagName.$expression);\n}\n\n/**\n * Every tag an element could be, without evaluating anything.\n *\n * ONE implementation, shared by the runtime, the three compiler targets and the studio, because\n * four surfaces each writing their own enumeration is four chances to disagree about what an\n * element can be — and disagreeing about that is how the `${…}` tagName shipped a page whose SSR\n * markup and client render used different elements.\n *\n * A plain name yields itself, so every caller can treat the two forms alike.\n */\nexport function tagNameCandidates(tagName: unknown): string[] {\n if (typeof tagName === \"string\") {\n return [tagName];\n }\n if (!isTagExpression(tagName)) {\n return [];\n }\n const expression = tagName.$expression;\n if (expression.operator === \"?:\") {\n return [...new Set([expression.value, expression.initial])];\n }\n return [...new Set([...Object.values(expression.cases), expression.default])];\n}\n\n/**\n * The tag to show a human when the element could be several.\n *\n * The Outline draws one row per node and needs a label that is stable, short and honest: `a|div`\n * says \"this is one element whose tag is chosen\" without pretending to know which. Rendering the\n * first candidate would have been a quieter lie.\n */\nexport function displayTagName(tagName: unknown): string {\n return typeof tagName === \"string\" ? tagName : tagNameCandidates(tagName).join(\"|\");\n}\n\n/**\n * Whether a `state` key is private (`spec.md` §5.6).\n *\n * A `#`-prefixed entry is ordinary state in every respect but one: it is not part of the\n * component's interface. It never reaches the studio property panel, never appears in an exported\n * CEM manifest, and is never settable through `$props` — which is the clause that needs a predicate\n * rather than a convention, because the props paths are spread across two tiers.\n *\n * The rule lived inline at three call sites before it lived here, spelled `key.startsWith(\"#\")`\n * each time. That is survivable for two and a drift risk at four, and the interesting direction of\n * drift is silent: a path that forgets the check does not fail, it just quietly makes a private\n * entry writable from outside.\n *\n * @param {string} key - A `state` key\n * @returns {boolean}\n */\nexport function isPrivateStateKey(key: string): boolean {\n return key.startsWith(\"#\");\n}\n",
|
|
6
|
-
"/**\n * Timing.ts — Studio's latency vocabulary.\n *\n * Every user-visible delay in Studio expresses one of a small number of intents: \"wait until the\n * user stops typing\", \"hold a message on screen long enough to read\", \"check the repo again\". Each\n * call site used to pick its own number for its intent, so the same intent shipped as 350, 400 and\n * 600 ms in three different panels and a retune meant a grep. Name the intent once here, import the\n * name, and the retune is a single edit.\n *\n * All values are milliseconds. The two input debounces are contractual:\n * `specs/studio-ui-guidelines.md` §4.4 fixes 400 ms for text inputs and 500 ms for code/expression\n * textareas. Do not change either without releasing that spec section.\n */\n\n/**\n * Text/style input debounce — the §4.4 standard. Long enough that a normal typing cadence produces\n * one commit per pause rather than one per keystroke, short enough that the canvas still feels\n * live.\n */\nexport const INPUT_DEBOUNCE = 400;\n\n/**\n * Code and expression textareas — the §4.4 standard. Longer than {@link INPUT_DEBOUNCE} because\n * each commit re-parses source (or re-lints), and because half-typed code is usually invalid, so\n * committing eagerly just burns work on states the user is about to leave.\n */\nexport const CODE_DEBOUNCE = 500;\n\n/**\n * Draft-layer live preview (ui/field-input.ts) — how long after a keystroke the in-progress draft\n * is pushed to the document so the canvas updates while the field stays focused. Deliberately below\n * {@link INPUT_DEBOUNCE}: this commit is provisional (the draft survives it, and blur/Enter commits\n * again), so it can afford to fire sooner than a committing input.\n */\nexport const LIVE_PREVIEW = 350;\n\n/*\n * `STATUS_MESSAGE = 3000` used to live here: how long a transient message stayed in the status bar\n * before it erased itself. It had one reader, `statusMessage`, which is deleted — the bar carries\n * ambient state now and outcomes go to `services/notify.ts`, whose `TOAST_LIFETIME_MS` is per\n * SEVERITY (§7.1 caps the band at 4–8s) rather than one number for a failure and a save alike.\n */\n\n/**\n * Git status poll while the Git panel is open. Deliberately coarse: it exists to notice changes\n * made outside Studio, and each tick shells out to git, so a faster cadence buys little and costs\n * I/O.\n */\nexport const POLL_GIT = 30_000;\n",
|
|
7
|
-
"/**\n * Document paths, the tree walk over them, and the project record.\n *\n * A `JxPath` addresses one node from the document root: `[]` is the root itself, `[\"children\", 0]`\n * its first child, `[\"children\", 0, \"children\", 2]` that child's third. Every module that points at\n * a node — selection, hover, the layers tree, a patch — spells it this way, which is why the\n * comparison and ancestry predicates live here rather than beside any one of them.\n *\n * The editable document and its history belong to a TAB (`tabs/tab.ts`) and its session lives on\n * the workspace; nothing here holds mutable document state. The one exception is `projectState`,\n * which outlives every document because it describes the folder they all come from.\n */\n\nimport type { ProjectState } from \"./types\";\nimport { displayTagName, isRef } from \"@jxsuite/schema/guards\";\nimport type { JxMutableNode } from \"@jxsuite/schema/types\";\n\nexport type JxPath = (string | number)[];\n\n// ─── Path utilities ───────────────────────────────────────────────────────────\n\n/**\n * Walk the document tree and return the node at the given path.\n *\n * @param {JxMutableNode} doc\n * @param {JxPath} path\n * @returns {JxMutableNode}\n */\nexport function getNodeAtPath(doc: JxMutableNode, path: JxPath) {\n let node = doc;\n for (const key of path) {\n if (node == null) {\n return undefined as unknown as JxMutableNode;\n }\n // Paths address nodes by construction; non-node leaves surface as undefined above.\n node = node[key] as JxMutableNode;\n }\n return node;\n}\n\n/**\n * The node's children when they are a static array (the edit-mode invariant); an empty array for\n * mapped-array or absent children.\n *\n * @param {JxMutableNode | null | undefined} node\n * @returns {(JxMutableNode | string)[]}\n */\nexport function childList(node: JxMutableNode | null | undefined): (JxMutableNode | string)[] {\n return Array.isArray(node?.children) ? node.children : [];\n}\n\n/**\n * Normalize a document in place to the canonical array-member form: a legacy whole-children\n * repeater (`children: { $prototype: \"Array\", … }`) becomes a single member of a children array\n * (`children: [{ $prototype: \"Array\", … }]`). Recurses through children, repeater templates, and\n * `$switch` cases. Runs once when a document is loaded into a tab so every in-studio doc — and its\n * history checkpoints — uses the member form before any mutation.\n *\n * @param {unknown} node\n * @returns {unknown} The same node (mutated)\n */\nexport function normalizeArrayChildren(node: unknown): unknown {\n if (!node || typeof node !== \"object\") {\n return node;\n }\n if (Array.isArray(node)) {\n for (const child of node) {\n normalizeArrayChildren(child);\n }\n return node;\n }\n const n = node as JxMutableNode;\n const { children } = n;\n if (\n children &&\n typeof children === \"object\" &&\n !Array.isArray(children) &&\n (children as JxMutableNode).$prototype === \"Array\"\n ) {\n n.children = [children as JxMutableNode];\n }\n if (Array.isArray(n.children)) {\n for (const child of n.children) {\n normalizeArrayChildren(child);\n }\n }\n if (n.$prototype === \"Array\" && n.map && typeof n.map === \"object\") {\n normalizeArrayChildren(n.map);\n }\n if (n.cases && typeof n.cases === \"object\") {\n for (const caseDef of Object.values(n.cases)) {\n normalizeArrayChildren(caseDef);\n }\n }\n return node;\n}\n\n/**\n * Return the path to the parent element (strips trailing 'children' + index).\n *\n * @param {JxPath} path\n * @returns {JxPath | null}\n */\nexport function parentElementPath(path: JxPath) {\n return path.length >= 2 ? path.slice(0, -2) : null;\n}\n\n/**\n * Return the child index (last segment of the path).\n *\n * @param {JxPath} path\n * @returns {string | number}\n */\nexport function childIndex(path: JxPath) {\n return path.at(-1);\n}\n\n/**\n * Serialize a path to a string key for Map lookups.\n *\n * @param {JxPath} path\n * @returns {string}\n */\nexport function pathKey(path: JxPath) {\n return path.join(\"/\");\n}\n\n/**\n * Compare two paths for equality.\n *\n * @param {JxPath | null} a\n * @param {JxPath | null} b\n * @returns {boolean}\n */\nexport function pathsEqual(a: JxPath | null, b: JxPath | null) {\n if (a === b) {\n return true;\n }\n if (!a || !b || a.length !== b.length) {\n return false;\n }\n return a.every((v, i) => v === b[i]);\n}\n\n/**\n * Returns true if `path` is an ancestor of (or equal to) `descendant`.\n *\n * @param {JxPath} path\n * @param {JxPath} descendant\n * @returns {boolean}\n */\nexport function isAncestor(path: JxPath, descendant: JxPath) {\n if (path.length > descendant.length) {\n return false;\n }\n return path.every((v, i) => v === descendant[i]);\n}\n\n// ─── Tree flattening (for layer panel) ────────────────────────────────────────\n\n/**\n * Flatten a Jx document into an array of { node, path, depth, nodeType } rows. Walks static\n * children arrays, $map templates, and $switch cases.\n *\n * NodeType: 'element' (default) | 'map' | 'case' | 'case-ref'\n *\n * @param {JxMutableNode | string | number | boolean} doc\n * @param {JxPath} [path]\n * @param {number} [depth]\n * @returns {{\n * node: JxMutableNode | string | number | boolean;\n * path: JxPath;\n * depth: number;\n * nodeType: string;\n * }[]}\n */\nexport interface FlatRow {\n node: JxMutableNode | string | number | boolean;\n path: JxPath;\n depth: number;\n nodeType: string;\n}\n\nexport function flattenTree(\n doc: JxMutableNode | string | number | boolean,\n path: JxPath = [],\n depth = 0,\n): FlatRow[] {\n const rows: FlatRow[] = [];\n collectRows(doc, path, depth, rows, false);\n return rows;\n}\n\n/**\n * Pre-order walk that appends into `out`.\n *\n * Appending beats returning-and-spreading: `rows.push(...flattenTree(child))` copied every\n * descendant row once per ancestor level (O(n·depth) copies) and passed the whole subtree as\n * argument list, which throws `RangeError: too many arguments` on a large enough tree.\n *\n * `skipSelf` omits the node's own row and emits only its descendants — the `$switch` case branch\n * needs that, having already emitted a `case` row with its own nodeType.\n */\nfunction collectRows(\n doc: JxMutableNode | string | number | boolean,\n path: JxPath,\n depth: number,\n out: FlatRow[],\n skipSelf: boolean,\n): void {\n // Text node children: bare primitives get a \"text\" row\n if (typeof doc === \"string\" || typeof doc === \"number\" || typeof doc === \"boolean\") {\n if (!skipSelf) {\n out.push({ depth, node: doc, nodeType: \"text\", path });\n }\n return;\n }\n\n // Array pseudo-element (repeater): a first-class node at its own path. Emit the \"map\" row, then\n // Recurse into its single template at `[...path, \"map\"]`. This is reached both when the array is\n // A member of a children array (path `[…, \"children\", i]`) and the legacy whole-children form\n // (path `[…, \"children\"]`).\n if ((doc as JxMutableNode).$prototype === \"Array\") {\n if (!skipSelf) {\n out.push({ depth, node: doc, nodeType: \"map\", path });\n }\n const mapDef = (doc as JxMutableNode).map;\n if (mapDef && typeof mapDef === \"object\") {\n collectRows(mapDef as JxMutableNode, [...path, \"map\"], depth + 1, out, false);\n }\n return;\n }\n\n if (!skipSelf) {\n out.push({ depth, node: doc, nodeType: \"element\", path });\n }\n\n // Custom component instances without user-authored children are atomic in the layer tree\n if (doc.$props && displayTagName(doc.tagName).includes(\"-\") && !Array.isArray(doc.children)) {\n return;\n }\n\n const { children } = doc;\n\n if (Array.isArray(children)) {\n for (let i = 0; i < children.length; i++) {\n const childPath = [...path, \"children\", i];\n collectRows(children[i]!, childPath, depth + 1, out, false);\n }\n } else if (\n children &&\n typeof children === \"object\" &&\n (children as JxMutableNode).$prototype === \"Array\"\n ) {\n // Legacy whole-children repeater: the array occupies the children slot itself.\n collectRows(children as JxMutableNode, [...path, \"children\"], depth + 1, out, false);\n }\n\n // $switch — emit each case as a virtual child\n if (doc.$switch && doc.cases && typeof doc.cases === \"object\") {\n for (const [caseName, caseDef] of Object.entries(doc.cases)) {\n const casePath = [...path, \"cases\", caseName];\n if (caseDef && typeof caseDef === \"object\" && (caseDef as JxMutableNode).$ref) {\n out.push({\n depth: depth + 1,\n node: caseDef as JxMutableNode,\n nodeType: \"case-ref\",\n path: casePath,\n });\n } else if (caseDef && typeof caseDef === \"object\") {\n out.push({\n depth: depth + 1,\n node: caseDef as JxMutableNode,\n nodeType: \"case\",\n path: casePath,\n });\n // Recurse into case children — skipSelf, because the \"case\" row above already stands in for\n // The case node itself (with its own nodeType).\n collectRows(caseDef as JxMutableNode, casePath, depth + 2, out, true);\n }\n }\n }\n}\n\n/**\n * Get a display label for a node (for layers + overlays).\n *\n * @param {JxMutableNode | null} node\n * @returns {string}\n */\nexport function nodeLabel(node: JxMutableNode | null) {\n if (!node) {\n return \"?\";\n }\n // $map container (Repeater)\n if (node.$prototype === \"Array\") {\n const { items } = node;\n const ref = (isRef(items) ? items.$ref : undefined) || \"items\";\n return `Repeater → ${ref}`;\n }\n if (node.$title) {\n return node.$title;\n }\n if (node.$id) {\n return node.$id;\n }\n if (node.tagName === \"slot\") {\n const name = node.attributes?.name;\n return typeof name === \"string\" && name.trim() ? `slot: ${name.trim()}` : \"slot\";\n }\n /* `displayTagName`, because a tag may be CHOSEN rather than written: this label reached the\n Outline row, the Inspector's header and the jump bar, and a raw read rendered `[object Object]`\n in all three. `a|div` is the honest answer — one element, tag decided at creation. */\n const tag = displayTagName(node.tagName) || \"div\";\n const suffix = node.$switch ? \" ⇆\" : \"\";\n if (typeof node.textContent === \"string\" && node.textContent.length > 0) {\n return `${tag} — ${node.textContent.slice(0, 24)}${suffix}`;\n }\n return tag + suffix;\n}\n\n// ─── Project state (persists across document switches) ────────────────────────\n//\n// Shape: { root, name, projectRoot, isSiteProject, projectConfig,\n// Dirs: Map<string, DirEntry[]>, expanded: Set<string>,\n// SelectedPath: string|null, searchQuery: string }\n// DirEntry: { name, path, type: \"file\"|\"directory\", size, modified }\n\nexport let projectState: ProjectState | null = null;\n\n/** @param {ProjectState | null} ps */\nexport function setProjectState(ps: ProjectState | null) {\n projectState = ps;\n}\n\n/**\n * Return the current project state, asserting it is non-null. Only call when a project is known to\n * be loaded.\n *\n * @returns {ProjectState}\n */\nexport function requireProjectState() {\n return projectState as ProjectState;\n}\n",
|
|
8
|
-
"/**\n * Strip `on*` event-handler bindings from a Jx document tree (returns a shallow-rebuilt copy). Used\n * to neutralize handlers before edit/design rendering so the canvas never wires live behavior, and\n * to drop `timing: \"server\"` state entries the canvas can't run.\n *\n * Lives in its own dependency-light module (it pulls only the pure `@jxsuite/schema/guards`\n * predicate) so the slim canvas-iframe subtree renderer can import it without dragging in the\n * editor's reactive `store.ts`; `store.ts` re-exports it for the legacy in-realm patcher.\n */\n\nimport { isEventBinding } from \"@jxsuite/schema/guards\";\nimport type { JxMutableNode } from \"@jxsuite/schema/types\";\n\n/** Strip all `on*` event-handler properties (and server-timed state) from a document tree. */\nexport function stripEventHandlers(node: JxMutableNode): JxMutableNode {\n if (!node || typeof node !== \"object\") {\n return node;\n }\n if (Array.isArray(node)) {\n // Arrays of nodes round-trip element-wise; the array itself is not a node.\n return node.map((n: JxMutableNode) => stripEventHandlers(n)) as unknown as JxMutableNode;\n }\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(node)) {\n if (k.startsWith(\"on\") && isEventBinding(v)) {\n continue;\n }\n if (k === \"children\") {\n out.children = Array.isArray(v)\n ? v.map((c: JxMutableNode) => stripEventHandlers(c))\n : stripEventHandlers(v as JxMutableNode);\n } else if (k === \"cases\" && typeof v === \"object\") {\n const cases: Record<string, unknown> = {};\n for (const [ck, cv] of Object.entries(v as Record<string, unknown>)) {\n cases[ck] = stripEventHandlers(cv as JxMutableNode);\n }\n out.cases = cases;\n } else if (k === \"state\" && typeof v === \"object\" && v !== null) {\n const state: Record<string, unknown> = {};\n for (const [sk, sv] of Object.entries(v as Record<string, unknown>)) {\n if (sv && typeof sv === \"object\" && (sv as Record<string, unknown>).timing === \"server\") {\n continue;\n }\n state[sk] = sv;\n }\n out.state = state;\n } else if (k === \"style\" || k === \"attributes\" || k === \"$media\") {\n out[k] = v;\n } else {\n out[k] = v;\n }\n }\n return out;\n}\n",
|
|
9
|
-
"/// <reference lib=\"dom\" />\n/**\n * Store.js — Shared state hub for Jx Studio\n *\n * Every other studio module imports from this file for shared state, DOM refs, render\n * orchestration, and state.js re-exports. This prevents circular dependencies by keeping store.js\n * free of domain-specific imports.\n */\n\n// ─── Re-exports from state.js ────────────────────────────────────────────────\n\nimport { INPUT_DEBOUNCE } from \"./ui/timing\";\nimport type { JxPath } from \"./state\";\nimport type { Tab } from \"./tabs/tab\";\nimport type { JxMutableNode } from \"@jxsuite/schema/types\";\n\nexport {\n getNodeAtPath,\n childList,\n flattenTree,\n nodeLabel,\n pathKey,\n pathsEqual,\n parentElementPath,\n childIndex,\n isAncestor,\n projectState,\n setProjectState,\n requireProjectState,\n} from \"./state\";\n\n// ─── Shell element refs (populated by initShellRefs) ─────────────────────────\n\n/* There is no `canvasWrap` here, and there cannot be one.\n It was `#canvas-wrap`, the shell's single stage, imported by six modules and read at ~30 sites —\n each of which meant \"the pane I am acting on\" and got \"the pane that happens to be focused\". A\n stage belongs to a pane (`canvas/canvas-surface.ts`), a pane's cell is built by\n `panels/pane-grid.ts`, and every one of those readers now takes its surface. */\nexport let activityBar = null as unknown as HTMLElement;\nexport let leftPanel = null as unknown as HTMLElement;\nexport let rightPanel = null as unknown as HTMLElement;\nexport let toolbarEl = null as unknown as HTMLElement;\nexport let statusbarEl = null as unknown as HTMLElement;\n\nexport function initShellRefs() {\n activityBar = document.querySelector(\"#activity-bar\") as HTMLElement;\n leftPanel = document.querySelector(\"#left-panel\") as HTMLElement;\n rightPanel = document.querySelector(\"#right-panel\") as HTMLElement;\n toolbarEl = document.querySelector(\"#toolbar\") as HTMLElement;\n statusbarEl = document.querySelector(\"#statusbar\") as HTMLElement;\n}\n\n// ─── Shared constants ────────────────────────────────────────────────────────\n\n/** Void elements that cannot accept children */\nexport const VOID_ELEMENTS = new Set([\n \"area\",\n \"base\",\n \"br\",\n \"col\",\n \"embed\",\n \"hr\",\n \"img\",\n \"input\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\n\nexport const COMMON_SELECTORS = [\n \":hover\",\n \":focus\",\n \":active\",\n \":focus-within\",\n \":focus-visible\",\n \":disabled\",\n \":first-child\",\n \":last-child\",\n \"::before\",\n \"::after\",\n \"::placeholder\",\n];\n\n/** @param {string} k */\nexport function isNestedSelector(k: string) {\n return k.startsWith(\":\") || k.startsWith(\".\") || k.startsWith(\"&\") || k.startsWith(\"[\");\n}\n\n// ─── Shared utilities ────────────────────────────────────────────────────────\n\nconst _styleDebounceTimers = new Map<string, ReturnType<typeof setTimeout>>();\n\n/**\n * @param {string} prop\n * @param {number | undefined} ms Debounce delay; `undefined` takes the standard input debounce.\n * @param {(...args: unknown[]) => void} fn\n */\nexport function debouncedStyleCommit<A extends unknown[]>(\n prop: string,\n ms: number | undefined,\n fn: (...args: A) => void,\n) {\n const delay = ms ?? INPUT_DEBOUNCE;\n return (...args: A) => {\n clearTimeout(_styleDebounceTimers.get(prop));\n _styleDebounceTimers.set(\n prop,\n setTimeout(() => {\n _styleDebounceTimers.delete(prop);\n fn(...args);\n }, delay),\n );\n };\n}\n\n/** Cancel a pending debounced commit for the given prop key. */\nexport function cancelStyleDebounce(prop: string) {\n clearTimeout(_styleDebounceTimers.get(prop));\n _styleDebounceTimers.delete(prop);\n}\n\n// `stripEventHandlers` moved to ./utils/strip-events (dependency-light, shared with the iframe\n// Subtree renderer); re-exported here so existing `from \"../store\"` imports keep working.\nexport { stripEventHandlers } from \"./utils/strip-events\";\n\n// ─── Render orchestration ────────────────────────────────────────────────────\n\nconst _renderers = new Map<string, () => void>();\n\n/**\n * How many registered renderers are mid-paint right now.\n *\n * Condition 1 of the `probe.idle()` predicate (`services/idle.ts`, spec §13.5). A renderer is\n * declared `() => void`, but TypeScript happily assigns an `async` function to that type, so a\n * renderer that awaits keeps repainting long after `render()` returned. Counting the returned\n * thenable is what makes \"no queued lit render\" an answerable question instead of an assumption —\n * the alternative is a sleep, and a sleep cannot name what it is waiting for.\n */\nlet _rendersInFlight = 0;\n\n/** Renderers currently mid-paint — zero when the shell's DOM has caught up with its state. */\nexport function rendersInFlight(): number {\n return _rendersInFlight;\n}\n\n/** Run one renderer, counting it as in-flight until it returns (or its promise settles). */\nfunction runRenderer(name: string, fn: () => void) {\n _rendersInFlight += 1;\n const done = () => {\n _rendersInFlight -= 1;\n };\n let pending: PromiseLike<unknown> | null = null;\n try {\n const result = fn() as unknown;\n if (typeof (result as PromiseLike<unknown> | null)?.then === \"function\") {\n pending = result as PromiseLike<unknown>;\n }\n } catch (error) {\n console.error(`Renderer \"${name}\" failed:`, error);\n }\n if (!pending) {\n done();\n return;\n }\n pending.then(done, (error: unknown) => {\n console.error(`Renderer \"${name}\" failed:`, error);\n done();\n });\n}\n\n/**\n * Register a named renderer. Called at module import time by each module.\n *\n * @param {string} name\n * @param {() => void} fn\n */\nexport function registerRenderer(name: string, fn: () => void) {\n _renderers.set(name, fn);\n}\n\n/** Call all registered renderers (full repaint). */\nexport function render() {\n for (const [name, fn] of _renderers.entries()) {\n runRenderer(name, fn);\n }\n}\n\n/**\n * Call specific renderers by name.\n *\n * @param {...string} names\n */\nexport function renderOnly(...names: string[]) {\n for (const name of names) {\n const fn = _renderers.get(name);\n if (!fn) {\n continue;\n }\n runRenderer(name, fn);\n }\n}\n\n// ─── Session dispatch ──────────────────────────────────────────────────────\n\n/* **Every dispatcher below takes the tab it writes, and none of them can find one on its own.**\n All three used to open with `const tab = activeTab.value`, which made \"the document this\n control is about\" and \"the document the keyboard happens to be in\" the same expression — the\n defect that produced the Document Header card writing through focus, the zoom axis writing\n through focus, the debounced Monaco commit writing through focus, and the whole pane context\n bar writing through focus. Four instances, four audits, no gate: while the shell had one stage\n the two readings could not disagree, so nothing could observe the difference.\n\n `store.ts` is where they could not disagree, so `store.ts` is where the shape is fixed. There is\n no `activeTab` import in this file and no zero-argument variant of any of these: a caller that\n means the focused pane spells `activeTab.value` at its own call site, where a reviewer and\n `scripts/check-pane-singletons.ts` can both see it, and a caller drawn FOR a pane passes the tab\n it was drawn for. */\n\n/**\n * Dispatch a session-only state update (selection, hover, ui) into `tab`.\n *\n * @param {Tab | null} tab — the tab this update is about. `null` is a no-op.\n * @param {object} patch — partial session object, e.g. { ui: { zoom: 2 } }\n */\nexport function updateSession(\n tab: Tab | null,\n patch: {\n /** The whole selection SET — `[]` clears it. Widened with `session.selection` itself (§6.5). */\n selection?: JxPath[];\n hover?: JxPath | null;\n clipboard?: JxMutableNode | null;\n ui?: Record<string, unknown>;\n canvas?: Record<string, unknown>;\n },\n) {\n if (tab) {\n if (patch.selection !== undefined) {\n tab.session.selection = patch.selection;\n }\n if (patch.hover !== undefined) {\n tab.session.hover = patch.hover as JxPath | null;\n }\n if (patch.clipboard !== undefined) {\n tab.session.clipboard = patch.clipboard!;\n }\n if (patch.ui) {\n for (const [k, v] of Object.entries(patch.ui)) {\n (tab.session.ui as unknown as Record<string, unknown>)[k] = v;\n }\n }\n if (patch.canvas) {\n for (const [k, v] of Object.entries(patch.canvas)) {\n (tab.session.canvas as unknown as Record<string, unknown>)[k] = v;\n }\n }\n }\n}\n\n/**\n * Update a single UI field on `tab`.\n *\n * @param {Tab | null} tab — the tab this field belongs to. `null` is a no-op.\n * @param {string} field\n * @param {unknown} value\n */\nexport function updateUi(tab: Tab | null, field: string, value: unknown) {\n if (tab) {\n (tab.session.ui as unknown as Record<string, unknown>)[field] = value;\n }\n}\n\n/**\n * Update `tab`'s canvas async state (status, scope, error).\n *\n * @param {Tab | null} tab — the tab whose stage produced this state. `null` is a no-op.\n * @param {object} patch\n */\nexport function updateCanvas(tab: Tab | null, patch: Record<string, unknown>) {\n if (tab) {\n for (const [k, v] of Object.entries(patch)) {\n (tab.session.canvas as Record<string, unknown>)[k] = v;\n }\n }\n}\n"
|
|
10
|
-
],
|
|
11
|
-
"mappings": ";AA8BO,SAAS,YAAY,CAAC,OAAqC;AAAA,EAChE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAAA;AAMrE,SAAS,KAAK,CAAC,OAAgC;AAAA,EACpD,OAAO,aAAa,KAAK,KAAK,OAAO,MAAM,SAAS;AAAA;AAM/C,SAAS,aAAa,CAAC,OAAwC;AAAA,EACpE,OAAO,aAAa,KAAK,KAAK,MAAM,eAAe;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ACA,OAQA;AAAA,EACA,IAAI,KAAK;AAAA,IACP,IAAI,MAAM,cAAc,WAAW;AAAA,MACjC,IAAI,QAAQ,YAAY,MAAM;AAAA,IAChC;AAAA,IACA,IAAI,MAAM,UAAU,WAAW;AAAA,MAC7B,IAAI,QAAQ,QAAQ,MAAM;AAAA,IAC5B;AAAA,IACA,IAAI,MAAM,cAAc,WAAW;AAAA,MACjC,IAAI,QAAQ,YAAY,MAAM;AAAA,IAChC;AAAA,IACA,IAAI,MAAM,IAAI;AAAA,MACZ,YAAY,GAAG,MAAM,OAAO,QAAQ,MAAM,EAAE,GAAG;AAAA,QAC5C,IAAI,QAAQ,GAA0C,KAAK;AAAA,MAC9D;AAAA,IACF;AAAA,IACA,IAAI,MAAM,QAAQ;AAAA,MAChB,YAAY,GAAG,MAAM,OAAO,QAAQ,MAAM,MAAM,GAAG;AAAA,QAChD,IAAI,QAAQ,OAA8C,KAAK;AAAA,MAClE;AAAA,IACF;AAAA,EACF;AAAA;AAUK,SAAS,QAAQ,CAAC,KAAiB,OAAe,OAAgB;AAAA,EACvE,IAAI,KAAK;AAAA,IACN,IAAI,QAAQ,GAA0C,SAAS;AAAA,EAClE;AAAA;AASK,SAAS,YAAY,CAAC,KAAiB,OAAgC;AAAA,EAC5E,IAAI,KAAK;AAAA,IACP,YAAY,GAAG,MAAM,OAAO,QAAQ,KAAK,GAAG;AAAA,MACzC,IAAI,QAAQ,OAAmC,KAAK;AAAA,IACvD;AAAA,EACF;AAAA;",
|
|
12
|
-
"debugId": "147E616828B71FA964756E2164756E21",
|
|
13
|
-
"names": []
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../node_modules/lit-html/development/directives/if-defined.js", "../../../node_modules/lit-html/development/directives/style-map.js", "../../../node_modules/lit-html/development/directives/class-map.js"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { nothing } from '../lit-html.js';\n/**\n * For AttributeParts, sets the attribute if the value is defined and removes\n * the attribute if the value is undefined.\n *\n * For other part types, this directive is a no-op.\n */\nexport const ifDefined = (value) => value ?? nothing;\n//# sourceMappingURL=if-defined.js.map",
|
|
6
|
-
"/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { noChange } from '../lit-html.js';\nimport { directive, Directive, PartType, } from '../directive.js';\nconst important = 'important';\n// The leading space is important\nconst importantFlag = ' !' + important;\n// How many characters to remove from a value, as a negative number\nconst flagTrim = 0 - importantFlag.length;\nclass StyleMapDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'style' ||\n partInfo.strings?.length > 2) {\n throw new Error('The `styleMap` directive must be used in the `style` attribute ' +\n 'and must be the only part in the attribute.');\n }\n }\n render(styleInfo) {\n return Object.keys(styleInfo).reduce((style, prop) => {\n const value = styleInfo[prop];\n if (value == null) {\n return style;\n }\n // Convert property names from camel-case to dash-case, i.e.:\n // `backgroundColor` -> `background-color`\n // Vendor-prefixed names need an extra `-` appended to front:\n // `webkitAppearance` -> `-webkit-appearance`\n // Exception is any property name containing a dash, including\n // custom properties; we assume these are already dash-cased i.e.:\n // `--my-button-color` --> `--my-button-color`\n prop = prop.includes('-')\n ? prop\n : prop\n .replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, '-$&')\n .toLowerCase();\n return style + `${prop}:${value};`;\n }, '');\n }\n update(part, [styleInfo]) {\n const { style } = part.element;\n if (this._previousStyleProperties === undefined) {\n this._previousStyleProperties = new Set(Object.keys(styleInfo));\n return this.render(styleInfo);\n }\n // Remove old properties that no longer exist in styleInfo\n for (const name of this._previousStyleProperties) {\n // If the name isn't in styleInfo or it's null/undefined\n if (styleInfo[name] == null) {\n this._previousStyleProperties.delete(name);\n if (name.includes('-')) {\n style.removeProperty(name);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n style[name] = null;\n }\n }\n }\n // Add or update properties\n for (const name in styleInfo) {\n const value = styleInfo[name];\n if (value != null) {\n this._previousStyleProperties.add(name);\n const isImportant = typeof value === 'string' && value.endsWith(importantFlag);\n if (name.includes('-') || isImportant) {\n style.setProperty(name, isImportant\n ? value.slice(0, flagTrim)\n : value, isImportant ? important : '');\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n style[name] = value;\n }\n }\n }\n return noChange;\n }\n}\n/**\n * A directive that applies CSS properties to an element.\n *\n * `styleMap` can only be used in the `style` attribute and must be the only\n * expression in the attribute. It takes the property names in the\n * {@link StyleInfo styleInfo} object and adds the properties to the inline\n * style of the element.\n *\n * Property names with dashes (`-`) are assumed to be valid CSS\n * property names and set on the element's style object using `setProperty()`.\n * Names without dashes are assumed to be camelCased JavaScript property names\n * and set on the element's style object using property assignment, allowing the\n * style object to translate JavaScript-style names to CSS property names.\n *\n * For example `styleMap({backgroundColor: 'red', 'border-top': '5px', '--size':\n * '0'})` sets the `background-color`, `border-top` and `--size` properties.\n *\n * @param styleInfo\n * @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}\n */\nexport const styleMap = directive(StyleMapDirective);\n//# sourceMappingURL=style-map.js.map",
|
|
7
|
-
"/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { noChange } from '../lit-html.js';\nimport { directive, Directive, PartType, } from '../directive.js';\nclass ClassMapDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'class' ||\n partInfo.strings?.length > 2) {\n throw new Error('`classMap()` can only be used in the `class` attribute ' +\n 'and must be the only part in the attribute.');\n }\n }\n render(classInfo) {\n // Add spaces to ensure separation from static classes\n return (' ' +\n Object.keys(classInfo)\n .filter((key) => classInfo[key])\n .join(' ') +\n ' ');\n }\n update(part, [classInfo]) {\n // Remember dynamic classes on the first render\n if (this._previousClasses === undefined) {\n this._previousClasses = new Set();\n if (part.strings !== undefined) {\n this._staticClasses = new Set(part.strings\n .join(' ')\n .split(/\\s/)\n .filter((s) => s !== ''));\n }\n for (const name in classInfo) {\n if (classInfo[name] && !this._staticClasses?.has(name)) {\n this._previousClasses.add(name);\n }\n }\n return this.render(classInfo);\n }\n const classList = part.element.classList;\n // Remove old classes that no longer apply\n for (const name of this._previousClasses) {\n if (!(name in classInfo)) {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n // Add or remove classes based on their classMap value\n for (const name in classInfo) {\n // We explicitly want a loose truthy check of `value` because it seems\n // more convenient that '' and 0 are skipped.\n const value = !!classInfo[name];\n if (value !== this._previousClasses.has(name) &&\n !this._staticClasses?.has(name)) {\n if (value) {\n classList.add(name);\n this._previousClasses.add(name);\n }\n else {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n }\n return noChange;\n }\n}\n/**\n * A directive that applies dynamic CSS classes.\n *\n * This must be used in the `class` attribute and must be the only part used in\n * the attribute. It takes each property in the `classInfo` argument and adds\n * the property name to the element's `classList` if the property value is\n * truthy; if the property value is falsy, the property name is removed from\n * the element's `class`.\n *\n * For example `{foo: bar}` applies the class `foo` if the value of `bar` is\n * truthy.\n *\n * @param classInfo\n */\nexport const classMap = directive(ClassMapDirective);\n//# sourceMappingURL=class-map.js.map"
|
|
8
|
-
],
|
|
9
|
-
"mappings": ";;;;;;;;;;;AAYO,IAAM,YAAY,CAAC,UAAU,SAAS;;;ACL7C,IAAM,YAAY;AAElB,IAAM,gBAAgB,OAAO;AAE7B,IAAM,WAAW,IAAI,cAAc;AAAA;AACnC,MAAM,0BAA0B,UAAU;AAAA,EACtC,WAAW,CAAC,UAAU;AAAA,IAClB,MAAM,QAAQ;AAAA,IACd,IAAI,SAAS,SAAS,SAAS,aAC3B,SAAS,SAAS,WAClB,SAAS,SAAS,SAAS,GAAG;AAAA,MA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Q,CAAC,CAAC,UAAU;AAAA,MAC1B,IAAI,UAAU,KAAK,iBAAiB,IAAI,IAAI,KACxC,CAAC,KAAK,gBAAgB,IAAI,IAAI,GAAG;AAAA,QACjC,IAAI,OAAO;AAAA,UACP,UAAU,IAAI,IAAI;AAAA,UAClB,KAAK,iBAAiB,IAAI,IAAI;AAAA,QAClC,EACK;AAAA,UACD,UAAU,OAAO,IAAI;AAAA,UACrB,KAAK,iBAAiB,OAAO,IAAI;AAAA;AAAA,MAEzC;AAAA,IACJ;AAAA,IACA,OAAO;AAAA;AAEf;AAeO,IAAM,WAAW,UAAU,iBAAiB;",
|
|
10
|
-
"debugId": "A0F1689B5230596A64756E2164756E21",
|
|
11
|
-
"names": []
|
|
12
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../node_modules/monaco-editor/esm/vs/languages/features/typescript/register.js"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { typescriptVersion as typescriptVersion$1 } from './lib/typescriptServicesMetadata.js';\nimport { languages, Emitter } from '../../../editor/editor.api.js';\n\nvar ModuleKind = /* @__PURE__ */ ((ModuleKind2) => {\n ModuleKind2[ModuleKind2[\"None\"] = 0] = \"None\";\n ModuleKind2[ModuleKind2[\"CommonJS\"] = 1] = \"CommonJS\";\n ModuleKind2[ModuleKind2[\"AMD\"] = 2] = \"AMD\";\n ModuleKind2[ModuleKind2[\"UMD\"] = 3] = \"UMD\";\n ModuleKind2[ModuleKind2[\"System\"] = 4] = \"System\";\n ModuleKind2[ModuleKind2[\"ES2015\"] = 5] = \"ES2015\";\n ModuleKind2[ModuleKind2[\"ESNext\"] = 99] = \"ESNext\";\n return ModuleKind2;\n})(ModuleKind || {});\nvar JsxEmit = /* @__PURE__ */ ((JsxEmit2) => {\n JsxEmit2[JsxEmit2[\"None\"] = 0] = \"None\";\n JsxEmit2[JsxEmit2[\"Preserve\"] = 1] = \"Preserve\";\n JsxEmit2[JsxEmit2[\"React\"] = 2] = \"React\";\n JsxEmit2[JsxEmit2[\"ReactNative\"] = 3] = \"ReactNative\";\n JsxEmit2[JsxEmit2[\"ReactJSX\"] = 4] = \"ReactJSX\";\n JsxEmit2[JsxEmit2[\"ReactJSXDev\"] = 5] = \"ReactJSXDev\";\n return JsxEmit2;\n})(JsxEmit || {});\nvar NewLineKind = /* @__PURE__ */ ((NewLineKind2) => {\n NewLineKind2[NewLineKind2[\"CarriageReturnLineFeed\"] = 0] = \"CarriageReturnLineFeed\";\n NewLineKind2[NewLineKind2[\"LineFeed\"] = 1] = \"LineFeed\";\n return NewLineKind2;\n})(NewLineKind || {});\nvar ScriptTarget = /* @__PURE__ */ ((ScriptTarget2) => {\n ScriptTarget2[ScriptTarget2[\"ES3\"] = 0] = \"ES3\";\n ScriptTarget2[ScriptTarget2[\"ES5\"] = 1] = \"ES5\";\n ScriptTarget2[ScriptTarget2[\"ES2015\"] = 2] = \"ES2015\";\n ScriptTarget2[ScriptTarget2[\"ES2016\"] = 3] = \"ES2016\";\n ScriptTarget2[ScriptTarget2[\"ES2017\"] = 4] = \"ES2017\";\n ScriptTarget2[ScriptTarget2[\"ES2018\"] = 5] = \"ES2018\";\n ScriptTarget2[ScriptTarget2[\"ES2019\"] = 6] = \"ES2019\";\n ScriptTarget2[ScriptTarget2[\"ES2020\"] = 7] = \"ES2020\";\n ScriptTarget2[ScriptTarget2[\"ESNext\"] = 99] = \"ESNext\";\n ScriptTarget2[ScriptTarget2[\"JSON\"] = 100] = \"JSON\";\n ScriptTarget2[ScriptTarget2[\"Latest\"] = 99 /* ESNext */] = \"Latest\";\n return ScriptTarget2;\n})(ScriptTarget || {});\nvar ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => {\n ModuleResolutionKind2[ModuleResolutionKind2[\"Classic\"] = 1] = \"Classic\";\n ModuleResolutionKind2[ModuleResolutionKind2[\"NodeJs\"] = 2] = \"NodeJs\";\n return ModuleResolutionKind2;\n})(ModuleResolutionKind || {});\nclass LanguageServiceDefaultsImpl {\n constructor(compilerOptions, diagnosticsOptions, workerOptions, inlayHintsOptions, modeConfiguration) {\n this._onDidChange = new Emitter();\n this._onDidExtraLibsChange = new Emitter();\n this._extraLibs = /* @__PURE__ */ Object.create(null);\n this._removedExtraLibs = /* @__PURE__ */ Object.create(null);\n this._eagerModelSync = false;\n this.setCompilerOptions(compilerOptions);\n this.setDiagnosticsOptions(diagnosticsOptions);\n this.setWorkerOptions(workerOptions);\n this.setInlayHintsOptions(inlayHintsOptions);\n this.setModeConfiguration(modeConfiguration);\n this._onDidExtraLibsChangeTimeout = -1;\n }\n get onDidChange() {\n return this._onDidChange.event;\n }\n get onDidExtraLibsChange() {\n return this._onDidExtraLibsChange.event;\n }\n get modeConfiguration() {\n return this._modeConfiguration;\n }\n get workerOptions() {\n return this._workerOptions;\n }\n get inlayHintsOptions() {\n return this._inlayHintsOptions;\n }\n getExtraLibs() {\n return this._extraLibs;\n }\n addExtraLib(content, _filePath) {\n let filePath;\n if (typeof _filePath === \"undefined\") {\n filePath = `ts:extralib-${Math.random().toString(36).substring(2, 15)}`;\n } else {\n filePath = _filePath;\n }\n if (this._extraLibs[filePath] && this._extraLibs[filePath].content === content) {\n return {\n dispose: () => {\n }\n };\n }\n let myVersion = 1;\n if (this._removedExtraLibs[filePath]) {\n myVersion = this._removedExtraLibs[filePath] + 1;\n }\n if (this._extraLibs[filePath]) {\n myVersion = this._extraLibs[filePath].version + 1;\n }\n this._extraLibs[filePath] = {\n content,\n version: myVersion\n };\n this._fireOnDidExtraLibsChangeSoon();\n return {\n dispose: () => {\n let extraLib = this._extraLibs[filePath];\n if (!extraLib) {\n return;\n }\n if (extraLib.version !== myVersion) {\n return;\n }\n delete this._extraLibs[filePath];\n this._removedExtraLibs[filePath] = myVersion;\n this._fireOnDidExtraLibsChangeSoon();\n }\n };\n }\n setExtraLibs(libs) {\n for (const filePath in this._extraLibs) {\n this._removedExtraLibs[filePath] = this._extraLibs[filePath].version;\n }\n this._extraLibs = /* @__PURE__ */ Object.create(null);\n if (libs && libs.length > 0) {\n for (const lib of libs) {\n const filePath = lib.filePath || `ts:extralib-${Math.random().toString(36).substring(2, 15)}`;\n const content = lib.content;\n let myVersion = 1;\n if (this._removedExtraLibs[filePath]) {\n myVersion = this._removedExtraLibs[filePath] + 1;\n }\n this._extraLibs[filePath] = {\n content,\n version: myVersion\n };\n }\n }\n this._fireOnDidExtraLibsChangeSoon();\n }\n _fireOnDidExtraLibsChangeSoon() {\n if (this._onDidExtraLibsChangeTimeout !== -1) {\n return;\n }\n this._onDidExtraLibsChangeTimeout = window.setTimeout(() => {\n this._onDidExtraLibsChangeTimeout = -1;\n this._onDidExtraLibsChange.fire(void 0);\n }, 0);\n }\n getCompilerOptions() {\n return this._compilerOptions;\n }\n setCompilerOptions(options) {\n this._compilerOptions = options || /* @__PURE__ */ Object.create(null);\n this._onDidChange.fire(void 0);\n }\n getDiagnosticsOptions() {\n return this._diagnosticsOptions;\n }\n setDiagnosticsOptions(options) {\n this._diagnosticsOptions = options || /* @__PURE__ */ Object.create(null);\n this._onDidChange.fire(void 0);\n }\n setWorkerOptions(options) {\n this._workerOptions = options || /* @__PURE__ */ Object.create(null);\n this._onDidChange.fire(void 0);\n }\n setInlayHintsOptions(options) {\n this._inlayHintsOptions = options || /* @__PURE__ */ Object.create(null);\n this._onDidChange.fire(void 0);\n }\n setMaximumWorkerIdleTime(value) {\n }\n setEagerModelSync(value) {\n this._eagerModelSync = value;\n }\n getEagerModelSync() {\n return this._eagerModelSync;\n }\n setModeConfiguration(modeConfiguration) {\n this._modeConfiguration = modeConfiguration || /* @__PURE__ */ Object.create(null);\n this._onDidChange.fire(void 0);\n }\n}\nconst typescriptVersion = typescriptVersion$1;\nconst modeConfigurationDefault = {\n completionItems: true,\n hovers: true,\n documentSymbols: true,\n definitions: true,\n references: true,\n documentHighlights: true,\n rename: true,\n diagnostics: true,\n documentRangeFormattingEdits: true,\n signatureHelp: true,\n onTypeFormattingEdits: true,\n codeActions: true,\n inlayHints: true\n};\nconst typescriptDefaults = new LanguageServiceDefaultsImpl(\n { allowNonTsExtensions: true, target: 99 /* Latest */ },\n { noSemanticValidation: false, noSyntaxValidation: false, onlyVisible: false },\n {},\n {},\n modeConfigurationDefault\n);\nconst javascriptDefaults = new LanguageServiceDefaultsImpl(\n { allowNonTsExtensions: true, allowJs: true, target: 99 /* Latest */ },\n { noSemanticValidation: true, noSyntaxValidation: false, onlyVisible: false },\n {},\n {},\n modeConfigurationDefault\n);\nconst getTypeScriptWorker = () => {\n return getMode().then((mode) => mode.getTypeScriptWorker());\n};\nconst getJavaScriptWorker = () => {\n return getMode().then((mode) => mode.getJavaScriptWorker());\n};\nfunction getMode() {\n return import('./tsMode.js');\n}\nlanguages.onLanguage(\"typescript\", () => {\n return getMode().then((mode) => mode.setupTypeScript(typescriptDefaults));\n});\nlanguages.onLanguage(\"javascript\", () => {\n return getMode().then((mode) => mode.setupJavaScript(javascriptDefaults));\n});\n\nexport { JsxEmit, ModuleKind, ModuleResolutionKind, NewLineKind, ScriptTarget, getJavaScriptWorker, getTypeScriptWorker, javascriptDefaults, typescriptDefaults, typescriptVersion };\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;;AA8CA,MAAM,4BAA4B;AAAA,EAChC,WAAW,CAAC,iBAAiB,oBAAoB,eAAe,mBAAmB,mBAAmB;AAAA,IACpG,KAAK,eAAe,IAAI;AAAA,IACxB,KAAK,wBAAwB,IAAI;AAAA,IACjC,KAAK,6BAA6B,OAAO,OAAO,IAAI;AAAA,IACpD,KAAK,oCAAoC,OAAO,OAAO,IAAI;AAAA,IAC3D,KAAK,kBAAkB;AAAA,IACvB,KAAK,mBAAmB,eAAe;AAAA,IACvC,KAAK,sBAAsB,kBAAkB;AAAA,IAC7C,KAAK,iBAAiB,aAAa;AAAA,IACnC,KAAK,qBAAqB,iBAAiB;AAAA,IAC3C,KAAK,qBAAqB,iBAAiB;AAAA,IAC3C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jB,OAAc;AAAA;AAEhB,UAAU,WAAW,cAAc,MAAM;AAAA,EACvC,OAAO,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,gBAAgB,kBAAkB,CAAC;AAAA,CACzE;AACD,UAAU,WAAW,cAAc,MAAM;AAAA,EACvC,OAAO,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,gBAAgB,kBAAkB,CAAC;AAAA,CACzE;",
|
|
8
|
-
"debugId": "6DE8933A3FC198BD64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../collab/src/negotiate.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/**\n * WebSocket subprotocol negotiation for the collab socket (RFC 6455 §1.9, §4.2.2).\n *\n * **The token names the wire envelope, not the package.** `jx.collab.v1` means \"I speak the frame\n * layout `envelope.ts` documents\". There is one token per envelope **major**, and the rule for\n * bumping it is narrow on purpose: bump when {@link decodeFrame} would _mis-parse_ a peer's frame —\n * a field reordered, a type widened, a length prefix changed. **Do not bump for a new frame type.**\n * Both halves already skip a frame type they do not know, so a v1 peer and a v1-plus-one-frame peer\n * interoperate; bumping there would refuse a room that would have worked.\n *\n * **Why the capability probe does the negotiating.** RFC 6455 §4.1 requires a client that offered\n * subprotocols and received no echo to _fail the connection_, and browsers enforce it. So a new\n * Studio that unconditionally offered `jx.collab.v1` would lose collab entirely against an older\n * dev server — a regression caused by the fix. The probe already exists, already returns a version\n * the client discards, and runs before the socket: it is the one place the client can learn what\n * the server speaks without risking the handshake. Hence {@link negotiateCollab}, which turns a\n * probe body into the list to offer — empty against a server that advertises nothing.\n *\n * **Nothing here may go in the `hello` control message.** That arrives after the socket is up and\n * after frames may already have been exchanged, which is too late to prevent the divergent-history\n * merge `schema.ts` warns about. Negotiation has to conclude before a byte of document state\n * moves.\n *\n * This module imports nothing, deliberately: the Studio platform adapters read it eagerly, before\n * the dynamic import that pulls in Yjs, so it must not drag the CRDT into the initial bundle.\n */\n\n/** The subprotocol token for the envelope in `envelope.ts`. One token per envelope major. */\nexport const COLLAB_SUBPROTOCOL = \"jx.collab.v1\";\n\n/** What the client should do with the socket, given what the server advertised. */\nexport interface CollabNegotiation {\n /**\n * The subprotocols to offer as `Sec-WebSocket-Protocol`. **Empty means offer none**, which is the\n * correct answer against a server that advertises none: an offer it cannot echo would fail the\n * handshake outright, where offering nothing connects exactly as it does today.\n */\n offer: string[];\n /**\n * Non-null when the peers cannot interoperate: the server advertised subprotocols and none of\n * them is one we speak. The client must not connect — the string says which side speaks what, so\n * the degradation is legible rather than a silent solo session.\n */\n refused: string | null;\n}\n\n/**\n * Decide what to offer, from the body of a `GET /__studio/collab` capability probe.\n *\n * @param {unknown} probe The parsed probe body, or null if it did not parse as JSON.\n * @returns {CollabNegotiation}\n */\nexport function negotiateCollab(probe: unknown): CollabNegotiation {\n if (probe === null || typeof probe !== \"object\") {\n // A 200 that is not a JSON object: pre-negotiation server. Connect as before, offering nothing.\n return { offer: [], refused: null };\n }\n const body = probe as { collab?: unknown; protocols?: unknown };\n if (body.collab === false) {\n return { offer: [], refused: \"This server has collaboration disabled.\" };\n }\n const { protocols } = body;\n if (!Array.isArray(protocols) || protocols.length === 0) {\n // A server that predates negotiation. It would echo nothing, so we must offer nothing.\n return { offer: [], refused: null };\n }\n if (protocols.includes(COLLAB_SUBPROTOCOL)) {\n return { offer: [COLLAB_SUBPROTOCOL], refused: null };\n }\n const theirs = protocols.filter((p) => typeof p === \"string\").join(\", \") || \"none\";\n return {\n offer: [],\n refused: `This server speaks collab envelope ${theirs}; this editor speaks ${COLLAB_SUBPROTOCOL}.`,\n };\n}\n\n/**\n * The subprotocols a client offered, from its `Sec-WebSocket-Protocol` request header.\n *\n * RFC 6455 §4.1 allows the field to be split across several header lines and comma-separated within\n * one; `Headers.get` already joins repeats with `, `, so one split covers both spellings.\n *\n * @param {string | null} header\n * @returns {string[]}\n */\nexport function offeredSubprotocols(header: string | null): string[] {\n if (!header) {\n return [];\n }\n return header\n .split(\",\")\n .map((token) => token.trim())\n .filter((token) => token !== \"\");\n}\n\n/** What the server should do with an upgrade, given the client's offer. */\nexport interface SubprotocolAnswer {\n /** The token to echo in the 101 response, or null to echo nothing. */\n echo: string | null;\n /** Non-null when the handshake must be refused instead of upgraded. */\n reject: string | null;\n}\n\n/**\n * Choose the subprotocol to echo (RFC 6455 §4.2.2 step 4).\n *\n * Three cases, and the middle one is the one that is easy to get wrong:\n *\n * - **No offer** — an older client. Upgrade and echo nothing; it is not expecting an echo, and\n * refusing it would break every Studio built before this shipped.\n * - **An offer we speak** — echo exactly that token. Echoing a token the client did not offer is\n * itself a protocol violation, so the echo is always a member of the offer.\n * - **An offer we do not speak** — refuse. This is the whole point: two peers whose envelopes\n * disagree about merge granularity (see `collab.md` §3.1) must not end up in one room, and a\n * refused handshake is a far better outcome than a divergent-history merge.\n *\n * @param {string[]} offered\n * @returns {SubprotocolAnswer}\n */\nexport function selectSubprotocol(offered: string[]): SubprotocolAnswer {\n if (offered.length === 0) {\n return { echo: null, reject: null };\n }\n if (offered.includes(COLLAB_SUBPROTOCOL)) {\n return { echo: COLLAB_SUBPROTOCOL, reject: null };\n }\n return {\n echo: null,\n reject: `No supported collab subprotocol offered (this server speaks ${COLLAB_SUBPROTOCOL}).`,\n };\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";AA4BO,IAAM,qBAAqB;AAwB3B,SAAS,eAAe,CAAC,OAAmC;AAAA,EACjE,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;AAAA,IAE/C,OAAO,EAAE,OAAO,CAAC,GAAG,SAAS,KAAK;AAAA,EACpC;AAAA,EACA,MAAM,OAAO;AAAA,EACb,IAAI,KAAK,WAAW,OAAO;AAAA,IACzB,OAAO,EAAE,OAAO,CAAC,GAAG,SAAS,0CAA0C;AAAA,EACzE;AAAA,EACA,QAAQ,cAAc;AAAA,EACtB,IAAI,CAAC,MAAM,QAAQ,SAAS,KAAK,UAAU,WAAW,GAAG;AAAA,IAEvD,OAAO,EAAE,OAAO,CAAC,GAAG,SAAS,KAAK;AAAA,EACpC;AAAA,EACA,IAAI,UAAU,SAAS,kBAAkB,GAAG;AAAA,IAC1C,OAAO,EAAE,OAAO,CAAC,kBAAkB,GAAG,SAAS,KAAK;AAAA,EACtD;AAAA,EACA,MAAM,SAAS,UAAU,OAAO,CAAC,MAAM,OAAO,MAAM,QAAQ,EAAE,KAAK,IAAI,KAAK;AAAA,EAC5E,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,SAAS,sCAAsC,8BAA8B;AAAA,EAC/E;AAAA;",
|
|
8
|
-
"debugId": "0E14F1DBFFC9648B64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/panels/quick-search.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/// <reference lib=\"dom\" />\n/**\n * The Palette — one omnibox, several modes (UX-REDESIGN-PLAN §5.4).\n *\n * This file used to be a filename-substring finder with one hidden domain swap in it: with no\n * project open the same trigger, the same chrome and the same placeholder silently listed recent\n * PROJECTS instead. It is now the surface the whole shell shrinks into — the place a capability\n * goes when it is retired from the chrome (§2 principle 9), which only works if everything is\n * reachable here by name, with its chord printed beside it.\n *\n * Four properties earn that:\n *\n * 1. **Modes are named, prefixed and enumerable.** `>` commands, `@` document nodes, plain text files,\n * and `?` lists them. The mode is echoed as a REMOVABLE CHIP, so the no-project case is a stated\n * `Recent Projects` mode rather than a swap you have to infer. `PALETTE_MODES` is the namespace:\n * P4's Problems and P7's content search are new members, not a new widget.\n * 2. **Files are matched by fuzzy subsequence over the FULL PATH.** `pgblog` finds\n * `pages/blog/index.md`. The backend glob (`**\\/*q*.{json,md}`) can only do a basename\n * substring, so the palette asks it once for the document set and ranks locally — which is also\n * what lets the ranking prefer a basename hit, a word boundary and a consecutive run, in that\n * order.\n * 3. **Every row prints its binding.** That is how a large surface stays discoverable without adding\n * chrome, and it is the mechanism by which the palette teaches the keyboard it replaced.\n * 4. **An unavailable command is GREYED, not hidden**, with its `requires` sentence as the subtitle\n * (§2 principle 4). \"Why can't I\" is the question a palette is uniquely good at answering, and a\n * row that vanishes answers it with silence.\n *\n * The exported names still read `…QuickSearch` because `src/studio.ts` and `src/panels/empty-state.\n * ts` import them and neither is this workstream's file. They are the palette's; the rename is one\n * find-replace in those two call sites.\n */\n\nimport { html, render as litRender, nothing } from \"lit-html\";\nimport { classMap } from \"lit-html/directives/class-map.js\";\nimport { live } from \"lit-html/directives/live.js\";\nimport { ref } from \"lit-html/directives/ref.js\";\nimport { getPlatform } from \"../platform\";\nimport { flattenTree, nodeLabel, projectState } from \"../store\";\nimport { documentExtensions, formatByExtension, loadFormats } from \"../format/format-host\";\nimport { openFileInTab } from \"../files/files\";\nimport { getRecentFiles, getRecentProjects, trackRecentFile } from \"../recent-projects\";\nimport { getLayerSlot } from \"../ui/layers\";\nimport { activeTab } from \"../workspace/workspace\";\nimport { activeRegistry } from \"../commands/active-registry\";\nimport type { PaletteMode } from \"../commands/defaults\";\nimport type { AnyCommand, CommandRegistry } from \"../commands/registry\";\nimport type { JxMutableNode } from \"@jxsuite/schema/types\";\nimport type { JxPath } from \"../state\";\n\nexport type { PaletteMode } from \"../commands/defaults\";\n\n// ─── The mode namespace ───────────────────────────────────────────────────────\n\n/** One palette mode: its prefix, the chip it echoes, and what it says when it is empty. */\nexport interface PaletteModeSpec {\n mode: PaletteMode;\n /** The one character that switches into this mode from any other. `\"\"` = the plain mode. */\n prefix: string;\n /** The removable chip's text, and the row label in `?`. */\n chip: string;\n placeholder: string;\n /** What `?` prints under the mode's name. One sentence, no noun phrases (§2 principle 6). */\n description: string;\n}\n\n/**\n * Every mode, in the order `?` lists them.\n *\n * Declared as data rather than as a switch because three consumers read it: the prefix parser, the\n * chip, and the `?` listing itself — which is what makes the palette able to teach its own\n * namespace instead of hiding it in a docs page.\n */\nexport const PALETTE_MODES: readonly PaletteModeSpec[] = [\n {\n mode: \"files\",\n prefix: \"\",\n chip: \"Files\",\n placeholder: \"Go to a file…\",\n description: \"Open a file by any part of its path — pgblog finds pages/blog/index.md.\",\n },\n {\n mode: \"commands\",\n prefix: \">\",\n chip: \"Commands\",\n placeholder: \"Run a command…\",\n description: \"Run anything Studio can do, with its keyboard shortcut printed beside it.\",\n },\n {\n mode: \"nodes\",\n prefix: \"@\",\n chip: \"Symbols\",\n placeholder: \"Go to an element in this document…\",\n description: \"Select an element in the open document by its Outline name.\",\n },\n {\n mode: \"projects\",\n prefix: \"\",\n chip: \"Recent Projects\",\n placeholder: \"Open a recent project…\",\n description: \"Reopen a project you have had open before.\",\n },\n {\n mode: \"picker\",\n prefix: \"?\",\n chip: \"Modes\",\n placeholder: \"Type ? for modes, > for commands, @ for elements…\",\n description: \"List these modes.\",\n },\n];\n\nconst MODE_SPEC = new Map(PALETTE_MODES.map((spec) => [spec.mode, spec]));\n\n/** The modes a prefix character switches into. `files` and `projects` have no prefix. */\nconst PREFIXED_MODES = PALETTE_MODES.filter((spec) => spec.prefix !== \"\");\n\n/** The spec for a mode. Total: every {@link PaletteMode} is declared above. */\nexport function modeSpec(mode: PaletteMode): PaletteModeSpec {\n return MODE_SPEC.get(mode) ?? PALETTE_MODES[0]!;\n}\n\n/**\n * The mode a raw input actually addresses.\n *\n * Three rules, in order:\n *\n * - A leading prefix character wins, whatever the palette was opened as — that is what `>` and `@`\n * are FOR, and it is why the prefix is stripped out of the query and into the chip.\n * - `picker` with an empty query lists the modes; `picker` with anything typed means files, because\n * ⌘K then typing a filename is the gesture every omnibox has trained people to expect.\n * - Files with no project open is `Recent Projects`. This is the one substitution the old widget made\n * silently; here the chip says so, and `Project: Open Recent…` names it from the outside.\n */\nexport function resolvePaletteMode(\n requested: PaletteMode,\n raw: string,\n projectOpen: boolean,\n): { mode: PaletteMode; query: string } {\n const prefixed = PREFIXED_MODES.find((spec) => raw.startsWith(spec.prefix));\n if (prefixed) {\n return resolvePaletteMode(prefixed.mode, raw.slice(1), projectOpen);\n }\n let mode = requested;\n if (mode === \"picker\" && raw.trim() !== \"\") {\n mode = \"files\";\n }\n if (mode === \"files\" && !projectOpen) {\n mode = \"projects\";\n }\n return { mode, query: raw };\n}\n\n// ─── Fuzzy subsequence ranking ────────────────────────────────────────────────\n\n/** Characters after which a match counts as starting a word — the boundaries a path has. */\nconst BOUNDARY = new Set([\"/\", \"-\", \"_\", \".\", \" \"]);\n\n/**\n * Score `text` against `query` as a subsequence, or `null` when it is not one.\n *\n * Higher is better. The weights encode what a person means when they type six characters at a file\n * tree: a consecutive run is worth much more than scattered letters, a match that starts a path\n * segment is worth more than one mid-word, and — decisively — a match inside the BASENAME beats one\n * in a directory, so typing `index` does not bury `index.md` under `pages/index-partials/x.md`.\n *\n * An empty query scores 0 and matches everything, which is what makes \"show me the recents\" and\n * \"show me every file\" the same code path.\n */\nexport function fuzzyScore(text: string, query: string): number | null {\n if (query === \"\") {\n return 0;\n }\n const haystack = text.toLowerCase();\n const needle = query.toLowerCase();\n const basenameStart = haystack.lastIndexOf(\"/\") + 1;\n let score = 0;\n let cursor = 0;\n let previousIndex = -2;\n for (const char of needle) {\n const index = haystack.indexOf(char, cursor);\n if (index === -1) {\n return null;\n }\n if (index === previousIndex + 1) {\n score += 8;\n }\n if (index === 0 || BOUNDARY.has(haystack[index - 1] ?? \"\")) {\n score += 6;\n }\n if (index >= basenameStart) {\n score += 4;\n }\n previousIndex = index;\n cursor = index + 1;\n }\n // Two tie-breaks, both small enough never to outrank a real structural signal: an earlier first\n // Match, and a shorter path — `pages/index.md` over `pages/blog/drafts/index.md`.\n return score - previousIndex * 0.01 - haystack.length * 0.001;\n}\n\n/** Rank candidates by {@link fuzzyScore}, dropping non-matches. Stable within equal scores. */\nexport function rankBy<T>(items: readonly T[], query: string, key: (item: T) => string): T[] {\n const scored: { item: T; score: number; index: number }[] = [];\n for (const [index, item] of items.entries()) {\n const score = fuzzyScore(key(item), query);\n if (score !== null) {\n scored.push({ index, item, score });\n }\n }\n return scored\n .toSorted((a, b) => b.score - a.score || a.index - b.index)\n .map((entry) => entry.item);\n}\n\n// ─── Argument prompts ─────────────────────────────────────────────────────────\n\n/** One offered value for a command's single argument. */\nexport interface PaletteArgChoice {\n value: unknown;\n label: string;\n}\n\n/** What the palette can do with a command's `args` schema. */\nexport type PaletteArgs =\n | { kind: \"none\" }\n | { kind: \"choice\"; name: string; choices: PaletteArgChoice[] }\n | { kind: \"unsupported\" };\n\ninterface ArgsSchemaShape {\n properties?: Record<string, { type?: string; enum?: readonly unknown[]; description?: string }>;\n required?: readonly string[];\n}\n\n/**\n * How a command's arguments are asked for.\n *\n * The palette can prompt for exactly one closed value space — an `enum` or a boolean — because that\n * is a LIST, and a list is the one thing this widget is. `canvas.setZoom { zoom: number }` and\n * `selection.set { path }` are `\"unsupported\"`, so command mode does not render them: a row that\n * cannot be completed is worse than an absent one, and both are reachable from the surface that\n * owns them (the zoom cluster, the canvas). This is a property of the SCHEMA, not a list of ids, so\n * a command that gains an enum argument becomes promptable without anyone editing this file.\n */\nexport function paletteArgs(command: AnyCommand): PaletteArgs {\n const schema = command.args as ArgsSchemaShape | undefined;\n const properties = schema?.properties;\n if (!schema || !properties) {\n return { kind: \"none\" };\n }\n const names = Object.keys(properties);\n if (names.length !== 1) {\n return { kind: \"unsupported\" };\n }\n const name = names[0]!;\n const property = properties[name]!;\n if (property.enum) {\n return {\n kind: \"choice\",\n name,\n choices: property.enum.map((value) => ({ label: String(value), value })),\n };\n }\n if (property.type === \"boolean\") {\n return {\n kind: \"choice\",\n name,\n choices: [\n { label: \"on\", value: true },\n { label: \"off\", value: false },\n ],\n };\n }\n return { kind: \"unsupported\" };\n}\n\n// ─── Recently-used commands ───────────────────────────────────────────────────\n\n/**\n * The ids the combobox relationship is built from (WAI-ARIA APG, combobox with listbox popup).\n *\n * The input already said `role=\"combobox\"`, but nothing connected it to the list beneath: no\n * `aria-controls`, so a screen reader could not find the popup, and no `aria-activedescendant`, so\n * arrowing through the results moved a visual highlight and announced nothing. `aria-expanded` was\n * the literal string `\"true\"`, which claims a popup is showing even when the query matched\n * nothing.\n */\nconst QUICK_SEARCH_LISTBOX_ID = \"quick-search-listbox\";\n\n/** A stable per-row id, so `aria-activedescendant` has something to point at. */\nfunction optionId(index: number): string {\n return `quick-search-option-${index}`;\n}\n\nconst RECENT_COMMANDS_KEY = \"jx-studio-recent-commands\";\nconst RECENT_COMMANDS_MAX = 6;\n\n/** The ids most recently run FROM THE PALETTE, newest first. Pinned above the rest of the list. */\nexport function getRecentCommands(): string[] {\n try {\n const raw: unknown = JSON.parse(localStorage.getItem(RECENT_COMMANDS_KEY) || \"[]\");\n return Array.isArray(raw) ? raw.filter((id) => typeof id === \"string\") : [];\n } catch {\n return [];\n }\n}\n\nfunction trackRecentCommand(id: string): void {\n const next = [id, ...getRecentCommands().filter((known) => known !== id)].slice(\n 0,\n RECENT_COMMANDS_MAX,\n );\n try {\n localStorage.setItem(RECENT_COMMANDS_KEY, JSON.stringify(next));\n } catch {\n // Storage full or unavailable — the command still ran, it is just not remembered.\n }\n}\n\n// ─── Rows ─────────────────────────────────────────────────────────────────────\n\ninterface FileRow {\n kind: \"file\";\n path: string;\n name: string;\n /** Directory part, shown as the subtitle. */\n detail: string;\n recent: boolean;\n}\ninterface ProjectRow {\n kind: \"project\";\n root: string;\n name: string;\n detail: string;\n}\ninterface CommandRow {\n kind: \"command\";\n id: string;\n /** `\"View: Zen Mode\"` — the palette's own naming convention (§5.1). */\n name: string;\n /** The `requires` sentence when disabled; otherwise empty. */\n detail: string;\n chord: string;\n enabled: boolean;\n recent: boolean;\n}\ninterface NodeRow {\n kind: \"node\";\n path: JxPath;\n name: string;\n detail: string;\n}\ninterface ModeRow {\n kind: \"mode\";\n mode: PaletteMode;\n name: string;\n detail: string;\n chord: string;\n}\ninterface ArgRow {\n kind: \"arg\";\n commandId: string;\n argName: string;\n value: unknown;\n name: string;\n detail: string;\n}\n\ntype PaletteRow = FileRow | ProjectRow | CommandRow | NodeRow | ModeRow | ArgRow;\n\n// ─── State ────────────────────────────────────────────────────────────────────\n\ninterface QuickCtx {\n openRecentProject: (root: string) => void | Promise<void>;\n}\n\nlet _ctx: QuickCtx | null = null;\nlet _open = false;\n/** The mode the palette was OPENED as; the effective one is derived with the query. */\nlet _requested: PaletteMode = \"picker\";\nlet _query = \"\";\nlet _selectedIndex = 0;\n/** The project's document set, fetched once per open. `null` while it has never been asked for. */\nlet _files: FileRow[] | null = null;\nlet _loading = false;\n/** The command awaiting its one argument, or `null`. */\nlet _pending: { command: AnyCommand; name: string; choices: PaletteArgChoice[] } | null = null;\n\nfunction getContainer() {\n return getLayerSlot(\"popover\", \"quick-search\");\n}\n\nexport function initQuickSearch(ctx?: QuickCtx) {\n _ctx = ctx ?? null;\n}\n\n/**\n * Open the palette in `mode`.\n *\n * The default is `\"files\"`, not the picker: every caller that names a mode names one (⌘K passes\n * `\"picker\"`, the pill's segments pass theirs), so the bare call is the \"open a page…\" gesture an\n * empty state offers — and that has to land on files rather than on a list of modes.\n *\n * @param mode Which mode to open in. `\"picker\"` (⌘K) lists the modes until something is typed.\n */\nexport function openQuickSearch(mode: PaletteMode = \"files\") {\n _open = true;\n _requested = mode;\n _query = \"\";\n _selectedIndex = 0;\n _pending = null;\n _files = null;\n renderOverlay();\n void ensureFiles();\n}\n\nexport function closeQuickSearch() {\n _open = false;\n _pending = null;\n renderOverlay();\n}\n\n/** Whether the palette is on screen — the fact the Command Bar's ⌘K affordance reflects. */\nexport function isQuickSearchOpen(): boolean {\n return _open;\n}\n\n/** The project root scoping the palette, or null when no project is open. */\nfunction scopeRoot(): string | null {\n return projectState ? (projectState.projectRoot ?? null) : null;\n}\n\nfunction hasProject(): boolean {\n return projectState != null;\n}\n\n/** The mode and query the current input resolves to. */\nfunction current(): { mode: PaletteMode; query: string } {\n return resolvePaletteMode(_requested, _query, hasProject());\n}\n\n// ─── Row sources ──────────────────────────────────────────────────────────────\n\nfunction dirPart(path: string) {\n const parts = path.split(\"/\");\n parts.pop();\n return parts.length > 0 ? parts.join(\"/\") : \"\";\n}\n\n/** Collapse a home-prefixed absolute path for compact display. */\nfunction shortenPath(path: string) {\n if (path.startsWith(\"/home/\")) {\n return `~/${path.split(\"/\").slice(3).join(\"/\")}`;\n }\n return path;\n}\n\n/**\n * Fetch the project's document set once per open.\n *\n * The empty query is deliberate: `searchFiles`'s glob is `**\\/*<query>*.{json,md,…}`, so an empty\n * one IS \"every document\", and asking for it once buys a client-side fuzzy match over full paths\n * that the glob could never express.\n */\nasync function ensureFiles(): Promise<void> {\n if (!_open || _files !== null || _loading || !hasProject()) {\n return;\n }\n _loading = true;\n renderOverlay();\n try {\n await loadFormats();\n const hits = await getPlatform().searchFiles(\"\", documentExtensions());\n _files = hits.map((hit) => ({\n kind: \"file\" as const,\n path: hit.path,\n name: hit.name ?? hit.path.split(\"/\").pop() ?? \"\",\n detail: dirPart(hit.path),\n recent: false,\n }));\n } catch {\n // A search backend that is down leaves the palette usable in every other mode; the files mode\n // Says \"No results\" rather than pretending the project is empty.\n _files = [];\n }\n _loading = false;\n renderOverlay();\n}\n\nfunction fileRows(query: string): FileRow[] {\n if (query.trim() === \"\") {\n return getRecentFiles(scopeRoot() ?? undefined).map((file) => ({\n kind: \"file\" as const,\n path: file.path,\n name: file.name,\n detail: dirPart(file.path),\n recent: true,\n }));\n }\n return rankBy(_files ?? [], query.trim(), (row) => row.path);\n}\n\nfunction projectRows(query: string): ProjectRow[] {\n const rows = getRecentProjects().map((project) => ({\n kind: \"project\" as const,\n root: project.root,\n name: project.name,\n detail: shortenPath(project.root),\n }));\n return rankBy(rows, query.trim(), (row) => `${row.name}/${row.root}`);\n}\n\n/**\n * Every command the registry holds, ranked — including the ones that cannot run right now.\n *\n * Visibility (`when`) still hides; enablement does not. That split is the whole of §2 principle 4:\n * a command that does not apply to this app at all is absent, and one that does not apply to this\n * MOMENT is greyed and says why.\n */\nfunction commandRows(registry: CommandRegistry, query: string): CommandRow[] {\n const recents = getRecentCommands();\n const rows: CommandRow[] = [];\n for (const command of registry.visible()) {\n if (paletteArgs(command).kind === \"unsupported\") {\n continue;\n }\n if (!(command.menus ?? [\"palette\"]).includes(\"palette\")) {\n continue;\n }\n rows.push({\n kind: \"command\",\n id: command.id,\n name: `${command.category}: ${command.title}`,\n detail: registry.disabledReason(command.id) ?? \"\",\n chord: registry.keymap.formatBinding(command.id) ?? \"\",\n enabled: registry.isEnabled(command.id),\n recent: recents.includes(command.id),\n });\n }\n const ranked = rankBy(rows, query.trim(), (row) => row.name);\n if (query.trim() !== \"\") {\n return ranked;\n }\n // Recents pin above the rest, newest first — the one ordering a palette owes a returning user.\n const pinned = recents\n .map((id) => ranked.find((row) => row.id === id))\n .filter((row): row is CommandRow => row !== undefined);\n return [...pinned, ...ranked.filter((row) => !pinned.includes(row))];\n}\n\nfunction nodeRows(query: string): NodeRow[] {\n const tab = activeTab.value;\n if (!tab) {\n return [];\n }\n const rows: NodeRow[] = flattenTree(tab.doc.document).map((row) => ({\n kind: \"node\" as const,\n path: row.path,\n name:\n row.nodeType === \"text\"\n ? String(row.node).slice(0, 60)\n : nodeLabel(row.node as JxMutableNode),\n detail: row.nodeType,\n }));\n return rankBy(rows, query.trim(), (row) => row.name);\n}\n\nfunction modeRows(): ModeRow[] {\n return PALETTE_MODES.filter((spec) => spec.mode !== \"picker\").map((spec) => ({\n kind: \"mode\" as const,\n mode: spec.mode,\n name: spec.chip,\n detail: spec.description,\n chord: spec.prefix,\n }));\n}\n\nfunction argRows(query: string): ArgRow[] {\n const pending = _pending!;\n const rows: ArgRow[] = pending.choices.map((choice) => ({\n kind: \"arg\" as const,\n commandId: pending.command.id,\n argName: pending.name,\n value: choice.value,\n name: choice.label,\n detail: `${pending.command.title} → ${pending.name}`,\n }));\n return rankBy(rows, query.trim(), (row) => row.name);\n}\n\n/** The rows for the current input, and whether they are a \"recent\" listing rather than a search. */\nfunction currentRows(): { rows: PaletteRow[]; showingRecent: boolean } {\n const { mode, query } = current();\n if (_pending) {\n return { rows: argRows(query), showingRecent: false };\n }\n switch (mode) {\n case \"commands\": {\n const registry = activeRegistry();\n return {\n rows: registry ? commandRows(registry, query) : [],\n showingRecent: query.trim() === \"\",\n };\n }\n case \"nodes\": {\n return { rows: nodeRows(query), showingRecent: false };\n }\n case \"projects\": {\n return { rows: projectRows(query), showingRecent: query.trim() === \"\" };\n }\n case \"picker\": {\n return { rows: modeRows(), showingRecent: false };\n }\n default: {\n return { rows: fileRows(query), showingRecent: query.trim() === \"\" };\n }\n }\n}\n\n// ─── Interaction ──────────────────────────────────────────────────────────────\n\nfunction onInput(e: Event) {\n const raw = (e.target as HTMLInputElement).value;\n const prefixed = PREFIXED_MODES.find((spec) => raw.startsWith(spec.prefix));\n if (prefixed) {\n // The prefix moves OUT of the input and into the chip, so the query the user reads back is the\n // Text they are searching for and Backspace has one obvious meaning at position zero.\n _requested = prefixed.mode;\n _query = raw.slice(1);\n } else {\n _query = raw;\n }\n _selectedIndex = 0;\n renderOverlay();\n void ensureFiles();\n}\n\n/** Drop the mode chip: back to the neutral picker, keeping what was typed. */\nfunction clearMode() {\n _requested = \"picker\";\n _pending = null;\n _selectedIndex = 0;\n renderOverlay();\n}\n\nfunction onKeydown(e: KeyboardEvent) {\n const { rows } = currentRows();\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault();\n _selectedIndex = Math.min(_selectedIndex + 1, rows.length - 1);\n renderOverlay();\n break;\n }\n case \"ArrowUp\": {\n e.preventDefault();\n _selectedIndex = Math.max(_selectedIndex - 1, 0);\n renderOverlay();\n break;\n }\n case \"Enter\": {\n e.preventDefault();\n if (rows[_selectedIndex]) {\n selectRow(rows[_selectedIndex]!);\n }\n break;\n }\n case \"Backspace\": {\n // At position zero the chip is the thing to the left of the caret, so this is the same\n // Gesture as deleting a character — and it is why the chip is removable at all.\n if (_query === \"\" && (_pending || _requested !== \"picker\")) {\n e.preventDefault();\n clearMode();\n }\n break;\n }\n case \"Escape\": {\n e.preventDefault();\n closeQuickSearch();\n break;\n }\n default: {\n break;\n }\n }\n}\n\nfunction enterMode(mode: PaletteMode) {\n _requested = mode;\n _query = \"\";\n _selectedIndex = 0;\n renderOverlay();\n void ensureFiles();\n}\n\nfunction runCommand(command: AnyCommand, args?: Record<string, unknown>) {\n const registry = activeRegistry();\n if (!registry) {\n return;\n }\n trackRecentCommand(command.id);\n closeQuickSearch();\n const report = (error: unknown) => {\n console.error(`palette: command \"${command.id}\" failed`, error);\n };\n // Both shapes, deliberately: `run` may throw synchronously (a coercion refusal from\n // `command-args.ts` does) or reject later. A palette that let either escape would take the\n // Keydown listener down with it, and the overlay is already closed by then.\n try {\n void Promise.resolve(registry.run(command.id, args)).catch(report);\n } catch (error) {\n report(error);\n }\n}\n\nfunction selectRow(row: PaletteRow) {\n switch (row.kind) {\n case \"project\": {\n closeQuickSearch();\n void _ctx?.openRecentProject(row.root);\n return;\n }\n case \"file\": {\n closeQuickSearch();\n trackRecentFile({ name: row.name, path: row.path, root: scopeRoot() ?? \"\" });\n void openFileInTab(row.path);\n return;\n }\n case \"mode\": {\n enterMode(row.mode);\n return;\n }\n case \"node\": {\n const registry = activeRegistry();\n closeQuickSearch();\n void registry?.run(\"selection.set\", { path: row.path });\n return;\n }\n case \"arg\": {\n runCommand(_pending!.command, { [row.argName]: row.value });\n return;\n }\n default: {\n selectCommandRow(row);\n }\n }\n}\n\nfunction selectCommandRow(row: CommandRow) {\n const registry = activeRegistry();\n const command = registry?.get(row.id);\n if (!registry || !command || !row.enabled) {\n // A greyed row is not a dead one: it stays on screen with its reason, and pressing Enter on it\n // Does nothing rather than closing the palette on a refusal the user never asked to see.\n return;\n }\n const args = paletteArgs(command);\n if (args.kind === \"choice\") {\n _pending = { choices: args.choices, command, name: args.name };\n _query = \"\";\n _selectedIndex = 0;\n renderOverlay();\n return;\n }\n runCommand(command);\n}\n\n// ─── Rendering ────────────────────────────────────────────────────────────────\n\nfunction fileIcon(name: string) {\n const ext = name.split(\".\").pop()?.toLowerCase();\n if (ext === \"json\") {\n return html`<sp-icon-file-code size=\"s\"></sp-icon-file-code>`;\n }\n if (ext && formatByExtension(ext)) {\n return html`<sp-icon-file-txt size=\"s\"></sp-icon-file-txt>`;\n }\n return html`<sp-icon-document size=\"s\"></sp-icon-document>`;\n}\n\nfunction rowIcon(row: PaletteRow) {\n switch (row.kind) {\n case \"project\": {\n return html`<sp-icon-folder-open size=\"s\"></sp-icon-folder-open>`;\n }\n case \"file\": {\n return fileIcon(row.name);\n }\n case \"command\": {\n return html`<sp-icon-play size=\"s\"></sp-icon-play>`;\n }\n case \"node\": {\n return html`<sp-icon-layers size=\"s\"></sp-icon-layers>`;\n }\n default: {\n return html`<sp-icon-chevron-right size=\"s\"></sp-icon-chevron-right>`;\n }\n }\n}\n\n/** The right-aligned cell: a chord, a prefix, or the recent badge. */\nfunction rowTrailing(row: PaletteRow, showingRecent: boolean) {\n if (row.kind === \"command\" && row.chord) {\n return html`<kbd class=\"palette-chord\">${row.chord}</kbd>`;\n }\n if (row.kind === \"mode\" && row.chord) {\n return html`<kbd class=\"palette-chord\">${row.chord}</kbd>`;\n }\n if (row.kind === \"command\" && row.recent) {\n return html`<span class=\"quick-search-badge\">recent</span>`;\n }\n return showingRecent ? html`<span class=\"quick-search-badge\">recent</span>` : nothing;\n}\n\n/** The chip echoing the active mode (or the command awaiting an argument), with its remove button. */\nfunction chipTemplate(mode: PaletteMode) {\n const label = _pending ? _pending.command.title : modeSpec(mode).chip;\n if (!_pending && mode === \"picker\") {\n return nothing;\n }\n return html`\n <span class=\"palette-chip\">\n ${label}\n <button\n class=\"palette-chip-remove\"\n type=\"button\"\n title=\"Clear mode (Backspace)\"\n aria-label=\"Clear mode\"\n @click=${clearMode}\n >\n ×\n </button>\n </span>\n `;\n}\n\n/** The sentence an empty result set shows. Never a noun phrase (§2 principle 6). */\nfunction emptyHint(mode: PaletteMode, query: string): string {\n if (_loading) {\n return \"Reading the project's files…\";\n }\n if (query.trim() !== \"\") {\n return \"No results\";\n }\n switch (mode) {\n case \"projects\": {\n return \"No recent projects — open one to get started\";\n }\n case \"nodes\": {\n return \"Open a document to jump to its elements\";\n }\n case \"commands\": {\n return \"Type to find any command in Studio\";\n }\n default: {\n return modeSpec(mode).placeholder;\n }\n }\n}\n\nfunction renderOverlay() {\n const container = getContainer();\n if (!_open) {\n litRender(nothing, container);\n return;\n }\n\n const { mode, query } = current();\n const { rows, showingRecent } = currentRows();\n const spec = modeSpec(mode);\n const placeholder = _pending ? `Choose a ${_pending.name}…` : spec.placeholder;\n const sectionLabel = _pending\n ? `${_pending.command.title} — ${_pending.name}`\n : mode === \"projects\"\n ? \"Recent projects\"\n : mode === \"commands\"\n ? \"Recently used\"\n : \"Recently opened\";\n\n const tpl = html`\n <div class=\"quick-search-overlay\" @click=${closeQuickSearch}>\n <div class=\"quick-search-panel\" @click=${(e: Event) => e.stopPropagation()}>\n <div class=\"palette-input-row\">\n ${chipTemplate(mode)}\n <input\n class=\"quick-search-input\"\n type=\"text\"\n role=\"combobox\"\n aria-controls=${QUICK_SEARCH_LISTBOX_ID}\n aria-expanded=${rows.length > 0}\n aria-activedescendant=${rows.length > 0 ? optionId(_selectedIndex) : nothing}\n aria-autocomplete=\"list\"\n aria-label=${placeholder}\n placeholder=${placeholder}\n .value=${live(_query)}\n @input=${onInput}\n @keydown=${onKeydown}\n ${ref((el) => {\n if (el) {\n requestAnimationFrame(() => (el as HTMLInputElement).focus());\n }\n })}\n />\n </div>\n <div class=\"quick-search-results\" role=\"listbox\" id=${QUICK_SEARCH_LISTBOX_ID}>\n ${\n rows.length === 0\n ? html`<div class=\"quick-search-empty\">${emptyHint(mode, query)}</div>`\n : nothing\n }\n ${\n showingRecent && rows.length > 0\n ? html`<div class=\"quick-search-section-label\">${sectionLabel}</div>`\n : nothing\n }\n ${rows.map(\n (row, i) => html`\n <div\n class=${classMap({\n \"quick-search-item\": true,\n disabled: row.kind === \"command\" && !row.enabled,\n selected: i === _selectedIndex,\n })}\n role=\"option\"\n id=${optionId(i)}\n aria-selected=${i === _selectedIndex}\n aria-disabled=${row.kind === \"command\" && !row.enabled}\n @click=${() => selectRow(row)}\n @mouseenter=${() => {\n _selectedIndex = i;\n renderOverlay();\n }}\n >\n <span class=\"quick-search-icon\">${rowIcon(row)}</span>\n <span class=\"quick-search-name\">${row.name}</span>\n <span class=\"quick-search-path\">${row.detail}</span>\n ${rowTrailing(row, showingRecent)}\n </div>\n `,\n )}\n </div>\n <div class=\"palette-hint\">\n <kbd>↑↓</kbd> move · <kbd>↵</kbd> run · <kbd>?</kbd> modes · <kbd>></kbd> commands ·\n <kbd>@</kbd> elements\n </div>\n </div>\n </div>\n `;\n\n litRender(tpl, container);\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEO,IAAM,gBAA4C;AAAA,EACvD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,EACf;AACF;AAEA,IAAM,YAAY,IAAI,IAAI,cAAc,IAAI,CAAC,SAAS,CAAC,KAAK,MAAM,IAAI,CAAC,CAAC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