@flamingo-stack/openframe-frontend-core 0.0.276 → 0.0.277
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-SITWWJWS.cjs → chunk-27NKVNWD.cjs} +25 -25
- package/dist/{chunk-SITWWJWS.cjs.map → chunk-27NKVNWD.cjs.map} +1 -1
- package/dist/{chunk-QNWFTSAG.js → chunk-6A5GGUIA.js} +2 -2
- package/dist/{chunk-NITJSVUM.js → chunk-DMAPXENZ.js} +2 -2
- package/dist/{chunk-NPKMH446.js → chunk-KBKW4LVO.js} +2 -2
- package/dist/{chunk-6IJWWLC3.cjs → chunk-L5P4IFPK.cjs} +6 -6
- package/dist/{chunk-6IJWWLC3.cjs.map → chunk-L5P4IFPK.cjs.map} +1 -1
- package/dist/{chunk-IAB7QACX.cjs → chunk-LALAS7OH.cjs} +9 -3
- package/dist/chunk-LALAS7OH.cjs.map +1 -0
- package/dist/{chunk-62U6DFIT.js → chunk-MHQPAA3W.js} +2 -2
- package/dist/{chunk-DPMW5E6Q.cjs → chunk-NCJENC5G.cjs} +10 -10
- package/dist/{chunk-DPMW5E6Q.cjs.map → chunk-NCJENC5G.cjs.map} +1 -1
- package/dist/{chunk-VAIPAZPJ.js → chunk-P6Y3S6QK.js} +9 -3
- package/dist/chunk-P6Y3S6QK.js.map +1 -0
- package/dist/{chunk-MYJKC56A.cjs → chunk-ZSPPV2SX.cjs} +34 -34
- package/dist/{chunk-MYJKC56A.cjs.map → chunk-ZSPPV2SX.cjs.map} +1 -1
- package/dist/components/chat/chat-container.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/component.types.d.ts +11 -0
- package/dist/components/chat/types/component.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/faq/index.cjs +3 -3
- package/dist/components/faq/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 +53 -53
- package/dist/components/index.js +4 -4
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +52 -52
- package/dist/components/tickets/index.js +3 -3
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-container.tsx +40 -25
- package/src/components/chat/types/component.types.ts +11 -0
- package/dist/chunk-IAB7QACX.cjs.map +0 -1
- package/dist/chunk-VAIPAZPJ.js.map +0 -1
- /package/dist/{chunk-QNWFTSAG.js.map → chunk-6A5GGUIA.js.map} +0 -0
- /package/dist/{chunk-NITJSVUM.js.map → chunk-DMAPXENZ.js.map} +0 -0
- /package/dist/{chunk-NPKMH446.js.map → chunk-KBKW4LVO.js.map} +0 -0
- /package/dist/{chunk-62U6DFIT.js.map → chunk-MHQPAA3W.js.map} +0 -0
|
@@ -6,6 +6,7 @@ import { PlusCircleIcon } from "../plus-circle-icon"
|
|
|
6
6
|
import { XmarkIcon } from "../icons-v2-generated/signs-and-symbols/xmark-icon"
|
|
7
7
|
import { Chevron02LeftIcon } from "../icons-v2-generated"
|
|
8
8
|
import { TicketStatusTag, resolveStatusTagProps } from "../ui/ticket-status-tag"
|
|
9
|
+
import { Skeleton } from "../ui/skeleton"
|
|
9
10
|
import type { ConnectionIndicatorProps, ChatContainerProps, ChatHeaderProps } from "./types"
|
|
10
11
|
|
|
11
12
|
const ConnectionIndicator: React.FC<ConnectionIndicatorProps> = ({ status }) => {
|
|
@@ -62,7 +63,7 @@ const ChatContainer = React.forwardRef<HTMLDivElement, ChatContainerProps>(
|
|
|
62
63
|
ChatContainer.displayName = "ChatContainer"
|
|
63
64
|
|
|
64
65
|
const ChatHeader = React.forwardRef<HTMLDivElement, ChatHeaderProps>(
|
|
65
|
-
({ className, userName = 'Grace "Fae" Meadows', userTitle = "Your Personal Assistant", userAvatar, userIcon, onSettingsClick, onNewChat, onClose, onBack, showNewChat = false, connectionStatus = 'disconnected', serverUrl = null, headerActions, ticketInfo, fullWidth = false, bare = false, ...props }, ref) => {
|
|
66
|
+
({ className, userName = 'Grace "Fae" Meadows', userTitle = "Your Personal Assistant", userAvatar, userIcon, onSettingsClick, onNewChat, onClose, onBack, showNewChat = false, connectionStatus = 'disconnected', serverUrl = null, headerActions, ticketInfo, fullWidth = false, bare = false, isLoading = false, ...props }, ref) => {
|
|
66
67
|
const cardClasses = bare
|
|
67
68
|
? ""
|
|
68
69
|
: "rounded-md bg-ods-card border border-ods-border"
|
|
@@ -93,33 +94,47 @@ const ChatHeader = React.forwardRef<HTMLDivElement, ChatHeaderProps>(
|
|
|
93
94
|
)}
|
|
94
95
|
<div className={cardClasses}>
|
|
95
96
|
<div className="flex items-center justify-between gap-4 px-4 py-3">
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
{isLoading ? (
|
|
98
|
+
<div className="flex items-center gap-3">
|
|
99
|
+
{/* 64px round avatar placeholder — matches the `w-16 h-16`
|
|
100
|
+
rounded-full avatar / userIcon block below. */}
|
|
101
|
+
<Skeleton className="w-16 h-16 rounded-full shrink-0" />
|
|
102
|
+
<div className="flex flex-col gap-1">
|
|
103
|
+
{/* Name line — sized to the `text-h3` name. */}
|
|
104
|
+
<Skeleton className="h-6 w-40" />
|
|
105
|
+
{/* Server line — sized to the `text-h4` secondary row. */}
|
|
106
|
+
<Skeleton className="h-4 w-28" />
|
|
100
107
|
</div>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
108
|
+
</div>
|
|
109
|
+
) : (
|
|
110
|
+
<div className="flex items-center gap-3">
|
|
111
|
+
{userIcon ? (
|
|
112
|
+
<div className="flex items-center justify-center w-16 h-16 rounded-full bg-ods-accent">
|
|
113
|
+
{userIcon}
|
|
114
|
+
</div>
|
|
115
|
+
) : (
|
|
116
|
+
<Avatar
|
|
117
|
+
src={userAvatar}
|
|
118
|
+
alt={userName}
|
|
119
|
+
fallback={userName}
|
|
120
|
+
size="xl"
|
|
121
|
+
variant="round"
|
|
122
|
+
className="bg-ods-flamingo-pink"
|
|
123
|
+
/>
|
|
124
|
+
)}
|
|
125
|
+
<div className="flex flex-col">
|
|
126
|
+
<span className="text-h3">{userName}</span>
|
|
127
|
+
<div className="flex items-center gap-2">
|
|
128
|
+
{serverUrl && (
|
|
129
|
+
<>
|
|
130
|
+
<span className="text-h4 text-ods-text-secondary">{serverUrl}</span>
|
|
131
|
+
<ConnectionIndicator status={connectionStatus} />
|
|
132
|
+
</>
|
|
133
|
+
)}
|
|
134
|
+
</div>
|
|
120
135
|
</div>
|
|
121
136
|
</div>
|
|
122
|
-
|
|
137
|
+
)}
|
|
123
138
|
<div className="flex items-center gap-1">
|
|
124
139
|
{showNewChat && onNewChat && (
|
|
125
140
|
<Button
|
|
@@ -77,6 +77,17 @@ export interface ChatHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
77
77
|
* Default `false` — preserves the existing card look.
|
|
78
78
|
*/
|
|
79
79
|
bare?: boolean
|
|
80
|
+
/**
|
|
81
|
+
* Render a skeleton placeholder in place of the user identity row
|
|
82
|
+
* (avatar/icon + name + server line) while the host is still
|
|
83
|
+
* resolving the assistant/connection data. The skeleton blocks match
|
|
84
|
+
* the real layout's dimensions (64px round avatar, `text-h3` name,
|
|
85
|
+
* `text-h4` server line) so there is no layout shift when the content
|
|
86
|
+
* swaps in.
|
|
87
|
+
*
|
|
88
|
+
* Default `false` — renders the resolved identity row.
|
|
89
|
+
*/
|
|
90
|
+
isLoading?: boolean
|
|
80
91
|
}
|
|
81
92
|
|
|
82
93
|
// ========== Connection Indicator Props ==========
|