@nanisoft/prism-ui 0.16.0 → 1.0.0

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 (173) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/blocks/activity-feed-01/activity-feed-01.d.ts +120 -190
  3. package/dist/blocks/activity-feed-01/activity-feed-01.d.ts.map +1 -1
  4. package/dist/blocks/activity-feed-01/activity-feed-01.js +107 -97
  5. package/dist/blocks/activity-feed-01/index.d.ts +1 -1
  6. package/dist/blocks/activity-feed-01/index.d.ts.map +1 -1
  7. package/dist/blocks/auth-form-01/auth-form.d.ts +86 -53
  8. package/dist/blocks/auth-form-01/auth-form.d.ts.map +1 -1
  9. package/dist/blocks/auth-form-01/auth-form.js +95 -31
  10. package/dist/blocks/auth-form-01/index.d.ts +1 -1
  11. package/dist/blocks/auth-form-01/index.d.ts.map +1 -1
  12. package/dist/blocks/calendar-01/calendar.d.ts +28 -0
  13. package/dist/blocks/calendar-01/calendar.d.ts.map +1 -1
  14. package/dist/blocks/calendar-01/calendar.js +15 -1
  15. package/dist/blocks/card-index-01/card-index.d.ts +225 -0
  16. package/dist/blocks/card-index-01/card-index.d.ts.map +1 -0
  17. package/dist/blocks/card-index-01/card-index.js +154 -0
  18. package/dist/blocks/card-index-01/index.d.ts +3 -0
  19. package/dist/blocks/card-index-01/index.d.ts.map +1 -0
  20. package/dist/blocks/card-index-01/index.js +1 -0
  21. package/dist/blocks/chart-card-01/chart-card-01.d.ts +23 -21
  22. package/dist/blocks/chart-card-01/chart-card-01.d.ts.map +1 -1
  23. package/dist/blocks/chart-card-01/chart-card-01.js +46 -1
  24. package/dist/blocks/chart-card-01/index.d.ts +1 -1
  25. package/dist/blocks/chart-card-01/index.d.ts.map +1 -1
  26. package/dist/blocks/chart-group-01/chart-group-01.d.ts +3 -3
  27. package/dist/blocks/chart-group-01/chart-group-01.d.ts.map +1 -1
  28. package/dist/blocks/contact-01/contact.d.ts +30 -82
  29. package/dist/blocks/contact-01/contact.d.ts.map +1 -1
  30. package/dist/blocks/contact-01/contact.js +59 -30
  31. package/dist/blocks/contact-01/index.d.ts +1 -1
  32. package/dist/blocks/contact-01/index.d.ts.map +1 -1
  33. package/dist/blocks/dashboard-01/dashboard-01.d.ts +26 -71
  34. package/dist/blocks/dashboard-01/dashboard-01.d.ts.map +1 -1
  35. package/dist/blocks/dashboard-01/dashboard-01.js +34 -23
  36. package/dist/blocks/dashboard-01/index.d.ts +1 -1
  37. package/dist/blocks/dashboard-01/index.d.ts.map +1 -1
  38. package/dist/blocks/data-table-01/data-table.d.ts +276 -59
  39. package/dist/blocks/data-table-01/data-table.d.ts.map +1 -1
  40. package/dist/blocks/data-table-01/data-table.js +217 -35
  41. package/dist/blocks/data-table-01/index.d.ts +1 -1
  42. package/dist/blocks/data-table-01/index.d.ts.map +1 -1
  43. package/dist/blocks/directory-01/directory-01.d.ts +23 -2
  44. package/dist/blocks/directory-01/directory-01.d.ts.map +1 -1
  45. package/dist/blocks/directory-01/directory-01.js +3 -3
  46. package/dist/blocks/empty-state-01/empty-state.d.ts +60 -21
  47. package/dist/blocks/empty-state-01/empty-state.d.ts.map +1 -1
  48. package/dist/blocks/empty-state-01/empty-state.js +52 -17
  49. package/dist/blocks/index-detail-01/index-detail.d.ts +85 -0
  50. package/dist/blocks/index-detail-01/index-detail.d.ts.map +1 -0
  51. package/dist/blocks/index-detail-01/index-detail.js +58 -0
  52. package/dist/blocks/index-detail-01/index.d.ts +3 -0
  53. package/dist/blocks/index-detail-01/index.d.ts.map +1 -0
  54. package/dist/blocks/index-detail-01/index.js +1 -0
  55. package/dist/blocks/index.d.ts +20 -8
  56. package/dist/blocks/index.d.ts.map +1 -1
  57. package/dist/blocks/index.js +7 -0
  58. package/dist/blocks/issue-detail-01/issue-detail.d.ts +18 -0
  59. package/dist/blocks/issue-detail-01/issue-detail.d.ts.map +1 -1
  60. package/dist/blocks/issue-detail-01/issue-detail.js +18 -0
  61. package/dist/blocks/nothing-chosen-01/index.d.ts +3 -0
  62. package/dist/blocks/nothing-chosen-01/index.d.ts.map +1 -0
  63. package/dist/blocks/nothing-chosen-01/index.js +1 -0
  64. package/dist/blocks/nothing-chosen-01/nothing-chosen.d.ts +119 -0
  65. package/dist/blocks/nothing-chosen-01/nothing-chosen.d.ts.map +1 -0
  66. package/dist/blocks/nothing-chosen-01/nothing-chosen.js +79 -0
  67. package/dist/blocks/project-dashboard-01/index.d.ts +1 -1
  68. package/dist/blocks/project-dashboard-01/index.d.ts.map +1 -1
  69. package/dist/blocks/project-dashboard-01/project-dashboard.d.ts +21 -27
  70. package/dist/blocks/project-dashboard-01/project-dashboard.d.ts.map +1 -1
  71. package/dist/blocks/project-dashboard-01/project-dashboard.js +45 -5
  72. package/dist/blocks/provisioning-01/index.d.ts +1 -1
  73. package/dist/blocks/provisioning-01/index.d.ts.map +1 -1
  74. package/dist/blocks/provisioning-01/provisioning.d.ts +9 -97
  75. package/dist/blocks/provisioning-01/provisioning.d.ts.map +1 -1
  76. package/dist/blocks/provisioning-01/provisioning.js +26 -13
  77. package/dist/blocks/record-detail-01/index.d.ts +3 -0
  78. package/dist/blocks/record-detail-01/index.d.ts.map +1 -0
  79. package/dist/blocks/record-detail-01/index.js +1 -0
  80. package/dist/blocks/record-detail-01/record-detail.d.ts +239 -0
  81. package/dist/blocks/record-detail-01/record-detail.d.ts.map +1 -0
  82. package/dist/blocks/record-detail-01/record-detail.js +150 -0
  83. package/dist/blocks/record-form-01/index.d.ts +3 -0
  84. package/dist/blocks/record-form-01/index.d.ts.map +1 -0
  85. package/dist/blocks/record-form-01/index.js +1 -0
  86. package/dist/blocks/record-form-01/record-form.d.ts +148 -0
  87. package/dist/blocks/record-form-01/record-form.d.ts.map +1 -0
  88. package/dist/blocks/record-form-01/record-form.js +107 -0
  89. package/dist/blocks/record-grid-01/index.d.ts +3 -0
  90. package/dist/blocks/record-grid-01/index.d.ts.map +1 -0
  91. package/dist/blocks/record-grid-01/index.js +1 -0
  92. package/dist/blocks/record-grid-01/record-grid.d.ts +145 -0
  93. package/dist/blocks/record-grid-01/record-grid.d.ts.map +1 -0
  94. package/dist/blocks/record-grid-01/record-grid.js +114 -0
  95. package/dist/blocks/record-wizard-01/index.d.ts +3 -0
  96. package/dist/blocks/record-wizard-01/index.d.ts.map +1 -0
  97. package/dist/blocks/record-wizard-01/index.js +1 -0
  98. package/dist/blocks/record-wizard-01/record-wizard.d.ts +152 -0
  99. package/dist/blocks/record-wizard-01/record-wizard.d.ts.map +1 -0
  100. package/dist/blocks/record-wizard-01/record-wizard.js +144 -0
  101. package/dist/blocks/settings-members-01/settings-members.d.ts +2 -1
  102. package/dist/blocks/settings-members-01/settings-members.d.ts.map +1 -1
  103. package/dist/blocks/settings-panel-01/index.d.ts +1 -1
  104. package/dist/blocks/settings-panel-01/index.d.ts.map +1 -1
  105. package/dist/blocks/settings-panel-01/settings-panel.d.ts +165 -67
  106. package/dist/blocks/settings-panel-01/settings-panel.d.ts.map +1 -1
  107. package/dist/blocks/settings-panel-01/settings-panel.js +92 -33
  108. package/dist/blocks/signup-01/index.d.ts +1 -1
  109. package/dist/blocks/signup-01/index.d.ts.map +1 -1
  110. package/dist/blocks/signup-01/signup-01.d.ts +10 -84
  111. package/dist/blocks/signup-01/signup-01.d.ts.map +1 -1
  112. package/dist/blocks/signup-01/signup-01.js +41 -23
  113. package/dist/blocks/stats-01/index.d.ts +5 -5
  114. package/dist/blocks/stats-01/index.d.ts.map +1 -1
  115. package/dist/blocks/stats-01/index.js +4 -4
  116. package/dist/blocks/stats-01/stats.d.ts +49 -14
  117. package/dist/blocks/stats-01/stats.d.ts.map +1 -1
  118. package/dist/blocks/stats-01/stats.js +65 -15
  119. package/dist/blocks/trend-01/index.d.ts +1 -1
  120. package/dist/blocks/trend-01/index.d.ts.map +1 -1
  121. package/dist/blocks/trend-01/trend.d.ts +26 -73
  122. package/dist/blocks/trend-01/trend.d.ts.map +1 -1
  123. package/dist/blocks/trend-01/trend.js +47 -30
  124. package/dist/catalog.d.ts.map +1 -1
  125. package/dist/catalog.js +93 -3
  126. package/dist/components/ui/metric.d.ts +4 -2
  127. package/dist/components/ui/metric.d.ts.map +1 -1
  128. package/dist/index.d.ts +10 -0
  129. package/dist/index.d.ts.map +1 -1
  130. package/dist/index.js +6 -0
  131. package/dist/lib/field-render.d.ts +107 -0
  132. package/dist/lib/field-render.d.ts.map +1 -0
  133. package/dist/lib/field-render.js +251 -0
  134. package/dist/lib/spec.d.ts +609 -0
  135. package/dist/lib/spec.d.ts.map +1 -0
  136. package/dist/lib/spec.js +1 -0
  137. package/dist/live/index.d.ts +2 -0
  138. package/dist/live/index.d.ts.map +1 -1
  139. package/dist/live/index.js +6 -0
  140. package/dist/live/message-thread-01/index.d.ts +3 -0
  141. package/dist/live/message-thread-01/index.d.ts.map +1 -0
  142. package/dist/live/message-thread-01/index.js +1 -0
  143. package/dist/live/message-thread-01/message-thread.d.ts +282 -0
  144. package/dist/live/message-thread-01/message-thread.d.ts.map +1 -0
  145. package/dist/live/message-thread-01/message-thread.js +221 -0
  146. package/dist/live/run-stream-01/run-stream.d.ts +2 -1
  147. package/dist/live/run-stream-01/run-stream.d.ts.map +1 -1
  148. package/dist/live/run-stream-01/run-stream.js +1 -7
  149. package/dist/live/status.d.ts +27 -0
  150. package/dist/live/status.d.ts.map +1 -0
  151. package/dist/live/status.js +15 -0
  152. package/dist/live/tool-call-row.d.ts +26 -0
  153. package/dist/live/tool-call-row.d.ts.map +1 -0
  154. package/dist/live/tool-call-row.js +60 -0
  155. package/dist/live/tool-ledger-01/tool-ledger.d.ts.map +1 -1
  156. package/dist/live/tool-ledger-01/tool-ledger.js +2 -42
  157. package/dist/pages/contact-page/index.d.ts +7 -7
  158. package/dist/pages/contact-page/index.d.ts.map +1 -1
  159. package/dist/pages/contact-page/index.js +17 -5
  160. package/dist/pages/docs-shell/docs-shell.d.ts +42 -30
  161. package/dist/pages/docs-shell/docs-shell.d.ts.map +1 -1
  162. package/dist/pages/docs-shell/docs-shell.js +70 -48
  163. package/dist/pages/document-page/document-page.d.ts +146 -0
  164. package/dist/pages/document-page/document-page.d.ts.map +1 -0
  165. package/dist/pages/document-page/document-page.js +80 -0
  166. package/dist/pages/document-page/index.d.ts +3 -0
  167. package/dist/pages/document-page/index.d.ts.map +1 -0
  168. package/dist/pages/document-page/index.js +1 -0
  169. package/dist/pages/index.d.ts +2 -0
  170. package/dist/pages/index.d.ts.map +1 -1
  171. package/dist/pages/index.js +6 -0
  172. package/dist/styles.css +59 -3
  173. package/package.json +7 -2
