@webskill/sdk 0.23.0 → 0.24.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 -3
- package/dist/agent.js +33 -10
- package/dist/browser.d.ts +41 -6
- package/dist/browser.js +252 -12
- package/dist/governance.d.ts +3 -3
- package/dist/governance.js +12 -2
- package/dist/{index-V76_OFj2.d.ts → index-B3rMAUWB.d.ts} +49 -10
- package/dist/{index-7No55dRb.d.ts → index-Bq299VnF.d.ts} +1 -1
- package/dist/{index-ShvCB5I9.d.ts → index-mKgZU7cG.d.ts} +62 -5
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/mcp.d.ts +2 -2
- package/dist/node.d.ts +3 -3
- package/dist/{openUiLibrary-B7j3rLrm.js → openUiLibrary-CxtrnX54.js} +1 -1
- package/dist/{openUiSpecLang-BSYYnjay.js → openUiSpecLang-DIcLcybq.js} +148 -13
- package/dist/{skillVersionStore-S4_HJ_Fl-Cvy9LqVu.d.ts → skillVersionStore-S4_HJ_Fl-Ds97pwm5.d.ts} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{types-CpDRZ0rA-BiZBXGm4.d.ts → types-CpDRZ0rA-CFQ-vdKz.d.ts} +4 -0
- package/dist/ui-react.d.ts +11 -4
- package/dist/ui-react.js +48 -6
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +6 -6
- package/dist/{webskillLitCatalog-D5BCiMCU.js → webskillLitCatalog-BPyjYuRT.js} +1 -1
- package/package.json +1 -1
|
@@ -45,6 +45,88 @@ function resolveChartFontSizes(sizes) {
|
|
|
45
45
|
...sizes
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* 颜色回落值的**全仓唯一来源**:逐项照抄 echarts 6 的现行默认
|
|
50
|
+
* (primary `#3c3c41`、secondary/axisLabel `#54555a`、axisSplitLine `#dbdee4`)。
|
|
51
|
+
*
|
|
52
|
+
* 照抄而不是另调一套,是为了让「读不到计算样式」这条路径与 0.24.0 之前逐像素相同。
|
|
53
|
+
*/
|
|
54
|
+
const DEFAULT_CHART_COLORS = {
|
|
55
|
+
title: "#3c3c41",
|
|
56
|
+
axisLabel: "#54555a",
|
|
57
|
+
legend: "#54555a",
|
|
58
|
+
axisLine: "#54555a",
|
|
59
|
+
splitLine: "#dbdee4"
|
|
60
|
+
};
|
|
61
|
+
/** 逐字段兜底:宿主通常只想改其中一两项 */
|
|
62
|
+
function resolveChartColors(colors) {
|
|
63
|
+
return {
|
|
64
|
+
...DEFAULT_CHART_COLORS,
|
|
65
|
+
...colors
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 两个 alpha 不是拍的,是从 echarts 默认反推的:黑字浅底下
|
|
70
|
+
* 0.65 合成 `#595959`(对 `#54555a`)、0.15 合成 `#d9d9d9`(对 `#dbdee4`)。
|
|
71
|
+
* 取这两个值,浅色宿主上的轴线与网格线几乎与以往一样,深色宿主上自动变成同色低透明度。
|
|
72
|
+
*/
|
|
73
|
+
const AXIS_LINE_ALPHA = .65;
|
|
74
|
+
const SPLIT_LINE_ALPHA = .15;
|
|
75
|
+
/** 计算值是 `rgb()` / `rgba()` 时的快路径;认不出返回 undefined,**不猜** */
|
|
76
|
+
function parseRgb(value) {
|
|
77
|
+
if (typeof value !== "string") return void 0;
|
|
78
|
+
const match = /^rgba?\(([^)]+)\)$/.exec(value.trim());
|
|
79
|
+
if (!match) return void 0;
|
|
80
|
+
const parts = match[1].split(/[,\s/]+/).map((part) => part.trim()).filter((part) => part !== "");
|
|
81
|
+
if (parts.length < 3) return void 0;
|
|
82
|
+
const channels = parts.slice(0, 3).map((part) => Number.parseFloat(part));
|
|
83
|
+
if (channels.some((channel) => !Number.isFinite(channel))) return void 0;
|
|
84
|
+
return channels;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 计算值不是 `rgb()` 写法时的慢路径:让浏览器自己画一个像素再读回来。
|
|
88
|
+
*
|
|
89
|
+
* CSSOM 早年确实只吐 `rgb()`,但主题变量现在普遍是 `oklch()`(Tailwind v4 即是),
|
|
90
|
+
* 计算值会**原样保留**那种写法。只认 `rgb()` 的话,暗色主题下整张图会悄悄回落到
|
|
91
|
+
* 浅灰默认色——正是分册 14 要修的「看不清」。
|
|
92
|
+
* 这里不自己写色彩空间换算:换算表抄错一位没人看得出来,而 canvas 用的就是
|
|
93
|
+
* 浏览器那份实现,认得出的颜色它都认得。
|
|
94
|
+
*/
|
|
95
|
+
function probeRgb(container, value) {
|
|
96
|
+
if (typeof value !== "string" || value.trim() === "") return void 0;
|
|
97
|
+
const view = container.ownerDocument?.defaultView;
|
|
98
|
+
if (typeof view?.CSS?.supports === "function" && !view.CSS.supports("color", value)) return void 0;
|
|
99
|
+
const canvas = container.ownerDocument?.createElement("canvas");
|
|
100
|
+
if (!canvas) return void 0;
|
|
101
|
+
canvas.width = 1;
|
|
102
|
+
canvas.height = 1;
|
|
103
|
+
const ctx = canvas.getContext("2d");
|
|
104
|
+
if (!ctx) return void 0;
|
|
105
|
+
ctx.fillStyle = value;
|
|
106
|
+
ctx.fillRect(0, 0, 1, 1);
|
|
107
|
+
const pixel = ctx.getImageData(0, 0, 1, 1).data;
|
|
108
|
+
if (pixel[3] === 0) return void 0;
|
|
109
|
+
return [
|
|
110
|
+
pixel[0],
|
|
111
|
+
pixel[1],
|
|
112
|
+
pixel[2]
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
/** 画布够不到 CSS,所以把容器的计算 `color` 当作这张图的取色依据(需求 14 §2.1) */
|
|
116
|
+
function chartColorsFromContainer(container) {
|
|
117
|
+
const computed = container.ownerDocument?.defaultView?.getComputedStyle(container);
|
|
118
|
+
const rgb = parseRgb(computed?.color) ?? probeRgb(container, computed?.color);
|
|
119
|
+
if (!rgb) return void 0;
|
|
120
|
+
const [r, g, b] = rgb;
|
|
121
|
+
const at = (alpha) => `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
122
|
+
return {
|
|
123
|
+
title: at(1),
|
|
124
|
+
legend: at(1),
|
|
125
|
+
axisLabel: at(1),
|
|
126
|
+
axisLine: at(AXIS_LINE_ALPHA),
|
|
127
|
+
splitLine: at(SPLIT_LINE_ALPHA)
|
|
128
|
+
};
|
|
129
|
+
}
|
|
48
130
|
/** echarts 的图例条目来源:饼图按标签分项,其余按系列名 */
|
|
49
131
|
const legendEntries = (chart) => chart.kind === "pie" ? chart.labels : seriesNames(chart);
|
|
50
132
|
/**
|
|
@@ -68,32 +150,52 @@ const SERIES_SHAPE = {
|
|
|
68
150
|
const FALLBACK_KIND = "bar";
|
|
69
151
|
const fallbackNotice = (kind) => kind === "" ? `Missing chart type; rendered as a ${FALLBACK_KIND} chart.` : `Unsupported chart type "${kind}"; rendered as a ${FALLBACK_KIND} chart.`;
|
|
70
152
|
/** `ChartSpec` → ECharts option:图表类型、数据系列、图例的唯一定义处 */
|
|
71
|
-
function toEchartsOption(chart, fontSizes) {
|
|
153
|
+
function toEchartsOption(chart, fontSizes, colors) {
|
|
72
154
|
const font = resolveChartFontSizes(fontSizes);
|
|
155
|
+
const color = resolveChartColors(colors);
|
|
73
156
|
const known = KINDS.has(chart.kind);
|
|
74
157
|
const shape = SERIES_SHAPE[known ? chart.kind : FALLBACK_KIND];
|
|
75
158
|
const notice = known ? void 0 : fallbackNotice(chart.kind);
|
|
76
159
|
const valueAxis = {
|
|
77
160
|
type: "value",
|
|
78
|
-
axisLabel: {
|
|
161
|
+
axisLabel: {
|
|
162
|
+
fontSize: font.axisLabel,
|
|
163
|
+
color: color.axisLabel
|
|
164
|
+
},
|
|
165
|
+
axisLine: { lineStyle: { color: color.axisLine } },
|
|
166
|
+
splitLine: { lineStyle: { color: color.splitLine } }
|
|
79
167
|
};
|
|
80
168
|
return {
|
|
81
169
|
animation: false,
|
|
82
170
|
title: chart.title || notice ? {
|
|
83
171
|
text: chart.title ?? "",
|
|
84
172
|
left: "center",
|
|
85
|
-
textStyle: {
|
|
86
|
-
|
|
173
|
+
textStyle: {
|
|
174
|
+
fontSize: font.title,
|
|
175
|
+
color: color.title
|
|
176
|
+
},
|
|
177
|
+
...notice ? {
|
|
178
|
+
subtext: notice,
|
|
179
|
+
subtextStyle: { color: color.axisLabel }
|
|
180
|
+
} : {}
|
|
87
181
|
} : void 0,
|
|
88
182
|
tooltip: { trigger: chart.kind === "pie" ? "item" : "axis" },
|
|
89
183
|
legend: {
|
|
90
184
|
bottom: 0,
|
|
91
|
-
textStyle: {
|
|
185
|
+
textStyle: {
|
|
186
|
+
fontSize: font.legend,
|
|
187
|
+
color: color.legend
|
|
188
|
+
}
|
|
92
189
|
},
|
|
93
190
|
xAxis: chart.kind === "pie" ? void 0 : {
|
|
94
191
|
type: "category",
|
|
95
192
|
data: chart.labels,
|
|
96
|
-
axisLabel: {
|
|
193
|
+
axisLabel: {
|
|
194
|
+
fontSize: font.axisLabel,
|
|
195
|
+
color: color.axisLabel
|
|
196
|
+
},
|
|
197
|
+
axisLine: { lineStyle: { color: color.axisLine } },
|
|
198
|
+
splitLine: { lineStyle: { color: color.splitLine } }
|
|
97
199
|
},
|
|
98
200
|
yAxis: chart.kind === "pie" ? void 0 : chart.kind === "dual-axis" ? [valueAxis, { ...valueAxis }] : valueAxis,
|
|
99
201
|
series: chart.kind === "pie" ? chart.series.map((series) => ({
|
|
@@ -128,6 +230,7 @@ function applyChartDomContract(container, chart) {
|
|
|
128
230
|
*/
|
|
129
231
|
let echartsModule;
|
|
130
232
|
const loadEcharts = () => echartsModule ??= import("./echarts-BE7oV_Dl.js");
|
|
233
|
+
const sameColors = (a, b) => a === b || a !== void 0 && b !== void 0 && a.title === b.title && a.axisLabel === b.axisLabel && a.legend === b.legend && a.axisLine === b.axisLine && a.splitLine === b.splitLine;
|
|
131
234
|
/**
|
|
132
235
|
* 框架无关的 echarts 挂载点:三档的 React 组件与 A2UI 档的 Lit 元素共用同一实现,
|
|
133
236
|
* 图表不再因档位而异。echarts 走动态 import,不打进首屏。
|
|
@@ -137,12 +240,40 @@ function mountEchart(container) {
|
|
|
137
240
|
let instance;
|
|
138
241
|
let queued;
|
|
139
242
|
let observer;
|
|
140
|
-
|
|
141
|
-
|
|
243
|
+
let themeObserver;
|
|
244
|
+
let inherited;
|
|
245
|
+
const apply = (chart, fontSizes, colors) => {
|
|
246
|
+
inherited = chartColorsFromContainer(container);
|
|
247
|
+
const effective = colors ? {
|
|
248
|
+
...inherited,
|
|
249
|
+
...colors
|
|
250
|
+
} : inherited;
|
|
251
|
+
instance?.setOption(toEchartsOption(chart, fontSizes, effective), {
|
|
142
252
|
notMerge: true,
|
|
143
253
|
lazyUpdate: true
|
|
144
254
|
});
|
|
145
255
|
};
|
|
256
|
+
/**
|
|
257
|
+
* 主题切换改的是祖先链上的 class(ThemeScope)或根节点属性(扩展 viewer),
|
|
258
|
+
* 两者都表现为祖先的属性变更。观察一条从容器到 documentElement 的链,
|
|
259
|
+
* 命中就重算一次颜色;颜色没变则什么都不做(避免无谓重绘)。
|
|
260
|
+
*/
|
|
261
|
+
const watchAncestors = () => {
|
|
262
|
+
if (typeof MutationObserver === "undefined") return;
|
|
263
|
+
themeObserver = new MutationObserver(() => {
|
|
264
|
+
if (disposed || queued === void 0) return;
|
|
265
|
+
if (sameColors(chartColorsFromContainer(container), inherited)) return;
|
|
266
|
+
apply(queued.chart, queued.fontSizes, queued.colors);
|
|
267
|
+
});
|
|
268
|
+
for (let node = container; node; node = node.parentElement) themeObserver.observe(node, {
|
|
269
|
+
attributes: true,
|
|
270
|
+
attributeFilter: [
|
|
271
|
+
"class",
|
|
272
|
+
"style",
|
|
273
|
+
"data-theme"
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
};
|
|
146
277
|
loadEcharts().then((echarts) => {
|
|
147
278
|
if (disposed) return;
|
|
148
279
|
instance = echarts.init(container);
|
|
@@ -150,21 +281,25 @@ function mountEchart(container) {
|
|
|
150
281
|
observer = new ResizeObserver(() => instance?.resize());
|
|
151
282
|
observer.observe(container);
|
|
152
283
|
}
|
|
153
|
-
|
|
284
|
+
watchAncestors();
|
|
285
|
+
if (queued) apply(queued.chart, queued.fontSizes, queued.colors);
|
|
154
286
|
});
|
|
155
287
|
return {
|
|
156
|
-
setChart(chart, fontSizes) {
|
|
288
|
+
setChart(chart, fontSizes, colors) {
|
|
157
289
|
applyChartDomContract(container, chart);
|
|
158
290
|
queued = {
|
|
159
291
|
chart,
|
|
160
|
-
...fontSizes ? { fontSizes } : {}
|
|
292
|
+
...fontSizes ? { fontSizes } : {},
|
|
293
|
+
...colors ? { colors } : {}
|
|
161
294
|
};
|
|
162
|
-
apply(chart, fontSizes);
|
|
295
|
+
apply(chart, fontSizes, colors);
|
|
163
296
|
},
|
|
164
297
|
dispose() {
|
|
165
298
|
disposed = true;
|
|
166
299
|
observer?.disconnect();
|
|
167
300
|
observer = void 0;
|
|
301
|
+
themeObserver?.disconnect();
|
|
302
|
+
themeObserver = void 0;
|
|
168
303
|
instance?.dispose();
|
|
169
304
|
instance = void 0;
|
|
170
305
|
}
|
|
@@ -1900,4 +2035,4 @@ function toOpenUiSpecLang(spec, catalog = uiCatalog) {
|
|
|
1900
2035
|
}
|
|
1901
2036
|
|
|
1902
2037
|
//#endregion
|
|
1903
|
-
export {
|
|
2038
|
+
export { DEFAULT_CHART_COLORS as C, resolveChartColors as D, mountEchart as E, resolveChartFontSizes as O, gaugePercent as S, chartSpecFromProps as T, defineUiCatalog as _, SPEC_TABLE_MIN_COLUMN_VAR as a, CATALOG_SCHEMA_MAX as b, resolveColumnWidths as c, collectFormScopes as d, collectScopedValues as f, uiCatalog as g, UI_CATALOG_PROMPT_BUDGET_BYTES as h, normalizeFieldOptions as i, toEchartsOption as k, MAX_CONDITION_DEPTH as l, UI_CATALOG_GROUPS as m, interactionToUiSpec as n, SPEC_TABLE_MIN_COLUMN_WIDTH as o, qualifyFieldName as p, toJsonRenderSpec as r, normalizeColumnWidths as s, toOpenUiSpecLang as t, evaluateFieldCondition as u, CATALOG_BUDGET_STAGE as v, DEFAULT_CHART_FONT_SIZES as w, PLANNED_INCREMENT as x, CATALOG_PROMPT_MAX as y };
|
package/dist/{skillVersionStore-S4_HJ_Fl-Cvy9LqVu.d.ts → skillVersionStore-S4_HJ_Fl-Ds97pwm5.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as FileSystemProvider, St as SkillManifest, et as Page, ht as SkillCatalogEntry, tt as PageQuery } from "./types-CpDRZ0rA-
|
|
1
|
+
import { K as FileSystemProvider, St as SkillManifest, et as Page, ht as SkillCatalogEntry, tt as PageQuery } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
2
|
//#region ../governance/dist/skillVersionStore-S4_HJ_Fl.d.ts
|
|
3
3
|
//#region src/types.d.ts
|
|
4
4
|
type CandidateStatus = 'draft' | 'pending-review' | 'approved' | 'published' | 'rejected';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as UiBridge, c as InteractionResponse, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, p as LlmResponse, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, v as MemoryStore } from "./types-CpDRZ0rA-
|
|
1
|
+
import { S as UiBridge, c as InteractionResponse, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, p as LlmResponse, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, v as MemoryStore } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
2
|
import { a as loadGoogleConfigFromEnv, i as loadAnthropicConfigFromEnv, n as LlmEnvConfig, o as loadLlmConfigFromEnv, r as ProviderEnvConfig } from "./env-AK3cSMEA-Dli6QU5E.js";
|
|
3
3
|
//#region ../runtime/dist/testing.d.ts
|
|
4
4
|
//#region src/llm/mockLlmClient.d.ts
|
|
@@ -46,6 +46,10 @@ type WebSkillErrorCode = 'FS_NOT_FOUND' | 'FS_PATH_OUTSIDE_ROOT' | 'SKILL_NOT_FO
|
|
|
46
46
|
'TEMPLATE_ROW_INSERT_RANGE' |
|
|
47
47
|
/** 目标格由模板的公式算出,写值会把它摧毁(FR-42.28) */
|
|
48
48
|
'TEMPLATE_CELL_IS_FORMULA' |
|
|
49
|
+
/** 目标格落在合并区内且不是左上角:写进去 Excel 不显示(0.24.0 FR-17.6) */
|
|
50
|
+
'TEMPLATE_CELL_IS_COVERED' |
|
|
51
|
+
/** 请求了若干格,一条都没写成——那不是部分成功,是整个填错了地方(0.24.0 FR-17.10) */
|
|
52
|
+
'TEMPLATE_FILL_REJECTED' |
|
|
49
53
|
/** 用户拒绝了这次工具调用(0.14.0 分册 20) */
|
|
50
54
|
'TOOL_DENIED';
|
|
51
55
|
/**
|
package/dist/ui-react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as UiSpecActionCapability, D as UiSpecSnapshot, Nt as UiSpecNode, O as UiSurfaceActionRequest, S as UiBridge, T as UiSpecEvent, b as RenderResultRequest, c as InteractionResponse, k as UiSurfaceActionResponse, s as InteractionRequest, w as UiSpecDrafts } from "./types-CpDRZ0rA-
|
|
2
|
-
import { P as DocumentSurfacePort } from "./index-
|
|
3
|
-
import {
|
|
1
|
+
import { C as UiSpecActionCapability, D as UiSpecSnapshot, Nt as UiSpecNode, O as UiSurfaceActionRequest, S as UiBridge, T as UiSpecEvent, b as RenderResultRequest, c as InteractionResponse, k as UiSurfaceActionResponse, s as InteractionRequest, w as UiSpecDrafts } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
|
+
import { P as DocumentSurfacePort } from "./index-Bq299VnF.js";
|
|
3
|
+
import { L as InteractionSpecLabels, X as SurfaceFormTexts, Z as SurfaceHostControlTexts, v as ChartColors, y as ChartFontSizes } from "./index-mKgZU7cG.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import React$1, { ComponentType, ReactNode } from "react";
|
|
6
6
|
import "react/jsx-runtime";
|
|
@@ -555,4 +555,11 @@ declare function ChartFontSizesProvider({ sizes, children }: {
|
|
|
555
555
|
children: ReactNode;
|
|
556
556
|
}): import("react").JSX.Element;
|
|
557
557
|
//#endregion
|
|
558
|
-
|
|
558
|
+
//#region src/components/chartColors.d.ts
|
|
559
|
+
declare function useChartColors(): Partial<ChartColors> | undefined;
|
|
560
|
+
declare function ChartColorsProvider({ colors, children }: {
|
|
561
|
+
colors?: Partial<ChartColors> | undefined;
|
|
562
|
+
children: ReactNode;
|
|
563
|
+
}): import("react").JSX.Element;
|
|
564
|
+
//#endregion
|
|
565
|
+
export { type CatalogNodeProps, ChartColorsProvider, ChartFontSizesProvider, type CustomSurfaceActionEvent, type DroppedSurfaceActionWarning, InteractionForm, type JsonRenderActionDispatch, JsonRenderSpecSurface, type JsonRenderSpecSurfaceProps, NATIVE_SPEC_COMPONENTS, NativeSpecSurface, type NativeSpecSurfaceProps, OpenUiSpecSurface, type OpenUiSpecSurfaceProps, ReactBridgeState, type ReactBridgeStateOptions, type RegisteredSurfaceProps, ResultBlocks, SpecInteractionChannel, type SpecInteractionSession, StreamingText, SurfaceFormTextsProvider, type SurfaceRegistration, SurfaceRegistry, type UiSurfaceActionEvent, UiSurfaceList, type UiSurfaceListProps, UiSurfaceSnapshotList, type UiSurfaceSnapshotListProps, UiSurfaceStore, catalogComponentImpls, createJsonRenderRegistry, probeJsonRenderAvailability, useChartColors, useChartFontSizes, useSurfaceFormTexts, useSurfaceHostControlTexts };
|
package/dist/ui-react.js
CHANGED
|
@@ -2,7 +2,7 @@ import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __
|
|
|
2
2
|
import { n as messageOf, t as WebSkillError } from "./errors-BDZNpC13.js";
|
|
3
3
|
import { n as validateUiSpecEvent, r as validateUiSpecNode } from "./surface-DVGiCmwq.js";
|
|
4
4
|
import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, f as resolveSurfaceFormTexts, i as renderMiniMarkdown, l as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, m as shapeInteractionValue, o as collectValues, p as resolveSurfaceHostControlTexts, r as renderMiniChart, u as interactionToFormModel } from "./miniChart-D0nYMzz8.js";
|
|
5
|
-
import {
|
|
5
|
+
import { E as mountEchart, O as resolveChartFontSizes, S as gaugePercent, T as chartSpecFromProps, c as resolveColumnWidths, d as collectFormScopes, f as collectScopedValues, g as uiCatalog, i as normalizeFieldOptions, n as interactionToUiSpec, p as qualifyFieldName, r as toJsonRenderSpec, s as normalizeColumnWidths, t as toOpenUiSpecLang, u as evaluateFieldCondition, w as DEFAULT_CHART_FONT_SIZES } from "./openUiSpecLang-DIcLcybq.js";
|
|
6
6
|
import minpath from "node:path";
|
|
7
7
|
import { fileURLToPath as urlToPath } from "node:url";
|
|
8
8
|
import { z } from "zod";
|
|
@@ -124766,14 +124766,52 @@ function ChartFontSizesProvider({ sizes, children }) {
|
|
|
124766
124766
|
});
|
|
124767
124767
|
}
|
|
124768
124768
|
|
|
124769
|
+
//#endregion
|
|
124770
|
+
//#region ../ui-react/src/components/chartColors.tsx
|
|
124771
|
+
/**
|
|
124772
|
+
* 画布内取色的注入口(0.24.0 分册 14 FR-14.8)。与 `ChartFontSizesProvider` 同构,
|
|
124773
|
+
* 只有缺省来源不同:字号缺省是常量,颜色缺省是**不注入**——
|
|
124774
|
+
* 那样 `mountEchart` 会去读容器的计算 `color`,图表因此跟着宿主主题走。
|
|
124775
|
+
* 所以这里的 context 缺省值是 `undefined` 而不是 `DEFAULT_CHART_COLORS`:
|
|
124776
|
+
* 填上常量就等于把所有图表钉死在浅色默认上,正是本册要修的毛病。
|
|
124777
|
+
*/
|
|
124778
|
+
const ChartColorsContext = createContext(void 0);
|
|
124779
|
+
function useChartColors() {
|
|
124780
|
+
return useContext(ChartColorsContext);
|
|
124781
|
+
}
|
|
124782
|
+
function ChartColorsProvider({ colors, children }) {
|
|
124783
|
+
const { title, axisLabel, legend, axisLine, splitLine } = colors ?? {};
|
|
124784
|
+
const absent = colors === void 0;
|
|
124785
|
+
const value = useMemo(() => absent ? void 0 : {
|
|
124786
|
+
title,
|
|
124787
|
+
axisLabel,
|
|
124788
|
+
legend,
|
|
124789
|
+
axisLine,
|
|
124790
|
+
splitLine
|
|
124791
|
+
}, [
|
|
124792
|
+
absent,
|
|
124793
|
+
title,
|
|
124794
|
+
axisLabel,
|
|
124795
|
+
legend,
|
|
124796
|
+
axisLine,
|
|
124797
|
+
splitLine
|
|
124798
|
+
]);
|
|
124799
|
+
return /* @__PURE__ */ jsx(ChartColorsContext.Provider, {
|
|
124800
|
+
value,
|
|
124801
|
+
children
|
|
124802
|
+
});
|
|
124803
|
+
}
|
|
124804
|
+
|
|
124769
124805
|
//#endregion
|
|
124770
124806
|
//#region ../ui-react/src/components/EChart.tsx
|
|
124771
124807
|
/** echarts 挂载点:surface 图表与 catalog 声明树的 Chart 节点共用,实现在 `@webskill/ui`,与 A2UI 档同一份 */
|
|
124772
|
-
function EChart({ chart, fontSizes }) {
|
|
124808
|
+
function EChart({ chart, fontSizes, colors }) {
|
|
124773
124809
|
const containerRef = useRef(null);
|
|
124774
124810
|
const handleRef = useRef(void 0);
|
|
124775
124811
|
const inherited = useChartFontSizes();
|
|
124776
124812
|
const effective = fontSizes ?? inherited;
|
|
124813
|
+
const inheritedColors = useChartColors();
|
|
124814
|
+
const effectiveColors = colors ?? inheritedColors;
|
|
124777
124815
|
useEffect(() => {
|
|
124778
124816
|
const container = containerRef.current;
|
|
124779
124817
|
if (!container) return;
|
|
@@ -124785,8 +124823,12 @@ function EChart({ chart, fontSizes }) {
|
|
|
124785
124823
|
};
|
|
124786
124824
|
}, []);
|
|
124787
124825
|
useEffect(() => {
|
|
124788
|
-
handleRef.current?.setChart(chart, effective);
|
|
124789
|
-
}, [
|
|
124826
|
+
handleRef.current?.setChart(chart, effective, effectiveColors);
|
|
124827
|
+
}, [
|
|
124828
|
+
chart,
|
|
124829
|
+
effective,
|
|
124830
|
+
effectiveColors
|
|
124831
|
+
]);
|
|
124790
124832
|
return /* @__PURE__ */ jsx("div", {
|
|
124791
124833
|
className: "webskill-surface__chart",
|
|
124792
124834
|
ref: containerRef
|
|
@@ -135003,7 +135045,7 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
|
|
|
135003
135045
|
const [unavailable, setUnavailable] = useState(false);
|
|
135004
135046
|
useEffect(() => {
|
|
135005
135047
|
let cancelled = false;
|
|
135006
|
-
import("./openUiLibrary-
|
|
135048
|
+
import("./openUiLibrary-CxtrnX54.js").then((loaded) => {
|
|
135007
135049
|
if (!cancelled) setModule(loaded);
|
|
135008
135050
|
}).catch(() => {
|
|
135009
135051
|
if (!cancelled) setUnavailable(true);
|
|
@@ -135042,4 +135084,4 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
|
|
|
135042
135084
|
}
|
|
135043
135085
|
|
|
135044
135086
|
//#endregion
|
|
135045
|
-
export { ChartFontSizesProvider, InteractionForm, JsonRenderSpecSurface, NATIVE_SPEC_COMPONENTS, NativeSpecSurface, OpenUiSpecSurface, ReactBridgeState, ResultBlocks, SpecInteractionChannel, StreamingText, SurfaceFormTextsProvider, SurfaceRegistry, UiSurfaceList, UiSurfaceSnapshotList, UiSurfaceStore, catalogComponentImpls, createJsonRenderRegistry, probeJsonRenderAvailability, CatalogNode as t, useChartFontSizes, useSurfaceFormTexts, useSurfaceHostControlTexts };
|
|
135087
|
+
export { ChartColorsProvider, ChartFontSizesProvider, InteractionForm, JsonRenderSpecSurface, NATIVE_SPEC_COMPONENTS, NativeSpecSurface, OpenUiSpecSurface, ReactBridgeState, ResultBlocks, SpecInteractionChannel, StreamingText, SurfaceFormTextsProvider, SurfaceRegistry, UiSurfaceList, UiSurfaceSnapshotList, UiSurfaceStore, catalogComponentImpls, createJsonRenderRegistry, probeJsonRenderAvailability, CatalogNode as t, useChartColors, useChartFontSizes, useSurfaceFormTexts, useSurfaceHostControlTexts };
|
package/dist/ui-vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as UiBridge, b as RenderResultRequest, c as InteractionResponse, s as InteractionRequest } from "./types-CpDRZ0rA-
|
|
1
|
+
import { S as UiBridge, b as RenderResultRequest, c as InteractionResponse, s as InteractionRequest } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
2
|
import { PropType } from "vue";
|
|
3
3
|
//#region ../ui-vue/dist/index.d.ts
|
|
4
4
|
//#region src/bridgeState.d.ts
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nt as UiSpecNode } from "./types-CpDRZ0rA-
|
|
2
|
-
import { Cr as buildRenderResult } from "./index-
|
|
3
|
-
import { $ as
|
|
4
|
-
export { A2UI_BASIC_CATALOG_ID, A2UI_COMMON_TYPES, A2UI_SPEC_ACTION, A2UI_SPEC_FORM_PATH, A2UI_SURFACE_ACTION, A2UI_VERSION, type A2uiCatalogComponent, type A2uiCatalogDefinition, type A2uiCatalogHandle, type A2uiComponentShape, type A2uiMessage, type A2uiSpecActionEvent, type A2uiSpecMessageOptions, CATALOG_BUDGET_STAGE, CATALOG_PROMPT_MAX, CATALOG_SCHEMA_MAX, CHART_PALETTE, type ChartFontSizes, type CollectedValues, type ColumnWidthsRejection, type ControlModel, DEFAULT_CHART_FONT_SIZES, DEFAULT_INTERACTION_TEXTS, DEFAULT_SURFACE_FORM_TEXTS, DEFAULT_SURFACE_HOST_CONTROL_TEXTS, DESCRIBE_UI_PRESET_TOOL, DOCUMENT_COMPONENTS, type DocumentComponentName, type EchartHandle, type EvaluateFieldConditionOptions, type FieldCondition, type FieldConditionResult, type FieldOption, type FormModel, type InteractionSpecLabels, type InteractionTexts, type JsonRenderSpec, type LoadedOpenUiPeers, MAX_CONDITION_DEPTH, type NormalizedColumnWidths, type OpenUiRendererProps, type OpenUiRuntime, PLANNED_INCREMENT, RENDER_UI_TOOL, SPEC_TABLE_MIN_COLUMN_VAR, SPEC_TABLE_MIN_COLUMN_WIDTH, type SpecColumnMeta, type SurfaceFormTexts, type SurfaceHostControlTexts, UI_CATALOG_GROUPS, UI_CATALOG_PROMPT_BUDGET_BYTES, UI_PRESETS, UI_PRESET_NAMES, type UiActionDef, type UiCatalog, type UiCatalogInput, type UiCatalogPromptOptions, type UiCatalogToolSourceOptions, type UiComponentDef, type UiFormScope, type UiPreset, type UiPresetName, type UiSpecDegradation, type UiSpecDegradationCode, type UiSpecIssue, type UiSpecNode, type UiSpecSanitization, type UiSpecValidation, type UiSurfaceActionDispatch, VERCEL_INTERACTION_TOOL_NAME, VIEWER_COMPONENT_ATTR, VIEWER_FALLBACK_ATTR, VIEWER_PROPS_ATTR, type VercelToolInvocation, VercelUiBridge, type ViewerComponentsHandle, type ViewerComponentsOptions, WEBSKILL_A2UI_CATALOG_ID, WEBSKILL_STYLES_CSS, WEBSKILL_SURFACE_ACTION, WebFormBridge, type ZodRuntime, a2uiComponentSchema, a2uiComponentShapes, applySuggestion, buildA2uiCatalogDefinition, buildRenderResult, chartSpecFromProps, chartToTable, collectFormScopes, collectScopedValues, collectSpecActions, collectValues, createUiCatalogToolSource, defineUiCatalog, ensureStyles, evaluateFieldCondition, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, gaugePercent, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, mountViewerComponents, normalizeColumnWidths, normalizeFieldOptions, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveChartFontSizes, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, resolveSurfaceHostControlTexts, shapeInteractionValue, toA2uiSpecMessages, toA2uiSurfaceAction, toEchartsOption, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
|
|
1
|
+
import { Nt as UiSpecNode } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
|
+
import { Cr as buildRenderResult } from "./index-Bq299VnF.js";
|
|
3
|
+
import { $ as UI_CATALOG_PROMPT_BUDGET_BYTES, $t as mountEchart, A as DocumentComponentName, At as a2uiComponentSchema, B as LoadedOpenUiPeers, Bt as createUiCatalogToolSource, C as DEFAULT_CHART_COLORS, Cn as uiPreset, Ct as ViewerComponentsHandle, D as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, Dt as WEBSKILL_SURFACE_ACTION, E as DEFAULT_SURFACE_FORM_TEXTS, Et as WEBSKILL_STYLES_CSS, F as FieldOption, Ft as chartToTable, G as PLANNED_INCREMENT, Gt as fromA2uiSurfaceAction, H as NormalizedColumnWidths, Ht as ensureStyles, I as FormModel, It as collectFormScopes, J as SPEC_TABLE_MIN_COLUMN_WIDTH, Jt as gaugePercent, K as RENDER_UI_TOOL, Kt as fromUiSurfaceActionDispatch, L as InteractionSpecLabels, Lt as collectScopedValues, M as EvaluateFieldConditionOptions, Mt as applySuggestion, N as FieldCondition, Nt as buildA2uiCatalogDefinition, O as DESCRIBE_UI_PRESET_TOOL, Ot as WebFormBridge, P as FieldConditionResult, Pt as chartSpecFromProps, Q as UI_CATALOG_GROUPS, Qt as loadWebSkillLitCatalog, R as InteractionTexts, Rt as collectSpecActions, S as ControlModel, Sn as uiCatalog, St as VercelUiBridge, T as DEFAULT_INTERACTION_TEXTS, Tt as WEBSKILL_A2UI_CATALOG_ID, U as OpenUiRendererProps, Ut as evaluateFieldCondition, V as MAX_CONDITION_DEPTH, Vt as defineUiCatalog, W as OpenUiRuntime, Wt as fromA2uiSpecAction, X as SurfaceFormTexts, Xt as interactionToUiSpec, Y as SpecColumnMeta, Yt as interactionToFormModel, Z as SurfaceHostControlTexts, Zt as loadOpenUiPeers, _ as CHART_PALETTE, _n as toEchartsOption, _t as VERCEL_INTERACTION_TOOL_NAME, a as A2UI_SURFACE_ACTION, an as renderMiniChart, at as UiCatalogPromptOptions, b as CollectedValues, bn as toUiSurfaceActionDispatch, bt as VIEWER_PROPS_ATTR, c as A2uiCatalogDefinition, cn as resolveChartColors, ct as UiFormScope, d as A2uiMessage, dn as resolveInteractionTexts, dt as UiSpecDegradation, en as mountViewerComponents, et as UI_PRESETS, f as A2uiSpecActionEvent, fn as resolveSurfaceFormTexts, ft as UiSpecDegradationCode, g as CATALOG_SCHEMA_MAX, gn as toA2uiSurfaceAction, gt as UiSurfaceActionDispatch, h as CATALOG_PROMPT_MAX, hn as toA2uiSpecMessages, ht as UiSpecValidation, i as A2UI_SPEC_FORM_PATH, in as renderBlocks, it as UiCatalogInput, j as EchartHandle, jt as a2uiComponentShapes, k as DOCUMENT_COMPONENTS, kt as ZodRuntime, l as A2uiCatalogHandle, ln as resolveChartFontSizes, lt as UiPreset, m as CATALOG_BUDGET_STAGE, mn as shapeInteractionValue, mt as UiSpecSanitization, n as A2UI_COMMON_TYPES, nn as normalizeFieldOptions, nt as UiActionDef, o as A2UI_VERSION, on as renderMiniMarkdown, ot as UiCatalogToolSourceOptions, p as A2uiSpecMessageOptions, pn as resolveSurfaceHostControlTexts, pt as UiSpecIssue, q as SPEC_TABLE_MIN_COLUMN_VAR, qt as fromVercelToolResult, r as A2UI_SPEC_ACTION, rn as qualifyFieldName, rt as UiCatalog, s as A2uiCatalogComponent, sn as renderRenderResult, st as UiComponentDef, t as A2UI_BASIC_CATALOG_ID, tn as normalizeColumnWidths, tt as UI_PRESET_NAMES, u as A2uiComponentShape, un as resolveColumnWidths, ut as UiPresetName, v as ChartColors, vn as toJsonRenderSpec, vt as VIEWER_COMPONENT_ATTR, w as DEFAULT_CHART_FONT_SIZES, wt as ViewerComponentsOptions, x as ColumnWidthsRejection, xn as toVercelToolInvocation, xt as VercelToolInvocation, y as ChartFontSizes, yn as toOpenUiSpecLang, yt as VIEWER_FALLBACK_ATTR, z as JsonRenderSpec, zt as collectValues } from "./index-mKgZU7cG.js";
|
|
4
|
+
export { A2UI_BASIC_CATALOG_ID, A2UI_COMMON_TYPES, A2UI_SPEC_ACTION, A2UI_SPEC_FORM_PATH, A2UI_SURFACE_ACTION, A2UI_VERSION, type A2uiCatalogComponent, type A2uiCatalogDefinition, type A2uiCatalogHandle, type A2uiComponentShape, type A2uiMessage, type A2uiSpecActionEvent, type A2uiSpecMessageOptions, CATALOG_BUDGET_STAGE, CATALOG_PROMPT_MAX, CATALOG_SCHEMA_MAX, CHART_PALETTE, type ChartColors, type ChartFontSizes, type CollectedValues, type ColumnWidthsRejection, type ControlModel, DEFAULT_CHART_COLORS, DEFAULT_CHART_FONT_SIZES, DEFAULT_INTERACTION_TEXTS, DEFAULT_SURFACE_FORM_TEXTS, DEFAULT_SURFACE_HOST_CONTROL_TEXTS, DESCRIBE_UI_PRESET_TOOL, DOCUMENT_COMPONENTS, type DocumentComponentName, type EchartHandle, type EvaluateFieldConditionOptions, type FieldCondition, type FieldConditionResult, type FieldOption, type FormModel, type InteractionSpecLabels, type InteractionTexts, type JsonRenderSpec, type LoadedOpenUiPeers, MAX_CONDITION_DEPTH, type NormalizedColumnWidths, type OpenUiRendererProps, type OpenUiRuntime, PLANNED_INCREMENT, RENDER_UI_TOOL, SPEC_TABLE_MIN_COLUMN_VAR, SPEC_TABLE_MIN_COLUMN_WIDTH, type SpecColumnMeta, type SurfaceFormTexts, type SurfaceHostControlTexts, UI_CATALOG_GROUPS, UI_CATALOG_PROMPT_BUDGET_BYTES, UI_PRESETS, UI_PRESET_NAMES, type UiActionDef, type UiCatalog, type UiCatalogInput, type UiCatalogPromptOptions, type UiCatalogToolSourceOptions, type UiComponentDef, type UiFormScope, type UiPreset, type UiPresetName, type UiSpecDegradation, type UiSpecDegradationCode, type UiSpecIssue, type UiSpecNode, type UiSpecSanitization, type UiSpecValidation, type UiSurfaceActionDispatch, VERCEL_INTERACTION_TOOL_NAME, VIEWER_COMPONENT_ATTR, VIEWER_FALLBACK_ATTR, VIEWER_PROPS_ATTR, type VercelToolInvocation, VercelUiBridge, type ViewerComponentsHandle, type ViewerComponentsOptions, WEBSKILL_A2UI_CATALOG_ID, WEBSKILL_STYLES_CSS, WEBSKILL_SURFACE_ACTION, WebFormBridge, type ZodRuntime, a2uiComponentSchema, a2uiComponentShapes, applySuggestion, buildA2uiCatalogDefinition, buildRenderResult, chartSpecFromProps, chartToTable, collectFormScopes, collectScopedValues, collectSpecActions, collectValues, createUiCatalogToolSource, defineUiCatalog, ensureStyles, evaluateFieldCondition, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, gaugePercent, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, mountViewerComponents, normalizeColumnWidths, normalizeFieldOptions, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveChartColors, resolveChartFontSizes, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, resolveSurfaceHostControlTexts, shapeInteractionValue, toA2uiSpecMessages, toA2uiSurfaceAction, toEchartsOption, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
|
package/dist/ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as WebSkillError } from "./errors-BDZNpC13.js";
|
|
2
2
|
import { t as buildRenderResult } from "./renderResult-D9Q-Vu2x.js";
|
|
3
3
|
import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, d as resolveInteractionTexts, f as resolveSurfaceFormTexts, i as renderMiniMarkdown, l as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, m as shapeInteractionValue, n as chartToTable, o as collectValues, p as resolveSurfaceHostControlTexts, r as renderMiniChart, s as DEFAULT_INTERACTION_TEXTS, t as CHART_PALETTE, u as interactionToFormModel } from "./miniChart-D0nYMzz8.js";
|
|
4
|
-
import { C as
|
|
4
|
+
import { C as DEFAULT_CHART_COLORS, D as resolveChartColors, E as mountEchart, O as resolveChartFontSizes, S as gaugePercent, T as chartSpecFromProps, _ as defineUiCatalog, a as SPEC_TABLE_MIN_COLUMN_VAR, b as CATALOG_SCHEMA_MAX, c as resolveColumnWidths, d as collectFormScopes, f as collectScopedValues, g as uiCatalog, h as UI_CATALOG_PROMPT_BUDGET_BYTES, i as normalizeFieldOptions, k as toEchartsOption, l as MAX_CONDITION_DEPTH, m as UI_CATALOG_GROUPS, n as interactionToUiSpec, o as SPEC_TABLE_MIN_COLUMN_WIDTH, p as qualifyFieldName, r as toJsonRenderSpec, s as normalizeColumnWidths, t as toOpenUiSpecLang, u as evaluateFieldCondition, v as CATALOG_BUDGET_STAGE, w as DEFAULT_CHART_FONT_SIZES, x as PLANNED_INCREMENT, y as CATALOG_PROMPT_MAX } from "./openUiSpecLang-DIcLcybq.js";
|
|
5
5
|
|
|
6
6
|
//#region ../ui/src/web/resultRenderer.ts
|
|
7
7
|
/** RenderBlock → DOM(markdown/json/table/image/file/chart 六种) */
|
|
@@ -126,7 +126,7 @@ function mountViewerComponents(root, options) {
|
|
|
126
126
|
}
|
|
127
127
|
const props = readProps(element, name);
|
|
128
128
|
if (!props) continue;
|
|
129
|
-
const handle = render(element, name, props, options
|
|
129
|
+
const handle = render(element, name, props, options);
|
|
130
130
|
if (handle) handles.push(handle);
|
|
131
131
|
}
|
|
132
132
|
return { dispose: () => {
|
|
@@ -170,13 +170,13 @@ function describeIssue(error) {
|
|
|
170
170
|
const path = issue.path.map(String).join(".");
|
|
171
171
|
return path === "" ? issue.message : `${path} — ${issue.message}`;
|
|
172
172
|
}
|
|
173
|
-
function render(element, name, props,
|
|
173
|
+
function render(element, name, props, options) {
|
|
174
174
|
const doc = element.ownerDocument;
|
|
175
175
|
element.replaceChildren();
|
|
176
176
|
switch (name) {
|
|
177
177
|
case "Chart": {
|
|
178
178
|
const handle = mountEchart(element);
|
|
179
|
-
handle.setChart(chartSpecFromProps(props), fontSizes);
|
|
179
|
+
handle.setChart(chartSpecFromProps(props), options?.fontSizes, options?.colors);
|
|
180
180
|
return handle;
|
|
181
181
|
}
|
|
182
182
|
case "Table":
|
|
@@ -1234,7 +1234,7 @@ function fromA2uiSpecAction(event) {
|
|
|
1234
1234
|
*/
|
|
1235
1235
|
async function loadWebSkillLitCatalog() {
|
|
1236
1236
|
try {
|
|
1237
|
-
const { webskillLitCatalog } = await import("./webskillLitCatalog-
|
|
1237
|
+
const { webskillLitCatalog } = await import("./webskillLitCatalog-BPyjYuRT.js");
|
|
1238
1238
|
return webskillLitCatalog();
|
|
1239
1239
|
} catch (cause) {
|
|
1240
1240
|
throw new WebSkillError("UI_UNAVAILABLE", "The WebSkill A2UI catalog is unavailable; install @a2ui/lit, @a2ui/web_core and lit to render catalog surfaces with A2UI", cause);
|
|
@@ -1262,4 +1262,4 @@ async function loadOpenUiPeers() {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
|
|
1264
1264
|
//#endregion
|
|
1265
|
-
export { A2UI_BASIC_CATALOG_ID, A2UI_COMMON_TYPES, A2UI_SPEC_ACTION, A2UI_SPEC_FORM_PATH, A2UI_SURFACE_ACTION, A2UI_VERSION, CATALOG_BUDGET_STAGE, CATALOG_PROMPT_MAX, CATALOG_SCHEMA_MAX, CHART_PALETTE, DEFAULT_CHART_FONT_SIZES, DEFAULT_INTERACTION_TEXTS, DEFAULT_SURFACE_FORM_TEXTS, DEFAULT_SURFACE_HOST_CONTROL_TEXTS, DESCRIBE_UI_PRESET_TOOL, DOCUMENT_COMPONENTS, MAX_CONDITION_DEPTH, PLANNED_INCREMENT, RENDER_UI_TOOL, SPEC_TABLE_MIN_COLUMN_VAR, SPEC_TABLE_MIN_COLUMN_WIDTH, UI_CATALOG_GROUPS, UI_CATALOG_PROMPT_BUDGET_BYTES, UI_PRESETS, UI_PRESET_NAMES, VERCEL_INTERACTION_TOOL_NAME, VIEWER_COMPONENT_ATTR, VIEWER_FALLBACK_ATTR, VIEWER_PROPS_ATTR, VercelUiBridge, WEBSKILL_A2UI_CATALOG_ID, WEBSKILL_STYLES_CSS, WEBSKILL_SURFACE_ACTION, WebFormBridge, a2uiComponentSchema, a2uiComponentShapes, applySuggestion, buildA2uiCatalogDefinition, buildRenderResult, chartSpecFromProps, chartToTable, collectFormScopes, collectScopedValues, collectSpecActions, collectValues, createUiCatalogToolSource, defineUiCatalog, ensureStyles, evaluateFieldCondition, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, gaugePercent, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, mountViewerComponents, normalizeColumnWidths, normalizeFieldOptions, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveChartFontSizes, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, resolveSurfaceHostControlTexts, shapeInteractionValue, A2UI_CHILDREN_PROP as t, toA2uiSpecMessages, toA2uiSurfaceAction, toEchartsOption, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
|
|
1265
|
+
export { A2UI_BASIC_CATALOG_ID, A2UI_COMMON_TYPES, A2UI_SPEC_ACTION, A2UI_SPEC_FORM_PATH, A2UI_SURFACE_ACTION, A2UI_VERSION, CATALOG_BUDGET_STAGE, CATALOG_PROMPT_MAX, CATALOG_SCHEMA_MAX, CHART_PALETTE, DEFAULT_CHART_COLORS, DEFAULT_CHART_FONT_SIZES, DEFAULT_INTERACTION_TEXTS, DEFAULT_SURFACE_FORM_TEXTS, DEFAULT_SURFACE_HOST_CONTROL_TEXTS, DESCRIBE_UI_PRESET_TOOL, DOCUMENT_COMPONENTS, MAX_CONDITION_DEPTH, PLANNED_INCREMENT, RENDER_UI_TOOL, SPEC_TABLE_MIN_COLUMN_VAR, SPEC_TABLE_MIN_COLUMN_WIDTH, UI_CATALOG_GROUPS, UI_CATALOG_PROMPT_BUDGET_BYTES, UI_PRESETS, UI_PRESET_NAMES, VERCEL_INTERACTION_TOOL_NAME, VIEWER_COMPONENT_ATTR, VIEWER_FALLBACK_ATTR, VIEWER_PROPS_ATTR, VercelUiBridge, WEBSKILL_A2UI_CATALOG_ID, WEBSKILL_STYLES_CSS, WEBSKILL_SURFACE_ACTION, WebFormBridge, a2uiComponentSchema, a2uiComponentShapes, applySuggestion, buildA2uiCatalogDefinition, buildRenderResult, chartSpecFromProps, chartToTable, collectFormScopes, collectScopedValues, collectSpecActions, collectValues, createUiCatalogToolSource, defineUiCatalog, ensureStyles, evaluateFieldCondition, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, gaugePercent, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, mountViewerComponents, normalizeColumnWidths, normalizeFieldOptions, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveChartColors, resolveChartFontSizes, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, resolveSurfaceHostControlTexts, shapeInteractionValue, A2UI_CHILDREN_PROP as t, toA2uiSpecMessages, toA2uiSurfaceAction, toEchartsOption, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown } from "./miniChart-D0nYMzz8.js";
|
|
2
|
-
import {
|
|
2
|
+
import { E as mountEchart, T as chartSpecFromProps, g as uiCatalog, i as normalizeFieldOptions } from "./openUiSpecLang-DIcLcybq.js";
|
|
3
3
|
import { WEBSKILL_A2UI_CATALOG_ID, a2uiComponentShapes, t as A2UI_CHILDREN_PROP } from "./ui.js";
|
|
4
4
|
import { A2uiController, A2uiLitElement } from "@a2ui/lit/v0_9";
|
|
5
5
|
import { Catalog } from "@a2ui/web_core/v0_9";
|