@clubmed/usg-chat-ui 1.0.1 → 1.2.5
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/chunks/_commonjsHelpers.js +9 -0
- package/chunks/_commonjsHelpers.js.map +1 -0
- package/chunks/browser.js +579 -0
- package/chunks/browser.js.map +1 -0
- package/chunks/client.js +27323 -0
- package/chunks/client.js.map +1 -0
- package/chunks/index.js +59 -32
- package/chunks/index.js.map +1 -1
- package/chunks/index2.js +32 -59
- package/chunks/index2.js.map +1 -1
- package/chunks/index3.js +22 -740
- package/chunks/index3.js.map +1 -1
- package/chunks/index4.js +740 -22
- package/chunks/index4.js.map +1 -1
- package/chunks/index5.js +1 -1
- package/chunks/index6.js +144 -150
- package/chunks/index6.js.map +1 -1
- package/chunks/index7.js +14 -13
- package/chunks/index7.js.map +1 -1
- package/chunks/magic-string.es.js +664 -0
- package/chunks/magic-string.es.js.map +1 -0
- package/chunks/react.esm.js +10007 -0
- package/chunks/react.esm.js.map +1 -0
- package/chunks/{collaboration.js → useCollaboration.js} +536 -523
- package/chunks/useCollaboration.js.map +1 -0
- package/chunks/vi.2VT5v0um.js +10573 -0
- package/chunks/vi.2VT5v0um.js.map +1 -0
- package/contexts/ChatContext.d.ts +2 -1
- package/contexts/ChatContext.js +32 -30
- package/contexts/ChatContext.js.map +1 -1
- package/core/interfaces/ChatConfig.d.ts +4 -0
- package/core/interfaces/StoryVersion.d.ts +7 -2
- package/index.d.ts +1 -0
- package/molecules/AiElements/Message.js +1 -1
- package/molecules/AiElements/Response.js +15 -13
- package/molecules/AiElements/Response.js.map +1 -1
- package/molecules/AiElements/Sources.d.ts +2 -2
- package/molecules/AiElements/Sources.js.map +1 -1
- package/molecules/Buttons/Button.d.ts +1 -1
- package/molecules/Buttons/Button.js +2 -2
- package/molecules/{AiElements → CodeBlock}/CodeBlock.d.ts +5 -2
- package/molecules/CodeBlock/CodeBlock.js +128 -0
- package/molecules/CodeBlock/CodeBlock.js.map +1 -0
- package/molecules/CodeBlock/CodeBlock.test.d.ts +1 -0
- package/molecules/CodeBlock/CodeBlock.test.js +3158 -0
- package/molecules/CodeBlock/CodeBlock.test.js.map +1 -0
- package/molecules/CodeBlock/highlightCode.d.ts +2 -0
- package/molecules/CodeBlock/highlightCode.js +5850 -0
- package/molecules/CodeBlock/highlightCode.js.map +1 -0
- package/molecules/CodeBlock/highlightCode.test.d.ts +1 -0
- package/molecules/CodeBlock/highlightCode.test.js +47 -0
- package/molecules/CodeBlock/highlightCode.test.js.map +1 -0
- package/molecules/Collapsibles/Collapsible.js +1 -1
- package/molecules/Forms/InputGroups/InputGroup.js +1 -1
- package/molecules/Labels/Label.js +2 -2
- package/molecules/Notifications/{Sonner.js → Toaster.js} +2 -2
- package/molecules/Notifications/Toaster.js.map +1 -0
- package/molecules/Notifications/{use-toast.js → useToast.js} +1 -1
- package/molecules/Notifications/useToast.js.map +1 -0
- package/{organisms → molecules}/RichText/DynamicEditor.js.map +1 -1
- package/molecules/RichText/EditorWithAI.js +55854 -0
- package/molecules/RichText/EditorWithAI.js.map +1 -0
- package/molecules/RichText/useCollaboration.d.ts +9 -0
- package/molecules/RichText/useCollaboration.js +8 -0
- package/molecules/RichText/useCollaboration.js.map +1 -0
- package/molecules/RichText/useCollaboration.test.d.ts +1 -0
- package/molecules/RichText/useCollaboration.test.js +70 -0
- package/molecules/RichText/useCollaboration.test.js.map +1 -0
- package/molecules/Tabs/Tabs.js +1 -1
- package/organisms/canvas/ApiDocsCanvas.js +15 -15
- package/organisms/canvas/ApiDocsCanvas.js.map +1 -1
- package/organisms/canvas/ReleaseNoteCanvas.js +2 -2
- package/organisms/canvas/ReleaseNoteCanvas.js.map +1 -1
- package/organisms/canvas/StoryCanvas.js +2 -2
- package/organisms/canvas/StoryCanvas.js.map +1 -1
- package/organisms/chat/MessageActions.js +1 -1
- package/organisms/chat/MessageActions.js.map +1 -1
- package/organisms/chat/hooks/useChat.js +1 -1
- package/organisms/chat/hooks/useChat.js.map +1 -1
- package/organisms/chat/hooks/useChatKeyboardsShortcuts.js +16 -33
- package/organisms/chat/hooks/useChatKeyboardsShortcuts.js.map +1 -1
- package/organisms/chat/hooks/useConversations.js +1 -1
- package/organisms/chat/hooks/useConversations.js.map +1 -1
- package/organisms/settings/SettingsModal.js +1 -1
- package/package.json +3 -4
- package/.npm/_logs/2026-01-19T16_54_30_380Z-debug-0.log +0 -19
- package/.npm/_logs/2026-01-19T16_54_30_467Z-debug-0.log +0 -19
- package/.npm/_logs/2026-01-19T16_54_30_553Z-debug-0.log +0 -14
- package/chunks/collaboration.js.map +0 -1
- package/core/collaboration.d.ts +0 -6
- package/core/collaboration.js +0 -5
- package/core/collaboration.js.map +0 -1
- package/molecules/AiElements/CodeBlock.js +0 -6525
- package/molecules/AiElements/CodeBlock.js.map +0 -1
- package/molecules/Notifications/Sonner.js.map +0 -1
- package/molecules/Notifications/use-toast.js.map +0 -1
- package/molecules/index.d.ts +0 -28
- package/molecules/index.js +0 -88
- package/molecules/index.js.map +0 -1
- package/organisms/RichText/EditorWithAI.js +0 -83167
- package/organisms/RichText/EditorWithAI.js.map +0 -1
- /package/molecules/Notifications/{Sonner.d.ts → Toaster.d.ts} +0 -0
- /package/molecules/Notifications/{use-toast.d.ts → useToast.d.ts} +0 -0
- /package/{organisms → molecules}/RichText/DynamicEditor.d.ts +0 -0
- /package/{organisms → molecules}/RichText/DynamicEditor.js +0 -0
- /package/{organisms → molecules}/RichText/EditorWithAI.d.ts +0 -0
|
@@ -3,11 +3,12 @@ import { ChatConfig, ChatUser } from '../core/interfaces';
|
|
|
3
3
|
import { ChatApiClient } from '../core/ChatApiClient';
|
|
4
4
|
export interface ChatProviderProps {
|
|
5
5
|
apiUrl: string;
|
|
6
|
+
collaborationUrl?: string;
|
|
6
7
|
fetcher?: typeof fetch;
|
|
7
8
|
accessToken?: string | null;
|
|
8
9
|
user?: ChatUser | null;
|
|
9
10
|
logout?: () => void;
|
|
10
11
|
}
|
|
11
|
-
export declare function ChatProvider({ apiUrl, fetcher, accessToken, user, logout, children, }: PropsWithChildren<ChatProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function ChatProvider({ apiUrl, collaborationUrl, fetcher, accessToken, user, logout, children, }: PropsWithChildren<ChatProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export declare function useChatConfig(): ChatConfig;
|
|
13
14
|
export declare function useChatApiClient(): ChatApiClient;
|
package/contexts/ChatContext.js
CHANGED
|
@@ -1,64 +1,66 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { C as
|
|
3
|
+
import { createContext as m, useContext as h, useRef as A, useState as I, useEffect as P, useMemo as a } from "react";
|
|
4
|
+
import { C as E } from "../chunks/ChatApiClient.js";
|
|
5
5
|
import { ChatJiraProvider as b } from "./ChatJiraContext.js";
|
|
6
|
-
import { getStoredUserId as
|
|
7
|
-
const c =
|
|
8
|
-
function
|
|
6
|
+
import { getStoredUserId as g, setStoredUserId as f } from "../utils/user-storage.js";
|
|
7
|
+
const c = m(null), p = m(null);
|
|
8
|
+
function j({
|
|
9
9
|
apiUrl: e,
|
|
10
|
+
collaborationUrl: s,
|
|
10
11
|
fetcher: i,
|
|
11
|
-
accessToken:
|
|
12
|
-
user:
|
|
12
|
+
accessToken: r,
|
|
13
|
+
user: n,
|
|
13
14
|
logout: u,
|
|
14
|
-
children:
|
|
15
|
+
children: v
|
|
15
16
|
}) {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
const
|
|
17
|
+
const C = A(n ?? null), [l, d] = I(g());
|
|
18
|
+
P(() => {
|
|
19
|
+
C.current = n ?? null;
|
|
20
|
+
}, [n]);
|
|
21
|
+
const w = a(() => new E(e, {
|
|
21
22
|
fetcher: i,
|
|
22
|
-
getAccessToken: () =>
|
|
23
|
+
getAccessToken: () => r || null,
|
|
23
24
|
getCurrentUser: () => {
|
|
24
|
-
const t =
|
|
25
|
+
const t = C.current;
|
|
25
26
|
return t ? {
|
|
26
27
|
userId: t.userId,
|
|
27
28
|
userEmail: t.userEmail,
|
|
28
29
|
userName: t.userName
|
|
29
30
|
} : null;
|
|
30
31
|
}
|
|
31
|
-
}), [
|
|
32
|
+
}), [r, e, i]), x = a(() => ({
|
|
32
33
|
apiUrl: e,
|
|
34
|
+
collaborationUrl: s,
|
|
33
35
|
fetcher: i,
|
|
34
|
-
accessToken:
|
|
35
|
-
user:
|
|
36
|
-
isAuthenticated: !!(
|
|
36
|
+
accessToken: r ?? null,
|
|
37
|
+
user: n ?? null,
|
|
38
|
+
isAuthenticated: !!(r && n),
|
|
37
39
|
dbUserId: l,
|
|
38
40
|
logout() {
|
|
39
|
-
|
|
41
|
+
f(null), d(null), u == null || u();
|
|
40
42
|
},
|
|
41
43
|
setDbUserId(t) {
|
|
42
|
-
|
|
44
|
+
f(t), d(t);
|
|
43
45
|
}
|
|
44
|
-
}), [
|
|
45
|
-
return /* @__PURE__ */ o(c.Provider, { value:
|
|
46
|
+
}), [r, e, s, l, i, u, n]);
|
|
47
|
+
return /* @__PURE__ */ o(c.Provider, { value: x, children: /* @__PURE__ */ o(p.Provider, { value: w, children: /* @__PURE__ */ o(b, { children: v }) }) });
|
|
46
48
|
}
|
|
47
|
-
function
|
|
48
|
-
const e =
|
|
49
|
+
function B() {
|
|
50
|
+
const e = h(c);
|
|
49
51
|
if (!e)
|
|
50
52
|
throw new Error("useChatConfig must be used within a ChatProvider");
|
|
51
53
|
return e;
|
|
52
54
|
}
|
|
53
|
-
function
|
|
54
|
-
const e =
|
|
55
|
+
function J() {
|
|
56
|
+
const e = h(p);
|
|
55
57
|
if (!e)
|
|
56
58
|
throw new Error("useChatApiClient must be used within a ChatProvider");
|
|
57
59
|
return e;
|
|
58
60
|
}
|
|
59
61
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
j as ChatProvider,
|
|
63
|
+
J as useChatApiClient,
|
|
64
|
+
B as useChatConfig
|
|
63
65
|
};
|
|
64
66
|
//# sourceMappingURL=ChatContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContext.js","sources":["../../lib/contexts/ChatContext.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type PropsWithChildren,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport type {ChatConfig, ChatUser} from \"../core/interfaces\";\nimport {ChatApiClient} from \"@clubmed/usg-chat-ui/core/ChatApiClient\";\nimport {ChatJiraProvider} from \"@clubmed/usg-chat-ui/contexts/ChatJiraContext\";\nimport {getStoredUserId, setStoredUserId} from \"@clubmed/usg-chat-ui/utils/user-storage\";\n\n\nconst ChatConfigContext = createContext<ChatConfig | null>(null);\nconst ChatApiClientContext = createContext<ChatApiClient | null>(null);\n\nexport interface ChatProviderProps {\n apiUrl: string;\n fetcher?: typeof fetch;\n accessToken?: string | null;\n user?: ChatUser | null;\n logout?: () => void;\n}\n\nexport function ChatProvider({\n apiUrl,\n fetcher,\n accessToken,\n user,\n logout,\n children,\n }: PropsWithChildren<ChatProviderProps>) {\n const userRef = useRef<ChatUser | null>(user ?? null);\n const [dbUserId, setDbUserId] = useState<string | null>(getStoredUserId());\n\n useEffect(() => {\n userRef.current = user ?? null;\n }, [user]);\n\n const apiClient = useMemo(() => {\n return new ChatApiClient(apiUrl, {\n fetcher,\n getAccessToken: () => accessToken || null,\n getCurrentUser: () => {\n const user = userRef.current;\n if (!user) {\n return null;\n }\n return {\n userId: user.userId,\n userEmail: user.userEmail,\n userName: user.userName,\n };\n },\n });\n }, [accessToken, apiUrl, fetcher]);\n\n const config = useMemo(() => ({\n apiUrl,\n fetcher,\n accessToken: accessToken ?? null,\n user: user ?? null,\n isAuthenticated: Boolean(accessToken && user),\n dbUserId,\n logout() {\n setStoredUserId(null);\n setDbUserId(null);\n logout?.();\n },\n setDbUserId(userId: string | null) {\n setStoredUserId(userId);\n setDbUserId(userId);\n }\n }), [accessToken, apiUrl, dbUserId, fetcher, logout, user])\n\n return (\n <ChatConfigContext.Provider value={config}>\n <ChatApiClientContext.Provider value={apiClient}>\n <ChatJiraProvider>\n {children}\n </ChatJiraProvider>\n </ChatApiClientContext.Provider>\n </ChatConfigContext.Provider>\n );\n}\n\nexport function useChatConfig(): ChatConfig {\n const config = useContext(ChatConfigContext);\n\n if (!config) {\n throw new Error(\"useChatConfig must be used within a ChatProvider\");\n }\n\n return config;\n}\n\nexport function useChatApiClient(): ChatApiClient {\n const apiClient = useContext(ChatApiClientContext);\n\n if (!apiClient) {\n throw new Error(\"useChatApiClient must be used within a ChatProvider\");\n }\n\n return apiClient;\n}\n"],"names":["ChatConfigContext","createContext","ChatApiClientContext","ChatProvider","apiUrl","fetcher","accessToken","user","logout","children","userRef","useRef","dbUserId","setDbUserId","useState","getStoredUserId","useEffect","apiClient","useMemo","ChatApiClient","config","setStoredUserId","userId","jsx","ChatJiraProvider","useChatConfig","useContext","useChatApiClient"],"mappings":";;;;;;AAiBA,MAAMA,IAAoBC,EAAiC,IAAI,GACzDC,IAAuBD,EAAoC,IAAI;
|
|
1
|
+
{"version":3,"file":"ChatContext.js","sources":["../../lib/contexts/ChatContext.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type PropsWithChildren,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport type {ChatConfig, ChatUser} from \"../core/interfaces\";\nimport {ChatApiClient} from \"@clubmed/usg-chat-ui/core/ChatApiClient\";\nimport {ChatJiraProvider} from \"@clubmed/usg-chat-ui/contexts/ChatJiraContext\";\nimport {getStoredUserId, setStoredUserId} from \"@clubmed/usg-chat-ui/utils/user-storage\";\n\n\nconst ChatConfigContext = createContext<ChatConfig | null>(null);\nconst ChatApiClientContext = createContext<ChatApiClient | null>(null);\n\nexport interface ChatProviderProps {\n apiUrl: string;\n collaborationUrl?: string;\n fetcher?: typeof fetch;\n accessToken?: string | null;\n user?: ChatUser | null;\n logout?: () => void;\n}\n\nexport function ChatProvider({\n apiUrl,\n collaborationUrl,\n fetcher,\n accessToken,\n user,\n logout,\n children,\n }: PropsWithChildren<ChatProviderProps>) {\n const userRef = useRef<ChatUser | null>(user ?? null);\n const [dbUserId, setDbUserId] = useState<string | null>(getStoredUserId());\n\n useEffect(() => {\n userRef.current = user ?? null;\n }, [user]);\n\n const apiClient = useMemo(() => {\n return new ChatApiClient(apiUrl, {\n fetcher,\n getAccessToken: () => accessToken || null,\n getCurrentUser: () => {\n const user = userRef.current;\n if (!user) {\n return null;\n }\n return {\n userId: user.userId,\n userEmail: user.userEmail,\n userName: user.userName,\n };\n },\n });\n }, [accessToken, apiUrl, fetcher]);\n\n const config = useMemo(() => ({\n apiUrl,\n collaborationUrl,\n fetcher,\n accessToken: accessToken ?? null,\n user: user ?? null,\n isAuthenticated: Boolean(accessToken && user),\n dbUserId,\n logout() {\n setStoredUserId(null);\n setDbUserId(null);\n logout?.();\n },\n setDbUserId(userId: string | null) {\n setStoredUserId(userId);\n setDbUserId(userId);\n }\n }), [accessToken, apiUrl, collaborationUrl, dbUserId, fetcher, logout, user])\n\n return (\n <ChatConfigContext.Provider value={config}>\n <ChatApiClientContext.Provider value={apiClient}>\n <ChatJiraProvider>\n {children}\n </ChatJiraProvider>\n </ChatApiClientContext.Provider>\n </ChatConfigContext.Provider>\n );\n}\n\nexport function useChatConfig(): ChatConfig {\n const config = useContext(ChatConfigContext);\n\n if (!config) {\n throw new Error(\"useChatConfig must be used within a ChatProvider\");\n }\n\n return config;\n}\n\nexport function useChatApiClient(): ChatApiClient {\n const apiClient = useContext(ChatApiClientContext);\n\n if (!apiClient) {\n throw new Error(\"useChatApiClient must be used within a ChatProvider\");\n }\n\n return apiClient;\n}\n"],"names":["ChatConfigContext","createContext","ChatApiClientContext","ChatProvider","apiUrl","collaborationUrl","fetcher","accessToken","user","logout","children","userRef","useRef","dbUserId","setDbUserId","useState","getStoredUserId","useEffect","apiClient","useMemo","ChatApiClient","config","setStoredUserId","userId","jsx","ChatJiraProvider","useChatConfig","useContext","useChatApiClient"],"mappings":";;;;;;AAiBA,MAAMA,IAAoBC,EAAiC,IAAI,GACzDC,IAAuBD,EAAoC,IAAI;AAW9D,SAASE,EAAa;AAAA,EACE,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AACF,GAAyC;AACpE,QAAMC,IAAUC,EAAwBJ,KAAQ,IAAI,GAC9C,CAACK,GAAUC,CAAW,IAAIC,EAAwBC,GAAiB;AAEzE,EAAAC,EAAU,MAAM;AACd,IAAAN,EAAQ,UAAUH,KAAQ;AAAA,EAC5B,GAAG,CAACA,CAAI,CAAC;AAET,QAAMU,IAAYC,EAAQ,MACjB,IAAIC,EAAchB,GAAQ;AAAA,IAC/B,SAAAE;AAAA,IACA,gBAAgB,MAAMC,KAAe;AAAA,IACrC,gBAAgB,MAAM;AACpB,YAAMC,IAAOG,EAAQ;AACrB,aAAKH,IAGE;AAAA,QACL,QAAQA,EAAK;AAAA,QACb,WAAWA,EAAK;AAAA,QAChB,UAAUA,EAAK;AAAA,MAAA,IALR;AAAA,IAOX;AAAA,EAAA,CACD,GACA,CAACD,GAAaH,GAAQE,CAAO,CAAC,GAE3Be,IAASF,EAAQ,OAAO;AAAA,IAC5B,QAAAf;AAAA,IACA,kBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAaC,KAAe;AAAA,IAC5B,MAAMC,KAAQ;AAAA,IACd,iBAAiB,GAAQD,KAAeC;AAAA,IACxC,UAAAK;AAAA,IACA,SAAS;AACP,MAAAS,EAAgB,IAAI,GACpBR,EAAY,IAAI,GAChBL,KAAA,QAAAA;AAAA,IACF;AAAA,IACA,YAAYc,GAAuB;AACjC,MAAAD,EAAgBC,CAAM,GACtBT,EAAYS,CAAM;AAAA,IACpB;AAAA,EAAA,IACE,CAAChB,GAAaH,GAAQC,GAAkBQ,GAAUP,GAASG,GAAQD,CAAI,CAAC;AAE5E,2BACGR,EAAkB,UAAlB,EAA2B,OAAOqB,GACjC,UAAA,gBAAAG,EAACtB,EAAqB,UAArB,EAA8B,OAAOgB,GACpC,UAAA,gBAAAM,EAACC,GAAA,EACE,UAAAf,EAAA,CACH,GACF,GACF;AAEJ;AAEO,SAASgB,IAA4B;AAC1C,QAAML,IAASM,EAAW3B,CAAiB;AAE3C,MAAI,CAACqB;AACH,UAAM,IAAI,MAAM,kDAAkD;AAGpE,SAAOA;AACT;AAEO,SAASO,IAAkC;AAChD,QAAMV,IAAYS,EAAWzB,CAAoB;AAEjD,MAAI,CAACgB;AACH,UAAM,IAAI,MAAM,qDAAqD;AAGvE,SAAOA;AACT;"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { StructuredBrief } from './StructuredBrief';
|
|
2
2
|
import { ValidationResult } from './ValidationResult';
|
|
3
|
+
export type AcceptanceCriterion = string | {
|
|
4
|
+
description: string;
|
|
5
|
+
notes?: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
3
8
|
export interface StoryVersion {
|
|
4
9
|
id: string;
|
|
5
10
|
versionNumber: number;
|
|
6
11
|
title: string;
|
|
7
12
|
description: string;
|
|
8
|
-
acceptanceCriteria:
|
|
9
|
-
technicalConsiderations?: unknown;
|
|
13
|
+
acceptanceCriteria: AcceptanceCriterion[];
|
|
14
|
+
technicalConsiderations?: Record<string, unknown> | string | null;
|
|
10
15
|
storyPoints?: number;
|
|
11
16
|
priority: string;
|
|
12
17
|
labels: string[];
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cn as a } from "../../utils/cn.js";
|
|
3
|
-
import { c as i } from "../../chunks/
|
|
3
|
+
import { c as i } from "../../chunks/index2.js";
|
|
4
4
|
const d = ({ className: s, from: r, ...t }) => /* @__PURE__ */ e(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
import { jsxs as $, jsx as h, Fragment as B } from "react/jsx-runtime";
|
|
3
3
|
import { cn as U } from "../../utils/cn.js";
|
|
4
4
|
import { memo as Y } from "react";
|
|
5
|
-
import { CodeBlock as z, CodeBlockCopyButton as K } from "
|
|
5
|
+
import { CodeBlock as z, CodeBlockCopyButton as K } from "../CodeBlock/CodeBlock.js";
|
|
6
6
|
import { o as v, V as F, p as W, u as q, r as Z, a as Q, b as ee, c as re, v as te, d as ne } from "../../chunks/index7.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import { s as C, h as se, w as oe, f as ae, a as ie, b as le } from "../../chunks/index6.js";
|
|
8
|
+
import { c as w, g as ce } from "../../chunks/_commonjsHelpers.js";
|
|
9
|
+
const ue = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, me = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, pe = {};
|
|
10
|
+
function R(e, r) {
|
|
11
|
+
return (pe.jsx ? me : ue).test(e);
|
|
12
|
+
}
|
|
13
|
+
const fe = {
|
|
9
14
|
classId: "classID",
|
|
10
15
|
dataType: "datatype",
|
|
11
16
|
itemId: "itemID",
|
|
@@ -23,10 +28,7 @@ const ue = {
|
|
|
23
28
|
xLinkTitle: "xlinkTitle",
|
|
24
29
|
xLinkType: "xlinkType",
|
|
25
30
|
xmlnsXLink: "xmlnsXlink"
|
|
26
|
-
}
|
|
27
|
-
function R(e, r) {
|
|
28
|
-
return (fe.jsx ? pe : me).test(e);
|
|
29
|
-
}
|
|
31
|
+
};
|
|
30
32
|
var N = {}, O = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, de = /\n/g, he = /^\s*/, ye = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, ge = /^:\s*/, xe = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, ve = /^[;\s]*/, Ee = /^\s+|\s+$/g, we = `
|
|
31
33
|
`, j = "/", A = "*", x = "", be = "comment", ke = "declaration";
|
|
32
34
|
function _e(e, r) {
|
|
@@ -153,7 +155,7 @@ function _(e, r) {
|
|
|
153
155
|
}
|
|
154
156
|
_.default = _;
|
|
155
157
|
var Ge = _;
|
|
156
|
-
const He = /* @__PURE__ */
|
|
158
|
+
const He = /* @__PURE__ */ ce(Ge), S = {}.hasOwnProperty, Je = /* @__PURE__ */ new Map(), Ve = /[A-Z]/g, $e = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Be = /* @__PURE__ */ new Set(["td", "th"]), X = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
157
159
|
function Ue(e, r) {
|
|
158
160
|
if (!r || r.Fragment === void 0)
|
|
159
161
|
throw new TypeError("Expected `Fragment` in options");
|
|
@@ -183,7 +185,7 @@ function Ue(e, r) {
|
|
|
183
185
|
ignoreInvalidStyle: r.ignoreInvalidStyle || !1,
|
|
184
186
|
passKeys: r.passKeys !== !1,
|
|
185
187
|
passNode: r.passNode || !1,
|
|
186
|
-
schema: r.space === "svg" ? C :
|
|
188
|
+
schema: r.space === "svg" ? C : se,
|
|
187
189
|
stylePropertyNameCase: r.stylePropertyNameCase || "dom",
|
|
188
190
|
tableCellAlignToStyle: r.tableCellAlignToStyle !== !1
|
|
189
191
|
}, o = G(s, e, void 0);
|
|
@@ -215,7 +217,7 @@ function Ye(e, r, t) {
|
|
|
215
217
|
const o = J(e, r.tagName, !1), l = rr(e, r);
|
|
216
218
|
let i = P(e, r);
|
|
217
219
|
return $e.has(r.tagName) && (i = i.filter(function(u) {
|
|
218
|
-
return typeof u == "string" ? !
|
|
220
|
+
return typeof u == "string" ? !oe(u) : !0;
|
|
219
221
|
})), H(e, l, o, r), T(l, i), e.ancestors.pop(), e.schema = n, e.create(r, o, l, t);
|
|
220
222
|
}
|
|
221
223
|
function ze(e, r) {
|
|
@@ -354,14 +356,14 @@ function P(e, r) {
|
|
|
354
356
|
return t;
|
|
355
357
|
}
|
|
356
358
|
function nr(e, r, t) {
|
|
357
|
-
const n =
|
|
359
|
+
const n = ae(e.schema, r);
|
|
358
360
|
if (!(t == null || typeof t == "number" && Number.isNaN(t))) {
|
|
359
|
-
if (Array.isArray(t) && (t = n.commaSeparated ?
|
|
361
|
+
if (Array.isArray(t) && (t = n.commaSeparated ? ie(t) : le(t)), n.property === "style") {
|
|
360
362
|
let s = typeof t == "object" ? t : sr(e, String(t));
|
|
361
363
|
return e.stylePropertyNameCase === "css" && (s = or(s)), ["style", s];
|
|
362
364
|
}
|
|
363
365
|
return [
|
|
364
|
-
e.elementAttributeNameCase === "react" && n.space ?
|
|
366
|
+
e.elementAttributeNameCase === "react" && n.space ? fe[n.property] || n.property : n.attribute,
|
|
365
367
|
t
|
|
366
368
|
];
|
|
367
369
|
}
|