@alexpeng/dsh-custom-plugin 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +686 -498
- package/README.i18n.yaml +2 -2
- package/README.md +61 -40
- package/README.zh.md +49 -37
- package/lib/client.js +574 -1032
- package/lib/client.js.map +1 -1
- package/lib/index.js +362 -31
- package/lib/types/client/custom.d.ts +1 -5
- package/lib/types/client/palette.d.ts +34 -0
- package/lib/types/client/styles.d.ts +1 -1
- package/lib/types/host-service.d.ts +11 -0
- package/lib/types/loopback.d.ts +14 -7
- package/lib/types/pricing.d.ts +1 -1
- package/lib/types/protocol.d.ts +2 -7
- package/lib/types/routes.d.ts +4 -4
- package/lib/types/state.d.ts +27 -4
- package/package.json +2 -2
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* vx- and must not be scoped by CSS Modules.
|
|
5
5
|
* @module @alexpeng/dsh-custom-plugin/client/styles
|
|
6
6
|
*/
|
|
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 * aurora gradient, 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 .vx-liquid .vx-glass {\n background: rgba(255, 255, 255, .06);\n backdrop-filter: url(#vx-lg);\n -webkit-backdrop-filter: url(#vx-lg);\n }\n @media (prefers-color-scheme: dark) {\n .vx-liquid .vx-glass {\n background: rgba(0, 0, 0, .06);\n }\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-liquid .vx-pattern {\n background-image: radial-gradient(rgba(150, 150, 160, .5) 3px, transparent 3px);\n background-size: 24px 24px;\n -webkit-mask-image: radial-gradient(ellipse at top, transparent 20%, black);\n mask-image: radial-gradient(ellipse at top, transparent 20%, black);\n animation: vx-pattern-move 25000ms linear infinite;\n }\n @media (prefers-color-scheme: dark) {\n .vx-liquid .vx-pattern {\n background-image: radial-gradient(rgba(110, 110, 128, .5) 3px, transparent 3px);\n }\n }\n .vx-pattern {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: -1;\n background-image: radial-gradient(rgba(150, 150, 160, .42) 1px, transparent 1px);\n background-size: 24px 24px;\n -webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, black 100%);\n mask-image: radial-gradient(ellipse at center, transparent 30%, black 100%);\n animation: vx-pattern-move 10000ms linear infinite;\n }\n @media (prefers-color-scheme: dark) {\n .vx-pattern {\n background-image: radial-gradient(rgba(100, 100, 116, .5) 1px, transparent 1px);\n }\n }\n @keyframes vx-pattern-move {\n from {\n background-position: 0 0;\n }\n to {\n background-position: 0 24px;\n }\n }\n @keyframes vx-aurora {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n 100% {\n background-position: 0% 50%;\n }\n }\n .vx-rail {\n position: absolute;\n width: 12px;\n border-radius: 8px;\n background: rgba(120, 130, 150, .18);\n border: 1px solid rgba(120, 130, 150, .25);\n pointer-events: auto;\n touch-action: none;\n box-sizing: border-box;\n }\n .vx-rail.right {\n right: 4px;\n }\n .vx-rail.left {\n left: 56px;\n }\n /* When the rail is active it substitutes the native scrollbar: the scrollport\n carrying the vx-rail-scroller class (added by the client when it resolves\n the chat scrollport) hides its own bar so only one scroll affordance\n remains. scrollbar-gutter: stable on the shell keeps the layout width. */\n .vx-rail-scroller {\n scrollbar-width: none;\n }\n .vx-rail-scroller::-webkit-scrollbar {\n display: none;\n }\n .vx-thumb {\n position: absolute;\n left: 1px;\n right: 1px;\n border-radius: 8px;\n background: rgba(90, 105, 135, .5);\n border: 1px solid rgba(255, 255, 255, .35);\n box-sizing: border-box;\n }\n .vx-thumb:hover {\n background: rgba(90, 105, 135, .7);\n }\n .vx-dot {\n position: absolute;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: rgba(70, 85, 110, .92);\n border: 2px solid rgba(255, 255, 255, .92);\n box-shadow: 0 1px 3px rgba(0, 0, 0, .35);\n pointer-events: auto;\n cursor: pointer;\n transition: transform .12s;\n padding: 0;\n }\n .vx-dot:hover {\n transform: translate(-50%, -50%) scale(1.35);\n }\n .vx-dot.star {\n background: #c9a24b;\n border-color: #f3e3bd;\n }\n @media (prefers-color-scheme: dark) {\n .vx-dot {\n background: rgba(205, 215, 230, .95);\n border-color: rgba(28, 34, 46, .9);\n }\n .vx-thumb {\n background: rgba(165, 180, 205, .45);\n }\n }\n .vx-rail-pop {\n position: absolute;\n pointer-events: auto;\n padding: 10px 12px;\n width: 300px;\n font-size: 12px;\n line-height: 1.55;\n z-index: 5;\n }\n /* Class = which side the rail sits on; the card must open toward the page\n content. It is a child of the 12px-wide rail, so right:20px puts it left\n of the rail and left:20px puts it right (20px = rail width + 8px gap). */\n .vx-rail-pop.right {\n right: 20px;\n }\n .vx-rail-pop.left {\n left: 20px;\n }\n .vx-pop-time {\n color: #6d7689;\n font-size: 11px;\n margin-bottom: 4px;\n }\n .vx-pop-text {\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 150px;\n overflow: hidden;\n margin-bottom: 8px;\n }\n .vx-pop-row {\n display: flex;\n gap: 5px;\n flex-wrap: wrap;\n align-items: center;\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-pinned {\n background: rgba(127, 164, 224, .36);\n border-color: rgba(127, 164, 224, .8);\n }\n .vx-balance-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 8px;\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:disabled {\n opacity: .35;\n cursor: not-allowed;\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-textarea {\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 resize: vertical;\n font-family: inherit;\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-liquid .vx-glass {\n background: rgba(0, 0, 0, .06);\n }\n .vx-root.vx-dark .vx-liquid .vx-pattern {\n background-image: radial-gradient(rgba(110, 110, 128, .5) 3px, transparent 3px);\n }\n .vx-root.vx-dark .vx-pattern {\n background-image: radial-gradient(rgba(100, 100, 116, .5) 1px, transparent 1px);\n }\n .vx-root.vx-dark .vx-dot {\n background: rgba(205, 215, 230, .95);\n border-color: rgba(28, 34, 46, .9);\n }\n .vx-root.vx-dark .vx-thumb {\n background: rgba(165, 180, 205, .45);\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-liquid .vx-glass {\n background: rgba(255, 255, 255, .06);\n }\n .vx-root.vx-light .vx-liquid .vx-pattern {\n background-image: radial-gradient(rgba(150, 150, 160, .5) 3px, transparent 3px);\n }\n .vx-root.vx-light .vx-pattern {\n background-image: radial-gradient(rgba(150, 150, 160, .42) 1px, transparent 1px);\n }\n .vx-root.vx-light .vx-dot {\n background: rgba(70, 85, 110, .92);\n border-color: rgba(255, 255, 255, .92);\n }\n .vx-root.vx-light .vx-thumb {\n background: rgba(90, 105, 135, .5);\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}";
|
|
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";
|
|
@@ -71,6 +71,8 @@ export declare class CustomPluginHost {
|
|
|
71
71
|
private mermaidSource;
|
|
72
72
|
private localMermaidPath;
|
|
73
73
|
private readCredential;
|
|
74
|
+
private credentialCache;
|
|
75
|
+
private static readonly CREDENTIAL_CACHE_TTL_MS;
|
|
74
76
|
constructor(options: CustomPluginHostOptions);
|
|
75
77
|
/** Persisted state document (debounced by the loader entry). */
|
|
76
78
|
persist(): Promise<void>;
|
|
@@ -200,6 +202,15 @@ export declare class CustomPluginHost {
|
|
|
200
202
|
private httpText;
|
|
201
203
|
private httpJson;
|
|
202
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Translate a Node `fetch` connection-level failure into a message a user can
|
|
207
|
+
* act on. Node reports "fetch failed" with the real reason in `error.cause`
|
|
208
|
+
* (e.g. `SELF_SIGNED_CERT_IN_CHAIN` — a local TLS-intercepting proxy or
|
|
209
|
+
* security suite, which makes outbound calls fail *intermittently* whenever
|
|
210
|
+
* the interceptor takes the connection), and passing the bare TypeError
|
|
211
|
+
* through once read as a mysterious network that "sometimes does not exist".
|
|
212
|
+
*/
|
|
213
|
+
export declare function readableFetchError(error: unknown): string;
|
|
203
214
|
/** Resolve `mermaid/dist/mermaid.min.js` from the package's own dependency
|
|
204
215
|
* tree (works for `link:` checkouts and registry installs alike); null when
|
|
205
216
|
* the dependency is absent, which falls mermaidFetch back to the CDN. */
|
package/lib/types/loopback.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Loopback trust fence for the host routes: socket address, Host header,
|
|
3
|
-
*
|
|
2
|
+
* Loopback trust fence for the host routes: socket address, Host header, and
|
|
3
|
+
* browser same-origin markers.
|
|
4
4
|
*
|
|
5
5
|
* Semantics: RFC 5735 IPv4 127/8, ::1, IPv4-mapped ::ffff:127/8, localhost
|
|
6
|
-
* hostnames
|
|
7
|
-
*
|
|
6
|
+
* hostnames. The request-level fence mirrors the platform's own API fence: a
|
|
7
|
+
* loopback peer naming a loopback Host is trusted unless a marker says
|
|
8
|
+
* otherwise — `sec-fetch-site: cross-site` rejects, and a present Origin must
|
|
9
|
+
* match the Host authority. Absent markers are trusted: that is the header
|
|
10
|
+
* shape dsh Desktop's shell produces when it forwards renderer requests to
|
|
11
|
+
* its Host (it deletes `origin`, `sec-fetch-site` and `cookie` first), and
|
|
12
|
+
* the shape the platform fence accepts for the same reason.
|
|
8
13
|
* @module @alexpeng/dsh-custom-plugin/loopback
|
|
9
14
|
*/
|
|
10
15
|
import type { IncomingMessage } from 'node:http';
|
|
@@ -15,8 +20,10 @@ export declare function isLoopbackAddress(address: string | undefined): boolean;
|
|
|
15
20
|
/** Whether a normalized URL hostname names the loopback authority (localhost, [::1], 127/8). */
|
|
16
21
|
export declare function isLoopbackHostname(hostname: string): boolean;
|
|
17
22
|
/**
|
|
18
|
-
* Request-level trust fence
|
|
19
|
-
*
|
|
20
|
-
*
|
|
23
|
+
* Request-level trust fence, mirroring the platform fence's semantics: a
|
|
24
|
+
* loopback socket address AND a loopback Host header, non-`cross-site` fetch
|
|
25
|
+
* marker, and an Origin that is absent (trusted — the dsh Desktop forward
|
|
26
|
+
* shape) or matches the Host authority. The socket address is authoritative;
|
|
27
|
+
* X-Forwarded-For is never trusted.
|
|
21
28
|
*/
|
|
22
29
|
export declare function isLoopbackRequest(request: IncomingMessage): boolean;
|
package/lib/types/pricing.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { UsageRow } from './protocol.ts';
|
|
|
8
8
|
/** Official source used for the built-in estimate and shown in the panel. */
|
|
9
9
|
export declare const DEEPSEEK_PRICING_SOURCE_URL = "https://api-docs.deepseek.com/zh-cn/quick_start/pricing/";
|
|
10
10
|
/** Date on which the built-in rule was checked against the official page. */
|
|
11
|
-
export declare const DEEPSEEK_PRICING_CHECKED_ON = "2026-
|
|
11
|
+
export declare const DEEPSEEK_PRICING_CHECKED_ON = "2026-09-30";
|
|
12
12
|
export interface DeepSeekUnitPrice {
|
|
13
13
|
/** Uncached input / cache-miss input price. */
|
|
14
14
|
input: number;
|
package/lib/types/protocol.d.ts
CHANGED
|
@@ -14,7 +14,8 @@ export declare const CUSTOM_PLUGIN_API_PREFIX = "/api/custom-plugin";
|
|
|
14
14
|
export declare const MERMAID_SCRIPT_PATH = "/custom-plugin/mermaid.js";
|
|
15
15
|
/** Plugin appearance and behavior configuration, persisted in the host state file. */
|
|
16
16
|
export interface CustomPluginConfig {
|
|
17
|
-
/** Background preset: 'default'
|
|
17
|
+
/** Background preset: 'default' (no color) or one of the 20 palette names.
|
|
18
|
+
* The removed 'aurora' value migrates to 'default' on load. */
|
|
18
19
|
bg?: string;
|
|
19
20
|
/** Weather overlay: 'none' | 'snow' | 'rain' | 'sakura'. */
|
|
20
21
|
weather?: string;
|
|
@@ -24,12 +25,6 @@ export interface CustomPluginConfig {
|
|
|
24
25
|
glassMode?: 'frost' | 'liquid';
|
|
25
26
|
/** Apply backdrop blur to global dialogs/menus/tooltips as well. */
|
|
26
27
|
globalGlass?: boolean;
|
|
27
|
-
/** Show the per-user-message timeline rail. */
|
|
28
|
-
timeline?: boolean;
|
|
29
|
-
/** Place the timeline rail on the left instead of the right. */
|
|
30
|
-
timelineLeft?: boolean;
|
|
31
|
-
/** Show only starred timeline nodes. */
|
|
32
|
-
starsOnly?: boolean;
|
|
33
28
|
/** Enable the selection-quote-reply feature. */
|
|
34
29
|
quote?: boolean;
|
|
35
30
|
/** Force `scroll-behavior: auto` to stop automatic jump-to-bottom. */
|
package/lib/types/routes.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HTTP routes for dsh-custom-plugin.
|
|
3
3
|
*
|
|
4
|
-
* Every route sits behind the loopback
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* loads it as a `<script src>`.
|
|
4
|
+
* Every route sits behind the loopback trust fence (shared `loopback.ts`,
|
|
5
|
+
* semantics aligned with the platform's own request fence); the browser talks
|
|
6
|
+
* to these handlers with plain fetch. The mermaid engine script is served at
|
|
7
|
+
* its own non-API path because the browser loads it as a `<script src>`.
|
|
8
8
|
* @module @alexpeng/dsh-custom-plugin/routes
|
|
9
9
|
*/
|
|
10
10
|
import type { WebRoute } from '@deepseek-ai/dsh-host-webserver';
|
package/lib/types/state.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* on the temp file.
|
|
10
10
|
* @module @alexpeng/dsh-custom-plugin/state
|
|
11
11
|
*/
|
|
12
|
-
import { type CustomPluginConfig, type CustomPluginState, type PromptItem } from './protocol.ts';
|
|
12
|
+
import { type CustomPluginConfig, type CustomPluginState, type FolderNode, type PromptItem, type StarsMap } from './protocol.ts';
|
|
13
13
|
/** State file name of this plugin. */
|
|
14
14
|
export declare const STATE_FILE = "custom-plugin-state.json";
|
|
15
15
|
/** Default state document. */
|
|
@@ -20,8 +20,29 @@ export declare function normalizeCfg(raw: unknown): CustomPluginConfig;
|
|
|
20
20
|
export declare function normalizePrompt(raw: unknown): PromptItem | null;
|
|
21
21
|
/** Merge a persisted document into the default state, ignoring unknown shapes. */
|
|
22
22
|
export declare function mergeState(target: CustomPluginState, raw: unknown): void;
|
|
23
|
-
/**
|
|
24
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Validate a folder tree from the browser against the persisted shape:
|
|
25
|
+
* unique non-empty ids, string name, and string-only id lists, bounded in
|
|
26
|
+
* depth and node count. Null on any violation — the caller rejects the edit.
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeFolders(raw: unknown): FolderNode[] | null;
|
|
29
|
+
/**
|
|
30
|
+
* Validate a star map from the browser: session ids as safe object keys,
|
|
31
|
+
* digit-string sequence keys, `true` values only, bounded total. Null on any
|
|
32
|
+
* violation.
|
|
33
|
+
*/
|
|
34
|
+
export declare function normalizeStars(raw: unknown): StarsMap | null;
|
|
35
|
+
/**
|
|
36
|
+
* Load and merge the persisted document into `state`.
|
|
37
|
+
*
|
|
38
|
+
* A missing file (ENOENT) is a fresh install and resolves with defaults. A
|
|
39
|
+
* corrupt or permanently unreadable file is renamed aside before defaults
|
|
40
|
+
* are adopted, so the caller's immediate save cannot destroy the previous
|
|
41
|
+
* bytes. Only when the file is unreadable AND cannot be moved aside does
|
|
42
|
+
* this reject — the caller must then suppress saves, because persisting
|
|
43
|
+
* never-loaded defaults would clobber a document that may be intact.
|
|
44
|
+
*/
|
|
45
|
+
export declare function loadStateFile(state: CustomPluginState, home?: string, retryDelays?: readonly number[]): Promise<string>;
|
|
25
46
|
/**
|
|
26
47
|
* Temp name for an atomic replace, qualified by the writing process.
|
|
27
48
|
*
|
|
@@ -33,5 +54,7 @@ export declare function loadStateFile(state: CustomPluginState, home?: string):
|
|
|
33
54
|
export declare function tempPathFor(target: string, pid?: number): string;
|
|
34
55
|
/** Atomically persist the state document. Saves to the same path are
|
|
35
56
|
* serialized: a caller awaits its own turn's completion, a failed turn never
|
|
36
|
-
* poisons the queue behind it.
|
|
57
|
+
* poisons the queue behind it. Before writing, another host's changes since
|
|
58
|
+
* this process last loaded or saved the file are merged back in (see
|
|
59
|
+
* `mergeExternalChanges`). */
|
|
37
60
|
export declare function saveStateFile(state: CustomPluginState, home?: string): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexpeng/dsh-custom-plugin",
|
|
3
|
-
"description": "Custom convenience suite for the dsh web GUI: appearance,
|
|
4
|
-
"version": "0.
|
|
3
|
+
"description": "Custom convenience suite for the dsh web GUI: appearance, folders, prompts, session export/search, Mermaid, quote reply, usage analytics, local budget, key-free backups, and a Ctrl/Cmd+K command palette; dual-face plugin mounted without dsh source changes.",
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"icon": "./icon.svg",
|
|
7
7
|
"main": "lib/index.js",
|