@flamingo-stack/openframe-frontend-core 0.0.565-1861.5100.1 → 0.0.565

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 (204) hide show
  1. package/dist/chat-protocol/index.cjs.map +1 -1
  2. package/dist/chat-protocol/index.js.map +1 -1
  3. package/dist/{chunk-TA5P2M7V.cjs → chunk-26LZFWY6.cjs} +732 -812
  4. package/dist/chunk-26LZFWY6.cjs.map +1 -0
  5. package/dist/{chunk-KHEOXHF4.cjs → chunk-32QBTN5L.cjs} +5 -5
  6. package/dist/{chunk-KHEOXHF4.cjs.map → chunk-32QBTN5L.cjs.map} +1 -1
  7. package/dist/{chunk-GG6CAELN.js → chunk-3FBPPKV2.js} +4 -4
  8. package/dist/{chunk-MSUSONUK.js → chunk-5JYX2GOP.js} +3233 -3313
  9. package/dist/chunk-5JYX2GOP.js.map +1 -0
  10. package/dist/{chunk-EQEMZU45.js → chunk-5K3F5AZX.js} +4 -4
  11. package/dist/{chunk-YVOMHB73.js → chunk-5MVE77D5.js} +21 -35
  12. package/dist/chunk-5MVE77D5.js.map +1 -0
  13. package/dist/{chunk-H4RCJ4IB.js → chunk-6F47STCR.js} +3 -7
  14. package/dist/{chunk-H4RCJ4IB.js.map → chunk-6F47STCR.js.map} +1 -1
  15. package/dist/{chunk-XPLZB74T.js → chunk-6RILRC7X.js} +2 -2
  16. package/dist/{chunk-BKDSNVGH.cjs → chunk-7FH6MZ6M.cjs} +9 -9
  17. package/dist/{chunk-BKDSNVGH.cjs.map → chunk-7FH6MZ6M.cjs.map} +1 -1
  18. package/dist/{chunk-ZUVVJ24E.js → chunk-7IR5LKYC.js} +2 -2
  19. package/dist/{chunk-GG2HJQW3.cjs → chunk-AN7YK35P.cjs} +26 -26
  20. package/dist/{chunk-GG2HJQW3.cjs.map → chunk-AN7YK35P.cjs.map} +1 -1
  21. package/dist/{chunk-PZH3CZTJ.cjs → chunk-CCFBL7JU.cjs} +75 -89
  22. package/dist/chunk-CCFBL7JU.cjs.map +1 -0
  23. package/dist/{chunk-OEN3GTRL.js → chunk-DEYRHTLD.js} +2 -2
  24. package/dist/{chunk-MIKGZY7V.js → chunk-GCMASPSW.js} +5 -5
  25. package/dist/{chunk-ZYC4O76Y.js → chunk-HJ7OVIR7.js} +2 -2
  26. package/dist/{chunk-BWMVI2KD.cjs → chunk-HVS56KQE.cjs} +7 -7
  27. package/dist/{chunk-BWMVI2KD.cjs.map → chunk-HVS56KQE.cjs.map} +1 -1
  28. package/dist/{chunk-GZL5SAUI.cjs → chunk-HWQ5HMJN.cjs} +15 -19
  29. package/dist/chunk-HWQ5HMJN.cjs.map +1 -0
  30. package/dist/{chunk-NAYXROCV.cjs → chunk-ISK6LRRY.cjs} +3 -3
  31. package/dist/{chunk-NAYXROCV.cjs.map → chunk-ISK6LRRY.cjs.map} +1 -1
  32. package/dist/{chunk-4H7L4OSR.cjs → chunk-LOLVMAT3.cjs} +4 -4
  33. package/dist/{chunk-4H7L4OSR.cjs.map → chunk-LOLVMAT3.cjs.map} +1 -1
  34. package/dist/{chunk-XZNKPEWB.js → chunk-MIBKEMZY.js} +2 -2
  35. package/dist/chunk-MVWSLZG7.js +2 -0
  36. package/dist/{chunk-QWVON3LG.cjs → chunk-NCJUIT3Q.cjs} +20 -20
  37. package/dist/{chunk-QWVON3LG.cjs.map → chunk-NCJUIT3Q.cjs.map} +1 -1
  38. package/dist/{chunk-OTDVQBLI.cjs → chunk-NM5NBMMD.cjs} +31 -31
  39. package/dist/{chunk-OTDVQBLI.cjs.map → chunk-NM5NBMMD.cjs.map} +1 -1
  40. package/dist/{chunk-SQ53GVCG.js → chunk-QQFUJ6MS.js} +2 -2
  41. package/dist/{chunk-PBH2BQYR.cjs → chunk-TFEL2C6I.cjs} +86 -86
  42. package/dist/{chunk-PBH2BQYR.cjs.map → chunk-TFEL2C6I.cjs.map} +1 -1
  43. package/dist/{chunk-DLSDYLY3.cjs → chunk-TFRJ7B4X.cjs} +11 -11
  44. package/dist/{chunk-DLSDYLY3.cjs.map → chunk-TFRJ7B4X.cjs.map} +1 -1
  45. package/dist/{chunk-Y6IGG6RZ.cjs → chunk-TGT3JHVU.cjs} +39 -39
  46. package/dist/{chunk-Y6IGG6RZ.cjs.map → chunk-TGT3JHVU.cjs.map} +1 -1
  47. package/dist/{chunk-XSK7ZQ3C.js → chunk-TXLUKQBI.js} +2 -2
  48. package/dist/{chunk-LOWWLH2W.js → chunk-UK6SSMUR.js} +2 -2
  49. package/dist/chunk-ZTM35Q76.cjs +2 -0
  50. package/dist/{chunk-UGAHDPNU.cjs.map → chunk-ZTM35Q76.cjs.map} +1 -1
  51. package/dist/components/case-studies/index.cjs +8 -8
  52. package/dist/components/case-studies/index.js +2 -2
  53. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  54. package/dist/components/chat/entity-cards/employee-entry-card.d.ts.map +1 -1
  55. package/dist/components/chat/index.cjs +2 -2
  56. package/dist/components/chat/index.js +1 -1
  57. package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
  58. package/dist/components/chat/types/message.types.d.ts +8 -0
  59. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  60. package/dist/components/chat/utils/message-segment-accumulator.d.ts +1 -1
  61. package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
  62. package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
  63. package/dist/components/comment-card.d.ts +2 -18
  64. package/dist/components/comment-card.d.ts.map +1 -1
  65. package/dist/components/contact/index.cjs +3 -3
  66. package/dist/components/contact/index.js +2 -2
  67. package/dist/components/docs/index.cjs +5 -5
  68. package/dist/components/docs/index.js +4 -4
  69. package/dist/components/embeds/index.cjs +4 -6
  70. package/dist/components/embeds/index.cjs.map +1 -1
  71. package/dist/components/embeds/index.d.ts +0 -2
  72. package/dist/components/embeds/index.d.ts.map +1 -1
  73. package/dist/components/embeds/index.js +3 -5
  74. package/dist/components/faq/index.cjs +3 -3
  75. package/dist/components/faq/index.js +2 -2
  76. package/dist/components/features/array-entry-manager.d.ts.map +1 -1
  77. package/dist/components/features/clickup-tasks-manager.d.ts +1 -6
  78. package/dist/components/features/clickup-tasks-manager.d.ts.map +1 -1
  79. package/dist/components/features/index.cjs +2 -2
  80. package/dist/components/features/index.js +1 -1
  81. package/dist/components/help-center-pages/index.cjs +22 -22
  82. package/dist/components/help-center-pages/index.js +13 -13
  83. package/dist/components/index.cjs +204 -281
  84. package/dist/components/index.cjs.map +1 -1
  85. package/dist/components/index.d.ts +0 -1
  86. package/dist/components/index.d.ts.map +1 -1
  87. package/dist/components/index.js +570 -647
  88. package/dist/components/index.js.map +1 -1
  89. package/dist/components/meeting-scheduler/index.cjs +30 -30
  90. package/dist/components/meeting-scheduler/index.js +3 -3
  91. package/dist/components/navigation/index.cjs +2 -2
  92. package/dist/components/navigation/index.js +1 -1
  93. package/dist/components/onboarding-guides/index.cjs +5 -5
  94. package/dist/components/onboarding-guides/index.js +4 -4
  95. package/dist/components/related-content/index.cjs +3 -3
  96. package/dist/components/related-content/index.js +2 -2
  97. package/dist/components/shared/delivery/delivery-row.d.ts +1 -5
  98. package/dist/components/shared/delivery/delivery-row.d.ts.map +1 -1
  99. package/dist/components/shared/roadmap/roadmap-grid.d.ts +1 -10
  100. package/dist/components/shared/roadmap/roadmap-grid.d.ts.map +1 -1
  101. package/dist/components/tickets/index.cjs +6 -6
  102. package/dist/components/tickets/index.js +5 -5
  103. package/dist/components/ui/card.d.ts.map +1 -1
  104. package/dist/components/ui/index.cjs +2 -4
  105. package/dist/components/ui/index.cjs.map +1 -1
  106. package/dist/components/ui/index.d.ts +1 -1
  107. package/dist/components/ui/index.d.ts.map +1 -1
  108. package/dist/components/ui/index.js +1 -3
  109. package/dist/components/ui/markdown/rich/embed-overrides.d.ts.map +1 -1
  110. package/dist/components/ui/markdown/rich/shortcodes.d.ts.map +1 -1
  111. package/dist/components/ui/table/index.d.ts +1 -1
  112. package/dist/components/ui/table/index.d.ts.map +1 -1
  113. package/dist/components/ui/table/table-row.d.ts.map +1 -1
  114. package/dist/components/ui/table/table-skeleton.d.ts +2 -15
  115. package/dist/components/ui/table/table-skeleton.d.ts.map +1 -1
  116. package/dist/components/ui/table/table.d.ts.map +1 -1
  117. package/dist/components/ui/table/types.d.ts +0 -2
  118. package/dist/components/ui/table/types.d.ts.map +1 -1
  119. package/dist/index.cjs +2 -6
  120. package/dist/index.cjs.map +1 -1
  121. package/dist/index.js +1 -5
  122. package/dist/types/employee.d.ts +2 -25
  123. package/dist/types/employee.d.ts.map +1 -1
  124. package/dist/types/index.d.ts +0 -2
  125. package/dist/types/index.d.ts.map +1 -1
  126. package/dist/types/marketing.d.ts +1 -1
  127. package/dist/types/marketing.d.ts.map +1 -1
  128. package/dist/types/profile.d.ts +1 -2
  129. package/dist/types/profile.d.ts.map +1 -1
  130. package/dist/types/team.d.ts +1 -15
  131. package/dist/types/team.d.ts.map +1 -1
  132. package/dist/types/user.d.ts +1 -3
  133. package/dist/types/user.d.ts.map +1 -1
  134. package/dist/utils/embed-url-converters.d.ts +0 -17
  135. package/dist/utils/embed-url-converters.d.ts.map +1 -1
  136. package/dist/utils/index.cjs +0 -12
  137. package/dist/utils/index.cjs.map +1 -1
  138. package/dist/utils/index.js +1 -12
  139. package/dist/utils/index.js.map +1 -1
  140. package/package.json +1 -1
  141. package/src/components/.comment-card.md +5 -4
  142. package/src/components/chat/__tests__/ticket-event.test.ts +86 -0
  143. package/src/components/chat/chat-message-enhanced.tsx +3 -1
  144. package/src/components/chat/entity-cards/employee-entry-card.tsx +0 -6
  145. package/src/components/chat/stream/chat-stream-reducer.ts +7 -1
  146. package/src/components/chat/types/message.types.ts +8 -0
  147. package/src/components/chat/utils/message-segment-accumulator.ts +10 -3
  148. package/src/components/chat/utils/process-historical-messages.ts +17 -8
  149. package/src/components/comment-card.tsx +17 -42
  150. package/src/components/embeds/index.ts +0 -2
  151. package/src/components/features/array-entry-manager.tsx +1 -2
  152. package/src/components/features/clickup-tasks-manager.tsx +1 -8
  153. package/src/components/index.ts +0 -1
  154. package/src/components/shared/delivery/delivery-row.tsx +1 -17
  155. package/src/components/shared/roadmap/roadmap-grid.tsx +1 -21
  156. package/src/components/ui/card.tsx +1 -4
  157. package/src/components/ui/index.ts +0 -1
  158. package/src/components/ui/markdown/rich/__tests__/shortcodes.test.ts +0 -44
  159. package/src/components/ui/markdown/rich/embed-overrides.tsx +0 -4
  160. package/src/components/ui/markdown/rich/shortcodes.ts +0 -12
  161. package/src/components/ui/table/index.ts +1 -1
  162. package/src/components/ui/table/table-row.tsx +2 -7
  163. package/src/components/ui/table/table-skeleton.tsx +3 -20
  164. package/src/components/ui/table/table.tsx +0 -1
  165. package/src/components/ui/table/types.ts +0 -2
  166. package/src/types/employee.ts +2 -27
  167. package/src/types/index.ts +0 -2
  168. package/src/types/marketing.ts +0 -1
  169. package/src/types/profile.ts +1 -3
  170. package/src/types/team.ts +1 -17
  171. package/src/types/user.ts +1 -4
  172. package/src/utils/embed-url-converters.ts +0 -32
  173. package/dist/chunk-5I3BSQ6D.js +0 -2
  174. package/dist/chunk-GZL5SAUI.cjs.map +0 -1
  175. package/dist/chunk-MSUSONUK.js.map +0 -1
  176. package/dist/chunk-PZH3CZTJ.cjs.map +0 -1
  177. package/dist/chunk-TA5P2M7V.cjs.map +0 -1
  178. package/dist/chunk-UGAHDPNU.cjs +0 -2
  179. package/dist/chunk-YVOMHB73.js.map +0 -1
  180. package/dist/components/comment-composer.d.ts +0 -42
  181. package/dist/components/comment-composer.d.ts.map +0 -1
  182. package/dist/components/embeds/claude-embed.d.ts +0 -31
  183. package/dist/components/embeds/claude-embed.d.ts.map +0 -1
  184. package/dist/types/department.d.ts +0 -41
  185. package/dist/types/department.d.ts.map +0 -1
  186. package/dist/types/design-doc.d.ts +0 -247
  187. package/dist/types/design-doc.d.ts.map +0 -1
  188. package/src/components/comment-composer.tsx +0 -117
  189. package/src/components/embeds/claude-embed.tsx +0 -84
  190. package/src/types/department.ts +0 -44
  191. package/src/types/design-doc.ts +0 -295
  192. package/src/utils/__tests__/claude-embed-url.test.ts +0 -42
  193. /package/dist/{chunk-GG6CAELN.js.map → chunk-3FBPPKV2.js.map} +0 -0
  194. /package/dist/{chunk-EQEMZU45.js.map → chunk-5K3F5AZX.js.map} +0 -0
  195. /package/dist/{chunk-XPLZB74T.js.map → chunk-6RILRC7X.js.map} +0 -0
  196. /package/dist/{chunk-ZUVVJ24E.js.map → chunk-7IR5LKYC.js.map} +0 -0
  197. /package/dist/{chunk-OEN3GTRL.js.map → chunk-DEYRHTLD.js.map} +0 -0
  198. /package/dist/{chunk-MIKGZY7V.js.map → chunk-GCMASPSW.js.map} +0 -0
  199. /package/dist/{chunk-ZYC4O76Y.js.map → chunk-HJ7OVIR7.js.map} +0 -0
  200. /package/dist/{chunk-XZNKPEWB.js.map → chunk-MIBKEMZY.js.map} +0 -0
  201. /package/dist/{chunk-5I3BSQ6D.js.map → chunk-MVWSLZG7.js.map} +0 -0
  202. /package/dist/{chunk-SQ53GVCG.js.map → chunk-QQFUJ6MS.js.map} +0 -0
  203. /package/dist/{chunk-XSK7ZQ3C.js.map → chunk-TXLUKQBI.js.map} +0 -0
  204. /package/dist/{chunk-LOWWLH2W.js.map → chunk-UK6SSMUR.js.map} +0 -0
