@webskill/sdk 0.27.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +3 -3
- package/dist/agent.js +912 -120
- package/dist/{approval-BSwffz8P.js → approval-5BmspsRi.js} +1 -1
- package/dist/browser.d.ts +7 -7
- package/dist/browser.js +415 -49
- package/dist/governance.d.ts +3 -3
- package/dist/{index-QKiMepxO.d.ts → index-CkauSvus.d.ts} +103 -6
- package/dist/{index-C8-9-8zo.d.ts → index-DJeYqzlE.d.ts} +41 -13
- package/dist/{index-D6eSrEi5.d.ts → index-DU8sKyQq.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -4
- package/dist/mcp.d.ts +2 -2
- package/dist/{miniChart-D0nYMzz8.js → miniChart-k95Dpy0q.js} +82 -4
- package/dist/node.d.ts +4 -3
- package/dist/node.js +18 -1
- package/dist/{openUiLibrary-CxtrnX54.js → openUiLibrary-BnhYUlqY.js} +1 -1
- package/dist/{openUiSpecLang-DIcLcybq.js → openUiSpecLang-C8qNOxzA.js} +432 -19
- package/dist/{renderResult-D9Q-Vu2x.js → renderResult-2v3WQzs_.js} +5 -2
- package/dist/{skillVersionStore-S4_HJ_Fl-Ds97pwm5.d.ts → skillVersionStore-S4_HJ_Fl-DzZM_UIw.d.ts} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{types-CpDRZ0rA-CFQ-vdKz.d.ts → types-wKp3YBSM-167azx1H.d.ts} +6 -2
- package/dist/ui-react.d.ts +3 -3
- package/dist/ui-react.js +39 -3
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +1 -1
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +13 -7
- package/dist/{webSkillApi-C_7CTwtB.js → webSkillApi-rX2e3SVB.js} +1 -1
- package/dist/{webskillLitCatalog-BPyjYuRT.js → webskillLitCatalog-MfiLE5aq.js} +41 -2
- package/package.json +2 -1
package/dist/ui-react.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-BHkdefai.js";
|
|
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
|
-
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-
|
|
5
|
-
import { E as
|
|
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-k95Dpy0q.js";
|
|
5
|
+
import { E as echartOptionFromProps, F as resolveChartFontSizes, M as chartSpecFromProps, N as mountEchart, S as gaugePercent, c as resolveColumnWidths, d as collectFormScopes, f as collectScopedValues, g as uiCatalog, i as normalizeFieldOptions, j as DEFAULT_CHART_FONT_SIZES, n as interactionToUiSpec, p as qualifyFieldName, r as toJsonRenderSpec, s as normalizeColumnWidths, t as toOpenUiSpecLang, u as evaluateFieldCondition, w as mountEchartOption } from "./openUiSpecLang-C8qNOxzA.js";
|
|
6
6
|
import minpath from "node:path";
|
|
7
7
|
import { fileURLToPath as urlToPath } from "node:url";
|
|
8
8
|
import { z } from "zod";
|
|
@@ -124835,6 +124835,40 @@ function EChart({ chart, fontSizes, colors }) {
|
|
|
124835
124835
|
});
|
|
124836
124836
|
}
|
|
124837
124837
|
|
|
124838
|
+
//#endregion
|
|
124839
|
+
//#region ../ui-react/src/components/EChartOption.tsx
|
|
124840
|
+
function EChartOption({ spec }) {
|
|
124841
|
+
const containerRef = useRef(null);
|
|
124842
|
+
const handleRef = useRef(void 0);
|
|
124843
|
+
const inherited = useChartFontSizes();
|
|
124844
|
+
const fontSizes = spec["fontSizes"] ?? inherited;
|
|
124845
|
+
const inheritedColors = useChartColors();
|
|
124846
|
+
const colors = spec["colors"] ?? inheritedColors;
|
|
124847
|
+
const { option, fallback } = echartOptionFromProps(spec);
|
|
124848
|
+
useEffect(() => {
|
|
124849
|
+
const container = containerRef.current;
|
|
124850
|
+
if (!container) return;
|
|
124851
|
+
const handle = mountEchartOption(container);
|
|
124852
|
+
handleRef.current = handle;
|
|
124853
|
+
return () => {
|
|
124854
|
+
handle.dispose();
|
|
124855
|
+
handleRef.current = void 0;
|
|
124856
|
+
};
|
|
124857
|
+
}, []);
|
|
124858
|
+
useEffect(() => {
|
|
124859
|
+
handleRef.current?.setOption(option, fontSizes, colors, fallback);
|
|
124860
|
+
}, [
|
|
124861
|
+
option,
|
|
124862
|
+
fontSizes,
|
|
124863
|
+
colors,
|
|
124864
|
+
fallback
|
|
124865
|
+
]);
|
|
124866
|
+
return /* @__PURE__ */ jsx("div", {
|
|
124867
|
+
className: "webskill-surface__chart",
|
|
124868
|
+
ref: containerRef
|
|
124869
|
+
});
|
|
124870
|
+
}
|
|
124871
|
+
|
|
124838
124872
|
//#endregion
|
|
124839
124873
|
//#region ../../node_modules/.pnpm/@tanstack+table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.mjs
|
|
124840
124874
|
/**
|
|
@@ -131846,6 +131880,7 @@ function renderNode(node, context, key, scope) {
|
|
|
131846
131880
|
}, key);
|
|
131847
131881
|
}
|
|
131848
131882
|
case "Chart": return /* @__PURE__ */ jsx(EChart, { chart: chartSpecFromProps(props) }, key);
|
|
131883
|
+
case "EChart": return /* @__PURE__ */ jsx(EChartOption, { spec: props }, key);
|
|
131849
131884
|
case "Tabs": return /* @__PURE__ */ jsx(SpecTabs, {
|
|
131850
131885
|
props,
|
|
131851
131886
|
children
|
|
@@ -132298,6 +132333,7 @@ const catalogComponentImpls = {
|
|
|
132298
132333
|
});
|
|
132299
132334
|
},
|
|
132300
132335
|
Chart: ({ props }) => /* @__PURE__ */ jsx(EChart, { chart: chartSpecFromProps(props) }),
|
|
132336
|
+
EChart: ({ props }) => /* @__PURE__ */ jsx(EChartOption, { spec: props }),
|
|
132301
132337
|
Tabs: ({ props, children }) => /* @__PURE__ */ jsx(SpecTabs, {
|
|
132302
132338
|
props,
|
|
132303
132339
|
children
|
|
@@ -135045,7 +135081,7 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
|
|
|
135045
135081
|
const [unavailable, setUnavailable] = useState(false);
|
|
135046
135082
|
useEffect(() => {
|
|
135047
135083
|
let cancelled = false;
|
|
135048
|
-
import("./openUiLibrary-
|
|
135084
|
+
import("./openUiLibrary-BnhYUlqY.js").then((loaded) => {
|
|
135049
135085
|
if (!cancelled) setModule(loaded);
|
|
135050
135086
|
}).catch(() => {
|
|
135051
135087
|
if (!cancelled) setUnavailable(true);
|
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-
|
|
1
|
+
import { S as UiBridge, b as RenderResultRequest, c as InteractionResponse, s as InteractionRequest } from "./types-wKp3YBSM-167azx1H.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-vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown, m as shapeInteractionValue, o as collectValues, r as renderMiniChart, u as interactionToFormModel } from "./miniChart-
|
|
1
|
+
import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown, m as shapeInteractionValue, o as collectValues, r as renderMiniChart, u as interactionToFormModel } from "./miniChart-k95Dpy0q.js";
|
|
2
2
|
import { defineComponent, h, reactive, ref } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region ../ui-vue/src/bridgeState.ts
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nt as UiSpecNode } from "./types-
|
|
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 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 };
|
|
1
|
+
import { Nt as UiSpecNode } from "./types-wKp3YBSM-167azx1H.js";
|
|
2
|
+
import { Cr as buildRenderResult } from "./index-DU8sKyQq.js";
|
|
3
|
+
import { $ as SPEC_TABLE_MIN_COLUMN_WIDTH, $t as fromA2uiSpecAction, A as DocumentComponentName, An as toJsonRenderSpec, At as ViewerComponentsOptions, B as FieldOption, Bt as buildA2uiCatalogDefinition, C as DEFAULT_CHART_COLORS, Cn as resolveSurfaceFormTexts, Ct as VERCEL_INTERACTION_TOOL_NAME, D as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, Dn as toA2uiSpecMessages, Dt as VercelToolInvocation, E as DEFAULT_SURFACE_FORM_TEXTS, En as shapeInteractionValue, Et as VIEWER_PROPS_ATTR, F as EchartOptionDegradation, Fn as uiPreset, Ft as ZodRuntime, G as LoadedOpenUiPeers, Gt as collectScopedValues, H as InteractionSpecLabels, Ht as chartSpecFromProps, I as EchartOptionHandle, It as a2uiComponentSchema, J as OpenUiRendererProps, Jt as createUiCatalogToolSource, K as MAX_CONDITION_DEPTH, Kt as collectSpecActions, L as EvaluateFieldConditionOptions, Lt as a2uiComponentShapes, M as EchartFallback, Mn as toUiSurfaceActionDispatch, Mt as WEBSKILL_STYLES_CSS, N as EchartHandle, Nn as toVercelToolInvocation, Nt as WEBSKILL_SURFACE_ACTION, O as DESCRIBE_UI_PRESET_TOOL, On as toA2uiSurfaceAction, Ot as VercelUiBridge, P as EchartOption, Pn as uiCatalog, Pt as WebFormBridge, Q as SPEC_TABLE_MIN_COLUMN_VAR, Qt as evaluateFieldCondition, R as FieldCondition, Rt as applyEchartTheme, S as ControlModel, Sn as resolveInteractionTexts, St as UiSurfaceActionDispatch, T as DEFAULT_INTERACTION_TEXTS, Tn as sanitizeEchartOption, Tt as VIEWER_FALLBACK_ATTR, U as InteractionTexts, Ut as chartToTable, V as FormModel, Vt as chartSpecFromEchartsOption, W as JsonRenderSpec, Wt as collectFormScopes, X as PLANNED_INCREMENT, Xt as echartOptionFromProps, Y as OpenUiRuntime, Yt as defineUiCatalog, Z as RENDER_UI_TOOL, Zt as ensureStyles, _ as CHART_PALETTE, _n as renderMiniMarkdown, _t as UiSpecDegradation, a as A2UI_SURFACE_ACTION, an as interactionToUiSpec, at as UI_CATALOG_PROMPT_BUDGET_BYTES, b as CollectedValues, bn as resolveChartFontSizes, bt as UiSpecSanitization, c as A2uiCatalogDefinition, cn as mountEchart, ct as UiActionDef, d as A2uiMessage, dn as normalizeColumnWidths, dt as UiCatalogPromptOptions, en as fromA2uiSurfaceAction, et as SanitizedEchartOption, f as A2uiSpecActionEvent, fn as normalizeFieldOptions, ft as UiCatalogToolSourceOptions, g as CATALOG_SCHEMA_MAX, gn as renderMiniChart, gt as UiPresetName, h as CATALOG_PROMPT_MAX, hn as renderEchartFallback, ht as UiPreset, i as A2UI_SPEC_FORM_PATH, in as interactionToFormModel, it as UI_CATALOG_GROUPS, j as ECHART_SERIES_TYPES, jn as toOpenUiSpecLang, jt as WEBSKILL_A2UI_CATALOG_ID, k as DOCUMENT_COMPONENTS, kn as toEchartsOption, kt as ViewerComponentsHandle, l as A2uiCatalogHandle, ln as mountEchartOption, lt as UiCatalog, m as CATALOG_BUDGET_STAGE, mn as renderBlocks, mt as UiFormScope, n as A2UI_COMMON_TYPES, nn as fromVercelToolResult, nt as SurfaceFormTexts, o as A2UI_VERSION, on as loadOpenUiPeers, ot as UI_PRESETS, p as A2uiSpecMessageOptions, pn as qualifyFieldName, pt as UiComponentDef, q as NormalizedColumnWidths, qt as collectValues, r as A2UI_SPEC_ACTION, rn as gaugePercent, rt as SurfaceHostControlTexts, s as A2uiCatalogComponent, sn as loadWebSkillLitCatalog, st as UI_PRESET_NAMES, t as A2UI_BASIC_CATALOG_ID, tn as fromUiSurfaceActionDispatch, tt as SpecColumnMeta, u as A2uiComponentShape, un as mountViewerComponents, ut as UiCatalogInput, v as ChartColors, vn as renderRenderResult, vt as UiSpecDegradationCode, w as DEFAULT_CHART_FONT_SIZES, wn as resolveSurfaceHostControlTexts, wt as VIEWER_COMPONENT_ATTR, x as ColumnWidthsRejection, xn as resolveColumnWidths, xt as UiSpecValidation, y as ChartFontSizes, yn as resolveChartColors, yt as UiSpecIssue, z as FieldConditionResult, zt as applySuggestion } from "./index-DJeYqzlE.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, ECHART_SERIES_TYPES, type EchartFallback, type EchartHandle, type EchartOption, type EchartOptionDegradation, type EchartOptionHandle, 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 SanitizedEchartOption, 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, applyEchartTheme, applySuggestion, buildA2uiCatalogDefinition, buildRenderResult, chartSpecFromEchartsOption, chartSpecFromProps, chartToTable, collectFormScopes, collectScopedValues, collectSpecActions, collectValues, createUiCatalogToolSource, defineUiCatalog, echartOptionFromProps, ensureStyles, evaluateFieldCondition, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, gaugePercent, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, mountEchartOption, mountViewerComponents, normalizeColumnWidths, normalizeFieldOptions, qualifyFieldName, renderBlocks, renderEchartFallback, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveChartColors, resolveChartFontSizes, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, resolveSurfaceHostControlTexts, sanitizeEchartOption, 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
|
-
import { t as buildRenderResult } from "./renderResult-
|
|
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-
|
|
4
|
-
import {
|
|
2
|
+
import { t as buildRenderResult } from "./renderResult-2v3WQzs_.js";
|
|
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-k95Dpy0q.js";
|
|
4
|
+
import { A as DEFAULT_CHART_COLORS, C as applyEchartTheme, D as sanitizeEchartOption, E as echartOptionFromProps, F as resolveChartFontSizes, I as toEchartsOption, M as chartSpecFromProps, N as mountEchart, O as chartSpecFromEchartsOption, P as resolveChartColors, S as gaugePercent, T as ECHART_SERIES_TYPES, _ 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, j as DEFAULT_CHART_FONT_SIZES, k as renderEchartFallback, 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 mountEchartOption, x as PLANNED_INCREMENT, y as CATALOG_PROMPT_MAX } from "./openUiSpecLang-C8qNOxzA.js";
|
|
5
5
|
|
|
6
6
|
//#region ../ui/src/web/resultRenderer.ts
|
|
7
7
|
/** RenderBlock → DOM(markdown/json/table/image/file/chart 六种) */
|
|
@@ -104,6 +104,7 @@ const VIEWER_FALLBACK_ATTR = "data-webskill-fallback";
|
|
|
104
104
|
/** 文档面可用的组件白名单(FR-19.3)。字面量数组——不接受任何按名动态加载 */
|
|
105
105
|
const DOCUMENT_COMPONENTS = [
|
|
106
106
|
"Chart",
|
|
107
|
+
"EChart",
|
|
107
108
|
"Table",
|
|
108
109
|
"Metric",
|
|
109
110
|
"Gauge",
|
|
@@ -179,6 +180,11 @@ function render(element, name, props, options) {
|
|
|
179
180
|
handle.setChart(chartSpecFromProps(props), options?.fontSizes, options?.colors);
|
|
180
181
|
return handle;
|
|
181
182
|
}
|
|
183
|
+
case "EChart": {
|
|
184
|
+
const handle = mountEchartOption(element);
|
|
185
|
+
handle.setOption(props["option"] ?? {}, options?.fontSizes, options?.colors, props["fallback"] === "table" ? "table" : "auto");
|
|
186
|
+
return handle;
|
|
187
|
+
}
|
|
182
188
|
case "Table":
|
|
183
189
|
renderBlocks(element, [{
|
|
184
190
|
type: "table",
|
|
@@ -504,8 +510,8 @@ const charts = {
|
|
|
504
510
|
summary: "One question, one chart, with the takeaway spelled out above it.",
|
|
505
511
|
guidance: [
|
|
506
512
|
"Layout: `Card` → `Heading` (the takeaway, not \"Chart\") → `Chart` → optional `Text` for the caveat.",
|
|
507
|
-
"Pick the chart type from the question: `line` / `area` for time, `bar` for comparison, `pie` for shares.",
|
|
508
|
-
"Every series needs a name; labels and values must be the same length.",
|
|
513
|
+
"Pick the chart type from the question: `line` / `area` for time, `bar` for comparison, `pie` for shares. For a bar-and-line overlay, use `bar-line` and set each series `type` explicitly (`bar` or `line`).",
|
|
514
|
+
"Every series needs a name; labels and values must be the same length. For mixed series types, multiple axes or rich labels, use `EChart` with a declarative `option` and no functions or event handlers.",
|
|
509
515
|
"Never repeat the same numbers in a `Table` right under the chart."
|
|
510
516
|
].join("\n"),
|
|
511
517
|
example: {
|
|
@@ -1234,7 +1240,7 @@ function fromA2uiSpecAction(event) {
|
|
|
1234
1240
|
*/
|
|
1235
1241
|
async function loadWebSkillLitCatalog() {
|
|
1236
1242
|
try {
|
|
1237
|
-
const { webskillLitCatalog } = await import("./webskillLitCatalog-
|
|
1243
|
+
const { webskillLitCatalog } = await import("./webskillLitCatalog-MfiLE5aq.js");
|
|
1238
1244
|
return webskillLitCatalog();
|
|
1239
1245
|
} catch (cause) {
|
|
1240
1246
|
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 +1268,4 @@ async function loadOpenUiPeers() {
|
|
|
1262
1268
|
}
|
|
1263
1269
|
|
|
1264
1270
|
//#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_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 };
|
|
1271
|
+
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, ECHART_SERIES_TYPES, 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, applyEchartTheme, applySuggestion, buildA2uiCatalogDefinition, buildRenderResult, chartSpecFromEchartsOption, chartSpecFromProps, chartToTable, collectFormScopes, collectScopedValues, collectSpecActions, collectValues, createUiCatalogToolSource, defineUiCatalog, echartOptionFromProps, ensureStyles, evaluateFieldCondition, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, gaugePercent, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, mountEchartOption, mountViewerComponents, normalizeColumnWidths, normalizeFieldOptions, qualifyFieldName, renderBlocks, renderEchartFallback, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveChartColors, resolveChartFontSizes, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, resolveSurfaceHostControlTexts, sanitizeEchartOption, shapeInteractionValue, A2UI_CHILDREN_PROP as t, toA2uiSpecMessages, toA2uiSurfaceAction, toEchartsOption, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as WebSkillError } from "./errors-BDZNpC13.js";
|
|
2
2
|
import { b as parseSkillMarkdown, i as buildCatalog, n as SkillDiscovery, t as validateSkills } from "./skill-WSUDp6A1.js";
|
|
3
|
-
import { f as WebSkillRuntime } from "./approval-
|
|
3
|
+
import { f as WebSkillRuntime } from "./approval-5BmspsRi.js";
|
|
4
4
|
|
|
5
5
|
//#region ../runtime/src/facade/webSkillApi.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown } from "./miniChart-
|
|
2
|
-
import {
|
|
1
|
+
import { c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown } from "./miniChart-k95Dpy0q.js";
|
|
2
|
+
import { M as chartSpecFromProps, N as mountEchart, g as uiCatalog, i as normalizeFieldOptions, w as mountEchartOption } from "./openUiSpecLang-C8qNOxzA.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";
|
|
@@ -1460,6 +1460,41 @@ var EchartDirective = class extends f {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
};
|
|
1462
1462
|
const echart = e(EchartDirective);
|
|
1463
|
+
var EchartOptionDirective = class extends f {
|
|
1464
|
+
#element;
|
|
1465
|
+
#handle;
|
|
1466
|
+
#option;
|
|
1467
|
+
#fallback = "auto";
|
|
1468
|
+
constructor(partInfo) {
|
|
1469
|
+
super(partInfo);
|
|
1470
|
+
if (partInfo.type !== t.ELEMENT) throw new Error("echartOption() must be used as an element directive");
|
|
1471
|
+
}
|
|
1472
|
+
render(_option, _fallback) {
|
|
1473
|
+
return A;
|
|
1474
|
+
}
|
|
1475
|
+
update(part, [option, fallback = "auto"]) {
|
|
1476
|
+
const element = part.element;
|
|
1477
|
+
if (this.#element !== element) {
|
|
1478
|
+
this.#handle?.dispose();
|
|
1479
|
+
this.#element = element;
|
|
1480
|
+
this.#handle = mountEchartOption(element);
|
|
1481
|
+
}
|
|
1482
|
+
this.#option = option;
|
|
1483
|
+
this.#fallback = fallback;
|
|
1484
|
+
this.#handle?.setOption(option, void 0, void 0, fallback);
|
|
1485
|
+
return A;
|
|
1486
|
+
}
|
|
1487
|
+
disconnected() {
|
|
1488
|
+
this.#handle?.dispose();
|
|
1489
|
+
this.#handle = void 0;
|
|
1490
|
+
}
|
|
1491
|
+
reconnected() {
|
|
1492
|
+
if (!this.#element || !this.#option) return;
|
|
1493
|
+
this.#handle = mountEchartOption(this.#element);
|
|
1494
|
+
this.#handle.setOption(this.#option, void 0, void 0, this.#fallback);
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
const echartOption = e(EchartOptionDirective);
|
|
1463
1498
|
|
|
1464
1499
|
//#endregion
|
|
1465
1500
|
//#region ../ui/src/a2uiRuntime/webskillLitCatalog.ts
|
|
@@ -1778,6 +1813,10 @@ const renderers = {
|
|
|
1778
1813
|
</div>
|
|
1779
1814
|
`,
|
|
1780
1815
|
Chart: (props) => T`<div class="chart" ${echart(chartSpecFromProps(props))}></div>`,
|
|
1816
|
+
EChart: (props) => T`<div
|
|
1817
|
+
class="chart"
|
|
1818
|
+
${echartOption(props["option"] ?? {}, props["fallback"] === "table" ? "table" : "auto")}
|
|
1819
|
+
></div>`,
|
|
1781
1820
|
Icon: (props) => T`<span class="icon" role="img" aria-label=${str(props, "name")} data-palette=${str(props, "palette")}
|
|
1782
1821
|
>${ICON_GLYPH[str(props, "name")] ?? str(props, "name")}</span
|
|
1783
1822
|
>`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webskill/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"description": "WebSkill — browser/Node agent skill runtime (skills, tools, MCP, governance, UI)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"fflate": "0.8.3",
|
|
67
|
+
"saxes": "6.0.0",
|
|
67
68
|
"write-excel-file": "^4.1.1",
|
|
68
69
|
"yaml": "^2.9.0",
|
|
69
70
|
"zod": "^4.0.0"
|