@@ -0,0 +1,609 @@
1
+ /**
2
+ * The five typed specifications a consumer composes an admin screen from, and the
3
+ * three closed unions that name Prism's own vocabulary inside two of them.
4
+ *
5
+ * **One module, because it is one idea at five layers.** A field on a write form, a
6
+ * column on an index, a relationship on a detail, a figure on a summary and an
7
+ * occurrence on a trail are five places a typed declaration is handed to a Block, and
8
+ * they answer the same question five times: what is the caller describing. Today
9
+ * this package declares six field shapes, five figure shapes and four event shapes
10
+ * which disagree with one another about whether a delta is a number or a percentage,
11
+ * about a period, about a formatter and about whether a moment is a `Date`. Five
12
+ * declarations of one typed value is the defect this module was created to end, and
13
+ * the words a consumer learns on a form are then the words on a wizard, on a settings
14
+ * region and on a log.
15
+ *
16
+ * **It lives beside `figure.ts` and `rank.ts` for the reason `rank.ts` gives.** The
17
+ * first version of a shared type always lives inside the Block that happened to need
18
+ * it first, and that makes a leaf depend on a composite: the combobox reached into
19
+ * `command-palette` for the scorer, and the next surface to need one had no honest
20
+ * module to import, so it copied the one it could see.
21
+ *
22
+ * **This is public surface and not an internal helper, which is the opposite of the
23
+ * two files beside it.** `figure.ts` and `rank.ts` are declared internal because no
24
+ * consumer imports them: the geometry a figure is drawn from and the score a
25
+ * match takes are the inside of two Items. A consumer cannot type a column without
26
+ * the column specification, and cannot hand a form its fields without the field
27
+ * specification, so these declarations are published through `@nanisoft/prism-ui/spec`
28
+ * and the surface gate holds the internal boundary in both directions around them.
29
+ *
30
+ * **Every declaration here is plain serialisable data.** No validator, no constraint
31
+ * object, no schema, no pattern, no callback and no class. That is not tidiness: a
32
+ * function in a specification is what makes the object unserialisable, and an
33
+ * unserialisable specification is a specification an agent cannot read out of a
34
+ * document, a corpus cannot store and a store cannot round trip. It is also what
35
+ * keeps a Block that takes one from having to be a client Component for a feature it
36
+ * was never going to own. The two consequences are named where they bite: validation
37
+ * is the consumer's, entirely, and a metric's period is the consumer's, because a
38
+ * comparison needs a period and the period is the consumer's fact.
39
+ *
40
+ * **A specification is not an Item.** It has no slug, no kind, no documentation page,
41
+ * no Demo and no corpus entry, so nothing in the catalogue seam can see a member of
42
+ * one of these unions. The seam below the catalogue is the emitted declaration, and
43
+ * `scripts/check-spec-unions.mjs` reads it there.
44
+ */
45
+ import type { ReactNode } from 'react';
46
+ import type { StatusTone } from '../components/ui/status.js';
47
+ /**
48
+ * One choice on a field whose kind draws a set of them.
49
+ *
50
+ * Not exported, and not a member of the union: it is the shape every choice-bearing
51
+ * arm shares, so declaring it once is what stops five arms from being five spellings
52
+ * of one idea. A consumer names it in the array they pass, never as a type.
53
+ */
54
+ type Choice = {
55
+ /** The value the field submits, in the consumer's own words. */
56
+ value: string;
57
+ /** The words a reader sees beside that value. */
58
+ label: ReactNode;
59
+ };
60
+ /**
61
+ * What every field carries, whatever control is drawn for it.
62
+ *
63
+ * Held separately from `FieldSpec` because the point of the type is that a field has
64
+ * the same shell whether Prism drew the control or the caller did: these five
65
+ * optional members and the three required ones are the shell, and the arm adds only
66
+ * what its own control needs to be drawn.
67
+ */
68
+ type FieldCommon = {
69
+ /**
70
+ * The value's own key, and never the words of the label.
71
+ *
72
+ * It is what the consumer's values, its issue list and the form's own `FormData`
73
+ * are all keyed by, so a key built out of a label's words breaks the moment the
74
+ * label is translated.
75
+ */
76
+ key: string;
77
+ /**
78
+ * The field's own name, required because a control with no name is announced as a
79
+ * text field and every field on the page shares that one announcement.
80
+ */
81
+ label: ReactNode;
82
+ /** Text the reader must have, drawn under the control and referred to it. */
83
+ help?: ReactNode;
84
+ /**
85
+ * Text they might want, drawn in a tooltip. Forbidden from carrying anything
86
+ * essential, because a reader who never opens a tooltip has not read it.
87
+ */
88
+ hint?: ReactNode;
89
+ /**
90
+ * Drawn in the control and gone on the first keystroke, so it carries nothing
91
+ * `help` does not.
92
+ */
93
+ placeholder?: string;
94
+ /**
95
+ * The platform's own autofill hint, for the controls the platform fills.
96
+ *
97
+ * It is here because it is the one piece of per-control rendering data a
98
+ * credential or contact form cannot do without and no other member can hold:
99
+ * `email` on an address field is what lets a password manager and a phone
100
+ * keyboard fill a form, and a Block that dropped it would render the same
101
+ * control with a worse experience and nothing on screen to say so.
102
+ */
103
+ autoComplete?: string;
104
+ /** Marks a field the reader cannot fill today, rather than one that does not apply. */
105
+ disabled?: boolean;
106
+ /**
107
+ * The field's starting value. A controlled field takes its value from the
108
+ * consumer's own state instead, and this is then where that state begins.
109
+ */
110
+ defaultValue?: string | number | boolean;
111
+ /**
112
+ * Requiredness, and it is a rendering fact and an HTML fact rather than a rule:
113
+ * Prism draws the mark and sets `required` on the control, and it never checks a
114
+ * value against it. Whether the value is one is the consumer's.
115
+ */
116
+ required?: boolean;
117
+ };
118
+ /**
119
+ * The input vocabulary a field is drawn from: the Components this package ships, and
120
+ * the one arm for a control it does not.
121
+ *
122
+ * **Every member names a Component this package ships, and that is what makes the
123
+ * union closed rather than a convention.** `kind` is drawn from Prism's own inputs
124
+ * rather than from an HTML input type, because `type="email"` is what the platform
125
+ * offers and `Input`, `MoneyField` and `Dropzone` are what this package offers, and a
126
+ * specification naming the HTML type renders a different control from the one the
127
+ * consumer asked for.
128
+ *
129
+ * **`slot` is an arm and not a catch-all property, and the difference is the whole
130
+ * point of it.** A field whose control this package does not ship carries the
131
+ * caller's own node in `control`, and Prism still draws the label, the help and the
132
+ * error around it, so a field has the same shell either way. A catch-all property
133
+ * would be the alternative, and it would put the hole back: a `props` bag is a second
134
+ * way to say one thing and no gate can read what is in it.
135
+ *
136
+ * `scripts/check-spec-unions.mjs` reads this union out of the emitted declaration
137
+ * and holds every member against the Component roster, so a member naming a control
138
+ * this package does not ship fails the run rather than reaching a consumer.
139
+ */
140
+ export type FieldKind =
141
+ /** Text and numbers: the run of characters a reader types into. */
142
+ 'Input' | 'Textarea' | 'NumberField' | 'MoneyField' | 'SearchField'
143
+ /** Secrets the consumer holds, and the code a reader reads once. */
144
+ | 'PasswordField' | 'OneTimeCode'
145
+ /** One or many choices, in a list this package draws or the platform's own. */
146
+ | 'Select' | 'NativeSelect' | 'Combobox' | 'MultiCombobox' | 'ToggleGroup' | 'RadioGroup' | 'ChoiceCard'
147
+ /** A moment and a span, as a date and as a value on a scale the caller names. */
148
+ | 'Calendar' | 'DatePicker' | 'Slider' | 'RangeField'
149
+ /** An on or off setting, drawn three ways. */
150
+ | 'Switch' | 'Checkbox' | 'Toggle'
151
+ /** What the reader brings or builds: files, images, and a set of values. */
152
+ | 'Dropzone' | 'FileUpload' | 'ImageListField' | 'RepeatableRows'
153
+ /** The caller's own control, drawn inside this field's label, help and error. */
154
+ | 'slot';
155
+ /**
156
+ * One field, as typed data.
157
+ *
158
+ * A discriminated union rather than one object with optional arms, and that is the
159
+ * answer to the sharpest question a caller can ask of a declared field set: what a
160
+ * field may be. The choice Prism grants is which member of a closed vocabulary to
161
+ * use, and nothing else. Each arm adds only the data its own control needs to be
162
+ * drawn, so a choice carries its options and a textarea carries its rows while a
163
+ * money field carries neither.
164
+ *
165
+ * **Order is the array's order, and no Block reorders, hides or drops a field.** A
166
+ * field whose value is absent renders empty rather than absent, because a form that
167
+ * changes shape while the reader is halfway through it is a form the reader has to
168
+ * read twice.
169
+ *
170
+ * **What a consumer may not put in a field.** No validator, no constraint object, no
171
+ * schema, no pattern and no callback of any kind: validation is the consumer's,
172
+ * entirely, because a Block ships no behaviour and evaluating a rule is behaviour.
173
+ * `required` stays, and it is the mark and the HTML attribute rather than a rule. A
174
+ * consumer who wants a minimum length, a uniqueness check, a cross field rule or a
175
+ * mask brings a library and passes the results in through the issue list the Block
176
+ * already takes; a consumer who needs a control this union does not name passes the
177
+ * `slot` arm rather than widening the union for one screen.
178
+ */
179
+ export type FieldSpec =
180
+ /** A run of text, with the rows it is drawn at. */
181
+ (FieldCommon & {
182
+ kind: 'Textarea';
183
+ rows?: number;
184
+ })
185
+ /**
186
+ * An amount in the consumer's currency.
187
+ *
188
+ * `currency` is required because `MoneyField` is meaningless without it, and
189
+ * the two are the one piece of per-kind rendering data this arm carries rather
190
+ * than deriving: which currency an amount is in is the consumer's fact and not
191
+ * a value Prism could read off a locale. `locale` is optional because it has a
192
+ * platform answer, and the caller who holds a market states the one their
193
+ * product writes in.
194
+ */
195
+ | (FieldCommon & {
196
+ kind: 'MoneyField';
197
+ currency: string;
198
+ locale?: string;
199
+ })
200
+ /** A one time code, with the digits it has. */
201
+ | (FieldCommon & {
202
+ kind: 'OneTimeCode';
203
+ length?: number;
204
+ })
205
+ /** One choice from a list, with the choices themselves. */
206
+ | (FieldCommon & {
207
+ kind: 'Select';
208
+ options: readonly Choice[];
209
+ })
210
+ /** One choice from the platform's own list, with the choices themselves. */
211
+ | (FieldCommon & {
212
+ kind: 'NativeSelect';
213
+ options: readonly Choice[];
214
+ })
215
+ /** One choice from a filtered list, with the choices themselves. */
216
+ | (FieldCommon & {
217
+ kind: 'Combobox';
218
+ options: readonly Choice[];
219
+ })
220
+ /** Several choices from a filtered list, with the choices themselves. */
221
+ | (FieldCommon & {
222
+ kind: 'MultiCombobox';
223
+ options: readonly Choice[];
224
+ })
225
+ /** Several choices drawn as marks the reader toggles. */
226
+ | (FieldCommon & {
227
+ kind: 'ToggleGroup';
228
+ options: readonly Choice[];
229
+ })
230
+ /** Several choices drawn as a row where one of them is the answer. */
231
+ | (FieldCommon & {
232
+ kind: 'RadioGroup';
233
+ options: readonly Choice[];
234
+ })
235
+ /** Several choices drawn as whole selectable surfaces. */
236
+ | (FieldCommon & {
237
+ kind: 'ChoiceCard';
238
+ options: readonly Choice[];
239
+ })
240
+ /** Files the reader brings, with the types accepted and whether more than one is. */
241
+ | (FieldCommon & {
242
+ kind: 'Dropzone';
243
+ accept?: readonly string[];
244
+ multiple?: boolean;
245
+ })
246
+ /** Files the reader has already chosen, with the types accepted. */
247
+ | (FieldCommon & {
248
+ kind: 'FileUpload';
249
+ accept?: readonly string[];
250
+ multiple?: boolean;
251
+ })
252
+ /** A set of values, with what an empty row looks like before there is one. */
253
+ | (FieldCommon & {
254
+ kind: 'RepeatableRows';
255
+ emptyRow?: ReactNode;
256
+ })
257
+ /** The caller's own control, which is the only member carrying a node rather than data. */
258
+ | (FieldCommon & {
259
+ kind: 'slot';
260
+ control: ReactNode;
261
+ })
262
+ /** Every other member of the closed vocabulary, which needs nothing beyond the shell. */
263
+ | (FieldCommon & {
264
+ kind: 'Input' | 'NumberField' | 'SearchField' | 'PasswordField' | 'Calendar' | 'DatePicker' | 'Slider' | 'RangeField' | 'Switch' | 'Checkbox' | 'Toggle' | 'ImageListField';
265
+ });
266
+ /**
267
+ * An ordered group of fields, under one heading.
268
+ *
269
+ * Every field belongs to a group, so a form with no headings is one group with no
270
+ * label rather than a second arrangement. A heading is a real document level object
271
+ * rather than a bold row, which is what the three surveyed systems that have
272
+ * grouping all agree on, and one shape covering both cases costs a consumer one line
273
+ * and saves the catalogue a second Block.
274
+ *
275
+ * `id` is the stable identifier a caller keys its own per group state by, and it is
276
+ * optional here because a group nobody keys anything by does not need one. A stepped
277
+ * surface keys its answers by it, and a sequence whose entries have no identity is a
278
+ * sequence whose saved answers have nowhere to live.
279
+ *
280
+ * **What a consumer may not put in a group.** No rule of any kind, no validator and
281
+ * no callback, for the reason the field gives. No second list saying which groups sit
282
+ * on which step of a stepped surface, either: that would be a second list free to
283
+ * disagree with this one about a step's contents and about the order of a form.
284
+ */
285
+ export type FieldSpecGroup = {
286
+ /** The group's heading, absent for a form that has none. */
287
+ label?: ReactNode;
288
+ /** A sentence under the heading, absent for a group that needs none. */
289
+ description?: ReactNode;
290
+ /** The stable identifier a caller keys its own state for this group by. */
291
+ id?: string;
292
+ /** The fields, in the order they are drawn and never re-sorted. */
293
+ fields: readonly FieldSpec[];
294
+ };
295
+ /**
296
+ * The cell vocabulary a column is drawn from: the reading Components this package
297
+ * ships, and the one arm for a cell it does not.
298
+ *
299
+ * **A different union from `FieldKind`, and sharing one would be a defect rather than
300
+ * a saving.** A field names a control a reader fills and a column names a value a
301
+ * reader reads, so a union carrying both would let a caller ask for a money field as
302
+ * a table cell and receive a control inside a table. `NumberField` and `MoneyField`
303
+ * are therefore on `FieldKind` and not here: a cell holding a number is `Typography`
304
+ * carrying the consumer's own formatted value, for the reason a metric's value is the
305
+ * caller's composed node rather than a number this package reduces. The two unions
306
+ * are held disjoint by `scripts/check-spec-unions.mjs`, in every direction, because a
307
+ * disagreement between them is invisible in review.
308
+ *
309
+ * `slot` is an arm for the same reason the field's is: the caller's own node goes
310
+ * where the cell would be and Prism still draws the header, the alignment and the
311
+ * sort affordance around it.
312
+ */
313
+ export type ColumnKind =
314
+ /** A run of text, which is also how a number a consumer formatted is drawn. */
315
+ 'Typography'
316
+ /** An amount, with the consumer's currency and their own formatting. */
317
+ | 'Price'
318
+ /** A moment, drawn relative to the reader's now. */
319
+ | 'RelativeTime'
320
+ /** A state, drawn as a tone beside the consumer's own words for it. */
321
+ | 'Status'
322
+ /** A short label, drawn as a compact mark. */
323
+ | 'Badge'
324
+ /** A person, drawn as their own image or initials. */
325
+ | 'Avatar'
326
+ /** A set of marks, drawn as a tag group. */
327
+ | 'TagGroup'
328
+ /** Several items ticked, drawn as a checklist. */
329
+ | 'Checklist'
330
+ /** Two texts beside one another, drawn as a diff. */
331
+ | 'Diff'
332
+ /** A run of text with a phrase emphasised in it. */
333
+ | 'Mark'
334
+ /** A key the reader presses, drawn in the monospaced face. */
335
+ | 'Kbd'
336
+ /** An identifier or a fragment, drawn as a code block a reader can take away. */
337
+ | 'CodeBlock'
338
+ /** The caller's own node, drawn inside this column's header, alignment and sort affordance. */
339
+ | 'slot';
340
+ /**
341
+ * One column of a record index, as typed data.
342
+ *
343
+ * **Three required members, for the reasons the field specification gives and no new
344
+ * ones.** `key` is required and is never the words of the header, because it is what
345
+ * the caller's rows and a future selection are keyed by. `header` is required because
346
+ * a column a screen reader reaches without a name is a column every row announces as
347
+ * untitled. `kind` is required and is drawn from Prism's own cell vocabulary rather
348
+ * than from an HTML attribute.
349
+ *
350
+ * `align` defaults to the start because this package does not know the number, and a
351
+ * consumer who does knows it. `width` is layout and takes a `className` for the same
352
+ * reason `className` is for layout everywhere else in this system. `sortable` says
353
+ * the column can be ordered, and the affordance it draws announces the direction it
354
+ * will go next rather than the direction it is in.
355
+ *
356
+ * **What a consumer may not put in a column.** No rule, no validator, no schema, no
357
+ * pattern, no aggregation and no derived total: a total owed across every account is
358
+ * a metric beside the index rather than a cell in it, and a Block that added one up
359
+ * would be doing arithmetic over a population it never fetched. `slot` is the way to
360
+ * a cell this union does not name.
361
+ */
362
+ export type ColumnSpec = {
363
+ /** The value's own key, and never the words of the header. */
364
+ key: string;
365
+ /** The column's own name, required because an unnamed column is announced as untitled. */
366
+ header: ReactNode;
367
+ /** The cell this column is drawn from. */
368
+ kind: ColumnKind;
369
+ /** Text the reader must have, referred to the cell. */
370
+ help?: ReactNode;
371
+ /** Where a value belongs in the cell, and the start unless the caller says otherwise. */
372
+ align?: 'start' | 'center' | 'end';
373
+ /** A `className` for the column's width, because width is layout. */
374
+ width?: string;
375
+ /** Whether the column can be ordered, which draws the sort affordance. */
376
+ sortable?: boolean;
377
+ };
378
+ /**
379
+ * The collection arrangements a relationship is drawn in: the five this package can
380
+ * already draw, and the one arm for a section it cannot.
381
+ *
382
+ * A set of rows, a set of rows in a panel, a run with durations and states, a run of
383
+ * dated occurrences and a set of people. Those are the arrangements Prism ships
384
+ * components for, which is what makes this union closed on the same grounds the
385
+ * field's is: every member names something this package already draws, and a caller
386
+ * chooses between Prism's arrangements rather than describing one.
387
+ *
388
+ * **It is not a slot per region, and the answer is why.** Every surveyed screen that
389
+ * wanted one relationship per card turned a detail into a grid of equal panels, each
390
+ * with its own heading, its own frame and its own way of asking to be read, and the
391
+ * result was a page of cards that happen to share a parent rather than one record
392
+ * with things attached to it. A relation is an entry in one ordered list on one frame
393
+ * instead. A section a reader should have to ask for is the `slot` member, drawn open
394
+ * and placed by the caller, rather than a collapsed one.
395
+ *
396
+ * Held disjoint from `FieldKind` and `ColumnKind` by
397
+ * `scripts/check-spec-unions.mjs`, because a union carrying two of the three would let
398
+ * a caller ask for a field where a relation belongs and receive a labelled input
399
+ * inside a record.
400
+ */
401
+ export type RelationKind =
402
+ /** A set of rows, drawn as a table. */
403
+ 'Table'
404
+ /** A set of rows in a panel, which is a panel rather than a page. */
405
+ | 'ListPanel'
406
+ /** A run with durations and states, drawn to scale, which is an instrument. */
407
+ | 'Timeline'
408
+ /**
409
+ * A run of dated occurrences drawn down one column, whose only spatial claim is
410
+ * order, which is what a record's event history is.
411
+ *
412
+ * **It is a different arm from `Timeline` and not a widening of it.** A `Timeline`
413
+ * draws a run with a duration and a state per step, which is an instrument; this
414
+ * draws dated occurrences, which is a trail. Adding `at` to `TimelineEntry` would
415
+ * make one Component carry both a moment and a duration, which is the second
416
+ * answer to a question that already has one.
417
+ */
418
+ | 'ActivityFeed01'
419
+ /** A set of people, drawn as their faces and their names. */
420
+ | 'AvatarGroup'
421
+ /** The caller's own arrangement, placed by the caller and drawn open. */
422
+ | 'slot';
423
+ /**
424
+ * One relationship of a record, as typed data.
425
+ *
426
+ * **`members` is the caller's own typed data and is deliberately the weakest type in
427
+ * this module, because that is what binds the depth.** A member is a row, a person,
428
+ * an occurrence or a node in the caller's data, and never another relation, so a
429
+ * record whose related records have their own is a graph the consumer walks and this
430
+ * draws one ring of. A descendant is reached by a link rather than by depth: a member
431
+ * carries the caller's own `href` when the caller wants to open it, and the
432
+ * destination is the caller's route. `scripts/check-spec-unions.mjs` holds that bound
433
+ * by failing on a member whose own type names `RelationSpec`, so the one-ring limit
434
+ * is in the type rather than in a convention somebody is asked to remember.
435
+ *
436
+ * **`count` is the caller's own string rather than a number derived from `members`,
437
+ * and the reason is that a derived count is false the moment the collection is larger
438
+ * than the page.** `href` is an optional destination on the heading, for a caller who
439
+ * wants the whole section to go somewhere rather than scroll, and `hrefLabel` is the
440
+ * words that destination is named in: a link with no name announces as a link.
441
+ *
442
+ * **What a consumer may not put in a relation.** No rule, no validator, no schema, no
443
+ * nesting, no disclosure and no count derived from what was handed over. Every
444
+ * relation is drawn open in the order the caller declared, because a relation a reader
445
+ * has to choose to find is a claim about the reader's freedom that this architecture
446
+ * holds a Page out of making.
447
+ */
448
+ export type RelationSpec = {
449
+ /** The relationship's own key, stable, and never the words of the label. */
450
+ key: string;
451
+ /** The collection's own name, in the caller's words. */
452
+ label: ReactNode;
453
+ /** The arrangement it is drawn in. */
454
+ kind: RelationKind;
455
+ /** A destination for the whole section, rather than a scroll. */
456
+ href?: string;
457
+ /** The words that destination is named in, required wherever `href` is set. */
458
+ hrefLabel?: ReactNode;
459
+ /** The collection's size, in the caller's own words, and never derived here. */
460
+ count?: string;
461
+ /** The members, one ring deep, in the order they are drawn. */
462
+ members: readonly unknown[];
463
+ };
464
+ /**
465
+ * What every metric carries, whatever series or destination it names.
466
+ *
467
+ * Held separately from `MetricSpec` because the two pairs below are a union rather
468
+ * than a pair of optional members, and an intersection of an object with a union is
469
+ * how a shape says "these two travel together" in TypeScript.
470
+ *
471
+ * `value` is a node rather than a number, in the consumer's units and their own
472
+ * formatting, because a figure the consumer composed is one this package cannot print.
473
+ * `delta` is a `number` whose sign is the direction, with no direction member beside
474
+ * it. `deltaFormat` is the consumer's own composed words rather than the
475
+ * `(value: number) => string` callback the `Metric` Component takes, and the reason
476
+ * is the same one that keeps the whole module serialisable: a function is not data an
477
+ * agent can read out of a document, and a delta of `0.12` is twelve percent, twelve
478
+ * cents or twelve milliseconds. It stays optional even beside `delta`, because a delta
479
+ * with no formatter is a reading this package prints as the number it was handed.
480
+ */
481
+ type MetricFields = {
482
+ /** The figure's own key, stable, and never the words of the label. */
483
+ key: string;
484
+ /** What the figure is, required because a figure with nothing saying so is a guess. */
485
+ label: ReactNode;
486
+ /** The figure itself, in the consumer's units and their own formatting. */
487
+ value: ReactNode;
488
+ /** The change, as a number whose sign is the direction. */
489
+ delta?: number;
490
+ /** The change in the consumer's own words, printed as passed wherever it is set. */
491
+ deltaFormat?: ReactNode;
492
+ /** The period, the source or the caveat that matters this week. */
493
+ hint?: ReactNode;
494
+ };
495
+ /**
496
+ * The readings behind the shape, together with the name they are read by.
497
+ *
498
+ * **A union, because the pair travels together and a reader should be able to see
499
+ * it.** One arm sets a series and requires its name, the other forbids both, so a
500
+ * series with no label is held by the type rather than by a runtime check the reader
501
+ * cannot see. `Sparkline` gives the reason the name is required: a shape with no name
502
+ * is not announced, and two shapes in a row of four cannot be told apart.
503
+ */
504
+ type MetricSeries = {
505
+ series?: undefined;
506
+ seriesLabel?: undefined;
507
+ } | {
508
+ series: readonly number[];
509
+ seriesLabel: string;
510
+ };
511
+ /**
512
+ * A destination for the figure, together with the words it is named in.
513
+ *
514
+ * A union for the reason `MetricSeries` is one: a link whose only words are the
515
+ * figure itself tells a reader nothing about what following it does, so the words
516
+ * are required wherever the destination is set.
517
+ */
518
+ type MetricDestination = {
519
+ href?: undefined;
520
+ hrefLabel?: undefined;
521
+ } | {
522
+ href: string;
523
+ hrefLabel: ReactNode;
524
+ };
525
+ /**
526
+ * One figure over a population, as typed data.
527
+ *
528
+ * **A metric is a reading taken over a population this package never saw, which is
529
+ * what makes it a typed value of its own rather than a field with another name.** A
530
+ * balance on one row is a field and a total owed across every account is a metric.
531
+ * Nothing in a metric belongs to one record, and there is no record to open.
532
+ *
533
+ * **Trend is the caller's, and there is no `period` member.** A comparison needs a
534
+ * period and the period is the consumer's fact: a billing screen's month is not a
535
+ * trading screen's week, and a union of week, month and quarter would be this package
536
+ * choosing the axis of somebody's business. The words for the period go where the
537
+ * caller's words go, in `deltaFormat` and in `hint`.
538
+ *
539
+ * **What a consumer may not put in a metric.** No aggregation of any kind, no derived
540
+ * rate of change, no period over period arithmetic, no threshold, no target, no
541
+ * severity, no freshness, no as of clock, no unit, and no drill down beyond the
542
+ * `href` the caller passes. A total computed over the figures a caller happened to
543
+ * hand is a number that is false the moment the population is larger than the page.
544
+ */
545
+ export type MetricSpec = MetricFields & MetricSeries & MetricDestination;
546
+ /**
547
+ * One dated, attributed occurrence, as typed data.
548
+ *
549
+ * **It names no vocabulary of what happened, and there is deliberately no `kind`
550
+ * member.** `FieldKind` and `ColumnKind` are closed unions and that is legitimate,
551
+ * because every member names a Component this package ships and the caller chooses
552
+ * which of Prism's own controls to use. An event's kind would name what somebody's
553
+ * product calls a thing that happened, and no enumeration of those is this package's
554
+ * to publish: a member on a Prism type would be promising that every consumer's world
555
+ * is this one. A caller needing one puts the word in `action` or composes a `Status`
556
+ * into `detail`. That is the same line the field specification draws with its `slot`
557
+ * arm, and it is what makes one type usable by a shipment scan, a sign in and a
558
+ * permission change without any of them growing the type.
559
+ *
560
+ * `at` is a `number` or a `string` printed exactly as passed and never a `Date`,
561
+ * because this package ships no formatting, and the machine value rides on the
562
+ * element so a reader that orders by it can. `actor` is required because a record of
563
+ * what happened with nobody to attribute it to is not a record of what happened, and
564
+ * the words for a carrier's scan or a nightly job are the consumer's to write.
565
+ * `tone` is a colour and `toneLabel` is the information, so the label is required
566
+ * wherever the tone is set: on a record a reader may be checking a claim against, a
567
+ * colour alone is worse than anywhere else.
568
+ *
569
+ * **Immutability is a rendering fact here and nothing more.** What is rendered is the
570
+ * entries it was handed, in the order it was handed, with no control that edits one,
571
+ * removes one or reorders one, and that absence is what append only means. What
572
+ * cannot be rendered is that the record is immutable, tamper evident, signed, sealed,
573
+ * retained or admissible, because a Block has no authority over the store behind it.
574
+ * So there is no `immutable` member, no seal and no verification mark, and a consumer
575
+ * whose domain requires one enforces it in its own store and shows what the store
576
+ * says. There is no retention member and no window either, for the same reason: the
577
+ * window, the archive, the purge, the legal hold and the export are properties of a
578
+ * store rather than of a drawing. And a trail draws a moment and never a length, so
579
+ * there is no `duration`, no scale, no range and no axis: a bar's length is a claim
580
+ * about a difference between two caller moments.
581
+ *
582
+ * **What a consumer may not put in an event.** No `kind`, no `progress`, no
583
+ * `severity`, no `duration`, no `role`, no retention, no immutability and no time
584
+ * axis, each refused above for a reason rather than left out.
585
+ */
586
+ export type EventSpec = {
587
+ /** The occurrence's own key, stable, and never the words of anything. */
588
+ key: string;
589
+ /** When it happened, printed as passed, and never a `Date` this package would format. */
590
+ at: number | string;
591
+ /** Who or what did it, in the words the system uses for a person or a process. */
592
+ actor: ReactNode;
593
+ /** What was done, in the product's own verb or clause. */
594
+ action: ReactNode;
595
+ /** What it was done to, absent for an occurrence that names no document. */
596
+ target?: ReactNode;
597
+ /** Anything the four fields above cannot hold, which is the caller's own node. */
598
+ detail?: ReactNode;
599
+ /** A tone beside the words, never on its own. */
600
+ tone?: StatusTone;
601
+ /** The words that tone means, required wherever `tone` is set. */
602
+ toneLabel?: ReactNode;
603
+ /** A destination for the occurrence, which is the only route out of one. */
604
+ href?: string;
605
+ /** The words that destination is named in, required wherever `href` is set. */
606
+ hrefLabel?: ReactNode;
607
+ };
608
+ export {};
609
+ //# sourceMappingURL=spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../src/lib/spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEzD;;;;;;GAMG;AACH,KAAK,MAAM,GAAG;IACZ,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,KAAK,EAAE,SAAS,CAAA;CACjB,CAAA;AAED;;;;;;;GAOG;AACH,KAAK,WAAW,GAAG;IACjB;;;;;;O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CAAA;IACrB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+EAA+E;IAC/E,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -26,4 +26,6 @@ export { RunStream01 } from './run-stream-01/index.js';
26
26
  export type { RunStream01Props, RunEvent, RunEventRole, RunStatus, RunSubscribe, } from './run-stream-01/index.js';
