dsh-plugin-core-demo 0.35.20 → 0.35.22
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/client.js +36 -110
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -1258,6 +1258,7 @@ function useLocale() {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
|
|
1260
1260
|
// dist/ui/inputs/picker-logic.js
|
|
1261
|
+
var PICKER_DEFAULT_MIN_WIDTH = 120;
|
|
1261
1262
|
function toGroups(groups, options) {
|
|
1262
1263
|
if (groups !== void 0 && groups.length > 0)
|
|
1263
1264
|
return groups;
|
|
@@ -4305,13 +4306,16 @@ var PICKER_CSS = `
|
|
|
4305
4306
|
/* cascade \u5916\u5C42\u884C\u4E4B\u524D\u6CA1\u6709\u5E03\u5C40\uFF1A\u4E24\u4E2A inline-block \u6309\u57FA\u7EBF\u6392 \u21D2 \u4F9B\u5E94\u5546\u6846\u4E0B\u6C89\u3001\u4E24\u6846\u4E4B\u95F4\u53EA\u5269 HTML \u7A7A\u767D\u770B\u7740\u8FDE\u4F53\u3002
|
|
4306
4307
|
\u8FD9\u91CC\u53EA\u7ED9\u9ED8\u8BA4\u503C\uFF0C:where() \u7279\u5F02\u6027 0\uFF0C\u6D88\u8D39\u65B9 rowClassName \u7684\u4EFB\u610F\u89C4\u5219\u90FD\u80FD\u76D6\u56DE\u6765\u3002 */
|
|
4307
4308
|
:where(.dshpc-picker__cascade){display:flex;align-items:center;gap:8px}
|
|
4308
|
-
/* \u89E6\u53D1\u5668\u94FA\u6EE1\u6839\u76D2\uFF1Bhint \u6001\u591A\u4E00\u5C42 fieldwrap\uFF0C\u90A3\u5C42\u4E5F\u94FA\u6EE1\u3001\u6309\u94AE\u5403\u5269\u4F59\u5BBD\u5EA6\u7ED9\u95EE\u53F7\u8BA9\u4F4D\u3002
|
|
4309
|
+
/* \u89E6\u53D1\u5668\u94FA\u6EE1\u6839\u76D2\uFF1Bhint \u6001\u591A\u4E00\u5C42 fieldwrap\uFF0C\u90A3\u5C42\u4E5F\u94FA\u6EE1\u3001\u6309\u94AE\u5403\u5269\u4F59\u5BBD\u5EA6\u7ED9\u95EE\u53F7\u8BA9\u4F4D\u3002
|
|
4310
|
+
\u5C3A\u5BF8\u53EA\u7531\u6839\u76D2\u6301\u6709\uFF1A\u9ED8\u8BA4\u4E0B\u9650\uFF08PICKER_DEFAULT_MIN_WIDTH\uFF09\u4E0E\u8C03\u7528\u65B9\u4E09\u8F74\u90FD\u5728\u6839\u76D2\u7684\u5185\u8054 style \u91CC\uFF0C
|
|
4311
|
+
trigger \u4E00\u6761 min/max \u90FD\u4E0D\u80FD\u6709 \u2014\u2014 \u5426\u5219 width:96 \u4F1A\u88AB trigger \u7684 120 \u4E0B\u9650\u9876\u5230 120\uFF0C
|
|
4312
|
+
\u5411\u53F3\u6EA2\u51FA\u76D6\u4F4F\u90BB\u683C\uFF082026-11-11 \u7528\u6237\u622A\u56FE\uFF1A\u5E74\u4EFD\u4E0B\u62C9\u6EA2\u51FA 24px \u538B\u5230\u6708\u4EFD\u6ED1\u8F68\uFF09\u3002 */
|
|
4309
4313
|
.dshpc-picker > .dshpc-picker__trigger{width:100%;box-sizing:border-box}
|
|
4310
4314
|
.dshpc-picker > .dshpc-fieldwrap{display:flex;width:100%;box-sizing:border-box}
|
|
4311
4315
|
.dshpc-picker .dshpc-fieldwrap > .dshpc-picker__trigger{flex:1 1 auto;width:auto;min-width:0}
|
|
4312
4316
|
.dshpc-picker__trigger{
|
|
4313
4317
|
display:inline-flex;align-items:center;justify-content:space-between;gap:6px;
|
|
4314
|
-
min-width:
|
|
4318
|
+
min-width:0;height:28px;padding:0 8px;
|
|
4315
4319
|
color:var(--dshpc-fg);background:var(--dshpc-surface-1);
|
|
4316
4320
|
border:1px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);cursor:pointer;
|
|
4317
4321
|
}
|
|
@@ -4413,7 +4417,8 @@ function Picker(props) {
|
|
|
4413
4417
|
const placement = props.placement ?? "down";
|
|
4414
4418
|
const clearable = props.clearable === true;
|
|
4415
4419
|
const showLabels = props.showLabels !== false;
|
|
4416
|
-
const
|
|
4420
|
+
const sizing = resolveTriggerSizing(props);
|
|
4421
|
+
const controlStyle = { ...sizing, minWidth: sizing.minWidth ?? PICKER_DEFAULT_MIN_WIDTH };
|
|
4417
4422
|
const groups = (0, import_react9.useMemo)(() => toGroups(props.groups, props.options), [props.groups, props.options]);
|
|
4418
4423
|
const controlled = props.value !== void 0;
|
|
4419
4424
|
const [inner, setInner] = (0, import_react9.useState)(() => toArray(props.defaultValue));
|
|
@@ -6833,8 +6838,8 @@ function Pagination(props) {
|
|
|
6833
6838
|
const middle2 = props.simple === true ? [(0, import_react28.createElement)("span", { key: "simple", className: "dshpc-pagination__simple" }, `${String(page)} / ${String(count4)}`)] : pageItems(page, count4, props.siblingCount, props.boundaryCount).map((item, index3) => item === "gap" ? (0, import_react28.createElement)("span", { key: `gap-${String(index3)}`, className: "dshpc-pagination__ellipsis", "aria-hidden": "true" }, "\u2026") : pageButton(item));
|
|
6834
6839
|
const options = props.pageSizeOptions ?? [];
|
|
6835
6840
|
const sizeNode = options.length === 0 ? null : (0, import_react28.createElement)(Picker, {
|
|
6841
|
+
// 沿用根盒默认下限:旧写法 minWidth:'auto' 压不住触发器的 120,迁移后会把控件缩到文字宽。
|
|
6836
6842
|
className: "dshpc-pagination__size",
|
|
6837
|
-
minWidth: "auto",
|
|
6838
6843
|
mode: "single",
|
|
6839
6844
|
size: props.size,
|
|
6840
6845
|
options: options.map((size4) => ({
|
|
@@ -54975,34 +54980,8 @@ function languageForPath(path) {
|
|
|
54975
54980
|
}
|
|
54976
54981
|
|
|
54977
54982
|
// dist/ui/display/code-viewer-theme.js
|
|
54978
|
-
var
|
|
54979
|
-
|
|
54980
|
-
gray: "#abb2bf",
|
|
54981
|
-
faintGray: "#5c6370",
|
|
54982
|
-
white: "#ffffff",
|
|
54983
|
-
red: "#e06c75",
|
|
54984
|
-
green: "#98c379",
|
|
54985
|
-
yellow: "#e5c07b",
|
|
54986
|
-
blue: "#61afef",
|
|
54987
|
-
magenta: "#c678dd",
|
|
54988
|
-
cyan: "#56b6c2",
|
|
54989
|
-
orange: "#d19a66",
|
|
54990
|
-
link: "#56b6c2"
|
|
54991
|
-
};
|
|
54992
|
-
var ONE_LIGHT = {
|
|
54993
|
-
black: "#383a42",
|
|
54994
|
-
gray: "#a0a1a7",
|
|
54995
|
-
faintGray: "#4f525e",
|
|
54996
|
-
white: "#ffffff",
|
|
54997
|
-
red: "#e45649",
|
|
54998
|
-
green: "#50a14f",
|
|
54999
|
-
yellow: "#c18401",
|
|
55000
|
-
blue: "#0184bc",
|
|
55001
|
-
magenta: "#a626a4",
|
|
55002
|
-
cyan: "#0997b3",
|
|
55003
|
-
orange: "#986801",
|
|
55004
|
-
link: "#4078f2"
|
|
55005
|
-
};
|
|
54983
|
+
var CURSOR_FALLBACK_DARK = "#abb2bf";
|
|
54984
|
+
var CURSOR_FALLBACK_LIGHT = "#383a42";
|
|
55006
54985
|
var cmSurfaceTheme = EditorView.theme({
|
|
55007
54986
|
"&": {
|
|
55008
54987
|
height: "100%",
|
|
@@ -55014,6 +54993,9 @@ var cmSurfaceTheme = EditorView.theme({
|
|
|
55014
54993
|
overflow: "auto",
|
|
55015
54994
|
fontFamily: "var(--dshpc-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)"
|
|
55016
54995
|
},
|
|
54996
|
+
// basicSetup 默认开 drawSelection(),它会把 .cm-content 的 caret-color 置为 transparent:
|
|
54997
|
+
// CodeMirror 6 用自绘 .cm-cursor,不认原生 caret。真正决定光标色的是下面 cmSurfaceTint
|
|
54998
|
+
// 里的 borderLeftColor;这一条只在没开 drawSelection 时兜底。
|
|
55017
54999
|
".cm-content": {
|
|
55018
55000
|
caretColor: "var(--dshpc-fg, #1f2328)"
|
|
55019
55001
|
},
|
|
@@ -55033,78 +55015,19 @@ var SELECTION_DARK = "#3E4451";
|
|
|
55033
55015
|
var SELECTION_LIGHT = "#c8d3f0";
|
|
55034
55016
|
function cmSurfaceTint(dark) {
|
|
55035
55017
|
return EditorView.theme({
|
|
55036
|
-
//
|
|
55037
|
-
// 聚焦态选区画在 .cm-selectionLayer 里,未聚焦走 .cm-selectionBackground,
|
|
55038
|
-
// 浏览器原生取 .cm-content ::selection —— 三条都盖住,避免任一路径漏配。
|
|
55018
|
+
// 与官方 oneDarkTheme 的选区选择器一致(dist/index.js:41),本层后注入 ⇒ 覆盖。
|
|
55039
55019
|
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
|
|
55040
55020
|
backgroundColor: dark ? SELECTION_DARK : SELECTION_LIGHT
|
|
55021
|
+
},
|
|
55022
|
+
// 官方 oneDarkTheme 也给 .cm-cursor 上色,但亮色没有等价规则;本层统一吃 token,
|
|
55023
|
+
// 且后注入覆盖官方,明暗两套表现一致。
|
|
55024
|
+
".cm-cursor, .cm-dropCursor": {
|
|
55025
|
+
borderLeftColor: `var(--dshpc-fg, ${dark ? CURSOR_FALLBACK_DARK : CURSOR_FALLBACK_LIGHT})`
|
|
55041
55026
|
}
|
|
55042
55027
|
});
|
|
55043
55028
|
}
|
|
55044
|
-
var HIGHLIGHTS_DARK = [
|
|
55045
|
-
{ tag: [tags.comment, tags.lineComment, tags.blockComment], color: ONE_DARK.faintGray, fontStyle: "italic" },
|
|
55046
|
-
{ tag: [tags.keyword, tags.modifier, tags.controlKeyword, tags.moduleKeyword], color: ONE_DARK.magenta },
|
|
55047
|
-
{ tag: [tags.operator, tags.operatorKeyword, tags.compareOperator, tags.logicOperator, tags.bitwiseOperator], color: ONE_DARK.cyan },
|
|
55048
|
-
{ tag: [tags.definitionKeyword, tags.atom], color: ONE_DARK.cyan },
|
|
55049
|
-
{ tag: [tags.number, tags.bool, tags.null, tags.escape], color: ONE_DARK.orange },
|
|
55050
|
-
{ tag: [tags.string, tags.special(tags.string), tags.regexp], color: ONE_DARK.green },
|
|
55051
|
-
{ tag: [tags.character, tags.special(tags.character)], color: ONE_DARK.orange },
|
|
55052
|
-
{ tag: [tags.propertyName], color: ONE_DARK.yellow },
|
|
55053
|
-
// 变量名取 ivory(#abb2bf) 而非纯白:官方 one-dark 的正文色就是 ivory,纯白在深底上过曝、
|
|
55054
|
-
// 且压在选区上对比度更差(旧值 #ffffff)。
|
|
55055
|
-
{ tag: [tags.variableName], color: ONE_DARK.gray },
|
|
55056
|
-
{ tag: [tags.function(tags.variableName), tags.function(tags.propertyName), tags.labelName], color: ONE_DARK.blue },
|
|
55057
|
-
{ tag: [tags.className, tags.typeName, tags.namespace], color: ONE_DARK.yellow },
|
|
55058
|
-
{ tag: [tags.definition(tags.typeName), tags.definition(tags.className), tags.definition(tags.namespace)], color: ONE_DARK.yellow },
|
|
55059
|
-
{ tag: [tags.tagName], color: ONE_DARK.red },
|
|
55060
|
-
{ tag: [tags.attributeName], color: ONE_DARK.yellow },
|
|
55061
|
-
{ tag: [tags.self, tags.standard(tags.variableName), tags.constant(tags.variableName)], color: ONE_DARK.orange },
|
|
55062
|
-
{ tag: [tags.punctuation, tags.separator, tags.bracket], color: ONE_DARK.gray },
|
|
55063
|
-
{ tag: [tags.squareBracket, tags.paren, tags.brace], color: ONE_DARK.gray },
|
|
55064
|
-
{ tag: [tags.meta, tags.documentMeta, tags.annotation], color: ONE_DARK.gray },
|
|
55065
|
-
{ tag: [tags.link, tags.url], color: ONE_DARK.link, fontStyle: "underline" },
|
|
55066
|
-
{ tag: [tags.heading], color: ONE_DARK.blue, fontStyle: "bold" },
|
|
55067
|
-
{ tag: [tags.emphasis], fontStyle: "italic" },
|
|
55068
|
-
{ tag: [tags.strong], fontWeight: "bold" },
|
|
55069
|
-
{ tag: [tags.strikethrough], textDecoration: "line-through" },
|
|
55070
|
-
{ tag: [tags.monospace], color: ONE_DARK.green },
|
|
55071
|
-
{ tag: [tags.contentSeparator], color: ONE_DARK.faintGray },
|
|
55072
|
-
{ tag: [tags.invalid], color: ONE_DARK.red }
|
|
55073
|
-
];
|
|
55074
|
-
var HIGHLIGHTS_LIGHT = [
|
|
55075
|
-
{ tag: [tags.comment, tags.lineComment, tags.blockComment], color: ONE_LIGHT.faintGray, fontStyle: "italic" },
|
|
55076
|
-
{ tag: [tags.keyword, tags.modifier, tags.controlKeyword, tags.moduleKeyword], color: ONE_LIGHT.magenta },
|
|
55077
|
-
{ tag: [tags.operator, tags.operatorKeyword, tags.compareOperator, tags.logicOperator, tags.bitwiseOperator], color: ONE_LIGHT.cyan },
|
|
55078
|
-
{ tag: [tags.definitionKeyword, tags.atom], color: ONE_LIGHT.cyan },
|
|
55079
|
-
{ tag: [tags.number, tags.bool, tags.null, tags.escape], color: ONE_LIGHT.orange },
|
|
55080
|
-
{ tag: [tags.string, tags.special(tags.string), tags.regexp], color: ONE_LIGHT.green },
|
|
55081
|
-
{ tag: [tags.character, tags.special(tags.character)], color: ONE_LIGHT.orange },
|
|
55082
|
-
{ tag: [tags.propertyName], color: ONE_LIGHT.black },
|
|
55083
|
-
{ tag: [tags.variableName], color: ONE_LIGHT.black },
|
|
55084
|
-
{ tag: [tags.function(tags.variableName), tags.function(tags.propertyName), tags.labelName], color: ONE_LIGHT.blue },
|
|
55085
|
-
{ tag: [tags.className, tags.typeName, tags.namespace], color: ONE_LIGHT.yellow },
|
|
55086
|
-
{ tag: [tags.definition(tags.typeName), tags.definition(tags.className), tags.definition(tags.namespace)], color: ONE_LIGHT.yellow },
|
|
55087
|
-
{ tag: [tags.tagName], color: ONE_LIGHT.red },
|
|
55088
|
-
{ tag: [tags.attributeName], color: ONE_LIGHT.yellow },
|
|
55089
|
-
{ tag: [tags.self, tags.standard(tags.variableName), tags.constant(tags.variableName)], color: ONE_LIGHT.orange },
|
|
55090
|
-
{ tag: [tags.punctuation, tags.separator, tags.bracket], color: ONE_LIGHT.gray },
|
|
55091
|
-
{ tag: [tags.squareBracket, tags.paren, tags.brace], color: ONE_LIGHT.gray },
|
|
55092
|
-
{ tag: [tags.meta, tags.documentMeta, tags.annotation], color: ONE_LIGHT.gray },
|
|
55093
|
-
{ tag: [tags.link, tags.url], color: ONE_LIGHT.link, fontStyle: "underline" },
|
|
55094
|
-
{ tag: [tags.heading], color: ONE_LIGHT.blue, fontStyle: "bold" },
|
|
55095
|
-
{ tag: [tags.emphasis], fontStyle: "italic" },
|
|
55096
|
-
{ tag: [tags.strong], fontWeight: "bold" },
|
|
55097
|
-
{ tag: [tags.strikethrough], textDecoration: "line-through" },
|
|
55098
|
-
{ tag: [tags.monospace], color: ONE_LIGHT.green },
|
|
55099
|
-
{ tag: [tags.contentSeparator], color: ONE_LIGHT.faintGray },
|
|
55100
|
-
{ tag: [tags.invalid], color: ONE_LIGHT.red }
|
|
55101
|
-
];
|
|
55102
55029
|
function codeMirrorTheme(dark) {
|
|
55103
|
-
return [
|
|
55104
|
-
cmSurfaceTheme,
|
|
55105
|
-
cmSurfaceTint(dark),
|
|
55106
|
-
syntaxHighlighting(HighlightStyle.define(dark ? HIGHLIGHTS_DARK : HIGHLIGHTS_LIGHT))
|
|
55107
|
-
];
|
|
55030
|
+
return [cmSurfaceTheme, cmSurfaceTint(dark)];
|
|
55108
55031
|
}
|
|
55109
55032
|
|
|
55110
55033
|
// dist/ui/infra/code-mirror-surface.js
|
|
@@ -55154,7 +55077,10 @@ function CodeMirrorSurface(props) {
|
|
|
55154
55077
|
return (0, import_react50.createElement)("div", { className: `dshpc-cv${className2 ? ` ${className2}` : ""}`, style: style2 }, overlay ?? null, (0, import_react50.createElement)(esm_default, {
|
|
55155
55078
|
value,
|
|
55156
55079
|
className: "dshpc-cv__editor dshpc-scroll-thin",
|
|
55157
|
-
|
|
55080
|
+
// 明暗与语法配色交给官方:dark → oneDark(官方主题 + 完整 highlighter),
|
|
55081
|
+
// light → 官方亮色表面 + basicSetup 的 defaultHighlightStyle 兜底。
|
|
55082
|
+
// 核心 cmSurfaceTheme / cmSurfaceTint 在 extensions 里后注入,覆盖官方面板背景。
|
|
55083
|
+
theme: dark ? "dark" : "light",
|
|
55158
55084
|
extensions,
|
|
55159
55085
|
readOnly: readOnly2,
|
|
55160
55086
|
onChange: onChange === void 0 ? void 0 : (next) => {
|
|
@@ -64563,8 +64489,8 @@ var docData = {
|
|
|
64563
64489
|
},
|
|
64564
64490
|
"prose": [
|
|
64565
64491
|
{
|
|
64566
|
-
"zh": "Picker\uFF1A\u5355 / \u591A\u9009\u3001\u4E0A\u9650\u3001\u641C\u7D22\u3001\u5206\u7EC4\u3001\u7A7A\u6001\uFF0C\u81EA\u7ED8\u3002\u952E\u76D8\uFF1AEsc \u5173\u3001\u2191\u2193 \u79FB\u6E38\u6807\u3001Enter \u9009\u3002\u7EAF\u903B\u8F91\u53EF\u5355\u7528\uFF1A`toGroups` / `filterGroups` / `toggleValue` / `toFlatOptions` / `resolveMenuSizing`\u3002`width` / `minWidth` / `maxWidth` \u7EA6\u675F\u6574\u4E2A\u63A7\u4EF6\u7684\u5360\u4F4D\u5BBD\u5EA6\uFF08\u843D\u5728\u6839\u76D2\u3001\u89E6\u53D1\u5668\u81EA\u52A8\u94FA\u6EE1\uFF09\uFF1A\u5B9A\u5BBD\u5FFD\u7565\u53E6\u4E24\u8005\uFF1B\u9009\u4E2D\u6587\u5B57\u518D\u957F\u63A7\u4EF6\u4F4D\u7F6E\u4E5F\u4E0D\u52A8\uFF0C\u8D85\u957F\u53EA\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\u3002\u83DC\u5355\u9760\u89C6\u53E3\u8FB9\u7F18\u4F1A\u81EA\u52A8\u6536\u7A84\u5E76\u5185\u6536\uFF08\u5DE6\u53F3\u5404\u7559 12px\uFF09\uFF0C\u6D88\u8D39\u65B9\u4E0D\u5FC5\u5904\u7406\u8D34\u8FB9\u3002\u4E0B\u62C9\u5185\u641C\u7D22\u6846\u53E6\u8D70 `searchSizing`\uFF08\u540C\u4E00\u5957\u5BBD\u5EA6\u4E09\u8F74\uFF09\uFF0C\u4E0D\u4F20\u5C31\u6CBF\u7528 CSS \u7684 100% \u94FA\u6EE1\uFF1B\u83DC\u5355\u4F1A\u968F `searchSizing` \u7684\u4E0B\u9650\u81EA\u52A8\u52A0\u5BBD\uFF0C\u4E0D\u4F1A\u88AB\u83DC\u5355\u7684 overflow:hidden \u88C1\u6389\u3002\u83DC\u5355\u91CC\u7684\u9009\u9879\u8D85\u957F\u540C\u6837\u7701\u7565 + hover \u8DD1\u9A6C\u706F\uFF0C\u4E0D\u4F1A\u628A\u83DC\u5355\u6491\u51FA\u6A2A\u5411\u6EDA\u52A8\u6761\u3002",
|
|
64567
|
-
"en": "Picker: single/multiple selection, cap, search, grouping, empty state \u2014 self-drawn. Keyboard: Esc closes, \u2191\u2193 move the cursor, Enter selects. Logic reusable standalone: `toGroups` / `filterGroups` / `toggleValue` / `toFlatOptions` / `resolveMenuSizing`. `width`/`minWidth`/`maxWidth` size the control box (the root; the trigger fills it), so a long label never shifts the control. Near a viewport edge the dropdown narrows and shifts back inside (12px on each side), so callers need no edge handling. The search box takes its own `searchSizing` (the same width/minWidth/maxWidth triple) and fills 100% by default; the menu widens with the search box lower bound so it is never clipped by overflow:hidden."
|
|
64492
|
+
"zh": "Picker\uFF1A\u5355 / \u591A\u9009\u3001\u4E0A\u9650\u3001\u641C\u7D22\u3001\u5206\u7EC4\u3001\u7A7A\u6001\uFF0C\u81EA\u7ED8\u3002\u952E\u76D8\uFF1AEsc \u5173\u3001\u2191\u2193 \u79FB\u6E38\u6807\u3001Enter \u9009\u3002\u7EAF\u903B\u8F91\u53EF\u5355\u7528\uFF1A`toGroups` / `filterGroups` / `toggleValue` / `toFlatOptions` / `resolveMenuSizing`\u3002`width` / `minWidth` / `maxWidth` \u7EA6\u675F\u6574\u4E2A\u63A7\u4EF6\u7684\u5360\u4F4D\u5BBD\u5EA6\uFF08\u843D\u5728\u6839\u76D2\u3001\u89E6\u53D1\u5668\u81EA\u52A8\u94FA\u6EE1\uFF09\uFF1A\u5B9A\u5BBD\u5FFD\u7565\u53E6\u4E24\u8005\uFF1B\u5BBD\u5EA6\u4E09\u8F74\u4E0E\u9ED8\u8BA4\u4E0B\u9650\uFF08120px\uFF09\u552F\u4E00\u7531\u6839\u76D2\u6301\u6709\uFF0C\u89E6\u53D1\u5668\u53EA\u94FA\u6EE1\u3001\u4E0D\u81EA\u5E26\u4E0B\u9650\uFF0C\u663E\u5F0F\u7ED9\u7684\u5B9A\u5BBD\u6216\u4E0B\u9650\u5C0F\u4E8E 120px \u4E5F\u6309\u7ED9\u7684\u503C\u751F\u6548\uFF0C\u4E0D\u4F1A\u88AB\u9ED8\u8BA4\u503C\u9876\u7834\uFF1B\u9009\u4E2D\u6587\u5B57\u518D\u957F\u63A7\u4EF6\u4F4D\u7F6E\u4E5F\u4E0D\u52A8\uFF0C\u8D85\u957F\u53EA\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\u3002\u83DC\u5355\u9760\u89C6\u53E3\u8FB9\u7F18\u4F1A\u81EA\u52A8\u6536\u7A84\u5E76\u5185\u6536\uFF08\u5DE6\u53F3\u5404\u7559 12px\uFF09\uFF0C\u6D88\u8D39\u65B9\u4E0D\u5FC5\u5904\u7406\u8D34\u8FB9\u3002\u4E0B\u62C9\u5185\u641C\u7D22\u6846\u53E6\u8D70 `searchSizing`\uFF08\u540C\u4E00\u5957\u5BBD\u5EA6\u4E09\u8F74\uFF09\uFF0C\u4E0D\u4F20\u5C31\u6CBF\u7528 CSS \u7684 100% \u94FA\u6EE1\uFF1B\u83DC\u5355\u4F1A\u968F `searchSizing` \u7684\u4E0B\u9650\u81EA\u52A8\u52A0\u5BBD\uFF0C\u4E0D\u4F1A\u88AB\u83DC\u5355\u7684 overflow:hidden \u88C1\u6389\u3002\u83DC\u5355\u91CC\u7684\u9009\u9879\u8D85\u957F\u540C\u6837\u7701\u7565 + hover \u8DD1\u9A6C\u706F\uFF0C\u4E0D\u4F1A\u628A\u83DC\u5355\u6491\u51FA\u6A2A\u5411\u6EDA\u52A8\u6761\u3002",
|
|
64493
|
+
"en": "Picker: single/multiple selection, cap, search, grouping, empty state \u2014 self-drawn. Keyboard: Esc closes, \u2191\u2193 move the cursor, Enter selects. Logic reusable standalone: `toGroups` / `filterGroups` / `toggleValue` / `toFlatOptions` / `resolveMenuSizing`. `width`/`minWidth`/`maxWidth` size the control box (the root; the trigger fills it): the root alone owns the triple and its 120px default lower bound, the trigger holds no bound of its own, and an explicit width or min below 120px is honoured verbatim, so a long label never shifts the control. Near a viewport edge the dropdown narrows and shifts back inside (12px on each side), so callers need no edge handling. The search box takes its own `searchSizing` (the same width/minWidth/maxWidth triple) and fills 100% by default; the menu widens with the search box lower bound so it is never clipped by overflow:hidden."
|
|
64568
64494
|
},
|
|
64569
64495
|
{
|
|
64570
64496
|
"zh": "\u9996\u5C4F\u5206\u9875\uFF1A`limit` \u6309**\u9009\u9879\u6761\u6570**\u8DE8\u7EC4\u5207\u7247\uFF0C\u5217\u8868\u672B\u5C3E\u300C\u663E\u793A\u66F4\u591A\u300D\uFF08\u8DDF\u5728\u6700\u540E\u4E00\u6761\u540E\uFF0C\u50CF\u591A\u4E00\u6761\u9009\u9879\uFF09\u6BCF\u70B9\u4E00\u6B21\u518D\u8FFD\u52A0 `limit` \u6761\uFF1B\u641C\u7D22\u7ED3\u679C\u8D70\u540C\u4E00\u5957\u5206\u9875\uFF0C\u6362\u641C\u7D22\u8BCD\u6216\u91CD\u65B0\u5C55\u5F00\u90FD\u56DE\u5230\u9996\u5C4F\u3002\u4E0D\u4F20 `limit` \u5C31\u662F\u5168\u91CF\u6E32\u67D3\u3002`PickerOption.keywords` \u662F\u53EF\u9009\u7684\u5355\u4E2A\u5B57\u7B26\u4E32\uFF08\u8C03\u7528\u65B9\u81EA\u5DF1\u62FC\uFF09\uFF0C\u53EA\u548C `label` \u62FC\u8D77\u6765\u53C2\u4E0E\u5927\u5C0F\u5199\u4E0D\u654F\u611F\u5B50\u4E32\u5339\u914D\uFF0C**\u7EDD\u4E0D\u6E32\u67D3**\u2014\u2014\u9002\u5408\u4EFB\u52A1 UUID \u8FD9\u79CD\u300C\u7528\u6237\u80FD\u8D34\u3001\u4F46\u4E0D\u8BE5\u663E\u793A\u300D\u7684\u641C\u7D22\u8BCD\u3002\u7EAF\u903B\u8F91\u53E6\u53EF\u5355\u7528 `sliceGroups`\u3002",
|
|
@@ -64766,10 +64692,10 @@ var docData = {
|
|
|
64766
64692
|
{
|
|
64767
64693
|
"name": "minWidth",
|
|
64768
64694
|
"type": "number | string",
|
|
64769
|
-
"def": "120px\
|
|
64695
|
+
"def": "120px\uFF08\u63A7\u4EF6\u9ED8\u8BA4\uFF09",
|
|
64770
64696
|
"desc": {
|
|
64771
|
-
"zh": "\u6700\u5C0F\u5BBD\uFF1B\u5185\u5BB9\u4E0D\u5230\u6B64\u5BBD\u63A7\u4EF6\
|
|
64772
|
-
"en": "Minimum width; control never narrower than
|
|
64697
|
+
"zh": "\u6700\u5C0F\u5BBD\uFF08\u9ED8\u8BA4\u4E0B\u9650\u7531\u6839\u76D2\u6301\u6709\uFF09\uFF1B\u663E\u5F0F\u7ED9\u7684\u503C\u5C0F\u4E8E\u9ED8\u8BA4\u503C\u4E5F\u751F\u6548\uFF0C\u5185\u5BB9\u4E0D\u5230\u6B64\u5BBD\u63A7\u4EF6\u4E0D\u66F4\u7A84",
|
|
64698
|
+
"en": "Minimum width (the root owns the default lower bound); an explicit value below the default is honoured, and the control never gets narrower than the result"
|
|
64773
64699
|
}
|
|
64774
64700
|
},
|
|
64775
64701
|
{
|
|
@@ -71564,9 +71490,9 @@ function ReferencePage() {
|
|
|
71564
71490
|
"tbody",
|
|
71565
71491
|
null,
|
|
71566
71492
|
[
|
|
71567
|
-
[t3("buildCore"), `v${"0.35.
|
|
71568
|
-
[t3("buildDemo"), `v${"0.35.
|
|
71569
|
-
[t3("buildStamp"), "
|
|
71493
|
+
[t3("buildCore"), `v${"0.35.22"}`],
|
|
71494
|
+
[t3("buildDemo"), `v${"0.35.22"}`],
|
|
71495
|
+
[t3("buildStamp"), "261111-055540-723"]
|
|
71570
71496
|
].map(
|
|
71571
71497
|
([label, value]) => (0, import_react99.createElement)(
|
|
71572
71498
|
"tr",
|
|
@@ -71882,9 +71808,9 @@ function DemoPage() {
|
|
|
71882
71808
|
lineHeight: "14px"
|
|
71883
71809
|
}
|
|
71884
71810
|
},
|
|
71885
|
-
(0, import_react101.createElement)("span", null, `core v${"0.35.
|
|
71886
|
-
(0, import_react101.createElement)("span", null, `demo v${"0.35.
|
|
71887
|
-
(0, import_react101.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "
|
|
71811
|
+
(0, import_react101.createElement)("span", null, `core v${"0.35.22"}`),
|
|
71812
|
+
(0, import_react101.createElement)("span", null, `demo v${"0.35.22"}`),
|
|
71813
|
+
(0, import_react101.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261111-055540-723")
|
|
71888
71814
|
)
|
|
71889
71815
|
)
|
|
71890
71816
|
),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-core-demo",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.22",
|
|
4
4
|
"description": "The shared UI foundation for DSH plugins, with a live component preview: design tokens, common controls, workspace browsing and notifications maintained in one place — install it to preview every component in a real host.",
|
|
5
5
|
"icon": "./assets/icon-components.svg",
|
|
6
6
|
"keywords": [
|