@alexpeng/dsh-custom-plugin 0.9.3 → 0.11.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 (41) hide show
  1. package/CHANGELOG.md +1730 -866
  2. package/NOTICE +71 -0
  3. package/README.i18n.yaml +7 -7
  4. package/README.md +344 -335
  5. package/README.zh.md +309 -302
  6. package/lib/client.js +10260 -2063
  7. package/lib/client.js.map +1 -1
  8. package/lib/index.js +235 -99
  9. package/lib/types/balance.d.ts +44 -0
  10. package/lib/types/client/api.d.ts +13 -8
  11. package/lib/types/client/bg-ascii.d.ts +405 -0
  12. package/lib/types/client/bg-field.d.ts +62 -0
  13. package/lib/types/client/bg-focus.d.ts +63 -0
  14. package/lib/types/client/bg-jelly.d.ts +53 -0
  15. package/lib/types/client/bg-layer.d.ts +152 -0
  16. package/lib/types/client/bg-ocean.d.ts +31 -0
  17. package/lib/types/client/bg-params.d.ts +142 -0
  18. package/lib/types/client/bg-pointer.d.ts +107 -0
  19. package/lib/types/client/bg-shader.d.ts +329 -0
  20. package/lib/types/client/bg-wake.d.ts +57 -0
  21. package/lib/types/client/bg-whale.d.ts +56 -0
  22. package/lib/types/client/custom.d.ts +4 -1
  23. package/lib/types/client/index.d.ts +1 -1
  24. package/lib/types/client/palette.d.ts +100 -0
  25. package/lib/types/client/panel-bounds.d.ts +65 -0
  26. package/lib/types/client/styles.d.ts +9 -4
  27. package/lib/types/client/ui/anchor.d.ts +55 -0
  28. package/lib/types/client/ui/appearance-controls.d.ts +24 -0
  29. package/lib/types/client/ui/command-model.d.ts +28 -0
  30. package/lib/types/client/ui/folders-model.d.ts +31 -0
  31. package/lib/types/client/ui/index-bridge.d.ts +6 -0
  32. package/lib/types/client/ui/overlays.d.ts +66 -0
  33. package/lib/types/client/ui/primitives.d.ts +93 -0
  34. package/lib/types/client/ui/prompt-model.d.ts +37 -0
  35. package/lib/types/host-service.d.ts +68 -15
  36. package/lib/types/pricing.d.ts +8 -4
  37. package/lib/types/protocol.d.ts +48 -2
  38. package/lib/types/usage.d.ts +8 -4
  39. package/locale/en.json +1 -1
  40. package/locale/zh.json +1 -1
  41. package/package.json +106 -105
@@ -1,7 +1,12 @@
1
1
  /**
2
- * Static styles for the Custom suite, injected as one owned <style> tag at
3
- * install time (removed by the disposer). Global class names are prefixed
4
- * vx- and must not be scoped by CSS Modules.
2
+ * Static styles for the Custom suite, aligned with the host's design tokens.
3
+ *
4
+ * Injected as one owned <style> tag at install time (removed by the disposer).
5
+ * Every colour, radius, shadow, font and motion value resolves from the host's
6
+ * `--dsw-*` / `--ds-*` tokens, with the shipped fallbacks kept only so the
7
+ * first paint before the theme sheet loads still reads. Class names are global
8
+ * and prefixed `vx-`; they mount into product slots and overlays and must not
9
+ * be CSS-Module scoped.
5
10
  * @module @alexpeng/dsh-custom-plugin/client/styles
6
11
  */