27
27
  export { ToolLedger01 } from './tool-ledger-01/index.js';
28
28
  export type { ToolLedger01Props, ToolCall, ToolCallState, ToolSubscribe } from './tool-ledger-01/index.js';
29
+ export { MessageThread01 } from './message-thread-01/index.js';
30
+ export type { MessageThread01Props, ChatMessage, MessageSender, MessagePart, MessageTextPart, MessageReasoningPart, MessageToolPart, MessageCitationPart, MessageAttachmentPart, MessageSubscribe, } from './message-thread-01/index.js';
29
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/live/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,YAAY,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,YAAY,GACb,MAAM,iBAAiB,CAAA;AAMxB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,YAAY,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/live/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,YAAY,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,YAAY,GACb,MAAM,iBAAiB,CAAA;AAMxB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,YAAY,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAOjG,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,YAAY,EACV,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,qBAAqB,CAAA"}
@@ -27,3 +27,9 @@ export { RunStream01 } from './run-stream-01/index.js';
27
27
  * Derived by the maintainer rather than authored: each entry is read out of the Item own
28
28
  * index module, so an Item and its barrel line cannot come apart. */
29
29
  export { ToolLedger01 } from './tool-ledger-01/index.js';
30
+ /*
31
+ * The Kind's second family. A conversation is `live` because its content changes
32
+ * over time without a navigation event, and the message thread is the surface
33
+ * that receives it. It reuses the Kind's status tiers and the ledger's own row
34
+ * rather than minting a second answer to either. */
35
+ export { MessageThread01 } from './message-thread-01/index.js';
@@ -0,0 +1,3 @@
1
+ export { MessageThread01, default } from './message-thread.js';
2
+ export type { MessageThread01Props, ChatMessage, MessageSender, MessagePart, MessageTextPart, MessageReasoningPart, MessageToolPart, MessageCitationPart, MessageAttachmentPart, MessageSubscribe, } from './message-thread.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/live/message-thread-01/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC3D,YAAY,EACV,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1 @@
1
+ export { MessageThread01, default } from './message-thread.js';