@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.
Files changed (182) hide show
  1. package/data/css-meta.json +1487 -0
  2. package/data/elements-meta.json +370 -0
  3. package/data/html-meta.json +366 -0
  4. package/data/stylebook-meta.json +200 -0
  5. package/data/webdata.json +1621 -0
  6. package/dist/chunks/{Overlay.dev-ymy3et3y.js → Overlay.dev-d2ajy6sj.js} +7 -7
  7. package/dist/chunks/{content-source-r2n7v682.js → content-source-56xpvx83.js} +13 -12
  8. package/dist/chunks/{convert-to-repeater-cnpyvj74.js → convert-to-repeater-0xh9wwek.js} +12 -11
  9. package/dist/chunks/{extension-sections-vpcm4jvx.js → extension-sections-g34239vm.js} +17 -16
  10. package/dist/chunks/{files-zeg88k2d.js → files-gkz202dp.js} +18 -19
  11. package/dist/chunks/{format-host-taymsw55.js → format-host-pej3srnw.js} +2 -2
  12. package/dist/chunks/{git-panel-qp4rrwr9.js → git-panel-4j6xbh8g.js} +12 -11
  13. package/dist/chunks/{layers-panel-kj93w2zg.js → layers-panel-8mvn8sgd.js} +15 -14
  14. package/dist/chunks/{monaco-setup-xy3bs05d.js → monaco-setup-a5wkmbgh.js} +6 -3
  15. package/dist/chunks/{publish-panel-6qz6kp41.js → publish-panel-ptddc3kg.js} +6 -6
  16. package/dist/chunks/{quick-search-9wwa09hh.js → quick-search-j88azfs2.js} +19 -18
  17. package/dist/chunks/right-panel-egkaxy89.js +38 -0
  18. package/dist/chunks/{sp-overlay.dev-h6kdx076.js → sp-overlay.dev-s18hymn9.js} +8 -8
  19. package/dist/chunks/sp-progress-circle.dev-0zxcyz3r.js +15 -0
  20. package/dist/chunks/sp-tooltip.dev-5c6d1kjz.js +15 -0
  21. package/dist/chunks/{studio-753znj4c.js → studio-0e4h32g6.js} +5 -5
  22. package/dist/chunks/{studio-yz9s88s0.js → studio-10s469da.js} +25 -9
  23. package/dist/chunks/{studio-6f0am8f2.js → studio-2w11grav.js} +2 -2
  24. package/dist/chunks/{studio-zqv3w24n.js → studio-3q65xvzv.js} +5 -5
  25. package/dist/chunks/{studio-qhh8r5fz.js → studio-4058pg09.js} +4 -4
  26. package/dist/chunks/{studio-hekaagev.js → studio-4enps87v.js} +17 -17
  27. package/dist/chunks/{studio-tqemhphj.js → studio-50eed4c9.js} +4 -4
  28. package/dist/chunks/studio-53n8bp04.js +16 -0
  29. package/dist/chunks/{studio-nqq8jk8f.js → studio-5amdrjm4.js} +14 -14
  30. package/dist/chunks/{studio-6zzbyx17.js → studio-5ne8mdx9.js} +2 -2
  31. package/dist/chunks/{studio-3z8jjm2p.js → studio-7ejemhej.js} +3 -3
  32. package/dist/chunks/{studio-1kgfcv7s.js → studio-a11d3a1b.js} +12 -11
  33. package/dist/chunks/{studio-rgwcpast.js → studio-ay8wcr2b.js} +2 -2
  34. package/dist/chunks/{studio-fys6z73y.js → studio-bak2cyjr.js} +7 -7
  35. package/dist/chunks/{studio-xmvbhg31.js → studio-c31yb4t6.js} +2 -2
  36. package/dist/chunks/{studio-8sdyjfd6.js → studio-cf4rk7kv.js} +2 -2
  37. package/dist/chunks/{studio-yphy4z9m.js → studio-cv606rs1.js} +5 -5
  38. package/dist/chunks/{studio-5kt960pk.js → studio-hk523hby.js} +133 -147
  39. package/dist/chunks/{studio-x0et2z9g.js → studio-hs8x23fv.js} +15 -15
  40. package/dist/chunks/{studio-p471gg5n.js → studio-kvfx9z2c.js} +7 -3
  41. package/dist/chunks/{studio-22xr4q8q.js → studio-ncnet0ba.js} +18 -29
  42. package/dist/chunks/{studio-ckwz4d3x.js → studio-twsafr1e.js} +2 -2
  43. package/dist/chunks/{studio-qrsfh1w7.js → studio-tzx3xmvx.js} +5 -5
  44. package/dist/chunks/{studio-g8t7g0gp.js → studio-vdpcpada.js} +3 -3
  45. package/dist/chunks/{studio-6a0h7sne.js → studio-vhk5fmfv.js} +2 -2
  46. package/dist/chunks/{studio-hrajjyt2.js → studio-wdt9y92a.js} +2 -2
  47. package/dist/chunks/{studio-r8vx7bkz.js → studio-x3etxs0s.js} +14 -13
  48. package/dist/chunks/{studio-pv8m0h4a.js → studio-yxzgjq8q.js} +28 -23
  49. package/dist/chunks/{studio-300zsz1k.js → studio-zdkgwhkv.js} +6 -6
  50. package/dist/codicon.ttf +0 -0
  51. package/dist/iframe-entry.js +8 -1
  52. package/dist/manifest.json +82 -0
  53. package/dist/studio.js +232 -103
  54. package/index.html +0 -50
  55. package/package.json +11 -4
  56. package/src/canvas/iframe-entry.ts +5 -0
  57. package/src/canvas/iframe-host.ts +45 -4
  58. package/src/content/entry-editor.ts +2 -1
  59. package/src/editor/context-menu.ts +13 -2
  60. package/src/editor/slash-menu.ts +26 -11
  61. package/src/files/files.ts +11 -23
  62. package/src/grid/grid-panel.ts +27 -6
  63. package/src/hosting/document.ts +109 -0
  64. package/src/hosting/layout.ts +211 -0
  65. package/src/hosting/stage.ts +166 -0
  66. package/src/hosting/tsconfig.json +18 -0
  67. package/src/panels/ai-chat/chat-view.ts +25 -14
  68. package/src/panels/git-panel.ts +17 -14
  69. package/src/panels/head-panel.ts +32 -14
  70. package/src/panels/imports-panel.ts +32 -13
  71. package/src/panels/layers-panel.ts +9 -1
  72. package/src/panels/panel-registry.ts +0 -1
  73. package/src/panels/properties-panel.ts +3 -3
  74. package/src/panels/settings-pane.ts +1 -1
  75. package/src/panels/style-panel.ts +3 -3
  76. package/src/panels/stylebook-panel.ts +10 -1
  77. package/src/panels/toolbar.ts +1 -1
  78. package/src/services/bundle-base.ts +69 -0
  79. package/src/services/monaco-setup.ts +19 -13
  80. package/src/shell/tree.ts +155 -0
  81. package/src/shell.ts +0 -2
  82. package/src/studio.ts +22 -2
  83. package/src/types.ts +15 -0
  84. package/src/ui/regions.ts +10 -45
  85. package/styles/overlays.css +35 -0
  86. package/dist/chunks/2020-xp8vnwma.js.map +0 -24
  87. package/dist/chunks/Overlay.dev-ymy3et3y.js.map +0 -9
  88. package/dist/chunks/adapter-jkcyhgtr.js.map +0 -9
  89. package/dist/chunks/cf-settings-g5fbf2zp.js.map +0 -9
  90. package/dist/chunks/components-z6cnkyy1.js.map +0 -9
  91. package/dist/chunks/content-source-r2n7v682.js.map +0 -9
  92. package/dist/chunks/convert-to-repeater-cnpyvj74.js.map +0 -10
  93. package/dist/chunks/editor-cptq5jp1.js.map +0 -9
  94. package/dist/chunks/extension-sections-vpcm4jvx.js.map +0 -11
  95. package/dist/chunks/files-zeg88k2d.js.map +0 -9
  96. package/dist/chunks/flow-qbfgrpeh.js.map +0 -12
  97. package/dist/chunks/focus-trap.esm-ggawf1hy.js.map +0 -11
  98. package/dist/chunks/focus-visible-6eg70z18.js.map +0 -10
  99. package/dist/chunks/format-host-taymsw55.js.map +0 -9
  100. package/dist/chunks/git-panel-qp4rrwr9.js.map +0 -9
  101. package/dist/chunks/index-nj44jpzj.js.map +0 -14
  102. package/dist/chunks/index-zqxmqxmh.js.map +0 -9
  103. package/dist/chunks/javascript-q8kpmfah.js.map +0 -11
  104. package/dist/chunks/jsonMode-dkr040ga.js.map +0 -18
  105. package/dist/chunks/jx-validate-jj9rnt4n.js.map +0 -9
  106. package/dist/chunks/layers-panel-kj93w2zg.js.map +0 -9
  107. package/dist/chunks/monaco-binding-rj6xpx9y.js.map +0 -10
  108. package/dist/chunks/monaco-setup-xy3bs05d.js.map +0 -15
  109. package/dist/chunks/publish-panel-6qz6kp41.js.map +0 -9
  110. package/dist/chunks/quick-search-9wwa09hh.js.map +0 -9
  111. package/dist/chunks/right-panel-faf816ch.js +0 -37
  112. package/dist/chunks/right-panel-faf816ch.js.map +0 -9
  113. package/dist/chunks/section-registry-sx1ykvkw.js.map +0 -9
  114. package/dist/chunks/sp-overlay.dev-h6kdx076.js.map +0 -9
  115. package/dist/chunks/sp-popover.dev-dj9x7e7a.js.map +0 -9
  116. package/dist/chunks/sp-progress-circle.dev-0fpvhm52.js +0 -15
  117. package/dist/chunks/sp-progress-circle.dev-0fpvhm52.js.map +0 -9
  118. package/dist/chunks/sp-tooltip.dev-rvepkw4r.js +0 -15
  119. package/dist/chunks/sp-tooltip.dev-rvepkw4r.js.map +0 -9
  120. package/dist/chunks/sp-tray.dev-64v4pxw8.js.map +0 -12
  121. package/dist/chunks/studio-0a5qrh01.js.map +0 -9
  122. package/dist/chunks/studio-0rqqhrdy.js.map +0 -12
  123. package/dist/chunks/studio-18j3bmcz.js.map +0 -10
  124. package/dist/chunks/studio-1kgfcv7s.js.map +0 -13
  125. package/dist/chunks/studio-22xr4q8q.js.map +0 -13
  126. package/dist/chunks/studio-300zsz1k.js.map +0 -39
  127. package/dist/chunks/studio-3fk1ac9z.js.map +0 -12
  128. package/dist/chunks/studio-3n4ndrzh.js.map +0 -41
  129. package/dist/chunks/studio-3z8jjm2p.js.map +0 -13
  130. package/dist/chunks/studio-4mqb9a0j.js.map +0 -14
  131. package/dist/chunks/studio-4q0wznzf.js.map +0 -73
  132. package/dist/chunks/studio-5ehhackm.js.map +0 -10
  133. package/dist/chunks/studio-5kt960pk.js.map +0 -38
  134. package/dist/chunks/studio-5x5774ak.js.map +0 -10
  135. package/dist/chunks/studio-685s0ytq.js.map +0 -76
  136. package/dist/chunks/studio-6a0h7sne.js.map +0 -15
  137. package/dist/chunks/studio-6f0am8f2.js.map +0 -10
  138. package/dist/chunks/studio-6kv3apa9.js.map +0 -10
  139. package/dist/chunks/studio-6zzbyx17.js.map +0 -12
  140. package/dist/chunks/studio-753znj4c.js.map +0 -16
  141. package/dist/chunks/studio-7afd21nw.js.map +0 -10
  142. package/dist/chunks/studio-8jpzqk5s.js.map +0 -10
  143. package/dist/chunks/studio-8q517dfr.js.map +0 -10
  144. package/dist/chunks/studio-8sdyjfd6.js.map +0 -10
  145. package/dist/chunks/studio-a0tswy0w.js.map +0 -9
  146. package/dist/chunks/studio-a7pzveq1.js.map +0 -11
  147. package/dist/chunks/studio-ahnzd9rg.js.map +0 -10
  148. package/dist/chunks/studio-b9b6t1dg.js.map +0 -651
  149. package/dist/chunks/studio-bw5dz6km.js.map +0 -21
  150. package/dist/chunks/studio-cjm7fdjf.js.map +0 -14
  151. package/dist/chunks/studio-ckwz4d3x.js.map +0 -12
  152. package/dist/chunks/studio-d1ks410h.js.map +0 -10
  153. package/dist/chunks/studio-dg7zyt5x.js.map +0 -10
  154. package/dist/chunks/studio-fys6z73y.js.map +0 -10
  155. package/dist/chunks/studio-g1wdche0.js.map +0 -56
  156. package/dist/chunks/studio-g8t7g0gp.js.map +0 -10
  157. package/dist/chunks/studio-h4rxscfc.js.map +0 -10
  158. package/dist/chunks/studio-hekaagev.js.map +0 -18
  159. package/dist/chunks/studio-hrajjyt2.js.map +0 -10
  160. package/dist/chunks/studio-nqq8jk8f.js.map +0 -14
  161. package/dist/chunks/studio-p471gg5n.js.map +0 -14
  162. package/dist/chunks/studio-pv8m0h4a.js.map +0 -98
  163. package/dist/chunks/studio-qhh8r5fz.js.map +0 -13
  164. package/dist/chunks/studio-qrsfh1w7.js.map +0 -41
  165. package/dist/chunks/studio-r8vx7bkz.js.map +0 -235
  166. package/dist/chunks/studio-rgwcpast.js.map +0 -12
  167. package/dist/chunks/studio-s519zc99.js.map +0 -10
  168. package/dist/chunks/studio-sas7mt3k.js.map +0 -10
  169. package/dist/chunks/studio-t5wqwzdh.js.map +0 -10
  170. package/dist/chunks/studio-tqemhphj.js.map +0 -11
  171. package/dist/chunks/studio-tr20m8g8.js.map +0 -9
  172. package/dist/chunks/studio-tvgyw9xw.js.map +0 -14
  173. package/dist/chunks/studio-x0et2z9g.js.map +0 -32
  174. package/dist/chunks/studio-xm3dbxvn.js.map +0 -19
  175. package/dist/chunks/studio-xmvbhg31.js.map +0 -10
  176. package/dist/chunks/studio-ynxwkrzd.js.map +0 -246
  177. package/dist/chunks/studio-yphy4z9m.js.map +0 -10
  178. package/dist/chunks/studio-yz9s88s0.js.map +0 -54
  179. package/dist/chunks/studio-z6nw2ek2.js.map +0 -10
  180. package/dist/chunks/studio-zqv3w24n.js.map +0 -11
  181. package/dist/chunks/tsMode-76kr53q0.js.map +0 -13
  182. package/dist/chunks/ws-client-6shc5rze.js.map +0 -12
