@webskill/sdk 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +3 -2
- package/dist/agent.js +3 -1102
- package/dist/browser.d.ts +258 -11
- package/dist/browser.js +758 -46
- package/dist/{catalogComponents-DTcYfpLQ-CcoOaz-Z.js → catalogComponents-BFoqpT1v-CjUBZ3bc.js} +253 -14
- package/dist/{dist-BViUeszk.js → dist-B-cOu08W.js} +526 -76
- package/dist/{dist-1OFC-zax.js → dist-DTHZS2k1.js} +520 -28
- package/dist/dist-qnlI2Iup.js +1280 -0
- package/dist/{eventTypes-s2uwAcLG-Go3l_dUe.js → eventTypes-FllCrX-Z-DNDeHWoG.js} +6 -2
- package/dist/governance.d.ts +7 -3
- package/dist/governance.js +1 -1
- package/dist/{index-DtFdMKBX.d.ts → index-D3mONFHD.d.ts} +220 -7
- package/dist/{index-B0QPLWPZ.d.ts → index-DACk2_XZ.d.ts} +110 -7
- package/dist/{index-BF4E1a9j.d.ts → index-DWbs58LF.d.ts} +227 -14
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/mcp.d.ts +35 -7
- package/dist/mcp.js +88 -21
- package/dist/node.d.ts +3 -3
- package/dist/node.js +52 -2
- package/dist/{openUiLibrary-CIrV--Ad-B8zG_91e.js → openUiLibrary-D5u8oIvx-BLOAQCho.js} +3 -3
- package/dist/processSandboxEntry.js +6 -0
- package/dist/sandboxWorkerEntry.js +6 -0
- package/dist/{skillVersionStore-D-qHk9ZE-DBsYYCWn.d.ts → skillVersionStore-D-qHk9ZE-BcmFLykd.d.ts} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{types-CrRcT-LM-DZAp8sWv.d.ts → types-C26b05fW-CdrRCRDb.d.ts} +20 -4
- package/dist/ui-react.d.ts +2 -2
- package/dist/ui-react.js +28 -10
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +2 -2
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +3 -3
- package/dist/{webskillLitCatalog-BJrphK0y-SGmRXaaO.js → webskillLitCatalog-DME6PBkV-CmYNLlIT.js} +135 -16
- package/package.json +1 -1
package/dist/{catalogComponents-DTcYfpLQ-CcoOaz-Z.js → catalogComponents-BFoqpT1v-CjUBZ3bc.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as __require, i as __reExport, n as __esmMin, o as __toCommonJS, r as __exportAll$2, s as __toESM$1, t as __commonJSMin$1 } from "./rolldown-runtime-BOF7iYI8.js";
|
|
2
2
|
import { h as WebSkillError } from "./dist-Bev6i6Ip.js";
|
|
3
|
-
import {
|
|
3
|
+
import { E as collectScopedValues, H as qualifyFieldName, I as gaugePercent, T as collectFormScopes, _t as mountEchart, bt as resolveSurfaceFormTexts, j as evaluateFieldCondition, mt as chartSpecFromProps, ot as DEFAULT_SURFACE_FORM_TEXTS } from "./dist-DTHZS2k1.js";
|
|
4
4
|
import minpath$1 from "node:path";
|
|
5
5
|
import { fileURLToPath as urlToPath$1 } from "node:url";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -100992,6 +100992,7 @@ function RadioGroup({ options, className = "", invalid = false, orientation, ...
|
|
|
100992
100992
|
className: `flex ${orientation === "horizontal" ? "flex-row flex-wrap gap-4" : "flex-col gap-2"} ${className}`,
|
|
100993
100993
|
children: options.map((option) => {
|
|
100994
100994
|
const itemId = `${instanceId}-${option.value}`;
|
|
100995
|
+
const labelId = `${itemId}-label`;
|
|
100995
100996
|
const descId = option.description !== void 0 ? `${itemId}-desc` : void 0;
|
|
100996
100997
|
return /* @__PURE__ */ jsxs("label", {
|
|
100997
100998
|
htmlFor: itemId,
|
|
@@ -101000,12 +101001,14 @@ function RadioGroup({ options, className = "", invalid = false, orientation, ...
|
|
|
101000
101001
|
id: itemId,
|
|
101001
101002
|
value: option.value,
|
|
101002
101003
|
disabled: option.disabled,
|
|
101004
|
+
"aria-labelledby": labelId,
|
|
101003
101005
|
"aria-describedby": descId,
|
|
101004
101006
|
className: `mt-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded-full border bg-surface shadow-xs outline-none transition-colors disabled:cursor-not-allowed data-[state=checked]:border-primary ${invalid ? "border-destructive focus-visible:ring-destructive/20" : "border-input focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20"}`,
|
|
101005
101007
|
children: /* @__PURE__ */ jsx(RadioGroupIndicator, { className: "size-2 rounded-full bg-primary" })
|
|
101006
101008
|
}), /* @__PURE__ */ jsxs("span", {
|
|
101007
101009
|
className: "min-w-0",
|
|
101008
101010
|
children: [/* @__PURE__ */ jsx("span", {
|
|
101011
|
+
id: labelId,
|
|
101009
101012
|
className: "block",
|
|
101010
101013
|
children: option.label
|
|
101011
101014
|
}), option.description !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
@@ -123564,7 +123567,7 @@ function u(n, o, u) {
|
|
|
123564
123567
|
}
|
|
123565
123568
|
|
|
123566
123569
|
//#endregion
|
|
123567
|
-
//#region ../ui-react/dist/catalogComponents-
|
|
123570
|
+
//#region ../ui-react/dist/catalogComponents-BFoqpT1v.js
|
|
123568
123571
|
/** echarts 挂载点:surface 图表与 catalog 声明树的 Chart 节点共用,实现在 `@webskill/ui`,与 A2UI 档同一份 */
|
|
123569
123572
|
function EChart({ chart }) {
|
|
123570
123573
|
const containerRef = useRef(null);
|
|
@@ -123937,6 +123940,7 @@ function SurfaceField({ form, props, scope, binding }) {
|
|
|
123937
123940
|
};
|
|
123938
123941
|
const errorId = error ? `webskill-surface-${form.surfaceId}-${key}-error` : void 0;
|
|
123939
123942
|
const labelId = `webskill-surface-${form.surfaceId}-${key}-label`;
|
|
123943
|
+
const controlId = `webskill-surface-${form.surfaceId}-${key}`;
|
|
123940
123944
|
const options = Array.isArray(props["options"]) ? props["options"] : [];
|
|
123941
123945
|
const suggestion = props["suggestion"];
|
|
123942
123946
|
const texts = useSurfaceFormTexts();
|
|
@@ -123956,20 +123960,20 @@ function SurfaceField({ form, props, scope, binding }) {
|
|
|
123956
123960
|
if (!binding && !form.isFieldVisible(key)) return null;
|
|
123957
123961
|
const control = () => {
|
|
123958
123962
|
if (type === "textarea") return /* @__PURE__ */ jsx(Textarea, {
|
|
123959
|
-
id:
|
|
123963
|
+
id: controlId,
|
|
123960
123964
|
...anchor,
|
|
123961
123965
|
invalid: Boolean(error),
|
|
123962
123966
|
value: typeof value === "string" ? value : "",
|
|
123963
123967
|
onChange: (event) => setValue(event.target.value)
|
|
123964
123968
|
});
|
|
123965
123969
|
if (type === "toggle") return /* @__PURE__ */ jsx(Switch, {
|
|
123966
|
-
id:
|
|
123970
|
+
id: controlId,
|
|
123967
123971
|
...anchor,
|
|
123968
123972
|
checked: value === true,
|
|
123969
123973
|
onCheckedChange: (next) => setValue(next)
|
|
123970
123974
|
});
|
|
123971
123975
|
if (asRadioGroup) return /* @__PURE__ */ jsx(RadioGroup, {
|
|
123972
|
-
id:
|
|
123976
|
+
id: controlId,
|
|
123973
123977
|
...anchor,
|
|
123974
123978
|
"aria-labelledby": labelId,
|
|
123975
123979
|
invalid: Boolean(error),
|
|
@@ -123987,7 +123991,7 @@ function SurfaceField({ form, props, scope, binding }) {
|
|
|
123987
123991
|
value: String(index)
|
|
123988
123992
|
}));
|
|
123989
123993
|
if (multiple) return /* @__PURE__ */ jsx("select", {
|
|
123990
|
-
id:
|
|
123994
|
+
id: controlId,
|
|
123991
123995
|
...anchor,
|
|
123992
123996
|
multiple: true,
|
|
123993
123997
|
value: Array.isArray(value) ? value.map((item) => optionIndex(options, item)) : [],
|
|
@@ -123998,7 +124002,7 @@ function SurfaceField({ form, props, scope, binding }) {
|
|
|
123998
124002
|
}, option.value))
|
|
123999
124003
|
});
|
|
124000
124004
|
return /* @__PURE__ */ jsx(Select, {
|
|
124001
|
-
id:
|
|
124005
|
+
id: controlId,
|
|
124002
124006
|
...anchor,
|
|
124003
124007
|
options: optionList,
|
|
124004
124008
|
value: optionIndex(options, value),
|
|
@@ -124006,14 +124010,14 @@ function SurfaceField({ form, props, scope, binding }) {
|
|
|
124006
124010
|
});
|
|
124007
124011
|
}
|
|
124008
124012
|
if (type === "file") return /* @__PURE__ */ jsx("input", {
|
|
124009
|
-
id:
|
|
124013
|
+
id: controlId,
|
|
124010
124014
|
...anchor,
|
|
124011
124015
|
type: "file",
|
|
124012
124016
|
className: "w-full cursor-pointer rounded-md border border-input bg-surface px-3 py-2 text-sm text-muted shadow-xs transition-colors outline-none file:mr-3 file:cursor-pointer file:rounded-md file:border-0 file:bg-primary file:px-3 file:py-1 file:text-sm file:font-medium file:text-primary-foreground hover:file:bg-primary/90 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50",
|
|
124013
124017
|
onChange: (event) => setValue(event.target.files?.[0]?.name ?? "")
|
|
124014
124018
|
});
|
|
124015
124019
|
return /* @__PURE__ */ jsx(Input, {
|
|
124016
|
-
id:
|
|
124020
|
+
id: controlId,
|
|
124017
124021
|
...anchor,
|
|
124018
124022
|
invalid: Boolean(error),
|
|
124019
124023
|
type: type === "number" ? "number" : type === "date" ? "date" : type === "password" ? "password" : "text",
|
|
@@ -124027,7 +124031,7 @@ function SurfaceField({ form, props, scope, binding }) {
|
|
|
124027
124031
|
/* @__PURE__ */ jsx(FieldLabel, {
|
|
124028
124032
|
id: labelId,
|
|
124029
124033
|
required,
|
|
124030
|
-
...asRadioGroup ? {} : { htmlFor:
|
|
124034
|
+
...asRadioGroup ? {} : { htmlFor: controlId },
|
|
124031
124035
|
children: label
|
|
124032
124036
|
}),
|
|
124033
124037
|
control(),
|
|
@@ -124188,13 +124192,49 @@ function SpecTabs({ props, children }) {
|
|
|
124188
124192
|
}), panels[index] ?? null]
|
|
124189
124193
|
});
|
|
124190
124194
|
}
|
|
124195
|
+
/** 语义档 → 最小列宽。刻意不收像素值:模型给不准,且会绕开 token 体系 */
|
|
124196
|
+
const MIN_COLUMN_WIDTH = {
|
|
124197
|
+
sm: "12rem",
|
|
124198
|
+
md: "16rem",
|
|
124199
|
+
lg: "22rem"
|
|
124200
|
+
};
|
|
124191
124201
|
function SpecGrid({ props, children }) {
|
|
124202
|
+
if (props["columns"] === "auto") return /* @__PURE__ */ jsx("div", {
|
|
124203
|
+
className: "grid gap-3",
|
|
124204
|
+
"data-webskill-multicol": "",
|
|
124205
|
+
style: { gridTemplateColumns: `repeat(auto-fit, minmax(${MIN_COLUMN_WIDTH[str(props, "minColumnWidth", "md")] ?? MIN_COLUMN_WIDTH["md"]}, 1fr))` },
|
|
124206
|
+
children
|
|
124207
|
+
});
|
|
124192
124208
|
return /* @__PURE__ */ jsx("div", {
|
|
124193
124209
|
className: "grid gap-3",
|
|
124210
|
+
"data-webskill-multicol": "",
|
|
124194
124211
|
style: { gridTemplateColumns: `repeat(${Math.min(4, Math.max(2, num(props, "columns", 2)))}, minmax(0, 1fr))` },
|
|
124195
124212
|
children
|
|
124196
124213
|
});
|
|
124197
124214
|
}
|
|
124215
|
+
const SPLIT_RATIO = {
|
|
124216
|
+
"1:1": "1fr 1fr",
|
|
124217
|
+
"2:1": "2fr 1fr",
|
|
124218
|
+
"3:1": "3fr 1fr",
|
|
124219
|
+
"1:2": "1fr 2fr"
|
|
124220
|
+
};
|
|
124221
|
+
/**
|
|
124222
|
+
* 主次分栏(FR-12.3)。窄容器降级为纵向堆叠——用容器查询而不是视口断点,
|
|
124223
|
+
* 因为 surface 可能被塞进任意宽度的宿主容器里。
|
|
124224
|
+
*/
|
|
124225
|
+
function SpecSplit({ props, children }) {
|
|
124226
|
+
return /* @__PURE__ */ jsx("div", {
|
|
124227
|
+
className: "webskill-spec-split grid gap-3",
|
|
124228
|
+
"data-webskill-multicol": "",
|
|
124229
|
+
style: { "--split-ratio": SPLIT_RATIO[str(props, "ratio", "1:1")] ?? SPLIT_RATIO["1:1"] },
|
|
124230
|
+
children
|
|
124231
|
+
});
|
|
124232
|
+
}
|
|
124233
|
+
/** `Card` 的跨列与内间距(FR-12.4)。`span` 只在 `Grid` 内有意义,别处静默无效 */
|
|
124234
|
+
function cardLayoutProps(props) {
|
|
124235
|
+
const density = str(props, "density", "default");
|
|
124236
|
+
return { className: `${density === "compact" ? "p-2" : density === "comfortable" ? "p-5" : "p-3"} ${num(props, "span", 1) === 2 ? "webskill-spec-card--span2" : ""}`.trim() };
|
|
124237
|
+
}
|
|
124198
124238
|
function SpecTimeline({ props }) {
|
|
124199
124239
|
return /* @__PURE__ */ jsx("ol", {
|
|
124200
124240
|
className: "flex flex-col gap-2 pl-4",
|
|
@@ -124241,6 +124281,189 @@ function SpecProgress({ props }) {
|
|
|
124241
124281
|
});
|
|
124242
124282
|
}
|
|
124243
124283
|
/**
|
|
124284
|
+
* 0.11.0 分册 13 的 8 个新组件。与上面四个同理:四档渲染共用这一份,
|
|
124285
|
+
* 避免同一个 spec 在不同档里长成不同版式(FR-12.5 / AC-G15)。
|
|
124286
|
+
*
|
|
124287
|
+
* `palette` 是**装饰色**,与表状态的 `tone` 语义不重叠;取值是色板名不是颜色值,
|
|
124288
|
+
* 映射到 design token 后深浅色主题自动跟随(AC-13.6)。
|
|
124289
|
+
*/
|
|
124290
|
+
const PALETTE_CLASS = {
|
|
124291
|
+
sky: "webskill-palette-sky",
|
|
124292
|
+
violet: "webskill-palette-violet",
|
|
124293
|
+
amber: "webskill-palette-amber",
|
|
124294
|
+
rose: "webskill-palette-rose",
|
|
124295
|
+
emerald: "webskill-palette-emerald"
|
|
124296
|
+
};
|
|
124297
|
+
function paletteClass(props) {
|
|
124298
|
+
const name = str(props, "palette");
|
|
124299
|
+
return name && PALETTE_CLASS[name] ? PALETTE_CLASS[name] : "";
|
|
124300
|
+
}
|
|
124301
|
+
/** 白名单外的图标名不渲染成图形,降级为可读文本——渲染不出来的方块比没有更糟 */
|
|
124302
|
+
const ICON_GLYPH = {
|
|
124303
|
+
info: "ℹ",
|
|
124304
|
+
check: "✓",
|
|
124305
|
+
alert: "⚠",
|
|
124306
|
+
x: "✕",
|
|
124307
|
+
clock: "◷",
|
|
124308
|
+
calendar: "▤",
|
|
124309
|
+
user: "☺",
|
|
124310
|
+
star: "★",
|
|
124311
|
+
search: "⌕",
|
|
124312
|
+
settings: "⚙",
|
|
124313
|
+
download: "↓",
|
|
124314
|
+
link: "🔗",
|
|
124315
|
+
chart: "▥",
|
|
124316
|
+
file: "▢",
|
|
124317
|
+
folder: "▤",
|
|
124318
|
+
mail: "✉"
|
|
124319
|
+
};
|
|
124320
|
+
function SpecIcon({ props }) {
|
|
124321
|
+
const name = str(props, "name");
|
|
124322
|
+
const glyph = ICON_GLYPH[name];
|
|
124323
|
+
return /* @__PURE__ */ jsx("span", {
|
|
124324
|
+
className: `inline-flex size-4 items-center justify-center text-sm ${paletteClass(props)}`,
|
|
124325
|
+
"data-icon": name,
|
|
124326
|
+
role: "img",
|
|
124327
|
+
"aria-label": name,
|
|
124328
|
+
children: glyph ?? name
|
|
124329
|
+
});
|
|
124330
|
+
}
|
|
124331
|
+
const RATIO_CLASS = {
|
|
124332
|
+
"1:1": "aspect-square",
|
|
124333
|
+
"4:3": "aspect-[4/3]",
|
|
124334
|
+
"16:9": "aspect-video"
|
|
124335
|
+
};
|
|
124336
|
+
function SpecImage({ props }) {
|
|
124337
|
+
const ratio = str(props, "ratio", "auto");
|
|
124338
|
+
return /* @__PURE__ */ jsx("img", {
|
|
124339
|
+
src: str(props, "src"),
|
|
124340
|
+
alt: str(props, "alt"),
|
|
124341
|
+
className: `w-full rounded-md object-cover ${RATIO_CLASS[ratio] ?? ""}`
|
|
124342
|
+
});
|
|
124343
|
+
}
|
|
124344
|
+
function SpecQuote({ props }) {
|
|
124345
|
+
const by = str(props, "by");
|
|
124346
|
+
return /* @__PURE__ */ jsxs("blockquote", {
|
|
124347
|
+
className: "border-l-2 border-border pl-3 text-sm italic text-ink",
|
|
124348
|
+
children: [str(props, "text"), by ? /* @__PURE__ */ jsxs("footer", {
|
|
124349
|
+
className: "mt-1 text-xs not-italic text-muted",
|
|
124350
|
+
children: ["— ", by]
|
|
124351
|
+
}) : null]
|
|
124352
|
+
});
|
|
124353
|
+
}
|
|
124354
|
+
function SpecCallout({ props }) {
|
|
124355
|
+
const title = str(props, "title");
|
|
124356
|
+
return /* @__PURE__ */ jsxs("aside", {
|
|
124357
|
+
className: `rounded-md border border-border bg-subtle p-3 ${paletteClass(props)}`,
|
|
124358
|
+
children: [title ? /* @__PURE__ */ jsx("strong", {
|
|
124359
|
+
className: "block text-sm text-ink",
|
|
124360
|
+
children: title
|
|
124361
|
+
}) : null, /* @__PURE__ */ jsx("p", {
|
|
124362
|
+
className: "text-sm text-ink",
|
|
124363
|
+
children: str(props, "text")
|
|
124364
|
+
})]
|
|
124365
|
+
});
|
|
124366
|
+
}
|
|
124367
|
+
function SpecKeyValue({ props }) {
|
|
124368
|
+
return /* @__PURE__ */ jsx("dl", {
|
|
124369
|
+
className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm",
|
|
124370
|
+
children: list(props["items"]).map((item, index) => /* @__PURE__ */ jsxs("div", {
|
|
124371
|
+
className: "contents",
|
|
124372
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
124373
|
+
className: "text-muted",
|
|
124374
|
+
children: str(item, "label")
|
|
124375
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
124376
|
+
className: "text-ink",
|
|
124377
|
+
children: str(item, "value")
|
|
124378
|
+
})]
|
|
124379
|
+
}, index))
|
|
124380
|
+
});
|
|
124381
|
+
}
|
|
124382
|
+
function SpecGauge({ props }) {
|
|
124383
|
+
const min = num(props, "min", 0);
|
|
124384
|
+
const max = num(props, "max", 100);
|
|
124385
|
+
const value = num(props, "value", min);
|
|
124386
|
+
const percent = gaugePercent(value, min, max);
|
|
124387
|
+
const label = str(props, "label");
|
|
124388
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
124389
|
+
className: "flex flex-col gap-1",
|
|
124390
|
+
"data-tone": str(props, "tone", "neutral"),
|
|
124391
|
+
children: [
|
|
124392
|
+
label ? /* @__PURE__ */ jsx("span", {
|
|
124393
|
+
className: "text-xs text-muted",
|
|
124394
|
+
children: label
|
|
124395
|
+
}) : null,
|
|
124396
|
+
/* @__PURE__ */ jsx("div", {
|
|
124397
|
+
role: "meter",
|
|
124398
|
+
"aria-label": label || "Gauge",
|
|
124399
|
+
"aria-valuenow": value,
|
|
124400
|
+
"aria-valuemin": min,
|
|
124401
|
+
"aria-valuemax": max,
|
|
124402
|
+
className: "h-2 w-full overflow-hidden rounded-full bg-subtle",
|
|
124403
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
124404
|
+
className: "h-full bg-accent",
|
|
124405
|
+
style: { width: `${percent}%` }
|
|
124406
|
+
})
|
|
124407
|
+
}),
|
|
124408
|
+
/* @__PURE__ */ jsx("span", {
|
|
124409
|
+
className: "text-sm font-medium text-ink",
|
|
124410
|
+
children: value
|
|
124411
|
+
})
|
|
124412
|
+
]
|
|
124413
|
+
});
|
|
124414
|
+
}
|
|
124415
|
+
function SpecAccordion({ props }) {
|
|
124416
|
+
return /* @__PURE__ */ jsx("div", {
|
|
124417
|
+
className: "flex flex-col gap-1",
|
|
124418
|
+
children: list(props["items"]).map((item, index) => /* @__PURE__ */ jsxs("details", {
|
|
124419
|
+
className: "rounded-md border border-border px-3 py-2",
|
|
124420
|
+
children: [/* @__PURE__ */ jsx("summary", {
|
|
124421
|
+
className: "cursor-pointer text-sm font-medium text-ink",
|
|
124422
|
+
children: str(item, "title")
|
|
124423
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
124424
|
+
className: "mt-1 text-sm text-ink",
|
|
124425
|
+
children: str(item, "text")
|
|
124426
|
+
})]
|
|
124427
|
+
}, index))
|
|
124428
|
+
});
|
|
124429
|
+
}
|
|
124430
|
+
function SpecCarousel({ props }) {
|
|
124431
|
+
return /* @__PURE__ */ jsx("div", {
|
|
124432
|
+
className: "flex snap-x snap-mandatory gap-3 overflow-x-auto pb-1",
|
|
124433
|
+
role: "group",
|
|
124434
|
+
"aria-label": "Carousel",
|
|
124435
|
+
children: list(props["items"]).map((item, index) => /* @__PURE__ */ jsxs("figure", {
|
|
124436
|
+
className: "w-48 shrink-0 snap-start rounded-md border border-border p-2",
|
|
124437
|
+
children: [
|
|
124438
|
+
item["src"] ? /* @__PURE__ */ jsx("img", {
|
|
124439
|
+
src: str(item, "src"),
|
|
124440
|
+
alt: str(item, "title"),
|
|
124441
|
+
className: "mb-1 w-full rounded object-cover"
|
|
124442
|
+
}) : null,
|
|
124443
|
+
/* @__PURE__ */ jsx("figcaption", {
|
|
124444
|
+
className: "text-sm font-medium text-ink",
|
|
124445
|
+
children: str(item, "title")
|
|
124446
|
+
}),
|
|
124447
|
+
item["text"] ? /* @__PURE__ */ jsx("p", {
|
|
124448
|
+
className: "text-xs text-muted",
|
|
124449
|
+
children: str(item, "text")
|
|
124450
|
+
}) : null
|
|
124451
|
+
]
|
|
124452
|
+
}, index))
|
|
124453
|
+
});
|
|
124454
|
+
}
|
|
124455
|
+
/**
|
|
124456
|
+
* surface 级视觉档(FR-13.4):只认**根节点**上的 `theme`。
|
|
124457
|
+
*
|
|
124458
|
+
* 刻意放在这里而不是渲染器文件里:`catalog-props-declared` 护栏按「最近的
|
|
124459
|
+
* `case 'Name':`」归属 props 读取,写在 switch 之后会被算到最后一个组件头上。
|
|
124460
|
+
* `office` 是缺省档,返回 undefined 让根容器一个属性都不加(AC-13.8 的回归基线)。
|
|
124461
|
+
*/
|
|
124462
|
+
function surfaceThemeOf(node) {
|
|
124463
|
+
const value = node?.props?.["theme"];
|
|
124464
|
+
return typeof value === "string" && value !== "office" ? value : void 0;
|
|
124465
|
+
}
|
|
124466
|
+
/**
|
|
124244
124467
|
* json-render 与 OpenUI 两档的 Renderer 都只把 props 交给组件实现,拿不到节点 id,
|
|
124245
124468
|
* 也拿不到表单状态,因此表单值与动作回传统一走这个 Context。
|
|
124246
124469
|
* 缺省值故意不给空实现:没包 Provider 就是宿主接线错了,必须失败而不是“点了没反应”。
|
|
@@ -124292,7 +124515,10 @@ function CatalogForm({ props, children }) {
|
|
|
124292
124515
|
className: "text-sm font-semibold text-ink",
|
|
124293
124516
|
children: str(props, "title")
|
|
124294
124517
|
}) : null,
|
|
124295
|
-
|
|
124518
|
+
/* @__PURE__ */ jsx("div", {
|
|
124519
|
+
className: "webskill-spec-form__fields",
|
|
124520
|
+
children
|
|
124521
|
+
}),
|
|
124296
124522
|
/* @__PURE__ */ jsx(SurfaceFormButtons, {
|
|
124297
124523
|
form,
|
|
124298
124524
|
props,
|
|
@@ -124366,7 +124592,7 @@ const catalogComponentImpls = {
|
|
|
124366
124592
|
children
|
|
124367
124593
|
}),
|
|
124368
124594
|
Card: ({ props, children }) => /* @__PURE__ */ jsxs("section", {
|
|
124369
|
-
className:
|
|
124595
|
+
className: `webskill-spec-card flex flex-col gap-2 rounded-lg border border-border bg-card ${cardLayoutProps(props).className} ${paletteClass(props)}`,
|
|
124370
124596
|
children: [
|
|
124371
124597
|
/* @__PURE__ */ jsx("h3", {
|
|
124372
124598
|
className: "text-sm font-semibold text-ink",
|
|
@@ -124381,7 +124607,7 @@ const catalogComponentImpls = {
|
|
|
124381
124607
|
}),
|
|
124382
124608
|
Separator: () => /* @__PURE__ */ jsx(Separator, {}),
|
|
124383
124609
|
Heading: ({ props }) => /* @__PURE__ */ jsx("h3", {
|
|
124384
|
-
className:
|
|
124610
|
+
className: `text-sm font-semibold text-ink ${paletteClass(props)}`,
|
|
124385
124611
|
children: str(props, "text")
|
|
124386
124612
|
}),
|
|
124387
124613
|
Text: ({ props }) => /* @__PURE__ */ jsx("p", {
|
|
@@ -124391,6 +124617,7 @@ const catalogComponentImpls = {
|
|
|
124391
124617
|
Markdown: ({ props }) => /* @__PURE__ */ jsx(Markdown, { children: str(props, "text") }),
|
|
124392
124618
|
Badge: ({ props }) => /* @__PURE__ */ jsx(Badge, {
|
|
124393
124619
|
tone: "neutral",
|
|
124620
|
+
className: paletteClass(props),
|
|
124394
124621
|
children: str(props, "text")
|
|
124395
124622
|
}),
|
|
124396
124623
|
Metric: ({ props }) => /* @__PURE__ */ jsxs("div", {
|
|
@@ -124436,7 +124663,19 @@ const catalogComponentImpls = {
|
|
|
124436
124663
|
props,
|
|
124437
124664
|
children
|
|
124438
124665
|
}),
|
|
124666
|
+
Split: ({ props, children }) => /* @__PURE__ */ jsx(SpecSplit, {
|
|
124667
|
+
props,
|
|
124668
|
+
children
|
|
124669
|
+
}),
|
|
124439
124670
|
Timeline: ({ props }) => /* @__PURE__ */ jsx(SpecTimeline, { props }),
|
|
124671
|
+
Icon: ({ props }) => /* @__PURE__ */ jsx(SpecIcon, { props }),
|
|
124672
|
+
Image: ({ props }) => /* @__PURE__ */ jsx(SpecImage, { props }),
|
|
124673
|
+
Quote: ({ props }) => /* @__PURE__ */ jsx(SpecQuote, { props }),
|
|
124674
|
+
Callout: ({ props }) => /* @__PURE__ */ jsx(SpecCallout, { props }),
|
|
124675
|
+
KeyValue: ({ props }) => /* @__PURE__ */ jsx(SpecKeyValue, { props }),
|
|
124676
|
+
Gauge: ({ props }) => /* @__PURE__ */ jsx(SpecGauge, { props }),
|
|
124677
|
+
Accordion: ({ props }) => /* @__PURE__ */ jsx(SpecAccordion, { props }),
|
|
124678
|
+
Carousel: ({ props }) => /* @__PURE__ */ jsx(SpecCarousel, { props }),
|
|
124440
124679
|
Progress: ({ props }) => /* @__PURE__ */ jsx(SpecProgress, { props }),
|
|
124441
124680
|
FileLink: ({ props }) => /* @__PURE__ */ jsx("span", {
|
|
124442
124681
|
className: "text-sm text-ink",
|
|
@@ -124462,4 +124701,4 @@ const catalogComponentImpls = {
|
|
|
124462
124701
|
};
|
|
124463
124702
|
|
|
124464
124703
|
//#endregion
|
|
124465
|
-
export {
|
|
124704
|
+
export { Badge as A, catalogComponentImpls as C, useCatalogSurfaceForm as D, surfaceThemeOf as E, DropdownMenuContent as F, DropdownMenuTrigger as I, Input as L, DataTable as M, DropdownMenu as N, useSurfaceForm as O, DropdownMenuCheckboxItem as P, Markdown as R, cardLayoutProps as S, str as T, SurfaceButton as _, SpecCallout as a, SurfaceFormButtons as b, SpecGrid as c, SpecKeyValue as d, SpecProgress as f, SpecTimeline as g, SpecTabs as h, SpecAccordion as i, Button as j, useSurfaceFormTexts as k, SpecIcon as l, SpecSplit as m, CatalogSurfaceProvider as n, SpecCarousel as o, SpecQuote as p, EChart as r, SpecGauge as s, CatalogNode as t, SpecImage as u, SurfaceField as v, paletteClass as w, SurfaceFormTextsProvider as x, SurfaceFieldArray as y, Separator as z };
|