@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.
Files changed (113) hide show
  1. package/dist/{chunk-WBLTGO7G.cjs → chunk-2JNFQEVX.cjs} +26 -26
  2. package/dist/{chunk-WBLTGO7G.cjs.map → chunk-2JNFQEVX.cjs.map} +1 -1
  3. package/dist/{chunk-T55A3BQD.js → chunk-3BGWK5QI.js} +4 -4
  4. package/dist/{chunk-ZZFLE5LG.js → chunk-4BWQYGIY.js} +2 -2
  5. package/dist/{chunk-KEWTMPHB.js → chunk-4TMMYZTY.js} +2 -2
  6. package/dist/{chunk-U7EUN5FZ.js → chunk-6F5OKJTW.js} +4 -4
  7. package/dist/{chunk-KLMLQ35Y.cjs → chunk-A2IRUIUJ.cjs} +37 -37
  8. package/dist/{chunk-KLMLQ35Y.cjs.map → chunk-A2IRUIUJ.cjs.map} +1 -1
  9. package/dist/{chunk-KPLRIPEH.cjs → chunk-B62DI2SC.cjs} +15 -15
  10. package/dist/{chunk-KPLRIPEH.cjs.map → chunk-B62DI2SC.cjs.map} +1 -1
  11. package/dist/{chunk-PUXTMLKC.cjs → chunk-BF5BXKM7.cjs} +62 -62
  12. package/dist/{chunk-PUXTMLKC.cjs.map → chunk-BF5BXKM7.cjs.map} +1 -1
  13. package/dist/{chunk-PAF4EFRR.js → chunk-DUHM44CQ.js} +2 -2
  14. package/dist/{chunk-YYF2AYM3.js → chunk-HFK33T6A.js} +4 -4
  15. package/dist/{chunk-J7WFE7WL.js → chunk-JSL3VXGJ.js} +2 -2
  16. package/dist/{chunk-BXXXBZYY.cjs → chunk-KUDLV25M.cjs} +190 -154
  17. package/dist/chunk-KUDLV25M.cjs.map +1 -0
  18. package/dist/{chunk-OBMYKFBO.js → chunk-LHM2VUTO.js} +2 -2
  19. package/dist/{chunk-AMUTZJZX.cjs → chunk-LWC2U5OC.cjs} +9 -9
  20. package/dist/{chunk-AMUTZJZX.cjs.map → chunk-LWC2U5OC.cjs.map} +1 -1
  21. package/dist/{chunk-2AN4EHN6.cjs → chunk-O3FSSWV4.cjs} +7 -7
  22. package/dist/{chunk-2AN4EHN6.cjs.map → chunk-O3FSSWV4.cjs.map} +1 -1
  23. package/dist/{chunk-PHJ6335O.cjs → chunk-PO4PXWZN.cjs} +5 -5
  24. package/dist/{chunk-PHJ6335O.cjs.map → chunk-PO4PXWZN.cjs.map} +1 -1
  25. package/dist/{chunk-ORDDVXDS.cjs → chunk-RGKGRS2T.cjs} +59 -59
  26. package/dist/{chunk-ORDDVXDS.cjs.map → chunk-RGKGRS2T.cjs.map} +1 -1
  27. package/dist/{chunk-5DTE27A4.cjs → chunk-ULUH2X53.cjs} +11 -11
  28. package/dist/{chunk-5DTE27A4.cjs.map → chunk-ULUH2X53.cjs.map} +1 -1
  29. package/dist/{chunk-NIS5VXZJ.cjs → chunk-WAQH35VG.cjs} +26 -26
  30. package/dist/{chunk-NIS5VXZJ.cjs.map → chunk-WAQH35VG.cjs.map} +1 -1
  31. package/dist/{chunk-G4W5D7L4.js → chunk-WQEEGFDM.js} +2 -2
  32. package/dist/{chunk-GC4355MW.js → chunk-XFYQV2K2.js} +2 -2
  33. package/dist/{chunk-3AJOKFJ4.js → chunk-YJDVAT7J.js} +66 -30
  34. package/dist/chunk-YJDVAT7J.js.map +1 -0
  35. package/dist/{chunk-4OZLRBOH.js → chunk-YUMFRC3D.js} +4 -4
  36. package/dist/{chunk-NDYJ37LY.cjs → chunk-YZQNKMFQ.cjs} +31 -31
  37. package/dist/{chunk-NDYJ37LY.cjs.map → chunk-YZQNKMFQ.cjs.map} +1 -1
  38. package/dist/components/case-studies/index.cjs +8 -8
  39. package/dist/components/case-studies/index.js +2 -2
  40. package/dist/components/chat/chat-input.d.ts.map +1 -1
  41. package/dist/components/chat/embeddable-chat.d.ts +9 -0
  42. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  43. package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
  44. package/dist/components/chat/hooks/use-realtime-chunk-processor.d.ts.map +1 -1
  45. package/dist/components/chat/index.cjs +2 -2
  46. package/dist/components/chat/index.js +1 -1
  47. package/dist/components/chat/types/api.types.d.ts +10 -0
  48. package/dist/components/chat/types/api.types.d.ts.map +1 -1
  49. package/dist/components/contact/index.cjs +3 -3
  50. package/dist/components/contact/index.js +2 -2
  51. package/dist/components/docs/index.cjs +5 -5
  52. package/dist/components/docs/index.js +4 -4
  53. package/dist/components/embeds/index.cjs +3 -3
  54. package/dist/components/embeds/index.js +2 -2
  55. package/dist/components/faq/index.cjs +3 -3
  56. package/dist/components/faq/index.js +2 -2
  57. package/dist/components/features/index.cjs +2 -2
  58. package/dist/components/features/index.js +1 -1
  59. package/dist/components/help-center-pages/index.cjs +20 -20
  60. package/dist/components/help-center-pages/index.js +11 -11
  61. package/dist/components/index.cjs +128 -128
  62. package/dist/components/index.js +9 -9
  63. package/dist/components/navigation/index.cjs +2 -2
  64. package/dist/components/navigation/index.js +1 -1
  65. package/dist/components/onboarding-guides/index.cjs +5 -5
  66. package/dist/components/onboarding-guides/index.js +4 -4
  67. package/dist/components/related-content/index.cjs +3 -3
  68. package/dist/components/related-content/index.js +2 -2
  69. package/dist/components/tabs.d.ts +10 -0
  70. package/dist/components/tabs.d.ts.map +1 -1
  71. package/dist/components/tickets/index.cjs +5 -5
  72. package/dist/components/tickets/index.js +4 -4
  73. package/dist/components/ui/dashboard-info-card.d.ts +26 -12
  74. package/dist/components/ui/dashboard-info-card.d.ts.map +1 -1
  75. package/dist/components/ui/index.cjs +2 -2
  76. package/dist/components/ui/index.js +1 -1
  77. package/dist/components/ui/tab-navigation.d.ts.map +1 -1
  78. package/dist/components/ui/tabs.d.ts +11 -0
  79. package/dist/components/ui/tabs.d.ts.map +1 -1
  80. package/dist/index.cjs +2 -2
  81. package/dist/index.js +1 -1
  82. package/package.json +1 -1
  83. package/src/components/chat/chat-input.tsx +5 -1
  84. package/src/components/chat/embeddable-chat.tsx +17 -3
  85. package/src/components/chat/hooks/use-nats-chat-adapter.ts +52 -3
  86. package/src/components/chat/hooks/use-realtime-chunk-processor.ts +25 -3
  87. package/src/components/chat/types/api.types.ts +10 -0
  88. package/src/components/tabs.tsx +10 -0
  89. package/src/components/ui/dashboard-info-card.tsx +70 -45
  90. package/src/components/ui/tab-navigation.tsx +5 -2
  91. package/src/components/ui/tabs.tsx +11 -0
  92. package/src/stories/ApprovalRequestMessageClient.stories.tsx +89 -0
  93. package/src/stories/ChatMessageEnhanced.stories.tsx +219 -0
  94. package/src/stories/ChatTypingIndicator.stories.tsx +51 -0
  95. package/src/stories/ContextCompactionDisplay.stories.tsx +44 -0
  96. package/src/stories/DashboardInfoCard.stories.tsx +94 -9
  97. package/src/stories/EmbeddableChat.stories.tsx +159 -0
  98. package/src/stories/ErrorMessageDisplay.stories.tsx +66 -0
  99. package/src/stories/ThinkingDisplay.stories.tsx +63 -0
  100. package/src/stories/TicketCard.stories.tsx +245 -0
  101. package/dist/chunk-3AJOKFJ4.js.map +0 -1
  102. package/dist/chunk-BXXXBZYY.cjs.map +0 -1
  103. /package/dist/{chunk-T55A3BQD.js.map → chunk-3BGWK5QI.js.map} +0 -0
  104. /package/dist/{chunk-ZZFLE5LG.js.map → chunk-4BWQYGIY.js.map} +0 -0
  105. /package/dist/{chunk-KEWTMPHB.js.map → chunk-4TMMYZTY.js.map} +0 -0
  106. /package/dist/{chunk-U7EUN5FZ.js.map → chunk-6F5OKJTW.js.map} +0 -0
  107. /package/dist/{chunk-PAF4EFRR.js.map → chunk-DUHM44CQ.js.map} +0 -0
  108. /package/dist/{chunk-YYF2AYM3.js.map → chunk-HFK33T6A.js.map} +0 -0
  109. /package/dist/{chunk-J7WFE7WL.js.map → chunk-JSL3VXGJ.js.map} +0 -0
  110. /package/dist/{chunk-OBMYKFBO.js.map → chunk-LHM2VUTO.js.map} +0 -0
  111. /package/dist/{chunk-G4W5D7L4.js.map → chunk-WQEEGFDM.js.map} +0 -0
  112. /package/dist/{chunk-GC4355MW.js.map → chunk-XFYQV2K2.js.map} +0 -0
  113. /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
+ }