@clubmed/usg-chat-ui 1.0.1 → 1.2.4

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.
Files changed (106) hide show
  1. package/chunks/_commonjsHelpers.js +9 -0
  2. package/chunks/_commonjsHelpers.js.map +1 -0
  3. package/chunks/browser.js +579 -0
  4. package/chunks/browser.js.map +1 -0
  5. package/chunks/client.js +27323 -0
  6. package/chunks/client.js.map +1 -0
  7. package/chunks/index.js +59 -32
  8. package/chunks/index.js.map +1 -1
  9. package/chunks/index2.js +32 -59
  10. package/chunks/index2.js.map +1 -1
  11. package/chunks/index3.js +22 -740
  12. package/chunks/index3.js.map +1 -1
  13. package/chunks/index4.js +740 -22
  14. package/chunks/index4.js.map +1 -1
  15. package/chunks/index5.js +1 -1
  16. package/chunks/index6.js +144 -150
  17. package/chunks/index6.js.map +1 -1
  18. package/chunks/index7.js +14 -13
  19. package/chunks/index7.js.map +1 -1
  20. package/chunks/magic-string.es.js +664 -0
  21. package/chunks/magic-string.es.js.map +1 -0
  22. package/chunks/react.esm.js +10007 -0
  23. package/chunks/react.esm.js.map +1 -0
  24. package/chunks/{collaboration.js → useCollaboration.js} +536 -523
  25. package/chunks/useCollaboration.js.map +1 -0
  26. package/chunks/vi.2VT5v0um.js +10573 -0
  27. package/chunks/vi.2VT5v0um.js.map +1 -0
  28. package/contexts/ChatContext.d.ts +2 -1
  29. package/contexts/ChatContext.js +32 -30
  30. package/contexts/ChatContext.js.map +1 -1
  31. package/core/interfaces/ChatConfig.d.ts +4 -0
  32. package/core/interfaces/StoryVersion.d.ts +7 -2
  33. package/index.d.ts +1 -0
  34. package/molecules/AiElements/Message.js +1 -1
  35. package/molecules/AiElements/Response.js +15 -13
  36. package/molecules/AiElements/Response.js.map +1 -1
  37. package/molecules/AiElements/Sources.d.ts +2 -2
  38. package/molecules/AiElements/Sources.js.map +1 -1
  39. package/molecules/Buttons/Button.d.ts +1 -1
  40. package/molecules/Buttons/Button.js +2 -2
  41. package/molecules/{AiElements → CodeBlock}/CodeBlock.d.ts +5 -2
  42. package/molecules/CodeBlock/CodeBlock.js +128 -0
  43. package/molecules/CodeBlock/CodeBlock.js.map +1 -0
  44. package/molecules/CodeBlock/CodeBlock.test.d.ts +1 -0
  45. package/molecules/CodeBlock/CodeBlock.test.js +3158 -0
  46. package/molecules/CodeBlock/CodeBlock.test.js.map +1 -0
  47. package/molecules/CodeBlock/highlightCode.d.ts +2 -0
  48. package/molecules/CodeBlock/highlightCode.js +5850 -0
  49. package/molecules/CodeBlock/highlightCode.js.map +1 -0
  50. package/molecules/CodeBlock/highlightCode.test.d.ts +1 -0
  51. package/molecules/CodeBlock/highlightCode.test.js +47 -0
  52. package/molecules/CodeBlock/highlightCode.test.js.map +1 -0
  53. package/molecules/Collapsibles/Collapsible.js +1 -1
  54. package/molecules/Forms/InputGroups/InputGroup.js +1 -1
  55. package/molecules/Labels/Label.js +2 -2
  56. package/molecules/Notifications/{Sonner.js → Toaster.js} +2 -2
  57. package/molecules/Notifications/Toaster.js.map +1 -0
  58. package/molecules/Notifications/{use-toast.js → useToast.js} +1 -1
  59. package/molecules/Notifications/useToast.js.map +1 -0
  60. package/{organisms → molecules}/RichText/DynamicEditor.js.map +1 -1
  61. package/molecules/RichText/EditorWithAI.js +55854 -0
  62. package/molecules/RichText/EditorWithAI.js.map +1 -0
  63. package/molecules/RichText/useCollaboration.d.ts +9 -0
  64. package/molecules/RichText/useCollaboration.js +8 -0
  65. package/molecules/RichText/useCollaboration.js.map +1 -0
  66. package/molecules/RichText/useCollaboration.test.d.ts +1 -0
  67. package/molecules/RichText/useCollaboration.test.js +70 -0
  68. package/molecules/RichText/useCollaboration.test.js.map +1 -0
  69. package/molecules/Tabs/Tabs.js +1 -1
  70. package/organisms/canvas/ApiDocsCanvas.js +15 -15
  71. package/organisms/canvas/ApiDocsCanvas.js.map +1 -1
  72. package/organisms/canvas/ReleaseNoteCanvas.js +2 -2
  73. package/organisms/canvas/ReleaseNoteCanvas.js.map +1 -1
  74. package/organisms/canvas/StoryCanvas.js +2 -2
  75. package/organisms/canvas/StoryCanvas.js.map +1 -1
  76. package/organisms/chat/MessageActions.js +1 -1
  77. package/organisms/chat/MessageActions.js.map +1 -1
  78. package/organisms/chat/hooks/useChat.js +1 -1
  79. package/organisms/chat/hooks/useChat.js.map +1 -1
  80. package/organisms/chat/hooks/useChatKeyboardsShortcuts.js +16 -33
  81. package/organisms/chat/hooks/useChatKeyboardsShortcuts.js.map +1 -1
  82. package/organisms/chat/hooks/useConversations.js +1 -1
  83. package/organisms/chat/hooks/useConversations.js.map +1 -1
  84. package/organisms/settings/SettingsModal.js +1 -1
  85. package/package.json +3 -4
  86. package/.npm/_logs/2026-01-19T16_54_30_380Z-debug-0.log +0 -19
  87. package/.npm/_logs/2026-01-19T16_54_30_467Z-debug-0.log +0 -19
  88. package/.npm/_logs/2026-01-19T16_54_30_553Z-debug-0.log +0 -14
  89. package/chunks/collaboration.js.map +0 -1
  90. package/core/collaboration.d.ts +0 -6
  91. package/core/collaboration.js +0 -5
  92. package/core/collaboration.js.map +0 -1
  93. package/molecules/AiElements/CodeBlock.js +0 -6525
  94. package/molecules/AiElements/CodeBlock.js.map +0 -1
  95. package/molecules/Notifications/Sonner.js.map +0 -1
  96. package/molecules/Notifications/use-toast.js.map +0 -1
  97. package/molecules/index.d.ts +0 -28
  98. package/molecules/index.js +0 -88
  99. package/molecules/index.js.map +0 -1
  100. package/organisms/RichText/EditorWithAI.js +0 -83167
  101. package/organisms/RichText/EditorWithAI.js.map +0 -1
  102. /package/molecules/Notifications/{Sonner.d.ts → Toaster.d.ts} +0 -0
  103. /package/molecules/Notifications/{use-toast.d.ts → useToast.d.ts} +0 -0
  104. /package/{organisms → molecules}/RichText/DynamicEditor.d.ts +0 -0
  105. /package/{organisms → molecules}/RichText/DynamicEditor.js +0 -0
  106. /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;
