@nanisoft/prism-ui 0.16.1 → 1.1.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 (170) 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/document-page/document-page.d.ts +146 -0
  161. package/dist/pages/document-page/document-page.d.ts.map +1 -0
  162. package/dist/pages/document-page/document-page.js +80 -0
  163. package/dist/pages/document-page/index.d.ts +3 -0
  164. package/dist/pages/document-page/index.d.ts.map +1 -0
  165. package/dist/pages/document-page/index.js +1 -0
  166. package/dist/pages/index.d.ts +2 -0
  167. package/dist/pages/index.d.ts.map +1 -1
  168. package/dist/pages/index.js +6 -0
  169. package/dist/styles.css +35 -3
  170. package/package.json +7 -2
@@ -1,104 +1,14 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { type HeadingLevel } from '../../components/ui/section.js';
3
- import { type StatusTone } from '../../components/ui/status.js';
4
- /**
5
- * One thing that happened: who did it, what they did, to what, and when.
6
- *
7
- * **`actor`, `action`, `target` and `at` are four fields because a record of what
8
- * happened has four parts and no others.** Every other surface in this repository
9
- * that shows a record of an event has arrived at the same four by a different route,
10
- * and each has added a fifth: a source, a category, a severity, a free text field. A
11
- * fifth field is a claim about the reader's product, because a Block cannot know
12
- * whether a fifth thing is required, and a caller who has one composes it in
13
- * `detail`, which is a node. So the shape is closed at four and the rest is a slot.
14
- *
15
- * `id` is a key and is never rendered, for the reason `ContentGrid01Entry`'s id is: a
16
- * feed is reordered by a consumer as often as it is read, and a key made of the
17
- * words means a rename in the copy is a rename in the key.
18
- */
19
- export type ActivityFeed01Event = {
20
- /** A key unique within the feed, carried on the markup as `data-event`. */
21
- id: string;
22
- /**
23
- * Who did it, in the words a reader would use for them.
24
- *
25
- * A `string` rather than a node because a feed is scanned down this edge and a
26
- * column that wraps is a column that does not line up. A caller whose actor is a
27
- * person with an avatar composes the avatar into `detail` instead.
28
- */
29
- actor: string;
30
- /**
31
- * What they did, in the product's own verb.
32
- *
33
- * A verb and not a sentence, because the three fields are drawn as one run of
34
- * words: the actor, then this, then the target. A caller whose event needs a full
35
- * clause writes the clause here and the run reads as one, which is the same thing
36
- * with a different boundary.
37
- */
38
- action: string;
39
- /**
40
- * What they did it to: a run, a document, a setting, a person.
41
- *
42
- * Optional because a record of what happened sometimes has nothing to point at: a
43
- * sign-in, a logout, a nightly job that names no document. A caller with a target
44
- * passes one; a caller whose target is a node composes it into `detail`.
45
- */
46
- target?: string;
47
- /**
48
- * When it happened, printed exactly as passed.
49
- *
50
- * A `number` or a `string` and never a `Date`, and the reason is the one
51
- * `ContentGrid01Entry`'s `at` gives: a Block ships no formatting, so the reading a
52
- * reader should see is the caller's own. A number is epoch milliseconds and is
53
- * printed as a number, which is honest and almost never what was wanted; a string
54
- * is printed as written, so `2026-09-30`, `30 September` and `Q3` are all readings
55
- * a caller writes and this Block parses none of them. The machine value is still
56
- * there, on the `time` element's `dateTime`, so a crawler and a screen reader get a
57
- * timestamp whatever the visible reading says.
58
- *
59
- * A caller who wants a localised reading and a relative phrase composes
60
- * `relative-time` beside it and passes the node in `detail`, which is the one node
61
- * slot a row has, so the reading sits under the record rather than inside it. See
62
- * the Block's JSDoc for the whole of that argument.
63
- */
64
- at: number | string;
65
- /**
66
- * The line under the record, for whatever the caller wants said about it: the
67
- * reason, the payload, the diff, a composed `relative-time` reading.
68
- *
69
- * A node rather than a `string` for exactly that last reason. A caller with four
70
- * words of context passes four words; a caller with a table, a code block or a
71
- * timestamp passes the Component.
72
- */
73
- detail?: ReactNode;
74
- /**
75
- * The tone of the event, drawn as a `Status` beside the record.
76
- *
77
- * See the Block's JSDoc for why a tone arrives without a label: the label this
78
- * Block draws is the machine value itself, which is what `Changelog01` does with a
79
- * change's kind, and the alternative is a coloured dot with nothing beside it,
80
- * which is a mark only a reader who can separate the tones can see.
81
- */
82
- tone?: StatusTone;
83
- /** Where the record is kept. Its presence puts a link on the row. */
84
- href?: string;
85
- /**
86
- * The words on the link, and required whenever `href` is.
87
- *
88
- * A link whose only words are the record's own three fields tells a reader nothing
89
- * about what following it does, and a feed of ten links all reading "Open" is ten
90
- * identical controls.
91
- */
92
- hrefLabel?: string;
93
- };
3
+ import type { EventSpec } from '../../lib/spec.js';
94
4
  /**
95
5
  * The props an ActivityFeed01 takes, as a union over whether the feed is grouped.
96
6
  *
97
7
  * A union rather than an optional `dayLabel` beside an optional `groupBy`, for the
98
- * reason `HeroAction` is the reference: a `dayLabel` that is optional in the ungrouped
99
- * arm and required in the grouped one is a prop whose absence is sometimes a mistake
100
- * and sometimes a decision, and a caller who writes `groupBy="day"` and forgets the
101
- * label should not compile.
8
+ * reason `HeroAction` is the reference: a `dayLabel` that is optional in the
9
+ * ungrouped arm and required in the grouped one is a prop whose absence is
10
+ * sometimes a mistake and sometimes a decision, and a caller who writes
11
+ * `groupBy="day"` and forgets the label should not compile.
102
12
  */