@@ -1,295 +0,0 @@
1
- // Design Doc Types (product-hub)
2
- // Mirrors product-release.ts — entity + child tables + create/update/filter shapes.
3
- //
4
- // Participant sections are keyed by the employee DEPARTMENT (FK to the ONE
5
- // `departments` table — see department.ts); there is no function enum.
6
- // Completion-gate math and status transitions live in the hub's
7
- // `lib/utils/design-doc-gate.ts` (isomorphic, shared by server + client).
8
-
9
- import type { EntityAuthor } from './entity-author'
10
- import type { DeliveryItem } from './delivery'
11
- import type { RoadmapItem } from '../components/chat/types/entities/roadmap-item'
12
- import type { DepartmentRef } from './department'
13
- import type { EmployeeDirectoryRow } from './employee'
14
-
15
- // ---------------------------------------------------------------------------
16
- // Value vocabularies — TYPES ONLY.
17
- //
18
- // The runtime lists live ONCE, in the hub's `lib/utils/design-doc-gate.ts`,
19
- // beside the labels and badge colors that make them useful; that module pins
20
- // each tuple against the union here at compile time, so the two cannot drift.
21
- // Declaring `as const` arrays here as well would ship a second copy of every
22
- // vocabulary that nothing reads — the copy a future contributor edits expecting
23
- // an effect.
24
- // ---------------------------------------------------------------------------
25
-
26
- export type DesignDocStatus = 'draft' | 'in_review' | 'approved' | 'building' | 'shipped' | 'abandoned'
27
-
28
- export type DesignDocTier = 'S' | 'M' | 'L'
29
-
30
- export type DesignDocParticipantStatus = 'pending' | 'in_progress' | 'completed' | 'blocked'
31
-
32
- export type DesignDocCommentType = 'blocking' | 'suggestion' | 'question' | 'note'
33
-
34
- export type DesignDocCommentStatus = 'open' | 'resolved' | 'declined'
35
-
36
- export type DesignDocLinkType = 'roadmap_task' | 'figma' | 'claude_artifact' | 'claude_design' | 'brief' | 'other'
37
-
38
- export type DesignDocMediaType = 'image' | 'video' | 'screenshot' | 'demo'
39
-
40
- // ---------------------------------------------------------------------------
41
- // Rows (as returned by the hub DAL — hydrated)
42
- // ---------------------------------------------------------------------------
43
-
44
- /**
45
- * The profile identity the DAL embeds on participants / comment authors — THE
46
- * shared person projection, not a second declaration of it. `email` rides the
47
- * detail payload only and is stripped from lists.
48
- */
49
- export type DesignDocPerson = EmployeeDirectoryRow
50
-
51
- export interface DesignDocClickUpTask {
52
- id: number
53
- doc_id: number
54
- participant_id: number | null
55
- clickup_task_id: string
56
- display_order: number | null
57
- created_at: string
58
- /** Hydrated from the `clickup_tasks` mirror (never the live API). `undefined` = not in the mirror. */
59
- task?: DeliveryItem
60
- }
61
-
62
- export interface DesignDocLink {
63
- id: number
64
- doc_id: number
65
- link_type: DesignDocLinkType
66
- url: string | null
67
- clickup_task_id: string | null
68
- title: string | null
69
- display_order: number | null
70
- created_at: string
71
- /**
72
- * A `roadmap_task` link, hydrated from the mirror as the ROADMAP item it is —
73
- * so it renders with the roadmap card, the same as `/roadmap` and the chat.
74
- * `undefined` = the mirror has not seen that id. (Section tasks are a
75
- * different entity and carry `DeliveryItem` on `DesignDocClickUpTask`.)
76
- */
77
- roadmap?: RoadmapItem
78
- }
79
-
80
- export interface DesignDocMedia {
81
- id: number
82
- doc_id: number
83
- participant_id: number | null
84
- media_type: DesignDocMediaType
85
- media_url: string
86
- title: string | null
87
- description: string | null
88
- display_order: number | null
89
- created_at: string
90
- created_by: string | null
91
- }
92
-
93
- /**
94
- * A comment. ROOT comments (`parent_comment_id === null`) carry `comment_type`
95
- * + `status` and gate approval when `blocking` + `open`; REPLIES carry neither
96
- * (single-level threads — a reply to a reply is re-parented to the root).
97
- */
98
- export interface DesignDocComment {
99
- id: number
100
- doc_id: number
101
- participant_id: number | null
102
- parent_comment_id: number | null
103
- author_id: string | null
104
- comment_type: DesignDocCommentType | null
105
- title: string | null
106
- body: string
107
- status: DesignDocCommentStatus | null
108
- resolved_at: string | null
109
- created_at: string
110
- author?: DesignDocPerson | null
111
- /** Threaded by the DAL; always `[]` on replies. */
112
- replies: DesignDocComment[]
113
- }
114
-
115
- export interface DesignDocParticipant {
116
- id: number
117
- doc_id: number
118
- department_id: string
119
- department: DepartmentRef
120
- assignee_id: string | null
121
- assignee?: DesignDocPerson | null
122
- status: DesignDocParticipantStatus
123
- content: string | null
124
- completed_at: string | null
125
- display_order: number | null
126
- created_at: string
127
- updated_at: string
128
- tasks: DesignDocClickUpTask[]
129
- media: DesignDocMedia[]
130
- /** Section-scoped root comments (threaded). */
131
- comments: DesignDocComment[]
132
- }
133
-
134
- export interface DesignDocCompletion {
135
- total: number
136
- completed: number
137
- blocked: number
138
- openBlocking: number
139
- isComplete: boolean
140
- waitingOn: Array<{
141
- participantId: number
142
- department: DepartmentRef
143
- assigneeName: string | null
144
- status: DesignDocParticipantStatus
145
- }>
146
- }
147
-
148
- /** R13 — what the signed-in viewer still owes on one doc. */
149
- export interface DesignDocMyOpenWork {
150
- /** One person may own several department sections on the same doc. */
151
- participants: Array<{ id: number; department: DepartmentRef; status: DesignDocParticipantStatus }>
152
- openTasks: DeliveryItem[]
153
- }
154
-
155
- export interface DesignDoc {
156
- id: number
157
- title: string
158
- slug: string
159
- tier: DesignDocTier
160
- summary: string | null
161
- content: string | null
162
- status: DesignDocStatus
163
- author_id: string | null
164
- /**
165
- * EVERYONE who has handed the DRI role away on this doc (appended, never
166
- * overwritten). The third-party break-glass excludes all of them: a DRI who
167
- * also holds management could otherwise vacate the seat, act as a "third
168
- * party" on their own doc and approve it alone — and with a single scalar,
169
- * simply hand the seat on twice to erase the memory of their own vacating.
170
- */
171
- dri_vacated_by: string[]
172
- approved_at: string | null
173
- created_at: string
174
- updated_at: string
175
- /** DRI, hydrated via the shared author hydrator. */
176
- author?: EntityAuthor
177
- participants: DesignDocParticipant[]
178
- links: DesignDocLink[]
179
- /** Doc-level comments only (participant-scoped comments ride on their participant). */
180
- comments: DesignDocComment[]
181
- completion: DesignDocCompletion
182
- my_open_work?: DesignDocMyOpenWork
183
- }
184
-
185
- // ---------------------------------------------------------------------------
186
- // Write shapes
187
- // ---------------------------------------------------------------------------
188
-
189
- export interface DesignDocLinkInput {
190
- link_type: DesignDocLinkType
191
- url?: string | null
192
- clickup_task_id?: string | null
193
- title?: string | null
194
- display_order?: number
195
- }
196
-
197
- export interface DesignDocClickUpTaskInput {
198
- clickup_task_id: string
199
- display_order?: number
200
- }
201
-
202
- export interface DesignDocMediaInput {
203
- media_type: DesignDocMediaType
204
- media_url: string
205
- title?: string | null
206
- description?: string | null
207
- display_order?: number
208
- }
209
-
210
- export interface CreateDesignDocParticipantInput {
211
- /** Defaults to the assignee's profile department when omitted. */
212
- department_id?: string
213
- assignee_id: string
214
- }
215
-
216
- /** Wizard payload (POST /api/admin/design-docs). */
217
- export interface CreateDesignDocData {
218
- title: string
219
- slug: string
220
- tier: DesignDocTier
221
- summary?: string | null
222
- /** Spec markdown (Why / What / How); the create screen carries the same body editor as edit. */
223
- content?: string | null
224
- /** DRI; defaults to the caller. */
225
- author_id?: string | null
226
- participants: CreateDesignDocParticipantInput[]
227
- links: DesignDocLinkInput[]
228
- }
229
-
230
- /**
231
- * Doc-level allowlist (PUT). `status` and `participants` are NOT here — status
232
- * only moves through PATCH (the gate), participants only through their routes.
233
- */
234
- export interface UpdateDesignDocData {
235
- title?: string
236
- slug?: string
237
- tier?: DesignDocTier
238
- summary?: string | null
239
- content?: string | null
240
- author_id?: string | null
241
- links?: DesignDocLinkInput[]
242
- /** OCC token — the `updated_at` the editor seeded from; mismatch → 409. */
243
- expected_updated_at?: string
244
- }
245
-
246
- export interface UpdateDesignDocParticipantData {
247
- content?: string | null
248
- status?: DesignDocParticipantStatus
249
- assignee_id?: string | null
250
- department_id?: string
251
- clickup_tasks?: DesignDocClickUpTaskInput[]
252
- media?: DesignDocMediaInput[]
253
- expected_updated_at?: string
254
- }
255
-
256
- export interface AddDesignDocParticipantData {
257
- /** Defaults to the assignee's profile department when omitted. */
258
- department_id?: string
259
- assignee_id: string
260
- }
261
-
262
- export interface AddDesignDocCommentData {
263
- participant_id?: number | null
264
- /** Set for a reply; the DAL re-parents replies-of-replies to the root. */
265
- parent_comment_id?: number | null
266
- /** Required on root comments, ignored on replies. */
267
- comment_type?: DesignDocCommentType
268
- title?: string | null
269
- body: string
270
- }
271
-
272
- export interface DesignDocFilters {
273
- status?: string
274
- search?: string
275
- mine?: 'open'
276
- limit?: number
277
- offset?: number
278
- }
279
-
280
- export interface DesignDocListResponse {
281
- data: DesignDoc[]
282
- count: number
283
- /** Server-computed status facet counts (how-i-work feed convention). */
284
- facets: { status: Record<string, number> }
285
- }
286
-
287
- export interface DesignDocStats {
288
- total: number
289
- draft: number
290
- in_review: number
291
- approved: number
292
- building: number
293
- waiting_on_me_docs: number
294
- waiting_on_me_tasks: number
295
- }
@@ -1,42 +0,0 @@
1
- import { describe, it, expect } from 'vitest'
2
- import { toClaudeEmbedUrl } from '../embed-url-converters'
3
-
4
- /**
5
- * The Claude counterpart of `toFigmaEmbedUrl`, and the newest url-trust
6
- * boundary in the markdown pipeline: whatever it returns is put in an iframe
7
- * `src`, so "not a published claude.ai artifact" must be `null`, always.
8
- */
9
- describe('toClaudeEmbedUrl', () => {
10
- it('normalises every shape of a PUBLISHED artifact url to its embed route', () => {
11
- const embed = 'https://claude.ai/public/artifacts/abc-123/embed'
12
- expect(toClaudeEmbedUrl('https://claude.ai/public/artifacts/abc-123')).toBe(embed)
13
- expect(toClaudeEmbedUrl('https://claude.ai/public/artifacts/abc-123/')).toBe(embed)
14
- // The url Anthropic's own "Get embed code" hands the author — the likeliest
15
- // paste of all, and it must not be treated as un-embeddable.
16
- expect(toClaudeEmbedUrl('https://claude.ai/public/artifacts/abc-123/embed')).toBe(embed)
17
- expect(toClaudeEmbedUrl('https://claude.ai/public/artifacts/abc-123/embed/')).toBe(embed)
18
- // claude.site short links (and their embed form) 308 to the same artifact.
19
- expect(toClaudeEmbedUrl('https://claude.site/artifacts/abc-123')).toBe(embed)
20
- expect(toClaudeEmbedUrl('https://claude.site/artifacts/abc-123/embed')).toBe(embed)
21
- expect(toClaudeEmbedUrl('https://CLAUDE.AI/public/artifacts/abc-123')).toBe(embed)
22
- // Query and fragment are the artifact's, not ours: the embed route is built
23
- // from the id alone.
24
- expect(toClaudeEmbedUrl('https://claude.ai/public/artifacts/abc-123?x=1#y')).toBe(embed)
25
- })
26
-
27
- it('refuses everything that is not a published artifact, and never throws', () => {
28
- // A Claude CODE artifact has no embeddable route at all.
29
- expect(toClaudeEmbedUrl('https://claude.ai/code/artifact/abc-123')).toBeNull()
30
- expect(toClaudeEmbedUrl('https://claude.ai/design/abc-123')).toBeNull()
31
- // Host must BE claude.ai/claude.site — not a prefix, a subdomain or userinfo.
32
- expect(toClaudeEmbedUrl('https://claude.ai.evil.com/public/artifacts/abc')).toBeNull()
33
- expect(toClaudeEmbedUrl('https://evil.com/public/artifacts/abc')).toBeNull()
34
- expect(toClaudeEmbedUrl('https://evil.com/?u=https://claude.ai/public/artifacts/abc')).toBeNull()
35
- expect(toClaudeEmbedUrl('javascript:alert(1)')).toBeNull()
36
- expect(toClaudeEmbedUrl('//claude.ai/public/artifacts/abc')).toBeNull()
37
- expect(toClaudeEmbedUrl('not a url')).toBeNull()
38
- expect(toClaudeEmbedUrl('')).toBeNull()
39
- expect(toClaudeEmbedUrl(null)).toBeNull()
40
- expect(toClaudeEmbedUrl(undefined)).toBeNull()
41
- })
42
- })