@flamingo-stack/openframe-frontend-core 0.0.420 → 0.0.421-snapshot.20260713170448
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-WBLTGO7G.cjs → chunk-2JNFQEVX.cjs} +26 -26
- package/dist/{chunk-WBLTGO7G.cjs.map → chunk-2JNFQEVX.cjs.map} +1 -1
- package/dist/{chunk-T55A3BQD.js → chunk-3BGWK5QI.js} +4 -4
- package/dist/{chunk-ZZFLE5LG.js → chunk-4BWQYGIY.js} +2 -2
- package/dist/{chunk-KEWTMPHB.js → chunk-4TMMYZTY.js} +2 -2
- package/dist/{chunk-U7EUN5FZ.js → chunk-6F5OKJTW.js} +4 -4
- package/dist/{chunk-KLMLQ35Y.cjs → chunk-A2IRUIUJ.cjs} +37 -37
- package/dist/{chunk-KLMLQ35Y.cjs.map → chunk-A2IRUIUJ.cjs.map} +1 -1
- package/dist/{chunk-KPLRIPEH.cjs → chunk-B62DI2SC.cjs} +15 -15
- package/dist/{chunk-KPLRIPEH.cjs.map → chunk-B62DI2SC.cjs.map} +1 -1
- package/dist/{chunk-PUXTMLKC.cjs → chunk-BF5BXKM7.cjs} +62 -62
- package/dist/{chunk-PUXTMLKC.cjs.map → chunk-BF5BXKM7.cjs.map} +1 -1
- package/dist/{chunk-PAF4EFRR.js → chunk-DUHM44CQ.js} +2 -2
- package/dist/{chunk-YYF2AYM3.js → chunk-HFK33T6A.js} +4 -4
- package/dist/{chunk-J7WFE7WL.js → chunk-JSL3VXGJ.js} +2 -2
- package/dist/{chunk-BXXXBZYY.cjs → chunk-KUDLV25M.cjs} +190 -154
- package/dist/chunk-KUDLV25M.cjs.map +1 -0
- package/dist/{chunk-OBMYKFBO.js → chunk-LHM2VUTO.js} +2 -2
- package/dist/{chunk-AMUTZJZX.cjs → chunk-LWC2U5OC.cjs} +9 -9
- package/dist/{chunk-AMUTZJZX.cjs.map → chunk-LWC2U5OC.cjs.map} +1 -1
- package/dist/{chunk-2AN4EHN6.cjs → chunk-O3FSSWV4.cjs} +7 -7
- package/dist/{chunk-2AN4EHN6.cjs.map → chunk-O3FSSWV4.cjs.map} +1 -1
- package/dist/{chunk-PHJ6335O.cjs → chunk-PO4PXWZN.cjs} +5 -5
- package/dist/{chunk-PHJ6335O.cjs.map → chunk-PO4PXWZN.cjs.map} +1 -1
- package/dist/{chunk-ORDDVXDS.cjs → chunk-RGKGRS2T.cjs} +59 -59
- package/dist/{chunk-ORDDVXDS.cjs.map → chunk-RGKGRS2T.cjs.map} +1 -1
- package/dist/{chunk-5DTE27A4.cjs → chunk-ULUH2X53.cjs} +11 -11
- package/dist/{chunk-5DTE27A4.cjs.map → chunk-ULUH2X53.cjs.map} +1 -1
- package/dist/{chunk-NIS5VXZJ.cjs → chunk-WAQH35VG.cjs} +26 -26
- package/dist/{chunk-NIS5VXZJ.cjs.map → chunk-WAQH35VG.cjs.map} +1 -1
- package/dist/{chunk-G4W5D7L4.js → chunk-WQEEGFDM.js} +2 -2
- package/dist/{chunk-GC4355MW.js → chunk-XFYQV2K2.js} +2 -2
- package/dist/{chunk-3AJOKFJ4.js → chunk-YJDVAT7J.js} +66 -30
- package/dist/chunk-YJDVAT7J.js.map +1 -0
- package/dist/{chunk-4OZLRBOH.js → chunk-YUMFRC3D.js} +4 -4
- package/dist/{chunk-NDYJ37LY.cjs → chunk-YZQNKMFQ.cjs} +31 -31
- package/dist/{chunk-NDYJ37LY.cjs.map → chunk-YZQNKMFQ.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/chat-input.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.d.ts +9 -0
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-realtime-chunk-processor.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/api.types.d.ts +10 -0
- package/dist/components/chat/types/api.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/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/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/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +128 -128
- package/dist/components/index.js +9 -9
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tabs.d.ts +10 -0
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/dashboard-info-card.d.ts +26 -12
- package/dist/components/ui/dashboard-info-card.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/tab-navigation.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-input.tsx +5 -1
- package/src/components/chat/embeddable-chat.tsx +17 -3
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +52 -3
- package/src/components/chat/hooks/use-realtime-chunk-processor.ts +25 -3
- package/src/components/chat/types/api.types.ts +10 -0
- package/src/components/tabs.tsx +10 -0
- package/src/components/ui/dashboard-info-card.tsx +70 -45
- package/src/components/ui/tab-navigation.tsx +5 -2
- package/src/components/ui/tabs.tsx +11 -0
- package/src/stories/ApprovalRequestMessageClient.stories.tsx +89 -0
- package/src/stories/ChatMessageEnhanced.stories.tsx +219 -0
- package/src/stories/ChatTypingIndicator.stories.tsx +51 -0
- package/src/stories/ContextCompactionDisplay.stories.tsx +44 -0
- package/src/stories/DashboardInfoCard.stories.tsx +94 -9
- package/src/stories/EmbeddableChat.stories.tsx +159 -0
- package/src/stories/ErrorMessageDisplay.stories.tsx +66 -0
- package/src/stories/ThinkingDisplay.stories.tsx +63 -0
- package/src/stories/TicketCard.stories.tsx +245 -0
- package/dist/chunk-3AJOKFJ4.js.map +0 -1
- package/dist/chunk-BXXXBZYY.cjs.map +0 -1
- /package/dist/{chunk-T55A3BQD.js.map → chunk-3BGWK5QI.js.map} +0 -0
- /package/dist/{chunk-ZZFLE5LG.js.map → chunk-4BWQYGIY.js.map} +0 -0
- /package/dist/{chunk-KEWTMPHB.js.map → chunk-4TMMYZTY.js.map} +0 -0
- /package/dist/{chunk-U7EUN5FZ.js.map → chunk-6F5OKJTW.js.map} +0 -0
- /package/dist/{chunk-PAF4EFRR.js.map → chunk-DUHM44CQ.js.map} +0 -0
- /package/dist/{chunk-YYF2AYM3.js.map → chunk-HFK33T6A.js.map} +0 -0
- /package/dist/{chunk-J7WFE7WL.js.map → chunk-JSL3VXGJ.js.map} +0 -0
- /package/dist/{chunk-OBMYKFBO.js.map → chunk-LHM2VUTO.js.map} +0 -0
- /package/dist/{chunk-G4W5D7L4.js.map → chunk-WQEEGFDM.js.map} +0 -0
- /package/dist/{chunk-GC4355MW.js.map → chunk-XFYQV2K2.js.map} +0 -0
- /package/dist/{chunk-4OZLRBOH.js.map → chunk-YUMFRC3D.js.map} +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
|
2
|
+
import { DndContext } from '@dnd-kit/core'
|
|
3
|
+
import { SortableContext } from '@dnd-kit/sortable'
|
|
4
|
+
import * as React from 'react'
|
|
5
|
+
import {
|
|
6
|
+
TicketCard,
|
|
7
|
+
type TicketCardProps,
|
|
8
|
+
type BoardTicket,
|
|
9
|
+
} from '../components/features/board'
|
|
10
|
+
import type { PendingToolCallData } from '../components/chat/types'
|
|
11
|
+
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// Harness — `TicketCard` calls `useSortable`, which reads from a `DndContext` +
|
|
14
|
+
// `SortableContext`. In the app the Board provides these; the story supplies a
|
|
15
|
+
// minimal pair (with the card's own id registered) so drag bookkeeping resolves
|
|
16
|
+
// without a full board. The card renders on `bg-ods-bg`, so we pad it on the
|
|
17
|
+
// darker `bg-ods-card` column surface to keep the border readable.
|
|
18
|
+
// =============================================================================
|
|
19
|
+
|
|
20
|
+
function Harness(args: TicketCardProps) {
|
|
21
|
+
return (
|
|
22
|
+
<DndContext>
|
|
23
|
+
<SortableContext items={[args.ticket.id]}>
|
|
24
|
+
<div className="w-[320px] rounded-lg bg-ods-card p-[var(--spacing-system-sf)]">
|
|
25
|
+
<TicketCard {...args} />
|
|
26
|
+
</div>
|
|
27
|
+
</SortableContext>
|
|
28
|
+
</DndContext>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// =============================================================================
|
|
33
|
+
// Seed data
|
|
34
|
+
// =============================================================================
|
|
35
|
+
|
|
36
|
+
// ~2h ago so the relative timestamp ("2h ago") reads naturally. Assignees carry
|
|
37
|
+
// no `avatarUrl`, so `SquareAvatar` renders initials fallbacks — no external
|
|
38
|
+
// image dependency in the story.
|
|
39
|
+
const CREATED_AT = new Date(Date.now() - 2 * 60 * 60 * 1000).toISOString()
|
|
40
|
+
|
|
41
|
+
const ASSIGNEES = [
|
|
42
|
+
{ id: 'u1', initials: 'RS', name: 'Rachel Santos' },
|
|
43
|
+
{ id: 'u2', initials: 'MP', name: 'Marcus Park' },
|
|
44
|
+
{ id: 'u3', initials: 'JD', name: 'Jamie Diaz' },
|
|
45
|
+
{ id: 'u4', initials: 'AK', name: 'Aiden Kim' },
|
|
46
|
+
{ id: 'u5', initials: 'LN', name: 'Lena Novak' },
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
const BASE_TICKET: BoardTicket = {
|
|
50
|
+
id: 'ticket-1',
|
|
51
|
+
title: 'VPN connection drops every few minutes',
|
|
52
|
+
ticketNumber: '#1042',
|
|
53
|
+
status: 'TECH_REQUIRED',
|
|
54
|
+
deviceHostnames: ['MBP-15'],
|
|
55
|
+
organizationName: 'Acme Corp',
|
|
56
|
+
priority: 'high',
|
|
57
|
+
assignees: [ASSIGNEES[0]],
|
|
58
|
+
tags: ['network', 'vpn'],
|
|
59
|
+
createdAt: CREATED_AT,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const APPROVAL_TOOL_CALLS: PendingToolCallData[] = [
|
|
63
|
+
{
|
|
64
|
+
toolExecutionRequestId: 'req-1',
|
|
65
|
+
toolName: 'run_script',
|
|
66
|
+
toolTitle: 'Reset local admin password policy',
|
|
67
|
+
toolExplanation:
|
|
68
|
+
'Runs a PowerShell remediation on SRV-MAIL-01 to enforce the password policy.',
|
|
69
|
+
toolType: 'TACTICAL',
|
|
70
|
+
requiresApproval: true,
|
|
71
|
+
approvalType: 'CLIENT',
|
|
72
|
+
toolCallArguments: {
|
|
73
|
+
script:
|
|
74
|
+
'Get-LocalUser | Where-Object { $_.PasswordRequired -eq $false } | Set-LocalUser -PasswordNeverExpires $false',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
// =============================================================================
|
|
80
|
+
// Meta
|
|
81
|
+
// =============================================================================
|
|
82
|
+
|
|
83
|
+
const meta: Meta<typeof TicketCard> = {
|
|
84
|
+
title: 'Features/Board/TicketCard',
|
|
85
|
+
component: TicketCard,
|
|
86
|
+
parameters: { layout: 'centered' },
|
|
87
|
+
render: (args) => <Harness {...args} />,
|
|
88
|
+
args: {
|
|
89
|
+
ticket: BASE_TICKET,
|
|
90
|
+
columnId: 'TECH_REQUIRED',
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export default meta
|
|
95
|
+
type Story = StoryObj<typeof meta>
|
|
96
|
+
|
|
97
|
+
// =============================================================================
|
|
98
|
+
// Stories
|
|
99
|
+
// =============================================================================
|
|
100
|
+
|
|
101
|
+
/** Full card: title, device/org row, priority flag, one assignee, tags, timestamp. */
|
|
102
|
+
export const Default: Story = {}
|
|
103
|
+
|
|
104
|
+
/** Bare minimum — only the required fields, so every optional row is absent. */
|
|
105
|
+
export const Minimal: Story = {
|
|
106
|
+
args: {
|
|
107
|
+
ticket: {
|
|
108
|
+
id: 'ticket-min',
|
|
109
|
+
title: 'How to install Teams',
|
|
110
|
+
ticketNumber: '#1001',
|
|
111
|
+
status: 'ACTIVE',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Long title truncates to one line; long device/org row truncates too. */
|
|
117
|
+
export const LongContent: Story = {
|
|
118
|
+
args: {
|
|
119
|
+
ticket: {
|
|
120
|
+
...BASE_TICKET,
|
|
121
|
+
id: 'ticket-long',
|
|
122
|
+
title:
|
|
123
|
+
'Outlook keeps prompting for credentials after the latest Microsoft 365 update rollout across the whole org',
|
|
124
|
+
deviceHostnames: ['WS-2024-FINANCE-07', 'MBP-15-DESIGN', 'SRV-MAIL-01'],
|
|
125
|
+
organizationName: 'Digital Wave Media Group International',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Assignee overflow (+N badge) and tag overflow (+N pill). */
|
|
131
|
+
export const ManyAssigneesAndTags: Story = {
|
|
132
|
+
args: {
|
|
133
|
+
ticket: {
|
|
134
|
+
...BASE_TICKET,
|
|
135
|
+
id: 'ticket-many',
|
|
136
|
+
assignees: ASSIGNEES,
|
|
137
|
+
tags: ['hardware-failure', 'software-bug', 'urgent', 'escalated'],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* `hasNewMessage` + `columnColor` renders the colored "New Message" tag and
|
|
144
|
+
* tints the card border with the column color (readable text auto-derived).
|
|
145
|
+
*/
|
|
146
|
+
export const WithNewMessage: Story = {
|
|
147
|
+
args: {
|
|
148
|
+
ticket: { ...BASE_TICKET, id: 'ticket-new-msg', hasNewMessage: true },
|
|
149
|
+
columnColor: '#2890fa',
|
|
150
|
+
},
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Pending CLIENT approval — collapsed grey "Pending client approval" row with a
|
|
155
|
+
* loader glyph. Expand it to reach the shared approve/reject affordance.
|
|
156
|
+
*/
|
|
157
|
+
export const PendingClientApproval: Story = {
|
|
158
|
+
args: {
|
|
159
|
+
ticket: {
|
|
160
|
+
...BASE_TICKET,
|
|
161
|
+
id: 'ticket-approval-client',
|
|
162
|
+
pendingApproval: {
|
|
163
|
+
id: 'appr-1',
|
|
164
|
+
approvalType: 'CLIENT',
|
|
165
|
+
toolCalls: APPROVAL_TOOL_CALLS,
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
onApprove: (ticketId, requestId) =>
|
|
169
|
+
console.log('[story] approve', { ticketId, requestId }),
|
|
170
|
+
onReject: (ticketId, requestId) =>
|
|
171
|
+
console.log('[story] reject', { ticketId, requestId }),
|
|
172
|
+
},
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** Pending ADMIN approval — yellow shield "Technician approval required" header. */
|
|
176
|
+
export const PendingTechApproval: Story = {
|
|
177
|
+
args: {
|
|
178
|
+
ticket: {
|
|
179
|
+
...BASE_TICKET,
|
|
180
|
+
id: 'ticket-approval-admin',
|
|
181
|
+
pendingApproval: {
|
|
182
|
+
id: 'appr-2',
|
|
183
|
+
approvalType: 'ADMIN',
|
|
184
|
+
toolCalls: APPROVAL_TOOL_CALLS,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
onApprove: (ticketId, requestId) =>
|
|
188
|
+
console.log('[story] approve', { ticketId, requestId }),
|
|
189
|
+
onReject: (ticketId, requestId) =>
|
|
190
|
+
console.log('[story] reject', { ticketId, requestId }),
|
|
191
|
+
},
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** `href` set — the whole card is a link (Link anchor overlays the surface). */
|
|
195
|
+
export const AsLink: Story = {
|
|
196
|
+
args: {
|
|
197
|
+
ticket: { ...BASE_TICKET, id: 'ticket-link' },
|
|
198
|
+
href: '#ticket-1042',
|
|
199
|
+
},
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** `dragDisabled` — the card is pinned (no grab cursor, sortable listeners off). */
|
|
203
|
+
export const DragDisabled: Story = {
|
|
204
|
+
args: {
|
|
205
|
+
ticket: { ...BASE_TICKET, id: 'ticket-pinned' },
|
|
206
|
+
dragDisabled: true,
|
|
207
|
+
},
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/** `isOverlay` — the drag-overlay presentation (tilted + elevated shadow). */
|
|
211
|
+
export const DragOverlay: Story = {
|
|
212
|
+
args: {
|
|
213
|
+
ticket: { ...BASE_TICKET, id: 'ticket-overlay' },
|
|
214
|
+
isOverlay: true,
|
|
215
|
+
},
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** All four priority flag colors side by side. */
|
|
219
|
+
export const Priorities: Story = {
|
|
220
|
+
render: () => {
|
|
221
|
+
const priorities: BoardTicket['priority'][] = ['low', 'medium', 'high', 'urgent']
|
|
222
|
+
return (
|
|
223
|
+
<DndContext>
|
|
224
|
+
<SortableContext items={priorities.map((p) => `ticket-prio-${p}`)}>
|
|
225
|
+
<div className="flex w-[320px] flex-col gap-[var(--spacing-system-sf)] rounded-lg bg-ods-card p-[var(--spacing-system-sf)]">
|
|
226
|
+
{priorities.map((p) => (
|
|
227
|
+
<TicketCard
|
|
228
|
+
key={p}
|
|
229
|
+
columnId="ACTIVE"
|
|
230
|
+
ticket={{
|
|
231
|
+
...BASE_TICKET,
|
|
232
|
+
id: `ticket-prio-${p}`,
|
|
233
|
+
title: `${p![0].toUpperCase()}${p!.slice(1)} priority ticket`,
|
|
234
|
+
priority: p,
|
|
235
|
+
tags: undefined,
|
|
236
|
+
assignees: undefined,
|
|
237
|
+
}}
|
|
238
|
+
/>
|
|
239
|
+
))}
|
|
240
|
+
</div>
|
|
241
|
+
</SortableContext>
|
|
242
|
+
</DndContext>
|
|
243
|
+
)
|
|
244
|
+
},
|
|
245
|
+
}
|