103
13
  export type ActivityFeed01Props = {
104
14
  /** Optional label above the section title. See the No-Default-Eyebrow Rule. */
@@ -108,41 +18,57 @@ export type ActivityFeed01Props = {
108
18
  /** One or two sentences under the title. */
109
19
  description?: string;
110
20
  /**
111
- * The events, newest first unless the product says otherwise.
21
+ * The events, from the shared event specification, newest first unless the
22
+ * product says otherwise.
23
+ *
24
+ * The entries are `EventSpec` from `@nanisoft/prism-ui/spec`, which is the one
25
+ * declaration of a dated attributed occurrence every Block in this package
26
+ * takes, so a shipment scan, a sign in and a permission change are one shape and
27
+ * no second event type is minted here. Each entry carries a stable `key`, a
28
+ * moment printed exactly as passed, a required `actor` and `action`, an optional
29
+ * `target`, an optional `detail` node, a `tone` with its required `toneLabel`,
30
+ * and an `href` with its required `hrefLabel`.
31
+ *
32
+ * **It names no vocabulary of what happened.** There is no `kind` member,
33
+ * because an event's kind would name what somebody's product calls a thing that
34
+ * happened, and no enumeration of those is this package's to publish: a caller
35
+ * needing one puts the word in `action` or composes a status into `detail`. It
36
+ * carries no progress figure, no severity, no duration and no role, each refused
37
+ * for a reason rather than left out. See the specification module's own JSDoc.
112
38
  *
113
- * The Block does not sort, and the reason is the one `StatusLedger01` gives for its
114
- * rows: order is a claim about what happened first, and a feed that sorted itself
115
- * would be making that claim on the caller's behalf. A caller's order is also the
116
- * only order that can express the exceptions, because a feed is where a pinned
117
- * record lives and a Block cannot know an event is pinned.
39
+ * The Block does not sort, and the reason is the one `StatusLedger01` gives for
40
+ * its rows: order is a claim about what happened first, and a feed that sorted
41
+ * itself would be making that claim on the caller's behalf. A caller's order is
42
+ * also the only order that can express the exceptions, because a feed is where a
43
+ * pinned record lives and a Block cannot know an event is pinned.
118
44
  */
119
- events: ActivityFeed01Event[];
45
+ events: EventSpec[];
120
46
  /**
121
- * Called with an event's id when its row is activated, and the only reason a row is
122
- * a control at all.
47
+ * Called with an event's key when its row is activated, and the only reason a row
48
+ * is a control at all.
123
49
  *
124
- * A row with no handler is a `li`, which is a record a reader reads; a row with one
125
- * is a `button`, which is a thing a reader does. That is the whole of the rule, and
126
- * it is why a feed is a list first and a set of controls second. The alternative
127
- * was to make every row a button, which is a feed of forty tab stops where a reader
128
- * tabbing through the page lands on the fortieth record before reaching anything
129
- * after the feed.
50
+ * A row with no handler is a `li`, which is a record a reader reads; a row with
51
+ * one is a `button`, which is a thing a reader does. That is the whole of the
52
+ * rule, and it is why a feed is a list first and a set of controls second. The
53
+ * alternative was to make every row a button, which is a feed of forty tab stops
54
+ * where a reader tabbing through the page lands on the fortieth record before
55
+ * reaching anything after the feed.
130
56
  *
131
57
  * An event's destination is a separate control with the caller's own words, so a
132
58
  * row can be selectable and linked at once, and that is the arrangement a feed
133
59
  * actually wants: a reader activates the row to open the thing and the caller
134
60
  * marks it read on the way past.
135
61
  */
136
- onSelect?: (id: string) => void;
62
+ onSelect?: (key: string) => void;
137
63
  /**
138
64
  * How many of the events to draw.
139
65
  *
140
- * Optional, and the cost is the honest one: a capped feed that says nothing about
141
- * what it left out is a feed a reader believes is complete. So the words that would
142
- * say it are the caller's, and the caller's way of saying them is to pass a limit it
143
- * can stand behind and put the rest behind its own link. The alternative was a
144
- * `truncatedLabel` prop beside this one, which is a sentence Prism would ship into
145
- * every consumer's product.
66
+ * Optional, and the cost is the honest one: a capped feed that says nothing
67
+ * about what it left out is a feed a reader believes is complete. So the words
68
+ * that would say it are the caller's, and the caller's way of saying them is to
69
+ * pass a limit it can stand behind and put the rest behind its own link. The
70
+ * alternative was a `truncatedLabel` prop beside this one, which is a sentence
71
+ * Prism would ship into every consumer's product.
146
72
  */
147
73
  limit?: number;
148
74
  /**
@@ -150,8 +76,8 @@ export type ActivityFeed01Props = {
150
76
  *
151
77
  * Required, and it is the one line a reader with a question and no answer is
152
78
  * guaranteed to read. It is also the sentence Prism is least entitled to write:
153
- * "Nothing has happened yet" is a claim about a product and a period, and both are
154
- * the caller's.
79
+ * "Nothing has happened yet" is a claim about a product and a period, and both
80
+ * are the caller's.
155
81
  */
156
82
  empty: ReactNode;
157
83
  /** Heading level for the section title. See `HeadingLevel`. */
@@ -165,20 +91,21 @@ export type ActivityFeed01Props = {
165
91
  /**
166
92
  * Group the events under a heading per day.
167
93
  *
168
- * A day heading is a heading and not a divider, because a reader who navigates
169
- * by heading is looking for the day they want and a rule between two groups is
170
- * invisible to them.
94
+ * A day heading is a heading and not a divider, because a reader who
95
+ * navigates by heading is looking for the day they want and a rule between
96
+ * two groups is invisible to them.
171
97
  */
172
98
  groupBy: 'day';
173
99
  /**
174
100
  * The words for a day, given the day.
175
101
  *
176
102
  * Required in this arm, and a function rather than a string, because "Today",
177
- * "Yesterday" and "Tuesday" are the product's sentences and the key is a fact.
178
- * The key is an ISO calendar date in the runtime's own zone, so a caller hands
179
- * it to `Intl.DateTimeFormat` and gets their locale's reading of it, or writes
180
- * their own. The rejected alternative was the Block calling `Intl` itself, which
181
- * would put a locale this package does not own into every consumer's feed.
103
+ * "Yesterday" and "Tuesday" are the product's sentences and the key is a
104
+ * fact. The key is an ISO calendar date in the runtime's own zone, so a
105
+ * caller hands it to `Intl.DateTimeFormat` and gets their locale's reading of
106
+ * it, or writes their own. The rejected alternative was the Block calling
107
+ * `Intl` itself, which would put a locale this package does not own into
108
+ * every consumer's feed.
182
109
  */
183
110
  dayLabel: (key: string) => string;
184
111
  } | {
@@ -188,83 +115,86 @@ export type ActivityFeed01Props = {
188
115
  dayLabel?: never;
189
116
  });
190
117
  /**
191
- * A chronological list of what happened: an actor, an action, a target, a moment,
192
- * and an optional line under the record.
118
+ * A chronological list of what happened: the shared event specification, one record
119
+ * per entry, with an optional line under each.
193
120
  *
194
- * **The words are the caller's and the shape is Prism's, and that is the whole of the
195
- * design.** A feed that composed the sentence would ship English into every
196
- * consumer's product: "Ada published a release four hours ago" is a word order, an
197
- * article, an inflected verb and a relative phrase, and a Block that assembled it
198
- * would have assembled the English one and given the consumer no way to translate
199
- * it, inflect it or reorder it, because the string would be inside a package rather
200
- * than inside their own code. So this Block takes the three parts as three props and
201
- * draws them as one run of words, which is the most a design system can do without
202
- * writing a sentence.
121
+ * **The trail's entry declaration is `EventSpec`, and this Block mints no second
122
+ * event shape beside it.** `@nanisoft/prism-ui/spec` is the one declaration of a
123
+ * dated attributed occurrence in this package, so a shipment scan, a sign in and a
124
+ * permission change are one type and the vocabulary a consumer learns on this Block
125
+ * is the vocabulary everywhere an occurrence is drawn. An event carries a stable
126
+ * `key` that is never the words of a label, a moment printed exactly as the caller
127
+ * passed it with the machine value on the element, a required `actor` and `action`,
128
+ * an optional `target`, an optional `detail` node for the diff, the payload or the
129
+ * composed reading that four fields cannot hold, a `tone` whose label is required
130
+ * wherever the tone is set, and a destination whose words are required wherever it
131
+ * is set.
203
132
  *
204
- * **The four fields are four because a record of what happened has four parts and no
205
- * others.** Who, what they did, to what, and when. Each is required except the target,
206
- * and the target's absence is a real state rather than a gap: a sign-in, a logout, a
207
- * nightly job that names no document. The fifth field every similar surface reaches
208
- * for, a source or a category or a severity, is `tone` and `detail`, both optional
209
- * and one of them a node. A closed shape of four with two slots is the answer to a
210
- * feed that has grown a sixth field because the Block could not say no.
133
+ * **It names no vocabulary of what happened, and there is no `kind` member.** An
134
+ * event's kind would name what somebody's product calls a thing that happened, and
135
+ * no enumeration of those is this package's to publish: a member on a Prism type
136
+ * would be promising that every consumer's world is this one. A caller needing one
137
+ * puts the word in `action` or composes a `Status` into `detail`. It carries no
138
+ * `progress`, no `severity`, no `duration` and no `role`, each refused for a reason
139
+ * rather than left out, and the specification module's own JSDoc is the whole of
140
+ * that argument.
141
+ *
142
+ * **The words are the caller's and the shape is Prism's.** A feed that composed the
143
+ * sentence would ship English into every consumer's product: "Ada published a
144
+ * release four hours ago" is a word order, an article, an inflected verb and a
145
+ * relative phrase, and a Block that assembled it would have assembled the English
146
+ * one and given the consumer no way to translate it, inflect it or reorder it. So
147
+ * this Block takes the parts as the caller's own nodes and draws them as one run of
148
+ * words, which is the most a design system can do without writing a sentence.
211
149
  *
212
150
  * **`at` is printed exactly as passed, and the Block formats no moment.** A Block
213
151
  * that formatted one would have to pick a locale, a calendar and a granularity, and
214
- * `relative-time` already holds that decision and holds it well: it formats the
215
- * absolute reading with the platform and hands the sentence back rather than writing
216
- * it, which is the only arrangement a shared package can offer a product shipping in
217
- * more than one language. So this Block prints the caller's value, puts the ISO form
218
- * on the `time` element's `dateTime` so a crawler and a screen reader get a timestamp
219
- * whatever the visible reading says, and says in the prop's own note that a caller
220
- * who wants a relative phrase composes the node beside the record in `detail`. The
221
- * cost is named rather than hidden: a caller who passes epoch milliseconds gets epoch
222
- * milliseconds, which is honest and almost never what was wanted.
152
+ * `relative-time` already holds that decision: it formats the absolute reading with
153
+ * the platform and hands the sentence back. So this Block prints the caller's value,
154
+ * puts the ISO form on the `time` element's `dateTime` so a crawler and a screen
155
+ * reader get a timestamp whatever the visible reading says, and a caller who wants a
156
+ * relative phrase composes the node beside the record in `detail`.
157
+ *
158
+ * **A vertical arrangement's only spatial claim is order, and this Block draws no
159
+ * length.** There is no scale, no range, no bar and no axis: a bar's length is a
160
+ * claim about a difference between two caller moments, and time as an axis belongs
161
+ * to a screen that composes `Gantt01` or `Calendar01` instead. Append only is a
162
+ * rendering fact and nothing more: what is rendered is the entries it was handed, in
163
+ * the order it was handed, with no control that edits one, removes one or reorders
164
+ * one, and that absence is what append only means. What the Block cannot render is
165
+ * that the record is immutable, tamper evident, signed, sealed or retained, because
166
+ * a Block has no authority over the store behind it: so there is no `immutable`
167
+ * prop, no seal glyph and no verification mark, and no retention window, archive,
168
+ * purge, legal hold, export, freshness or as-of clock. A consumer whose domain
169
+ * requires one enforces it in its own store and shows what the store says.
223
170
  *
224
- * **A row is a control only when there is something for it to do.** An event with no
225
- * handler renders as a `li`, which is a record a reader reads and not a thing they
226
- * act on. The destination is a separate control carrying the caller's own words, so a
227
- * row can be selectable and linked at once, which is the arrangement a feed actually
228
- * wants: a reader activates the row to open the thing, and the caller marks it read on
229
- * the way past. The alternative was to make every row a link, and a feed of forty
230
- * links is a page where the tab order runs down the whole feed before it reaches
231
- * anything after it.
171
+ * **A row is a control only when there is something for it to do.** An event with
172
+ * no handler renders as a `li`, which is a record a reader reads and not a thing
173
+ * they act on. The destination is a separate control carrying the caller's own
174
+ * words, so a row can be selectable and linked at once, which is the arrangement a
175
+ * feed actually wants: a reader activates the row to open the thing, and the caller
176
+ * marks it read on the way past.
232
177
  *
233
178
  * **A day group is a list item holding a heading and a nested list, and not a merged
234
179
  * row.** The structure is an `ol` of `li` and each `li` is a heading plus its own
235
180
  * `ol`, because a reader moving by list item should hear how many days there are and
236
- * then how many records are in the day they are reading. The alternative was a table
237
- * with a row spanning every column, which is a table and not a feed, and which would
238
- * have given four unrelated fields column semantics they do not have. The day heading
239
- * is at `childLevel(headingLevel)`, so a feed embedded one level deeper carries its
240
- * outline with it, and the day groups themselves are not headings at the same level,
241
- * which is what makes a list of days a list rather than a flat run of headings.
242
- *
243
- * **The order is the caller's and the Block never sorts.** A feed is the surface
244
- * where the exceptions live: a pinned event, a run that arrived late, a record the
245
- * caller wants beside its own retry. A Block that sorted by moment would move the
246
- * pin, and the caller would have to add a flag and this Block would have to know what
247
- * the flag meant. The groups follow the order the days first appear, so a pinned
248
- * event from yesterday puts yesterday first, which is the only arrangement that
249
- * survives a pin.
181
+ * then how many records are in the day they are reading. The day heading is at
182
+ * `childLevel(headingLevel)`, so a feed embedded one level deeper carries its outline
183
+ * with it, and the groups follow the order the days first appear, so a pinned event
184
+ * from yesterday keeps yesterday where the caller put it.
250
185
  *
251
- * **The tone is a mark with a machine word beside it, and the cost is that word.** A
252
- * feed is a scanning surface, so the mark has to be there, and a mark that is colour
253
- * alone is invisible to a reader who cannot separate the tones and unreadable to a
254
- * screen reader whatever the tones are. So the tone is drawn by `Status` with the
255
- * machine value as its label, which is what `Changelog01` does with a change's kind
256
- * and the reason is the same: a tone is a judgement about urgency that only the
257
- * caller can make, and a Block that wrote the sentence for it would be picking an
258
- * alarm for four products at once. A caller whose product words these states
259
- * differently composes its own mark into `detail` and leaves `tone` unset. That is
260
- * the cost of the split, stated rather than hidden.
186
+ * **The order is the caller's and the Block never sorts, groups or aggregates.** A
187
+ * feed is the surface where the exceptions live: a pinned event, a run that arrived
188
+ * late, a record the caller wants beside its own retry. The day grouping is content
189
+ * rather than structure, a caller-supplied key with a caller-supplied label, and the
190
+ * Block owns no count, no rate and no elapsed figure. It owns no navigation and no
191
+ * address, so the only route out of an entry is the caller's `href`, and it holds no
192
+ * selection state, because a trail is read and the index holds the set a batch action
193
+ * acts on.
261
194
  *
262
195
  * It is a client Component, and the reason is the handler rather than the state, as
263
196
  * in `data-table-01`: `onSelect` is a function, a function is a piece of state, and
264
- * state is a client module. The cost is stated rather than implied: a feed with no
265
- * `onSelect` is a static list that ships this file's client runtime for nothing, and
266
- * the fix for a consumer who needs that surface to be static is a `ReactNode` slot of
267
- * their own rather than a Block that attaches a handler to every row.
197
+ * state is a client module.
268
198
  */
269
199
  export declare function ActivityFeed01({ eyebrow, title, description, events, onSelect, limit, empty, groupBy, dayLabel, headingLevel, className, }: ActivityFeed01Props): import("react").JSX.Element;
270
200
  export default ActivityFeed01;
@@ -1 +1 @@
1
- {"version":3,"file":"activity-feed-01.d.ts","sourceRoot":"","sources":["../../../src/blocks/activity-feed-01/activity-feed-01.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAGpE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,2EAA2E;IAC3E,EAAE,EAAE,MAAM,CAAA;IACV;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;;;;;;;;;;;OAgBG;IACH,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAgCD;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;OAQG;IACH,MAAM,EAAE,mBAAmB,EAAE,CAAA;IAC7B;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;OAOG;IACH,KAAK,EAAE,SAAS,CAAA;IAChB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,CACA;IACE;;;;;;OAMG;IACH,OAAO,EAAE,KAAK,CAAA;IACd;;;;;;;;;OASG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;CAClC,GACD;IACE,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CACJ,CAAA;AAkHD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,OAAgB,EAChB,QAAQ,EACR,YAAmB,EACnB,SAAS,GACV,EAAE,mBAAmB,+BAmGrB;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"activity-feed-01.d.ts","sourceRoot":"","sources":["../../../src/blocks/activity-feed-01/activity-feed-01.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AA4C/C;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;OAOG;IACH,KAAK,EAAE,SAAS,CAAA;IAChB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,CACA;IACE;;;;;;OAMG;IACH,OAAO,EAAE,KAAK,CAAA;IACd;;;;;;;;;;OAUG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;CAClC,GACD;IACE,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CACJ,CAAA;AAiHD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,OAAgB,EAChB,QAAQ,EACR,YAAmB,EACnB,SAAS,GACV,EAAE,mBAAmB,+BAkGrB;AAED,eAAe,cAAc,CAAA"}