@automattic/agenttic-client 0.1.0 → 0.1.2
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/auth/jetpack.d.ts +77 -0
- package/dist/auth/jetpack.d.ts.map +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/types/index.d.ts +192 -0
- package/dist/client/types/index.d.ts.map +1 -0
- package/dist/client/utils/core.d.ts +82 -0
- package/dist/client/utils/core.d.ts.map +1 -0
- package/dist/client/utils/index.d.ts +8 -0
- package/dist/client/utils/index.d.ts.map +1 -0
- package/dist/client/utils/internal/errors.d.ts +43 -0
- package/dist/client/utils/internal/errors.d.ts.map +1 -0
- package/dist/client/utils/internal/messages.d.ts +27 -0
- package/dist/client/utils/internal/messages.d.ts.map +1 -0
- package/dist/client/utils/internal/requests.d.ts +54 -0
- package/dist/client/utils/internal/requests.d.ts.map +1 -0
- package/dist/client/utils/internal/streaming.d.ts +23 -0
- package/dist/client/utils/internal/streaming.d.ts.map +1 -0
- package/dist/client/utils/internal/tools.d.ts +16 -0
- package/dist/client/utils/internal/tools.d.ts.map +1 -0
- package/dist/client/utils/logger.d.ts +7 -0
- package/dist/client/utils/logger.d.ts.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +146 -0
- package/dist/markdown-extensions/charts/BarChart.d.ts +16 -0
- package/dist/markdown-extensions/charts/BarChart.d.ts.map +1 -0
- package/dist/markdown-extensions/charts/BaseChart.d.ts +36 -0
- package/dist/markdown-extensions/charts/BaseChart.d.ts.map +1 -0
- package/dist/markdown-extensions/charts/ChartBlock.d.ts +34 -0
- package/dist/markdown-extensions/charts/ChartBlock.d.ts.map +1 -0
- package/dist/markdown-extensions/charts/ChartError.d.ts +17 -0
- package/dist/markdown-extensions/charts/ChartError.d.ts.map +1 -0
- package/dist/markdown-extensions/charts/ChartErrorBoundary.d.ts +30 -0
- package/dist/markdown-extensions/charts/ChartErrorBoundary.d.ts.map +1 -0
- package/dist/markdown-extensions/charts/LineChart.d.ts +14 -0
- package/dist/markdown-extensions/charts/LineChart.d.ts.map +1 -0
- package/dist/markdown-extensions/charts/index.d.ts +293 -0
- package/dist/markdown-extensions/charts/index.d.ts.map +1 -0
- package/dist/markdown-extensions/charts/utils/chartUtils.d.ts +56 -0
- package/dist/markdown-extensions/charts/utils/chartUtils.d.ts.map +1 -0
- package/dist/markdown-extensions/index.d.ts +34 -0
- package/dist/markdown-extensions/index.d.ts.map +1 -0
- package/dist/markdown-extensions/types.d.ts +52 -0
- package/dist/markdown-extensions/types.d.ts.map +1 -0
- package/dist/message-actions/factories.d.ts +16 -0
- package/dist/message-actions/index.d.ts +5 -0
- package/dist/message-actions/resolver.d.ts +9 -0
- package/dist/message-actions/useMessageActions.d.ts +9 -0
- package/dist/mocks/MockSalesGraph.d.ts +13 -0
- package/dist/mocks/MockSalesGraph.d.ts.map +1 -0
- package/dist/mocks/index.d.ts +12 -0
- package/dist/mocks/index.d.ts.map +1 -0
- package/dist/mocks/mockContext.d.ts +187 -0
- package/dist/mocks/mockContext.d.ts.map +1 -0
- package/dist/mocks/mockTools.d.ts +44 -0
- package/dist/mocks/mockTools.d.ts.map +1 -0
- package/dist/react/agentManager.d.ts +27 -0
- package/dist/react/conversationStorage.d.ts +29 -0
- package/dist/react/conversationStorage.d.ts.map +1 -0
- package/dist/react/conversationUtils.d.ts +32 -0
- package/dist/react/conversationUtils.d.ts.map +1 -0
- package/dist/react/useAgentChat.d.ts +97 -0
- package/dist/react/useClientContext.d.ts +17 -0
- package/dist/react/useClientContext.d.ts.map +1 -0
- package/dist/react/useClientTools.d.ts +23 -0
- package/dist/react/useClientTools.d.ts.map +1 -0
- package/dist/utils/createMessageRenderer.d.ts +25 -0
- package/dist/utils/createMessageRenderer.d.ts.map +1 -0
- package/dist/utils/markdownParser.d.ts +25 -0
- package/dist/utils/markdownParser.d.ts.map +1 -0
- package/dist/utils/theme.d.ts +8 -0
- package/dist/utils/theme.d.ts.map +1 -0
- package/package.json +81 -73
package/dist/index.js
CHANGED
|
@@ -512,6 +512,29 @@ async function* executeStreamingRequest(preparedRequest, config, options) {
|
|
|
512
512
|
|
|
513
513
|
// src/client/index.ts
|
|
514
514
|
var DEFAULT_TIMEOUT = 12e4;
|
|
515
|
+
async function hasMatchingToolCallbacks(toolProvider, message) {
|
|
516
|
+
if (!toolProvider || !message || !toolProvider.getAvailableTools) {
|
|
517
|
+
return false;
|
|
518
|
+
}
|
|
519
|
+
const toolCalls = extractToolCallsFromMessage(message);
|
|
520
|
+
if (toolCalls.length === 0) {
|
|
521
|
+
return false;
|
|
522
|
+
}
|
|
523
|
+
try {
|
|
524
|
+
const availableTools = await toolProvider.getAvailableTools();
|
|
525
|
+
for (const toolCall of toolCalls) {
|
|
526
|
+
const hasCallback = availableTools.some(
|
|
527
|
+
(tool) => tool.id === toolCall.data.toolId
|
|
528
|
+
);
|
|
529
|
+
if (hasCallback) {
|
|
530
|
+
return true;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
} catch (error) {
|
|
534
|
+
return false;
|
|
535
|
+
}
|
|
536
|
+
return false;
|
|
537
|
+
}
|
|
515
538
|
async function executeToolCallBatch(toolCalls, toolProvider, messageId) {
|
|
516
539
|
const results = [];
|
|
517
540
|
const agentMessages = [];
|
|
@@ -622,6 +645,42 @@ async function continueTaskStreamed(taskId, message, requestConfig, toolProvider
|
|
|
622
645
|
async function* processAgentResponseStream(stream, toolProvider, contextProvider, requestConfig, sessionId, withHistory = true, newConversationParts = []) {
|
|
623
646
|
for await (const update of stream) {
|
|
624
647
|
yield update;
|
|
648
|
+
if (update.status.state === "running" && update.status.message && toolProvider && await hasMatchingToolCallbacks(
|
|
649
|
+
toolProvider,
|
|
650
|
+
update.status.message
|
|
651
|
+
)) {
|
|
652
|
+
const toolCalls = extractToolCallsFromMessage(
|
|
653
|
+
update.status.message
|
|
654
|
+
);
|
|
655
|
+
for (const toolCall of toolCalls) {
|
|
656
|
+
const { toolCallId, toolId, arguments: args } = toolCall.data;
|
|
657
|
+
toolProvider.executeTool(
|
|
658
|
+
toolId,
|
|
659
|
+
args,
|
|
660
|
+
update.status?.message?.messageId,
|
|
661
|
+
toolCallId
|
|
662
|
+
).catch((error) => {
|
|
663
|
+
console.error(
|
|
664
|
+
`Tool execution failed for ${toolId}:`,
|
|
665
|
+
error
|
|
666
|
+
);
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
yield {
|
|
670
|
+
id: update.id,
|
|
671
|
+
status: {
|
|
672
|
+
state: "running",
|
|
673
|
+
message: {
|
|
674
|
+
role: "agent",
|
|
675
|
+
kind: "message",
|
|
676
|
+
parts: toolCalls,
|
|
677
|
+
messageId: generateMessageId()
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
final: false,
|
|
681
|
+
text: ""
|
|
682
|
+
};
|
|
683
|
+
}
|
|
625
684
|
if (update.status.state === "input-required" && update.status.message && toolProvider) {
|
|
626
685
|
const toolCalls = extractToolCallsFromMessage(
|
|
627
686
|
update.status.message
|
|
@@ -2116,6 +2175,92 @@ var A2AErrorCodes = /* @__PURE__ */ ((A2AErrorCodes2) => {
|
|
|
2116
2175
|
A2AErrorCodes2[A2AErrorCodes2["SERVER_ERROR"] = -32e3] = "SERVER_ERROR";
|
|
2117
2176
|
return A2AErrorCodes2;
|
|
2118
2177
|
})(A2AErrorCodes || {});
|
|
2178
|
+
|
|
2179
|
+
// src/auth/jetpack.ts
|
|
2180
|
+
import apiFetch from "@wordpress/api-fetch";
|
|
2181
|
+
var JWT_TOKEN_ID = "jetpack-ai-jwt-token";
|
|
2182
|
+
var JWT_TOKEN_EXPIRATION_TIME = 30 * 60 * 1e3;
|
|
2183
|
+
function isSimpleSite() {
|
|
2184
|
+
const hasJetpackConnection = Boolean(window.JP_CONNECTION_INITIAL_STATE);
|
|
2185
|
+
if (hasJetpackConnection) {
|
|
2186
|
+
return false;
|
|
2187
|
+
}
|
|
2188
|
+
const isSimple = Boolean(
|
|
2189
|
+
window.Jetpack_Editor_Initial_State?.wpcomBlogId
|
|
2190
|
+
);
|
|
2191
|
+
return isSimple;
|
|
2192
|
+
}
|
|
2193
|
+
async function requestJetpackToken(errorHandler, useCachedToken = true) {
|
|
2194
|
+
const token = localStorage.getItem(JWT_TOKEN_ID);
|
|
2195
|
+
let tokenData;
|
|
2196
|
+
if (token) {
|
|
2197
|
+
try {
|
|
2198
|
+
tokenData = JSON.parse(token);
|
|
2199
|
+
} catch (error) {
|
|
2200
|
+
console.warn("Invalid cached Jetpack token:", error);
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
if (tokenData && tokenData?.token && tokenData?.expire && tokenData?.expire > Date.now() && useCachedToken) {
|
|
2204
|
+
return tokenData;
|
|
2205
|
+
}
|
|
2206
|
+
const apiNonce = window.JP_CONNECTION_INITIAL_STATE?.apiNonce;
|
|
2207
|
+
const siteId = window.Jetpack_Editor_Initial_State?.wpcomBlogId;
|
|
2208
|
+
let data = {
|
|
2209
|
+
token: "",
|
|
2210
|
+
blog_id: ""
|
|
2211
|
+
};
|
|
2212
|
+
try {
|
|
2213
|
+
if (!isSimpleSite()) {
|
|
2214
|
+
data = await apiFetch({
|
|
2215
|
+
path: "/jetpack/v4/jetpack-ai-jwt?_cacheBuster=" + Date.now(),
|
|
2216
|
+
credentials: "same-origin",
|
|
2217
|
+
headers: {
|
|
2218
|
+
"X-WP-Nonce": apiNonce || ""
|
|
2219
|
+
},
|
|
2220
|
+
method: "POST"
|
|
2221
|
+
});
|
|
2222
|
+
} else {
|
|
2223
|
+
data = await apiFetch({
|
|
2224
|
+
path: "/wpcom/v2/sites/" + siteId + "/jetpack-openai-query/jwt",
|
|
2225
|
+
method: "POST"
|
|
2226
|
+
});
|
|
2227
|
+
}
|
|
2228
|
+
} catch (error) {
|
|
2229
|
+
console.log("Failed to fetch Jetpack token:", error);
|
|
2230
|
+
throw new Error(errorHandler(error));
|
|
2231
|
+
}
|
|
2232
|
+
if (!data?.token) {
|
|
2233
|
+
throw new Error(
|
|
2234
|
+
"Authentication failed. Please ensure Jetpack is properly connected and try again."
|
|
2235
|
+
);
|
|
2236
|
+
}
|
|
2237
|
+
const newTokenData = {
|
|
2238
|
+
token: data.token,
|
|
2239
|
+
blogId: data.blog_id || "",
|
|
2240
|
+
expire: Date.now() + JWT_TOKEN_EXPIRATION_TIME
|
|
2241
|
+
};
|
|
2242
|
+
try {
|
|
2243
|
+
localStorage.setItem(JWT_TOKEN_ID, JSON.stringify(newTokenData));
|
|
2244
|
+
} catch (storageError) {
|
|
2245
|
+
console.log("Error storing token in localStorage:", storageError);
|
|
2246
|
+
}
|
|
2247
|
+
return newTokenData;
|
|
2248
|
+
}
|
|
2249
|
+
var createJetpackAuthProvider = (errorHandler) => {
|
|
2250
|
+
return async () => {
|
|
2251
|
+
const headers = {};
|
|
2252
|
+
try {
|
|
2253
|
+
const tokenData = await requestJetpackToken(errorHandler);
|
|
2254
|
+
if (tokenData?.token) {
|
|
2255
|
+
headers.Authorization = `${tokenData.token}`;
|
|
2256
|
+
}
|
|
2257
|
+
} catch (error) {
|
|
2258
|
+
console.error("Failed to get Jetpack token for auth:", error);
|
|
2259
|
+
throw error;
|
|
2260
|
+
}
|
|
2261
|
+
return headers;
|
|
2262
|
+
};
|
|
2263
|
+
};
|
|
2119
2264
|
export {
|
|
2120
2265
|
A2AErrorCodes,
|
|
2121
2266
|
BarChart,
|
|
@@ -2123,6 +2268,7 @@ export {
|
|
|
2123
2268
|
LineChart,
|
|
2124
2269
|
createClient,
|
|
2125
2270
|
createFeedbackActions,
|
|
2271
|
+
createJetpackAuthProvider,
|
|
2126
2272
|
createMessageRenderer,
|
|
2127
2273
|
createRequestId,
|
|
2128
2274
|
createTaskId,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { BaseChartProps } from './BaseChart';
|
|
6
|
+
export interface BarChartProps extends BaseChartProps {
|
|
7
|
+
mode?: 'time-comparison' | 'item-comparison';
|
|
8
|
+
truncateLabels?: boolean;
|
|
9
|
+
maxLabelLength?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Bar chart component for comparisons and time-series data
|
|
13
|
+
* @param props Component props
|
|
14
|
+
*/
|
|
15
|
+
export declare const BarChart: FC<BarChartProps>;
|
|
16
|
+
//# sourceMappingURL=BarChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../src/markdown-extensions/charts/BarChart.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQlD,MAAM,WAAW,aAAc,SAAQ,cAAc;IACpD,IAAI,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAE,aAAa,CA8GvC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { type BaseChartProps as AutomatticBaseChartProps, type DataPointDate, type SeriesData } from '@automattic/charts';
|
|
5
|
+
import type { RenderTooltipParams } from '@visx/xychart/lib/components/Tooltip';
|
|
6
|
+
import type { FC } from 'react';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
export interface CurrencyOptions {
|
|
9
|
+
symbol: string;
|
|
10
|
+
symbolPosition: 'left' | 'right';
|
|
11
|
+
}
|
|
12
|
+
export interface BaseChartProps extends Omit<AutomatticBaseChartProps<SeriesData[]>, 'data'> {
|
|
13
|
+
data: SeriesData[];
|
|
14
|
+
currency?: CurrencyOptions;
|
|
15
|
+
renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => React.ReactNode;
|
|
16
|
+
error?: {
|
|
17
|
+
message: string;
|
|
18
|
+
details?: string;
|
|
19
|
+
} | null;
|
|
20
|
+
}
|
|
21
|
+
export type { SeriesData } from '@automattic/charts';
|
|
22
|
+
interface BaseChartInternalProps {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
error?: {
|
|
25
|
+
message: string;
|
|
26
|
+
details?: string;
|
|
27
|
+
} | null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Base chart component with shared logic for all chart types
|
|
31
|
+
* @param root0
|
|
32
|
+
* @param root0.children
|
|
33
|
+
* @param root0.error
|
|
34
|
+
*/
|
|
35
|
+
export declare const BaseChart: FC<BaseChartInternalProps>;
|
|
36
|
+
//# sourceMappingURL=BaseChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseChart.d.ts","sourceRoot":"","sources":["../../../src/markdown-extensions/charts/BaseChart.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACN,KAAK,cAAc,IAAI,wBAAwB,EAC/C,KAAK,aAAa,EAElB,KAAK,UAAU,EAEf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAkB,MAAM,OAAO,CAAC;AAQvC,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,cAChB,SAAQ,IAAI,CAAE,wBAAwB,CAAE,UAAU,EAAE,CAAE,EAAE,MAAM,CAAE;IAChE,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,CAAC,EAAE,CACf,MAAM,EAAE,mBAAmB,CAAE,aAAa,CAAE,KACxC,KAAK,CAAC,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,IAAI,CAAC;CACT;AAED,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,UAAU,sBAAsB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,IAAI,CAAC;CACT;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAE,sBAAsB,CA4CjD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { ChartExtensionConfig } from '../types';
|
|
6
|
+
export interface ChartBlockProps {
|
|
7
|
+
data: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
config?: ChartExtensionConfig['config'];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ChartBlock component that renders interactive charts from markdown code blocks
|
|
13
|
+
*
|
|
14
|
+
* Supports JSON format chart data:
|
|
15
|
+
* {
|
|
16
|
+
* "chartType": "line",
|
|
17
|
+
* "title": "Revenue Trend",
|
|
18
|
+
* "data": [
|
|
19
|
+
* {
|
|
20
|
+
* "label": "Revenue",
|
|
21
|
+
* "data": [
|
|
22
|
+
* {"date": "2024-01-01", "value": 1000},
|
|
23
|
+
* {"date": "2024-01-02", "value": 1200}
|
|
24
|
+
* ]
|
|
25
|
+
* }
|
|
26
|
+
* ]
|
|
27
|
+
* }
|
|
28
|
+
* @param root0
|
|
29
|
+
* @param root0.data
|
|
30
|
+
* @param root0.className
|
|
31
|
+
* @param root0.config
|
|
32
|
+
*/
|
|
33
|
+
export declare const ChartBlock: FC<ChartBlockProps>;
|
|
34
|
+
//# sourceMappingURL=ChartBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartBlock.d.ts","sourceRoot":"","sources":["../../../src/markdown-extensions/charts/ChartBlock.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC;;GAEG;AACH,OAAO,KAAK,EAA6B,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAOhF,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,oBAAoB,CAAE,QAAQ,CAAE,CAAC;CAC1C;AAsBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAE,eAAe,CA4U3C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { FC } from 'react';
|
|
5
|
+
interface ChartErrorProps {
|
|
6
|
+
message: string;
|
|
7
|
+
details?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Error display component for chart rendering issues
|
|
11
|
+
* @param root0
|
|
12
|
+
* @param root0.message
|
|
13
|
+
* @param root0.details
|
|
14
|
+
*/
|
|
15
|
+
export declare const ChartError: FC<ChartErrorProps>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ChartError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartError.d.ts","sourceRoot":"","sources":["../../../src/markdown-extensions/charts/ChartError.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,UAAU,eAAe;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAE,eAAe,CAU3C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { Component, type ErrorInfo, type ReactNode } from 'react';
|
|
5
|
+
interface Props {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
chartData?: string;
|
|
8
|
+
}
|
|
9
|
+
interface State {
|
|
10
|
+
hasError: boolean;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
errorInfo: ErrorInfo | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Error boundary component to catch and handle chart rendering errors
|
|
16
|
+
* Prevents the entire chat window from crashing when chart errors occur
|
|
17
|
+
*
|
|
18
|
+
* NOTE: This must remain a class component. React does not yet support error
|
|
19
|
+
* boundaries as functional components or hooks. The componentDidCatch and
|
|
20
|
+
* getDerivedStateFromError lifecycle methods are only available in class components.
|
|
21
|
+
* See: https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary
|
|
22
|
+
*/
|
|
23
|
+
export declare class ChartErrorBoundary extends Component<Props, State> {
|
|
24
|
+
constructor(props: Props);
|
|
25
|
+
static getDerivedStateFromError(error: Error): State;
|
|
26
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
27
|
+
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=ChartErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/markdown-extensions/charts/ChartErrorBoundary.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlE,UAAU,KAAK;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,KAAK;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,SAAQ,SAAS,CAAE,KAAK,EAAE,KAAK,CAAE;gBACnD,KAAK,EAAE,KAAK;IASzB,MAAM,CAAC,wBAAwB,CAAE,KAAK,EAAE,KAAK,GAAI,KAAK;IAQtD,iBAAiB,CAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAuBrD,MAAM;CAoBN"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { BaseChartProps } from './BaseChart';
|
|
6
|
+
export interface LineChartProps extends BaseChartProps {
|
|
7
|
+
withGradientFill?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Line chart component for time-series data
|
|
11
|
+
* @param props Component props
|
|
12
|
+
*/
|
|
13
|
+
export declare const LineChart: FC<LineChartProps>;
|
|
14
|
+
//# sourceMappingURL=LineChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../src/markdown-extensions/charts/LineChart.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,MAAM,WAAW,cAAe,SAAQ,cAAc;IACrD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAE,cAAc,CAiDzC,CAAC"}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart extension for markdown processing
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { ChartExtensionConfig } from '../types';
|
|
6
|
+
interface CodeProps extends React.HTMLAttributes<HTMLElement> {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
type ChartConfig = ChartExtensionConfig['config'];
|
|
11
|
+
/**
|
|
12
|
+
* Create a chart block component that handles code blocks with language="chart"
|
|
13
|
+
* @param config - Optional configuration for the chart extension
|
|
14
|
+
* @return A react-markdown code component that renders charts
|
|
15
|
+
*/
|
|
16
|
+
export declare function createChartBlock(config?: ChartConfig): (props: CodeProps) => React.DetailedReactHTMLElement<{
|
|
17
|
+
defaultChecked?: boolean | undefined;
|
|
18
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
19
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
20
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
21
|
+
accessKey?: string | undefined;
|
|
22
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
23
|
+
autoFocus?: boolean | undefined;
|
|
24
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
25
|
+
contextMenu?: string | undefined;
|
|
26
|
+
dir?: string | undefined;
|
|
27
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
28
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
29
|
+
hidden?: boolean | undefined;
|
|
30
|
+
id?: string | undefined;
|
|
31
|
+
lang?: string | undefined;
|
|
32
|
+
nonce?: string | undefined;
|
|
33
|
+
slot?: string | undefined;
|
|
34
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
35
|
+
style?: React.CSSProperties | undefined;
|
|
36
|
+
tabIndex?: number | undefined;
|
|
37
|
+
title?: string | undefined;
|
|
38
|
+
translate?: "yes" | "no" | undefined;
|
|
39
|
+
radioGroup?: string | undefined;
|
|
40
|
+
role?: React.AriaRole | undefined;
|
|
41
|
+
about?: string | undefined;
|
|
42
|
+
content?: string | undefined;
|
|
43
|
+
datatype?: string | undefined;
|
|
44
|
+
inlist?: any;
|
|
45
|
+
prefix?: string | undefined;
|
|
46
|
+
property?: string | undefined;
|
|
47
|
+
rel?: string | undefined;
|
|
48
|
+
resource?: string | undefined;
|
|
49
|
+
rev?: string | undefined;
|
|
50
|
+
typeof?: string | undefined;
|
|
51
|
+
vocab?: string | undefined;
|
|
52
|
+
autoCorrect?: string | undefined;
|
|
53
|
+
autoSave?: string | undefined;
|
|
54
|
+
color?: string | undefined;
|
|
55
|
+
itemProp?: string | undefined;
|
|
56
|
+
itemScope?: boolean | undefined;
|
|
57
|
+
itemType?: string | undefined;
|
|
58
|
+
itemID?: string | undefined;
|
|
59
|
+
itemRef?: string | undefined;
|
|
60
|
+
results?: number | undefined;
|
|
61
|
+
security?: string | undefined;
|
|
62
|
+
unselectable?: "on" | "off" | undefined;
|
|
63
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
64
|
+
is?: string | undefined;
|
|
65
|
+
exportparts?: string | undefined;
|
|
66
|
+
part?: string | undefined;
|
|
67
|
+
"aria-activedescendant"?: string | undefined;
|
|
68
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
69
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
70
|
+
"aria-braillelabel"?: string | undefined;
|
|
71
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
72
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
73
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
74
|
+
"aria-colcount"?: number | undefined;
|
|
75
|
+
"aria-colindex"?: number | undefined;
|
|
76
|
+
"aria-colindextext"?: string | undefined;
|
|
77
|
+
"aria-colspan"?: number | undefined;
|
|
78
|
+
"aria-controls"?: string | undefined;
|
|
79
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
80
|
+
"aria-describedby"?: string | undefined;
|
|
81
|
+
"aria-description"?: string | undefined;
|
|
82
|
+
"aria-details"?: string | undefined;
|
|
83
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
84
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
85
|
+
"aria-errormessage"?: string | undefined;
|
|
86
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
87
|
+
"aria-flowto"?: string | undefined;
|
|
88
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
89
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
90
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
91
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
92
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
93
|
+
"aria-label"?: string | undefined;
|
|
94
|
+
"aria-labelledby"?: string | undefined;
|
|
95
|
+
"aria-level"?: number | undefined;
|
|
96
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
97
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
98
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
99
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
100
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
101
|
+
"aria-owns"?: string | undefined;
|
|
102
|
+
"aria-placeholder"?: string | undefined;
|
|
103
|
+
"aria-posinset"?: number | undefined;
|
|
104
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
105
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
106
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
107
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
108
|
+
"aria-roledescription"?: string | undefined;
|
|
109
|
+
"aria-rowcount"?: number | undefined;
|
|
110
|
+
"aria-rowindex"?: number | undefined;
|
|
111
|
+
"aria-rowindextext"?: string | undefined;
|
|
112
|
+
"aria-rowspan"?: number | undefined;
|
|
113
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
114
|
+
"aria-setsize"?: number | undefined;
|
|
115
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
116
|
+
"aria-valuemax"?: number | undefined;
|
|
117
|
+
"aria-valuemin"?: number | undefined;
|
|
118
|
+
"aria-valuenow"?: number | undefined;
|
|
119
|
+
"aria-valuetext"?: string | undefined;
|
|
120
|
+
dangerouslySetInnerHTML?: {
|
|
121
|
+
__html: string | TrustedHTML;
|
|
122
|
+
} | undefined;
|
|
123
|
+
onCopy?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
124
|
+
onCopyCapture?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
125
|
+
onCut?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
126
|
+
onCutCapture?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
127
|
+
onPaste?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
128
|
+
onPasteCapture?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
129
|
+
onCompositionEnd?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
130
|
+
onCompositionEndCapture?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
131
|
+
onCompositionStart?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
132
|
+
onCompositionStartCapture?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
133
|
+
onCompositionUpdate?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
134
|
+
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
135
|
+
onFocus?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
136
|
+
onFocusCapture?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
137
|
+
onBlur?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
138
|
+
onBlurCapture?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
139
|
+
onChange?: React.FormEventHandler<HTMLElement> | undefined;
|
|
140
|
+
onChangeCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
141
|
+
onBeforeInput?: React.InputEventHandler<HTMLElement> | undefined;
|
|
142
|
+
onBeforeInputCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
143
|
+
onInput?: React.FormEventHandler<HTMLElement> | undefined;
|
|
144
|
+
onInputCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
145
|
+
onReset?: React.FormEventHandler<HTMLElement> | undefined;
|
|
146
|
+
onResetCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
147
|
+
onSubmit?: React.FormEventHandler<HTMLElement> | undefined;
|
|
148
|
+
onSubmitCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
149
|
+
onInvalid?: React.FormEventHandler<HTMLElement> | undefined;
|
|
150
|
+
onInvalidCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
151
|
+
onLoad?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
152
|
+
onLoadCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
153
|
+
onError?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
154
|
+
onErrorCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
155
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
156
|
+
onKeyDownCapture?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
157
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
158
|
+
onKeyPressCapture?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
159
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
160
|
+
onKeyUpCapture?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
161
|
+
onAbort?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
162
|
+
onAbortCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
163
|
+
onCanPlay?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
164
|
+
onCanPlayCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
165
|
+
onCanPlayThrough?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
166
|
+
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
167
|
+
onDurationChange?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
168
|
+
onDurationChangeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
169
|
+
onEmptied?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
170
|
+
onEmptiedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
171
|
+
onEncrypted?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
172
|
+
onEncryptedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
173
|
+
onEnded?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
174
|
+
onEndedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
175
|
+
onLoadedData?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
176
|
+
onLoadedDataCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
177
|
+
onLoadedMetadata?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
178
|
+
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
179
|
+
onLoadStart?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
180
|
+
onLoadStartCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
181
|
+
onPause?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
182
|
+
onPauseCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
183
|
+
onPlay?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
184
|
+
onPlayCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
185
|
+
onPlaying?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
186
|
+
onPlayingCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
187
|
+
onProgress?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
188
|
+
onProgressCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
189
|
+
onRateChange?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
190
|
+
onRateChangeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
191
|
+
onSeeked?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
192
|
+
onSeekedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
193
|
+
onSeeking?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
194
|
+
onSeekingCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
195
|
+
onStalled?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
196
|
+
onStalledCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
197
|
+
onSuspend?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
198
|
+
onSuspendCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
199
|
+
onTimeUpdate?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
200
|
+
onTimeUpdateCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
201
|
+
onVolumeChange?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
202
|
+
onVolumeChangeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
203
|
+
onWaiting?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
204
|
+
onWaitingCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
205
|
+
onAuxClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
206
|
+
onAuxClickCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
207
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
208
|
+
onClickCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
209
|
+
onContextMenu?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
210
|
+
onContextMenuCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
211
|
+
onDoubleClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
212
|
+
onDoubleClickCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
213
|
+
onDrag?: React.DragEventHandler<HTMLElement> | undefined;
|
|
214
|
+
onDragCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
215
|
+
onDragEnd?: React.DragEventHandler<HTMLElement> | undefined;
|
|
216
|
+
onDragEndCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
217
|
+
onDragEnter?: React.DragEventHandler<HTMLElement> | undefined;
|
|
218
|
+
onDragEnterCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
219
|
+
onDragExit?: React.DragEventHandler<HTMLElement> | undefined;
|
|
220
|
+
onDragExitCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
221
|
+
onDragLeave?: React.DragEventHandler<HTMLElement> | undefined;
|
|
222
|
+
onDragLeaveCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
223
|
+
onDragOver?: React.DragEventHandler<HTMLElement> | undefined;
|
|
224
|
+
onDragOverCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
225
|
+
onDragStart?: React.DragEventHandler<HTMLElement> | undefined;
|
|
226
|
+
onDragStartCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
227
|
+
onDrop?: React.DragEventHandler<HTMLElement> | undefined;
|
|
228
|
+
onDropCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
229
|
+
onMouseDown?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
230
|
+
onMouseDownCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
231
|
+
onMouseEnter?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
232
|
+
onMouseLeave?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
233
|
+
onMouseMove?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
234
|
+
onMouseMoveCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
235
|
+
onMouseOut?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
236
|
+
onMouseOutCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
237
|
+
onMouseOver?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
238
|
+
onMouseOverCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
239
|
+
onMouseUp?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
240
|
+
onMouseUpCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
241
|
+
onSelect?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
242
|
+
onSelectCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
243
|
+
onTouchCancel?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
244
|
+
onTouchCancelCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
245
|
+
onTouchEnd?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
246
|
+
onTouchEndCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
247
|
+
onTouchMove?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
248
|
+
onTouchMoveCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
249
|
+
onTouchStart?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
250
|
+
onTouchStartCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
251
|
+
onPointerDown?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
252
|
+
onPointerDownCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
253
|
+
onPointerMove?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
254
|
+
onPointerMoveCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
255
|
+
onPointerUp?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
256
|
+
onPointerUpCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
257
|
+
onPointerCancel?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
258
|
+
onPointerCancelCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
259
|
+
onPointerEnter?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
260
|
+
onPointerLeave?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
261
|
+
onPointerOver?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
262
|
+
onPointerOverCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
263
|
+
onPointerOut?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
264
|
+
onPointerOutCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
265
|
+
onGotPointerCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
266
|
+
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
267
|
+
onLostPointerCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
268
|
+
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
269
|
+
onScroll?: React.UIEventHandler<HTMLElement> | undefined;
|
|
270
|
+
onScrollCapture?: React.UIEventHandler<HTMLElement> | undefined;
|
|
271
|
+
onWheel?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
272
|
+
onWheelCapture?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
273
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
274
|
+
onAnimationStartCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
275
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
276
|
+
onAnimationEndCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
277
|
+
onAnimationIteration?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
278
|
+
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
279
|
+
onTransitionEnd?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
280
|
+
onTransitionEndCapture?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
281
|
+
className: string | undefined;
|
|
282
|
+
}, HTMLElement> | React.FunctionComponentElement<import("./ChartBlock").ChartBlockProps>;
|
|
283
|
+
export { BarChart } from './BarChart';
|
|
284
|
+
export { BaseChart } from './BaseChart';
|
|
285
|
+
export { ChartBlock } from './ChartBlock';
|
|
286
|
+
export { ChartError } from './ChartError';
|
|
287
|
+
export { ChartErrorBoundary } from './ChartErrorBoundary';
|
|
288
|
+
export { LineChart } from './LineChart';
|
|
289
|
+
export type { BarChartProps } from './BarChart';
|
|
290
|
+
export type { BaseChartProps, CurrencyOptions, SeriesData } from './BaseChart';
|
|
291
|
+
export type { ChartBlockProps } from './ChartBlock';
|
|
292
|
+
export type { LineChartProps } from './LineChart';
|
|
293
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/markdown-extensions/charts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGrD,UAAU,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAE,WAAW,CAAE;IAC9D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,KAAK,WAAW,GAAG,oBAAoB,CAAE,QAAQ,CAAE,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAE,MAAM,CAAC,EAAE,WAAW,IACrB,OAAO,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFAqBhD;AAGD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC/E,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|