7
- export declare const STATIC_CSS = "/* dsh-custom-plugin static styles. Every rule is global by design: the UI\n * mounts into product slots and overlays, so class names are prefixed vx-\n * and must not be scoped by CSS Modules. Dynamic rules (body background,\n * global-glass blur) are managed at runtime by a style\n * element in custom.tsx and do not live here. */\n.vx-root {\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 2147483000;\n font-family: ui-sans-serif, system-ui, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;\n }\n .vx-fx {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n }\n .vx-anchor {\n display: inline-block;\n width: 0;\n height: 1px;\n vertical-align: bottom;\n }\n .vx-turn-actions {\n display: inline-flex;\n gap: 4px;\n margin-left: 10px;\n vertical-align: middle;\n align-items: center;\n }\n .vx-chip {\n pointer-events: auto;\n border: 1px solid rgba(128, 140, 160, .4);\n background: rgba(255, 255, 255, .16);\n color: inherit;\n border-radius: 8px;\n padding: 2px 8px;\n font-size: 11px;\n cursor: pointer;\n backdrop-filter: blur(6px);\n text-decoration: none;\n display: inline-flex;\n align-items: center;\n gap: 3px;\n }\n .vx-chip:hover {\n background: rgba(255, 255, 255, .28);\n }\n .vx-link {\n text-decoration: none;\n }\n .vx-glass {\n border-radius: 16px;\n background: rgba(255, 255, 255, .64);\n -webkit-backdrop-filter: blur(9px) saturate(1.22);\n backdrop-filter: blur(9px) saturate(1.22);\n box-shadow: 0 0 1px 1px rgba(17, 17, 26, .07) inset, 0 1px 2px rgba(17, 17, 26, .05) inset, 0px 4px 16px rgba(17, 17, 26, .05), 0px 8px 24px rgba(17, 17, 26, .05), 0px 16px 56px rgba(17, 17, 26, .05);\n }\n @media (prefers-color-scheme: dark) {\n .vx-glass {\n background: rgba(13, 17, 25, .62);\n color: #eef1f7;\n }\n }\n /* The GUI theme can disagree with the OS scheme (dsh selects light/dark\n independently \u2014 dark GUI on a light OS left these surfaces frosted\n light), so the frost fills and panel text colors key on the mirrored\n root classes, not the OS alone. The media queries above remain the\n pre-boot fallback, before the client has applied the classes; the liquid\n rules below out-rank these by specificity, not by order. */\n :root.vx-light .vx-glass {\n background: rgba(255, 255, 255, .64);\n color: inherit;\n }\n :root.vx-dark .vx-glass {\n background: rgba(13, 17, 25, .62);\n color: #eef1f7;\n }\n :root.vx-light .vx-panel,\n :root.vx-light .vx-modal,\n :root.vx-light .vx-folders {\n color: #20242e;\n }\n :root.vx-dark .vx-panel,\n :root.vx-dark .vx-modal,\n :root.vx-dark .vx-folders {\n color: #e8ebf2;\n }\n :root.vx-light .vx-balance-hover {\n color: #20242e;\n }\n :root.vx-dark .vx-balance-hover {\n color: #e8ebf2;\n }\n /* Liquid glass: the SVG displacement filter bends the backdrop at the\n surface's edges; the chained blur+saturate keeps text over the middle of\n large panels readable (pure displacement leaves the mid-area untouched,\n which read as \"nothing happened\"). Chromium runs this chain; engines\n without SVG-referencing backdrop filters fall back to frost below. */\n .vx-liquid .vx-glass {\n background: rgba(255, 255, 255, .1);\n backdrop-filter: url(#vx-lg) blur(2.5px) saturate(1.12);\n -webkit-backdrop-filter: url(#vx-lg) blur(2.5px) saturate(1.12);\n }\n @media (prefers-color-scheme: dark) {\n .vx-liquid .vx-glass {\n background: rgba(0, 0, 0, .1);\n }\n }\n /* The GUI theme classes are mirrored onto <html> by the client, so the\n liquid fill has to out-rank the theme frost fills *inside* .vx-root as\n well. The previous \".vx-root.* .vx-liquid .vx-glass\" rules never matched\n anything \u2014 vx-liquid lives on <html>, an ANCESTOR of .vx-root, not a\n descendant \u2014 which left the big panels at the 64% frost fill while the\n balance hover (mounted outside .vx-root) sat at 10%: the \"panel is not\n liquid, the balance card is\" report, verbatim. */\n :root.vx-liquid.vx-dark .vx-glass {\n background: rgba(0, 0, 0, .1);\n }\n :root.vx-liquid.vx-light .vx-glass {\n background: rgba(255, 255, 255, .1);\n }\n :root.vx-liquid .vx-root.vx-dark .vx-glass {\n background: rgba(0, 0, 0, .1);\n }\n :root.vx-liquid .vx-root.vx-light .vx-glass {\n background: rgba(255, 255, 255, .1);\n }\n @supports not (backdrop-filter: url(#vx-lg)) {\n .vx-liquid .vx-glass {\n background: rgba(255, 255, 255, .64);\n backdrop-filter: blur(9px) saturate(1.22);\n -webkit-backdrop-filter: blur(9px) saturate(1.22);\n }\n @media (prefers-color-scheme: dark) {\n .vx-liquid .vx-glass {\n background: rgba(13, 17, 25, .62);\n }\n }\n }\n .vx-balance-wrap {\n display: inline-flex;\n align-items: center;\n position: relative;\n }\n .vx-balance-text {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px;\n border-radius: 8px;\n font-size: 12.5px;\n color: inherit;\n background: rgba(127, 164, 224, .16);\n border: 1px solid rgba(127, 164, 224, .4);\n cursor: default;\n white-space: nowrap;\n }\n .vx-balance-text:hover {\n background: rgba(127, 164, 224, .28);\n }\n .vx-balance-text.vx-balance-open {\n background: rgba(127, 164, 224, .36);\n border-color: rgba(127, 164, 224, .8);\n }\n .vx-balance-today {\n opacity: .75;\n font-size: 11.5px;\n }\n .vx-balance-hover {\n position: absolute;\n top: calc(100% + 8px);\n right: 0;\n z-index: 70;\n width: 360px;\n max-height: 480px;\n overflow: auto;\n padding: 12px;\n color: #20242e;\n font-size: 12px;\n pointer-events: auto;\n }\n @media (prefers-color-scheme: dark) {\n .vx-balance-hover {\n color: #e8ebf2;\n }\n }\n .vx-balance-lines {\n font-size: 13px;\n margin: 6px 0;\n }\n .vx-header-btn {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n border-radius: 8px;\n font-size: 12.5px;\n color: inherit;\n background: rgba(127, 164, 224, .16);\n border: 1px solid rgba(127, 164, 224, .4);\n cursor: pointer;\n white-space: nowrap;\n }\n .vx-header-btn:hover {\n background: rgba(127, 164, 224, .3);\n }\n .vx-quote-btn {\n position: absolute;\n transform: translate(-50%, -100%);\n pointer-events: auto;\n background: rgba(40, 48, 64, .96);\n color: #eef1f7;\n border: 1px solid rgba(255, 255, 255, .25);\n padding: 5px 12px;\n border-radius: 9px;\n font-size: 12px;\n cursor: pointer;\n box-shadow: 0 6px 18px rgba(0, 0, 0, .28);\n display: inline-flex;\n align-items: center;\n gap: 5px;\n }\n .vx-panel {\n position: absolute;\n width: 430px;\n max-width: calc(100vw - 40px);\n height: min(660px, calc(100vh - 110px));\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n color: #20242e;\n }\n @media (prefers-color-scheme: dark) {\n .vx-panel, .vx-modal, .vx-folders {\n color: #e8ebf2;\n }\n }\n .vx-panel-head {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 14px;\n cursor: move;\n user-select: none;\n border-bottom: 1px solid rgba(150, 160, 180, .25);\n position: relative;\n z-index: 1;\n }\n .vx-panel-title {\n font-weight: 600;\n font-size: 13px;\n }\n .vx-panel-sub {\n font-size: 11px;\n opacity: .62;\n white-space: nowrap;\n }\n .vx-tabs {\n display: flex;\n flex-wrap: wrap;\n gap: 2px;\n padding: 8px 10px 4px;\n border-bottom: 1px solid rgba(150, 160, 180, .2);\n position: relative;\n z-index: 1;\n }\n .vx-tab {\n border: none;\n background: transparent;\n color: inherit;\n opacity: .75;\n font-size: 12px;\n padding: 5px 9px;\n border-radius: 8px;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n .vx-tab.on {\n opacity: 1;\n background: rgba(255, 255, 255, .28);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);\n }\n .vx-panel-body {\n flex: 1;\n overflow: auto;\n padding: 12px 14px;\n position: relative;\n z-index: 1;\n }\n .vx-col {\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n .vx-row {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .vx-row.wrap {\n flex-wrap: wrap;\n }\n .vx-flex1 {\n flex: 1;\n }\n .vx-section-title {\n font-weight: 600;\n font-size: 12.5px;\n margin-top: 4px;\n opacity: .9;\n }\n .vx-swatches {\n display: grid;\n grid-template-columns: repeat(5, 1fr);\n gap: 6px;\n }\n .vx-swatch {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 3px;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n padding: 0;\n }\n .vx-swatch-box {\n width: 34px;\n height: 26px;\n border-radius: 8px;\n border: 2px solid rgba(120, 130, 150, .4);\n box-sizing: border-box;\n }\n .vx-swatch.on .vx-swatch-box {\n border-color: #7fa4e0;\n box-shadow: 0 0 0 2px rgba(127, 164, 224, .35);\n }\n .vx-swatch-label {\n font-size: 10px;\n opacity: .85;\n }\n .vx-btn {\n pointer-events: auto;\n border: 1px solid rgba(128, 140, 160, .4);\n background: rgba(255, 255, 255, .16);\n color: inherit;\n border-radius: 9px;\n padding: 6px 12px;\n font-size: 12px;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n }\n .vx-btn:hover {\n background: rgba(255, 255, 255, .28);\n }\n .vx-btn.on {\n background: rgba(127, 164, 224, .35);\n border-color: rgba(127, 164, 224, .8);\n }\n .vx-btn:disabled {\n opacity: .5;\n cursor: default;\n }\n .vx-btn-sm {\n padding: 2px 8px;\n font-size: 11px;\n }\n .vx-btn-danger {\n background: rgba(214, 88, 88, .22);\n border-color: rgba(214, 88, 88, .55);\n }\n .vx-btn.big {\n padding: 10px 16px;\n font-size: 13px;\n }\n .vx-input {\n flex: 1;\n min-width: 0;\n border: 1px solid rgba(128, 140, 160, .4);\n background: rgba(255, 255, 255, .16);\n color: inherit;\n border-radius: 9px;\n padding: 6px 10px;\n font-size: 12px;\n }\n .vx-toggle-row {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: 12.5px;\n }\n .vx-muted {\n color: rgba(120, 128, 148, .95);\n font-size: 11.5px;\n }\n .vx-error {\n color: #d85858;\n font-size: 12px;\n }\n .vx-pad {\n padding: 12px;\n }\n .vx-pad-sm {\n padding: 6px 2px;\n }\n .vx-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: 300px;\n overflow: auto;\n }\n .vx-list-item {\n text-align: left;\n border: none;\n background: rgba(255, 255, 255, .1);\n color: inherit;\n border-radius: 8px;\n padding: 6px 10px;\n font-size: 12px;\n cursor: pointer;\n }\n .vx-list-item:hover {\n background: rgba(255, 255, 255, .22);\n }\n .vx-list-item.on {\n background: rgba(127, 164, 224, .28);\n box-shadow: inset 0 0 0 1px rgba(127, 164, 224, .45);\n }\n .vx-list-item:disabled {\n opacity: .55;\n cursor: not-allowed;\n }\n .vx-check-row {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: 12.5px;\n padding: 4px 2px;\n }\n .vx-check-title {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .vx-badge {\n background: rgba(127, 164, 224, .3);\n border-radius: 8px;\n padding: 0 6px;\n font-size: 10px;\n }\n .vx-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 11.5px;\n }\n .vx-table th, .vx-table td {\n border: 1px solid rgba(128, 140, 160, .3);\n padding: 4px 6px;\n text-align: right;\n }\n .vx-table th:first-child, .vx-table td:first-child {\n text-align: left;\n }\n .vx-folder {\n display: flex;\n flex-direction: column;\n }\n .vx-folder-head {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 5px 4px;\n border-radius: 9px;\n cursor: grab;\n }\n .vx-folder-head:hover {\n background: rgba(255, 255, 255, .14);\n }\n .vx-folder-head.drop-inside {\n background: rgba(127, 164, 224, .3);\n outline: 1px dashed rgba(127, 164, 224, .8);\n }\n .vx-folder-head.drop-before {\n box-shadow: 0 -2px 0 0 rgba(127, 164, 224, .9);\n }\n .vx-folder-head.drop-after {\n box-shadow: 0 2px 0 0 rgba(127, 164, 224, .9);\n }\n .vx-folder-name {\n font-size: 12.5px;\n font-weight: 600;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .vx-folder-body {\n border-left: 1px dashed rgba(128, 140, 160, .35);\n margin-left: 14px;\n padding-left: 6px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n .vx-item-row {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 3px 4px;\n border-radius: 8px;\n }\n .vx-item-row:hover {\n background: rgba(255, 255, 255, .12);\n }\n .vx-item-name {\n flex: 1;\n text-align: left;\n border: none;\n background: transparent;\n color: inherit;\n font-size: 12px;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0;\n }\n .vx-mini {\n border: none;\n background: transparent;\n color: inherit;\n opacity: .75;\n cursor: pointer;\n padding: 2px;\n border-radius: 6px;\n display: inline-flex;\n align-items: center;\n }\n .vx-mini:hover {\n opacity: 1;\n background: rgba(255, 255, 255, .2);\n }\n .vx-form {\n display: flex;\n flex-direction: column;\n gap: 6px;\n border: 1px dashed rgba(128, 140, 160, .4);\n border-radius: 10px;\n padding: 8px;\n }\n .vx-prompt-card {\n border: 1px solid rgba(128, 140, 160, .3);\n background: rgba(255, 255, 255, .1);\n border-radius: 10px;\n padding: 8px 10px;\n }\n .vx-prompt-title {\n font-weight: 600;\n font-size: 12.5px;\n }\n .vx-prompt-body {\n margin-top: 4px;\n font-size: 11.5px;\n opacity: .85;\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 72px;\n overflow: hidden;\n }\n .vx-modal-mask {\n position: absolute;\n inset: 0;\n pointer-events: auto;\n background: rgba(8, 10, 16, .4);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 60;\n }\n .vx-modal {\n position: relative;\n width: min(760px, 92vw);\n max-height: 82vh;\n overflow: auto;\n padding: 16px;\n color: #20242e;\n pointer-events: auto;\n }\n .vx-pop-head {\n display: flex;\n gap: 8px;\n align-items: center;\n margin-bottom: 8px;\n font-weight: 600;\n font-size: 13px;\n }\n .vx-svgbox {\n overflow: auto;\n background: rgba(12, 14, 20, .6);\n border-radius: 12px;\n padding: 14px;\n }\n .vx-svgbox svg {\n max-width: 100%;\n height: auto;\n }\n .vx-pre {\n white-space: pre-wrap;\n word-break: break-all;\n font-size: 10.5px;\n opacity: .85;\n }\n .vx-toasts {\n position: absolute;\n left: 50%;\n bottom: 26px;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n pointer-events: auto;\n z-index: 80;\n }\n .vx-toast {\n display: flex;\n gap: 10px;\n align-items: center;\n color: #f2f4f8;\n background: rgba(26, 32, 44, .92);\n border: 1px solid rgba(255, 255, 255, .12);\n padding: 8px 14px;\n border-radius: 12px;\n font-size: 12.5px;\n box-shadow: 0 10px 30px rgba(0, 0, 0, .3);\n max-width: 560px;\n backdrop-filter: blur(9px);\n -webkit-backdrop-filter: blur(9px);\n }\n @media (prefers-color-scheme: dark) {\n .vx-toast {\n background: rgba(18, 22, 30, .94);\n }\n }\n .vx-foot-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n border: 1px solid rgba(127, 164, 224, .4);\n background: rgba(127, 164, 224, .14);\n color: inherit;\n cursor: pointer;\n padding: 4px 10px;\n border-radius: 10px;\n margin: 2px;\n }\n .vx-foot-btn:hover {\n background: rgba(127, 164, 224, .3);\n }\n .vx-foot-label {\n font-size: 12px;\n }\n .vx-folders {\n position: fixed;\n left: 12px;\n bottom: 60px;\n width: 272px;\n max-height: min(560px, calc(100vh - 220px));\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n color: #20242e;\n z-index: 55;\n }\n /* \u5934\u90E8\u884C\uFF08\u56FE\u6807 + \u6807\u9898 + \u6309\u94AE\uFF09\u4E0B\u79FB\u5E76\u62C9\u5F00\u4E0E\u5BB9\u5668\u8FB9\u7F18\u7684\u95F4\u8DDD */\n .vx-folders .vx-pop-head {\n padding: 14px 14px 0;\n }\n .vx-folders-body {\n flex: 1;\n overflow: auto;\n padding: 4px 14px 12px;\n position: relative;\n z-index: 1;\n }\n .vx-prompt-pop {\n position: fixed;\n width: 320px;\n max-height: 420px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n color: #20242e;\n z-index: 65;\n padding: 10px 12px;\n }\n .vx-settings-page {\n display: flex;\n flex-direction: column;\n gap: 14px;\n max-width: 720px;\n }\n .vx-mmd-wrap {\n position: relative;\n margin: 6px 0;\n border: 1px solid rgba(127, 164, 224, .35);\n border-radius: 12px;\n overflow: hidden;\n background: rgba(127, 164, 224, .05);\n }\n .vx-mmd-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 6px;\n border-bottom: 1px solid rgba(127, 164, 224, .25);\n background: rgba(127, 164, 224, .08);\n }\n .vx-mmd-btn {\n border: none;\n background: transparent;\n color: inherit;\n opacity: .65;\n font-size: 12px;\n padding: 3px 10px;\n border-radius: 8px;\n cursor: pointer;\n }\n .vx-mmd-btn:hover {\n opacity: 1;\n background: rgba(127, 164, 224, .18);\n }\n .vx-mmd-btn.active {\n opacity: 1;\n background: rgba(127, 164, 224, .28);\n font-weight: 600;\n }\n .vx-mmd-live {\n margin-left: auto;\n font-size: 11px;\n opacity: .6;\n color: inherit;\n text-decoration: none;\n padding: 3px 8px;\n }\n .vx-mmd-live:hover {\n opacity: 1;\n }\n .vx-mmd-stage {\n padding: 16px 12px;\n overflow-x: auto;\n text-align: center;\n }\n .vx-mmd-stage svg {\n max-width: 100%;\n height: auto;\n }\n\n /* DSH can select a theme independently of the operating system. The root\n classes are applied from the resolved GUI theme and intentionally win\n over the media-query fallback above. */\n .vx-root.vx-dark .vx-glass {\n background: rgba(13, 17, 25, .62);\n color: #eef1f7;\n }\n .vx-root.vx-dark .vx-balance-hover,\n .vx-root.vx-dark .vx-panel,\n .vx-root.vx-dark .vx-modal,\n .vx-root.vx-dark .vx-folders {\n color: #e8ebf2;\n }\n .vx-root.vx-dark .vx-toast {\n background: rgba(18, 22, 30, .94);\n }\n\n .vx-root.vx-light .vx-glass {\n background: rgba(255, 255, 255, .64);\n color: #20242e;\n }\n .vx-root.vx-light .vx-balance-hover,\n .vx-root.vx-light .vx-panel,\n .vx-root.vx-light .vx-modal,\n .vx-root.vx-light .vx-folders {\n color: #20242e;\n }\n .vx-root.vx-light .vx-toast {\n background: rgba(26, 32, 44, .92);\n }\n";
12
+ export declare const STATIC_CSS = "/* dsh-custom-plugin static styles: host-token design system. */\n/* Motion tokens live on the document root, not on .vx-root: the settings page\n and the dialogs/toasts it owns render outside our overlay layer, and an\n undefined custom property invalidates the whole animation shorthand there. */\n:root {\n --vx-ease: var(--ds-ease-in-out, cubic-bezier(.4, 0, .2, 1));\n --vx-ease-out: cubic-bezier(.16, 1, .3, 1);\n --vx-ease-in: cubic-bezier(.4, 0, 1, 1);\n --vx-dur-open: var(--ds-transition-duration, .2s);\n --vx-dur-pop: .18s;\n --vx-dur-close: .15s;\n --vx-dur-dialog: .22s;\n}\n.vx-root {\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 2147483000;\n font-family: var(--dsw-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif);\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n line-height: var(--dsw-font-xs-13-line-height, 20px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n -webkit-font-smoothing: antialiased;\n}\n\n@keyframes vx-pop-in {\n from { opacity: 0; transform: translateY(var(--vx-pop-shift, 6px)) scale(.97); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-pop-out {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(calc(var(--vx-pop-shift, 6px) * .45)) scale(.985); }\n}\n@keyframes vx-pop-in-liquid {\n from { opacity: 0; transform: translateY(var(--vx-pop-shift, 6px)); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-pop-out-liquid {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(calc(var(--vx-pop-shift, 6px) * .45)); }\n}\n@keyframes vx-fade-in { from { opacity: 0; } to { opacity: 1; } }\n@keyframes vx-fade-out { from { opacity: 1; } to { opacity: 0; } }\n@keyframes vx-dialog-in {\n from { opacity: 0; transform: translateY(10px) scale(.975); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-dialog-out {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(4px) scale(.985); }\n}\n@keyframes vx-toast-in {\n from { opacity: 0; transform: translateY(10px) scale(.97); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-toast-out {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(6px) scale(.98); }\n}\n@keyframes vx-section-in {\n from { opacity: 0; transform: translateY(6px); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-rotate { to { transform: rotate(360deg); } }\n\n/* Page background layer. Appended to <body>, never inside .vx-root: the\n overlay slot is nested in the shell's z-index:20 layer, where a negative\n z-index would still sit above the content it must stay behind. */\n.vx-bg {\n position: fixed;\n inset: 0;\n pointer-events: none;\n background: transparent;\n z-index: -1;\n}\n.vx-bg > canvas {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n display: block;\n}\n.vx-fx {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.vx-anchor {\n display: inline-block;\n width: 0;\n height: 1px;\n vertical-align: bottom;\n}\n.vx-turn-actions {\n display: inline-flex;\n gap: 4px;\n margin-left: 10px;\n vertical-align: middle;\n align-items: center;\n}\n\n/* ---------- material system ---------- */\n/* Frost: an evenly diffused milk pane. It is deliberately opaque \u2014 no clear\n body and no edge lensing \u2014 so it can never be mistaken for liquid glass. */\n.vx-glass,\n.vx-popover {\n background: linear-gradient(180deg, rgba(250, 251, 253, .9), rgba(244, 246, 250, .84));\n -webkit-backdrop-filter: blur(30px) saturate(1.3);\n backdrop-filter: blur(30px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .7),\n 0 0 0 .5px rgba(0, 0, 0, .1),\n 0 16px 40px rgba(15, 23, 42, .1);\n border-radius: var(--dsw-radius-lg, 16px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n:root.vx-dark .vx-glass,\n:root.vx-dark .vx-popover {\n background: linear-gradient(180deg, rgba(31, 33, 39, .92), rgba(24, 26, 31, .86));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(255, 255, 255, .1),\n 0 16px 40px rgba(0, 0, 0, .36);\n}\n:root.vx-glass-off .vx-glass,\n:root.vx-glass-off .vx-popover {\n background: var(--dsw-alias-bg-layer-3, #fff);\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n}\n/* Liquid: Apple-style clear glass. The body is colourless and clearly lighter\n than frost (82% -> 74% light, 70% -> 62% dark), so the app behind the floating\n window still reads through it. That window is its own compositor surface, so a\n real backdrop refraction is unavailable; the lens is carried by edge optics\n instead: a bright 1px specular rim, a soft top bevel, a darker bottom inner\n shade and a faint cyan/magenta dispersion in the rim. */\n.vx-liquid .vx-glass,\n.vx-liquid .vx-popover {\n background:\n radial-gradient(130% 90% at 12% -14%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(249, 251, 254, .86) 0%, rgba(242, 246, 250, .78) 100%);\n -webkit-backdrop-filter: url(#vx-lg) blur(2px) saturate(1.5) brightness(1.04);\n backdrop-filter: url(#vx-lg) blur(2px) saturate(1.5) brightness(1.04);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .95),\n inset 0 8px 14px -12px rgba(255, 255, 255, .9),\n inset 0 -10px 18px -14px rgba(22, 32, 52, .24),\n inset 0 0 0 1px rgba(255, 255, 255, .4),\n 0 0 0 .5px rgba(18, 28, 45, .18),\n 0 24px 56px rgba(15, 25, 45, .18);\n}\n:root.vx-dark .vx-liquid .vx-glass,\n:root.vx-dark .vx-liquid .vx-popover {\n background:\n radial-gradient(130% 90% at 12% -14%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(28, 30, 36, .7) 0%, rgba(20, 22, 27, .62) 100%);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .28),\n inset 0 8px 14px -12px rgba(255, 255, 255, .16),\n inset 0 -10px 18px -14px rgba(0, 0, 0, .55),\n inset 0 0 0 1px rgba(255, 255, 255, .12),\n 0 0 0 .5px rgba(0, 0, 0, .4),\n 0 24px 56px rgba(0, 0, 0, .45);\n}\n/* The 1px rim carries most of the glass read in the floating window: a bright\n specular arc plus a barely-there dispersion fringe. */\n.vx-liquid .vx-popover::after {\n content: '';\n position: absolute;\n inset: 0;\n padding: 1px;\n border-radius: inherit;\n pointer-events: none;\n background: linear-gradient(140deg,\n rgba(180, 240, 255, .7) 0%,\n rgba(255, 255, 255, .92) 14%,\n rgba(255, 255, 255, .16) 34%,\n rgba(255, 255, 255, .55) 50%,\n rgba(255, 255, 255, .1) 68%,\n rgba(210, 255, 245, .3) 84%,\n rgba(255, 190, 235, .55) 100%);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n -webkit-mask-composite: xor;\n mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n}\n:root.vx-dark .vx-liquid .vx-popover::after {\n background: linear-gradient(140deg,\n rgba(150, 220, 255, .3) 0%,\n rgba(255, 255, 255, .34) 16%,\n rgba(255, 255, 255, .06) 36%,\n rgba(255, 255, 255, .22) 52%,\n rgba(255, 255, 255, .04) 70%,\n rgba(255, 190, 235, .22) 100%);\n}\n/* A live background needs no special material: the clear body already transmits\n it. Only a two-point fill reduction keeps the texture from competing with the\n copy, and the edge optics stay untouched in every background mode. */\n:root.vx-bg-live:not(.vx-glass-off) .vx-glass,\n:root.vx-bg-live:not(.vx-glass-off) .vx-popover {\n background: linear-gradient(180deg, rgba(250, 251, 253, .88), rgba(244, 246, 250, .82));\n -webkit-backdrop-filter: blur(24px) saturate(1.3);\n backdrop-filter: blur(24px) saturate(1.3);\n}\n:root.vx-bg-live.vx-liquid:not(.vx-glass-off) .vx-glass,\n:root.vx-bg-live.vx-liquid:not(.vx-glass-off) .vx-popover {\n background:\n radial-gradient(130% 90% at 12% -14%, rgba(255, 255, 255, .46), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(249, 251, 254, .84) 0%, rgba(242, 246, 250, .76) 100%);\n}\n@supports not (backdrop-filter: url(#vx-lg)) {\n .vx-liquid .vx-glass,\n .vx-liquid .vx-popover {\n background: rgba(251, 252, 255, .62);\n -webkit-backdrop-filter: blur(30px) saturate(1.3);\n backdrop-filter: blur(30px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .9),\n 0 0 0 .5px rgba(0, 0, 0, .12),\n 0 18px 44px rgba(15, 25, 45, .16);\n }\n}\n@media (prefers-reduced-transparency: reduce) {\n .vx-liquid .vx-glass,\n .vx-liquid .vx-popover {\n background: var(--dsw-alias-bg-layer-3, #fff);\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n }\n}\n\n/* ---------- chips, header and rail buttons ---------- */\n.vx-chip {\n pointer-events: auto;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-secondary, #61666b);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 2px 8px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n line-height: var(--dsw-font-xxxs-11-line-height, 14px);\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 3px;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-chip:hover {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-link { text-decoration: none; }\n.vx-header-btn,\n.vx-foot-btn,\n.vx-balance-text {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 10px;\n min-height: 28px;\n border-radius: var(--dsw-radius-sm, 8px);\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n color: var(--dsw-alias-label-secondary, #61666b);\n background: transparent;\n border: 1px solid transparent;\n cursor: pointer;\n white-space: nowrap;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-header-btn:hover,\n.vx-foot-btn:hover,\n.vx-balance-text:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n/* The session header row places the native agent-preset chip and our injected\n * buttons in one 10px-gap flex row. The chip right-insets its label by 2px\n * (padding: 0 2px 0 0), so the 10px padding above left a wider gap between\n * our two buttons than between the chip and the first of them. Match the\n * native inset so both gaps read as one rhythm. */\n.vx-header-btn { padding: 3px 2px; }\n.vx-header-btn[aria-expanded='true'],\n.vx-balance-text.vx-balance-open {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-balance-wrap { display: inline-flex; align-items: center; position: relative; }\n.vx-balance-today {\n color: var(--dsw-alias-label-tertiary, #979da6);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n}\n.vx-balance-lines { font-size: var(--dsw-font-xs-13-font-size, 13px); margin: 6px 0; }\n\n/* ---------- buttons ---------- */\n.vx-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n min-height: 30px;\n padding: 0 12px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 1px solid transparent;\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n line-height: 18px;\n cursor: pointer;\n white-space: nowrap;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), color var(--ds-transition-duration-fast, .1s) var(--vx-ease), border-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-button:disabled { opacity: .5; cursor: default; }\n.vx-button-sm { min-height: 26px; padding: 0 9px; font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-button-block { width: 100%; }\n.vx-button-primary {\n background: var(--dsw-alias-button-primary-fill, #1b1b1c);\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n.vx-button-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover, #2c2c2e); }\n.vx-button-secondary {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n border-color: var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-button-secondary:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n}\n.vx-button-ghost {\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n}\n.vx-button-ghost:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-button-danger {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 12%, transparent);\n border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 45%, transparent);\n color: var(--dsw-alias-state-error-primary, #ec1313);\n}\n.vx-button-danger:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 20%, transparent);\n}\n.vx-icon-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-icon-button:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); color: var(--dsw-alias-label-primary, #1b1b1c); }\n.vx-icon-button-sm { width: 24px; height: 24px; font-size: 14px; }\n\n/* Legacy text buttons kept for surfaces not yet migrated. */\n.vx-btn {\n pointer-events: auto;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 5px 11px;\n font-family: inherit;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-btn:hover { background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1)); }\n.vx-btn.on,\n.vx-btn[aria-pressed='true'] {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n border-color: var(--dsw-alias-border-l3, rgba(0, 0, 0, .12));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-btn:disabled { opacity: .5; cursor: default; }\n.vx-btn-sm { padding: 2px 8px; font-size: var(--dsw-font-xxxs-11-font-size, 11px); }\n.vx-btn-danger {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 12%, transparent);\n border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 45%, transparent);\n color: var(--dsw-alias-state-error-primary, #ec1313);\n}\n.vx-btn.big { padding: 9px 15px; font-size: var(--dsw-font-xs-13-font-size, 13px); }\n\n/* ---------- inputs, fields, switches, segmented controls ---------- */\n.vx-input {\n flex: 1;\n min-width: 0;\n min-height: 30px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-specific-input-major, var(--dsw-alias-bg-layer-3, #fff));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 5px 10px;\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n}\n.vx-input::placeholder { color: var(--dsw-alias-label-caption, #adb2b8); }\n.vx-input:focus-visible { outline-color: var(--dsw-alias-state-business-primary, #4176e6); outline-width: var(--dsw-focus-ring-width, 2px); }\n.vx-field { display: flex; flex-direction: column; gap: 6px; }\n.vx-field-label { font-size: var(--dsw-font-xxs-strong-12-font-size, 12px); font-weight: 500; color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-field-hint { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-label-tertiary, #979da6); line-height: 18px; }\n.vx-field-error { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-state-error-primary, #ec1313); }\n.vx-switch-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }\n.vx-switch-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.vx-switch-label { font-size: var(--dsw-font-xs-13-font-size, 13px); color: var(--dsw-alias-label-primary, #1b1b1c); cursor: pointer; }\n.vx-switch-hint { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-label-tertiary, #979da6); line-height: 18px; }\n.vx-switch {\n position: relative;\n width: 36px;\n height: 20px;\n flex: 0 0 auto;\n border: none;\n border-radius: 999px;\n background: var(--dsw-alias-state-idle-primary, #d4d4d4);\n cursor: pointer;\n padding: 0;\n transition: background-color var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-switch.on { background: var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-switch-thumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 16px;\n height: 16px;\n border-radius: 999px;\n background: var(--dsw-alias-switch-thumb, #fff);\n transition: transform var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-switch.on .vx-switch-thumb { transform: translateX(16px); }\n.vx-switch-row.is-disabled { opacity: .5; }\n.vx-segmented { display: flex; flex-direction: column; gap: 6px; }\n.vx-segmented-track {\n display: inline-flex;\n align-self: flex-start;\n gap: 2px;\n padding: 2px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n}\n.vx-segmented-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n min-height: 26px;\n padding: 0 10px;\n border: none;\n border-radius: calc(var(--dsw-radius-sm, 8px) - 2px);\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-segmented-item.on {\n background: var(--dsw-alias-bg-layer-3, #fff);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n box-shadow: var(--dsw-shadow-lv1, 0 2px 4px rgba(0, 0, 0, .05));\n}\n.vx-toggle-row {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n}\n\n/* ---------- layout ---------- */\n.vx-col { display: flex; flex-direction: column; gap: 10px; }\n.vx-row { display: flex; gap: 8px; align-items: center; }\n.vx-row.wrap { flex-wrap: wrap; }\n.vx-flex1 { flex: 1; }\n.vx-ellipsis {\n max-width: 60%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vx-section-title {\n font-size: var(--dsw-font-s-strong-14-font-size, 14px);\n font-weight: 500;\n line-height: var(--dsw-font-s-strong-14-line-height, 22px);\n margin-top: 4px;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-muted {\n color: var(--dsw-alias-label-tertiary, #979da6);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n}\n.vx-note {\n border-left: 2px solid var(--dsw-alias-border-l3, rgba(0, 0, 0, .12));\n padding: 4px 0 4px 9px;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-error { color: var(--dsw-alias-state-error-primary, #ec1313); font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-pad { padding: 12px; }\n.vx-pad-sm { padding: 6px 2px; }\n.vx-badge {\n display: inline-flex;\n align-items: center;\n border-radius: 999px;\n padding: 0 7px;\n min-height: 18px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-badge-accent { background: color-mix(in srgb, var(--dsw-alias-state-business-primary, #4176e6) 14%, transparent); color: var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-badge-danger { background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 12%, transparent); color: var(--dsw-alias-state-error-primary, #ec1313); }\n.vx-badge-success { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #22c55e) 14%, transparent); color: var(--dsw-alias-state-success-primary, #22c55e); }\n.vx-kbd {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0 4px;\n border-radius: var(--dsw-radius-xs, 4px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-tertiary, #979da6);\n font-family: var(--ds-font-family-code, monospace);\n font-size: 10px;\n}\n\n/* ---------- cards ---------- */\n.vx-card {\n background: var(--dsw-alias-bg-layer-3, var(--dsw-alias-settings-card-fill, #fff));\n border-radius: var(--dsw-radius-lg, 16px);\n box-shadow: 0 0 0 .5px var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l3, rgba(0, 0, 0, .12)));\n padding: 16px;\n}\n/* Settings sheet: one self-contained material plane, painted from neutral\n colours instead of the host's per-mode tokens, so switching \u80CC\u666F\u52A8\u6548 between\n \u5173\u95ED/\u5B57\u7B26/\u5149\u5F71 cannot turn it into flat white. Frost is a milky 94% sheet;\n liquid is the same clear Apple-style pane as the popovers (88% -> 80%) with\n the identical edge optics. Cards inside are transparent groups, not a second\n material layer. */\n.vx-settings-page.vx-glass-on {\n position: relative;\n width: 100%;\n max-width: 980px;\n box-sizing: border-box;\n padding: 16px;\n border-radius: 22px;\n background: linear-gradient(180deg, rgba(250, 251, 253, .94), rgba(244, 246, 250, .88));\n -webkit-backdrop-filter: blur(28px) saturate(1.3);\n backdrop-filter: blur(28px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .7),\n 0 0 0 .5px rgba(0, 0, 0, .1),\n 0 18px 44px rgba(15, 23, 42, .08);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on {\n background: linear-gradient(180deg, rgba(31, 33, 39, .94), rgba(24, 26, 31, .88));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(255, 255, 255, .1),\n 0 18px 44px rgba(0, 0, 0, .34);\n}\n.vx-settings-page.vx-glass-on.vx-liquid {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .66), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(249, 251, 254, .9) 0%, rgba(242, 246, 250, .82) 100%);\n -webkit-backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .97),\n inset 0 10px 18px -14px rgba(255, 255, 255, .85),\n inset 0 -14px 24px -18px rgba(22, 32, 52, .25),\n inset 0 0 0 1px rgba(255, 255, 255, .42),\n 0 0 0 .5px rgba(18, 28, 45, .18),\n 0 26px 60px rgba(15, 25, 45, .2);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(28, 30, 36, .76) 0%, rgba(20, 22, 27, .68) 100%);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .3),\n inset 0 10px 18px -14px rgba(255, 255, 255, .16),\n inset 0 -14px 24px -18px rgba(0, 0, 0, .55),\n inset 0 0 0 1px rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(0, 0, 0, .42),\n 0 26px 60px rgba(0, 0, 0, .46);\n}\n/* Same specular rim as the popovers and dialogs. */\n.vx-settings-page.vx-glass-on.vx-liquid::after {\n content: '';\n position: absolute;\n inset: 0;\n padding: 1px;\n border-radius: inherit;\n pointer-events: none;\n background: linear-gradient(140deg,\n rgba(180, 240, 255, .6) 0%,\n rgba(255, 255, 255, .92) 16%,\n rgba(255, 255, 255, .14) 36%,\n rgba(255, 255, 255, .5) 52%,\n rgba(255, 255, 255, .08) 70%,\n rgba(255, 190, 235, .45) 100%);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n -webkit-mask-composite: xor;\n mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid::after {\n background: linear-gradient(140deg,\n rgba(150, 220, 255, .24) 0%,\n rgba(255, 255, 255, .34) 16%,\n rgba(255, 255, 255, .06) 36%,\n rgba(255, 255, 255, .22) 52%,\n rgba(255, 255, 255, .04) 70%,\n rgba(255, 190, 235, .2) 100%);\n}\n/* A live background may only nudge the transmission; the optics never move, so\n the sheet reads as the same material in all three background modes. */\n.vx-settings-page.vx-glass-on.vx-bg-live {\n background: linear-gradient(180deg, rgba(250, 251, 253, .92), rgba(244, 246, 250, .86));\n}\n.vx-settings-page.vx-glass-on.vx-liquid.vx-bg-live {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .62), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(249, 251, 254, .88) 0%, rgba(242, 246, 250, .8) 100%);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-bg-live {\n background: linear-gradient(180deg, rgba(31, 33, 39, .92), rgba(24, 26, 31, .86));\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid.vx-bg-live {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(28, 30, 36, .74) 0%, rgba(20, 22, 27, .66) 100%);\n}\n.vx-settings-page.vx-glass-off {\n background: var(--dsw-alias-bg-layer-3, var(--dsw-alias-settings-card-fill, #fff));\n box-shadow: 0 0 0 .5px var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l3, rgba(0, 0, 0, .12)));\n}\n/* Grouped content inside the sheet: transparent, separated by a hairline. */\n.vx-settings-page.vx-glass-on .vx-card {\n background: rgba(255, 255, 255, .24);\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .55),\n inset 0 0 0 .5px rgba(255, 255, 255, .35);\n}\n.vx-settings-page.vx-glass-on.vx-liquid .vx-card {\n background: rgba(255, 255, 255, .18);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .6),\n inset 0 0 0 .5px rgba(255, 255, 255, .3);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on .vx-card {\n background: rgba(255, 255, 255, .06);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .12),\n inset 0 0 0 .5px rgba(255, 255, 255, .1);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid .vx-card {\n background: rgba(255, 255, 255, .05);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n inset 0 0 0 .5px rgba(255, 255, 255, .1);\n}\n.vx-settings-page.vx-glass-off .vx-card {\n background: transparent;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n box-shadow: inset 0 0 0 .5px var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l3, rgba(0, 0, 0, .12)));\n}\n.vx-card-head {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n margin-bottom: 12px;\n}\n.vx-card-titles { flex: 1; min-width: 0; }\n.vx-card-title {\n margin: 0;\n font-size: var(--dsw-font-s-strong-14-font-size, 14px);\n font-weight: 500;\n line-height: var(--dsw-font-s-strong-14-line-height, 22px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-card-desc {\n margin: 2px 0 0;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-card-actions { display: flex; align-items: center; gap: 6px; }\n.vx-card-body { display: flex; flex-direction: column; gap: 10px; }\n\n/* ---------- empty / loading ---------- */\n.vx-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 28px 16px;\n text-align: center;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-empty-icon { opacity: .6; }\n.vx-empty-title { font-size: var(--dsw-font-xs-13-font-size, 13px); color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-empty-hint { font-size: var(--dsw-font-xxs-12-font-size, 12px); line-height: 18px; }\n.vx-empty-action { margin-top: 4px; }\n.vx-spinner { display: inline-flex; align-items: center; gap: 3px; }\n.vx-spinner-dot {\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background: var(--dsw-alias-label-tertiary, #979da6);\n animation: vx-spin 1s infinite ease-in-out;\n}\n.vx-spinner-dot:nth-child(2) { animation-delay: .15s; }\n.vx-spinner-dot:nth-child(3) { animation-delay: .3s; }\n@keyframes vx-spin {\n 0%, 80%, 100% { opacity: .3; transform: scale(.8); }\n 40% { opacity: 1; transform: scale(1); }\n}\n\n/* ---------- anchors / swatches / parameters ---------- */\n.vx-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }\n.vx-swatch {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n padding: 2px;\n border-radius: var(--dsw-radius-sm, 8px);\n}\n.vx-swatch:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-swatch-box {\n width: 100%;\n height: 26px;\n border-radius: var(--dsw-radius-sm, 8px);\n box-shadow: 0 0 0 1px var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n box-sizing: border-box;\n transition: box-shadow var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-swatch.on .vx-swatch-box {\n box-shadow: 0 0 0 2px var(--dsw-alias-state-business-primary, #4176e6);\n}\n.vx-swatch-label {\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vx-param-list { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }\n.vx-param-row { display: grid; grid-template-columns: 52px 1fr 54px; gap: 8px; align-items: center; }\n.vx-param-label { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-param-val {\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n text-align: right;\n font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-range { width: 100%; height: 18px; margin: 0; accent-color: var(--dsw-alias-state-business-primary, #4176e6); }\n\n/* ---------- export ---------- */\n.vx-format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }\n.vx-format-card {\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: left;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-md, 12px);\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: transparent;\n color: inherit;\n font-family: inherit;\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), border-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-format-card:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-format-card.on { border-color: var(--dsw-alias-state-business-primary, #4176e6); background: color-mix(in srgb, var(--dsw-alias-state-business-primary, #4176e6) 8%, transparent); }\n.vx-format-title { font-size: var(--dsw-font-xs-13-font-size, 13px); font-weight: 500; }\n.vx-format-hint { font-size: var(--dsw-font-xxxs-11-font-size, 11px); color: var(--dsw-alias-label-tertiary, #979da6); }\n.vx-export-progress { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--dsw-radius-sm, 8px); background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-export-result {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-md, 12px);\n background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #22c55e) 10%, transparent);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-export-result-copy { min-width: 0; }\n.vx-budget-track {\n height: 6px;\n border-radius: 999px;\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n overflow: hidden;\n}\n.vx-budget-fill {\n height: 100%;\n border-radius: 999px;\n background: var(--dsw-alias-state-business-primary, #4176e6);\n transition: width var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-budget-fill.over { background: var(--dsw-alias-state-warn-primary, #f59e0b); }\n/* Daily usage bars: one track per row, so the percentage is measured inside\n the space left by the date column instead of overflowing the card. */\n.vx-bar-track {\n flex: 1 1 auto;\n min-width: 0;\n height: 6px;\n border-radius: 999px;\n overflow: hidden;\n background: transparent;\n}\n.vx-bar-fill {\n display: block;\n height: 100%;\n min-width: 2px;\n border-radius: 999px;\n background: var(--dsw-alias-state-business-primary, #4176e6);\n transition: width var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-count-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }\n.vx-count-cell {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n padding: 10px 6px;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n}\n.vx-count-value { font-size: var(--dsw-font-l-20-font-size, 20px); font-weight: 500; line-height: 1.2; }\n.vx-count-label { font-size: var(--dsw-font-xxxs-11-font-size, 11px); color: var(--dsw-alias-label-tertiary, #979da6); }\n.vx-command-dialog { max-width: 620px; }\n.vx-command-input { margin-bottom: 4px; }\n.vx-command-list { max-height: min(420px, 56vh); }\n.vx-command-item { display: flex; align-items: center; gap: 10px; }\n.vx-command-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.vx-command-foot {\n display: flex;\n align-items: center;\n gap: 14px;\n width: 100%;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-command-foot .vx-kbd { margin: 0 2px; }\n\n/* ---------- lists ---------- */\n.vx-list {\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: 300px;\n overflow: auto;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-list-item {\n text-align: left;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 6px 8px;\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-list-item:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-list-item.on,\n.vx-list-item[aria-selected='true'] {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n}\n.vx-list-item:disabled { opacity: .5; cursor: default; }\n.vx-check-row { display: flex; gap: 8px; align-items: center; font-size: var(--dsw-font-xs-13-font-size, 13px); padding: 5px 4px; }\n.vx-check-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n/* ---------- tables ---------- */\n.vx-table { width: 100%; border-collapse: collapse; font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-table th,\n.vx-table td {\n border-bottom: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n padding: 5px 6px;\n text-align: right;\n color: var(--dsw-alias-label-secondary, #61666b);\n}\n.vx-table th {\n font-weight: 500;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-table th:first-child,\n.vx-table td:first-child { text-align: left; }\n\n/* ---------- folders ---------- */\n.vx-folder-list { display: flex; flex-direction: column; gap: 2px; }\n.vx-rename-input { flex: 1; min-width: 0; min-height: 24px; padding: 2px 6px; font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-folder { display: flex; flex-direction: column; }\n.vx-folder-head {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 4px 4px;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: grab;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-folder-head:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-folder-head.drop-inside {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n outline: 1px dashed var(--dsw-alias-state-business-primary, #4176e6);\n}\n.vx-folder-head.drop-before { box-shadow: 0 -2px 0 0 var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-folder-head.drop-after { box-shadow: 0 2px 0 0 var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-folder-name {\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n font-weight: 500;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-folder-body {\n border-left: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n margin-left: 14px;\n padding-left: 6px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.vx-item-row {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 3px 4px;\n border-radius: var(--dsw-radius-sm, 8px);\n}\n.vx-item-row:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-item-name {\n flex: 1;\n text-align: left;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0;\n}\n.vx-item-name:hover { color: var(--dsw-alias-label-primary, #1b1b1c); }\n.vx-mini {\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-tertiary, #979da6);\n cursor: pointer;\n padding: 3px;\n border-radius: var(--dsw-radius-xs, 4px);\n display: inline-flex;\n align-items: center;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-mini:hover { color: var(--dsw-alias-label-primary, #1b1b1c); background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-form {\n display: flex;\n flex-direction: column;\n gap: 6px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n border-radius: var(--dsw-radius-md, 12px);\n padding: 8px;\n}\n\n/* ---------- prompts ---------- */\n.vx-toolbar {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-wrap: wrap;\n}\n.vx-toolbar .vx-input { flex: 1 1 160px; }\n.vx-select { flex: 0 0 auto !important; width: auto; min-width: 96px; }\n.vx-textarea { resize: vertical; min-height: 140px; line-height: 20px; padding: 8px 10px; }\n.vx-prompt-grid {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.vx-prompt-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }\n.vx-prompt-card {\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-alias-bg-layer-3, transparent);\n border-radius: var(--dsw-radius-md, 12px);\n padding: 8px 10px;\n}\n.vx-prompt-title {\n font-weight: 500;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-prompt-body {\n margin-top: 4px;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-secondary, #61666b);\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 54px;\n overflow: hidden;\n}\n\n/* ---------- dialogs ---------- */\n.vx-dialog-mask {\n position: fixed;\n inset: 0;\n z-index: 60;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n pointer-events: auto;\n background: var(--dsw-alias-bg-mask-1, rgba(8, 10, 16, .25));\n animation: vx-fade-in .18s var(--vx-ease-out);\n}\n.vx-dialog-mask[data-state='closed'] { animation: vx-fade-out .16s var(--vx-ease-in) forwards; }\n.vx-dialog {\n position: relative;\n display: flex;\n flex-direction: column;\n max-height: 82vh;\n width: min(520px, 100%);\n pointer-events: auto;\n border: none;\n border-radius: var(--dsw-radius-xl, 20px);\n background: var(--dsw-alias-bg-layer-3, #fff);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n box-shadow: var(--dsw-elevation-prominent, 0 0 0 .5px rgba(0, 0, 0, .12), 0 12px 32px rgba(0, 0, 0, .12));\n animation: vx-dialog-in var(--vx-dur-dialog) var(--vx-ease-out);\n}\n/* Dialogs follow the same two materials. They render inside the main document,\n so the backdrop chain really does frost / refract the page behind. */\n:root:not(.vx-glass-off) .vx-dialog {\n background: linear-gradient(180deg, rgba(250, 251, 253, .94), rgba(244, 246, 250, .88));\n -webkit-backdrop-filter: blur(30px) saturate(1.3);\n backdrop-filter: blur(30px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .7),\n 0 0 0 .5px rgba(0, 0, 0, .1),\n 0 18px 44px rgba(15, 23, 42, .12);\n}\n:root.vx-dark:not(.vx-glass-off) .vx-dialog {\n background: linear-gradient(180deg, rgba(31, 33, 39, .94), rgba(24, 26, 31, .88));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(255, 255, 255, .1),\n 0 18px 44px rgba(0, 0, 0, .4);\n}\n:root:not(.vx-glass-off).vx-liquid .vx-dialog {\n background:\n radial-gradient(130% 80% at 10% -14%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(252, 253, 255, .62) 0%, rgba(248, 250, 253, .54) 100%);\n -webkit-backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .95),\n inset 0 10px 18px -14px rgba(255, 255, 255, .85),\n inset 0 -14px 24px -18px rgba(22, 32, 52, .25),\n inset 0 0 0 1px rgba(255, 255, 255, .42),\n 0 0 0 .5px rgba(18, 28, 45, .18),\n 0 26px 64px rgba(15, 25, 45, .22);\n}\n:root.vx-dark:not(.vx-glass-off).vx-liquid .vx-dialog {\n background:\n radial-gradient(130% 80% at 10% -14%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(28, 30, 36, .66) 0%, rgba(20, 22, 27, .58) 100%);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .3),\n inset 0 10px 18px -14px rgba(255, 255, 255, .16),\n inset 0 -14px 24px -18px rgba(0, 0, 0, .55),\n inset 0 0 0 1px rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(0, 0, 0, .42),\n 0 26px 64px rgba(0, 0, 0, .5);\n}\n:root:not(.vx-glass-off).vx-liquid .vx-dialog::after {\n content: '';\n position: absolute;\n inset: 0;\n padding: 1px;\n border-radius: inherit;\n pointer-events: none;\n background: linear-gradient(140deg,\n rgba(180, 240, 255, .6) 0%,\n rgba(255, 255, 255, .9) 16%,\n rgba(255, 255, 255, .14) 36%,\n rgba(255, 255, 255, .5) 52%,\n rgba(255, 255, 255, .08) 70%,\n rgba(255, 190, 235, .45) 100%);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n -webkit-mask-composite: xor;\n mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n}\n:root.vx-dark.vx-liquid:not(.vx-glass-off) .vx-dialog::after {\n background: linear-gradient(140deg,\n rgba(150, 220, 255, .24) 0%,\n rgba(255, 255, 255, .34) 16%,\n rgba(255, 255, 255, .06) 36%,\n rgba(255, 255, 255, .22) 52%,\n rgba(255, 255, 255, .04) 70%,\n rgba(255, 190, 235, .2) 100%);\n}\n.vx-dialog[data-state='closed'] { animation: vx-dialog-out .16s var(--vx-ease-in) forwards; }\n.vx-dialog-sm { max-width: 360px; }\n.vx-dialog-md { max-width: 520px; }\n.vx-dialog-lg { max-width: 720px; }\n.vx-dialog-head {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 16px 18px 8px;\n}\n.vx-dialog-titles { flex: 1; min-width: 0; }\n.vx-dialog-title {\n margin: 0;\n font-size: var(--dsw-font-m-18-font-size, 16px);\n font-weight: 500;\n line-height: var(--dsw-font-m-18-line-height, 28px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-dialog-desc {\n margin: 2px 0 0;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-dialog-body {\n padding: 4px 18px 8px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: 12px;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-dialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 10px 18px 16px;\n}\n.vx-discard-bar {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary, #f59e0b) 14%, transparent);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n}\n.vx-dialog-text { font-size: var(--dsw-font-xs-13-font-size, 13px); line-height: 20px; }\n/* One shell for every anchored card: a fixed head, exactly one scrolling body\n and a fixed foot. The cards used to set their own paddings, which is how the\n balance card ended up looking like a different surface from the prompt card. */\n.vx-pop-head {\n display: flex;\n flex: 0 0 auto;\n gap: 8px;\n align-items: center;\n padding: 12px 14px 6px;\n font-weight: 500;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n line-height: var(--dsw-font-xs-13-line-height, 20px);\n}\n.vx-pop-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n padding: 4px 14px 10px;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-svgbox {\n overflow: auto;\n background: var(--dsw-alias-markdown-code-block, var(--dsw-alias-bg-layer-2, rgba(0, 0, 0, .04)));\n border-radius: var(--dsw-radius-md, 12px);\n padding: 14px;\n}\n.vx-svgbox svg { max-width: 100%; height: auto; }\n\n/* ---------- popovers / panels ---------- */\n.vx-popover {\n position: fixed;\n box-sizing: border-box;\n pointer-events: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-popover[data-state='open'] { animation: vx-pop-in var(--vx-dur-pop) var(--vx-ease-out); }\n.vx-popover[data-state='closed'] { animation: vx-pop-out var(--vx-dur-close) var(--vx-ease-in) forwards; }\n/* A scale animation distorts an SVG backdrop filter's coordinate space. Liquid\n cards slide/fade instead of scaling so the refraction stays aligned while\n the card enters. */\n.vx-liquid .vx-popover[data-state='open'] { animation-name: vx-pop-in-liquid; }\n.vx-liquid .vx-popover[data-state='closed'] { animation-name: vx-pop-out-liquid; }\n/* Card widths stay content-driven; head/body/foot come from the shared shell. */\n.vx-prompt-list { max-height: none; overflow: visible; }\n.vx-pop-search {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 6px;\n padding: 0 14px 6px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-pop-group {\n padding: 6px 2px 2px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-prompt-row {\n display: flex;\n flex-direction: column;\n gap: 2px;\n width: 100%;\n text-align: left;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-family: inherit;\n padding: 6px 8px;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-prompt-row:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-prompt-row-name { font-size: var(--dsw-font-xs-13-font-size, 13px); font-weight: 500; }\n.vx-prompt-row-text {\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n color: var(--dsw-alias-label-secondary, #61666b);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vx-prompt-row-tags { font-size: var(--dsw-font-xxxs-11-font-size, 11px); color: var(--dsw-alias-label-tertiary, #979da6); }\n.vx-pop-foot {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n padding: 6px 14px 12px;\n border-top: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, .04));\n}\n/* The usage tables sit in a 380px card; fixed layout keeps six columns from\n pushing the panel into horizontal scroll. */\n.vx-balance-pop .vx-table { table-layout: fixed; }\n.vx-balance-pop .vx-table th,\n.vx-balance-pop .vx-table td {\n padding: 4px 3px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n white-space: nowrap;\n}\n.vx-balance-pop .vx-table th:first-child,\n.vx-balance-pop .vx-table td:first-child {\n width: 34%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.vx-balance-pop .vx-table th:not(:first-child),\n.vx-balance-pop .vx-table td:not(:first-child) { text-align: right; }\n.vx-balance-totals {\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n font-weight: 500;\n line-height: var(--dsw-font-xs-13-line-height, 20px);\n}\n.vx-balance-hint { margin-top: 6px; }\n.vx-settings-page { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }\n/* The host settings surface is a side panel, not a full page: a stacked nav\n strip keeps the card at full panel width instead of squeezing it beside a\n rail. */\n.vx-settings-shell { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }\n.vx-settings-nav {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 4px;\n padding-bottom: 2px;\n}\n.vx-settings-nav-item {\n text-align: left;\n white-space: nowrap;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 6px 10px;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-settings-nav-item:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-settings-nav-item.on {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-weight: 500;\n}\n.vx-settings-content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }\n@media (max-width: 760px) {\n .vx-settings-nav { gap: 2px; }\n}\n\n/* ---------- toasts ---------- */\n.vx-toast-stack {\n position: fixed;\n left: 50%;\n bottom: 26px;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n pointer-events: auto;\n z-index: 80;\n}\n.vx-toast {\n display: flex;\n gap: 10px;\n align-items: center;\n max-width: min(560px, calc(100vw - 32px));\n padding: 8px 10px 8px 14px;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-toast-bg, #353638);\n color: var(--dsw-alias-toast-label, #fff);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n box-shadow: var(--dsw-shadow-lv2, 0 4px 12px rgba(0, 0, 0, .12));\n}\n.vx-toast[data-state='open'] { animation: vx-toast-in .22s var(--vx-ease-out); }\n.vx-toast[data-state='closed'] { animation: vx-toast-out .16s var(--vx-ease-in) forwards; }\n.vx-toast-error { background: var(--dsw-alias-state-error-primary, #ec1313); color: var(--dsw-static-neutral-00, #fff); }\n.vx-toast-text { flex: 1; min-width: 0; }\n.vx-toast-action,\n.vx-toast-close {\n border: none;\n background: transparent;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n border-radius: var(--dsw-radius-xs, 4px);\n padding: 2px 6px;\n opacity: .8;\n}\n.vx-toast-action { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }\n.vx-toast-close { font-size: 14px; line-height: 1; padding: 2px 5px; }\n.vx-toast-action:hover,\n.vx-toast-close:hover { opacity: 1; background: rgba(255, 255, 255, .14); }\n\n/* ---------- mermaid ---------- */\n.vx-mmd-wrap {\n position: relative;\n margin: 6px 0;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n border-radius: var(--dsw-radius-md, 12px);\n overflow: hidden;\n background: var(--dsw-alias-markdown-code-block, transparent);\n}\n.vx-mmd-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 6px;\n border-bottom: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, .04));\n background: var(--dsw-alias-markdown-code-block-banner, transparent);\n}\n.vx-mmd-btn {\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n padding: 3px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: pointer;\n}\n.vx-mmd-btn:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-mmd-btn.active {\n background: var(--dsw-alias-markdown-code-segment-selected, var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1)));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-weight: 500;\n}\n.vx-mmd-live {\n margin-left: auto;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n text-decoration: none;\n padding: 3px 8px;\n}\n.vx-mmd-live:hover { color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-mmd-stage { padding: 16px 12px; overflow-x: auto; text-align: center; }\n.vx-mmd-stage svg { max-width: 100%; height: auto; }\n\n/* ---------- motion / focus polish ---------- */\n.vx-section-in {\n display: flex;\n flex-direction: column;\n gap: 14px;\n animation: vx-section-in .22s var(--vx-ease-out);\n}\n.vx-icon-spin { animation: vx-rotate .9s linear infinite; transform-origin: center; }\n.vx-button,\n.vx-icon-button,\n.vx-header-btn,\n.vx-settings-nav-item,\n.vx-prompt-row,\n.vx-list-item {\n outline: none;\n transition-property: background-color, color, border-color, transform, opacity;\n transition-duration: var(--ds-transition-duration-fast, .1s);\n transition-timing-function: var(--vx-ease);\n}\n.vx-button:focus-visible,\n.vx-icon-button:focus-visible,\n.vx-header-btn:focus-visible,\n.vx-settings-nav-item:focus-visible,\n.vx-prompt-row:focus-visible,\n.vx-list-item:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary-new-colorprimary-new-color, #4d6bfe);\n outline-offset: 2px;\n}\n.vx-button:active:not(:disabled),\n.vx-icon-button:active:not(:disabled),\n.vx-header-btn:active,\n.vx-settings-nav-item:active,\n.vx-prompt-row:active,\n.vx-list-item:active { transform: scale(.97); }\n\n/* ---------- reduced motion ---------- */\n@media (prefers-reduced-motion: reduce) {\n .vx-root *,\n .vx-settings-page,\n .vx-settings-page *,\n .vx-popover,\n .vx-dialog,\n .vx-dialog-mask,\n .vx-toast,\n .vx-toast-stack {\n animation: none !important;\n transition: none !important;\n transform: none !important;\n }\n}\n";
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Anchored-popover geometry.
3
+ *
4
+ * Floating surfaces in this plugin are anchored to the control that opened
5
+ * them, never dragged. This module owns the pure placement math so the
6
+ * flip/clamp behaviour can be pinned by unit tests; the DOM measurement in
7
+ * `overlays.tsx` only feeds rectangles in and applies the returned frame.
8
+ * @module @alexpeng/dsh-custom-plugin/client/ui/anchor
9
+ */
10
+ /** Axis-aligned box of the trigger (a `DOMRect` satisfies this). */
11
+ export interface AnchorRect {
12
+ readonly top: number;
13
+ readonly bottom: number;
14
+ readonly left: number;
15
+ readonly right: number;
16
+ readonly width: number;
17
+ readonly height: number;
18
+ }
19
+ /** Desired size of the floating surface. */
20
+ export interface AnchorSize {
21
+ readonly width: number;
22
+ readonly height: number;
23
+ }
24
+ /** Visible viewport size. */
25
+ export interface AnchorViewport {
26
+ readonly width: number;
27
+ readonly height: number;
28
+ }
29
+ export interface AnchorOptions {
30
+ /** Space between the trigger and the surface. Defaults to 8px. */
31
+ readonly gap?: number;
32
+ /** Minimum distance kept from every viewport edge. Defaults to 8px. */
33
+ readonly margin?: number;
34
+ /** Which trigger edge the surface aligns to. Defaults to `start`. */
35
+ readonly align?: 'start' | 'end' | 'center';
36
+ /** Side tried first. Defaults to `bottom`. */
37
+ readonly preferred?: 'top' | 'bottom';
38
+ }
39
+ export interface AnchorFrame {
40
+ readonly left: number;
41
+ readonly top: number;
42
+ readonly maxHeight: number;
43
+ readonly placement: 'top' | 'bottom';
44
+ /** CSS transform origin matching the chosen side. */
45
+ readonly origin: string;
46
+ }
47
+ /**
48
+ * Place a floating surface next to its trigger.
49
+ *
50
+ * The surface opens on `preferred` when that side has room for the requested
51
+ * height, flips to the other side when it does not, and otherwise stays on the
52
+ * roomier side with `maxHeight` capped to the available space. Horizontally it
53
+ * aligns to the requested trigger edge and is clamped into the viewport.
54
+ */
55
+ export declare function anchorFrame(trigger: AnchorRect, size: AnchorSize, viewport: AnchorViewport, options?: AnchorOptions): AnchorFrame;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Appearance controls shared by the header quick panel and the settings page.
3
+ *
4
+ * Presentational only: config in, callbacks out. Every visual value comes from
5
+ * the host tokens in styles.ts.
6
+ * @module @alexpeng/dsh-custom-plugin/client/ui/appearance-controls
7
+ */
8
+ import * as React from 'react';
9
+ import type { BgFxPreset, BgStrength, CustomPluginConfig } from '../../protocol.ts';
10
+ import { type BgParamKey, type BgTier } from '../bg-params.ts';
11
+ export interface AppearanceControlsProps {
12
+ cfg: CustomPluginConfig;
13
+ dark: boolean;
14
+ onSet: (key: keyof CustomPluginConfig, value: string | boolean) => void;
15
+ onTier: (tier: BgTier) => void;
16
+ onPreset: (preset: BgFxPreset) => void;
17
+ onStrength: (strength: BgStrength) => void;
18
+ onFocus: (on: boolean) => void;
19
+ onParam: (key: BgParamKey, value: number) => void;
20
+ onRestoreParams: () => void;
21
+ compact?: boolean;
22
+ }
23
+ /** Colour, weather, glass and background-motion controls. */
24
+ export declare function AppearanceControls(props: AppearanceControlsProps): React.ReactElement;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Pure command-palette model: filtering, grouping and the recent-command list.
3
+ * @module @alexpeng/dsh-custom-plugin/client/ui/command-model
4
+ */
5
+ export interface PaletteCommand {
6
+ key: string;
7
+ label: string;
8
+ detail: string;
9
+ group: string;
10
+ disabled?: boolean;
11
+ run: () => void;
12
+ }
13
+ export interface CommandGroup {
14
+ group: string;
15
+ items: PaletteCommand[];
16
+ }
17
+ /** Case-insensitive filter over label and detail, capped for long lists. */
18
+ export declare function filterCommands(items: readonly PaletteCommand[], query: string, limit?: number): PaletteCommand[];
19
+ /** Group commands in first-seen order so the rendered sections stay stable. */
20
+ export declare function groupCommands(items: readonly PaletteCommand[]): CommandGroup[];
21
+ /** Move a command key to the front of the recent list, de-duplicated. */
22
+ export declare function recordRecent(list: readonly string[], key: string, max?: number): string[];
23
+ /** Commands whose keys appear in the recent list, in recent order. */
24
+ export declare function recentCommands(items: readonly PaletteCommand[], recent: readonly string[]): PaletteCommand[];
25
+ /** Read the recent list from storage; storage failures degrade to empty. */
26
+ export declare function loadRecent(storage: Storage | null): string[];
27
+ /** Persist the recent list; storage failures are ignored. */
28
+ export declare function saveRecent(storage: Storage | null, list: readonly string[]): void;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Pure folder-tree operations. The panel renders the result; every mutation
3
+ * here returns a new tree so the caller can persist it in one write.
4
+ * @module @alexpeng/dsh-custom-plugin/client/ui/folders-model
5
+ */
6
+ import type { FolderNode } from '../../protocol.ts';
7
+ export type MoveZone = 'before' | 'inside' | 'after';
8
+ /** Deep copy of a forest. */
9
+ export declare function cloneFolders(nodes: readonly FolderNode[]): FolderNode[];
10
+ /** Find one node by id anywhere in the forest. */
11
+ export declare function findFolder(nodes: readonly FolderNode[], id: string): FolderNode | null;
12
+ /** Total descendants + own refs, used by the count badge. */
13
+ export declare function folderCount(node: FolderNode): number;
14
+ /** Append a node under `parentId`, or at the root when `parentId` is null. */
15
+ export declare function addFolder(nodes: readonly FolderNode[], parentId: string | null, node: FolderNode): FolderNode[];
16
+ /** Rename one node; an empty name is rejected. */
17
+ export declare function renameFolder(nodes: readonly FolderNode[], id: string, name: string): FolderNode[];
18
+ /** Remove one node and its subtree. */
19
+ export declare function deleteFolder(nodes: readonly FolderNode[], id: string): FolderNode[];
20
+ /** True when `candidateId` is `ancestorId` or lives inside its subtree. */
21
+ export declare function isDescendant(nodes: readonly FolderNode[], ancestorId: string, candidateId: string): boolean;
22
+ /** Move a folder relative to another. Refuses cycles and self moves. */
23
+ export declare function moveFolder(nodes: readonly FolderNode[], sourceId: string, targetId: string, zone: MoveZone): FolderNode[];
24
+ /** Move within the current sibling list by one position (keyboard path). */
25
+ export declare function moveFolderOrder(nodes: readonly FolderNode[], id: string, direction: -1 | 1): FolderNode[];
26
+ /**
27
+ * Filter the forest by a free-text query against folder names and referenced
28
+ * ids. A folder survives when it or any descendant matches; matching subtrees
29
+ * keep their original shape.
30
+ */
31
+ export declare function filterFolders(nodes: readonly FolderNode[], query: string): FolderNode[];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Pure helpers for the settings-page index bridge.
3
+ * @module @alexpeng/dsh-custom-plugin/client/ui/index-bridge
4
+ */
5
+ /** De-duplicate host ids while preserving their order and dropping junk. */
6
+ export declare function uniqueIds(ids: readonly unknown[]): string[];
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Floating-surface behaviour: anchored popovers, modal dialogs, and the toast
3
+ * stack. Geometry comes from `anchor.ts`; every surface carries the entrance /
4
+ * exit animation, focus contract and Escape/outside-click handling here so the
5
+ * feature components stay presentational.
6
+ * @module @alexpeng/dsh-custom-plugin/client/ui/overlays
7
+ */
8
+ import * as React from 'react';
9
+ /** Whether the user asked the platform for reduced motion. */
10
+ export declare function useReducedMotion(): boolean;
11
+ /**
12
+ * Keep a surface mounted through its exit animation. `state` is written to
13
+ * `data-state` so CSS can run the matching keyframes.
14
+ */
15
+ export declare function usePresence(open: boolean, exitMs?: number): {
16
+ mounted: boolean;
17
+ state: 'open' | 'closed';
18
+ };
19
+ export interface PopoverProps {
20
+ open: boolean;
21
+ anchor: React.RefObject<HTMLElement | null>;
22
+ onClose: () => void;
23
+ children?: React.ReactNode;
24
+ ariaLabel: string;
25
+ width?: number;
26
+ maxHeight?: number;
27
+ className?: string;
28
+ align?: 'start' | 'end' | 'center';
29
+ gap?: number;
30
+ margin?: number;
31
+ initialFocus?: 'first' | 'none';
32
+ }
33
+ /**
34
+ * Non-modal anchored popover: opens on the trigger, flips when the viewport
35
+ * runs out of room, closes on Escape or an outside pointer press, and returns
36
+ * focus to the trigger it opened from.
37
+ */
38
+ export declare function Popover(props: PopoverProps): React.ReactElement | null;
39
+ export interface DialogProps {
40
+ open: boolean;
41
+ onClose: () => void;
42
+ title: string;
43
+ description?: string;
44
+ children?: React.ReactNode;
45
+ footer?: React.ReactNode;
46
+ size?: 'sm' | 'md' | 'lg';
47
+ dismissible?: boolean;
48
+ className?: string;
49
+ }
50
+ /** Modal dialog: focus trap, Escape / mask close, entrance and exit motion. */
51
+ export declare function Dialog(props: DialogProps): React.ReactElement | null;
52
+ export interface ToastItem {
53
+ id: number;
54
+ text: string;
55
+ kind: string;
56
+ action: {
57
+ label: string;
58
+ run: () => void;
59
+ } | null;
60
+ }
61
+ /** Toast stack using the host's toast material and tokens. Dismissed rows stay
62
+ * mounted for their exit animation, in place, so the stack does not jump. */
63
+ export declare function ToastStack(props: {
64
+ items: readonly ToastItem[];
65
+ onDismiss: (id: number) => void;
66
+ }): React.ReactElement;
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Presentational primitives shared by the native-feeling surfaces.
3
+ *
4
+ * Every visual value comes from the host's `--dsw-*` / `--ds-*` tokens (see
5
+ * styles.ts); these components only own structure, state and a11y semantics.
6
+ * @module @alexpeng/dsh-custom-plugin/client/ui/primitives
7
+ */
8
+ import * as React from 'react';
9
+ /** Join class names, dropping falsy entries. */
10
+ export declare function cx(...parts: Array<string | false | null | undefined>): string;
11
+ export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
12
+ export type ButtonSize = 'sm' | 'md';
13
+ export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
14
+ variant?: ButtonVariant;
15
+ size?: ButtonSize;
16
+ block?: boolean;
17
+ icon?: React.ReactNode;
18
+ children?: React.ReactNode;
19
+ }
20
+ /** Text button in the host's control language. */
21
+ export declare function Button(props: ButtonProps): React.ReactElement;
22
+ export interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'aria-label'> {
23
+ label: string;
24
+ icon: React.ReactNode;
25
+ size?: 'sm' | 'md';
26
+ }
27
+ /** Square icon-only button; the label is mandatory for screen readers. */
28
+ export declare function IconButton(props: IconButtonProps): React.ReactElement;
29
+ export interface SwitchProps {
30
+ label: string;
31
+ checked: boolean;
32
+ onChange: (value: boolean) => void;
33
+ hint?: string;
34
+ disabled?: boolean;
35
+ id?: string;
36
+ }
37
+ /** Host-style switch row: label left, track right, optional hint below. */
38
+ export declare function Switch(props: SwitchProps): React.ReactElement;
39
+ export interface SegmentedOption<T extends string> {
40
+ value: T;
41
+ label: string;
42
+ icon?: React.ReactNode;
43
+ }
44
+ export interface SegmentedProps<T extends string> {
45
+ value: T;
46
+ options: ReadonlyArray<SegmentedOption<T>>;
47
+ onChange: (value: T) => void;
48
+ label?: string;
49
+ ariaLabel?: string;
50
+ }
51
+ /** Segmented control for small mutually-exclusive choices. */
52
+ export declare function Segmented<T extends string>(props: SegmentedProps<T>): React.ReactElement;
53
+ export interface FieldProps {
54
+ label: string;
55
+ hint?: string;
56
+ error?: string | null;
57
+ htmlFor?: string;
58
+ children?: React.ReactNode;
59
+ }
60
+ /** Label + control + hint/error block. */
61
+ export declare function Field(props: FieldProps): React.ReactElement;
62
+ export interface CardProps {
63
+ title?: string;
64
+ description?: string;
65
+ actions?: React.ReactNode;
66
+ children?: React.ReactNode;
67
+ className?: string;
68
+ id?: string;
69
+ }
70
+ /** Settings card: host surface, title row, optional description and body. */
71
+ export declare function Card(props: CardProps): React.ReactElement;
72
+ export interface EmptyStateProps {
73
+ title: string;
74
+ hint?: string;
75
+ icon?: React.ReactNode;
76
+ action?: React.ReactNode;
77
+ }
78
+ /** Consistent empty state for lists and panels. */
79
+ export declare function EmptyState(props: EmptyStateProps): React.ReactElement;
80
+ /** Inline loading indicator with an accessible status label. */
81
+ export declare function Spinner(props: {
82
+ label?: string;
83
+ }): React.ReactElement;
84
+ export interface BadgeProps {
85
+ children?: React.ReactNode;
86
+ tone?: 'neutral' | 'accent' | 'danger' | 'success';
87
+ }
88
+ /** Small count/status pill. */
89
+ export declare function Badge(props: BadgeProps): React.ReactElement;
90
+ /** Keyboard keycap. */
91
+ export declare function Kbd(props: {
92
+ children: React.ReactNode;
93
+ }): React.ReactElement;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Pure prompt-library operations: tag normalization, validation, filtering,
3
+ * sorting and import merging. Kept DOM-free so the panel stays presentational
4
+ * and these rules can be unit tested.
5
+ * @module @alexpeng/dsh-custom-plugin/client/ui/prompt-model
6
+ */
7
+ import type { PromptItem } from '../../protocol.ts';
8
+ export type PromptSort = 'manual' | 'recent' | 'used' | 'name';
9
+ export type PromptImportMode = 'merge' | 'replace';
10
+ export interface PromptDraft {
11
+ name: string;
12
+ text: string;
13
+ tags: string[];
14
+ }
15
+ /** Split, trim and de-duplicate tags (case-insensitive) while keeping order. */
16
+ export declare function normalizeTags(input: string | readonly string[]): string[];
17
+ /** Validation errors for the editor; an empty array means the draft is valid. */
18
+ export declare function validatePromptDraft(draft: PromptDraft): string[];
19
+ /** Every distinct tag across the library, sorted for the filter menu. */
20
+ export declare function allTags(items: readonly PromptItem[]): string[];
21
+ export interface PromptFilter {
22
+ query?: string;
23
+ tag?: string | null;
24
+ favoritesOnly?: boolean;
25
+ }
26
+ /** Filter by free text, one tag and the favourites switch. */
27
+ export declare function filterPrompts(items: readonly PromptItem[], filter: PromptFilter): PromptItem[];
28
+ /** Stable sort for the four supported orders. */
29
+ export declare function sortPrompts(items: readonly PromptItem[], sort: PromptSort): PromptItem[];
30
+ export interface ImportResult {
31
+ next: PromptItem[];
32
+ added: number;
33
+ updated: number;
34
+ removed: number;
35
+ }
36
+ /** Merge an imported set by id, or replace the whole library. */
37
+ export declare function mergePromptImport(current: readonly PromptItem[], incoming: readonly PromptItem[], mode: PromptImportMode): ImportResult;