@@ -1,12 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../node_modules/@lit/reactive-element/development/css-tag.js", "../../../node_modules/@lit/reactive-element/development/reactive-element.js", "../../../node_modules/lit-element/development/lit-element.js"],
4
- "sourcesContent": [
5
- "/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst NODE_MODE = false;\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets = global.ShadowRoot &&\n (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\nconst constructionToken = Symbol();\nconst cssTagCache = new WeakMap();\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nexport class CSSResult {\n constructor(cssText, strings, safeToken) {\n // This property needs to remain unminified.\n this['_$cssResult$'] = true;\n if (safeToken !== constructionToken) {\n throw new Error('CSSResult is not constructable. Use `unsafeCSS` or `css` instead.');\n }\n this.cssText = cssText;\n this._strings = strings;\n }\n // This is a getter so that it's lazy. In practice, this means stylesheets\n // are not created until the first element instance is made.\n get styleSheet() {\n // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n // constructable.\n let styleSheet = this._styleSheet;\n const strings = this._strings;\n if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n const cacheable = strings !== undefined && strings.length === 1;\n if (cacheable) {\n styleSheet = cssTagCache.get(strings);\n }\n if (styleSheet === undefined) {\n (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(this.cssText);\n if (cacheable) {\n cssTagCache.set(strings, styleSheet);\n }\n }\n }\n return styleSheet;\n }\n toString() {\n return this.cssText;\n }\n}\nconst textFromCSSResult = (value) => {\n // This property needs to remain unminified.\n if (value['_$cssResult$'] === true) {\n return value.cssText;\n }\n else if (typeof value === 'number') {\n return value;\n }\n else {\n throw new Error(`Value passed to 'css' function must be a 'css' function result: ` +\n `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n `to ensure page security.`);\n }\n};\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value) => new CSSResult(typeof value === 'string' ? value : String(value), undefined, constructionToken);\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nexport const css = (strings, ...values) => {\n const cssText = strings.length === 1\n ? strings[0]\n : values.reduce((acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1], strings[0]);\n return new CSSResult(cssText, strings, constructionToken);\n};\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic the native feature](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/adoptedStyleSheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nexport const adoptStyles = (renderRoot, styles) => {\n if (supportsAdoptingStyleSheets) {\n renderRoot.adoptedStyleSheets = styles.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);\n }\n else {\n for (const s of styles) {\n const style = document.createElement('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nonce = global['litNonce'];\n if (nonce !== undefined) {\n style.setAttribute('nonce', nonce);\n }\n style.textContent = s.cssText;\n renderRoot.appendChild(style);\n }\n }\n};\nconst cssResultFromStyleSheet = (sheet) => {\n let cssText = '';\n for (const rule of sheet.cssRules) {\n cssText += rule.cssText;\n }\n return unsafeCSS(cssText);\n};\nexport const getCompatibleStyle = supportsAdoptingStyleSheets ||\n (NODE_MODE && global.CSSStyleSheet === undefined)\n ? (s) => s\n : (s) => s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n//# sourceMappingURL=css-tag.js.map",
6
- "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * Use this module if you want to create your own base class extending\n * {@link ReactiveElement}.\n * @packageDocumentation\n */\nimport { getCompatibleStyle, adoptStyles, } from './css-tag.js';\n// In the Node build, this import will be injected by Rollup:\n// import {HTMLElement, customElements} from '@lit-labs/ssr-dom-shim';\nexport * from './css-tag.js';\n// TODO (justinfagnani): Add `hasOwn` here when we ship ES2022\nconst { is, defineProperty, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, } = Object;\nconst NODE_MODE = false;\n// Lets a minifier replace globalThis references with a minified name\nconst global = globalThis;\nif (NODE_MODE) {\n global.customElements ??= customElements;\n}\nconst DEV_MODE = true;\nlet issueWarning;\nconst trustedTypes = global\n .trustedTypes;\n// Temporary workaround for https://crbug.com/993268\n// Currently, any attribute starting with \"on\" is considered to be a\n// TrustedScript source. Such boolean attributes must be set to the equivalent\n// trusted emptyScript value.\nconst emptyStringForBooleanAttribute = trustedTypes\n ? trustedTypes.emptyScript\n : '';\nconst polyfillSupport = DEV_MODE\n ? global.reactiveElementPolyfillSupportDevMode\n : global.reactiveElementPolyfillSupport;\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n global.litIssuedWarnings ??= new Set();\n /**\n * Issue a warning if we haven't already, based either on `code` or `warning`.\n * Warnings are disabled automatically only by `warning`; disabling via `code`\n * can be done by users.\n */\n issueWarning = (code, warning) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!global.litIssuedWarnings.has(warning) &&\n !global.litIssuedWarnings.has(code)) {\n console.warn(warning);\n global.litIssuedWarnings.add(warning);\n }\n };\n queueMicrotask(() => {\n issueWarning('dev-mode', `Lit is in dev mode. Not recommended for production!`);\n // Issue polyfill support warning.\n if (global.ShadyDOM?.inUse && polyfillSupport === undefined) {\n issueWarning('polyfill-support-missing', `Shadow DOM is being polyfilled via \\`ShadyDOM\\` but ` +\n `the \\`polyfill-support\\` module has not been loaded.`);\n }\n });\n}\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event) => {\n const shouldEmit = global\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(new CustomEvent('lit-debug', {\n detail: event,\n }));\n }\n : undefined;\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = (prop, _obj) => prop;\nexport const defaultConverter = {\n toAttribute(value, type) {\n switch (type) {\n case Boolean:\n value = value ? emptyStringForBooleanAttribute : null;\n break;\n case Object:\n case Array:\n // if the value is `null` or `undefined` pass this through\n // to allow removing/no change behavior.\n value = value == null ? value : JSON.stringify(value);\n break;\n }\n return value;\n },\n fromAttribute(value, type) {\n let fromValue = value;\n switch (type) {\n case Boolean:\n fromValue = value !== null;\n break;\n case Number:\n fromValue = value === null ? null : Number(value);\n break;\n case Object:\n case Array:\n // Do *not* generate exception when invalid JSON is set as elements\n // don't normally complain on being mis-configured.\n // TODO(sorvell): Do generate exception in *dev mode*.\n try {\n // Assert to adhere to Bazel's \"must type assert JSON parse\" rule.\n fromValue = JSON.parse(value);\n }\n catch (e) {\n fromValue = null;\n }\n break;\n }\n return fromValue;\n },\n};\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nexport const notEqual = (value, old) => !is(value, old);\nconst defaultPropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n useDefault: false,\n hasChanged: notEqual,\n};\n// Ensure metadata is enabled. TypeScript does not polyfill\n// Symbol.metadata, so we must ensure that it exists.\nSymbol.metadata ??= Symbol('metadata');\n// Map from a class's metadata object to property options\n// Note that we must use nullish-coalescing assignment so that we only use one\n// map even if we load multiple version of this module.\nglobal.litPropertyMetadata ??= new WeakMap();\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclasses to render updates as desired.\n * @noInheritDoc\n */\nexport class ReactiveElement\n// In the Node build, this `extends` clause will be substituted with\n// `(globalThis.HTMLElement ?? HTMLElement)`.\n//\n// This way, we will first prefer any global `HTMLElement` polyfill that the\n// user has assigned, and then fall back to the `HTMLElement` shim which has\n// been imported (see note at the top of this file about how this import is\n// generated by Rollup). Note that the `HTMLElement` variable has been\n// shadowed by this import, so it no longer refers to the global.\n extends HTMLElement {\n /**\n * Adds an initializer function to the class that is called during instance\n * construction.\n *\n * This is useful for code that runs against a `ReactiveElement`\n * subclass, such as a decorator, that needs to do work for each\n * instance, such as setting up a `ReactiveController`.\n *\n * ```ts\n * const myDecorator = (target: typeof ReactiveElement, key: string) => {\n * target.addInitializer((instance: ReactiveElement) => {\n * // This is run during construction of the element\n * new MyController(instance);\n * });\n * }\n * ```\n *\n * Decorating a field will then cause each instance to run an initializer\n * that adds a controller:\n *\n * ```ts\n * class MyElement extends LitElement {\n * @myDecorator foo;\n * }\n * ```\n *\n * Initializers are stored per-constructor. Adding an initializer to a\n * subclass does not add it to a superclass. Since initializers are run in\n * constructors, initializers will run in order of the class hierarchy,\n * starting with superclasses and progressing to the instance's class.\n *\n * @nocollapse\n */\n static addInitializer(initializer) {\n this.__prepare();\n (this._initializers ??= []).push(initializer);\n }\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // Ensure we've created all properties\n this.finalize();\n // this.__attributeToPropertyMap is only undefined after finalize() in\n // ReactiveElement itself. ReactiveElement.observedAttributes is only\n // accessed with ReactiveElement as the receiver when a subclass or mixin\n // calls super.observedAttributes\n return (this.__attributeToPropertyMap && [...this.__attributeToPropertyMap.keys()]);\n }\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(name, options = defaultPropertyDeclaration) {\n // If this is a state property, force the attribute to false.\n if (options.state) {\n options.attribute = false;\n }\n this.__prepare();\n // Whether this property is wrapping accessors.\n // Helps control the initial value change and reflection logic.\n if (this.prototype.hasOwnProperty(name)) {\n options = Object.create(options);\n options.wrapped = true;\n }\n this.elementProperties.set(name, options);\n if (!options.noAccessor) {\n const key = DEV_MODE\n ? // Use Symbol.for in dev mode to make it easier to maintain state\n // when doing HMR.\n Symbol.for(`${String(name)} (@property() cache)`)\n : Symbol();\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n defineProperty(this.prototype, name, descriptor);\n }\n }\n }\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static getPropertyDescriptor(name, key, options) {\n const { get, set } = getOwnPropertyDescriptor(this.prototype, name) ?? {\n get() {\n return this[key];\n },\n set(v) {\n this[key] = v;\n },\n };\n if (DEV_MODE && get == null) {\n if ('value' in (getOwnPropertyDescriptor(this.prototype, name) ?? {})) {\n throw new Error(`Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it's actually declared as a value on the prototype. ` +\n `Usually this is due to using @property or @state on a method.`);\n }\n issueWarning('reactive-property-without-getter', `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it does not have a getter. This will be an error in a ` +\n `future version of Lit.`);\n }\n return {\n get,\n set(value) {\n const oldValue = get?.call(this);\n set?.call(this, value);\n this.requestUpdate(name, oldValue, options);\n },\n configurable: true,\n enumerable: true,\n };\n }\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name) {\n return this.elementProperties.get(name) ?? defaultPropertyDeclaration;\n }\n /**\n * Initializes static own properties of the class used in bookkeeping\n * for element properties, initializers, etc.\n *\n * Can be called multiple times by code that needs to ensure these\n * properties exist before using them.\n *\n * This method ensures the superclass is finalized so that inherited\n * property metadata can be copied down.\n * @nocollapse\n */\n static __prepare() {\n if (this.hasOwnProperty(JSCompiler_renameProperty('elementProperties', this))) {\n // Already prepared\n return;\n }\n // Finalize any superclasses\n const superCtor = getPrototypeOf(this);\n superCtor.finalize();\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n // Initialize elementProperties from the superclass\n this.elementProperties = new Map(superCtor.elementProperties);\n }\n /**\n * Finishes setting up the class so that it's ready to be registered\n * as a custom element and instantiated.\n *\n * This method is called by the ReactiveElement.observedAttributes getter.\n * If you override the observedAttributes getter, you must either call\n * super.observedAttributes to trigger finalization, or call finalize()\n * yourself.\n *\n * @nocollapse\n */\n static finalize() {\n if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this))) {\n return;\n }\n this.finalized = true;\n this.__prepare();\n // Create properties from the static properties block:\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n const propKeys = [\n ...getOwnPropertyNames(props),\n ...getOwnPropertySymbols(props),\n ];\n for (const p of propKeys) {\n this.createProperty(p, props[p]);\n }\n }\n // Create properties from standard decorator metadata:\n const metadata = this[Symbol.metadata];\n if (metadata !== null) {\n const properties = litPropertyMetadata.get(metadata);\n if (properties !== undefined) {\n for (const [p, options] of properties) {\n this.elementProperties.set(p, options);\n }\n }\n }\n // Create the attribute-to-property map\n this.__attributeToPropertyMap = new Map();\n for (const [p, options] of this.elementProperties) {\n const attr = this.__attributeNameForProperty(p, options);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n }\n }\n this.elementStyles = this.finalizeStyles(this.styles);\n if (DEV_MODE) {\n if (this.hasOwnProperty('createProperty')) {\n issueWarning('no-override-create-property', 'Overriding ReactiveElement.createProperty() is deprecated. ' +\n 'The override will not be called with standard decorators');\n }\n if (this.hasOwnProperty('getPropertyDescriptor')) {\n issueWarning('no-override-get-property-descriptor', 'Overriding ReactiveElement.getPropertyDescriptor() is deprecated. ' +\n 'The override will not be called with standard decorators');\n }\n }\n }\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n static finalizeStyles(styles) {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array<unknown> works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set(styles.flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift(getCompatibleStyle(s));\n }\n }\n else if (styles !== undefined) {\n elementStyles.push(getCompatibleStyle(styles));\n }\n return elementStyles;\n }\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n static __attributeNameForProperty(name, options) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n constructor() {\n super();\n this.__instanceProperties = undefined;\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n this.isUpdatePending = false;\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n this.hasUpdated = false;\n /**\n * Name of currently reflecting property\n */\n this.__reflectingProperty = null;\n this.__initialize();\n }\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n */\n __initialize() {\n this.__updatePromise = new Promise((res) => (this.enableUpdating = res));\n this._$changedProperties = new Map();\n // This enqueues a microtask that must run before the first update, so it\n // must be called before requestUpdate()\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n this.constructor._initializers?.forEach((i) => i(this));\n }\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller) {\n (this.__controllers ??= new Set()).add(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n controller.hostConnected?.();\n }\n }\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller) {\n this.__controllers?.delete(controller);\n }\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs.\n */\n __saveInstanceProperties() {\n const instanceProperties = new Map();\n const elementProperties = this.constructor\n .elementProperties;\n for (const p of elementProperties.keys()) {\n if (this.hasOwnProperty(p)) {\n instanceProperties.set(p, this[p]);\n delete this[p];\n }\n }\n if (instanceProperties.size > 0) {\n this.__instanceProperties = instanceProperties;\n }\n }\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n createRenderRoot() {\n const renderRoot = this.shadowRoot ??\n this.attachShadow(this.constructor.shadowRootOptions);\n adoptStyles(renderRoot, this.constructor.elementStyles);\n return renderRoot;\n }\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n // Create renderRoot before controllers `hostConnected`\n this.renderRoot ??=\n this.createRenderRoot();\n this.enableUpdating(true);\n this.__controllers?.forEach((c) => c.hostConnected?.());\n }\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n enableUpdating(_requestedUpdate) { }\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n this.__controllers?.forEach((c) => c.hostDisconnected?.());\n }\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [responding to attribute changes](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#responding_to_attribute_changes)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(name, _old, value) {\n this._$attributeToProperty(name, value);\n }\n __propertyToAttribute(name, value) {\n const elemProperties = this.constructor.elementProperties;\n const options = elemProperties.get(name);\n const attr = this.constructor.__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter = options.converter?.toAttribute !==\n undefined\n ? options.converter\n : defaultConverter;\n const attrValue = converter.toAttribute(value, options.type);\n if (DEV_MODE &&\n this.constructor.enabledWarnings.includes('migration') &&\n attrValue === undefined) {\n issueWarning('undefined-attribute-value', `The attribute value for the ${name} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`);\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n }\n else {\n this.setAttribute(attr, attrValue);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n /** @internal */\n _$attributeToProperty(name, value) {\n const ctor = this.constructor;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = ctor.__attributeToPropertyMap.get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter = typeof options.converter === 'function'\n ? { fromAttribute: options.converter }\n : options.converter?.fromAttribute !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n const convertedValue = converter.fromAttribute(value, options.type);\n this[propName] =\n convertedValue ??\n this.__defaultValues?.get(propName) ??\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n convertedValue;\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @param useNewValue if true, the newValue argument is used instead of\n * reading the property value. This is important to use if the reactive\n * property is a standard private accessor, as opposed to a plain\n * property, since private members can't be dynamically read by name.\n * @param newValue the new value of the property. This is only used if\n * `useNewValue` is true.\n * @category updates\n */\n requestUpdate(name, oldValue, options, useNewValue = false, newValue) {\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n if (DEV_MODE && name instanceof Event) {\n issueWarning(``, `The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()`);\n }\n const ctor = this.constructor;\n if (useNewValue === false) {\n newValue = this[name];\n }\n options ??= ctor.getPropertyOptions(name);\n const changed = (options.hasChanged ?? notEqual)(newValue, oldValue) ||\n // When there is no change, check a corner case that can occur when\n // 1. there's a initial value which was not reflected\n // 2. the property is subsequently set to this value.\n // For example, `prop: {useDefault: true, reflect: true}`\n // and el.prop = 'foo'. This should be considered a change if the\n // attribute is not set because we will now reflect the property to the attribute.\n (options.useDefault &&\n options.reflect &&\n newValue === this.__defaultValues?.get(name) &&\n !this.hasAttribute(ctor.__attributeNameForProperty(name, options)));\n if (changed) {\n this._$changeProperty(name, oldValue, options);\n }\n else {\n // Abort the request if the property should not be considered changed.\n return;\n }\n }\n if (this.isUpdatePending === false) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n }\n /**\n * @internal\n */\n _$changeProperty(name, oldValue, { useDefault, reflect, wrapped }, initializeValue) {\n // Record default value when useDefault is used. This allows us to\n // restore this value when the attribute is removed.\n if (useDefault && !(this.__defaultValues ??= new Map()).has(name)) {\n this.__defaultValues.set(name, initializeValue ?? oldValue ?? this[name]);\n // if this is not wrapping an accessor, it must be an initial setting\n // and in this case we do not want to record the change or reflect.\n if (wrapped !== true || initializeValue !== undefined) {\n return;\n }\n }\n // TODO (justinfagnani): Create a benchmark of Map.has() + Map.set(\n // vs just Map.set()\n if (!this._$changedProperties.has(name)) {\n // On the initial change, the old value should be `undefined`, except\n // with `useDefault`\n if (!this.hasUpdated && !useDefault) {\n oldValue = undefined;\n }\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `__reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (reflect === true && this.__reflectingProperty !== name) {\n (this.__reflectingProperties ??= new Set()).add(name);\n }\n }\n /**\n * Sets up the element to asynchronously update.\n */\n async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n }\n catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise<unknown> {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n scheduleUpdate() {\n const result = this.performUpdate();\n if (DEV_MODE &&\n this.constructor.enabledWarnings.includes('async-perform-update') &&\n typeof result?.then ===\n 'function') {\n issueWarning('async-perform-update', `Element ${this.localName} returned a Promise from performUpdate(). ` +\n `This behavior is deprecated and will be removed in a future ` +\n `version of ReactiveElement.`);\n }\n return result;\n }\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * @category updates\n */\n performUpdate() {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent?.({ kind: 'update' });\n if (!this.hasUpdated) {\n // Create renderRoot before first update. This occurs in `connectedCallback`\n // but is done here to support out of tree calls to `enableUpdating`/`performUpdate`.\n this.renderRoot ??=\n this.createRenderRoot();\n if (DEV_MODE) {\n // Produce warning if any reactive properties on the prototype are\n // shadowed by class fields. Instance fields set before upgrade are\n // deleted by this point, so any own property is caused by class field\n // initialization in the constructor.\n const ctor = this.constructor;\n const shadowedProperties = [...ctor.elementProperties.keys()].filter((p) => this.hasOwnProperty(p) && p in getPrototypeOf(this));\n if (shadowedProperties.length) {\n throw new Error(`The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`);\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // TODO (justinfagnani): should we use the stored value? Could a new value\n // have been set since we stored the own property value?\n for (const [p, value] of this.__instanceProperties) {\n this[p] = value;\n }\n this.__instanceProperties = undefined;\n }\n // Trigger initial value reflection and populate the initial\n // `changedProperties` map, but only for the case of properties created\n // via `createProperty` on accessors, which will not have already\n // populated the `changedProperties` map since they are not set.\n // We can't know if these accessors had initializers, so we just set\n // them anyway - a difference from experimental decorators on fields and\n // standard decorators on auto-accessors.\n // For context see:\n // https://github.com/lit/lit/pull/4183#issuecomment-1711959635\n const elementProperties = this.constructor\n .elementProperties;\n if (elementProperties.size > 0) {\n for (const [p, options] of elementProperties) {\n const { wrapped } = options;\n const value = this[p];\n if (wrapped === true &&\n !this._$changedProperties.has(p) &&\n value !== undefined) {\n this._$changeProperty(p, undefined, options, value);\n }\n }\n }\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n this.__controllers?.forEach((c) => c.hostUpdate?.());\n this.update(changedProperties);\n }\n else {\n this.__markUpdated();\n }\n }\n catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n willUpdate(_changedProperties) { }\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties) {\n this.__controllers?.forEach((c) => c.hostUpdated?.());\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (DEV_MODE &&\n this.isUpdatePending &&\n this.constructor.enabledWarnings.includes('change-in-update')) {\n issueWarning('change-in-update', `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`);\n }\n }\n __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete() {\n return this.getUpdateComplete();\n }\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n getUpdateComplete() {\n return this.__updatePromise;\n }\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n shouldUpdate(_changedProperties) {\n return true;\n }\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n update(_changedProperties) {\n // The forEach() expression will only run when __reflectingProperties is\n // defined, and it returns undefined, setting __reflectingProperties to\n // undefined\n this.__reflectingProperties &&= this.__reflectingProperties.forEach((p) => this.__propertyToAttribute(p, this[p]));\n this.__markUpdated();\n }\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n updated(_changedProperties) { }\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n firstUpdated(_changedProperties) { }\n}\n/**\n * Memoized list of all element styles.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category styles\n */\nReactiveElement.elementStyles = [];\n/**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\nReactiveElement.shadowRootOptions = { mode: 'open' };\n// Assigned here to work around a jscompiler bug with static fields\n// when compiling to ES5.\n// https://github.com/google/closure-compiler/issues/3177\nReactiveElement[JSCompiler_renameProperty('elementProperties', ReactiveElement)] = new Map();\nReactiveElement[JSCompiler_renameProperty('finalized', ReactiveElement)] = new Map();\n// Apply polyfills if available\npolyfillSupport?.({ ReactiveElement });\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = [\n 'change-in-update',\n 'async-perform-update',\n ];\n const ensureOwnWarnings = function (ctor) {\n if (!ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))) {\n ctor.enabledWarnings = ctor.enabledWarnings.slice();\n }\n };\n ReactiveElement.enableWarning = function (warning) {\n ensureOwnWarnings(this);\n if (!this.enabledWarnings.includes(warning)) {\n this.enabledWarnings.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (warning) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings.splice(i, 1);\n }\n };\n}\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('2.1.2');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n queueMicrotask(() => {\n issueWarning('multiple-versions', `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`);\n });\n}\n//# sourceMappingURL=reactive-element.js.map",
7
- "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * The main LitElement module, which defines the {@linkcode LitElement} base\n * class and related APIs.\n *\n * LitElement components can define a template and a set of observed\n * properties. Changing an observed property triggers a re-render of the\n * element.\n *\n * Import {@linkcode LitElement} and {@linkcode html} from this module to\n * create a component:\n *\n * ```js\n * import {LitElement, html} from 'lit-element';\n *\n * class MyElement extends LitElement {\n *\n * // Declare observed properties\n * static get properties() {\n * return {\n * adjective: {}\n * }\n * }\n *\n * constructor() {\n * this.adjective = 'awesome';\n * }\n *\n * // Define the element's template\n * render() {\n * return html`<p>your ${adjective} template here</p>`;\n * }\n * }\n *\n * customElements.define('my-element', MyElement);\n * ```\n *\n * `LitElement` extends {@linkcode ReactiveElement} and adds lit-html\n * templating. The `ReactiveElement` class is provided for users that want to\n * build their own custom element base classes that don't use lit-html.\n *\n * @packageDocumentation\n */\nimport { ReactiveElement } from '@lit/reactive-element';\nimport { render, noChange } from 'lit-html';\nexport * from '@lit/reactive-element';\nexport * from 'lit-html';\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = (prop, _obj) => prop;\nconst DEV_MODE = true;\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\nlet issueWarning;\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n global.litIssuedWarnings ??= new Set();\n /**\n * Issue a warning if we haven't already, based either on `code` or `warning`.\n * Warnings are disabled automatically only by `warning`; disabling via `code`\n * can be done by users.\n */\n issueWarning = (code, warning) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!global.litIssuedWarnings.has(warning) &&\n !global.litIssuedWarnings.has(code)) {\n console.warn(warning);\n global.litIssuedWarnings.add(warning);\n }\n };\n}\n/**\n * Base element class that manages element properties and attributes, and\n * renders a lit-html template.\n *\n * To define a component, subclass `LitElement` and implement a\n * `render` method to provide the component's template. Define properties\n * using the {@linkcode LitElement.properties properties} property or the\n * {@linkcode property} decorator.\n */\nexport class LitElement extends ReactiveElement {\n constructor() {\n super(...arguments);\n /**\n * @category rendering\n */\n this.renderOptions = { host: this };\n this.__childPart = undefined;\n }\n /**\n * @category rendering\n */\n createRenderRoot() {\n const renderRoot = super.createRenderRoot();\n // When adoptedStyleSheets are shimmed, they are inserted into the\n // shadowRoot by createRenderRoot. Adjust the renderBefore node so that\n // any styles in Lit content render before adoptedStyleSheets. This is\n // important so that adoptedStyleSheets have precedence over styles in\n // the shadowRoot.\n this.renderOptions.renderBefore ??= renderRoot.firstChild;\n return renderRoot;\n }\n /**\n * Updates the element. This method reflects property values to attributes\n * and calls `render` to render DOM via lit-html. Setting properties inside\n * this method will *not* trigger another update.\n * @param changedProperties Map of changed properties with old values\n * @category updates\n */\n update(changedProperties) {\n // Setting properties in `render` should not trigger an update. Since\n // updates are allowed after super.update, it's important to call `render`\n // before that.\n const value = this.render();\n if (!this.hasUpdated) {\n this.renderOptions.isConnected = this.isConnected;\n }\n super.update(changedProperties);\n this.__childPart = render(value, this.renderRoot, this.renderOptions);\n }\n /**\n * Invoked when the component is added to the document's DOM.\n *\n * In `connectedCallback()` you should setup tasks that should only occur when\n * the element is connected to the document. The most common of these is\n * adding event listeners to nodes external to the element, like a keydown\n * event handler added to the window.\n *\n * ```ts\n * connectedCallback() {\n * super.connectedCallback();\n * addEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * Typically, anything done in `connectedCallback()` should be undone when the\n * element is disconnected, in `disconnectedCallback()`.\n *\n * @category lifecycle\n */\n connectedCallback() {\n super.connectedCallback();\n this.__childPart?.setConnected(true);\n }\n /**\n * Invoked when the component is removed from the document's DOM.\n *\n * This callback is the main signal to the element that it may no longer be\n * used. `disconnectedCallback()` should ensure that nothing is holding a\n * reference to the element (such as event listeners added to nodes external\n * to the element), so that it is free to be garbage collected.\n *\n * ```ts\n * disconnectedCallback() {\n * super.disconnectedCallback();\n * window.removeEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * An element may be re-connected after being disconnected.\n *\n * @category lifecycle\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__childPart?.setConnected(false);\n }\n /**\n * Invoked on each update to perform rendering tasks. This method may return\n * any value renderable by lit-html's `ChildPart` - typically a\n * `TemplateResult`. Setting properties inside this method will *not* trigger\n * the element to update.\n * @category rendering\n */\n render() {\n return noChange;\n }\n}\n// This property needs to remain unminified.\nLitElement['_$litElement$'] = true;\n/**\n * Ensure this class is marked as `finalized` as an optimization ensuring\n * it will not needlessly try to `finalize`.\n *\n * Note this property name is a string to prevent breaking Closure JS Compiler\n * optimizations. See @lit/reactive-element for more information.\n */\nLitElement[JSCompiler_renameProperty('finalized', LitElement)] = true;\n// Install hydration if available\nglobal.litElementHydrateSupport?.({ LitElement });\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n ? global.litElementPolyfillSupportDevMode\n : global.litElementPolyfillSupport;\npolyfillSupport?.({ LitElement });\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports mangled in the\n * client side code, we export a _$LE object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-html, since this module re-exports all of lit-html.\n *\n * @private\n */\nexport const _$LE = {\n _$attributeToProperty: (el, name, value) => {\n // eslint-disable-next-line\n el._$attributeToProperty(name, value);\n },\n // eslint-disable-next-line\n _$changedProperties: (el) => el._$changedProperties,\n};\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for LitElement usage.\n(global.litElementVersions ??= []).push('4.2.2');\nif (DEV_MODE && global.litElementVersions.length > 1) {\n queueMicrotask(() => {\n issueWarning('multiple-versions', `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`);\n });\n}\n//# sourceMappingURL=lit-element.js.map"
8
- ],
9
- "mappings": ";;;;;;AAKA,IAAM,YAAY;AAElB,IAAM,SAAS;AAIR,IAAM,8BAA8B,OAAO,eAC7C,OAAO,aAAa,aAAa,OAAO,SAAS,iBAClD,wBAAwB,SAAS,aACjC,aAAa,cAAc;AAC/B,IAAM,oBAAoB,OAAO;AACjC,IAAM,cAAc,IAAI;AAAA;AAQjB,MAAM,UAAU;AAAA,EACnB,WAAW,CAAC,SAAS,SAAS,WAAW;AAAA,IAErC,KAAK,kBAAkB;AAAA,IACvB,IAAI,cAAc,mBAAmB;AAAA,MACjC,MAAM,IAAI,MAAM,mEAAmE;AAAA,IACvF;AAAA,IACA,KAAK,UAAU;AAAA,IACf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OAAO;AAC/C,IAAI,aAAY,QAAO,mBAAmB,SAAS,GAAG;AAAA,EAClD,eAAe,MAAM;AAAA,IACjB,cAAa,qBAAqB,gEAC9B,qBAAqB;AAAA,GAC5B;AACL;",
10
- "debugId": "5925B997A81EB5AC64756E2164756E21",
11
- "names": []
12
- }
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../node_modules/@spectrum-web-components/base/src/define-element.dev.js"],
4
- "sourcesContent": [
5
- "\"use strict\";\nexport function defineElement(name, constructor) {\n if (window.__swc && true) {\n if (customElements.get(name)) {\n window.__swc.warn(\n void 0,\n `Attempted to redefine <${name}>. This usually indicates that multiple versions of the same web component were loaded onto a single page.`,\n \"https://opensource.adobe.com/spectrum-web-components/registry-conflicts\"\n );\n }\n }\n customElements.define(name, constructor);\n}\n//# sourceMappingURL=define-element.dev.js.map\n"
6
- ],
7
- "mappings": ";AACO,SAAS,aAAa,CAAC,MAAM,aAAa;AAAA,EAC/C,IAAI,OAAO,SAAS,MAAM;AAAA,IACxB,IAAI,eAAe,IAAI,IAAI,GAAG;AAAA,MAC5B,OAAO,MAAM,KACN,WACL,0BAA0B,kHAC1B,yEACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,eAAe,OAAO,MAAM,WAAW;AAAA;",
8
- "debugId": "617A460E72FE48EA64756E2164756E21",
9
- "names": []
10
- }
@@ -1,13 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/panels/stylebook-doc.ts", "../src/style/project-styles.ts", "../src/panels/stylebook-panel.ts", "../src/commands/defaults.ts"],
4
- "sourcesContent": [
5
- "/**\n * Stylebook specimen-document generator — pure functions (no DOM) that turn the static element\n * catalog (data/stylebook-meta.json) plus the project's component registry into a plain JxDocument\n * the iframe canvas renders like any page. Each breakpoint panel renders the SAME generated doc in\n * a width-sized iframe, so `@media` blocks evaluate for real — this replaces the legacy parent-side\n * inline-style flatten (`buildStylebookElement`/`refreshStylebookStyles`).\n *\n * Two runtime facts shape {@link transposeStylebookStyle}:\n *\n * 1. The runtime's `applyStyle` emits `@media.selector` nesting but DROPS `selector.@media`\n * (`emitNested` skips `@` keys) — the legacy flatten honored both orders, so tag rules' embedded\n * `@name` blocks are HOISTED into the corresponding top-level `@name` block here.\n * 2. Tag-keyed rules on the generated root would restyle the card chrome (`div` rules hit chrome\n * divs), so every tag rule `T` is re-keyed to `` `& .element-card-preview ${T}` `` — applyStyle\n * resolves `&` to the root's `[data-jx=uid]` scope, confining the cascade to specimens.\n */\n\nimport { serializeJxPath } from \"../canvas/path-mapping\";\nimport type { StylebookEntry } from \"./stylebook-panel\";\nimport type { ComponentEntry } from \"../files/components\";\nimport type { JxPath } from \"../state\";\nimport type { JxMutableNode, JxStyle } from \"@jxsuite/schema/types\";\n\nexport interface StylebookDocResult {\n /** The specimen document (plain JSON — safe to post over the bridge). */\n doc: JxMutableNode;\n /** SerializeJxPath(path) → tag or compound (\"ul li\") for hit decoding. Chrome paths absent. */\n pathToTag: Map<string, string>;\n /** Tag/compound → the FIRST matching card's document path (selection-overlay measurement). */\n tagToCardPath: Map<string, JxPath>;\n}\n\n/** Selector-key classifier — a bare tag path like \"p\" or \"table th\" (mirrors style-panel's rule). */\nfunction isTagPath(key: string): boolean {\n return (\n !key.startsWith(\":\") &&\n !key.startsWith(\".\") &&\n !key.startsWith(\"&\") &&\n !key.startsWith(\"[\") &&\n !key.startsWith(\"@\") &&\n !key.startsWith(\"--\")\n );\n}\n\nfunction isPlainObject(v: unknown): v is Record<string, unknown> {\n return v !== null && typeof v === \"object\" && !Array.isArray(v);\n}\n\n/** The specimen-scoping selector prefix (see module doc, runtime fact 2). */\nconst SPECIMEN_SCOPE = \"& .element-card-preview\";\n\n/** Deep-merge `add` into `base` (objects merge, scalars overwrite; add wins). */\nfunction mergeRules(\n base: Record<string, unknown> | undefined,\n add: Record<string, unknown>,\n): Record<string, unknown> {\n const out: Record<string, unknown> = { ...base };\n for (const [k, v] of Object.entries(add)) {\n out[k] = isPlainObject(v) && isPlainObject(out[k]) ? mergeRules(out[k], v) : v;\n }\n return out;\n}\n\n/** Drop nested `@` keys from a rule object (already-hoisted media can't nest deeper). */\nfunction stripAtKeys(rule: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(rule)) {\n if (isPlainObject(v) && k.startsWith(\"@\")) {\n continue;\n }\n out[k] = isPlainObject(v) ? stripAtKeys(v) : v;\n }\n return out;\n}\n\n/**\n * Transform the merged effective document style into the generated root's style block: flat scalars\n * and `--` custom props stay at the top (inheritance into specimens), tag rules are re-keyed under\n * {@link SPECIMEN_SCOPE}, and `selector.@media` nesting is hoisted into top-level `@name` blocks\n * (both per the module doc). Shared by the doc generator and the live `styleUpdate` fast path so an\n * edit round-trips through the exact same transform.\n */\nexport function transposeStylebookStyle(effectiveStyle: JxStyle): JxStyle {\n const style = effectiveStyle as Record<string, unknown>;\n const out: Record<string, unknown> = {};\n const mediaOut: Record<string, Record<string, unknown>> = {};\n\n /** Re-key + hoist one tag rule subtree; returns the cleaned (media-free) rule. */\n const processTagRule = (\n rule: Record<string, unknown>,\n tagPath: string,\n ): Record<string, unknown> => {\n const cleaned: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(rule)) {\n if (!isPlainObject(v)) {\n cleaned[k] = v;\n continue;\n }\n if (k.startsWith(\"@\")) {\n if (k === \"@--\") {\n continue; // Base canvas width marker, not a real query.\n }\n mediaOut[k] ??= {};\n const bucket = mediaOut[k];\n const sel = `${SPECIMEN_SCOPE} ${tagPath}`;\n bucket[sel] = mergeRules(\n bucket[sel] as Record<string, unknown> | undefined,\n stripAtKeys(v),\n );\n continue;\n }\n if (isTagPath(k)) {\n cleaned[k] = processTagRule(v, `${tagPath} ${k}`);\n continue;\n }\n cleaned[k] = v; // Pseudo/class/& sub-rules ride along under the re-keyed parent.\n }\n return cleaned;\n };\n\n for (const [k, v] of Object.entries(style)) {\n if (!isPlainObject(v)) {\n out[k] = v; // Flat scalars + -- custom props.\n continue;\n }\n if (k.startsWith(\"@\")) {\n if (k === \"@--\") {\n continue;\n }\n // Media block: re-key tag rules inside; non-tag keys (scalars/pseudo) apply to the root.\n mediaOut[k] ??= {};\n const bucket = mediaOut[k];\n for (const [mk, mv] of Object.entries(v)) {\n if (isPlainObject(mv) && isTagPath(mk)) {\n const sel = `${SPECIMEN_SCOPE} ${mk}`;\n bucket[sel] = mergeRules(bucket[sel] as Record<string, unknown> | undefined, mv);\n } else {\n bucket[mk] = mv;\n }\n }\n continue;\n }\n if (isTagPath(k)) {\n out[`${SPECIMEN_SCOPE} ${k}`] = processTagRule(v, k);\n continue;\n }\n out[k] = v;\n }\n\n for (const [mk, mv] of Object.entries(mediaOut)) {\n out[mk] = isPlainObject(out[mk]) ? mergeRules(out[mk] as Record<string, unknown>, mv) : mv;\n }\n return out as JxStyle;\n}\n\n/** Resolve a nested tag path (\"table th\") in a style object; null when absent. */\nfunction resolveNestedStyle(\n style: Record<string, unknown>,\n tagPath: string,\n): Record<string, unknown> | null {\n const parts = tagPath.split(\" \");\n let obj: unknown = style;\n for (const part of parts) {\n if (!isPlainObject(obj)) {\n return null;\n }\n obj = obj[part];\n }\n return isPlainObject(obj) ? obj : null;\n}\n\n/** Whether the effective style customizes `tagPath` (directly or under any `@media` block). */\nexport function hasTagStyle(rootStyle: JxStyle, tagPath: string): boolean {\n const style = rootStyle as Record<string, unknown>;\n const direct = resolveNestedStyle(style, tagPath);\n if (direct && Object.keys(direct).length > 0) {\n return true;\n }\n for (const [key, val] of Object.entries(style)) {\n if (!key.startsWith(\"@\") || !isPlainObject(val)) {\n continue;\n }\n const nested = resolveNestedStyle(val, tagPath);\n if (nested && Object.keys(nested).length > 0) {\n return true;\n }\n }\n return false;\n}\n\n/** Options for {@link buildStylebookDoc}. */\nexport interface BuildStylebookDocOpts {\n meta: { $sections: { label: string; elements: StylebookEntry[] }[] };\n components: ComponentEntry[];\n /** Merged document+project style (getEffectiveStyle output) — transposed here. */\n effectiveStyle: JxStyle;\n /** Merged $media map (getEffectiveMedia output) — becomes the doc's $media. */\n effectiveMedia: Record<string, string>;\n filter: string;\n customizedOnly: boolean;\n projectRoot: string | null;\n}\n\n/**\n * Build the specimen document + path↔tag maps. Deterministic: paths are recorded as the tree is\n * assembled, so the parent can decode `hit` paths and measure selection cards without reading the\n * iframe DOM.\n */\nexport function buildStylebookDoc(opts: BuildStylebookDocOpts): StylebookDocResult {\n const pathToTag = new Map<string, string>();\n const tagToCardPath = new Map<string, JxPath>();\n const filter = opts.filter.toLowerCase();\n\n /** Register a specimen subtree's paths: root → tag; descendants → compound (legacy semantics). */\n const registerSpecimenPaths = (entry: StylebookEntry, path: JxPath, rootTag: string): void => {\n const compound = entry.tag === rootTag ? rootTag : `${rootTag} ${entry.tag}`;\n pathToTag.set(serializeJxPath(path), compound);\n const kids = entry.children ?? [];\n for (const [i, child] of kids.entries()) {\n registerSpecimenPaths(child, [...path, \"children\", i], rootTag);\n }\n };\n\n const specimenNode = (entry: StylebookEntry): JxMutableNode => {\n const attributes: Record<string, string> = { ...entry.attributes };\n if (entry.style) {\n attributes.style = entry.style; // Inline CSS text — legacy `el.style.cssText` parity.\n }\n return {\n tagName: entry.tag,\n ...(entry.text ? { textContent: entry.text } : {}),\n ...(Object.keys(attributes).length > 0 ? { attributes } : {}),\n ...(entry.children ? { children: entry.children.map(specimenNode) } : {}),\n } as JxMutableNode;\n };\n\n /** A card wrapping one specimen; registers card/preview/specimen paths under `tag`. */\n const cardNode = (\n tag: string,\n label: string,\n specimen: JxMutableNode,\n cardPath: JxPath,\n entryForPaths: StylebookEntry | null,\n ): JxMutableNode => {\n pathToTag.set(serializeJxPath(cardPath), tag);\n pathToTag.set(serializeJxPath([...cardPath, \"children\", 0]), tag);\n const specimenPath = [...cardPath, \"children\", 0, \"children\", 0];\n if (entryForPaths) {\n registerSpecimenPaths(entryForPaths, specimenPath, tag);\n } else {\n pathToTag.set(serializeJxPath(specimenPath), tag);\n }\n if (!tagToCardPath.has(tag)) {\n tagToCardPath.set(tag, cardPath);\n }\n return {\n attributes: { class: \"element-card\" },\n children: [\n { attributes: { class: \"element-card-preview\" }, children: [specimen], tagName: \"div\" },\n { attributes: { class: \"element-card-label\" }, tagName: \"div\", textContent: label },\n ],\n tagName: \"div\",\n } as JxMutableNode;\n };\n\n const sections: JxMutableNode[] = [];\n const sectionNode = (label: string, cards: JxMutableNode[]): JxMutableNode =>\n ({\n attributes: { class: \"sb-section\" },\n children: [\n { attributes: { class: \"sb-label\" }, tagName: \"div\", textContent: label },\n { attributes: { class: \"sb-body\" }, children: cards, tagName: \"div\" },\n ],\n tagName: \"div\",\n }) as JxMutableNode;\n\n // Paths below mirror the assembled tree: root.children[si] = section; section.children[1] =\n // Sb-body; body.children[ci] = card. Sections are appended only when non-empty, so indices are\n // Computed from the OUTPUT arrays, not the input catalog.\n const sectionBodyPath = (): JxPath => [\"children\", sections.length, \"children\", 1];\n\n for (const section of opts.meta.$sections) {\n let entries = section.elements;\n if (filter) {\n entries = entries.filter(\n (e) => e.tag.includes(filter) || section.label.toLowerCase().includes(filter),\n );\n }\n if (opts.customizedOnly) {\n entries = entries.filter((e) => hasTagStyle(opts.effectiveStyle, e.tag));\n }\n if (entries.length === 0) {\n continue;\n }\n const bodyPath = sectionBodyPath();\n const cards = entries.map((entry, ci) =>\n cardNode(\n entry.tag,\n `<${entry.tag}>`,\n specimenNode(entry),\n [...bodyPath, \"children\", ci],\n entry,\n ),\n );\n sections.push(sectionNode(section.label, cards));\n }\n\n // Custom components from the registry — live custom elements registered via $elements.\n const $elements: (string | { $ref: string })[] = [];\n {\n let comps = opts.components;\n if (filter) {\n comps = comps.filter((c) => c.tagName.toLowerCase().includes(filter));\n }\n if (opts.customizedOnly) {\n comps = comps.filter((c) => hasTagStyle(opts.effectiveStyle, c.tagName));\n }\n if (comps.length > 0) {\n const bodyPath = sectionBodyPath();\n const cards = comps.map((comp, ci) => {\n const cardPath = [...bodyPath, \"children\", ci];\n const renderable = comp.source !== \"npm\" && comp.path?.endsWith(\".json\");\n if (renderable) {\n // Root-relative $ref: registerElements resolves it against docBase (the canvas origin).\n // Collapse leading slashes — an absolute projectRoot (\"/home/…\") would otherwise produce\n // A protocol-relative \"//home/…\" that URL-resolves to a foreign host.\n $elements.push({\n $ref: `/${opts.projectRoot ? `${opts.projectRoot}/` : \"\"}${comp.path}`.replace(\n /^\\/+/,\n \"/\",\n ),\n });\n const attributes: Record<string, string> = {};\n for (const p of comp.props ?? []) {\n if (p.default !== undefined && p.default !== \"false\" && p.default !== \"''\") {\n attributes[p.name] = String(p.default).replaceAll(/^'|'$/g, \"\");\n }\n }\n const specimen = {\n tagName: comp.tagName,\n ...(Object.keys(attributes).length > 0 ? { attributes } : {}),\n } as JxMutableNode;\n return cardNode(comp.tagName, `<${comp.tagName}>`, specimen, cardPath, null);\n }\n // Npm/format-class components can't be $ref-registered — placeholder box (legacy parity).\n const fallback = {\n attributes: { class: \"sb-fallback\" },\n tagName: \"div\",\n textContent: `<${comp.tagName}>`,\n } as JxMutableNode;\n return cardNode(comp.tagName, `<${comp.tagName}>`, fallback, cardPath, null);\n });\n sections.push(sectionNode(\"Components\", cards));\n }\n }\n\n if (sections.length === 0) {\n sections.push({\n attributes: { class: \"sb-empty\" },\n tagName: \"div\",\n textContent: opts.customizedOnly ? \"No customized elements\" : \"No matching elements\",\n } as JxMutableNode);\n }\n\n const doc = {\n ...($elements.length > 0 ? { $elements } : {}),\n $media: opts.effectiveMedia,\n attributes: { class: \"sb-root\" },\n children: sections,\n style: transposeStylebookStyle(opts.effectiveStyle),\n tagName: \"div\",\n } as JxMutableNode;\n\n return { doc, pathToTag, tagToCardPath };\n}\n",
6
- "/**\n * Project Styles — the model behind the project's design tokens and element defaults.\n *\n * ## The name and the wire value are different things\n *\n * The surface a user reaches is called **Project Styles** (plan §9.4). The canvas view it opens is\n * the string `\"stylebook\"`, a member of `CANVAS_MODES` in\n * {@link file://../canvas/iframe-protocol.ts} and therefore half of a `ParentToIframe` union: the\n * studio bundle and `dist/iframe-entry.js` agree on it, and changing it means rebuilding both in\n * lockstep. So it is not a name and may never be renamed to follow one.\n * {@link PROJECT_STYLES_TITLE} is the name; {@link PROJECT_STYLES_VIEW} is the wire value; a\n * surface that needs one must not reach for the other.\n *\n * ## One vocabulary for the `@` blocks\n *\n * A token's value can differ per rendering context, and on disk every such override lives in the\n * same place — a `@<name>` block beside the token, keyed by a `$media` entry name. Breakpoints and\n * colour schemes are two _kinds_ of that one thing, and this module models them as one\n * {@link TokenContext} list so a surface cannot grow a second override path for the second kind (a\n * per-scheme writer and a per-media writer that disagreed about pruning an emptied block is exactly\n * what this replaces). Contexts are **defined** in Project Settings › Contexts and only selected or\n * overridden here — §2 principle 5.\n *\n * On-disk format is unchanged by anything in this module: it reads and writes the same\n * `style[\"--token\"]` and `style[\"@--ctx\"][\"--token\"]` shapes the compiler already consumes.\n */\n\nimport { parseMediaEntries, schemeOfQuery } from \"../utils/canvas-media\";\nimport { varDisplayName } from \"../utils/studio-utils\";\n\nimport type { JxStyle } from \"@jxsuite/schema/types\";\nimport type { CanvasMode } from \"../canvas/iframe-protocol\";\n\n/** What the surface is called, everywhere a reader sees it. One definition site. */\nexport const PROJECT_STYLES_TITLE = \"Project Styles\";\n\n/**\n * The canvas view Project Styles opens — a WIRE value, not a name. See the module doc: it is a\n * `CANVAS_MODES` member shared with the iframe bundle, and it stays `\"stylebook\"`.\n */\nexport const PROJECT_STYLES_VIEW: CanvasMode = \"stylebook\";\n\n// ─── Token groups ────────────────────────────────────────────────────────────\n\n/** The four buckets the token editor lists, in display order. */\nexport type TokenGroupId = \"color\" | \"font\" | \"size\" | \"other\";\n\nexport interface TokenGroup {\n id: TokenGroupId;\n /** The group heading. */\n title: string;\n /** The prefix a token added in this group is named under. */\n prefix: string;\n}\n\n/**\n * The groups, in order. `other` is rendered only when something lands in it — a bucket named\n * \"Other\" over an empty list teaches nothing (§2 principle 6).\n *\n * A group is a name and a prefix and nothing else. The example values an add row hints with are a\n * property of the FORM, not of the model, and they live beside the form that shows them.\n */\nexport const TOKEN_GROUPS: readonly TokenGroup[] = [\n { id: \"color\", prefix: \"--color-\", title: \"Colors\" },\n { id: \"font\", prefix: \"--font-\", title: \"Fonts\" },\n { id: \"size\", prefix: \"--size-\", title: \"Sizes & Spacing\" },\n { id: \"other\", prefix: \"--\", title: \"Other\" },\n];\n\n/**\n * Which group a custom property belongs to, by prefix.\n *\n * @param {string} name\n * @returns {TokenGroupId}\n */\nexport function groupIdOfToken(name: string): TokenGroupId {\n if (name.startsWith(\"--color\")) {\n return \"color\";\n }\n if (name.startsWith(\"--font\")) {\n return \"font\";\n }\n if (name.startsWith(\"--size\") || name.startsWith(\"--spacing\") || name.startsWith(\"--radius\")) {\n return \"size\";\n }\n return \"other\";\n}\n\n/**\n * The label a reader sees for a token: the friendly name it was added under, recovered from the\n * variable name. `--color-primary-blue` → \"Primary Blue\".\n *\n * The `other` group keeps its raw name deliberately — a token there has no prefix to strip, so \"Z\n * Index Modal\" would be a guess at a name its author never typed.\n *\n * @param {string} name\n * @returns {string}\n */\nexport function tokenLabel(name: string): string {\n const group = groupIdOfToken(name);\n if (group === \"other\") {\n return name;\n }\n /*\n * `varDisplayName` falls back to stripping a bare `--` when the prefix does not match, which is\n * what turns `--spacing-lg` (group `size`, prefix `--size-`) into \"Spacing Lg\". The predecessor\n * chained three prefixes with `||` and never reached the second, because the first always\n * returns a truthy string.\n */\n const { prefix } = TOKEN_GROUPS.find((g) => g.id === group)!;\n return varDisplayName(name, prefix);\n}\n\n// ─── Tokens ──────────────────────────────────────────────────────────────────\n\n/** One design token declared at the top level of a style block. */\nexport interface ProjectToken {\n /** The custom property, e.g. `--color-primary`. */\n name: string;\n group: TokenGroupId;\n /** What a reader sees — {@link tokenLabel}. */\n label: string;\n value: string | number;\n}\n\n/**\n * Every design token in a style block, in declaration order.\n *\n * Non-custom properties (`color: blue`) and object values are not tokens and are skipped — an\n * object under a `--` key is malformed, and every `@ctx` block is an object by construction.\n *\n * @param {JxStyle | null | undefined} style\n * @returns {ProjectToken[]}\n */\nexport function listTokens(style: JxStyle | null | undefined): ProjectToken[] {\n if (!style) {\n return [];\n }\n const out: ProjectToken[] = [];\n for (const [name, value] of Object.entries(style)) {\n if (!name.startsWith(\"--\")) {\n continue;\n }\n if (typeof value !== \"string\" && typeof value !== \"number\") {\n continue;\n }\n out.push({ group: groupIdOfToken(name), label: tokenLabel(name), name, value });\n }\n return out;\n}\n\n/**\n * Group tokens for display: every group in {@link TOKEN_GROUPS} order, each with its members.\n *\n * @param {JxStyle | null | undefined} style\n * @returns {{ group: TokenGroup; tokens: ProjectToken[] }[]}\n */\nexport function groupTokens(\n style: JxStyle | null | undefined,\n): { group: TokenGroup; tokens: ProjectToken[] }[] {\n const tokens = listTokens(style);\n return TOKEN_GROUPS.map((group) => ({\n group,\n tokens: tokens.filter((t) => t.group === group.id),\n }));\n}\n\n// ─── Rendering contexts ──────────────────────────────────────────────────────\n\n/**\n * What a context IS, for a reader. `size` is a breakpoint, `scheme` is a colour scheme, `feature`\n * is any other feature query. The distinction decides only how the row is labelled and whether it\n * is offered unprompted — the on-disk block is the same shape for all three.\n */\nexport type TokenContextKind = \"size\" | \"scheme\" | \"feature\";\n\n/** A declared `$media` entry, seen as a place a token can carry a different value. */\nexport interface TokenContext {\n /** The `$media` entry name, e.g. `--sm` or `--dark`. */\n name: string;\n /** The style key its overrides live under, e.g. `@--sm`. */\n key: string;\n /** What the reader sees: \"Dark\" for a scheme, the raw `@--sm` for anything else. */\n label: string;\n kind: TokenContextKind;\n /** Present only when `kind` is `\"scheme\"`. */\n scheme?: \"light\" | \"dark\";\n}\n\n/**\n * The contexts a token can be overridden in, derived from `$media`.\n *\n * Schemes come first because they are the pair a colour token is always asked about; breakpoints\n * follow in the order {@link parseMediaEntries} sorts them (the same order the canvas shows its\n * panels in), then any other feature query. `--` is the base canvas width, not a context.\n *\n * @param {Record<string, string> | null | undefined} media\n * @returns {TokenContext[]}\n */\nexport function listTokenContexts(\n media: Record<string, string> | null | undefined,\n): TokenContext[] {\n if (!media) {\n return [];\n }\n const { featureQueries, sizeBreakpoints } = parseMediaEntries(media);\n const schemes: TokenContext[] = [];\n const features: TokenContext[] = [];\n for (const { name, query } of featureQueries) {\n const scheme = schemeOfQuery(query);\n if (scheme) {\n schemes.push({\n key: `@${name}`,\n kind: \"scheme\",\n label: scheme === \"dark\" ? \"Dark\" : \"Light\",\n name,\n scheme,\n });\n } else {\n features.push({ key: `@${name}`, kind: \"feature\", label: `@${name}`, name });\n }\n }\n const sizes: TokenContext[] = sizeBreakpoints.map(({ name }) => ({\n key: `@${name}`,\n kind: \"size\",\n label: `@${name}`,\n name,\n }));\n return [...schemes, ...sizes, ...features];\n}\n\n// ─── Overrides ───────────────────────────────────────────────────────────────\n\n/** A token's value in one context, alongside the context it came from. */\nexport interface TokenOverride {\n context: TokenContext;\n value: string | number;\n}\n\n/**\n * The block a context's overrides live in, or undefined when the context carries none.\n *\n * @param {JxStyle} style\n * @param {TokenContext} context\n */\nfunction overrideBlock(style: JxStyle, context: TokenContext): Record<string, unknown> | undefined {\n const block = style[context.key];\n return block && typeof block === \"object\" ? (block as Record<string, unknown>) : undefined;\n}\n\n/**\n * A token's value in one context, or undefined when it inherits the base value.\n *\n * @param {JxStyle} style\n * @param {TokenContext} context\n * @param {string} token\n * @returns {string | number | undefined}\n */\nexport function readTokenOverride(\n style: JxStyle,\n context: TokenContext,\n token: string,\n): string | number | undefined {\n const value = overrideBlock(style, context)?.[token];\n return typeof value === \"string\" || typeof value === \"number\" ? value : undefined;\n}\n\n/**\n * Write or clear a token's override in one context, IN PLACE.\n *\n * An empty value clears it, and an emptied block is removed rather than left as `\"@--dark\": {}` — a\n * block that exists but says nothing is a diff on every save and a rule the compiler emits for no\n * reason. The block is recreated on demand, so a caller holding a stale render still writes to the\n * right place.\n *\n * @param {JxStyle} style\n * @param {TokenContext} context\n * @param {string} token\n * @param {string} value — empty clears\n */\nexport function writeTokenOverride(\n style: JxStyle,\n context: TokenContext,\n token: string,\n value: string,\n): void {\n if (value) {\n const block = (style[context.key] ??= {}) as Record<string, unknown>;\n block[token] = value;\n return;\n }\n const block = overrideBlock(style, context);\n if (!block) {\n return;\n }\n delete block[token];\n if (Object.keys(block).length === 0) {\n delete style[context.key];\n }\n}\n\n/**\n * Every context in which a token already carries an override, in {@link listTokenContexts} order.\n *\n * @param {JxStyle} style\n * @param {readonly TokenContext[]} contexts\n * @param {string} token\n * @returns {TokenOverride[]}\n */\nexport function tokenOverrides(\n style: JxStyle,\n contexts: readonly TokenContext[],\n token: string,\n): TokenOverride[] {\n const out: TokenOverride[] = [];\n for (const context of contexts) {\n const value = readTokenOverride(style, context, token);\n if (value !== undefined) {\n out.push({ context, value });\n }\n }\n return out;\n}\n\n/**\n * The contexts a token can still be given an override in — the add affordance's menu.\n *\n * The predecessor had none: an override row appeared only for a token that already carried an\n * `@media` block, so the only way to create the first one was to hand-edit `project.json`. This is\n * the list of contexts that are declared and not yet used, minus the ones already shown unprompted\n * (`alreadyShown`), so the menu never offers a row the reader is already looking at.\n *\n * @param {JxStyle} style\n * @param {readonly TokenContext[]} contexts\n * @param {string} token\n * @param {readonly TokenContext[]} [alreadyShown]\n * @returns {TokenContext[]}\n */\nexport function addableContexts(\n style: JxStyle,\n contexts: readonly TokenContext[],\n token: string,\n alreadyShown: readonly TokenContext[] = [],\n): TokenContext[] {\n const shown = new Set(alreadyShown.map((c) => c.name));\n return contexts.filter(\n (context) => !shown.has(context.name) && readTokenOverride(style, context, token) === undefined,\n );\n}\n",
7
- "/// <reference lib=\"dom\" />\n/**\n * The **Project Styles** canvas — the element catalogue with its per-file style defaults, rendered\n * through the IFRAME canvas pipeline: a specimen document is generated parent-side\n * ({@link file://./stylebook-doc.ts}) and mounted per breakpoint panel via `mountStylebookCanvas`,\n * so each panel is a real width-sized viewport and `@media` blocks evaluate for real (no JS\n * flatten). Hits decode to tags in the host and route back here through the injected stylebook-hit\n * handler (`setStylebookHitHandler` in studio.ts).\n *\n * Every identifier here still says `stylebook`, and that is deliberate: `\"stylebook\"` is the\n * `CANVAS_MODES` wire value this module mounts against, shared with `dist/iframe-entry.js`. The\n * user-facing name is {@link PROJECT_STYLES_TITLE} and nothing a reader sees may be spelled from\n * the wire value — see {@link file://../style/project-styles.ts}.\n */\n\nimport { html, render as litRender } from \"lit-html\";\nimport { ref } from \"lit-html/directives/ref.js\";\nimport { classMap } from \"lit-html/directives/class-map.js\";\nimport { live } from \"lit-html/directives/live.js\";\n\nimport { projectState, updateSession } from \"../store\";\nimport type { CanvasSurface } from \"../canvas/canvas-surface\";\nimport { tabOfPane } from \"../canvas/canvas-surface\";\nimport { activeTab } from \"../workspace/workspace\";\nimport { shell } from \"../shell\";\nimport { componentRegistry } from \"../files/components\";\nimport { getEffectiveMedia, getEffectiveStyle } from \"../site-context\";\nimport { parseMediaEntries } from \"../utils/canvas-media\";\nimport { mediaDisplayName } from \"./shared\";\nimport { buildStylebookDoc } from \"./stylebook-doc\";\nimport { PROJECT_STYLES_TITLE } from \"../style/project-styles\";\nimport { mountStylebookCanvas, panToStylebookTag } from \"../canvas/iframe-host\";\nimport stylebookMeta from \"../../data/stylebook-meta.json\";\nimport type { TemplateResult } from \"lit-html\";\nimport type { CanvasPanel } from \"../types\";\n\nexport interface StylebookEntry {\n tag: string;\n text?: string;\n attributes?: Record<string, string>;\n style?: string;\n children?: StylebookEntry[];\n}\n\ninterface StylebookCtx {\n canvasPanelTemplate: (\n mediaName: string | null,\n label: string | null,\n fullWidth: boolean,\n width?: number | null,\n ) => { tpl: TemplateResult; panel: CanvasPanel };\n applyTransform: (surface: CanvasSurface) => void;\n observeCenterUntilStable: (surface: CanvasSurface) => void;\n updateActivePanelHeaders: (surface: CanvasSurface) => void;\n}\n\nexport { default as stylebookMeta } from \"../../data/stylebook-meta.json\";\n\n/**\n * Render the stylebook mode into the canvas: chrome bar + one iframe panel per breakpoint, all\n * mounting the SAME generated specimen document.\n *\n * @param {StylebookCtx} ctx\n */\nexport function renderStylebookMode(surface: CanvasSurface, ctx: StylebookCtx) {\n const canvasWrap = surface.wrap;\n /* THIS stage's tab. It was `activeTab.value` — the focused pane's — so a Stylebook drawn in the\n unfocused pane took its `$media` breakpoints from whatever document the keyboard was in, and\n rebuilt its specimen columns at the other document's widths. Found by the fourth rule in\n `scripts/check-pane-singletons.ts`, which is the whole reason that rule is per-FUNCTION: this\n module is not a singleton and its other focus read is legitimate. */\n const tab = tabOfPane(surface.paneId);\n const filter = shell.stylebook.filter.toLowerCase();\n const { customizedOnly } = shell.stylebook;\n\n const effectiveMedia = getEffectiveMedia(tab?.doc.document?.$media);\n const { sizeBreakpoints, baseWidth } = parseMediaEntries(effectiveMedia);\n const hasMedia = sizeBreakpoints.length > 0;\n\n const onFilterInput = (e: Event) => {\n shell.stylebook.filter = (e.target as HTMLInputElement).value;\n };\n\n const onCustomizedToggle = () => {\n shell.stylebook.customizedOnly = !shell.stylebook.customizedOnly;\n };\n\n const chromeBarTpl = html`\n <div\n class=\"sb-chrome\"\n style=\"position:absolute;top:0;left:0;right:0;z-index:15;background:var(--bg-panel);border-bottom:1px solid var(--border)\"\n >\n <div\n style=\"display:flex;align-items:center;padding:4px 8px;gap:4px\"\n role=\"toolbar\"\n aria-label=${PROJECT_STYLES_TITLE}\n >\n <input\n class=\"field-input\"\n style=\"flex:1;max-width:200px\"\n placeholder=\"Filter…\"\n aria-label=\"Filter the ${PROJECT_STYLES_TITLE} catalogue\"\n .value=${live(shell.stylebook.filter)}\n @input=${onFilterInput}\n />\n <button\n class=${classMap({\n active: shell.stylebook.customizedOnly,\n \"tb-toggle\": true,\n })}\n aria-pressed=${String(shell.stylebook.customizedOnly)}\n title=\"Show only the elements this file has already styled\"\n @click=${onCustomizedToggle}\n >\n Customized\n </button>\n </div>\n </div>\n `;\n\n (canvasWrap as HTMLElement).style.overflow = \"hidden\";\n\n /** @type {{ name: string; displayName: string; width: number }[]} */\n const allPanelDefs = [];\n if (hasMedia) {\n allPanelDefs.push({\n displayName: mediaDisplayName(\"--\"),\n name: \"base\",\n width: baseWidth,\n });\n for (const bp of sizeBreakpoints) {\n allPanelDefs.push({\n displayName: mediaDisplayName(bp.name),\n name: bp.name,\n width: bp.width,\n });\n }\n }\n\n /** @type {{ tpl: import(\"lit-html\").TemplateResult; panel: CanvasPanel }[]} */\n let panelEntries;\n if (!hasMedia) {\n const hasBaseWidth = effectiveMedia && effectiveMedia[\"--\"];\n const label = hasBaseWidth ? `${mediaDisplayName(\"--\")} (${baseWidth}px)` : null;\n const entry = ctx.canvasPanelTemplate(\n hasBaseWidth ? \"base\" : null,\n label,\n !hasBaseWidth,\n hasBaseWidth ? baseWidth : undefined,\n );\n panelEntries = [{ panel: entry.panel, tpl: entry.tpl }];\n } else {\n panelEntries = allPanelDefs.map((def) => {\n const label = `${def.displayName} (${def.width}px)`;\n const { tpl, panel } = ctx.canvasPanelTemplate(def.name, label, false, def.width);\n return { panel, tpl };\n });\n }\n\n litRender(\n html`\n ${chromeBarTpl}\n <div\n class=\"panzoom-wrap\"\n style=\"transform-origin:0 0;padding-top:40px\"\n ${ref((el) => {\n if (el) {\n surface.panzoomWrap = el as HTMLDivElement;\n }\n })}\n >\n ${panelEntries.map((e) => e.tpl)}\n </div>\n `,\n /** @type {HTMLElement} */ canvasWrap,\n );\n\n // ONE generated doc shared by every panel — per-panel @media differentiation comes from each\n // Iframe's real viewport width, not from a per-panel style flatten.\n const generated = buildStylebookDoc({\n components: componentRegistry,\n customizedOnly: Boolean(customizedOnly),\n effectiveMedia: effectiveMedia ?? {},\n effectiveStyle: getEffectiveStyle(tab?.doc.document?.style),\n filter,\n meta: stylebookMeta as { $sections: { label: string; elements: StylebookEntry[] }[] },\n projectRoot: projectState?.projectRoot ?? null,\n });\n\n const { panels } = surface;\n for (const { panel } of panelEntries) {\n panels.push(panel);\n mountStylebookCanvas(\n surface.renderGeneration,\n generated,\n panel.canvas as HTMLElement,\n panel._width,\n );\n }\n if (hasMedia) {\n ctx.updateActivePanelHeaders(surface);\n }\n\n ctx.applyTransform(surface);\n ctx.observeCenterUntilStable(surface);\n}\n\n/**\n * Select a tag in the stylebook — shared by the canvas hit handler (via studio's\n * setStylebookHitHandler wiring), the stylebook layers panel, and the style panel. The host's\n * selection watcher tracks `shell.stylebook.selection` and measures the selected tag's card, so no\n * direct overlay drawing happens here.\n *\n * @param {string} tag\n * @param {string | null} [media]\n */\nexport function selectStylebookTag(tag: string, media?: string | null, { panCanvas = false } = {}) {\n shell.stylebook.selection = tag;\n updateSession(activeTab.value, {\n // The ROOT path, not an empty selection: stylebook mode has always parked the selection on the\n // Document element while the Style tab edits a TAG, and widening the field to a list changed\n // Which literal spells that — `[[]]` is one selected path, the root — not what it means.\n selection: [[]],\n ui: {\n activeSelector: tag,\n rightTab: \"style\",\n ...(media !== undefined ? { activeMedia: media } : {}),\n },\n });\n\n if (tag && panCanvas) {\n panToStylebookTag(tag);\n }\n}\n\n/** Re-exported for legacy consumers (the preview now lives in component-preview.ts). */\nexport { renderComponentPreview } from \"./component-preview\";\n",
8
- "/**\n * Defaults.ts — the first real command records.\n *\n * These are not examples. Each one is a capability Studio already has, written out in the form\n * every surface will read it from, with the implementation taken by injection ({@link CommandDeps})\n * so this module imports no state and can be loaded by a CI check in a bare Bun process. Next wave\n * the bootstrap passes the real functions; nothing about the records changes.\n *\n * The one value import is `isSpliceablePath` — a four-token predicate over a path array, from the\n * module that also enforces it inside the mutators. An enablement predicate and the mutator it\n * guards disagreeing about which paths are editable is exactly how a Delete comes to be offered on\n * a selection it corrupts, so the two read the same function rather than the same sentence.\n *\n * Two of them exist to settle arguments the current code has with itself:\n *\n * - `document.close` is ⌘W. Today `editor/shortcuts.ts:192` refuses to close the last tab while\n * `panels/tab-strip.ts:182`'s × closes it happily. Here the chord and the × button are the same\n * record, so they cannot disagree again.\n * - `selection.duplicate` is \"duplicate node\", implemented four times today. Its `requires` string is\n * what the block action bar's tooltip, the palette's grey subtitle and the agent's refusal all\n * print — one sentence, three consumers.\n *\n * The primary Command Bar cluster is capped at five by `scripts/check-chrome-budget.ts`; four are\n * spent here (Save, Undo, Redo, Open in Browser) exactly as plan §3.2 region ① specifies.\n */\n\nimport { isSpliceablePath } from \"../tabs/selection\";\n\nimport type { AnyCommand } from \"./registry\";\nimport type { CommandContext } from \"./context\";\n\n/**\n * Which dock {@link CommandDeps.toggleDock} addresses.\n *\n * The Command Bar draws three toggles, but only two come through this verb: the Bottom dock's is\n * `shell.ts`'s `view.toggleBottomDock`, which writes `shell.docks.bottom` directly now that the\n * dock is on the shell record. `\"bottom\"` survives in the union only because\n * `editor/shortcuts.ts`'s `toggleShellDock` still carries the branch that used to route ⌘J to the\n * Assistant — HANDOFF: that branch is now unreachable, and it goes with this member.\n */\nexport type DockId = \"navigator\" | \"inspector\" | \"bottom\";\n\n/**\n * Palette modes, echoed as a removable chip in the input (plan §5.4).\n *\n * The value space is the palette's namespace, declared once here so a new mode is a new member\n * rather than a new widget: P4's Problems and P7's content search slot in beside these.\n */\nexport type PaletteMode = \"picker\" | \"files\" | \"commands\" | \"nodes\" | \"projects\";\n\n/**\n * One panel, as the ⌘1–8 direct keys address it.\n *\n * Structurally the part of `panels/panel-registry.ts`'s `PanelRecord` a chord needs, declared here\n * rather than imported so this module keeps its one load-bearing property: it imports no state and\n * no DOM, which is what lets the three CI checks load the command set in a bare Bun process. The\n * ROSTER arrives by injection ({@link CommandDeps.panelRoster}) from the panel registry, so there\n * is still exactly one place a panel is named.\n */\nexport interface RailPanel {\n /** The panel's registry id — what `deps.focusPanel` is handed. */\n id: string;\n /** The panel's human name, which is also the command's title after \"Show \". */\n title: string;\n /** `false` for a panel with no rail button — reachable by name, not by number. */\n rail?: boolean;\n /** The panel's own visibility predicate, composed into the command's. */\n when?: (ctx: CommandContext) => boolean;\n}\n\n/** How many rail panels get a ⌘N. §3.2 ② spends exactly this many slots, four per level group. */\nexport const RAIL_CHORD_LIMIT = 8;\n\n/**\n * The Inspector's four tabs, in the order §3.2 ⑨ names them — which is the order ⌘⇧1–4 follow.\n *\n * `\"assistant\"` is a different dock (it is the Inspector's second instance until P3.6 folds the\n * column in), so it is not one of `shell.ts`'s `INSPECTOR_TAB_IDS`; the chord still belongs in the\n * same run of four, because a user counting tabs does not know that.\n */\nexport interface InspectorTab {\n /** The stored `session.ui.rightTab` value, or `\"assistant\"` for the assistant dock. */\n id: string;\n title: string;\n}\n\nexport const INSPECTOR_TABS: readonly InspectorTab[] = [\n { id: \"properties\", title: \"Content\" },\n { id: \"style\", title: \"Style\" },\n { id: \"events\", title: \"Logic\" },\n { id: \"assistant\", title: \"Assistant\" },\n];\n\n/**\n * Everything the default command set needs from the rest of Studio.\n *\n * One flat interface of verbs, not a bag of modules: a command's `run` is allowed to know that\n * \"save the document\" exists, and nothing else.\n */\nexport interface CommandDeps {\n saveDocument: () => void | Promise<void>;\n undo: () => void;\n redo: () => void;\n openInBrowser: () => void | Promise<void>;\n closeDocument: () => void;\n duplicateSelection: () => void;\n deleteSelection: () => void;\n selectParent: () => void;\n toggleDock: (dock: DockId) => void;\n toggleZen: () => void;\n openPalette: (mode: PaletteMode) => void;\n openProject: () => void | Promise<void>;\n /**\n * Open a fresh window with no project — `StudioPlatform.newWindow`.\n *\n * A no-op on hosts that have one window; the record is gated on the same capability, so on those\n * hosts it is not offered at all rather than offered and inert.\n */\n newWindow: () => void | Promise<void>;\n /**\n * The rail's panels in rail order, then the rail-less ones — the roster ⌘1–8 is generated from.\n *\n * Every entry is a Navigator panel: the rail is the Navigator's, and a Bottom-dock tab is\n * addressed by `view.setBottomTab` instead — one door per surface. `panels/navigator-panels.ts`'s\n * `panelFocusRoster()` builds it.\n *\n * Injected rather than declared here so the panel registry stays the one place a panel is named,\n * levelled and gated. An empty roster (the no-op deps) simply yields no `panel.focus.*` records.\n */\n panelRoster: readonly RailPanel[];\n /**\n * Toggle-FOCUS a panel (plan §5.3): reveal it and take focus, or — when it already has focus —\n * collapse the dock hosting it and hand focus back to the pane. Deliberately not toggle-visible:\n * ⌘1 pressed from the canvas must land you in Files, not close it.\n */\n focusPanel: (panelId: string) => void;\n /** Show an Inspector tab and focus the dock. `\"assistant\"` addresses the assistant dock. */\n focusInspectorTab: (tabId: string) => void;\n /** F6 / ⇧F6 — move focus to the next (or previous) shell region. */\n cycleRegion: (direction: 1 | -1) => void;\n}\n\n/** A dependency set whose verbs do nothing — what the CI checks load the records with. */\nexport function noopCommandDeps(): CommandDeps {\n return {\n saveDocument: () => {},\n undo: () => {},\n redo: () => {},\n openInBrowser: () => {},\n closeDocument: () => {},\n duplicateSelection: () => {},\n deleteSelection: () => {},\n selectParent: () => {},\n toggleDock: () => {},\n toggleZen: () => {},\n openPalette: () => {},\n openProject: () => {},\n newWindow: () => {},\n panelRoster: [],\n focusPanel: () => {},\n focusInspectorTab: () => {},\n cycleRegion: () => {},\n };\n}\n\n/** A document is open and editable — the precondition most document-level verbs share. */\nconst documentOpen = (ctx: CommandContext) => ctx.document.open;\n\n/**\n * At least one node is selected, **on a canvas**.\n *\n * The editor-kind conjunct is not belt-and-braces. `keyScope` gates `handleKeyEvent` and nothing\n * else, so a record reachable from the palette, the element menu, `__jxAutomation` or the assistant\n * is reachable regardless of scope — and the Outline renders whatever\n * `activeTab.value.doc.document` is, which with Project Settings open is the project CONFIGURATION\n * object drawn as a layer tree. Clicking a row there writes `session.selection`, so Delete and\n * Duplicate would transact against `project.json` and splice element nodes into the file that\n * defines the project.\n */\nconst hasSelection = (ctx: CommandContext) =>\n ctx.selection.count > 0 && ctx.editor.kind === \"canvas\";\n\n/**\n * Every selected path names a position a structural verb can act on.\n *\n * Two halves, because two surfaces answer this question with different halves of the context. A\n * menu opened over ONE node reports its verdict as `selection.isRoot` and carries no path list\n * (`editor/context-menu.ts` builds a synthetic context from its target); the running app carries\n * the real `selection.paths` and sets `isRoot` only for the document element. `isRoot` alone would\n * leave a ctrl-clicked repeater template enabled — and Delete on a selection that includes one used\n * to splice into a children ARRAY and throw, leaving the earlier removals applied and unrecorded.\n *\n * It is `every`, not `some`, deliberately: a batch that silently skips two of the five nodes the\n * user selected is a worse answer than a Delete that says why it is unavailable. Offering a verb\n * that cannot perform what the selection asks for is the defect, not the refusal.\n */\nconst structurallyEditable = (ctx: CommandContext) =>\n !ctx.selection.isRoot && ctx.selection.paths.every((path) => isSpliceablePath(path));\n\n/**\n * The default command set.\n *\n * Order is the order surfaces iterate in, so it is the order these read in the palette and in the\n * Command Bar — grouped by category rather than alphabetised.\n */\nexport function defaultCommands(deps: CommandDeps): AnyCommand[] {\n const commands: AnyCommand[] = [\n // ── File / Document ──\n {\n id: \"file.save\",\n title: \"Save\",\n category: \"File\",\n level: \"document\",\n icon: \"save\",\n keybinding: \"mod+s\",\n menus: [\"commandbar/primary\", \"statusbar/document\", \"palette\"],\n group: \"1_file\",\n undo: \"none\",\n when: documentOpen,\n requires: \"an open document\",\n run: () => deps.saveDocument(),\n },\n {\n id: \"document.close\",\n title: \"Close Document\",\n category: \"Document\",\n level: \"document\",\n keybinding: \"mod+w\",\n menus: [\"context/tab\", \"palette\"],\n group: \"1_file\",\n when: documentOpen,\n requires: \"an open document\",\n run: () => deps.closeDocument(),\n },\n {\n id: \"view.openInBrowser\",\n title: \"Open in Browser\",\n category: \"View\",\n level: \"document\",\n icon: \"browser\",\n keybinding: \"mod+shift+o\",\n menus: [\"commandbar/primary\", \"statusbar/document\", \"palette\"],\n group: \"2_output\",\n when: (ctx) => ctx.project.isSite,\n enablement: documentOpen,\n requires: \"a built page to open\",\n run: () => deps.openInBrowser(),\n },\n\n // ── Edit ──\n {\n id: \"edit.undo\",\n title: \"Undo\",\n category: \"Edit\",\n level: \"document\",\n icon: \"undo\",\n keybinding: \"mod+z\",\n menus: [\"commandbar/primary\", \"palette\"],\n group: \"1_history\",\n when: documentOpen,\n enablement: (ctx) => ctx.document.canUndo,\n requires: \"a change to undo\",\n run: () => deps.undo(),\n },\n {\n id: \"edit.redo\",\n title: \"Redo\",\n category: \"Edit\",\n level: \"document\",\n icon: \"redo\",\n keybinding: [\"mod+shift+z\", \"mod+y\"],\n menus: [\"commandbar/primary\", \"palette\"],\n group: \"1_history\",\n when: documentOpen,\n enablement: (ctx) => ctx.document.canRedo,\n requires: \"a change to redo\",\n run: () => deps.redo(),\n },\n\n // ── Selection ──\n // KeyScope \"canvas\", not \"global\": these chords must not fire while a text caret owns the\n // Keyboard. ⌘D inside a paragraph duplicates the word, not the paragraph's element.\n {\n id: \"selection.duplicate\",\n title: \"Duplicate\",\n category: \"Selection\",\n level: \"selection\",\n keyScope: \"canvas\",\n keybinding: \"mod+d\",\n menus: [\"blockbar\", \"context/element\", \"context/layer\", \"outline/row\", \"palette\"],\n group: \"3_structure\",\n undo: \"document\",\n when: hasSelection,\n // Same gate as `selection.delete`: duplicating needs a sibling position to insert into. The\n // Document root, a repeater template and a `$switch` case have none, and `mutateDuplicateNode`\n // Would splice at a non-numeric index there — a live button that silently corrupts the\n // Document. Both surfaces that render this record had to hand-guard it before the record\n // Said so.\n enablement: structurallyEditable,\n requires: \"an element that has a sibling position\",\n aiTool: {\n name: \"duplicate_node\",\n description: \"Duplicate the currently selected element, inserting the copy after it.\",\n },\n run: () => deps.duplicateSelection(),\n },\n {\n id: \"selection.repeat\",\n title: \"Repeat...\",\n category: \"Selection\",\n level: \"selection\",\n keyScope: \"canvas\",\n menus: [\"context/element\", \"palette\"],\n group: \"3_structure\",\n undo: \"document\",\n when: hasSelection,\n // Two ways to mean nothing: an element with no sibling position (`mutateInsertNode`'s\n // Coordinate is the same splice index Duplicate needs), and an element that IS the repeater\n // Already — its content is the single `map` template, not a child list.\n enablement: (ctx) => structurallyEditable(ctx) && !ctx.selection.isRepeater,\n requires: \"an element with a sibling position that is not already a repeater\",\n aiTool: {\n name: \"repeat_node\",\n description:\n \"Turn the selected element into a repeater template, rendering it once per item of a \" +\n \"data collection the author picks in the dialog this opens.\",\n },\n /*\n * The one record here whose implementation is not injected, and the reason is a property of\n * the implementation rather than of this record: `convertToRepeater()` is self-contained —\n * it reads the active tab, opens its own dialog and commits its own transaction — so there\n * is no bootstrap state for a `CommandDeps` verb to carry, and injecting it would only mean\n * the bootstrap re-exporting a function that needs nothing from the bootstrap.\n *\n * Imported at CALL time, which is what keeps this module's one load-bearing property intact:\n * it still imports no state at module scope, so `scripts/check-command-levels.ts` and its two\n * sibling checks still load the command set in a bare Bun process with no DOM.\n *\n * Deliberately NOT awaited, exactly as `selection.convertToComponent` is not: the promise\n * resolves when a HUMAN answers the dialog, and a command whose promise waits on a person is\n * a command nothing automated can call — `run()` means \"start this flow\".\n */\n run: () => {\n void import(\"../editor/convert-to-repeater\").then(({ convertToRepeater }) =>\n convertToRepeater(),\n );\n },\n },\n {\n id: \"selection.delete\",\n title: \"Delete\",\n category: \"Selection\",\n level: \"selection\",\n keyScope: \"canvas\",\n keybinding: [\"delete\", \"backspace\"],\n menus: [\"blockbar\", \"context/element\", \"context/layer\", \"outline/row\", \"palette\"],\n group: \"9_danger\",\n destructive: true,\n undo: \"document\",\n when: hasSelection,\n // The document root is the document; deleting it is not an edit, it is an empty file. The\n // Outline's other unspliceable rows — a repeater's map template, a `$switch` case — are\n // Refused by the same gate, and refusing the whole batch is why a mixed selection can no\n // Longer half-apply.\n enablement: structurallyEditable,\n requires: \"an element selection that is not the document root\",\n aiTool: {\n name: \"delete_node\",\n description: \"Delete the currently selected element from the document.\",\n },\n run: () => deps.deleteSelection(),\n },\n {\n id: \"selection.selectParent\",\n title: \"Select Parent\",\n category: \"Selection\",\n level: \"selection\",\n keyScope: \"canvas\",\n // Two spellings of ONE action, in the record rather than in a second `keymap.add` call beside\n // The registration — which is what `editor/shortcuts.ts` had to do while this file was another\n // Workstream's, and is exactly the second definition site the registry exists to prevent.\n keybinding: [\"escape\", \"arrowleft\"],\n menus: [\"palette\"],\n group: \"2_navigate\",\n when: hasSelection,\n requires: \"an element selection\",\n run: () => deps.selectParent(),\n },\n\n // ── View ──\n {\n id: \"view.toggleNavigator\",\n title: \"Toggle Navigator Dock\",\n category: \"View\",\n level: \"application\",\n keybinding: \"mod+b\",\n menus: [\"commandbar/overflow\", \"palette\"],\n group: \"4_docks\",\n run: () => deps.toggleDock(\"navigator\"),\n },\n {\n id: \"view.toggleInspector\",\n title: \"Toggle Inspector Dock\",\n category: \"View\",\n level: \"application\",\n keybinding: \"mod+alt+b\",\n menus: [\"commandbar/overflow\", \"palette\"],\n group: \"4_docks\",\n run: () => deps.toggleDock(\"inspector\"),\n },\n // `view.toggleBottomDock` (⌘J) is NOT here. It moved to `shell.ts`, beside `view.setBottomDock`\n // And the `shell.docks.bottom` record both of them write: the Bottom dock is a dock now, so its\n // Verbs are declared where the other two docks' are, and the toggle no longer needs a `deps`\n // Hop through a dock id this module cannot resolve.\n {\n id: \"view.zen\",\n title: \"Zen Mode\",\n category: \"View\",\n level: \"application\",\n keybinding: \"mod+.\",\n menus: [\"commandbar/overflow\", \"palette\"],\n group: \"4_docks\",\n run: () => deps.toggleZen(),\n },\n\n // ── Palette ──\n {\n id: \"palette.open\",\n title: \"Open Command Center\",\n category: \"View\",\n level: \"application\",\n keybinding: \"mod+k\",\n menus: [\"palette\"],\n group: \"5_palette\",\n run: () => deps.openPalette(\"picker\"),\n },\n {\n id: \"palette.openFiles\",\n title: \"Go to File…\",\n category: \"File\",\n level: \"application\",\n keybinding: \"mod+p\",\n menus: [\"palette\"],\n group: \"5_palette\",\n run: () => deps.openPalette(\"files\"),\n },\n {\n id: \"palette.openCommands\",\n title: \"Run Command…\",\n category: \"View\",\n level: \"application\",\n keybinding: \"mod+shift+p\",\n menus: [\"palette\"],\n group: \"5_palette\",\n run: () => deps.openPalette(\"commands\"),\n },\n\n {\n id: \"palette.openNodes\",\n title: \"Go to Symbol in Document…\",\n category: \"Selection\",\n level: \"document\",\n menus: [\"palette\"],\n group: \"5_palette\",\n when: documentOpen,\n requires: \"an open document\",\n run: () => deps.openPalette(\"nodes\"),\n },\n\n // ── Project ──\n {\n id: \"project.open\",\n title: \"Open Project…\",\n category: \"Project\",\n level: \"project\",\n keybinding: \"mod+o\",\n menus: [\"commandbar/overflow\", \"statusbar/project\", \"palette\"],\n group: \"1_file\",\n run: () => deps.openProject(),\n },\n {\n /*\n * The other half of multi-window, and the half that had no door.\n *\n * \"Open a project ELSEWHERE\" is reachable from Open Project and from Recents (§4.2a); \"open\n * an EMPTY window\" was reachable only from the ElectroBun launcher's native application menu\n * — so on a launcher whose window has no menu bar, `newWindow` existed on the platform and\n * could not be run. Gated on the same capability every other multi-window verb is, so a host\n * with one window does not offer it.\n */\n id: \"view.newWindow\",\n title: \"New Window\",\n category: \"View\",\n level: \"application\",\n keybinding: \"mod+shift+n\",\n menus: [\"commandbar/overflow\", \"palette\"],\n group: \"1_file\",\n when: (ctx: CommandContext) => ctx.capability.windowControls,\n requires: \"a host that can hold more than one window\",\n run: () => deps.newWindow(),\n },\n {\n // The no-project palette stops being a hidden domain swap on `!projectState` and becomes a\n // NAMED mode that works either way (plan §5.4) — same trigger, same chrome, stated feature.\n id: \"project.openRecent\",\n title: \"Open Recent…\",\n category: \"Project\",\n level: \"project\",\n menus: [\"commandbar/overflow\", \"statusbar/project\", \"palette\"],\n group: \"1_file\",\n run: () => deps.openPalette(\"projects\"),\n },\n\n // ── Direct keys (plan §5.3) ──\n ...panelFocusCommands(deps),\n ...inspectorFocusCommands(deps),\n {\n id: \"view.cycleRegion\",\n title: \"Focus Next Region\",\n category: \"View\",\n level: \"application\",\n keybinding: \"f6\",\n menus: [\"palette\"],\n group: \"4_docks\",\n run: () => deps.cycleRegion(1),\n },\n {\n id: \"view.cycleRegionBack\",\n title: \"Focus Previous Region\",\n category: \"View\",\n level: \"application\",\n keybinding: \"shift+f6\",\n menus: [\"palette\"],\n group: \"4_docks\",\n run: () => deps.cycleRegion(-1),\n },\n ];\n return commands;\n}\n\n/**\n * ⌘1–8 — one record per panel, generated from {@link CommandDeps.panelRoster}.\n *\n * Generated rather than written out eight times for the reason the whole registry exists: the rail,\n * the chord, the palette row and the generated shortcut sheet are then four renderings of one list.\n * Only the first eight get a chord; a ninth panel keeps its name and its palette row, which is the\n * cost §2 principle 9 puts on chrome.\n */\nexport function panelFocusCommands(deps: CommandDeps): AnyCommand[] {\n let chordsSpent = 0;\n return deps.panelRoster.map((panel) => {\n const command: AnyCommand = {\n id: `panel.focus.${panel.id}`,\n title: `Show ${panel.title}`,\n category: \"View\",\n // Application, like `view.setActivity`: revealing a panel arranges the workspace. What the\n // PANEL acts on is the panel record's own level, and that is `registerPanel()`'s field.\n level: \"application\",\n menus: [\"palette\"],\n group: \"4_docks\",\n requires: \"an open project\",\n // The panel's OWN `when` composes in, so a declared-but-unbuilt surface (Search, Problems)\n // Has no palette row and no live chord — the record exists, the affordance does not.\n when: (ctx: CommandContext) => ctx.project.open && (panel.when?.(ctx) ?? true),\n run: () => deps.focusPanel(panel.id),\n };\n if (panel.rail !== false && chordsSpent < RAIL_CHORD_LIMIT) {\n chordsSpent += 1;\n command.keybinding = `mod+${chordsSpent}`;\n }\n return command;\n });\n}\n\n/** ⌘⇧1–4 — one record per Inspector tab, generated from {@link INSPECTOR_TABS}. */\nexport function inspectorFocusCommands(deps: CommandDeps): AnyCommand[] {\n return INSPECTOR_TABS.map((tab, index) => {\n const command: AnyCommand = {\n id: `inspector.focus.${tab.id}`,\n title: `Show ${tab.title}`,\n category: \"View\",\n // DOCUMENT-level, like `view.setRightTab`, which writes the same field. These carried no\n // `when`, no `enablement` and no `requires` at all, so with nothing open ⌘⇧2 reported success,\n // Opening the right dock and moving focus there while silently NOT switching the tab —\n // The delegate `focusInspectorTab` goes through `runIfPresent`, which checks `isEnabled` and skips.\n // One gesture, three outcomes across the family: a loud refusal, a full write, and a\n // Half-applied success with no message. The Inspector's tabs are per-document session state\n // (`session.ui.rightTab`), so the document is the honest precondition.\n level: \"document\",\n keybinding: `mod+shift+${index + 1}`,\n menus: [\"palette\"],\n group: \"4_docks\",\n requires: \"an open document\",\n when: (ctx: CommandContext) => ctx.document.open,\n run: () => deps.focusInspectorTab(tab.id),\n };\n return command;\n });\n}\n\n/**\n * The default set with no-op implementations — the shape the CI checks validate.\n *\n * `scripts/check-command-levels.ts` and `scripts/check-chrome-budget.ts` both call this by name; a\n * fixture module passed with `--source` exports the same function.\n */\nexport function defaultCommandSet(): AnyCommand[] {\n return defaultCommands(noopCommandDeps());\n}\n"
9
- ],
10
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,SAAS,SAAS,CAAC,KAAsB;AAAA,EACvC,OACE,CAAC,IAAI,WAAW,GAAG,KACnB,CAAC,IAAI,WAAW,GAAG,KACnB,CAAC,IAAI,WAAW,GAAG,KACnB,CAAC,IAAI,WAAW,GAAG,KACnB,CAAC,IAAI,WAAW,GAAG,KACnB,CAAC,IAAI,WAAW,IAAI;AAAA;AAIxB,SAAS,aAAa,CAAC,GAA0C;AAAA,EAC/D,OAAO,MAAM,QAAQ,OAAO,MAAM,YAAY,CAAC,MAAM,QAAQ,CAAC;AAAA;AAIhE,IAAM,iBAAiB;AAGvB,SAAS,UAAU,CACjB,MACA,KACyB;AAAA,EACzB,MAAM,MAA+B,KAAK,KAAK;AAAA,EAC/C,YAAY,GAAG,MAAM,OAAO,QAAQ,GAAG,GAAG;AAAA,IACxC,IAAI,KAAK,cAAc,CAAC,KAAK,cAAc,IAAI,EAAE,IAAI,WAAW,IAAI,IAAI,CAAC,IAAI;AAAA,EAC/E;AAAA,EACA,OAAO;AAAA;AAIT,SAAS,WAAW,CAAC,MAAwD;AAAA,EAC3E,MAAM,MAA+B,CAAC;AAAA,EACtC,YAAY,GAAG,MAAM,OAAO,QAAQ,IAAI,GAAG;AAAA,IACzC,IAAI,cAAc,CAAC,K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