@flamingo-stack/openframe-frontend-core 0.0.217 → 0.0.218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-L6IBKPVM.js → chunk-EKBM4FHK.js} +2 -2
- package/dist/{chunk-SWZUZYWR.js → chunk-EWA2NFUR.js} +2 -2
- package/dist/{chunk-TYIBMDUZ.cjs → chunk-FZZBCRID.cjs} +7 -7
- package/dist/{chunk-TYIBMDUZ.cjs.map → chunk-FZZBCRID.cjs.map} +1 -1
- package/dist/{chunk-G2HHSZ3S.cjs → chunk-GE64T3JT.cjs} +9 -9
- package/dist/{chunk-G2HHSZ3S.cjs.map → chunk-GE64T3JT.cjs.map} +1 -1
- package/dist/{chunk-YWDC5BXM.cjs → chunk-L5RSJE2I.cjs} +1940 -915
- package/dist/chunk-L5RSJE2I.cjs.map +1 -0
- package/dist/{chunk-BVFRD34B.js → chunk-OHOUSDAY.js} +2 -2
- package/dist/{chunk-MVQ3OODK.cjs → chunk-S4SVD5JI.cjs} +9 -9
- package/dist/{chunk-MVQ3OODK.cjs.map → chunk-S4SVD5JI.cjs.map} +1 -1
- package/dist/{chunk-N5IKPYRL.js → chunk-SWIR5EB2.js} +2 -2
- package/dist/{chunk-6DCKL73F.cjs → chunk-TCJ5B2ZD.cjs} +24 -24
- package/dist/{chunk-6DCKL73F.cjs.map → chunk-TCJ5B2ZD.cjs.map} +1 -1
- package/dist/{chunk-ENBGG2K2.js → chunk-V5JY5RSY.js} +2954 -1929
- package/dist/chunk-V5JY5RSY.js.map +1 -0
- package/dist/components/chat/embeddable-chat.d.ts +13 -0
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +104 -10
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-slash-commands.d.ts +6 -0
- package/dist/components/chat/hooks/use-slash-commands.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-unified-chat.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/types/unified-chat-state.types.d.ts +81 -0
- package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/index.cjs +73 -51
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +26 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/app-header.d.ts +7 -0
- package/dist/components/navigation/app-header.d.ts.map +1 -1
- package/dist/components/navigation/app-layout-drawer.d.ts +65 -0
- package/dist/components/navigation/app-layout-drawer.d.ts.map +1 -0
- package/dist/components/navigation/app-layout.d.ts +9 -1
- package/dist/components/navigation/app-layout.d.ts.map +1 -1
- package/dist/components/navigation/header-mingo-button.d.ts +21 -0
- package/dist/components/navigation/header-mingo-button.d.ts.map +1 -0
- package/dist/components/navigation/index.cjs +24 -2
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.d.ts +5 -1
- package/dist/components/navigation/index.d.ts.map +1 -1
- package/dist/components/navigation/index.js +23 -1
- package/dist/components/onboarding-guides/index.cjs +18 -18
- package/dist/components/onboarding-guides/index.js +3 -3
- package/dist/components/tickets/hooks/use-ticket-engagements.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +80 -66
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +20 -6
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +26 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -1
- package/dist/utils/embed-authed-fetch.d.ts +80 -0
- package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
- package/dist/utils/index.cjs +70 -5
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +70 -6
- package/dist/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/chat/embeddable-chat.tsx +154 -37
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +601 -23
- package/src/components/chat/hooks/use-slash-commands.ts +10 -1
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +45 -0
- package/src/components/chat/hooks/use-unified-chat.ts +59 -0
- package/src/components/chat/types/unified-chat-state.types.ts +116 -0
- package/src/components/navigation/app-header.tsx +23 -0
- package/src/components/navigation/app-layout-drawer.tsx +620 -0
- package/src/components/navigation/app-layout.tsx +65 -26
- package/src/components/navigation/header-mingo-button.tsx +58 -0
- package/src/components/navigation/index.ts +17 -1
- package/src/components/tickets/hooks/use-ticket-engagements.ts +24 -4
- package/src/stories/AppLayoutDrawer.stories.tsx +228 -0
- package/src/utils/.embed-authed-fetch.md +7 -0
- package/src/utils/__tests__/embed-authed-fetch.test.ts +103 -1
- package/src/utils/embed-authed-fetch.ts +247 -7
- package/src/utils/index.ts +5 -1
- package/dist/chunk-ENBGG2K2.js.map +0 -1
- package/dist/chunk-YWDC5BXM.cjs.map +0 -1
- /package/dist/{chunk-L6IBKPVM.js.map → chunk-EKBM4FHK.js.map} +0 -0
- /package/dist/{chunk-SWZUZYWR.js.map → chunk-EWA2NFUR.js.map} +0 -0
- /package/dist/{chunk-BVFRD34B.js.map → chunk-OHOUSDAY.js.map} +0 -0
- /package/dist/{chunk-N5IKPYRL.js.map → chunk-SWIR5EB2.js.map} +0 -0
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
EmptyState,
|
|
5
5
|
UnifiedPagination,
|
|
6
6
|
init_unified_pagination
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-EKBM4FHK.js";
|
|
8
8
|
import {
|
|
9
9
|
DevCardRowContent,
|
|
10
10
|
DevCardRowSkeletonList,
|
|
11
11
|
DevSectionPage
|
|
12
|
-
} from "../../chunk-
|
|
12
|
+
} from "../../chunk-SWIR5EB2.js";
|
|
13
13
|
import "../../chunk-ORJREQ2W.js";
|
|
14
14
|
import {
|
|
15
15
|
ContactForm
|
|
16
|
-
} from "../../chunk-
|
|
16
|
+
} from "../../chunk-OHOUSDAY.js";
|
|
17
17
|
import {
|
|
18
18
|
AlertDialog,
|
|
19
19
|
AlertDialogAction,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
scrollElementIntoView,
|
|
42
42
|
useChatAttachments,
|
|
43
43
|
useChatIdentity
|
|
44
|
-
} from "../../chunk-
|
|
44
|
+
} from "../../chunk-V5JY5RSY.js";
|
|
45
45
|
import "../../chunk-LXC6P2EO.js";
|
|
46
46
|
import "../../chunk-EL5YVPD5.js";
|
|
47
47
|
import {
|
|
@@ -237,7 +237,8 @@ var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
|
237
237
|
function useTicketEngagements(externalTicketId, enabled = true, refetchInterval = false) {
|
|
238
238
|
const identity = useChatIdentity();
|
|
239
239
|
const identityKey = identity.user?.email ?? "anon";
|
|
240
|
-
const
|
|
240
|
+
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
241
|
+
const queryEnabled = fetchable && identity.authTier !== "anon" && !!identity.user?.email;
|
|
241
242
|
const query = useQuery({
|
|
242
243
|
queryKey: ["ticket-engagements", externalTicketId, identityKey],
|
|
243
244
|
enabled: queryEnabled,
|
|
@@ -268,7 +269,20 @@ function useTicketEngagements(externalTicketId, enabled = true, refetchInterval
|
|
|
268
269
|
});
|
|
269
270
|
return {
|
|
270
271
|
engagements: query.data ?? [],
|
|
271
|
-
|
|
272
|
+
// Loading-state truth that prevents the "body → blink → skeleton → data"
|
|
273
|
+
// double-flash. The bug: `useChatIdentity` starts at anon defaults and
|
|
274
|
+
// resolves async, so on the first render `queryEnabled` is false and the
|
|
275
|
+
// OLD `queryEnabled && query.isLoading` returned FALSE — the panel rendered
|
|
276
|
+
// the ticket body, THEN identity resolved, the query enabled, isLoading
|
|
277
|
+
// flipped true → skeleton appeared (the blink), then data landed.
|
|
278
|
+
//
|
|
279
|
+
// Fix: for a fetchable ticket we are "loading" whenever we don't yet have
|
|
280
|
+
// the timeline to show — that includes the window while identity is still
|
|
281
|
+
// resolving (so we skeleton from the FIRST render, never the body) AND the
|
|
282
|
+
// cold query fetch (`data === undefined`). A background poll keeps
|
|
283
|
+
// `query.data` defined, so it never re-flashes the skeleton. Non-fetchable
|
|
284
|
+
// (optimistic/disabled) or a resolved-anon viewer → not loading.
|
|
285
|
+
isLoading: fetchable && (identity.isLoading || queryEnabled && query.data === void 0),
|
|
272
286
|
isFetching: query.isFetching,
|
|
273
287
|
error: query.error ?? null,
|
|
274
288
|
refetch: () => {
|