dsh-plugin-core 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/explorer/open.js +1 -1
- package/dist/explorer/open.js.map +1 -1
- package/dist/ui/Card.d.ts +19 -2
- package/dist/ui/Card.d.ts.map +1 -1
- package/dist/ui/Card.js +35 -9
- package/dist/ui/Card.js.map +1 -1
- package/dist/ui/Modal.d.ts.map +1 -1
- package/dist/ui/Modal.js +16 -37
- package/dist/ui/Modal.js.map +1 -1
- package/dist/ui/PanelDock.d.ts.map +1 -1
- package/dist/ui/PanelDock.js +5 -2
- package/dist/ui/PanelDock.js.map +1 -1
- package/dist/ui/SideSheet.d.ts +56 -0
- package/dist/ui/SideSheet.d.ts.map +1 -0
- package/dist/ui/SideSheet.js +97 -0
- package/dist/ui/SideSheet.js.map +1 -0
- package/dist/ui/Surface.d.ts +43 -0
- package/dist/ui/Surface.d.ts.map +1 -0
- package/dist/ui/Surface.js +39 -0
- package/dist/ui/Surface.js.map +1 -0
- package/dist/ui/card-css.generated.d.ts +1 -1
- package/dist/ui/card-css.generated.d.ts.map +1 -1
- package/dist/ui/card-css.generated.js +1 -1
- package/dist/ui/card-css.generated.js.map +1 -1
- package/dist/ui/feedback-css.generated.d.ts +1 -1
- package/dist/ui/feedback-css.generated.d.ts.map +1 -1
- package/dist/ui/feedback-css.generated.js +1 -1
- package/dist/ui/feedback-css.generated.js.map +1 -1
- package/dist/ui/index.d.ts +3 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +2 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/overlay-css.d.ts +2 -0
- package/dist/ui/overlay-css.d.ts.map +1 -0
- package/dist/ui/overlay-css.generated.d.ts +2 -0
- package/dist/ui/overlay-css.generated.d.ts.map +1 -0
- package/dist/ui/overlay-css.generated.js +4 -0
- package/dist/ui/overlay-css.generated.js.map +1 -0
- package/dist/ui/overlay-css.js +2 -0
- package/dist/ui/overlay-css.js.map +1 -0
- package/dist/ui/overlay.d.ts +40 -0
- package/dist/ui/overlay.d.ts.map +1 -0
- package/dist/ui/overlay.js +49 -0
- package/dist/ui/overlay.js.map +1 -0
- package/dist/ui/panel-dock-css.generated.d.ts +1 -1
- package/dist/ui/panel-dock-css.generated.d.ts.map +1 -1
- package/dist/ui/panel-dock-css.generated.js +1 -1
- package/dist/ui/panel-dock-css.generated.js.map +1 -1
- package/dist/ui/side-panel-css.d.ts +2 -0
- package/dist/ui/side-panel-css.d.ts.map +1 -0
- package/dist/ui/side-panel-css.generated.d.ts +2 -0
- package/dist/ui/side-panel-css.generated.d.ts.map +1 -0
- package/dist/ui/side-panel-css.generated.js +4 -0
- package/dist/ui/side-panel-css.generated.js.map +1 -0
- package/dist/ui/side-panel-css.js +2 -0
- package/dist/ui/side-panel-css.js.map +1 -0
- package/dist/ui/side-sheet-css.d.ts +2 -0
- package/dist/ui/side-sheet-css.d.ts.map +1 -0
- package/dist/ui/side-sheet-css.generated.d.ts +2 -0
- package/dist/ui/side-sheet-css.generated.d.ts.map +1 -0
- package/dist/ui/side-sheet-css.generated.js +4 -0
- package/dist/ui/side-sheet-css.generated.js.map +1 -0
- package/dist/ui/side-sheet-css.js +2 -0
- package/dist/ui/side-sheet-css.js.map +1 -0
- package/dist/ui/surface-css.d.ts +2 -0
- package/dist/ui/surface-css.d.ts.map +1 -0
- package/dist/ui/surface-css.generated.d.ts +2 -0
- package/dist/ui/surface-css.generated.d.ts.map +1 -0
- package/dist/ui/surface-css.generated.js +4 -0
- package/dist/ui/surface-css.generated.js.map +1 -0
- package/dist/ui/surface-css.js +7 -0
- package/dist/ui/surface-css.js.map +1 -0
- package/docs/help/ui.doc.ts +91 -4
- package/docs/help/ui.md +80 -3
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PANEL_DOCK_CSS = "\n/* \u505C\u9760\u680F = **\u5E03\u5C40\u6210\u5458**\uFF0C\u4E0D\u662F\u6D6E\u5C42\uFF1A\u5B83\u5360\u5BBD\u5EA6\u3001\u628A\u4E3B\u533A\u771F\u6B63\u6324\u7A84\uFF08\u5144\u5F1F\u9879\u76EE 2026-09-28\uFF1A\n \u300C\u5206\u680F\u538B\u8FC7\u6765\uFF0C\u4E0D\u662F\u76D6\u4E0A\u53BB\u300D\uFF09\u3002\u6240\u4EE5\u8C03\u7528\u65B9\u5FC5\u987B\u628A\u5B83\u653E\u8FDB\u81EA\u5DF1\u7684 flex \u6839\u91CC\u3002 */\n.dshpc-dock{display:flex;flex:0 0 auto;align-self:stretch;min-width:0}\n/* \u5F00\u7740\u65F6\u7ED9\u4E3B\u533A\u6EDA\u52A8\u6761\u8BA9\u51FA\u4E00\u6761\u7F1D\uFF1A\u6EDA\u52A8\u6761\u8D34\u6B7B\u5206\u9694\u7EBF\u5F88\u96BE\u770B\uFF08\u7528\u6237 2026-10-28\uFF0C\u5BF9\u9F50\n dsh-better-sidebar \u7684\u7559\u767D\uFF09\u3002\u5168\u5173\u65F6\u6574\u6761 dock \u9000\u51FA\uFF0C\u7F1D\u9699\u4E00\u8D77\u6D88\u5931\u3001\u4E0D\u7559\u767D\u8FB9\u3002\n \u7F1D\u5BBD\u53EF\u7531\u8C03\u7528\u65B9\u76D6 --dshpc-dock-gap\uFF1BTS \u4FA7\u7684\u8BA9\u4F4D\u91CF\uFF08DOCK_GAP\uFF09\u8981\u4E0E\u5B83\u4E00\u81F4\u3002 */\n.dshpc-dock--open{margin-left:var(--dshpc-dock-gap,1px)}\n\n/* \u81EA\u52A8\u52A0\u7684\u5BBF\u4E3B\u884C\uFF08openFilePreview \u52A0 / \u5173\u95ED\u5373\u6458\uFF09\uFF1A\u6D88\u8D39\u65B9\u90A3\u884C\u4E0D\u5FC5\u81EA\u5DF1\u5199 flex\u3002\n \u53EA\u8BA9\u300C\u7B2C\u4E00\u4E2A\u975E\u9884\u89C8\u5B50\u9879\u300D\u5F53\u4E3B\u533A\u4F38\u5C55\uFF0C\u5176\u4F59\u76F4\u63A5\u5B50\u9879\u4E0D\u52A8\uFF08\u9875\u811A\u6761\u3001\u5DE5\u5177\u6761\u4E0D\u8BEF\u4F24\uFF09\uFF1B\n display \u4E0D\u5728\u8FD9\u91CC\u5199\u6B7B \u2014\u2014 \u672C\u6765\u5C31\u662F grid \u7B49\u5E03\u5C40\u7684\u5143\u7D20\u4FDD\u6301\u539F\u6837\uFF0C\u7531 TS \u4FA7\u6309\u8BA1\u7B97\u503C\u8865 flex\u3002 */\n.dshpc-dock-host{min-width:0;min-height:0}\n.dshpc-dock-host>:not([data-dshpc-file-preview]){min-width:0}\n.dshpc-dock-host>:first-child:not([data-dshpc-file-preview]){flex:1 1 auto}\n\n/* \u5355\u680F\uFF1Asticky + 100vh \u8BA9\u5B83\u5728\u9875\u9762\u6EDA\u52A8\u65F6\u4FDD\u6301\u53EF\u89C1\uFF0C\u540C\u65F6\u4ECD\u7136\u5360\u5BBD\u5EA6\u3002\n \u26A0\uFE0F **\u672C\u6761\u523B\u610F\u4E0D\u8BBE z-index**\uFF1A\u5E03\u5C40\u6210\u5458\u4E00\u65E6\u5E26\u6B63 z-index\uFF0C\u5C31\u4F1A\u65E0\u6761\u4EF6\u538B\u8FC7\u5BBF\u4E3B portal \u5230 body \u7684\n \u5F39\u7A97\uFF08\u5144\u5F1F\u9879\u76EE 2026-10-05 \u771F\u673A\u4E8B\u6545\u300C\u4FA7\u8FB9\u680F\u76D6\u4F4F\u5BBF\u4E3B\u8BBE\u7F6E\u5F39\u7A97\u300D\uFF09\u3002\u5C42\u5E8F\u4EA4\u7ED9 DOM \u987A\u5E8F\u88C1\u51B3\u3002 */\n.dshpc-dock__panel{\n box-sizing:border-box;position:sticky;top:0;align-self:stretch;\n display:flex;flex-direction:column;flex:0 0 auto;\n /* \u9AD8\u5EA6\u9ED8\u8BA4\u89C6\u53E3\u9AD8\uFF08\u6574\u9875\u573A\u666F\uFF09\uFF1B\u5D4C\u5728\u5B9A\u9AD8\u5BB9\u5668\u91CC\u65F6\u7531\u8C03\u7528\u65B9\u7ED9 --dshpc-dock-h\uFF08\u5982 420px / 100%\uFF09\u3002 */\n height:var(--dshpc-dock-h,100vh);max-height:var(--dshpc-dock-h,100vh);min-width:0;\n background:var(--dshpc-surface-base);color:var(--dshpc-fg);\n border-left:1px solid var(--dshpc-border);\n transition:border-color var(--dshpc-dur-fast) var(--dshpc-ease);\n box-shadow:var(--dshpc-shadow-2);\n /* \u5165\u573A\uFF1A\u4ECE 0 \u5BBD\u6ED1\u51FA\u6765\uFF08keyframes \u53EA\u5199 from\uFF0C\u7EC8\u70B9\u53D6\u5185\u8054 width\uFF09\uFF0C\u6253\u5F00 / \u8033\u6735\u5C55\u5F00\u90FD\u8D70\u8FD9\u6761\u3002 */\n animation:dshpc-dock-in .22s var(--dshpc-ease);\n}\n/* overflow:hidden \u53EA\u5728\u52A8\u753B\u524D\u6BB5\uFF08\u79BB\u6563\u5C5E\u6027\u5728 50% \u7FFB\u8F6C\uFF09\u2014\u2014\u5E73\u65F6\u4E0D\u80FD\u88C1\uFF0C\u5426\u5219\u6302\u5728\u5DE6\u7F18\u5916\u7684\n \u6536\u8D77\u94AE\u4F1A\u88AB\u5207\u6389\u4E00\u534A\u3002 */\n@keyframes dshpc-dock-in{from{width:0;opacity:0;overflow:hidden}}\n/* \u6536\u8D77\u7684\u51FA\u573A\uFF1A\u5BBD\u5EA6\u6536\u5230 0\u3001\u900F\u660E\u6DE1\u51FA\uFF1B\u843D\u5B9A\u540E\u7EC4\u4EF6\u624D\u771F\u6B63\u6458\u6389\u8FD9\u4E00\u680F\uFF08JS \u5EF6\u65F6 220ms \u914D\u5408\uFF09\u3002 */\n.dshpc-dock__panel--closing{\n width:0!important;min-width:0!important;opacity:0;border-left-width:0;\n transition:width .2s var(--dshpc-ease),opacity .2s var(--dshpc-ease),border-left-width .2s var(--dshpc-ease);\n}\n\n.dshpc-dock__head{\n flex:none;display:flex;align-items:center;gap:8px;\n /* \u53F3\u4FA7 34px = 8(\u8FB9\u8DDD) + 20(\u5173\u94AE) + 6(\u547C\u5438)\uFF1A\u7ED9\u7EDD\u5BF9\u5B9A\u4F4D\u7684\u5173\u94AE\u7559\u4F4D\uFF0C\u6807\u9898/extra \u4E0D\u4ECE\u5B83\u5E95\u4E0B\u94BB */\n padding:10px 34px 10px 14px;\n border-bottom:1px solid var(--dshpc-border-faint);\n}\n/* \u56FE\u6807\u4F4D / \u6807\u9898\u53F3\u4FA7\u7684\u5185\u5BB9\u4F4D\uFF1A\u6D88\u8D39\u65B9\u4F20 ReactNode\uFF0C\u53EF\u585E\u591A\u4E2A\uFF1B\u5E93\u53EA\u8D1F\u8D23\u6392\u5E03\uFF0C\u4E0D\u62A2\u5BBD\u5EA6\u3002 */\n.dshpc-dock__lead{display:inline-flex;align-items:center;gap:6px;flex:none;color:var(--dshpc-fg-2)}\n.dshpc-dock__extra{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto}\n/* \u81EA\u5B9A\u4E49\u5934\u90E8\uFF1A\u6574\u884C\u5F52\u8C03\u7528\u65B9 \u2014\u2014 \u4E0D\u52A0\u5185\u8FB9\u8DDD/\u8FB9\u6846/\u80CC\u666F\uFF0C\u4E5F\u4E0D\u7ED9\u5173\u94AE\u7559\u5185\u8054\u7A7A\u95F4\uFF08\u5173\u94AE\u662F\u7EDD\u5BF9\u5B9A\u4F4D\u7684\uFF09\u3002 */\n.dshpc-dock__head--custom{display:block;padding:0;border-bottom:none}\n.dshpc-dock__title{\n flex:1 1 auto;min-width:0;\n overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\n font-size:var(--dshpc-font-md);font-weight:600;\n}\n/* \u5173\u95ED\u94AE\uFF1A20\u00D720 \u65B9\u89D2\u56FE\u6807\u4F4D\uFF08\u4E0E Modal \u7684\u5173\u95ED\u94AE\u540C\u89C4\u683C\uFF0C\u4E0D\u501F Picker \u89E6\u53D1\u5668\u76AE\u80A4\uFF09\u3002 */\n.dshpc-dock__close{\n display:inline-flex;align-items:center;justify-content:center;flex:none;\n width:20px;height:20px;padding:0;border:none;border-radius:var(--dshpc-radius-sm);\n background:transparent;color:var(--dshpc-fg-3);\n font-family:inherit;font-size:13px;line-height:1;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-dock__close:hover{background:var(--dshpc-hover);color:var(--dshpc-fg)}\n.dshpc-dock__close:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* \u5934\u90E8\u5173\u94AE\uFF1A\u7EDD\u5BF9\u5B9A\u4F4D\uFF0C\u4F4D\u7F6E\u4E0E\u5185\u7F6E\u5934\u5B8C\u5168\u4E00\u81F4\uFF08top 10 / right 8\uFF09\uFF1B\u81EA\u5B9A\u4E49\u5934\u4E5F\u7528\u8FD9\u4E00\u4E2A\u4F4D\u7F6E\u3002\n \u951A\u70B9\u662F\u9762\u677F\u672C\u8EAB\uFF08position:sticky \u5373\u5B9A\u4F4D\u4E0A\u4E0B\u6587\uFF09\uFF0C\u4E0D\u5728\u6EDA\u52A8\u5185\u5BB9\u91CC\uFF0C\u6240\u4EE5\u6B63\u6587\u6EDA\u52A8\u5B83\u4E0D\u8DDF\u6EDA\u3002 */\n.dshpc-dock__close--abs{position:absolute;top:10px;right:8px;z-index:8}\n/* \u6D6E\u52A8\u5173\u94AE\uFF1A\u65E0\u5934\u90E8\u9762\u677F\u7528\uFF0C\u7565\u6536\u4E00\u70B9\u8FB9\u8DDD\u3002 */\n.dshpc-dock__close--floating{\n position:absolute;top:6px;right:6px;z-index:8;\n background:var(--dshpc-surface-menu);border:1px solid var(--dshpc-border-faint);\n}\n\n/* \u5185\u5BB9\u533A\u81EA\u5DF1\u6EDA\uFF1A\u9762\u677F\u9AD8\u5EA6\u9501 100vh\uFF0C\u5185\u5BB9\u4E0D\u8BBE\u5185\u90E8\u6EDA\u52A8\u5C31\u4F1A\u628A\u6574\u9875\u6491\u9AD8\u3002 */\n.dshpc-dock__body{flex:1 1 auto;min-height:0;overflow:auto}\n\n/* \u62D6\u62FD\u6761\uFF1A\u5DE6\u7F18 6px \u547D\u4E2D\u533A\uFF0C**\u81EA\u5DF1\u4E0D\u753B\u4EFB\u4F55\u7EBF**\u3002\n hover / \u62D6\u52A8\u65F6\u628A\u9762\u677F\u81EA\u5DF1\u7684 border-left \u67D3\u6210\u84DD\uFF08\u7528\u6237 2026-10-28 \u56DB\u8F6E\uFF1A\u84DD\u7EBF\u53EA\u51C6\u6539\u539F\u7EBF\uFF0C\n \u4E0D\u51C6\u5728\u539F\u7EBF\u65C1\u8FB9\u52A0\u4E00\u6761 \u2014\u2014 \u4E4B\u524D\u5728 padding box \u5DE6\u7F18\u753B\u6E10\u53D8\uFF0C\u6B63\u597D\u53E0\u51FA\u53CC\u7EBF\uFF09\u3002\n \u547D\u4E2D\u533A\u5728 padding box \u4E0A\u3001border \u5728\u5B83\u5DE6\u5916\u4FA7\uFF0C\u6240\u4EE5\u53EA\u80FD\u6539\u9762\u677F\u7684 border \u8272\u3002\n z-index 7 \u5FC5\u987B\u9AD8\u4E8E\u9762\u677F\u5185\u5BB9\u91CC\u7684\u6D6E\u5C42\uFF08\u590D\u5236\u94AE\u4E00\u7C7B\uFF09\uFF0C\u5426\u5219\u547D\u4E2D\u533A\u4F1A\u88AB\u5185\u5BB9\u76D6\u4F4F\u3002 */\n.dshpc-dock__resizer{\n position:absolute;left:0;top:0;bottom:0;width:6px;\n z-index:7;cursor:col-resize;background:transparent;\n}\n.dshpc-dock__panel:has(> .dshpc-dock__resizer:hover),\n.dshpc-dock__panel--resizing{\n /* \u539F\u7EBF\u4FDD\u7559\u300C\u4E0A\u4E0B\u6E10\u9690\u300D\u5DE5\u4F5C\u533A\u6307\u793A\u6761\u8D28\u611F\uFF1A\u628A\u9762\u677F\u81EA\u5DF1\u7684 border-left \u6362\u6210\u540C\u6B3E\u6E10\u53D8\n \uFF08\u4E0D\u662F\u53E6\u52A0\u4E00\u6761\u7EBF\uFF09\u3002\u9762\u677F\u53EA\u6709\u8FD9\u4E00\u6761\u8FB9\u6846\u3001\u65E0\u5706\u89D2\uFF0C\u6240\u4EE5\u53EA\u4F5C\u7528\u5728\u7EBF\u4E0A\u3002 */\n border-image:linear-gradient(180deg,transparent,var(--dshpc-business) 30% 70%,transparent) 1;\n}\n\n/* \u62D6\u52A8\u671F\uFF1A\u2460 <iframe>\uFF08PDF / HTML \u9884\u89C8\uFF09\u662F\u72EC\u7ACB\u6587\u6863\uFF0C\u4F1A\u541E\u6389\u7236\u6587\u6863\u7684 pointermove\uFF0C\n \u5411\u53F3\u62D6\u8FDB iframe \u5C31\u5361\u6B7B \u2014\u2014 \u6574\u7247\u8BA9\u51FA\u6307\u9488\u4E8B\u4EF6\uFF1B\u2461 contain \u628A\u91CD\u6392\u9694\u79BB\u5728\u680F\u5185\uFF0C\n \u5426\u5219\u6BCF\u5E27\u6539\u5BBD\u5EA6\u90FD\u4F1A\u7275\u52A8\u6574\u9875\u91CD\u6392\uFF08\u5144\u5F1F\u9879\u76EE 2026-10-04 \u771F\u673A\u300C\u632A\u5F88\u4E45\u624D\u52A8\u4E00\u4E0B\u300D\uFF09\u3002 */\n.dshpc-dock.dshpc-dock--resizing iframe{pointer-events:none}\n.dshpc-dock.dshpc-dock--resizing .dshpc-dock__panel{contain:layout paint;will-change:width}\n\n/* \u6536\u8D77\u94AE\uFF1A**\u5F85\u5728\u9762\u677F\u81EA\u5DF1\u7684\u6846\u91CC**\uFF08\u7528\u6237 2026-10-28 \u4E09\u8F6E\uFF1A\u5360\u9762\u677F\u5185\u90E8\u7A7A\u95F4\uFF0C\u4E0D\u4F38\u5230\u5916\u9762\u53BB\uFF09\u3002\n left:0 \u4ECE\u5185\u4FA7\u8D34\u7740\u5206\u9694\u7EBF \u2014\u2014 \u8D34\u7EBF\u7684\u4E00\u8FB9\u4E0D\u63CF\u8FB9\uFF08\u7EBF\u662F\u9762\u677F\u81EA\u5DF1\u7684 border-left\uFF09\uFF0C\u9875\u7B7E\u4E0E\u7EBF\u4E0D\u91CD\u5408\u3002\n 20\u00D744\uFF08\u7528\u6237 2026-10-28 \u56DB\u8F6E\u5B9A\u5C3A\u5BF8\uFF09\uFF1B\u5B9E\u8272\u5E95\uFF08--dshpc-plate\uFF0C\u660E\u6697\u5404\u6709\u5B9E\u503C\uFF09\uFF0Chover \u4EAE\u4E00\u6863\u3002\n padding-right:2px \u662F**\u89C6\u89C9\u5C45\u4E2D**\uFF1A\u53F3\u4FA7\u662F\u5706\u89D2\uFF0C\u7BAD\u5934\u5F80\u76F4\u7EBF\u90A3\u8FB9\u632A 1px\uFF08\u7528\u6237 2026-10-28 \u56DB\u8F6E\uFF09\u3002 */\n.dshpc-dock__collapse{\n position:absolute;left:0;top:50%;transform:translateY(-50%);\n z-index:8;display:inline-flex;align-items:center;justify-content:center;\n width:20px;height:44px;padding:0 2px 0 0;\n border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);\n border-right:1px solid var(--dshpc-border);\n border-left:none;\n border-radius:0 var(--dshpc-radius-sm) var(--dshpc-radius-sm) 0;\n background:var(--dshpc-plate);color:var(--dshpc-fg-3);\n font-family:inherit;font-size:16px;line-height:1;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-dock__collapse:hover{background:var(--dshpc-plate-hover);color:var(--dshpc-fg)}\n.dshpc-dock__collapse:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n\n/* \u6536\u8D77\u540E\u7684\u6D6E\u52A8\u8033\u6735\uFF1A**fixed \u8D34\u53F3\u7F18\u3001\u5782\u76F4\u5C45\u4E2D\u3001\u72EC\u7ACB\u4E8E\u5206\u680F**\uFF08\u7528\u6237 2026-10-28 \u5B9A\u7A3F\uFF1A\n \u5C0F\u9875\u7B7E\u6302\u4E2D\u95F4\u3001\u91CC\u9762\u653E\u9762\u677F\u56FE\u6807\u3001\u4E0D\u663E\u793A\u6587\u5B57\uFF0C\u7BAD\u5934\u4E0E\u6536\u8D77\u94AE\u53CD\u5411\uFF09\u3002\u591A\u4E2A\u6309\u6536\u8D77\u987A\u5E8F\u7EB5\u5411\u5806\u53E0\u3002\n z \u8D70 dock \u6863\uFF08\u4F4E\u4E8E\u5BBF\u4E3B\u5F39\u7A97\uFF09\uFF0C\u907F\u514D\u76D6\u4F4F\u5BBF\u4E3B portal \u5C42\u3002 */\n.dshpc-dock__ears{\n position:fixed;top:50%;right:0;transform:translateY(-50%);\n z-index:var(--dshpc-z-dock,1030);\n display:flex;flex-direction:column;gap:8px;align-items:flex-end;\n pointer-events:none;\n}\n.dshpc-dock__ear{\n pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;\n /* \u4E0E\u6536\u8D77\u94AE**\u540C\u5C3A\u5BF8**\uFF0820\u00D744\uFF0C\u7528\u6237 2026-10-28 \u56DB\u8F6E\uFF09\uFF1A\u4E0A/\u4E0B/\u5DE6\u63CF\u8FB9\uFF0C\u8D34\u53F3\u7F18\u7684\u4E00\u4FA7\u4E0D\u63CF\u3002\n \u5B9E\u8272\u5E95\uFF08--dshpc-plate\uFF09\uFF0C\u4E0D\u7528\u900F\u660E\u8272 \u2014\u2014 \u900F\u660E\u5E95\u4E0B\u900F\u51FA\u4E1C\u897F\u5F88\u96BE\u770B\u3002\n padding-left:2px \u662F**\u89C6\u89C9\u5C45\u4E2D**\uFF1A\u5DE6\u4FA7\u662F\u5706\u89D2\uFF0C\u7BAD\u5934\u5F80\u76F4\u7EBF\uFF08\u53F3\u7F18\uFF09\u90A3\u8FB9\u632A 1px\u3002 */\n width:20px;height:44px;box-sizing:border-box;padding:0 0 0 2px;\n border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);\n border-left:1px solid var(--dshpc-border);\n border-right:none;\n border-radius:var(--dshpc-radius-sm) 0 0 var(--dshpc-radius-sm);\n background:var(--dshpc-plate);color:var(--dshpc-fg-2);\n cursor:pointer;font-family:inherit;line-height:1;\n animation:dshpc-ear-in .2s var(--dshpc-ease);\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n/* \u5165\u573A\uFF1A\u4ECE\u53F3\u7F18\u5916\u6ED1\u8FDB\u6765\uFF0C\u522B\u300C\u7A81\u7136\u51FA\u73B0\u300D\uFF08\u7528\u6237 2026-10-28\uFF09\u3002 */\n@keyframes dshpc-ear-in{from{opacity:0;transform:translateX(14px)}}\n.dshpc-dock__ear:hover{background:var(--dshpc-plate-hover);color:var(--dshpc-fg)}\n.dshpc-dock__ear:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* \u4E0E\u6536\u8D77\u94AE\u7684\u7BAD\u5934\u540C\u4E00\u5B57\u53F7\uFF0816px\uFF09\uFF1A\u6536\u8FDB\u53BB\u524D\u540E\u7BAD\u5934\u4E00\u6A21\u4E00\u6837\u5927\uFF08\u7528\u6237 2026-10-28\uFF09\u3002 */\n.dshpc-dock__ear-arrow{font-size:16px;color:var(--dshpc-fg-3)}\n.dshpc-dock__ear:hover .dshpc-dock__ear-arrow{color:var(--dshpc-fg)}\n/* \u52A8\u6548\u793C\u8C8C\uFF1A\u7CFB\u7EDF\u58F0\u660E\u51CF\u5C11\u52A8\u6548\u65F6\u5168\u90E8\u5173\u6389\uFF08\u4E0E Segmented \u540C\u4E00\u7EA6\u5B9A\uFF09\uFF0C\u6536\u8D77\u9000\u5316\u4E3A\u77AC\u65F6\u3001\u529F\u80FD\u4E0D\u53D7\u5F71\u54CD\u3002 */\n@media (prefers-reduced-motion:reduce){\n .dshpc-dock__panel{animation:none}\n .dshpc-dock__panel--closing{transition:none}\n .dshpc-dock__ear{animation:none}\n}\n";
|
|
1
|
+
export declare const PANEL_DOCK_CSS = "/* \u505C\u9760\u680F = **\u5E03\u5C40\u6210\u5458**\uFF0C\u4E0D\u662F\u6D6E\u5C42\uFF1A\u5B83\u5360\u5BBD\u5EA6\u3001\u628A\u4E3B\u533A\u771F\u6B63\u6324\u7A84\uFF08\u5144\u5F1F\u9879\u76EE 2026-09-28\uFF1A\n \u300C\u5206\u680F\u538B\u8FC7\u6765\uFF0C\u4E0D\u662F\u76D6\u4E0A\u53BB\u300D\uFF09\u3002\u6240\u4EE5\u8C03\u7528\u65B9\u5FC5\u987B\u628A\u5B83\u653E\u8FDB\u81EA\u5DF1\u7684 flex \u6839\u91CC\u3002\n \u76AE\u80A4\uFF08\u5934\u90E8 / \u62D6\u62FD\u6761 / \u5173\u95ED\u94AE / \u80CC\u666F\u9634\u5F71\uFF09\u5728 side-panel.css\uFF0C\u4E0E SideSheet \u5171\u7528\u3002 */\n.dshpc-dock{display:flex;flex:0 0 auto;align-self:stretch;min-width:0}\n/* \u5F00\u7740\u65F6\u7ED9\u4E3B\u533A\u6EDA\u52A8\u6761\u8BA9\u51FA\u4E00\u6761\u7F1D\uFF1A\u6EDA\u52A8\u6761\u8D34\u6B7B\u5206\u9694\u7EBF\u5F88\u96BE\u770B\uFF08\u7528\u6237 2026-10-28\uFF0C\u5BF9\u9F50\n dsh-better-sidebar \u7684\u7559\u767D\uFF09\u3002\u5168\u5173\u65F6\u6574\u6761 dock \u9000\u51FA\uFF0C\u7F1D\u9699\u4E00\u8D77\u6D88\u5931\u3001\u4E0D\u7559\u767D\u8FB9\u3002\n \u7F1D\u5BBD\u53EF\u7531\u8C03\u7528\u65B9\u76D6 --dshpc-dock-gap\uFF1BTS \u4FA7\u7684\u8BA9\u4F4D\u91CF\uFF08DOCK_GAP\uFF09\u8981\u4E0E\u5B83\u4E00\u81F4\u3002 */\n.dshpc-dock--open{margin-left:var(--dshpc-dock-gap,1px)}\n\n/* \u81EA\u52A8\u52A0\u7684\u5BBF\u4E3B\u884C\uFF08openFilePreview \u52A0 / \u5173\u95ED\u5373\u6458\uFF09\uFF1A\u6D88\u8D39\u65B9\u90A3\u884C\u4E0D\u5FC5\u81EA\u5DF1\u5199 flex\u3002\n \u53EA\u8BA9\u300C\u7B2C\u4E00\u4E2A\u975E\u9884\u89C8\u5B50\u9879\u300D\u5F53\u4E3B\u533A\u4F38\u5C55\uFF0C\u5176\u4F59\u76F4\u63A5\u5B50\u9879\u4E0D\u52A8\uFF08\u9875\u811A\u6761\u3001\u5DE5\u5177\u6761\u4E0D\u8BEF\u4F24\uFF09\uFF1B\n display \u4E0D\u5728\u8FD9\u91CC\u5199\u6B7B \u2014\u2014 \u672C\u6765\u5C31\u662F grid \u7B49\u5E03\u5C40\u7684\u5143\u7D20\u4FDD\u6301\u539F\u6837\uFF0C\u7531 TS \u4FA7\u6309\u8BA1\u7B97\u503C\u8865 flex\u3002 */\n.dshpc-dock-host{min-width:0;min-height:0}\n.dshpc-dock-host>:not([data-dshpc-file-preview]){min-width:0}\n.dshpc-dock-host>:first-child:not([data-dshpc-file-preview]){flex:1 1 auto}\n\n/* \u5355\u680F**\u5360\u4F4D**\uFF1Asticky + \u89C6\u53E3\u9AD8\u8BA9\u5B83\u5728\u9875\u9762\u6EDA\u52A8\u65F6\u4FDD\u6301\u53EF\u89C1\uFF0C\u540C\u65F6\u4ECD\u7136\u5360\u5BBD\u5EA6\u3002\n \u26A0\uFE0F **\u672C\u6761\u523B\u610F\u4E0D\u8BBE z-index**\uFF1A\u5E03\u5C40\u6210\u5458\u4E00\u65E6\u5E26\u6B63 z-index\uFF0C\u5C31\u4F1A\u65E0\u6761\u4EF6\u538B\u8FC7\u5BBF\u4E3B portal \u5230 body \u7684\n \u5F39\u7A97\uFF08\u5144\u5F1F\u9879\u76EE 2026-10-05 \u771F\u673A\u4E8B\u6545\u300C\u4FA7\u8FB9\u680F\u76D6\u4F4F\u5BBF\u4E3B\u8BBE\u7F6E\u5F39\u7A97\u300D\uFF09\u3002\u5C42\u5E8F\u4EA4\u7ED9 DOM \u987A\u5E8F\u88C1\u51B3\u3002\n \u5916\u89C2\u6765\u81EA .dshpc-side-surface\uFF08side-panel.css\uFF09\uFF0C\u8FD9\u91CC\u53EA\u7BA1\u600E\u4E48\u5360\u4F4D\u4E0E\u671D\u54EA\u8FB9\u63CF\u8FB9\u3002 */\n.dshpc-dock__panel{\n position:sticky;top:0;align-self:stretch;\n /* \u9AD8\u5EA6\u9ED8\u8BA4\u89C6\u53E3\u9AD8\uFF08\u6574\u9875\u573A\u666F\uFF09\uFF1B\u5D4C\u5728\u5B9A\u9AD8\u5BB9\u5668\u91CC\u65F6\u7531\u8C03\u7528\u65B9\u7ED9 --dshpc-dock-h\uFF08\u5982 420px / 100%\uFF09\u3002 */\n height:var(--dshpc-dock-h,100vh);max-height:var(--dshpc-dock-h,100vh);\n border-left:1px solid var(--dshpc-border);\n}\n/* \u6536\u8D77\u7684\u51FA\u573A\uFF1A\u5BBD\u5EA6\u6536\u5230 0\u3001\u900F\u660E\u6DE1\u51FA\uFF1B\u843D\u5B9A\u540E\u7EC4\u4EF6\u624D\u771F\u6B63\u6458\u6389\u8FD9\u4E00\u680F\uFF08JS \u5EF6\u65F6 220ms \u914D\u5408\uFF09\u3002 */\n.dshpc-dock__panel--closing{\n width:0!important;min-width:0!important;opacity:0;border-left-width:0;\n transition:width .2s var(--dshpc-ease),opacity .2s var(--dshpc-ease),border-left-width .2s var(--dshpc-ease);\n}\n\n/* \u62D6\u52A8\u671F\uFF1A\u2460 <iframe>\uFF08PDF / HTML \u9884\u89C8\uFF09\u662F\u72EC\u7ACB\u6587\u6863\uFF0C\u4F1A\u541E\u6389\u7236\u6587\u6863\u7684 pointermove\uFF0C\n \u5411\u53F3\u62D6\u8FDB iframe \u5C31\u5361\u6B7B \u2014\u2014 \u6574\u7247\u8BA9\u51FA\u6307\u9488\u4E8B\u4EF6\uFF1B\u2461 contain \u628A\u91CD\u6392\u9694\u79BB\u5728\u680F\u5185\uFF0C\n \u5426\u5219\u6BCF\u5E27\u6539\u5BBD\u5EA6\u90FD\u4F1A\u7275\u52A8\u6574\u9875\u91CD\u6392\uFF08\u5144\u5F1F\u9879\u76EE 2026-10-04 \u771F\u673A\u300C\u632A\u5F88\u4E45\u624D\u52A8\u4E00\u4E0B\u300D\uFF09\u3002 */\n.dshpc-dock.dshpc-dock--resizing iframe{pointer-events:none}\n.dshpc-dock.dshpc-dock--resizing .dshpc-dock__panel{contain:layout paint;will-change:width}\n\n/* \u6536\u8D77\u94AE\uFF1A**\u5F85\u5728\u9762\u677F\u81EA\u5DF1\u7684\u6846\u91CC**\uFF08\u7528\u6237 2026-10-28 \u4E09\u8F6E\uFF1A\u5360\u9762\u677F\u5185\u90E8\u7A7A\u95F4\uFF0C\u4E0D\u4F38\u5230\u5916\u9762\u53BB\uFF09\u3002\n left:0 \u4ECE\u5185\u4FA7\u8D34\u7740\u5206\u9694\u7EBF \u2014\u2014 \u8D34\u7EBF\u7684\u4E00\u8FB9\u4E0D\u63CF\u8FB9\uFF08\u7EBF\u662F\u9762\u677F\u81EA\u5DF1\u7684 border-left\uFF09\uFF0C\u9875\u7B7E\u4E0E\u7EBF\u4E0D\u91CD\u5408\u3002\n 20\u00D744\uFF08\u7528\u6237 2026-10-28 \u56DB\u8F6E\u5B9A\u5C3A\u5BF8\uFF09\uFF1B\u5B9E\u8272\u5E95\uFF08--dshpc-plate\uFF0C\u660E\u6697\u5404\u6709\u5B9E\u503C\uFF09\uFF0Chover \u4EAE\u4E00\u6863\u3002\n padding-right:2px \u662F**\u89C6\u89C9\u5C45\u4E2D**\uFF1A\u53F3\u4FA7\u662F\u5706\u89D2\uFF0C\u7BAD\u5934\u5F80\u76F4\u7EBF\u90A3\u8FB9\u632A 1px\uFF08\u7528\u6237 2026-10-28 \u56DB\u8F6E\uFF09\u3002 */\n.dshpc-dock__collapse{\n position:absolute;left:0;top:50%;transform:translateY(-50%);\n z-index:8;display:inline-flex;align-items:center;justify-content:center;\n width:20px;height:44px;padding:0 2px 0 0;\n border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);\n border-right:1px solid var(--dshpc-border);\n border-left:none;\n border-radius:0 var(--dshpc-radius-sm) var(--dshpc-radius-sm) 0;\n background:var(--dshpc-plate);color:var(--dshpc-fg-3);\n font-family:inherit;font-size:16px;line-height:1;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-dock__collapse:hover{background:var(--dshpc-plate-hover);color:var(--dshpc-fg)}\n.dshpc-dock__collapse:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n\n/* \u6536\u8D77\u540E\u7684\u6D6E\u52A8\u8033\u6735\uFF1A**fixed \u8D34\u53F3\u7F18\u3001\u5782\u76F4\u5C45\u4E2D\u3001\u72EC\u7ACB\u4E8E\u5206\u680F**\uFF08\u7528\u6237 2026-10-28 \u5B9A\u7A3F\uFF1A\n \u5C0F\u9875\u7B7E\u6302\u4E2D\u95F4\u3001\u91CC\u9762\u653E\u9762\u677F\u56FE\u6807\u3001\u4E0D\u663E\u793A\u6587\u5B57\uFF0C\u7BAD\u5934\u4E0E\u6536\u8D77\u94AE\u53CD\u5411\uFF09\u3002\u591A\u4E2A\u6309\u6536\u8D77\u987A\u5E8F\u7EB5\u5411\u5806\u53E0\u3002\n z \u8D70 dock \u6863\uFF08\u4F4E\u4E8E\u5BBF\u4E3B\u5F39\u7A97\uFF09\uFF0C\u907F\u514D\u76D6\u4F4F\u5BBF\u4E3B portal \u5C42\u3002 */\n.dshpc-dock__ears{\n position:fixed;top:50%;right:0;transform:translateY(-50%);\n z-index:var(--dshpc-z-dock,1030);\n display:flex;flex-direction:column;gap:8px;align-items:flex-end;\n pointer-events:none;\n}\n.dshpc-dock__ear{\n pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;\n /* \u4E0E\u6536\u8D77\u94AE**\u540C\u5C3A\u5BF8**\uFF0820\u00D744\uFF0C\u7528\u6237 2026-10-28 \u56DB\u8F6E\uFF09\uFF1A\u4E0A/\u4E0B/\u5DE6\u63CF\u8FB9\uFF0C\u8D34\u53F3\u7F18\u7684\u4E00\u4FA7\u4E0D\u63CF\u3002\n \u5B9E\u8272\u5E95\uFF08--dshpc-plate\uFF09\uFF0C\u4E0D\u7528\u900F\u660E\u8272 \u2014\u2014 \u900F\u660E\u5E95\u4E0B\u900F\u51FA\u4E1C\u897F\u5F88\u96BE\u770B\u3002\n padding-left:2px \u662F**\u89C6\u89C9\u5C45\u4E2D**\uFF1A\u5DE6\u4FA7\u662F\u5706\u89D2\uFF0C\u7BAD\u5934\u5F80\u76F4\u7EBF\uFF08\u53F3\u7F18\uFF09\u90A3\u8FB9\u632A 1px\u3002 */\n width:20px;height:44px;box-sizing:border-box;padding:0 0 0 2px;\n border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);\n border-left:1px solid var(--dshpc-border);\n border-right:none;\n border-radius:var(--dshpc-radius-sm) 0 0 var(--dshpc-radius-sm);\n background:var(--dshpc-plate);color:var(--dshpc-fg-2);\n cursor:pointer;font-family:inherit;line-height:1;\n animation:dshpc-ear-in .2s var(--dshpc-ease);\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n/* \u5165\u573A\uFF1A\u4ECE\u53F3\u7F18\u5916\u6ED1\u8FDB\u6765\uFF0C\u522B\u300C\u7A81\u7136\u51FA\u73B0\u300D\uFF08\u7528\u6237 2026-10-28\uFF09\u3002 */\n@keyframes dshpc-ear-in{from{opacity:0;transform:translateX(14px)}}\n.dshpc-dock__ear:hover{background:var(--dshpc-plate-hover);color:var(--dshpc-fg)}\n.dshpc-dock__ear:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* \u4E0E\u6536\u8D77\u94AE\u7684\u7BAD\u5934\u540C\u4E00\u5B57\u53F7\uFF0816px\uFF09\uFF1A\u6536\u8FDB\u53BB\u524D\u540E\u7BAD\u5934\u4E00\u6A21\u4E00\u6837\u5927\uFF08\u7528\u6237 2026-10-28\uFF09\u3002 */\n.dshpc-dock__ear-arrow{font-size:16px;color:var(--dshpc-fg-3)}\n.dshpc-dock__ear:hover .dshpc-dock__ear-arrow{color:var(--dshpc-fg)}\n/* \u52A8\u6548\u793C\u8C8C\uFF1A\u7CFB\u7EDF\u58F0\u660E\u51CF\u5C11\u52A8\u6548\u65F6\u5168\u90E8\u5173\u6389\uFF0C\u6536\u8D77\u9000\u5316\u4E3A\u77AC\u65F6\u3001\u529F\u80FD\u4E0D\u53D7\u5F71\u54CD\u3002 */\n@media (prefers-reduced-motion:reduce){\n .dshpc-dock__panel{animation:none}\n .dshpc-dock__panel--closing{transition:none}\n .dshpc-dock__ear{animation:none}\n}\n";
|
|
2
2
|
//# sourceMappingURL=panel-dock-css.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-dock-css.generated.d.ts","sourceRoot":"","sources":["../../src/ui/panel-dock-css.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"panel-dock-css.generated.d.ts","sourceRoot":"","sources":["../../src/ui/panel-dock-css.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,ywSAAyzJ,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// ⚠️ 生成物,勿手改。真源 = src/ui/panel-dock.css
|
|
2
2
|
// 由 scripts/gen-css.mjs 生成(`pnpm run gen:css`):改样式请改那个 .css 文件后重新生成。
|
|
3
|
-
export const PANEL_DOCK_CSS = "
|
|
3
|
+
export const PANEL_DOCK_CSS = "/* 停靠栏 = **布局成员**,不是浮层:它占宽度、把主区真正挤窄(兄弟项目 2026-09-28:\n 「分栏压过来,不是盖上去」)。所以调用方必须把它放进自己的 flex 根里。\n 皮肤(头部 / 拖拽条 / 关闭钮 / 背景阴影)在 side-panel.css,与 SideSheet 共用。 */\n.dshpc-dock{display:flex;flex:0 0 auto;align-self:stretch;min-width:0}\n/* 开着时给主区滚动条让出一条缝:滚动条贴死分隔线很难看(用户 2026-10-28,对齐\n dsh-better-sidebar 的留白)。全关时整条 dock 退出,缝隙一起消失、不留白边。\n 缝宽可由调用方盖 --dshpc-dock-gap;TS 侧的让位量(DOCK_GAP)要与它一致。 */\n.dshpc-dock--open{margin-left:var(--dshpc-dock-gap,1px)}\n\n/* 自动加的宿主行(openFilePreview 加 / 关闭即摘):消费方那行不必自己写 flex。\n 只让「第一个非预览子项」当主区伸展,其余直接子项不动(页脚条、工具条不误伤);\n display 不在这里写死 —— 本来就是 grid 等布局的元素保持原样,由 TS 侧按计算值补 flex。 */\n.dshpc-dock-host{min-width:0;min-height:0}\n.dshpc-dock-host>:not([data-dshpc-file-preview]){min-width:0}\n.dshpc-dock-host>:first-child:not([data-dshpc-file-preview]){flex:1 1 auto}\n\n/* 单栏**占位**:sticky + 视口高让它在页面滚动时保持可见,同时仍然占宽度。\n ⚠️ **本条刻意不设 z-index**:布局成员一旦带正 z-index,就会无条件压过宿主 portal 到 body 的\n 弹窗(兄弟项目 2026-10-05 真机事故「侧边栏盖住宿主设置弹窗」)。层序交给 DOM 顺序裁决。\n 外观来自 .dshpc-side-surface(side-panel.css),这里只管怎么占位与朝哪边描边。 */\n.dshpc-dock__panel{\n position:sticky;top:0;align-self:stretch;\n /* 高度默认视口高(整页场景);嵌在定高容器里时由调用方给 --dshpc-dock-h(如 420px / 100%)。 */\n height:var(--dshpc-dock-h,100vh);max-height:var(--dshpc-dock-h,100vh);\n border-left:1px solid var(--dshpc-border);\n}\n/* 收起的出场:宽度收到 0、透明淡出;落定后组件才真正摘掉这一栏(JS 延时 220ms 配合)。 */\n.dshpc-dock__panel--closing{\n width:0!important;min-width:0!important;opacity:0;border-left-width:0;\n transition:width .2s var(--dshpc-ease),opacity .2s var(--dshpc-ease),border-left-width .2s var(--dshpc-ease);\n}\n\n/* 拖动期:① <iframe>(PDF / HTML 预览)是独立文档,会吞掉父文档的 pointermove,\n 向右拖进 iframe 就卡死 —— 整片让出指针事件;② contain 把重排隔离在栏内,\n 否则每帧改宽度都会牵动整页重排(兄弟项目 2026-10-04 真机「挪很久才动一下」)。 */\n.dshpc-dock.dshpc-dock--resizing iframe{pointer-events:none}\n.dshpc-dock.dshpc-dock--resizing .dshpc-dock__panel{contain:layout paint;will-change:width}\n\n/* 收起钮:**待在面板自己的框里**(用户 2026-10-28 三轮:占面板内部空间,不伸到外面去)。\n left:0 从内侧贴着分隔线 —— 贴线的一边不描边(线是面板自己的 border-left),页签与线不重合。\n 20×44(用户 2026-10-28 四轮定尺寸);实色底(--dshpc-plate,明暗各有实值),hover 亮一档。\n padding-right:2px 是**视觉居中**:右侧是圆角,箭头往直线那边挪 1px(用户 2026-10-28 四轮)。 */\n.dshpc-dock__collapse{\n position:absolute;left:0;top:50%;transform:translateY(-50%);\n z-index:8;display:inline-flex;align-items:center;justify-content:center;\n width:20px;height:44px;padding:0 2px 0 0;\n border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);\n border-right:1px solid var(--dshpc-border);\n border-left:none;\n border-radius:0 var(--dshpc-radius-sm) var(--dshpc-radius-sm) 0;\n background:var(--dshpc-plate);color:var(--dshpc-fg-3);\n font-family:inherit;font-size:16px;line-height:1;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-dock__collapse:hover{background:var(--dshpc-plate-hover);color:var(--dshpc-fg)}\n.dshpc-dock__collapse:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n\n/* 收起后的浮动耳朵:**fixed 贴右缘、垂直居中、独立于分栏**(用户 2026-10-28 定稿:\n 小页签挂中间、里面放面板图标、不显示文字,箭头与收起钮反向)。多个按收起顺序纵向堆叠。\n z 走 dock 档(低于宿主弹窗),避免盖住宿主 portal 层。 */\n.dshpc-dock__ears{\n position:fixed;top:50%;right:0;transform:translateY(-50%);\n z-index:var(--dshpc-z-dock,1030);\n display:flex;flex-direction:column;gap:8px;align-items:flex-end;\n pointer-events:none;\n}\n.dshpc-dock__ear{\n pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;\n /* 与收起钮**同尺寸**(20×44,用户 2026-10-28 四轮):上/下/左描边,贴右缘的一侧不描。\n 实色底(--dshpc-plate),不用透明色 —— 透明底下透出东西很难看。\n padding-left:2px 是**视觉居中**:左侧是圆角,箭头往直线(右缘)那边挪 1px。 */\n width:20px;height:44px;box-sizing:border-box;padding:0 0 0 2px;\n border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);\n border-left:1px solid var(--dshpc-border);\n border-right:none;\n border-radius:var(--dshpc-radius-sm) 0 0 var(--dshpc-radius-sm);\n background:var(--dshpc-plate);color:var(--dshpc-fg-2);\n cursor:pointer;font-family:inherit;line-height:1;\n animation:dshpc-ear-in .2s var(--dshpc-ease);\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n/* 入场:从右缘外滑进来,别「突然出现」(用户 2026-10-28)。 */\n@keyframes dshpc-ear-in{from{opacity:0;transform:translateX(14px)}}\n.dshpc-dock__ear:hover{background:var(--dshpc-plate-hover);color:var(--dshpc-fg)}\n.dshpc-dock__ear:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* 与收起钮的箭头同一字号(16px):收进去前后箭头一模一样大(用户 2026-10-28)。 */\n.dshpc-dock__ear-arrow{font-size:16px;color:var(--dshpc-fg-3)}\n.dshpc-dock__ear:hover .dshpc-dock__ear-arrow{color:var(--dshpc-fg)}\n/* 动效礼貌:系统声明减少动效时全部关掉,收起退化为瞬时、功能不受影响。 */\n@media (prefers-reduced-motion:reduce){\n .dshpc-dock__panel{animation:none}\n .dshpc-dock__panel--closing{transition:none}\n .dshpc-dock__ear{animation:none}\n}\n";
|
|
4
4
|
//# sourceMappingURL=panel-dock-css.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-dock-css.generated.js","sourceRoot":"","sources":["../../src/ui/panel-dock-css.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,qEAAqE;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,
|
|
1
|
+
{"version":3,"file":"panel-dock-css.generated.js","sourceRoot":"","sources":["../../src/ui/panel-dock-css.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,qEAAqE;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,szJAAszJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-panel-css.d.ts","sourceRoot":"","sources":["../../src/ui/side-panel-css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const SIDE_PANEL_CSS = "/* \u4FA7\u8FB9\u9762\u677F\u7684\u516C\u5171\u76AE\u80A4 \u2014\u2014 PanelDock\uFF08\u5360\u5BBD\u5206\u680F\uFF09\u4E0E SideSheet\uFF08\u8986\u76D6\u62BD\u5C49\uFF09\u5171\u7528\u8FD9\u4E00\u4EFD\u3002\n *\n * \u5206\u754C\uFF1A**\u76AE\u80A4\u5728\u8FD9\u91CC\uFF0C\u5B9A\u4F4D\u5404\u81EA\u5199**\u3002\u4E24\u8005\u552F\u4E00\u7684\u5F62\u6001\u5DEE\u5F02\u5C31\u662F\u300C\u600E\u4E48\u5360\u4F4D\u300D\u2014\u2014\n * PanelDock \u7528 sticky \u5360\u5BBD\u6324\u7A84\u4E3B\u533A\uFF08panel-dock.css\uFF09\uFF0CSideSheet \u7528 absolute \u76D6\u5728\u9875\u9762\u4E0A\uFF08side-sheet.css\uFF09\u3002\n *\n * \u7C7B\u540D\u6CBF\u7528 dshpc-dock__* \u524D\u7F00\uFF1A\u90A3\u662F\u65E2\u6709\u516C\u5F00\u9762\uFF08\u6587\u6863\u4E0E\u6D88\u8D39\u65B9\u90FD\u5728\u7528\uFF09\uFF0C\n * \u8FD9\u91CC\u53EA\u642C\u6587\u4EF6\u4E0D\u6539\u540D\uFF1B\u65B0\u589E\u7684\u4E2D\u6027\u7C7B\u662F .dshpc-side-surface\uFF08\u5916\u89C2\u57FA\u7C7B\uFF09\u3002 */\n\n/* \u5165\u573A\uFF1A\u5BBD\u5EA6\u4ECE 0 \u957F\u51FA\u6765\uFF08keyframes \u53EA\u5199 from\uFF0C\u7EC8\u70B9\u53D6\u5185\u8054 / \u72B6\u6001\u5BBD\u5EA6\uFF09\u3002\u4E24\u8FB9\u5171\u7528\u3002 */\n@keyframes dshpc-side-in{from{width:0;opacity:0;overflow:hidden}}\n\n/* \u5916\u89C2\u57FA\u7C7B\uFF1A\u80CC\u666F / \u6587\u5B57\u8272 / \u9634\u5F71 / \u7EB5\u5411 flex\u3002**\u4E0D\u542B** position\u3001\u9AD8\u5EA6\u3001\u8FB9\u6846\u65B9\u5411\u3001\u52A8\u753B\u89E6\u53D1\u3002 */\n.dshpc-side-surface{\n box-sizing:border-box;\n display:flex;flex-direction:column;flex:0 0 auto;min-width:0;\n background:var(--dshpc-surface-base);color:var(--dshpc-fg);\n box-shadow:var(--dshpc-shadow-2);\n transition:border-color var(--dshpc-dur-fast) var(--dshpc-ease);\n animation:dshpc-side-in .22s var(--dshpc-ease);\n}\n\n/* \u5934\u90E8\uFF1A\u53F3\u4FA7 34px = 8(\u8FB9\u8DDD) + 20(\u5173\u94AE) + 6(\u547C\u5438)\uFF1A\u7ED9\u7EDD\u5BF9\u5B9A\u4F4D\u7684\u5173\u94AE\u7559\u4F4D\uFF0C\u6807\u9898/extra \u4E0D\u4ECE\u5B83\u5E95\u4E0B\u94BB\u3002 */\n.dshpc-dock__head{\n flex:none;display:flex;align-items:center;gap:8px;\n padding:10px 34px 10px 14px;\n border-bottom:1px solid var(--dshpc-border-faint);\n}\n/* \u56FE\u6807\u4F4D / \u6807\u9898\u53F3\u4FA7\u7684\u5185\u5BB9\u4F4D\uFF1A\u6D88\u8D39\u65B9\u4F20 ReactNode\uFF0C\u53EF\u585E\u591A\u4E2A\uFF1B\u5E93\u53EA\u8D1F\u8D23\u6392\u5E03\uFF0C\u4E0D\u62A2\u5BBD\u5EA6\u3002 */\n.dshpc-dock__lead{display:inline-flex;align-items:center;gap:6px;flex:none;color:var(--dshpc-fg-2)}\n.dshpc-dock__extra{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto}\n/* \u81EA\u5B9A\u4E49\u5934\u90E8\uFF1A\u6574\u884C\u5F52\u8C03\u7528\u65B9 \u2014\u2014 \u4E0D\u52A0\u5185\u8FB9\u8DDD/\u8FB9\u6846/\u80CC\u666F\uFF0C\u4E5F\u4E0D\u7ED9\u5173\u94AE\u7559\u5185\u8054\u7A7A\u95F4\uFF08\u5173\u94AE\u662F\u7EDD\u5BF9\u5B9A\u4F4D\u7684\uFF09\u3002 */\n.dshpc-dock__head--custom{display:block;padding:0;border-bottom:none}\n.dshpc-dock__title{\n flex:1 1 auto;min-width:0;\n overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\n font-size:var(--dshpc-font-md);font-weight:600;\n}\n/* \u5173\u95ED\u94AE\uFF1A20\u00D720 \u65B9\u89D2\u56FE\u6807\u4F4D\uFF08\u4E0E Modal \u7684\u5173\u95ED\u94AE\u540C\u89C4\u683C\uFF0C\u4E0D\u501F Picker \u89E6\u53D1\u5668\u76AE\u80A4\uFF09\u3002 */\n.dshpc-dock__close{\n display:inline-flex;align-items:center;justify-content:center;flex:none;\n width:20px;height:20px;padding:0;border:none;border-radius:var(--dshpc-radius-sm);\n background:transparent;color:var(--dshpc-fg-3);\n font-family:inherit;font-size:13px;line-height:1;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-dock__close:hover{background:var(--dshpc-hover);color:var(--dshpc-fg)}\n.dshpc-dock__close:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* \u5934\u90E8\u5173\u94AE\uFF1A\u7EDD\u5BF9\u5B9A\u4F4D\uFF08top 10 / right 8\uFF09\uFF0C\u951A\u70B9\u662F\u9762\u677F\u672C\u8EAB \u2014\u2014 \u6B63\u6587\u6EDA\u52A8\u5B83\u4E0D\u8DDF\u6EDA\u3002 */\n.dshpc-dock__close--abs{position:absolute;top:10px;right:8px;z-index:8}\n/* \u6D6E\u52A8\u5173\u94AE\uFF1A\u65E0\u5934\u90E8\u9762\u677F\u7528\uFF0C\u7565\u6536\u4E00\u70B9\u8FB9\u8DDD\u3002 */\n.dshpc-dock__close--floating{\n position:absolute;top:6px;right:6px;z-index:8;\n background:var(--dshpc-surface-menu);border:1px solid var(--dshpc-border-faint);\n}\n\n/* \u5185\u5BB9\u533A\u81EA\u5DF1\u6EDA\uFF08\u9762\u677F\u9AD8\u5EA6\u9501\u6B7B\uFF0C\u5185\u5BB9\u4E0D\u8BBE\u5185\u90E8\u6EDA\u52A8\u5C31\u4F1A\u628A\u9875\u9762\u6491\u9AD8\uFF09\u3002 */\n.dshpc-dock__body{flex:1 1 auto;min-height:0;overflow:auto}\n\n/* \u62D6\u62FD\u6761\uFF1A6px \u547D\u4E2D\u533A\uFF0C**\u81EA\u5DF1\u4E0D\u753B\u4EFB\u4F55\u7EBF**\uFF08\u8D34\u5728\u671D\u5185\u90A3\u4E00\u4FA7\uFF0C\u955C\u50CF\u7531\u5404\u81EA\u7684\u5B9A\u4F4D\u6587\u4EF6\u505A\uFF09\u3002\n hover / \u62D6\u52A8\u65F6\u628A\u9762\u677F\u81EA\u5DF1\u7684\u8FB9\u6846\u67D3\u6210\u84DD \u2014\u2014 \u84DD\u7EBF\u53EA\u51C6\u6539\u539F\u7EBF\uFF0C\u4E0D\u51C6\u5728\u65C1\u8FB9\u518D\u52A0\u4E00\u6761\u3002\n z-index 7 \u5FC5\u987B\u9AD8\u4E8E\u9762\u677F\u5185\u5BB9\u91CC\u7684\u6D6E\u5C42\uFF08\u590D\u5236\u94AE\u4E00\u7C7B\uFF09\uFF0C\u5426\u5219\u547D\u4E2D\u533A\u4F1A\u88AB\u5185\u5BB9\u76D6\u4F4F\u3002 */\n.dshpc-dock__resizer{\n position:absolute;left:0;top:0;bottom:0;width:6px;\n z-index:7;cursor:col-resize;background:transparent;\n}\n.dshpc-side-surface:has(> .dshpc-dock__resizer:hover),\n.dshpc-side-surface--resizing{\n /* \u539F\u7EBF\u4FDD\u7559\u300C\u4E0A\u4E0B\u6E10\u9690\u300D\u5DE5\u4F5C\u533A\u6307\u793A\u6761\u8D28\u611F\uFF1A\u628A\u9762\u677F\u81EA\u5DF1\u7684\u90A3\u6761\u8FB9\u6846\u6362\u6210\u540C\u6B3E\u6E10\u53D8\u3002\n \u9762\u677F\u56DB\u8FB9\u91CC\u53EA\u6709\u671D\u5185\u4E00\u4FA7\u6709\u5BBD\u5EA6\uFF0C\u6240\u4EE5\u6E10\u53D8\u53EA\u843D\u5728\u90A3\u4E00\u4FA7\u3002 */\n border-image:linear-gradient(180deg,transparent,var(--dshpc-business) 30% 70%,transparent) 1;\n}\n/* \u62D6\u52A8\u671F\uFF1A\u2460 <iframe>\uFF08PDF / HTML \u9884\u89C8\uFF09\u662F\u72EC\u7ACB\u6587\u6863\uFF0C\u4F1A\u541E\u6389\u7236\u6587\u6863\u7684 pointermove \u2014\u2014\n \u8BA9\u51FA\u6307\u9488\u4E8B\u4EF6\uFF1B\u2461 contain \u628A\u91CD\u6392\u9694\u79BB\u5728\u9762\u677F\u5185\uFF0C\u5426\u5219\u6BCF\u5E27\u6539\u5BBD\u90FD\u4F1A\u7275\u52A8\u6574\u9875\u91CD\u6392\u3002 */\n.dshpc-side-surface--resizing{contain:layout paint;will-change:width}\n.dshpc-side-surface--resizing iframe{pointer-events:none}\n\n/* \u52A8\u6548\u793C\u8C8C\uFF1A\u7CFB\u7EDF\u58F0\u660E\u51CF\u5C11\u52A8\u6548\u65F6\u9000\u5316\u4E3A\u77AC\u65F6\uFF08\u529F\u80FD\u4E0D\u53D7\u5F71\u54CD\uFF09\u3002 */\n@media (prefers-reduced-motion:reduce){\n .dshpc-side-surface{animation:none}\n}\n";
|
|
2
|
+
//# sourceMappingURL=side-panel-css.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-panel-css.generated.d.ts","sourceRoot":"","sources":["../../src/ui/side-panel-css.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,uwNAAohH,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// ⚠️ 生成物,勿手改。真源 = src/ui/side-panel.css
|
|
2
|
+
// 由 scripts/gen-css.mjs 生成(`pnpm run gen:css`):改样式请改那个 .css 文件后重新生成。
|
|
3
|
+
export const SIDE_PANEL_CSS = "/* 侧边面板的公共皮肤 —— PanelDock(占宽分栏)与 SideSheet(覆盖抽屉)共用这一份。\n *\n * 分界:**皮肤在这里,定位各自写**。两者唯一的形态差异就是「怎么占位」——\n * PanelDock 用 sticky 占宽挤窄主区(panel-dock.css),SideSheet 用 absolute 盖在页面上(side-sheet.css)。\n *\n * 类名沿用 dshpc-dock__* 前缀:那是既有公开面(文档与消费方都在用),\n * 这里只搬文件不改名;新增的中性类是 .dshpc-side-surface(外观基类)。 */\n\n/* 入场:宽度从 0 长出来(keyframes 只写 from,终点取内联 / 状态宽度)。两边共用。 */\n@keyframes dshpc-side-in{from{width:0;opacity:0;overflow:hidden}}\n\n/* 外观基类:背景 / 文字色 / 阴影 / 纵向 flex。**不含** position、高度、边框方向、动画触发。 */\n.dshpc-side-surface{\n box-sizing:border-box;\n display:flex;flex-direction:column;flex:0 0 auto;min-width:0;\n background:var(--dshpc-surface-base);color:var(--dshpc-fg);\n box-shadow:var(--dshpc-shadow-2);\n transition:border-color var(--dshpc-dur-fast) var(--dshpc-ease);\n animation:dshpc-side-in .22s var(--dshpc-ease);\n}\n\n/* 头部:右侧 34px = 8(边距) + 20(关钮) + 6(呼吸):给绝对定位的关钮留位,标题/extra 不从它底下钻。 */\n.dshpc-dock__head{\n flex:none;display:flex;align-items:center;gap:8px;\n padding:10px 34px 10px 14px;\n border-bottom:1px solid var(--dshpc-border-faint);\n}\n/* 图标位 / 标题右侧的内容位:消费方传 ReactNode,可塞多个;库只负责排布,不抢宽度。 */\n.dshpc-dock__lead{display:inline-flex;align-items:center;gap:6px;flex:none;color:var(--dshpc-fg-2)}\n.dshpc-dock__extra{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto}\n/* 自定义头部:整行归调用方 —— 不加内边距/边框/背景,也不给关钮留内联空间(关钮是绝对定位的)。 */\n.dshpc-dock__head--custom{display:block;padding:0;border-bottom:none}\n.dshpc-dock__title{\n flex:1 1 auto;min-width:0;\n overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\n font-size:var(--dshpc-font-md);font-weight:600;\n}\n/* 关闭钮:20×20 方角图标位(与 Modal 的关闭钮同规格,不借 Picker 触发器皮肤)。 */\n.dshpc-dock__close{\n display:inline-flex;align-items:center;justify-content:center;flex:none;\n width:20px;height:20px;padding:0;border:none;border-radius:var(--dshpc-radius-sm);\n background:transparent;color:var(--dshpc-fg-3);\n font-family:inherit;font-size:13px;line-height:1;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-dock__close:hover{background:var(--dshpc-hover);color:var(--dshpc-fg)}\n.dshpc-dock__close:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* 头部关钮:绝对定位(top 10 / right 8),锚点是面板本身 —— 正文滚动它不跟滚。 */\n.dshpc-dock__close--abs{position:absolute;top:10px;right:8px;z-index:8}\n/* 浮动关钮:无头部面板用,略收一点边距。 */\n.dshpc-dock__close--floating{\n position:absolute;top:6px;right:6px;z-index:8;\n background:var(--dshpc-surface-menu);border:1px solid var(--dshpc-border-faint);\n}\n\n/* 内容区自己滚(面板高度锁死,内容不设内部滚动就会把页面撑高)。 */\n.dshpc-dock__body{flex:1 1 auto;min-height:0;overflow:auto}\n\n/* 拖拽条:6px 命中区,**自己不画任何线**(贴在朝内那一侧,镜像由各自的定位文件做)。\n hover / 拖动时把面板自己的边框染成蓝 —— 蓝线只准改原线,不准在旁边再加一条。\n z-index 7 必须高于面板内容里的浮层(复制钮一类),否则命中区会被内容盖住。 */\n.dshpc-dock__resizer{\n position:absolute;left:0;top:0;bottom:0;width:6px;\n z-index:7;cursor:col-resize;background:transparent;\n}\n.dshpc-side-surface:has(> .dshpc-dock__resizer:hover),\n.dshpc-side-surface--resizing{\n /* 原线保留「上下渐隐」工作区指示条质感:把面板自己的那条边框换成同款渐变。\n 面板四边里只有朝内一侧有宽度,所以渐变只落在那一侧。 */\n border-image:linear-gradient(180deg,transparent,var(--dshpc-business) 30% 70%,transparent) 1;\n}\n/* 拖动期:① <iframe>(PDF / HTML 预览)是独立文档,会吞掉父文档的 pointermove ——\n 让出指针事件;② contain 把重排隔离在面板内,否则每帧改宽都会牵动整页重排。 */\n.dshpc-side-surface--resizing{contain:layout paint;will-change:width}\n.dshpc-side-surface--resizing iframe{pointer-events:none}\n\n/* 动效礼貌:系统声明减少动效时退化为瞬时(功能不受影响)。 */\n@media (prefers-reduced-motion:reduce){\n .dshpc-side-surface{animation:none}\n}\n";
|
|
4
|
+
//# sourceMappingURL=side-panel-css.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-panel-css.generated.js","sourceRoot":"","sources":["../../src/ui/side-panel-css.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,qEAAqE;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,ihHAAihH,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-panel-css.js","sourceRoot":"","sources":["../../src/ui/side-panel-css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-sheet-css.d.ts","sourceRoot":"","sources":["../../src/ui/side-sheet-css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const SIDE_SHEET_CSS = "/* \u4FA7\u8FB9\u62BD\u5C49\uFF1A\u8986\u76D6\u5F0F\u3002**\u76AE\u80A4\u4E0E PanelDock \u5B8C\u5168\u5171\u7528**\uFF08side-panel.css \u7684 .dshpc-side-surface\n + \u5934\u90E8 / \u62D6\u62FD\u6761 / \u5173\u95ED\u94AE\uFF09\uFF0C\u8FD9\u91CC\u53EA\u7BA1\u300C\u600E\u4E48\u5360\u4F4D\u300D\uFF1Aabsolute \u8D34\u8FB9\u3001\u901A\u9AD8\u3001\u76D6\u5728\u9875\u9762\u4E0A\u3002\n \u4E0E\u5206\u680F\u7684\u552F\u4E00\u5DEE\u522B\uFF1A\u5B83\u4E0D\u6324\u7A84\u4E3B\u533A\uFF08\u6240\u4EE5\u6CA1\u6709 sticky\u3001\u6CA1\u6709\u5360\u5BBD\u3001\u4E5F\u6CA1\u6709\u6536\u8D77\uFF09\u3002\n\n \u6CA1\u6709\u6536\u8D77/\u8033\u6735\uFF08\u7528\u6237 2026-11-02\uFF09\uFF1A\u62BD\u5C49\u5173\u5C31\u662F\u5173\u3002 */\n\n.dshpc-sheet{position:absolute;top:0;bottom:0}\n/* \u8D34\u8FB9\u90A3\u4FA7\u63CF\u8FB9\uFF08\u4E0E\u5206\u680F\u7684 border-left \u540C\u4E00\u5957\u7EBF\u8272\uFF09\uFF0C\u62D6\u62FD\u6761\u6C38\u8FDC\u5728**\u671D\u5185**\u90A3\u4E00\u4FA7\u3002 */\n.dshpc-sheet--left{left:0;border-right:1px solid var(--dshpc-border)}\n.dshpc-sheet--right{right:0;border-left:1px solid var(--dshpc-border)}\n.dshpc-sheet--left .dshpc-dock__resizer{left:auto;right:0}\n/* \u5185\u5BB9\u5185\u8DDD\uFF1A\u5206\u680F\u7684 body \u628A\u5185\u8DDD\u4EA4\u7ED9\u5185\u5BB9\u7EC4\u4EF6\uFF08FileBrowser \u90A3\u7C7B\u81EA\u5DF1\u5E26 17px\uFF09\uFF0C\n \u62BD\u5C49\u662F**\u901A\u7528\u5BB9\u5668**\uFF0C\u5FC5\u987B\u81EA\u5E26 \u2014\u2014 \u5426\u5219\u6587\u5B57\u76F4\u63A5\u8D34\u9762\u677F\u8FB9\uFF08\u7528\u6237 2026-11-02 \u622A\u56FE\uFF09\u3002\n \u5DE6\u53F3 14 \u4E0E\u5934\u90E8\u5DE6\u5185\u8DDD\u5BF9\u9F50\uFF0C\u4E0A\u4E0B\u4E5F\u7559\u540C\u6863\u547C\u5438\u3002 */\n.dshpc-sheet__body{padding:14px}\n/* \u5E95\u680F\uFF08\u53EF\u9009\uFF09\uFF1A\u7EBF\u8272\u4E0E\u5185\u8DDD\u5BF9\u9F50\u9762\u677F\u5934\u90E8\u3002 */\n.dshpc-sheet__foot{\n flex:none;display:flex;justify-content:flex-end;gap:8px;\n padding:10px 14px;border-top:1px solid var(--dshpc-border-faint);\n}\n";
|
|
2
|
+
//# sourceMappingURL=side-sheet-css.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-sheet-css.generated.d.ts","sourceRoot":"","sources":["../../src/ui/side-sheet-css.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,89DAA+2B,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// ⚠️ 生成物,勿手改。真源 = src/ui/side-sheet.css
|
|
2
|
+
// 由 scripts/gen-css.mjs 生成(`pnpm run gen:css`):改样式请改那个 .css 文件后重新生成。
|
|
3
|
+
export const SIDE_SHEET_CSS = "/* 侧边抽屉:覆盖式。**皮肤与 PanelDock 完全共用**(side-panel.css 的 .dshpc-side-surface\n + 头部 / 拖拽条 / 关闭钮),这里只管「怎么占位」:absolute 贴边、通高、盖在页面上。\n 与分栏的唯一差别:它不挤窄主区(所以没有 sticky、没有占宽、也没有收起)。\n\n 没有收起/耳朵(用户 2026-11-02):抽屉关就是关。 */\n\n.dshpc-sheet{position:absolute;top:0;bottom:0}\n/* 贴边那侧描边(与分栏的 border-left 同一套线色),拖拽条永远在**朝内**那一侧。 */\n.dshpc-sheet--left{left:0;border-right:1px solid var(--dshpc-border)}\n.dshpc-sheet--right{right:0;border-left:1px solid var(--dshpc-border)}\n.dshpc-sheet--left .dshpc-dock__resizer{left:auto;right:0}\n/* 内容内距:分栏的 body 把内距交给内容组件(FileBrowser 那类自己带 17px),\n 抽屉是**通用容器**,必须自带 —— 否则文字直接贴面板边(用户 2026-11-02 截图)。\n 左右 14 与头部左内距对齐,上下也留同档呼吸。 */\n.dshpc-sheet__body{padding:14px}\n/* 底栏(可选):线色与内距对齐面板头部。 */\n.dshpc-sheet__foot{\n flex:none;display:flex;justify-content:flex-end;gap:8px;\n padding:10px 14px;border-top:1px solid var(--dshpc-border-faint);\n}\n";
|
|
4
|
+
//# sourceMappingURL=side-sheet-css.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-sheet-css.generated.js","sourceRoot":"","sources":["../../src/ui/side-sheet-css.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,qEAAqE;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,42BAA42B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-sheet-css.js","sourceRoot":"","sources":["../../src/ui/side-sheet-css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-css.d.ts","sourceRoot":"","sources":["../../src/ui/surface-css.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const SURFACE_CSS = "\n/* \u2500\u2500 Surface \u00B7 \u7EAF\u6846\u5BB9\u5668 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n \u53EA\u56DE\u7B54\u300C\u4E00\u5757\u9762\u957F\u4EC0\u4E48\u6837\u300D\uFF1A\u5E95 / \u8FB9 / \u5706\u89D2 / \u5185\u8DDD\uFF0C\u56DB\u6839\u8F74\uFF0C\u96F6\u4E1A\u52A1\u8BED\u4E49\u3002\n \u5B83\u662F**\u5706\u89D2\u5951\u7EA6\u7684\u552F\u4E00\u771F\u6E90**\uFF1A\u5BB9\u5668\u6863 = --dshpc-radius-md(12)\uFF0C\u4E0E Button / Input \u540C\u6863\uFF0C\n \u5916\u6846\u6C38\u8FDC\u4E0D\u5C0F\u4E8E\u91CC\u9762\u7684\u63A7\u4EF6 \u2014\u2014 \u675C\u7EDD\u300C\u5361\u7247 8 < \u6309\u94AE 12\u300D\u8FD9\u7C7B\u5012\u6302\uFF082026-11-01\uFF09\u3002\n\n \u6240\u6709\u8F74\u90FD\u7528**\u53D8\u91CF**\u8868\u8FBE\uFF0C\u4FEE\u9970\u7C7B\u53EA\u6539\u8FD9\u4E9B\u53D8\u91CF\u3001\u4E0D\u6539\u5C5E\u6027\uFF1A\n \u6D88\u8D39\u65B9\uFF08Card\u3001\u4E0B\u6E38\u63D2\u4EF6\uFF09\u81EA\u5DF1\u5199\u89C4\u5219\u65F6\uFF0C\u65E0\u8BBA\u4E24\u4EFD CSS \u8C01\u5148\u6CE8\u5165\uFF0C\u80DC\u8D1F\u90FD\u4E0D\u4F9D\u8D56\u987A\u5E8F\u3002\n\n tone plain(\u9ED8\u8BA4 surface-1) / raised / sunken / subtle\n border \u9ED8\u8BA4 1px \u5B9E\u7EBF\uFF1Bfaint \u66F4\u6DE1\uFF1Bnone \u900F\u660E\uFF08\u4FDD\u7559 1px \u5360\u4F4D\uFF0C\u4E0D\u8DF3\u9AD8\uFF09\uFF1B\n dashed \u865A\u7EBF\uFF08\u5360\u4F4D\u6846\u7528\uFF0C\u7EBF\u8272\u4ECD\u662F border token\uFF09\n radius \u9ED8\u8BA4 md\uFF1Bnone / sm / lg\n padding \u9ED8\u8BA4\u7531\u8C03\u7528\u65B9\u9009\u6863\uFF1Bnone / sm(8) / md(12) / lg(16)\n \u57FA\u7C7B\u4E0D\u5E26\u5185\u8DDD\uFF1A\u5BB9\u5668\u8981\u81EA\u5DF1\u7B97\u56DB\u8FB9\u5185\u8DDD\u65F6\uFF08\u5982 Card \u7684\u8272\u6761\u8D34\u8FB9\uFF09\uFF0C\u4E0D\u4F20 pad \u6863\u5373\u53EF\uFF0C\u4E0D\u9700\u8981\u8986\u76D6\u3002 */\n.dshpc-surface{\n position:relative;box-sizing:border-box;color:var(--dshpc-fg);font:inherit;text-align:left;\n --surface-bg:var(--dshpc-surface-1);\n --surface-border:var(--dshpc-border);\n --surface-border-style:solid;\n --surface-radius:var(--dshpc-radius-md);\n --surface-pad:0;\n border:1px var(--surface-border-style) var(--surface-border);\n border-radius:var(--surface-radius);\n background:var(--surface-bg);\n padding:var(--surface-pad);\n}\n.dshpc-surface--tone-raised{--surface-bg:var(--dshpc-surface-raised)}\n.dshpc-surface--tone-sunken{--surface-bg:var(--dshpc-surface-sunken)}\n.dshpc-surface--tone-subtle{--surface-bg:var(--dshpc-chip-bg)}\n.dshpc-surface--border-faint{--surface-border:var(--dshpc-border-faint)}\n.dshpc-surface--border-none{--surface-border:transparent}\n.dshpc-surface--border-dashed{--surface-border-style:dashed}\n.dshpc-surface--radius-none{--surface-radius:0}\n.dshpc-surface--radius-sm{--surface-radius:var(--dshpc-radius-sm)}\n.dshpc-surface--radius-lg{--surface-radius:var(--dshpc-radius-lg)}\n.dshpc-surface--pad-none{--surface-pad:0}\n.dshpc-surface--pad-sm{--surface-pad:var(--dshpc-space-2)}\n.dshpc-surface--pad-md{--surface-pad:var(--dshpc-space-3)}\n.dshpc-surface--pad-lg{--surface-pad:var(--dshpc-space-4)}\n";
|
|
2
|
+
//# sourceMappingURL=surface-css.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-css.generated.d.ts","sourceRoot":"","sources":["../../src/ui/surface-css.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,2wGAA+3D,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// ⚠️ 生成物,勿手改。真源 = src/ui/surface.css
|
|
2
|
+
// 由 scripts/gen-css.mjs 生成(`pnpm run gen:css`):改样式请改那个 .css 文件后重新生成。
|
|
3
|
+
export const SURFACE_CSS = "\n/* ── Surface · 纯框容器 ───────────────────────────────────────────────────\n 只回答「一块面长什么样」:底 / 边 / 圆角 / 内距,四根轴,零业务语义。\n 它是**圆角契约的唯一真源**:容器档 = --dshpc-radius-md(12),与 Button / Input 同档,\n 外框永远不小于里面的控件 —— 杜绝「卡片 8 < 按钮 12」这类倒挂(2026-11-01)。\n\n 所有轴都用**变量**表达,修饰类只改这些变量、不改属性:\n 消费方(Card、下游插件)自己写规则时,无论两份 CSS 谁先注入,胜负都不依赖顺序。\n\n tone plain(默认 surface-1) / raised / sunken / subtle\n border 默认 1px 实线;faint 更淡;none 透明(保留 1px 占位,不跳高);\n dashed 虚线(占位框用,线色仍是 border token)\n radius 默认 md;none / sm / lg\n padding 默认由调用方选档;none / sm(8) / md(12) / lg(16)\n 基类不带内距:容器要自己算四边内距时(如 Card 的色条贴边),不传 pad 档即可,不需要覆盖。 */\n.dshpc-surface{\n position:relative;box-sizing:border-box;color:var(--dshpc-fg);font:inherit;text-align:left;\n --surface-bg:var(--dshpc-surface-1);\n --surface-border:var(--dshpc-border);\n --surface-border-style:solid;\n --surface-radius:var(--dshpc-radius-md);\n --surface-pad:0;\n border:1px var(--surface-border-style) var(--surface-border);\n border-radius:var(--surface-radius);\n background:var(--surface-bg);\n padding:var(--surface-pad);\n}\n.dshpc-surface--tone-raised{--surface-bg:var(--dshpc-surface-raised)}\n.dshpc-surface--tone-sunken{--surface-bg:var(--dshpc-surface-sunken)}\n.dshpc-surface--tone-subtle{--surface-bg:var(--dshpc-chip-bg)}\n.dshpc-surface--border-faint{--surface-border:var(--dshpc-border-faint)}\n.dshpc-surface--border-none{--surface-border:transparent}\n.dshpc-surface--border-dashed{--surface-border-style:dashed}\n.dshpc-surface--radius-none{--surface-radius:0}\n.dshpc-surface--radius-sm{--surface-radius:var(--dshpc-radius-sm)}\n.dshpc-surface--radius-lg{--surface-radius:var(--dshpc-radius-lg)}\n.dshpc-surface--pad-none{--surface-pad:0}\n.dshpc-surface--pad-sm{--surface-pad:var(--dshpc-space-2)}\n.dshpc-surface--pad-md{--surface-pad:var(--dshpc-space-3)}\n.dshpc-surface--pad-lg{--surface-pad:var(--dshpc-space-4)}\n";
|
|
4
|
+
//# sourceMappingURL=surface-css.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-css.generated.js","sourceRoot":"","sources":["../../src/ui/surface-css.generated.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,qEAAqE;AACrE,MAAM,CAAC,MAAM,WAAW,GAAG,43DAA43D,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Surface(纯框容器)样式 —— **圆角契约的唯一真源**:容器档 = --dshpc-radius-md(12)。
|
|
2
|
+
//
|
|
3
|
+
// 四根轴(底 / 边 / 圆角 / 内距)全用变量表达,修饰类只改变量,任何消费方规则与它
|
|
4
|
+
// 同时命中时都不依赖注入顺序。要加新档:在 surface.css 里加一条只改变量的修饰类。
|
|
5
|
+
// 生成物 surface-css.generated.ts 由 scripts/gen-css.mjs 产出,勿手改。
|
|
6
|
+
export { SURFACE_CSS } from './surface-css.generated.js';
|
|
7
|
+
//# sourceMappingURL=surface-css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-css.js","sourceRoot":"","sources":["../../src/ui/surface-css.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,EAAE;AACF,+CAA+C;AAC/C,iDAAiD;AACjD,6DAA6D;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA"}
|
package/docs/help/ui.doc.ts
CHANGED
|
@@ -12,6 +12,7 @@ const cardExample = `import { Card, Chip, StripCard } from 'dsh-plugin-core/ui'
|
|
|
12
12
|
|
|
13
13
|
h(Card, {
|
|
14
14
|
accent: 'warning',
|
|
15
|
+
bar: { side: 'left', inset: 12, gap: 12 }, // 色条可放 left / right / top / bottom
|
|
15
16
|
action: h(Button, { size: 'sm', variant: 'ghost' }, '跳过'),
|
|
16
17
|
},
|
|
17
18
|
h('div', null, '标题'),
|
|
@@ -24,6 +25,17 @@ h(StripCard, {
|
|
|
24
25
|
panel: h('div', null, '展开详情'),
|
|
25
26
|
}, h('div', null, '标题 + 元信息'))`
|
|
26
27
|
|
|
28
|
+
const surfaceExample = `import { Surface, Card } from 'dsh-plugin-core/ui'
|
|
29
|
+
|
|
30
|
+
// 纯框:底 / 边框 / 圆角 / 内距四根轴。圆角固定 12,与 Button 同档。
|
|
31
|
+
h(Surface, { tone: 'sunken', padding: 'md' }, h('div', null, '任意内容'))
|
|
32
|
+
|
|
33
|
+
// 下游自己建「一块面」时用它,不要再写 border + border-radius:
|
|
34
|
+
h(Surface, { border: 'faint', padding: 'lg' }, h(Card, null, '框里再放卡'))
|
|
35
|
+
|
|
36
|
+
// 虚线占位框也走它,不要自己写 1px dashed:
|
|
37
|
+
h(Surface, { tone: 'sunken', border: 'dashed', padding: 'lg' }, '还没做的东西')`
|
|
38
|
+
|
|
27
39
|
const panelDockExample = `const dock = createPanelDock({ maxPanels: 3 }) // 一次,挂在插件级
|
|
28
40
|
|
|
29
41
|
// 页面里:结构就在这儿写,不塞进任何调用参数
|
|
@@ -37,6 +49,18 @@ h('div', { style: { display: 'flex' } },
|
|
|
37
49
|
)
|
|
38
50
|
// 之后任何地方:dock.open('files') / dock.close('files')`
|
|
39
51
|
|
|
52
|
+
const sideSheetExample = `import { SideSheet } from 'dsh-plugin-core/ui'
|
|
53
|
+
|
|
54
|
+
// 页面里某一处(关闭就是卸载,和 Modal 一样)
|
|
55
|
+
open ? h(SideSheet, {
|
|
56
|
+
title: '文件详情',
|
|
57
|
+
extra: h(Chip, null, '只读'), // 标题右侧(与 PanelDock 同一个槽)
|
|
58
|
+
onClose: () => setOpen(false),
|
|
59
|
+
footer: h(Button, { variant: 'primary', onClick: () => setOpen(false) }, '知道了'),
|
|
60
|
+
}, h(FileDetail)) : null
|
|
61
|
+
|
|
62
|
+
// 从右侧滑入、初始 720 宽、不许拖:side="right" / width={720} / resizable={false}`
|
|
63
|
+
|
|
40
64
|
const workspacePickerExample = `import { WorkspacePicker, connectHost } from 'dsh-plugin-core/ui'
|
|
41
65
|
|
|
42
66
|
// apply(ctx) 里:connectHost(ctx)
|
|
@@ -215,8 +239,8 @@ const doc: DocTopic = {
|
|
|
215
239
|
title: { zh: 'ui —— 基础控件', en: 'ui — base controls' },
|
|
216
240
|
exports: [
|
|
217
241
|
'Button', 'IconButton', 'Segmented', 'SplitGroup', 'Input', 'PrefixedInput', 'NumberInput', 'Textarea',
|
|
218
|
-
'Checkbox', 'fieldMetricsOf', 'Picker', 'WorkspacePicker', 'ModelPicker', 'DateTimePicker', 'Card', 'StripCard',
|
|
219
|
-
'Chip', 'Table', 'Pagination', 'Modal', 'FieldHint', 'setTooltipRenderer', 'showToast', 'notify', 'showHostToast',
|
|
242
|
+
'Checkbox', 'fieldMetricsOf', 'Picker', 'WorkspacePicker', 'ModelPicker', 'DateTimePicker', 'Surface', 'Card', 'StripCard',
|
|
243
|
+
'Chip', 'Table', 'Pagination', 'Modal', 'SideSheet', 'FieldHint', 'setTooltipRenderer', 'showToast', 'notify', 'showHostToast',
|
|
220
244
|
'Loader', 'LoaderBar', 'Loading', 'RunningBlocks', 'SectionHead', 'MarqueeText', 'LiveText',
|
|
221
245
|
'QuickToolbar', 'startResizeLayoutWidth', 'PanelDock', 'createPanelDock', 'DockPanel',
|
|
222
246
|
'ensureControls', 'setStyleKit',
|
|
@@ -441,13 +465,36 @@ const doc: DocTopic = {
|
|
|
441
465
|
},
|
|
442
466
|
],
|
|
443
467
|
},
|
|
468
|
+
{
|
|
469
|
+
id: 'surface',
|
|
470
|
+
heading: { zh: 'Surface(区域容器)', en: 'Surface (region container)' },
|
|
471
|
+
prose: [
|
|
472
|
+
{
|
|
473
|
+
zh: '纯框容器:底 / 边框 / 圆角 / 内距四根轴,无业务语义。圆角固定 12(与 Button 同档),是全站容器圆角的唯一来源——要「一块一块的面」就用它,不要再自己写 border + border-radius。',
|
|
474
|
+
en: 'A plain frame: background / border / radius / padding, nothing else. Radius is fixed at 12 (same tier as Button) and is the single source of container radii — use it instead of hand-rolling border + border-radius.',
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
api: [
|
|
478
|
+
{
|
|
479
|
+
id: 'ui-surface',
|
|
480
|
+
rows: [
|
|
481
|
+
{ name: 'tone', type: "'plain' | 'raised' | 'sunken' | 'subtle'", def: "'plain'", desc: { zh: '底色档(surface-1 / raised / sunken / chip 底)', en: 'Background tier (surface-1 / raised / sunken / chip)' } },
|
|
482
|
+
{ name: 'border', type: "true | 'faint' | 'none' | 'dashed'", def: 'true', desc: { zh: "none 保留 1px 透明占位,换外观不跳高;dashed 为虚线占位框", en: "'none' keeps a transparent 1px placeholder so heights stay stable; 'dashed' draws a dashed placeholder frame" } },
|
|
483
|
+
{ name: 'radius', type: "'sm' | 'md' | 'lg' | 'none'", def: "'md'", desc: { zh: 'md = 12,与控件同档', en: 'md = 12, same tier as controls' } },
|
|
484
|
+
{ name: 'padding', type: "'none' | 'sm' | 'md' | 'lg'", def: "'md'", desc: { zh: '内距档:0 / 8 / 12 / 16', en: 'Inner padding tiers: 0 / 8 / 12 / 16' } },
|
|
485
|
+
{ name: 'className / style', type: '—', def: '—', desc: { zh: '追加类 / 样式', en: 'Append class / style' } },
|
|
486
|
+
],
|
|
487
|
+
},
|
|
488
|
+
],
|
|
489
|
+
code: [{ id: 'ui-surface-example', lang: 'tsx', src: surfaceExample }],
|
|
490
|
+
},
|
|
444
491
|
{
|
|
445
492
|
id: 'card',
|
|
446
493
|
heading: { zh: 'Card / StripCard', en: 'Card / StripCard' },
|
|
447
494
|
prose: [
|
|
448
495
|
{
|
|
449
|
-
zh: '两种外观,两个组件:Card =
|
|
450
|
-
en: 'Two appearances, two components: Card =
|
|
496
|
+
zh: '两种外观,两个组件:Card = Surface 外框(底 + 1px 边框 + 圆角 12)+ 色条(方位与间距可配);StripCard = 同色浅底 + 占位边框 + 方角 + 通高左缘色条。',
|
|
497
|
+
en: 'Two appearances, two components: Card = Surface frame (background + 1px border + 12px radius) + rail (side and spacing configurable); StripCard = same-hue light background + placeholder border + square corners + full-height left rail.',
|
|
451
498
|
},
|
|
452
499
|
{
|
|
453
500
|
zh: '头部整体垂直居中,`action` 里裸放一个元素即居中。颜色全走 token,明暗跟随宿主。',
|
|
@@ -459,6 +506,7 @@ const doc: DocTopic = {
|
|
|
459
506
|
id: 'ui-card',
|
|
460
507
|
rows: [
|
|
461
508
|
{ name: 'accent', type: "13 档 or 任意 CSS 色值(business/success/warning/danger/neutral + 扩展 purple/pink/cyan/teal/orange/indigo/rose/slate)", def: "'business'", desc: { zh: '档位映射到 design 的 token;也可传 \'#f59e0b\' 这类自定义值', en: 'Tiers map to design tokens; also accepts custom values like \'#f59e0b\'' } },
|
|
509
|
+
{ name: 'bar', type: "'left' | 'right' | 'top' | 'bottom' + size / inset / gap / length", def: "side 'left'", desc: { zh: '色条方位与几何:inset = 距卡片边缘、gap = 距内容、length = 上下方位时的条长(默认跟内容同宽)', en: 'Rail side and geometry: inset = distance to card edge, gap = distance to content, length = rail length for top/bottom (defaults to content width)' } },
|
|
462
510
|
{ name: 'expanded', type: 'boolean', def: "'false'", desc: { zh: '展开态(箭头朝向 + panel 显隐)', en: 'Expanded state (arrow direction + panel show/hide)' } },
|
|
463
511
|
{ name: 'onToggle', type: '() => void', def: '—', desc: { zh: '传了才显示右侧折叠箭头;展开状态由调用方管', en: 'Only shows the right collapse arrow if provided; caller owns the expanded state' } },
|
|
464
512
|
{ name: 'action', type: 'ReactNode', def: '—', desc: { zh: '右上角操作区', en: 'Top-right action area' } },
|
|
@@ -681,6 +729,45 @@ const doc: DocTopic = {
|
|
|
681
729
|
},
|
|
682
730
|
],
|
|
683
731
|
},
|
|
732
|
+
{
|
|
733
|
+
id: 'ui-sidesheet',
|
|
734
|
+
heading: { zh: 'SideSheet(侧边抽屉)', en: 'SideSheet (side drawer)' },
|
|
735
|
+
prose: [
|
|
736
|
+
{
|
|
737
|
+
zh: '从屏幕左 / 右缘滑入的**覆盖式**浮层。皮肤与 `PanelDock` **一模一样**(同一份 `side-panel.css`:头部排版、拖拽条、关闭钮、边框、阴影、入场动画),宽度也能拖;差别只在**怎么占位**:分栏是 sticky 占宽、把主区挤窄(调用方必须给挂载点),抽屉是 absolute 盖上去(自铺遮罩,不需要挂载点)。',
|
|
738
|
+
en: 'An **overlay** sliding in from the left or right edge. It shares the **exact same skin** as `PanelDock` (one `side-panel.css`: header layout, resize handle, close button, border, shadow, entrance animation) and resizes by dragging too; the only difference is **how it occupies space**: a dock is sticky and narrows the main area (caller must supply a mount), a sheet is absolute and covers it (lays its own mask, no mount needed).',
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
zh: '**没有收起**:抽屉没有收起钮、也没有收进去之后贴在边上的耳朵 —— 关就是关(用户 2026-11-02)。要「收起来还留着入口」那个形态,用 `PanelDock`。',
|
|
742
|
+
en: '**No collapse**: there is no collapse button and no edge ear to reopen from — closing means closing (decided 2026-11-02). For “collapse but keep an entry point”, use `PanelDock`.',
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
zh: '开关行为与 `Modal` 一致:**渲染即显示**(`{open && <SideSheet … />}`)、点遮罩 / Esc / ✕ 三条关闭路径都在,且可分别关掉(`closeOnMask` / `escClose` / `closable`)。遮罩右边界照样让开右侧分栏(读 `--dshpc-page-inset-right`),分级走 drawer 档(低于 modal、高于 dock)。',
|
|
746
|
+
en: 'Closing behaves exactly like `Modal`: **rendered means visible** (`{open && <SideSheet … />}`), with mask click / Esc / ✕ all wired and individually switchable (`closeOnMask` / `escClose` / `closable`). The mask still yields to the right column (`--dshpc-page-inset-right`) and sits on the drawer z-tier (below modal, above dock).',
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
zh: '宽度:初始 460px(与 PanelDock 同档)、下限 320、上限默认只受遮罩盒限制,都可调。**默认就能拖**(`resizable={false}` 关掉);拖动期把面板自己那条边框染成蓝色渐变,与分栏同款(不在旁边另加一条线)。拖出来的宽度只活在组件内,下次打开回到初始值。',
|
|
750
|
+
en: 'Width: starts at 460px (same as PanelDock), floor 320, ceiling defaults to the mask box — all adjustable. **Draggable by default** (`resizable={false}` to turn it off); while dragging, the panel’s own border becomes the blue gradient, same as the dock (never a second line beside it). A dragged width lives inside the component only — reopening starts from the initial value again.',
|
|
751
|
+
},
|
|
752
|
+
],
|
|
753
|
+
api: [
|
|
754
|
+
{
|
|
755
|
+
id: 'ui-sidesheet',
|
|
756
|
+
rows: [
|
|
757
|
+
{ name: 'side', type: "'left' | 'right'", def: "'left'", desc: { zh: '贴哪条边、从哪边滑入;拖拽条自动落到朝内那一侧', en: 'Which edge it hugs and slides from; the resize handle moves to the inner edge' } },
|
|
758
|
+
{ name: 'title / icon / extra', type: 'ReactNode', def: '—', desc: { zh: '内置头的标题 / 标题前图标 / 标题右侧任意内容(与 PanelDock 同槽)', en: 'Built-in header: title / icon before it / anything to the right (same slots as PanelDock)' } },
|
|
759
|
+
{ name: 'header', type: 'ReactNode | null', def: '—', desc: { zh: '整块替换头部;`null` = 不要头部(关闭钮浮到右上角)', en: 'Replace the whole header; `null` = no header (close button floats top-right)' } },
|
|
760
|
+
{ name: 'onClose / closable / closeIcon', type: '() => void / boolean / ReactNode', def: '— / 跟随 onClose / ✕', desc: { zh: '关闭回调;不传则不出关闭钮', en: 'Close handler; no close button if omitted' } },
|
|
761
|
+
{ name: 'closeOnMask / escClose', type: 'boolean', def: "'true' / 'true'", desc: { zh: '点遮罩关闭 / Esc 关闭', en: 'Close on mask click / on Esc' } },
|
|
762
|
+
{ name: 'width / minWidth / maxWidth', type: 'number / number / number', def: '460 / 320 / —', desc: { zh: '初始宽度 / 拖拽下限 / 拖拽上限(px;上限缺省 = 遮罩盒宽)', en: 'Initial width / resize floor / resize ceiling (px; ceiling defaults to the mask box)' } },
|
|
763
|
+
{ name: 'resizable', type: 'boolean', def: 'true', desc: { zh: '能否拖宽(关掉就没有拖拽条)', en: 'Whether it resizes by dragging (off = no handle)' } },
|
|
764
|
+
{ name: 'footer / children', type: 'ReactNode / ReactNode', def: '— / —', desc: { zh: '底栏 / 主体(主体是唯一滚动容器)', en: 'Footer / body (the body is the only scroll container)' } },
|
|
765
|
+
{ name: 'translate', type: 'Translate', def: '内置字典', desc: { zh: '覆盖关闭 / 拖拽条的文案', en: 'Override close / resize copy' } },
|
|
766
|
+
],
|
|
767
|
+
},
|
|
768
|
+
],
|
|
769
|
+
code: [{ id: 'ui-sidesheet-example', lang: 'tsx', src: sideSheetExample }],
|
|
770
|
+
},
|
|
684
771
|
{
|
|
685
772
|
id: 'layout',
|
|
686
773
|
heading: { zh: 'PanelDock(停靠分栏)', en: 'PanelDock (dock)' },
|
package/docs/help/ui.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> EN: ui — base controls
|
|
6
6
|
|
|
7
|
-
导出:Button、IconButton、Segmented、SplitGroup、Input、PrefixedInput、NumberInput、Textarea、Checkbox、fieldMetricsOf、Picker、WorkspacePicker、ModelPicker、DateTimePicker、Card、StripCard、Chip、Table、Pagination、Modal、FieldHint、setTooltipRenderer、showToast、notify、showHostToast、Loader、LoaderBar、Loading、RunningBlocks、SectionHead、MarqueeText、LiveText、QuickToolbar、startResizeLayoutWidth、PanelDock、createPanelDock、DockPanel、ensureControls、setStyleKit
|
|
7
|
+
导出:Button、IconButton、Segmented、SplitGroup、Input、PrefixedInput、NumberInput、Textarea、Checkbox、fieldMetricsOf、Picker、WorkspacePicker、ModelPicker、DateTimePicker、Surface、Card、StripCard、Chip、Table、Pagination、Modal、SideSheet、FieldHint、setTooltipRenderer、showToast、notify、showHostToast、Loader、LoaderBar、Loading、RunningBlocks、SectionHead、MarqueeText、LiveText、QuickToolbar、startResizeLayoutWidth、PanelDock、createPanelDock、DockPanel、ensureControls、setStyleKit
|
|
8
8
|
|
|
9
9
|
## 概览
|
|
10
10
|
|
|
@@ -233,13 +233,42 @@ h(DateTimePicker, {
|
|
|
233
233
|
|
|
234
234
|
> EN: Without a renderer only the question-mark icon shows, no bubble.
|
|
235
235
|
|
|
236
|
+
## Surface(区域容器)
|
|
237
|
+
|
|
238
|
+
> EN: Surface (region container)
|
|
239
|
+
|
|
240
|
+
纯框容器:底 / 边框 / 圆角 / 内距四根轴,无业务语义。圆角固定 12(与 Button 同档),是全站容器圆角的唯一来源——要「一块一块的面」就用它,不要再自己写 border + border-radius。
|
|
241
|
+
|
|
242
|
+
> EN: A plain frame: background / border / radius / padding, nothing else. Radius is fixed at 12 (same tier as Button) and is the single source of container radii — use it instead of hand-rolling border + border-radius.
|
|
243
|
+
|
|
244
|
+
| 参数 | 类型 | 默认 | 说明(zh) | 说明(en) |
|
|
245
|
+
|---|---|---|---|---|
|
|
246
|
+
| `tone` | `'plain' \| 'raised' \| 'sunken' \| 'subtle'` | 'plain' | 底色档(surface-1 / raised / sunken / chip 底) | Background tier (surface-1 / raised / sunken / chip) |
|
|
247
|
+
| `border` | `true \| 'faint' \| 'none' \| 'dashed'` | true | none 保留 1px 透明占位,换外观不跳高;dashed 为虚线占位框 | 'none' keeps a transparent 1px placeholder so heights stay stable; 'dashed' draws a dashed placeholder frame |
|
|
248
|
+
| `radius` | `'sm' \| 'md' \| 'lg' \| 'none'` | 'md' | md = 12,与控件同档 | md = 12, same tier as controls |
|
|
249
|
+
| `padding` | `'none' \| 'sm' \| 'md' \| 'lg'` | 'md' | 内距档:0 / 8 / 12 / 16 | Inner padding tiers: 0 / 8 / 12 / 16 |
|
|
250
|
+
| `className / style` | `—` | — | 追加类 / 样式 | Append class / style |
|
|
251
|
+
|
|
252
|
+
```tsx id="ui-surface-example"
|
|
253
|
+
import { Surface, Card } from 'dsh-plugin-core/ui'
|
|
254
|
+
|
|
255
|
+
// 纯框:底 / 边框 / 圆角 / 内距四根轴。圆角固定 12,与 Button 同档。
|
|
256
|
+
h(Surface, { tone: 'sunken', padding: 'md' }, h('div', null, '任意内容'))
|
|
257
|
+
|
|
258
|
+
// 下游自己建「一块面」时用它,不要再写 border + border-radius:
|
|
259
|
+
h(Surface, { border: 'faint', padding: 'lg' }, h(Card, null, '框里再放卡'))
|
|
260
|
+
|
|
261
|
+
// 虚线占位框也走它,不要自己写 1px dashed:
|
|
262
|
+
h(Surface, { tone: 'sunken', border: 'dashed', padding: 'lg' }, '还没做的东西')
|
|
263
|
+
```
|
|
264
|
+
|
|
236
265
|
## Card / StripCard
|
|
237
266
|
|
|
238
267
|
> EN: Card / StripCard
|
|
239
268
|
|
|
240
|
-
两种外观,两个组件:Card =
|
|
269
|
+
两种外观,两个组件:Card = Surface 外框(底 + 1px 边框 + 圆角 12)+ 色条(方位与间距可配);StripCard = 同色浅底 + 占位边框 + 方角 + 通高左缘色条。
|
|
241
270
|
|
|
242
|
-
> EN: Two appearances, two components: Card =
|
|
271
|
+
> EN: Two appearances, two components: Card = Surface frame (background + 1px border + 12px radius) + rail (side and spacing configurable); StripCard = same-hue light background + placeholder border + square corners + full-height left rail.
|
|
243
272
|
|
|
244
273
|
头部整体垂直居中,`action` 里裸放一个元素即居中。颜色全走 token,明暗跟随宿主。
|
|
245
274
|
|
|
@@ -248,6 +277,7 @@ h(DateTimePicker, {
|
|
|
248
277
|
| 参数 | 类型 | 默认 | 说明(zh) | 说明(en) |
|
|
249
278
|
|---|---|---|---|---|
|
|
250
279
|
| `accent` | `13 档 or 任意 CSS 色值(business/success/warning/danger/neutral + 扩展 purple/pink/cyan/teal/orange/indigo/rose/slate)` | 'business' | 档位映射到 design 的 token;也可传 '#f59e0b' 这类自定义值 | Tiers map to design tokens; also accepts custom values like '#f59e0b' |
|
|
280
|
+
| `bar` | `'left' \| 'right' \| 'top' \| 'bottom' + size / inset / gap / length` | side 'left' | 色条方位与几何:inset = 距卡片边缘、gap = 距内容、length = 上下方位时的条长(默认跟内容同宽) | Rail side and geometry: inset = distance to card edge, gap = distance to content, length = rail length for top/bottom (defaults to content width) |
|
|
251
281
|
| `expanded` | `boolean` | 'false' | 展开态(箭头朝向 + panel 显隐) | Expanded state (arrow direction + panel show/hide) |
|
|
252
282
|
| `onToggle` | `() => void` | — | 传了才显示右侧折叠箭头;展开状态由调用方管 | Only shows the right collapse arrow if provided; caller owns the expanded state |
|
|
253
283
|
| `action` | `ReactNode` | — | 右上角操作区 | Top-right action area |
|
|
@@ -260,6 +290,7 @@ import { Card, Chip, StripCard } from 'dsh-plugin-core/ui'
|
|
|
260
290
|
|
|
261
291
|
h(Card, {
|
|
262
292
|
accent: 'warning',
|
|
293
|
+
bar: { side: 'left', inset: 12, gap: 12 }, // 色条可放 left / right / top / bottom
|
|
263
294
|
action: h(Button, { size: 'sm', variant: 'ghost' }, '跳过'),
|
|
264
295
|
},
|
|
265
296
|
h('div', null, '标题'),
|
|
@@ -572,6 +603,52 @@ Modal 是自绘 overlay,不走 react-dom portal。
|
|
|
572
603
|
| `footer` | `ReactNode` | — | 底栏(按钮区) | Footer (button area) |
|
|
573
604
|
| `children` | `ReactNode` | — | 主体 | Body |
|
|
574
605
|
|
|
606
|
+
## SideSheet(侧边抽屉)
|
|
607
|
+
|
|
608
|
+
> EN: SideSheet (side drawer)
|
|
609
|
+
|
|
610
|
+
从屏幕左 / 右缘滑入的**覆盖式**浮层。皮肤与 `PanelDock` **一模一样**(同一份 `side-panel.css`:头部排版、拖拽条、关闭钮、边框、阴影、入场动画),宽度也能拖;差别只在**怎么占位**:分栏是 sticky 占宽、把主区挤窄(调用方必须给挂载点),抽屉是 absolute 盖上去(自铺遮罩,不需要挂载点)。
|
|
611
|
+
|
|
612
|
+
> EN: An **overlay** sliding in from the left or right edge. It shares the **exact same skin** as `PanelDock` (one `side-panel.css`: header layout, resize handle, close button, border, shadow, entrance animation) and resizes by dragging too; the only difference is **how it occupies space**: a dock is sticky and narrows the main area (caller must supply a mount), a sheet is absolute and covers it (lays its own mask, no mount needed).
|
|
613
|
+
|
|
614
|
+
**没有收起**:抽屉没有收起钮、也没有收进去之后贴在边上的耳朵 —— 关就是关(用户 2026-11-02)。要「收起来还留着入口」那个形态,用 `PanelDock`。
|
|
615
|
+
|
|
616
|
+
> EN: **No collapse**: there is no collapse button and no edge ear to reopen from — closing means closing (decided 2026-11-02). For “collapse but keep an entry point”, use `PanelDock`.
|
|
617
|
+
|
|
618
|
+
开关行为与 `Modal` 一致:**渲染即显示**(`{open && <SideSheet … />}`)、点遮罩 / Esc / ✕ 三条关闭路径都在,且可分别关掉(`closeOnMask` / `escClose` / `closable`)。遮罩右边界照样让开右侧分栏(读 `--dshpc-page-inset-right`),分级走 drawer 档(低于 modal、高于 dock)。
|
|
619
|
+
|
|
620
|
+
> EN: Closing behaves exactly like `Modal`: **rendered means visible** (`{open && <SideSheet … />}`), with mask click / Esc / ✕ all wired and individually switchable (`closeOnMask` / `escClose` / `closable`). The mask still yields to the right column (`--dshpc-page-inset-right`) and sits on the drawer z-tier (below modal, above dock).
|
|
621
|
+
|
|
622
|
+
宽度:初始 460px(与 PanelDock 同档)、下限 320、上限默认只受遮罩盒限制,都可调。**默认就能拖**(`resizable={false}` 关掉);拖动期把面板自己那条边框染成蓝色渐变,与分栏同款(不在旁边另加一条线)。拖出来的宽度只活在组件内,下次打开回到初始值。
|
|
623
|
+
|
|
624
|
+
> EN: Width: starts at 460px (same as PanelDock), floor 320, ceiling defaults to the mask box — all adjustable. **Draggable by default** (`resizable={false}` to turn it off); while dragging, the panel’s own border becomes the blue gradient, same as the dock (never a second line beside it). A dragged width lives inside the component only — reopening starts from the initial value again.
|
|
625
|
+
|
|
626
|
+
| 参数 | 类型 | 默认 | 说明(zh) | 说明(en) |
|
|
627
|
+
|---|---|---|---|---|
|
|
628
|
+
| `side` | `'left' \| 'right'` | 'left' | 贴哪条边、从哪边滑入;拖拽条自动落到朝内那一侧 | Which edge it hugs and slides from; the resize handle moves to the inner edge |
|
|
629
|
+
| `title / icon / extra` | `ReactNode` | — | 内置头的标题 / 标题前图标 / 标题右侧任意内容(与 PanelDock 同槽) | Built-in header: title / icon before it / anything to the right (same slots as PanelDock) |
|
|
630
|
+
| `header` | `ReactNode \| null` | — | 整块替换头部;`null` = 不要头部(关闭钮浮到右上角) | Replace the whole header; `null` = no header (close button floats top-right) |
|
|
631
|
+
| `onClose / closable / closeIcon` | `() => void / boolean / ReactNode` | — / 跟随 onClose / ✕ | 关闭回调;不传则不出关闭钮 | Close handler; no close button if omitted |
|
|
632
|
+
| `closeOnMask / escClose` | `boolean` | 'true' / 'true' | 点遮罩关闭 / Esc 关闭 | Close on mask click / on Esc |
|
|
633
|
+
| `width / minWidth / maxWidth` | `number / number / number` | 460 / 320 / — | 初始宽度 / 拖拽下限 / 拖拽上限(px;上限缺省 = 遮罩盒宽) | Initial width / resize floor / resize ceiling (px; ceiling defaults to the mask box) |
|
|
634
|
+
| `resizable` | `boolean` | true | 能否拖宽(关掉就没有拖拽条) | Whether it resizes by dragging (off = no handle) |
|
|
635
|
+
| `footer / children` | `ReactNode / ReactNode` | — / — | 底栏 / 主体(主体是唯一滚动容器) | Footer / body (the body is the only scroll container) |
|
|
636
|
+
| `translate` | `Translate` | 内置字典 | 覆盖关闭 / 拖拽条的文案 | Override close / resize copy |
|
|
637
|
+
|
|
638
|
+
```tsx id="ui-sidesheet-example"
|
|
639
|
+
import { SideSheet } from 'dsh-plugin-core/ui'
|
|
640
|
+
|
|
641
|
+
// 页面里某一处(关闭就是卸载,和 Modal 一样)
|
|
642
|
+
open ? h(SideSheet, {
|
|
643
|
+
title: '文件详情',
|
|
644
|
+
extra: h(Chip, null, '只读'), // 标题右侧(与 PanelDock 同一个槽)
|
|
645
|
+
onClose: () => setOpen(false),
|
|
646
|
+
footer: h(Button, { variant: 'primary', onClick: () => setOpen(false) }, '知道了'),
|
|
647
|
+
}, h(FileDetail)) : null
|
|
648
|
+
|
|
649
|
+
// 从右侧滑入、初始 720 宽、不许拖:side="right" / width={720} / resizable={false}
|
|
650
|
+
```
|
|
651
|
+
|
|
575
652
|
## PanelDock(停靠分栏)
|
|
576
653
|
|
|
577
654
|
> EN: PanelDock (dock)
|
package/package.json
CHANGED