@@ -1,64 +1,66 @@
1
1
  "use client";
2
2
  import { jsx as o } from "react/jsx-runtime";
3
- import { createContext as f, useContext as m, useRef as x, useState as A, useEffect as I, useMemo as a } from "react";
4
- import { C as P } from "../chunks/ChatApiClient.js";
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 E, setStoredUserId as d } from "../utils/user-storage.js";
7
- const c = f(null), h = f(null);
8
- function R({
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: n,
12
- user: r,
12
+ accessToken: r,
13
+ user: n,
13
14
  logout: u,
14
- children: p
15
+ children: v
15
16
  }) {
16
- const s = x(r ?? null), [l, C] = A(E());
17
- I(() => {
18
- s.current = r ?? null;
19
- }, [r]);
20
- const v = a(() => new P(e, {
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: () => n || null,
23
+ getAccessToken: () => r || null,
23
24
  getCurrentUser: () => {
24
- const t = s.current;
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
- }), [n, e, i]), w = a(() => ({
32
+ }), [r, e, i]), x = a(() => ({
32
33
  apiUrl: e,
34
+ collaborationUrl: s,
33
35
  fetcher: i,
34
- accessToken: n ?? null,
35
- user: r ?? null,
36
- isAuthenticated: !!(n && r),
36
+ accessToken: r ?? null,
37
+ user: n ?? null,
38
+ isAuthenticated: !!(r && n),
37
39
  dbUserId: l,
38
40
  logout() {
39
- d(null), C(null), u == null || u();
41
+ f(null), d(null), u == null || u();
40
42
  },
41
43
  setDbUserId(t) {
42
- d(t), C(t);
44
+ f(t), d(t);
43
45
  }
44
- }), [n, e, l, i, u, r]);
45
- return /* @__PURE__ */ o(c.Provider, { value: w, children: /* @__PURE__ */ o(h.Provider, { value: v, children: /* @__PURE__ */ o(b, { children: p }) }) });
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 j() {
48
- const e = m(c);
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 B() {
54
- const e = m(h);
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
- R as ChatProvider,
61
- B as useChatApiClient,
62
- j as useChatConfig
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;AAU9D,SAASE,EAAa;AAAA,EACE,QAAAC;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,EAAcf,GAAQ;AAAA,IAC/B,SAAAC;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,GAAaF,GAAQC,CAAO,CAAC,GAE3Be,IAASF,EAAQ,OAAO;AAAA,IAC5B,QAAAd;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,GAAaF,GAAQQ,GAAUP,GAASG,GAAQD,CAAI,CAAC;AAE1D,2BACGP,EAAkB,UAAlB,EAA2B,OAAOoB,GACjC,UAAA,gBAAAG,EAACrB,EAAqB,UAArB,EAA8B,OAAOe,GACpC,UAAA,gBAAAM,EAACC,GAAA,EACE,UAAAf,EAAA,CACH,GACF,GACF;AAEJ;AAEO,SAASgB,IAA4B;AAC1C,QAAML,IAASM,EAAW1B,CAAiB;AAE3C,MAAI,CAACoB;AACH,UAAM,IAAI,MAAM,kDAAkD;AAGpE,SAAOA;AACT;AAEO,SAASO,IAAkC;AAChD,QAAMV,IAAYS,EAAWxB,CAAoB;AAEjD,MAAI,CAACe;AACH,UAAM,IAAI,MAAM,qDAAqD;AAGvE,SAAOA;AACT;"}
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;"}
@@ -4,6 +4,10 @@ export interface ChatConfig {
4
4
  * Base URL for backend requests (e.g. https://api.example.com).
5
5
  */
6
6
  apiUrl: string;
7
+ /**
8
+ * Url to y-sweet collaboration service
9
+ */
10
+ collaborationUrl?: string;
7
11
  /**
8
12
  * Optional custom fetch implementation.
9
13
  */
@@ -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: unknown[];
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,2 +1,3 @@
1
1
  export type * from './core/interfaces';
2
2
  export type * from './utils/canvas-store';
3
+ export {};
@@ -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/index.js";
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 "./CodeBlock.js";
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 { c as w, g as se, s as C, h as oe, w as ae, f as ie, a as le, b as ce } from "../../chunks/index6.js";
8
- const ue = {
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
- }, me = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, pe = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, fe = {};
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__ */ se(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";
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 : oe,
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" ? !ae(u) : !0;
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 = ie(e.schema, r);
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 ? le(t) : ce(t)), n.property === "style") {
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 ? ue[n.property] || n.property : n.attribute,
366
+ e.elementAttributeNameCase === "react" && n.space ? fe[n.property] || n.property : n.attribute,
365
367
  t
366
368
  ];
367
369
  }