@chatbi-v/xcml 2.1.0 → 2.1.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/index.cjs +16 -16
- package/dist/index.css +4 -0
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +14 -14
- package/package.json +1 -1
package/dist/index.css
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -431,6 +431,24 @@ declare function xTagPlugin(options?: XTagPluginOptions): {
|
|
|
431
431
|
};
|
|
432
432
|
};
|
|
433
433
|
|
|
434
|
+
interface XCMLLayoutContextValue {
|
|
435
|
+
/**
|
|
436
|
+
* 容器宽度(像素)
|
|
437
|
+
*/
|
|
438
|
+
containerWidth: number;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* XCML 布局上下文 Provider
|
|
442
|
+
* 负责监听容器尺寸变化并下发给子组件
|
|
443
|
+
*/
|
|
444
|
+
declare const XCMLLayoutProvider: React$1.FC<{
|
|
445
|
+
children: React$1.ReactNode;
|
|
446
|
+
}>;
|
|
447
|
+
/**
|
|
448
|
+
* 获取 XCML 布局信息的 Hook
|
|
449
|
+
*/
|
|
450
|
+
declare const useXCMLLayout: () => XCMLLayoutContextValue;
|
|
451
|
+
|
|
434
452
|
interface XCMLProps {
|
|
435
453
|
content?: string;
|
|
436
454
|
stream?: AsyncIterable<string>;
|
|
@@ -448,6 +466,14 @@ interface XCMLProps {
|
|
|
448
466
|
* 主题配置,用于 Mermaid 等图表
|
|
449
467
|
*/
|
|
450
468
|
theme?: string;
|
|
469
|
+
/**
|
|
470
|
+
* 内容变更回调
|
|
471
|
+
*/
|
|
472
|
+
onContentChange?: (content: string) => void;
|
|
473
|
+
/**
|
|
474
|
+
* 组件渲染状态变更回调
|
|
475
|
+
*/
|
|
476
|
+
onComponentRender?: (tag: string, status: 'loading' | 'success' | 'error') => void;
|
|
451
477
|
}
|
|
452
478
|
/**
|
|
453
479
|
* XCML 核心渲染组件 (XCMLMarkdown)
|
|
@@ -1037,4 +1063,4 @@ declare function ThemeProvider({ children, defaultTheme, theme: controlledTheme,
|
|
|
1037
1063
|
storageKey, scoped, className, style, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
1038
1064
|
declare const useTheme: () => ThemeProviderState;
|
|
1039
1065
|
|
|
1040
|
-
export { AntVChartLoader, type AntVRendererOptions, type BaseChartProps, type BasicRenderersOptions, COMMON_PROPS, type ChartAxisConfig, type ChartComponent, type ChartLabelConfig, type ChartLegendConfig, type ChartProps, type ChartStrategy, type ColumnChartProps, DefaultEmptyPlaceholder, DefaultErrorPlaceholder, type DualAxesChartProps, type DualAxesChildConfig, type ExtendedRenderersOptions, type FunnelChartProps, type LineChartProps, type PieChartProps, type Theme, ThemeProvider, type XCMLBaseComponent, type XCMLBaseProps, XCMLCardWrapper, XCMLChart, type XCMLComponentSchema, type XCMLContext, XCMLEventBus, XCMLMarkdown, type XCMLPlugin, type XCMLPropertyCategory, type XCMLPropertyDefinition, type XCMLPropertyType, type XCMLProps, type XCMLRenderer, XCML_SCHEMAS, type XTagPluginOptions, buildConfig, chartSchema, cleanPropsBySchema, columnChartSchema, columnStrategy, createAntVRenderers, createBasicRenderers, createExtendedRenderers, createRenderersWithAliases, deepMerge, dualAxesChartSchema, dualAxesStrategy, extractBaseStyles, funnelChartSchema, funnelStrategy, getChartStrategy, getTheme, lineChartSchema, lineStrategy, mergePropsAndBody, normalizeNodeData, normalizeTagName, parseArrayProp, parseInlineData, parseXCML, pieChartSchema, pieStrategy, preprocessXCML, renderXCML, strategies, stringifyToXCML, themeDark, themeLight, themeMap, toXCMLNodeFromElement, toXCMLTag, toXTag, useTheme, useXCMLComponent, useXCMLNode, validateDataSchema, validateXCMLNode, withXCMLCard, xTagPlugin, xcmlBus };
|
|
1066
|
+
export { AntVChartLoader, type AntVRendererOptions, type BaseChartProps, type BasicRenderersOptions, COMMON_PROPS, type ChartAxisConfig, type ChartComponent, type ChartLabelConfig, type ChartLegendConfig, type ChartProps, type ChartStrategy, type ColumnChartProps, DefaultEmptyPlaceholder, DefaultErrorPlaceholder, type DualAxesChartProps, type DualAxesChildConfig, type ExtendedRenderersOptions, type FunnelChartProps, type LineChartProps, type PieChartProps, type Theme, ThemeProvider, type XCMLBaseComponent, type XCMLBaseProps, XCMLCardWrapper, XCMLChart, type XCMLComponentSchema, type XCMLContext, XCMLEventBus, XCMLLayoutProvider, XCMLMarkdown, type XCMLPlugin, type XCMLPropertyCategory, type XCMLPropertyDefinition, type XCMLPropertyType, type XCMLProps, type XCMLRenderer, XCML_SCHEMAS, type XTagPluginOptions, buildConfig, chartSchema, cleanPropsBySchema, columnChartSchema, columnStrategy, createAntVRenderers, createBasicRenderers, createExtendedRenderers, createRenderersWithAliases, deepMerge, dualAxesChartSchema, dualAxesStrategy, extractBaseStyles, funnelChartSchema, funnelStrategy, getChartStrategy, getTheme, lineChartSchema, lineStrategy, mergePropsAndBody, normalizeNodeData, normalizeTagName, parseArrayProp, parseInlineData, parseXCML, pieChartSchema, pieStrategy, preprocessXCML, renderXCML, strategies, stringifyToXCML, themeDark, themeLight, themeMap, toXCMLNodeFromElement, toXCMLTag, toXTag, useTheme, useXCMLComponent, useXCMLLayout, useXCMLNode, validateDataSchema, validateXCMLNode, withXCMLCard, xTagPlugin, xcmlBus };
|
package/dist/index.d.ts
CHANGED
|
@@ -431,6 +431,24 @@ declare function xTagPlugin(options?: XTagPluginOptions): {
|
|
|
431
431
|
};
|
|
432
432
|
};
|
|
433
433
|
|
|
434
|
+
interface XCMLLayoutContextValue {
|
|
435
|
+
/**
|
|
436
|
+
* 容器宽度(像素)
|
|
437
|
+
*/
|
|
438
|
+
containerWidth: number;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* XCML 布局上下文 Provider
|
|
442
|
+
* 负责监听容器尺寸变化并下发给子组件
|
|
443
|
+
*/
|
|
444
|
+
declare const XCMLLayoutProvider: React$1.FC<{
|
|
445
|
+
children: React$1.ReactNode;
|
|
446
|
+
}>;
|
|
447
|
+
/**
|
|
448
|
+
* 获取 XCML 布局信息的 Hook
|
|
449
|
+
*/
|
|
450
|
+
declare const useXCMLLayout: () => XCMLLayoutContextValue;
|
|
451
|
+
|
|
434
452
|
interface XCMLProps {
|
|
435
453
|
content?: string;
|
|
436
454
|
stream?: AsyncIterable<string>;
|
|
@@ -448,6 +466,14 @@ interface XCMLProps {
|
|
|
448
466
|
* 主题配置,用于 Mermaid 等图表
|
|
449
467
|
*/
|
|
450
468
|
theme?: string;
|
|
469
|
+
/**
|
|
470
|
+
* 内容变更回调
|
|
471
|
+
*/
|
|
472
|
+
onContentChange?: (content: string) => void;
|
|
473
|
+
/**
|
|
474
|
+
* 组件渲染状态变更回调
|
|
475
|
+
*/
|
|
476
|
+
onComponentRender?: (tag: string, status: 'loading' | 'success' | 'error') => void;
|
|
451
477
|
}
|
|
452
478
|
/**
|
|
453
479
|
* XCML 核心渲染组件 (XCMLMarkdown)
|
|
@@ -1037,4 +1063,4 @@ declare function ThemeProvider({ children, defaultTheme, theme: controlledTheme,
|
|
|
1037
1063
|
storageKey, scoped, className, style, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
1038
1064
|
declare const useTheme: () => ThemeProviderState;
|
|
1039
1065
|
|
|
1040
|
-
export { AntVChartLoader, type AntVRendererOptions, type BaseChartProps, type BasicRenderersOptions, COMMON_PROPS, type ChartAxisConfig, type ChartComponent, type ChartLabelConfig, type ChartLegendConfig, type ChartProps, type ChartStrategy, type ColumnChartProps, DefaultEmptyPlaceholder, DefaultErrorPlaceholder, type DualAxesChartProps, type DualAxesChildConfig, type ExtendedRenderersOptions, type FunnelChartProps, type LineChartProps, type PieChartProps, type Theme, ThemeProvider, type XCMLBaseComponent, type XCMLBaseProps, XCMLCardWrapper, XCMLChart, type XCMLComponentSchema, type XCMLContext, XCMLEventBus, XCMLMarkdown, type XCMLPlugin, type XCMLPropertyCategory, type XCMLPropertyDefinition, type XCMLPropertyType, type XCMLProps, type XCMLRenderer, XCML_SCHEMAS, type XTagPluginOptions, buildConfig, chartSchema, cleanPropsBySchema, columnChartSchema, columnStrategy, createAntVRenderers, createBasicRenderers, createExtendedRenderers, createRenderersWithAliases, deepMerge, dualAxesChartSchema, dualAxesStrategy, extractBaseStyles, funnelChartSchema, funnelStrategy, getChartStrategy, getTheme, lineChartSchema, lineStrategy, mergePropsAndBody, normalizeNodeData, normalizeTagName, parseArrayProp, parseInlineData, parseXCML, pieChartSchema, pieStrategy, preprocessXCML, renderXCML, strategies, stringifyToXCML, themeDark, themeLight, themeMap, toXCMLNodeFromElement, toXCMLTag, toXTag, useTheme, useXCMLComponent, useXCMLNode, validateDataSchema, validateXCMLNode, withXCMLCard, xTagPlugin, xcmlBus };
|
|
1066
|
+
export { AntVChartLoader, type AntVRendererOptions, type BaseChartProps, type BasicRenderersOptions, COMMON_PROPS, type ChartAxisConfig, type ChartComponent, type ChartLabelConfig, type ChartLegendConfig, type ChartProps, type ChartStrategy, type ColumnChartProps, DefaultEmptyPlaceholder, DefaultErrorPlaceholder, type DualAxesChartProps, type DualAxesChildConfig, type ExtendedRenderersOptions, type FunnelChartProps, type LineChartProps, type PieChartProps, type Theme, ThemeProvider, type XCMLBaseComponent, type XCMLBaseProps, XCMLCardWrapper, XCMLChart, type XCMLComponentSchema, type XCMLContext, XCMLEventBus, XCMLLayoutProvider, XCMLMarkdown, type XCMLPlugin, type XCMLPropertyCategory, type XCMLPropertyDefinition, type XCMLPropertyType, type XCMLProps, type XCMLRenderer, XCML_SCHEMAS, type XTagPluginOptions, buildConfig, chartSchema, cleanPropsBySchema, columnChartSchema, columnStrategy, createAntVRenderers, createBasicRenderers, createExtendedRenderers, createRenderersWithAliases, deepMerge, dualAxesChartSchema, dualAxesStrategy, extractBaseStyles, funnelChartSchema, funnelStrategy, getChartStrategy, getTheme, lineChartSchema, lineStrategy, mergePropsAndBody, normalizeNodeData, normalizeTagName, parseArrayProp, parseInlineData, parseXCML, pieChartSchema, pieStrategy, preprocessXCML, renderXCML, strategies, stringifyToXCML, themeDark, themeLight, themeMap, toXCMLNodeFromElement, toXCMLTag, toXTag, useTheme, useXCMLComponent, useXCMLLayout, useXCMLNode, validateDataSchema, validateXCMLNode, withXCMLCard, xTagPlugin, xcmlBus };
|