@cossistant/react 0.0.13 → 0.0.16
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/hooks/index.d.ts +2 -1
- package/hooks/index.js +2 -1
- package/hooks/use-home-page.js +1 -1
- package/hooks/use-home-page.js.map +1 -1
- package/hooks/use-scroll-mask.d.ts +24 -0
- package/hooks/use-scroll-mask.d.ts.map +1 -0
- package/hooks/use-scroll-mask.js +90 -0
- package/hooks/use-scroll-mask.js.map +1 -0
- package/hooks/use-send-message.js +1 -1
- package/hooks/use-send-message.js.map +1 -1
- package/index.d.ts +7 -2
- package/index.js +9 -5
- package/package.json +3 -3
- package/parse.d.ts.map +1 -1
- package/primitives/bubble.d.ts +10 -2
- package/primitives/bubble.d.ts.map +1 -1
- package/primitives/bubble.js +11 -3
- package/primitives/bubble.js.map +1 -1
- package/primitives/conversation-timeline.d.ts.map +1 -1
- package/primitives/conversation-timeline.js +10 -20
- package/primitives/conversation-timeline.js.map +1 -1
- package/primitives/index.d.ts +5 -2
- package/primitives/index.js +11 -3
- package/primitives/index.parts.d.ts +4 -1
- package/primitives/index.parts.js +5 -2
- package/primitives/page-registry.d.ts +30 -0
- package/primitives/page-registry.d.ts.map +1 -0
- package/primitives/page-registry.js +45 -0
- package/primitives/page-registry.js.map +1 -0
- package/primitives/page.d.ts +21 -0
- package/primitives/page.d.ts.map +1 -0
- package/primitives/page.js +18 -0
- package/primitives/page.js.map +1 -0
- package/primitives/router.d.ts +35 -0
- package/primitives/router.d.ts.map +1 -0
- package/primitives/router.js +22 -0
- package/primitives/router.js.map +1 -0
- package/primitives/window.d.ts +8 -3
- package/primitives/window.d.ts.map +1 -1
- package/primitives/window.js +8 -3
- package/primitives/window.js.map +1 -1
- package/realtime/index.js +1 -1
- package/realtime/provider.js +1 -1
- package/realtime/support-provider.js +0 -4
- package/realtime/support-provider.js.map +1 -1
- package/realtime-events.d.ts +1 -1
- package/schemas2.d.ts.map +1 -1
- package/support/components/avatar-stack.js +1 -1
- package/support/components/avatar-stack.js.map +1 -1
- package/support/components/bubble.js +1 -1
- package/support/components/bubble.js.map +1 -1
- package/support/components/button.d.ts +1 -1
- package/support/components/button.js +3 -3
- package/support/components/button.js.map +1 -1
- package/support/components/container.js +1 -1
- package/support/components/container.js.map +1 -1
- package/support/components/conversation-timeline.js +1 -1
- package/support/components/conversation-timeline.js.map +1 -1
- package/support/components/multimodal-input.js +2 -2
- package/support/components/multimodal-input.js.map +1 -1
- package/support/components/support-content.d.ts +5 -7
- package/support/components/support-content.d.ts.map +1 -1
- package/support/components/support-content.js +9 -11
- package/support/components/support-content.js.map +1 -1
- package/support/components/theme-wrapper.d.ts +15 -0
- package/support/components/theme-wrapper.d.ts.map +1 -0
- package/support/components/theme-wrapper.js +18 -0
- package/support/components/theme-wrapper.js.map +1 -0
- package/support/components/timeline-identification-tool.js +2 -2
- package/support/components/timeline-identification-tool.js.map +1 -1
- package/support/components/watermark.js +2 -2
- package/support/components/watermark.js.map +1 -1
- package/support/index.d.ts +36 -6
- package/support/index.d.ts.map +1 -1
- package/support/index.js +43 -20
- package/support/index.js.map +1 -1
- package/support/pages/articles.d.ts +4 -1
- package/support/pages/articles.d.ts.map +1 -1
- package/support/pages/articles.js +1 -1
- package/support/pages/articles.js.map +1 -1
- package/support/pages/conversation-history.d.ts +5 -10
- package/support/pages/conversation-history.d.ts.map +1 -1
- package/support/pages/conversation-history.js +2 -9
- package/support/pages/conversation-history.js.map +1 -1
- package/support/pages/conversation.d.ts +17 -12
- package/support/pages/conversation.d.ts.map +1 -1
- package/support/pages/conversation.js +5 -2
- package/support/pages/conversation.js.map +1 -1
- package/support/pages/home.d.ts +5 -12
- package/support/pages/home.d.ts.map +1 -1
- package/support/pages/home.js +3 -12
- package/support/pages/home.js.map +1 -1
- package/support/router.d.ts +9 -4
- package/support/router.d.ts.map +1 -1
- package/support/router.js +34 -15
- package/support/router.js.map +1 -1
- package/support/store/support-store.d.ts +17 -14
- package/support/store/support-store.d.ts.map +1 -1
- package/support/store/support-store.js +13 -10
- package/support/store/support-store.js.map +1 -1
- package/support/{support-DfYemt9I.css → support-BQhCt9Za.css} +80 -128
- package/support/support-BQhCt9Za.css.map +1 -0
- package/support/types.d.ts +28 -0
- package/support/types.d.ts.map +1 -0
- package/support/types.js +1 -0
- package/support.css +1 -1
- package/tailwind.css +79 -127
- package/utils/conversation.d.ts.map +1 -1
- package/utils/conversation.js +3 -1
- package/utils/conversation.js.map +1 -1
- package/utils/use-render-element.d.ts.map +1 -1
- package/zod-extensions.d.ts.map +1 -1
- package/index4.d.ts +0 -18
- package/index4.d.ts.map +0 -1
- package/index5.d.ts +0 -999
- package/index5.d.ts.map +0 -1
- package/index6.d.ts +0 -6
- package/react.d.ts +0 -4
- package/support/components/text-effect.d.ts +0 -53
- package/support/components/text-effect.d.ts.map +0 -1
- package/support/components/text-effect.js +0 -225
- package/support/components/text-effect.js.map +0 -1
- package/support/support-DfYemt9I.css.map +0 -1
- package/types.d-BJcRxCew.d.ts +0 -39
- package/types.d-BJcRxCew.d.ts.map +0 -1
|
@@ -13,16 +13,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
|
|
14
14
|
//#region src/support/pages/conversation-history.tsx
|
|
15
15
|
/**
|
|
16
|
-
* Conversation history page
|
|
17
|
-
*
|
|
18
|
-
* Displays:
|
|
19
|
-
* - List of all conversations
|
|
20
|
-
* - Pagination controls
|
|
21
|
-
* - Button to start new conversation
|
|
22
|
-
*
|
|
23
|
-
* All logic is handled by the useConversationHistoryPage hook.
|
|
16
|
+
* Conversation history page with list of past conversations and pagination.
|
|
24
17
|
*/
|
|
25
|
-
const ConversationHistoryPage = () => {
|
|
18
|
+
const ConversationHistoryPage = (_props = {}) => {
|
|
26
19
|
const { goBack, canGoBack, navigate } = useSupportNavigation();
|
|
27
20
|
const { availableAIAgents, availableHumanAgents } = useSupport();
|
|
28
21
|
const text = useSupportText();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-history.js","names":["ConversationHistoryPage: React.FC","Icon"],"sources":["../../../src/support/pages/conversation-history.tsx"],"sourcesContent":["import { useSupport } from \"@cossistant/react\";\nimport { PENDING_CONVERSATION_ID } from \"@cossistant/react/utils/id\";\nimport type React from \"react\";\nimport { useConversationHistoryPage } from \"../../hooks/use-conversation-history-page\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { CoButton } from \"../components/button\";\nimport { ConversationButtonLink } from \"../components/conversation-button-link\";\nimport { Header } from \"../components/header\";\nimport Icon from \"../components/icons\";\nimport {
|
|
1
|
+
{"version":3,"file":"conversation-history.js","names":["ConversationHistoryPage: React.FC<ConversationHistoryPageProps>","Icon"],"sources":["../../../src/support/pages/conversation-history.tsx"],"sourcesContent":["import { useSupport } from \"@cossistant/react\";\nimport { PENDING_CONVERSATION_ID } from \"@cossistant/react/utils/id\";\nimport type React from \"react\";\nimport { useConversationHistoryPage } from \"../../hooks/use-conversation-history-page\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { CoButton } from \"../components/button\";\nimport { ConversationButtonLink } from \"../components/conversation-button-link\";\nimport { Header } from \"../components/header\";\nimport Icon from \"../components/icons\";\nimport { Watermark } from \"../components/watermark\";\nimport { useSupportNavigation } from \"../store/support-store\";\nimport { Text, useSupportText } from \"../text\";\n\ntype ConversationHistoryPageProps = {\n\tparams?: undefined;\n};\n\n/**\n * Conversation history page with list of past conversations and pagination.\n */\nexport const ConversationHistoryPage: React.FC<ConversationHistoryPageProps> = (\n\t_props = {}\n) => {\n\tconst { goBack, canGoBack, navigate } = useSupportNavigation();\n\tconst { availableAIAgents, availableHumanAgents } = useSupport();\n\tconst text = useSupportText();\n\n\tconst history = useConversationHistoryPage({\n\t\tinitialVisibleCount: 4,\n\t\tonOpenConversation: (conversationId) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonStartConversation: (initialMessage) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId: PENDING_CONVERSATION_ID,\n\t\t\t\t\tinitialMessage,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t});\n\n\tconst handleGoBack = () => {\n\t\tif (canGoBack) {\n\t\t\tgoBack();\n\t\t} else {\n\t\t\tnavigate({\n\t\t\t\tpage: \"HOME\",\n\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Header onGoBack={handleGoBack}>\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-2 py-3\">\n\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t<h2 className=\"max-w-xs text-balance font-co-sans text-md leading-normal\">\n\t\t\t\t\t\t\t{text(\"page.conversationHistory.title\")}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</div>\n\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\taiAgents={availableAIAgents}\n\t\t\t\t\t\tgapWidth={2}\n\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\tsize={32}\n\t\t\t\t\t\tspacing={28}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Header>\n\n\t\t\t<div className=\"flex flex-1 flex-col items-center justify-between gap-2 px-6 pb-4\">\n\t\t\t\t{history.conversations.length > 0 && (\n\t\t\t\t\t<div className=\"flex flex-col items-center justify-between gap-2 pt-10\">\n\t\t\t\t\t\t<div className=\"flex w-full flex-col overflow-clip rounded-md border border-co-border/80\">\n\t\t\t\t\t\t\t{history.visibleConversations.map((conversation) => (\n\t\t\t\t\t\t\t\t<ConversationButtonLink\n\t\t\t\t\t\t\t\t\tclassName=\"rounded-none\"\n\t\t\t\t\t\t\t\t\tconversation={conversation}\n\t\t\t\t\t\t\t\t\tkey={conversation.id}\n\t\t\t\t\t\t\t\t\tonClick={() => history.openConversation(conversation.id)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{history.hasMore && (\n\t\t\t\t\t\t\t<CoButton\n\t\t\t\t\t\t\t\tclassName=\"relative mt-6 w-full text-co-primary/40 text-xs hover:text-co-primary\"\n\t\t\t\t\t\t\t\tonClick={history.showAll}\n\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\t\ttextKey=\"page.conversationHistory.showMore\"\n\t\t\t\t\t\t\t\t\tvariables={{ count: history.remainingCount }}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</CoButton>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"sticky bottom-4 z-10 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t<CoButton\n\t\t\t\t\t\tclassName=\"relative w-full justify-between\"\n\t\t\t\t\t\tonClick={() => history.startConversation()}\n\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"-translate-y-1/2 absolute top-1/2 right-4 size-3 text-co-primary/60 transition-transform duration-200 group-hover/btn:translate-x-0.5 group-hover/btn:text-co-primary\"\n\t\t\t\t\t\t\tname=\"arrow-right\"\n\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Text as=\"span\" textKey=\"common.actions.askQuestion\" />\n\t\t\t\t\t</CoButton>\n\t\t\t\t\t<Watermark className=\"mt-4 mb-2\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAaA,2BACZ,SAAS,EAAE,KACP;CACJ,MAAM,EAAE,QAAQ,WAAW,aAAa,sBAAsB;CAC9D,MAAM,EAAE,mBAAmB,yBAAyB,YAAY;CAChE,MAAM,OAAO,gBAAgB;CAE7B,MAAM,UAAU,2BAA2B;EAC1C,qBAAqB;EACrB,qBAAqB,mBAAmB;AACvC,YAAS;IACR,MAAM;IACN,QAAQ,EACP,gBACA;IACD,CAAC;;EAEH,sBAAsB,mBAAmB;AACxC,YAAS;IACR,MAAM;IACN,QAAQ;KACP,gBAAgB;KAChB;KACA;IACD,CAAC;;EAEH,CAAC;CAEF,MAAM,qBAAqB;AAC1B,MAAI,UACH,SAAQ;MAER,UAAS,EACR,MAAM,QACN,CAAC;;AAIJ,QACC,4CACC,oBAAC;EAAO,UAAU;YACjB,qBAAC;GAAI,WAAU;cACd,oBAAC;IAAI,WAAU;cACd,oBAAC;KAAG,WAAU;eACZ,KAAK,iCAAiC;MACnC;KACA,EACN,oBAAC;IACA,UAAU;IACV,UAAU;IACV,aAAa;IACb,MAAM;IACN,SAAS;KACR;IACG;GACE,EAET,qBAAC;EAAI,WAAU;aACb,QAAQ,cAAc,SAAS,KAC/B,qBAAC;GAAI,WAAU;cACd,oBAAC;IAAI,WAAU;cACb,QAAQ,qBAAqB,KAAK,iBAClC,oBAAC;KACA,WAAU;KACI;KAEd,eAAe,QAAQ,iBAAiB,aAAa,GAAG;OADnD,aAAa,GAEjB,CACD;KACG,EACL,QAAQ,WACR,oBAAC;IACA,WAAU;IACV,SAAS,QAAQ;IACjB,SAAQ;cAER,oBAAC;KACA,IAAG;KACH,SAAQ;KACR,WAAW,EAAE,OAAO,QAAQ,gBAAgB;MAC3C;KACQ;IAEP,EAGP,qBAAC;GAAI,WAAU;cACd,qBAAC;IACA,WAAU;IACV,eAAe,QAAQ,mBAAmB;IAC1C,MAAK;IACL,SAAQ;eAER,oBAACC;KACA,WAAU;KACV,MAAK;KACL,SAAQ;MACP,EACF,oBAAC;KAAK,IAAG;KAAO,SAAQ;MAA+B;KAC7C,EACX,oBAAC,aAAU,WAAU,cAAc;IAC9B;GACD,IACJ"}
|
|
@@ -4,23 +4,28 @@ import { ReactElement } from "react";
|
|
|
4
4
|
//#region src/support/pages/conversation.d.ts
|
|
5
5
|
type ConversationPageProps = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
conversationId: string;
|
|
10
|
-
/**
|
|
11
|
-
* Optional initial message to send when opening the conversation.
|
|
7
|
+
* Page params object (for compatibility with Page component)
|
|
12
8
|
*/
|
|
9
|
+
params?: {
|
|
10
|
+
/**
|
|
11
|
+
* The conversation ID to display (can be PENDING_CONVERSATION_ID or a real ID).
|
|
12
|
+
*/
|
|
13
|
+
conversationId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional initial message to send when opening the conversation.
|
|
16
|
+
*/
|
|
17
|
+
initialMessage?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional timeline items to display (for optimistic updates or initial state).
|
|
20
|
+
*/
|
|
21
|
+
items?: TimelineItem[];
|
|
22
|
+
};
|
|
23
|
+
conversationId?: string;
|
|
13
24
|
initialMessage?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Optional timeline items to display (for optimistic updates or initial state).
|
|
16
|
-
*/
|
|
17
25
|
items?: TimelineItem[];
|
|
18
26
|
};
|
|
19
27
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* All conversation logic is handled by the useConversationPage hook,
|
|
23
|
-
* making this component focused purely on rendering and user interaction.
|
|
28
|
+
* Conversation page with message timeline and input composer.
|
|
24
29
|
*/
|
|
25
30
|
type ConversationPageComponent = (props: ConversationPageProps) => ReactElement;
|
|
26
31
|
declare const ConversationPage: ConversationPageComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":[],"mappings":";;;;KAcK,qBAAA;;AAZ8C;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":[],"mappings":";;;;KAcK,qBAAA;;AAZ8C;AAoC9B;EAQR,MAAA,CAAA,EAAA;;;;;;;;;;;;YAdH;;;;UAMD;;;;;KAMJ,yBAAA,WAAoC,0BAA0B;cAEtD,kBAAkB"}
|
|
@@ -13,7 +13,10 @@ import { ConversationStatus } from "@cossistant/types";
|
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
|
|
15
15
|
//#region src/support/pages/conversation.tsx
|
|
16
|
-
const ConversationPage = ({ conversationId:
|
|
16
|
+
const ConversationPage = ({ params, conversationId: legacyConversationId, initialMessage: legacyInitialMessage, items: legacyItems }) => {
|
|
17
|
+
const initialConversationId = params?.conversationId ?? legacyConversationId ?? "";
|
|
18
|
+
const initialMessage = params?.initialMessage ?? legacyInitialMessage;
|
|
19
|
+
const passedItems = params?.items ?? legacyItems ?? [];
|
|
17
20
|
const { website, availableAIAgents, availableHumanAgents, visitor } = useSupport();
|
|
18
21
|
const { navigate, replace, goBack, canGoBack } = useSupportNavigation();
|
|
19
22
|
const { isOpen } = useSupportConfig();
|
|
@@ -47,7 +50,7 @@ const ConversationPage = ({ conversationId: initialConversationId, initialMessag
|
|
|
47
50
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
48
51
|
className: "flex flex-col",
|
|
49
52
|
children: [/* @__PURE__ */ jsx("p", {
|
|
50
|
-
className: "font-medium text-sm",
|
|
53
|
+
className: "font-medium text-co-primary text-sm",
|
|
51
54
|
children: website?.name
|
|
52
55
|
}), /* @__PURE__ */ jsx(Text, {
|
|
53
56
|
as: "p",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.js","names":["ConversationPage: ConversationPageComponent"],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":["import { ConversationStatus } from \"@cossistant/types\";\nimport type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport { type ReactElement, useMemo } from \"react\";\nimport { useConversation } from \"../../hooks/use-conversation\";\nimport { useConversationPage } from \"../../hooks/use-conversation-page\";\nimport { useSupport } from \"../../provider\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { ConversationTimelineList } from \"../components/conversation-timeline\";\nimport { Header } from \"../components/header\";\nimport { MultimodalInput } from \"../components/multimodal-input\";\nimport { IdentificationTimelineTool } from \"../components/timeline-identification-tool\";\nimport { useSupportConfig, useSupportNavigation } from \"../store\";\nimport { Text, useSupportText } from \"../text\";\n\ntype ConversationPageProps = {\n\t/**\n\t * The conversation ID to display (can be PENDING_CONVERSATION_ID or a real ID).\n\t */\n\tconversationId: string;\n\n\t/**\n\t * Optional initial message to send when opening the conversation.\n\t */\n\tinitialMessage?: string;\n\n\t/**\n\t * Optional timeline items to display (for optimistic updates or initial state).\n\t */\n\titems?: TimelineItem[];\n};\n\n
|
|
1
|
+
{"version":3,"file":"conversation.js","names":["ConversationPage: ConversationPageComponent"],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":["import { ConversationStatus } from \"@cossistant/types\";\nimport type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport { type ReactElement, useMemo } from \"react\";\nimport { useConversation } from \"../../hooks/use-conversation\";\nimport { useConversationPage } from \"../../hooks/use-conversation-page\";\nimport { useSupport } from \"../../provider\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { ConversationTimelineList } from \"../components/conversation-timeline\";\nimport { Header } from \"../components/header\";\nimport { MultimodalInput } from \"../components/multimodal-input\";\nimport { IdentificationTimelineTool } from \"../components/timeline-identification-tool\";\nimport { useSupportConfig, useSupportNavigation } from \"../store\";\nimport { Text, useSupportText } from \"../text\";\n\ntype ConversationPageProps = {\n\t/**\n\t * Page params object (for compatibility with Page component)\n\t */\n\tparams?: {\n\t\t/**\n\t\t * The conversation ID to display (can be PENDING_CONVERSATION_ID or a real ID).\n\t\t */\n\t\tconversationId: string;\n\n\t\t/**\n\t\t * Optional initial message to send when opening the conversation.\n\t\t */\n\t\tinitialMessage?: string;\n\n\t\t/**\n\t\t * Optional timeline items to display (for optimistic updates or initial state).\n\t\t */\n\t\titems?: TimelineItem[];\n\t};\n\n\t// Legacy direct props support (deprecated but maintained for backward compatibility)\n\tconversationId?: string;\n\tinitialMessage?: string;\n\titems?: TimelineItem[];\n};\n\n/**\n * Conversation page with message timeline and input composer.\n */\ntype ConversationPageComponent = (props: ConversationPageProps) => ReactElement;\n\nexport const ConversationPage: ConversationPageComponent = ({\n\tparams,\n\tconversationId: legacyConversationId,\n\tinitialMessage: legacyInitialMessage,\n\titems: legacyItems,\n}: ConversationPageProps) => {\n\t// Support both params object (new) and direct props (legacy)\n\tconst initialConversationId =\n\t\tparams?.conversationId ?? legacyConversationId ?? \"\";\n\tconst initialMessage = params?.initialMessage ?? legacyInitialMessage;\n\tconst passedItems = params?.items ?? legacyItems ?? [];\n\tconst { website, availableAIAgents, availableHumanAgents, visitor } =\n\t\tuseSupport();\n\tconst { navigate, replace, goBack, canGoBack } = useSupportNavigation();\n\tconst { isOpen } = useSupportConfig();\n\tconst text = useSupportText();\n\n\tconst timelineTools = useMemo(\n\t\t() => ({\n\t\t\tidentification: { component: IdentificationTimelineTool },\n\t\t}),\n\t\t[]\n\t);\n\n\t// Main conversation hook - handles all logic\n\tconst conversation = useConversationPage({\n\t\tconversationId: initialConversationId,\n\t\titems: passedItems,\n\t\tinitialMessage,\n\t\tautoSeenEnabled: isOpen,\n\t\tonConversationIdChange: (newConversationId) => {\n\t\t\t// Update navigation when conversation is created\n\t\t\treplace({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: { conversationId: newConversationId },\n\t\t\t});\n\t\t},\n\t});\n\n\tconst { conversation: activeConversation } = useConversation(\n\t\tconversation.isPending ? null : conversation.conversationId,\n\t\t{ enabled: !conversation.isPending }\n\t);\n\n\tconst isConversationClosed = Boolean(\n\t\tactiveConversation &&\n\t\t\t(activeConversation.status === ConversationStatus.RESOLVED ||\n\t\t\t\tactiveConversation.status === ConversationStatus.SPAM ||\n\t\t\t\tactiveConversation.deletedAt)\n\t);\n\n\tconst handleGoBack = () => {\n\t\tif (canGoBack) {\n\t\t\tgoBack();\n\t\t} else {\n\t\t\tnavigate({ page: \"HOME\" });\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex h-full flex-col gap-0 overflow-hidden\">\n\t\t\t<Header onGoBack={handleGoBack}>\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-2 py-3\">\n\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t<p className=\"font-medium text-co-primary text-sm\">\n\t\t\t\t\t\t\t{website?.name}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tclassName=\"text-co-muted-foreground text-sm\"\n\t\t\t\t\t\t\ttextKey=\"common.labels.supportOnline\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\taiAgents={availableAIAgents}\n\t\t\t\t\t\tgapWidth={2}\n\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\tsize={32}\n\t\t\t\t\t\tspacing={28}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Header>\n\n\t\t\t<ConversationTimelineList\n\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\tclassName=\"min-h-0 flex-1 px-4\"\n\t\t\t\tconversationId={conversation.conversationId}\n\t\t\t\tcurrentVisitorId={visitor?.id}\n\t\t\t\titems={conversation.items}\n\t\t\t\ttools={timelineTools}\n\t\t\t/>\n\n\t\t\t{isConversationClosed ? (\n\t\t\t\t<div className=\"m-4 flex items-center justify-center text-balance px-4 pb-6 text-center font-medium text-co-muted-foreground text-sm\">\n\t\t\t\t\t<Text as=\"p\" textKey=\"component.conversationPage.closedMessage\" />\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"flex-shrink-0 p-1\">\n\t\t\t\t\t<MultimodalInput\n\t\t\t\t\t\tdisabled={conversation.composer.isSubmitting}\n\t\t\t\t\t\terror={conversation.error}\n\t\t\t\t\t\tfiles={conversation.composer.files}\n\t\t\t\t\t\tisSubmitting={conversation.composer.isSubmitting}\n\t\t\t\t\t\tonChange={conversation.composer.setMessage}\n\t\t\t\t\t\tonFileSelect={conversation.composer.addFiles}\n\t\t\t\t\t\tonRemoveFile={conversation.composer.removeFile}\n\t\t\t\t\t\tonSubmit={conversation.composer.submit}\n\t\t\t\t\t\tplaceholder={text(\"component.multimodalInput.placeholder\")}\n\t\t\t\t\t\tvalue={conversation.composer.message}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;AA8CA,MAAaA,oBAA+C,EAC3D,QACA,gBAAgB,sBAChB,gBAAgB,sBAChB,OAAO,kBACqB;CAE5B,MAAM,wBACL,QAAQ,kBAAkB,wBAAwB;CACnD,MAAM,iBAAiB,QAAQ,kBAAkB;CACjD,MAAM,cAAc,QAAQ,SAAS,eAAe,EAAE;CACtD,MAAM,EAAE,SAAS,mBAAmB,sBAAsB,YACzD,YAAY;CACb,MAAM,EAAE,UAAU,SAAS,QAAQ,cAAc,sBAAsB;CACvE,MAAM,EAAE,WAAW,kBAAkB;CACrC,MAAM,OAAO,gBAAgB;CAE7B,MAAM,gBAAgB,eACd,EACN,gBAAgB,EAAE,WAAW,4BAA4B,EACzD,GACD,EAAE,CACF;CAGD,MAAM,eAAe,oBAAoB;EACxC,gBAAgB;EAChB,OAAO;EACP;EACA,iBAAiB;EACjB,yBAAyB,sBAAsB;AAE9C,WAAQ;IACP,MAAM;IACN,QAAQ,EAAE,gBAAgB,mBAAmB;IAC7C,CAAC;;EAEH,CAAC;CAEF,MAAM,EAAE,cAAc,uBAAuB,gBAC5C,aAAa,YAAY,OAAO,aAAa,gBAC7C,EAAE,SAAS,CAAC,aAAa,WAAW,CACpC;CAED,MAAM,uBAAuB,QAC5B,uBACE,mBAAmB,WAAW,mBAAmB,YACjD,mBAAmB,WAAW,mBAAmB,QACjD,mBAAmB,WACrB;CAED,MAAM,qBAAqB;AAC1B,MAAI,UACH,SAAQ;MAER,UAAS,EAAE,MAAM,QAAQ,CAAC;;AAI5B,QACC,qBAAC;EAAI,WAAU;;GACd,oBAAC;IAAO,UAAU;cACjB,qBAAC;KAAI,WAAU;gBACd,qBAAC;MAAI,WAAU;iBACd,oBAAC;OAAE,WAAU;iBACX,SAAS;QACP,EACJ,oBAAC;OACA,IAAG;OACH,WAAU;OACV,SAAQ;QACP;OACG,EACN,oBAAC;MACA,UAAU;MACV,UAAU;MACV,aAAa;MACb,MAAM;MACN,SAAS;OACR;MACG;KACE;GAET,oBAAC;IACmB;IACG;IACtB,WAAU;IACV,gBAAgB,aAAa;IAC7B,kBAAkB,SAAS;IAC3B,OAAO,aAAa;IACpB,OAAO;KACN;GAED,uBACA,oBAAC;IAAI,WAAU;cACd,oBAAC;KAAK,IAAG;KAAI,SAAQ;MAA6C;KAC7D,GAEN,oBAAC;IAAI,WAAU;cACd,oBAAC;KACA,UAAU,aAAa,SAAS;KAChC,OAAO,aAAa;KACpB,OAAO,aAAa,SAAS;KAC7B,cAAc,aAAa,SAAS;KACpC,UAAU,aAAa,SAAS;KAChC,cAAc,aAAa,SAAS;KACpC,cAAc,aAAa,SAAS;KACpC,UAAU,aAAa,SAAS;KAChC,aAAa,KAAK,wCAAwC;KAC1D,OAAO,aAAa,SAAS;MAC5B;KACG;;GAEF"}
|
package/support/pages/home.d.ts
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/support/pages/home.d.ts
|
|
4
|
-
|
|
4
|
+
type HomePageProps = {
|
|
5
|
+
params?: undefined;
|
|
6
|
+
};
|
|
5
7
|
/**
|
|
6
|
-
* Home page
|
|
7
|
-
*
|
|
8
|
-
* Displays:
|
|
9
|
-
* - Welcome message with available agents
|
|
10
|
-
* - Quick action buttons
|
|
11
|
-
* - Last open conversation (if any)
|
|
12
|
-
* - Button to start new conversation
|
|
13
|
-
* - Link to conversation history
|
|
14
|
-
*
|
|
15
|
-
* All logic is handled by the useHomePage hook.
|
|
8
|
+
* Home page with welcome message, quick options, and conversation starter.
|
|
16
9
|
*/
|
|
17
|
-
declare const HomePage: () => ReactElement;
|
|
10
|
+
declare const HomePage: (_props?: HomePageProps) => ReactElement;
|
|
18
11
|
//#endregion
|
|
19
12
|
export { HomePage };
|
|
20
13
|
//# sourceMappingURL=home.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.d.ts","names":[],"sources":["../../../src/support/pages/home.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"home.d.ts","names":[],"sources":["../../../src/support/pages/home.tsx"],"sourcesContent":[],"mappings":";;;KAcK,aAAA;;AAbqC,CAAA;AAoB1C;;;cAAa,oBAAoB,kBAAqB"}
|
package/support/pages/home.js
CHANGED
|
@@ -14,18 +14,9 @@ import { motion } from "motion/react";
|
|
|
14
14
|
|
|
15
15
|
//#region src/support/pages/home.tsx
|
|
16
16
|
/**
|
|
17
|
-
* Home page
|
|
18
|
-
*
|
|
19
|
-
* Displays:
|
|
20
|
-
* - Welcome message with available agents
|
|
21
|
-
* - Quick action buttons
|
|
22
|
-
* - Last open conversation (if any)
|
|
23
|
-
* - Button to start new conversation
|
|
24
|
-
* - Link to conversation history
|
|
25
|
-
*
|
|
26
|
-
* All logic is handled by the useHomePage hook.
|
|
17
|
+
* Home page with welcome message, quick options, and conversation starter.
|
|
27
18
|
*/
|
|
28
|
-
const HomePage = () => {
|
|
19
|
+
const HomePage = (_props = {}) => {
|
|
29
20
|
const { website, availableHumanAgents, visitor, quickOptions } = useSupport();
|
|
30
21
|
const { navigate } = useSupportNavigation();
|
|
31
22
|
const text = useSupportText();
|
|
@@ -84,7 +75,7 @@ const HomePage = () => {
|
|
|
84
75
|
size: 44,
|
|
85
76
|
spacing: 32
|
|
86
77
|
}), /* @__PURE__ */ jsx("h2", {
|
|
87
|
-
className: "max-w-xs text-balance font-co-sans font-medium text-2xl leading-normal",
|
|
78
|
+
className: "max-w-xs text-balance font-co-sans font-medium text-2xl text-co-primary leading-normal",
|
|
88
79
|
children: text("page.home.greeting", { visitorName: visitor?.contact?.name?.split(" ")[0] ?? void 0 })
|
|
89
80
|
})]
|
|
90
81
|
}), quickOptions.length > 0 && /* @__PURE__ */ jsx(motion.div, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.js","names":["Icon"],"sources":["../../../src/support/pages/home.tsx"],"sourcesContent":["import { motion } from \"motion/react\";\nimport type { ReactElement } from \"react\";\nimport { useHomePage } from \"../../hooks/use-home-page\";\nimport { useSupport } from \"../../provider\";\nimport { PENDING_CONVERSATION_ID } from \"../../utils/id\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { CoButton } from \"../components/button\";\nimport { ConversationButtonLink } from \"../components/conversation-button-link\";\nimport { Header } from \"../components/header\";\nimport Icon from \"../components/icons\";\nimport {
|
|
1
|
+
{"version":3,"file":"home.js","names":["Icon"],"sources":["../../../src/support/pages/home.tsx"],"sourcesContent":["import { motion } from \"motion/react\";\nimport type { ReactElement } from \"react\";\nimport { useHomePage } from \"../../hooks/use-home-page\";\nimport { useSupport } from \"../../provider\";\nimport { PENDING_CONVERSATION_ID } from \"../../utils/id\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { CoButton } from \"../components/button\";\nimport { ConversationButtonLink } from \"../components/conversation-button-link\";\nimport { Header } from \"../components/header\";\nimport Icon from \"../components/icons\";\nimport { Watermark } from \"../components/watermark\";\nimport { useSupportNavigation } from \"../store/support-store\";\nimport { Text, useSupportText } from \"../text\";\n\ntype HomePageProps = {\n\tparams?: undefined;\n};\n\n/**\n * Home page with welcome message, quick options, and conversation starter.\n */\nexport const HomePage = (_props: HomePageProps = {}): ReactElement => {\n\tconst { website, availableHumanAgents, visitor, quickOptions } = useSupport();\n\tconst { navigate } = useSupportNavigation();\n\tconst text = useSupportText();\n\n\t// Main home page hook - handles all logic\n\tconst home = useHomePage({\n\t\tonStartConversation: (initialMessage) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId: PENDING_CONVERSATION_ID,\n\t\t\t\t\tinitialMessage,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonOpenConversation: (conversationId) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonOpenConversationHistory: () => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION_HISTORY\",\n\t\t\t});\n\t\t},\n\t});\n\n\treturn (\n\t\t<>\n\t\t\t<Header>{/* <NavigationTab /> */}</Header>\n\t\t\t<div className=\"sticky top-0 flex flex-1 px-6\">\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\tclassName=\"flex flex-col gap-2\"\n\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\ttransition={{\n\t\t\t\t\t\t\tdelay: 0.1,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tvariants={{\n\t\t\t\t\t\t\thidden: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t\tvisible: { opacity: 1, y: 0, filter: \"blur(0px)\" },\n\t\t\t\t\t\t\texit: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\t\taiAgents={website?.availableAIAgents || []}\n\t\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\t\tsize={44}\n\t\t\t\t\t\t\tspacing={32}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<h2 className=\"max-w-xs text-balance font-co-sans font-medium text-2xl text-co-primary leading-normal\">\n\t\t\t\t\t\t\t{text(\"page.home.greeting\", {\n\t\t\t\t\t\t\t\tvisitorName: visitor?.contact?.name?.split(\" \")[0] ?? undefined,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</motion.div>\n\n\t\t\t\t\t{quickOptions.length > 0 && (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\t\tclassName=\"mt-6 space-x-2 space-y-2\"\n\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\ttransition={{\n\t\t\t\t\t\t\t\tdelay: 0.1,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvariants={{\n\t\t\t\t\t\t\t\thidden: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t\t\tvisible: { opacity: 1, y: 0, filter: \"blur(0px)\" },\n\t\t\t\t\t\t\t\texit: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{quickOptions?.map((option) => (\n\t\t\t\t\t\t\t\t<CoButton\n\t\t\t\t\t\t\t\t\tclassName=\"inline-flex w-fit rounded-lg border-dashed px-2\"\n\t\t\t\t\t\t\t\t\tkey={option}\n\t\t\t\t\t\t\t\t\tonClick={() => home.startConversation(option)}\n\t\t\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{option}\n\t\t\t\t\t\t\t\t</CoButton>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-shrink-0 flex-col items-center justify-center gap-2 px-6 pb-4\">\n\t\t\t\t{home.availableConversationsCount > 0 && (\n\t\t\t\t\t<CoButton\n\t\t\t\t\t\tclassName=\"relative w-full text-co-primary/40 text-xs hover:text-co-primary\"\n\t\t\t\t\t\tonClick={home.openConversationHistory}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\ttextKey=\"page.home.history.more\"\n\t\t\t\t\t\t\tvariables={{ count: home.availableConversationsCount }}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</CoButton>\n\t\t\t\t)}\n\n\t\t\t\t{home.lastOpenConversation && (\n\t\t\t\t\t<div className=\"flex w-full flex-col overflow-clip rounded-md border border-co-border/80\">\n\t\t\t\t\t\t<ConversationButtonLink\n\t\t\t\t\t\t\tclassName=\"rounded-none\"\n\t\t\t\t\t\t\tconversation={home.lastOpenConversation}\n\t\t\t\t\t\t\tkey={home.lastOpenConversation.id}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tif (home.lastOpenConversation) {\n\t\t\t\t\t\t\t\t\thome.openConversation(home.lastOpenConversation.id);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"sticky bottom-4 z-10 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t<CoButton\n\t\t\t\t\t\tclassName=\"relative w-full justify-between\"\n\t\t\t\t\t\tonClick={() => home.startConversation()}\n\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"-translate-y-1/2 absolute top-1/2 right-4 size-3 text-co-primary/60 transition-transform duration-200 group-hover/btn:translate-x-0.5 group-hover/btn:text-co-primary\"\n\t\t\t\t\t\t\tname=\"arrow-right\"\n\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Text as=\"span\" textKey=\"common.actions.askQuestion\" />\n\t\t\t\t\t</CoButton>\n\t\t\t\t\t<Watermark className=\"mt-4 mb-0\" />\n\t\t\t\t</div>\n\t\t\t\t<div />\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAa,YAAY,SAAwB,EAAE,KAAmB;CACrE,MAAM,EAAE,SAAS,sBAAsB,SAAS,iBAAiB,YAAY;CAC7E,MAAM,EAAE,aAAa,sBAAsB;CAC3C,MAAM,OAAO,gBAAgB;CAG7B,MAAM,OAAO,YAAY;EACxB,sBAAsB,mBAAmB;AACxC,YAAS;IACR,MAAM;IACN,QAAQ;KACP,gBAAgB;KAChB;KACA;IACD,CAAC;;EAEH,qBAAqB,mBAAmB;AACvC,YAAS;IACR,MAAM;IACN,QAAQ,EACP,gBACA;IACD,CAAC;;EAEH,iCAAiC;AAChC,YAAS,EACR,MAAM,wBACN,CAAC;;EAEH,CAAC;AAEF,QACC;EACC,oBAAC,WAAyC;EAC1C,oBAAC;GAAI,WAAU;aACd,qBAAC;IAAI,WAAU;eACd,qBAAC,OAAO;KACP,SAAQ;KACR,WAAU;KACV,MAAK;KACL,SAAQ;KACR,YAAY,EACX,OAAO,IACP;KACD,UAAU;MACT,QAAQ;OAAE,SAAS;OAAG,GAAG;OAAI,QAAQ;OAAc;MACnD,SAAS;OAAE,SAAS;OAAG,GAAG;OAAG,QAAQ;OAAa;MAClD,MAAM;OAAE,SAAS;OAAG,GAAG;OAAI,QAAQ;OAAc;MACjD;gBAED,oBAAC;MACA,UAAU,SAAS,qBAAqB,EAAE;MAC1C,aAAa;MACb,MAAM;MACN,SAAS;OACR,EACF,oBAAC;MAAG,WAAU;gBACZ,KAAK,sBAAsB,EAC3B,aAAa,SAAS,SAAS,MAAM,MAAM,IAAI,CAAC,MAAM,QACtD,CAAC;OACE;MACO,EAEZ,aAAa,SAAS,KACtB,oBAAC,OAAO;KACP,SAAQ;KACR,WAAU;KACV,MAAK;KACL,SAAQ;KACR,YAAY,EACX,OAAO,IACP;KACD,UAAU;MACT,QAAQ;OAAE,SAAS;OAAG,GAAG;OAAI,QAAQ;OAAc;MACnD,SAAS;OAAE,SAAS;OAAG,GAAG;OAAG,QAAQ;OAAa;MAClD,MAAM;OAAE,SAAS;OAAG,GAAG;OAAI,QAAQ;OAAc;MACjD;eAEA,cAAc,KAAK,WACnB,oBAAC;MACA,WAAU;MAEV,eAAe,KAAK,kBAAkB,OAAO;MAC7C,MAAK;MACL,SAAQ;gBAEP;QALI,OAMK,CACV;MACU;KAET;IACD;EACN,qBAAC;GAAI,WAAU;;IACb,KAAK,8BAA8B,KACnC,oBAAC;KACA,WAAU;KACV,SAAS,KAAK;KACd,SAAQ;eAER,oBAAC;MACA,IAAG;MACH,SAAQ;MACR,WAAW,EAAE,OAAO,KAAK,6BAA6B;OACrD;MACQ;IAGX,KAAK,wBACL,oBAAC;KAAI,WAAU;eACd,oBAAC;MACA,WAAU;MACV,cAAc,KAAK;MAEnB,eAAe;AACd,WAAI,KAAK,qBACR,MAAK,iBAAiB,KAAK,qBAAqB,GAAG;;QAHhD,KAAK,qBAAqB,GAM9B;MACG;IAGP,qBAAC;KAAI,WAAU;gBACd,qBAAC;MACA,WAAU;MACV,eAAe,KAAK,mBAAmB;MACvC,MAAK;MACL,SAAQ;iBAER,oBAACA;OACA,WAAU;OACV,MAAK;OACL,SAAQ;QACP,EACF,oBAAC;OAAK,IAAG;OAAO,SAAQ;QAA+B;OAC7C,EACX,oBAAC,aAAU,WAAU,cAAc;MAC9B;IACN,oBAAC,UAAM;;IACF;KACJ"}
|
package/support/router.d.ts
CHANGED
|
@@ -3,12 +3,17 @@ import React from "react";
|
|
|
3
3
|
//#region src/support/router.d.ts
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Router with default support pages (HOME, ARTICLES, CONVERSATION, CONVERSATION_HISTORY).
|
|
7
|
+
* Add custom pages as children.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
9
|
+
* @example
|
|
10
|
+
* <SupportRouter>
|
|
11
|
+
* <Page name="SETTINGS" component={SettingsPage} />
|
|
12
|
+
* </SupportRouter>
|
|
10
13
|
*/
|
|
11
|
-
declare const SupportRouter: React.FC
|
|
14
|
+
declare const SupportRouter: React.FC<{
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}>;
|
|
12
17
|
//#endregion
|
|
13
18
|
export { SupportRouter };
|
|
14
19
|
//# sourceMappingURL=router.d.ts.map
|
package/support/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","names":[],"sources":["../../src/support/router.tsx"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"router.d.ts","names":[],"sources":["../../src/support/router.tsx"],"sourcesContent":[],"mappings":";;;;;;AAiBA;;;;;;;cAAa,eAAe,KAAA,CAAM;aAAgB,KAAA,CAAM"}
|
package/support/router.js
CHANGED
|
@@ -1,29 +1,48 @@
|
|
|
1
|
+
import { Page } from "../primitives/page.js";
|
|
2
|
+
import { Router } from "../primitives/router.js";
|
|
1
3
|
import { useSupportNavigation } from "./store/support-store.js";
|
|
2
4
|
import { ArticlesPage } from "./pages/articles.js";
|
|
3
5
|
import { ConversationPage } from "./pages/conversation.js";
|
|
4
6
|
import { ConversationHistoryPage } from "./pages/conversation-history.js";
|
|
5
7
|
import { HomePage } from "./pages/home.js";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
9
|
|
|
8
10
|
//#region src/support/router.tsx
|
|
9
11
|
/**
|
|
10
|
-
*
|
|
12
|
+
* Router with default support pages (HOME, ARTICLES, CONVERSATION, CONVERSATION_HISTORY).
|
|
13
|
+
* Add custom pages as children.
|
|
11
14
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
15
|
+
* @example
|
|
16
|
+
* <SupportRouter>
|
|
17
|
+
* <Page name="SETTINGS" component={SettingsPage} />
|
|
18
|
+
* </SupportRouter>
|
|
14
19
|
*/
|
|
15
|
-
const SupportRouter = () => {
|
|
20
|
+
const SupportRouter = ({ children }) => {
|
|
16
21
|
const { current } = useSupportNavigation();
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
+
/* @__PURE__ */ jsx(Page, {
|
|
24
|
+
component: HomePage,
|
|
25
|
+
name: "HOME"
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ jsx(Page, {
|
|
28
|
+
component: ArticlesPage,
|
|
29
|
+
name: "ARTICLES"
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ jsx(Page, {
|
|
32
|
+
component: ConversationPage,
|
|
33
|
+
name: "CONVERSATION"
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsx(Page, {
|
|
36
|
+
component: ConversationHistoryPage,
|
|
37
|
+
name: "CONVERSATION_HISTORY"
|
|
38
|
+
}),
|
|
39
|
+
children,
|
|
40
|
+
/* @__PURE__ */ jsx(Router, {
|
|
41
|
+
fallback: HomePage,
|
|
42
|
+
page: current.page,
|
|
43
|
+
params: current.params
|
|
44
|
+
})
|
|
45
|
+
] });
|
|
27
46
|
};
|
|
28
47
|
|
|
29
48
|
//#endregion
|
package/support/router.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","names":["SupportRouter: React.FC"],"sources":["../../src/support/router.tsx"],"sourcesContent":["import type React from \"react\";\nimport { ArticlesPage } from \"./pages/articles\";\nimport { ConversationPage } from \"./pages/conversation\";\nimport { ConversationHistoryPage } from \"./pages/conversation-history\";\nimport { HomePage } from \"./pages/home\";\nimport { useSupportNavigation } from \"./store/support-store\";\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"router.js","names":["SupportRouter: React.FC<{ children?: React.ReactNode }>","Primitive.Page","Primitive.Router"],"sources":["../../src/support/router.tsx"],"sourcesContent":["import type React from \"react\";\nimport * as Primitive from \"../primitives\";\nimport { ArticlesPage } from \"./pages/articles\";\nimport { ConversationPage } from \"./pages/conversation\";\nimport { ConversationHistoryPage } from \"./pages/conversation-history\";\nimport { HomePage } from \"./pages/home\";\nimport { useSupportNavigation } from \"./store/support-store\";\n\n/**\n * Router with default support pages (HOME, ARTICLES, CONVERSATION, CONVERSATION_HISTORY).\n * Add custom pages as children.\n *\n * @example\n * <SupportRouter>\n * <Page name=\"SETTINGS\" component={SettingsPage} />\n * </SupportRouter>\n */\nexport const SupportRouter: React.FC<{ children?: React.ReactNode }> = ({\n\tchildren,\n}) => {\n\tconst { current } = useSupportNavigation();\n\n\treturn (\n\t\t<>\n\t\t\t{/* Register default pages */}\n\t\t\t<Primitive.Page\n\t\t\t\tcomponent={HomePage as React.ComponentType<{ params?: unknown }>}\n\t\t\t\tname=\"HOME\"\n\t\t\t/>\n\t\t\t<Primitive.Page\n\t\t\t\tcomponent={ArticlesPage as React.ComponentType<{ params?: unknown }>}\n\t\t\t\tname=\"ARTICLES\"\n\t\t\t/>\n\t\t\t<Primitive.Page\n\t\t\t\tcomponent={\n\t\t\t\t\tConversationPage as React.ComponentType<{ params?: unknown }>\n\t\t\t\t}\n\t\t\t\tname=\"CONVERSATION\"\n\t\t\t/>\n\t\t\t<Primitive.Page\n\t\t\t\tcomponent={\n\t\t\t\t\tConversationHistoryPage as React.ComponentType<{ params?: unknown }>\n\t\t\t\t}\n\t\t\t\tname=\"CONVERSATION_HISTORY\"\n\t\t\t/>\n\n\t\t\t{/* Allow custom pages via children */}\n\t\t\t{children}\n\n\t\t\t{/* Render using primitive router */}\n\t\t\t<Primitive.Router\n\t\t\t\tfallback={HomePage as React.ComponentType<{ params?: unknown }>}\n\t\t\t\tpage={current.page as string}\n\t\t\t\tparams={current.params}\n\t\t\t/>\n\t\t</>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,MAAaA,iBAA2D,EACvE,eACK;CACL,MAAM,EAAE,YAAY,sBAAsB;AAE1C,QACC;EAEC,oBAACC;GACA,WAAW;GACX,MAAK;IACJ;EACF,oBAACA;GACA,WAAW;GACX,MAAK;IACJ;EACF,oBAACA;GACA,WACC;GAED,MAAK;IACJ;EACF,oBAACA;GACA,WACC;GAED,MAAK;IACJ;EAGD;EAGD,oBAACC;GACA,UAAU;GACV,MAAM,QAAQ;GACd,QAAQ,QAAQ;IACf;KACA"}
|
|
@@ -4,14 +4,17 @@ import { SupportConfig, SupportStore, SupportStoreState } from "@cossistant/core
|
|
|
4
4
|
//#region src/support/store/support-store.d.ts
|
|
5
5
|
type UseSupportStoreResult = SupportStoreState & Pick<SupportStore, "navigate" | "replace" | "goBack" | "open" | "close" | "toggle" | "updateConfig" | "reset">;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Access the support widget store state and actions.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const { isOpen, navigate, toggle } = useSupportStore();
|
|
10
11
|
*/
|
|
11
12
|
declare function useSupportStore(): UseSupportStoreResult;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
14
|
+
* Access widget configuration (isOpen, size) and toggle helpers.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const { isOpen, open, close, toggle } = useSupportConfig();
|
|
15
18
|
*/
|
|
16
19
|
declare const useSupportConfig: () => {
|
|
17
20
|
open: () => void;
|
|
@@ -28,26 +31,26 @@ declare const useSupportConfig: () => {
|
|
|
28
31
|
};
|
|
29
32
|
};
|
|
30
33
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
34
|
+
* Access navigation state and routing methods.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* const { navigate, goBack, page, params } = useSupportNavigation();
|
|
33
38
|
*/
|
|
34
39
|
declare const useSupportNavigation: () => {
|
|
35
|
-
current: _cossistant_core0.NavigationState
|
|
40
|
+
current: _cossistant_core0.NavigationState<_cossistant_core0.RouteRegistry>;
|
|
36
41
|
page: "HOME" | "ARTICLES" | "CONVERSATION" | "CONVERSATION_HISTORY";
|
|
37
42
|
params: {
|
|
38
43
|
conversationId: string;
|
|
39
44
|
initialMessage?: string;
|
|
40
45
|
} | undefined;
|
|
41
|
-
previousPages: _cossistant_core0.NavigationState[];
|
|
42
|
-
navigate: (state: _cossistant_core0.NavigationState) => void;
|
|
43
|
-
replace: (state: _cossistant_core0.NavigationState) => void;
|
|
46
|
+
previousPages: _cossistant_core0.NavigationState<_cossistant_core0.RouteRegistry>[];
|
|
47
|
+
navigate: (state: _cossistant_core0.NavigationState<_cossistant_core0.RouteRegistry>) => void;
|
|
48
|
+
replace: (state: _cossistant_core0.NavigationState<_cossistant_core0.RouteRegistry>) => void;
|
|
44
49
|
goBack: () => void;
|
|
45
50
|
canGoBack: boolean;
|
|
46
51
|
};
|
|
47
52
|
/**
|
|
48
|
-
*
|
|
49
|
-
* the singleton support store. Call this once during bootstrapping so that the
|
|
50
|
-
* UI renders with the expected open state.
|
|
53
|
+
* Initialize store with default configuration (used internally by Support component).
|
|
51
54
|
*/
|
|
52
55
|
declare const initializeSupportStore: (props: {
|
|
53
56
|
size?: SupportConfig["size"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support-store.d.ts","names":[],"sources":["../../../src/support/store/support-store.ts"],"sourcesContent":[],"mappings":";;;;KA8CY,qBAAA,GAAwB,oBACnC,KACC;;;AAFF
|
|
1
|
+
{"version":3,"file":"support-store.d.ts","names":[],"sources":["../../../src/support/store/support-store.ts"],"sourcesContent":[],"mappings":";;;;KA8CY,qBAAA,GAAwB,oBACnC,KACC;;;AAFF;;;;AACK,iBAkBW,eAAA,CAAA,CAlBX,EAkB8B,qBAlB9B;AAkBL;AAyBA;AAoBA;;;;cApBa;;;;;;EA0CA,OAAA,EAAA;;;;;;;;;;;;;;cAtBA;6CAiBZ,iBAAA,CAAA,aAAA;;;;;;;;;;;;;;;cAKY;SACL"}
|
|
@@ -16,9 +16,10 @@ function useSelector(selector, isEqual = Object.is) {
|
|
|
16
16
|
return selectionRef.current;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
19
|
+
* Access the support widget store state and actions.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* const { isOpen, navigate, toggle } = useSupportStore();
|
|
22
23
|
*/
|
|
23
24
|
function useSupportStore() {
|
|
24
25
|
const state = useSelector((current) => current);
|
|
@@ -35,8 +36,10 @@ function useSupportStore() {
|
|
|
35
36
|
}), [state]);
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
39
|
+
* Access widget configuration (isOpen, size) and toggle helpers.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const { isOpen, open, close, toggle } = useSupportConfig();
|
|
40
43
|
*/
|
|
41
44
|
const useSupportConfig = () => {
|
|
42
45
|
const config = useSelector((state) => state.config);
|
|
@@ -48,8 +51,10 @@ const useSupportConfig = () => {
|
|
|
48
51
|
}), [config]);
|
|
49
52
|
};
|
|
50
53
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
54
|
+
* Access navigation state and routing methods.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const { navigate, goBack, page, params } = useSupportNavigation();
|
|
53
58
|
*/
|
|
54
59
|
const useSupportNavigation = () => {
|
|
55
60
|
const { current, previousPages } = useSelector((state) => state.navigation);
|
|
@@ -65,9 +70,7 @@ const useSupportNavigation = () => {
|
|
|
65
70
|
}), [current, previousPages]);
|
|
66
71
|
};
|
|
67
72
|
/**
|
|
68
|
-
*
|
|
69
|
-
* the singleton support store. Call this once during bootstrapping so that the
|
|
70
|
-
* UI renders with the expected open state.
|
|
73
|
+
* Initialize store with default configuration (used internally by Support component).
|
|
71
74
|
*/
|
|
72
75
|
const initializeSupportStore = (props) => {
|
|
73
76
|
const patch = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support-store.js","names":["patch: Partial<SupportConfig>"],"sources":["../../../src/support/store/support-store.ts"],"sourcesContent":["\"use client\";\n\nimport {\n\tcreateSupportStore,\n\ttype SupportConfig,\n\ttype SupportStore,\n\ttype SupportStoreState,\n} from \"@cossistant/core\";\nimport { useMemo, useRef, useSyncExternalStore } from \"react\";\n\nconst storage = typeof window !== \"undefined\" ? window.localStorage : undefined;\nconst store = createSupportStore({ storage });\n\ntype Selector<T> = (state: SupportStoreState) => T;\n\ntype EqualityChecker<T> = (previous: T, next: T) => boolean;\n\nfunction useSelector<TSelected>(\n\tselector: Selector<TSelected>,\n\tisEqual: EqualityChecker<TSelected> = Object.is\n): TSelected {\n\tconst selectionRef = useRef<TSelected>(undefined);\n\n\tconst subscribe = (onStoreChange: () => void) =>\n\t\tstore.subscribe(() => {\n\t\t\tonStoreChange();\n\t\t});\n\n\tconst snapshot = useSyncExternalStore(\n\t\tsubscribe,\n\t\tstore.getState,\n\t\tstore.getState\n\t);\n\n\tconst selected = selector(snapshot);\n\n\tif (\n\t\tselectionRef.current === undefined ||\n\t\t!isEqual(selectionRef.current, selected)\n\t) {\n\t\tselectionRef.current = selected;\n\t}\n\n\treturn selectionRef.current as TSelected;\n}\n\nexport type UseSupportStoreResult = SupportStoreState &\n\tPick<\n\t\tSupportStore,\n\t\t| \"navigate\"\n\t\t| \"replace\"\n\t\t| \"goBack\"\n\t\t| \"open\"\n\t\t| \"close\"\n\t\t| \"toggle\"\n\t\t| \"updateConfig\"\n\t\t| \"reset\"\n\t>;\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"support-store.js","names":["patch: Partial<SupportConfig>"],"sources":["../../../src/support/store/support-store.ts"],"sourcesContent":["\"use client\";\n\nimport {\n\tcreateSupportStore,\n\ttype SupportConfig,\n\ttype SupportStore,\n\ttype SupportStoreState,\n} from \"@cossistant/core\";\nimport { useMemo, useRef, useSyncExternalStore } from \"react\";\n\nconst storage = typeof window !== \"undefined\" ? window.localStorage : undefined;\nconst store = createSupportStore({ storage });\n\ntype Selector<T> = (state: SupportStoreState) => T;\n\ntype EqualityChecker<T> = (previous: T, next: T) => boolean;\n\nfunction useSelector<TSelected>(\n\tselector: Selector<TSelected>,\n\tisEqual: EqualityChecker<TSelected> = Object.is\n): TSelected {\n\tconst selectionRef = useRef<TSelected>(undefined);\n\n\tconst subscribe = (onStoreChange: () => void) =>\n\t\tstore.subscribe(() => {\n\t\t\tonStoreChange();\n\t\t});\n\n\tconst snapshot = useSyncExternalStore(\n\t\tsubscribe,\n\t\tstore.getState,\n\t\tstore.getState\n\t);\n\n\tconst selected = selector(snapshot);\n\n\tif (\n\t\tselectionRef.current === undefined ||\n\t\t!isEqual(selectionRef.current, selected)\n\t) {\n\t\tselectionRef.current = selected;\n\t}\n\n\treturn selectionRef.current as TSelected;\n}\n\nexport type UseSupportStoreResult = SupportStoreState &\n\tPick<\n\t\tSupportStore,\n\t\t| \"navigate\"\n\t\t| \"replace\"\n\t\t| \"goBack\"\n\t\t| \"open\"\n\t\t| \"close\"\n\t\t| \"toggle\"\n\t\t| \"updateConfig\"\n\t\t| \"reset\"\n\t>;\n\n/**\n * Access the support widget store state and actions.\n *\n * @example\n * const { isOpen, navigate, toggle } = useSupportStore();\n */\nexport function useSupportStore(): UseSupportStoreResult {\n\tconst state = useSelector((current) => current);\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\t...state,\n\t\t\tnavigate: store.navigate,\n\t\t\treplace: store.replace,\n\t\t\tgoBack: store.goBack,\n\t\t\topen: store.open,\n\t\t\tclose: store.close,\n\t\t\ttoggle: store.toggle,\n\t\t\tupdateConfig: store.updateConfig,\n\t\t\treset: store.reset,\n\t\t}),\n\t\t[state]\n\t);\n}\n\n/**\n * Access widget configuration (isOpen, size) and toggle helpers.\n *\n * @example\n * const { isOpen, open, close, toggle } = useSupportConfig();\n */\nexport const useSupportConfig = () => {\n\tconst config = useSelector((state) => state.config);\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\t...config,\n\t\t\topen: store.open,\n\t\t\tclose: store.close,\n\t\t\ttoggle: store.toggle,\n\t\t}),\n\t\t[config]\n\t);\n};\n\n/**\n * Access navigation state and routing methods.\n *\n * @example\n * const { navigate, goBack, page, params } = useSupportNavigation();\n */\nexport const useSupportNavigation = () => {\n\tconst navigation = useSelector((state) => state.navigation);\n\tconst { current, previousPages } = navigation;\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\tcurrent,\n\t\t\tpage: current.page,\n\t\t\tparams: current.params,\n\t\t\tpreviousPages,\n\t\t\tnavigate: store.navigate,\n\t\t\treplace: store.replace,\n\t\t\tgoBack: store.goBack,\n\t\t\tcanGoBack: previousPages.length > 0,\n\t\t}),\n\t\t[current, previousPages]\n\t);\n};\n\n/**\n * Initialize store with default configuration (used internally by Support component).\n */\nexport const initializeSupportStore = (props: {\n\tsize?: SupportConfig[\"size\"];\n\tdefaultOpen?: boolean;\n}) => {\n\tconst patch: Partial<SupportConfig> = {};\n\n\tif (props.size !== undefined) {\n\t\tpatch.size = props.size;\n\t}\n\n\tif (props.defaultOpen !== undefined) {\n\t\tpatch.isOpen = props.defaultOpen;\n\t}\n\n\tif (Object.keys(patch).length > 0) {\n\t\tstore.updateConfig(patch);\n\t}\n};\n"],"mappings":";;;;;;;AAWA,MAAM,QAAQ,mBAAmB,EAAE,SADnB,OAAO,WAAW,cAAc,OAAO,eAAe,QAC1B,CAAC;AAM7C,SAAS,YACR,UACA,UAAsC,OAAO,IACjC;CACZ,MAAM,eAAe,OAAkB,OAAU;CAEjD,MAAM,aAAa,kBAClB,MAAM,gBAAgB;AACrB,iBAAe;GACd;CAQH,MAAM,WAAW,SANA,qBAChB,WACA,MAAM,UACN,MAAM,SACN,CAEkC;AAEnC,KACC,aAAa,YAAY,UACzB,CAAC,QAAQ,aAAa,SAAS,SAAS,CAExC,cAAa,UAAU;AAGxB,QAAO,aAAa;;;;;;;;AAsBrB,SAAgB,kBAAyC;CACxD,MAAM,QAAQ,aAAa,YAAY,QAAQ;AAE/C,QAAO,eACC;EACN,GAAG;EACH,UAAU,MAAM;EAChB,SAAS,MAAM;EACf,QAAQ,MAAM;EACd,MAAM,MAAM;EACZ,OAAO,MAAM;EACb,QAAQ,MAAM;EACd,cAAc,MAAM;EACpB,OAAO,MAAM;EACb,GACD,CAAC,MAAM,CACP;;;;;;;;AASF,MAAa,yBAAyB;CACrC,MAAM,SAAS,aAAa,UAAU,MAAM,OAAO;AAEnD,QAAO,eACC;EACN,GAAG;EACH,MAAM,MAAM;EACZ,OAAO,MAAM;EACb,QAAQ,MAAM;EACd,GACD,CAAC,OAAO,CACR;;;;;;;;AASF,MAAa,6BAA6B;CAEzC,MAAM,EAAE,SAAS,kBADE,aAAa,UAAU,MAAM,WAAW;AAG3D,QAAO,eACC;EACN;EACA,MAAM,QAAQ;EACd,QAAQ,QAAQ;EAChB;EACA,UAAU,MAAM;EAChB,SAAS,MAAM;EACf,QAAQ,MAAM;EACd,WAAW,cAAc,SAAS;EAClC,GACD,CAAC,SAAS,cAAc,CACxB;;;;;AAMF,MAAa,0BAA0B,UAGjC;CACL,MAAMA,QAAgC,EAAE;AAExC,KAAI,MAAM,SAAS,OAClB,OAAM,OAAO,MAAM;AAGpB,KAAI,MAAM,gBAAgB,OACzB,OAAM,SAAS,MAAM;AAGtB,KAAI,OAAO,KAAK,MAAM,CAAC,SAAS,EAC/B,OAAM,aAAa,MAAM"}
|