@jam-overture/loom 0.2.0 → 0.3.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 (194) hide show
  1. package/dist/audience/compose.d.ts +112 -0
  2. package/dist/audience/compose.js +134 -0
  3. package/dist/audience/memory.d.ts +14 -0
  4. package/dist/audience/memory.js +71 -0
  5. package/dist/audience/overlay-store.d.ts +343 -0
  6. package/dist/audience/overlay-store.js +217 -0
  7. package/dist/audience/rule.d.ts +121 -0
  8. package/dist/audience/rule.js +78 -0
  9. package/dist/cli/index.d.ts +3 -4
  10. package/dist/cli/index.js +3 -4
  11. package/dist/data/adapter.d.ts +9 -1
  12. package/dist/data/adapter.js +2 -0
  13. package/dist/data/resolve.d.ts +1 -1
  14. package/dist/interpretation/anthropic.d.ts +1 -1
  15. package/dist/interpretation/anthropic.js +2 -22
  16. package/dist/interpretation/client.d.ts +1 -1
  17. package/dist/interpretation/materialize.js +67 -22
  18. package/dist/interpretation/openai-compatible.d.ts +36 -0
  19. package/dist/interpretation/openai-compatible.js +79 -0
  20. package/dist/interpretation/status.d.ts +19 -0
  21. package/dist/interpretation/status.js +26 -0
  22. package/dist/live/index.d.ts +73 -0
  23. package/dist/live/index.js +73 -0
  24. package/dist/live/pages.d.ts +187 -0
  25. package/dist/live/pages.js +161 -0
  26. package/dist/live/pull.d.ts +147 -0
  27. package/dist/live/pull.js +398 -0
  28. package/dist/live/pulling.d.ts +79 -0
  29. package/dist/live/pulling.js +117 -0
  30. package/dist/live/window.d.ts +129 -0
  31. package/dist/live/window.js +132 -0
  32. package/dist/render/addressed.d.ts +35 -0
  33. package/dist/render/addressed.js +79 -0
  34. package/dist/render/document-theme.d.ts +70 -0
  35. package/dist/render/document-theme.js +139 -0
  36. package/dist/render/editable.d.ts +15 -1
  37. package/dist/render/editable.js +13 -1
  38. package/dist/render/expected.d.ts +98 -0
  39. package/dist/render/expected.js +88 -0
  40. package/dist/render/index.d.ts +2 -0
  41. package/dist/render/index.js +2 -0
  42. package/dist/render/render.d.ts +11 -0
  43. package/dist/render/render.js +192 -46
  44. package/dist/render/request.d.ts +8 -1
  45. package/dist/render/request.js +1 -0
  46. package/dist/runtime/auto-apply-ceiling.d.ts +54 -0
  47. package/dist/runtime/auto-apply-ceiling.js +66 -0
  48. package/dist/runtime/gate.js +69 -10
  49. package/dist/runtime/index.d.ts +1 -0
  50. package/dist/runtime/index.js +1 -0
  51. package/dist/runtime/nesting.d.ts +13 -1
  52. package/dist/runtime/nesting.js +41 -24
  53. package/dist/runtime/policy-change.js +8 -2
  54. package/dist/runtime/policy-log.d.ts +5 -5
  55. package/dist/runtime/policy.d.ts +8 -6
  56. package/dist/runtime/policy.js +5 -2
  57. package/dist/runtime/repointing.js +0 -0
  58. package/dist/sdk/definition.d.ts +65 -6
  59. package/dist/sdk/definition.js +44 -0
  60. package/dist/sdk/registry.d.ts +17 -1
  61. package/dist/sdk/registry.js +39 -0
  62. package/dist/signals/acted.contract.d.ts +21 -0
  63. package/dist/signals/acted.contract.js +236 -0
  64. package/dist/signals/acted.d.ts +359 -0
  65. package/dist/signals/acted.js +135 -0
  66. package/dist/signals/agenda.d.ts +585 -0
  67. package/dist/signals/agenda.js +295 -0
  68. package/dist/signals/arrivals.contract.d.ts +21 -0
  69. package/dist/signals/arrivals.contract.js +180 -0
  70. package/dist/signals/arrivals.d.ts +375 -0
  71. package/dist/signals/arrivals.js +254 -0
  72. package/dist/signals/broadcast.d.ts +25 -15
  73. package/dist/signals/broadcast.js +209 -36
  74. package/dist/signals/collect.d.ts +137 -43
  75. package/dist/signals/collect.js +103 -36
  76. package/dist/signals/conversion.d.ts +348 -0
  77. package/dist/signals/conversion.js +235 -0
  78. package/dist/signals/correlated.contract.d.ts +24 -0
  79. package/dist/signals/correlated.contract.js +94 -0
  80. package/dist/signals/counters.d.ts +51 -0
  81. package/dist/signals/counters.js +58 -0
  82. package/dist/signals/deployment-change.d.ts +28 -4
  83. package/dist/signals/deployment-change.js +57 -16
  84. package/dist/signals/deployment.d.ts +18 -5
  85. package/dist/signals/deployment.js +37 -11
  86. package/dist/signals/door.d.ts +34 -12
  87. package/dist/signals/door.js +37 -13
  88. package/dist/signals/expire.d.ts +192 -0
  89. package/dist/signals/expire.js +213 -0
  90. package/dist/signals/frontier.d.ts +268 -0
  91. package/dist/signals/frontier.js +145 -0
  92. package/dist/signals/funnel-hours.contract.d.ts +21 -0
  93. package/dist/signals/funnel-hours.contract.js +221 -0
  94. package/dist/signals/funnel-hours.d.ts +293 -0
  95. package/dist/signals/funnel-hours.js +99 -0
  96. package/dist/signals/funnel.d.ts +60 -0
  97. package/dist/signals/funnel.js +35 -20
  98. package/dist/signals/health.d.ts +201 -4
  99. package/dist/signals/health.js +214 -2
  100. package/dist/signals/index.d.ts +19 -0
  101. package/dist/signals/index.js +19 -0
  102. package/dist/signals/inside.d.ts +190 -0
  103. package/dist/signals/inside.js +263 -0
  104. package/dist/signals/join.d.ts +56 -0
  105. package/dist/signals/join.js +60 -0
  106. package/dist/signals/journal.d.ts +112 -9
  107. package/dist/signals/kept.contract.d.ts +22 -0
  108. package/dist/signals/kept.contract.js +111 -0
  109. package/dist/signals/library-agenda-change.d.ts +324 -0
  110. package/dist/signals/library-agenda-change.js +199 -0
  111. package/dist/signals/library-agenda.d.ts +258 -0
  112. package/dist/signals/library-agenda.js +167 -0
  113. package/dist/signals/library-reach-change.d.ts +10 -0
  114. package/dist/signals/library-reach-change.js +11 -3
  115. package/dist/signals/library-senders-change.d.ts +457 -0
  116. package/dist/signals/library-senders-change.js +367 -0
  117. package/dist/signals/library-senders-reach-change.d.ts +486 -0
  118. package/dist/signals/library-senders-reach-change.js +538 -0
  119. package/dist/signals/library-senders-reach.d.ts +340 -0
  120. package/dist/signals/library-senders-reach.js +252 -0
  121. package/dist/signals/library-senders.d.ts +271 -0
  122. package/dist/signals/library-senders.js +180 -0
  123. package/dist/signals/library-word-reach-change.js +2 -6
  124. package/dist/signals/memory.js +142 -1
  125. package/dist/signals/migrate.d.ts +6 -5
  126. package/dist/signals/migrate.js +150 -6
  127. package/dist/signals/notice.d.ts +88 -33
  128. package/dist/signals/notice.js +38 -16
  129. package/dist/signals/part-pace.d.ts +378 -0
  130. package/dist/signals/part-pace.js +333 -0
  131. package/dist/signals/parts.d.ts +25 -15
  132. package/dist/signals/parts.js +32 -73
  133. package/dist/signals/postgres.js +400 -26
  134. package/dist/signals/region.d.ts +1 -1
  135. package/dist/signals/retention.d.ts +43 -21
  136. package/dist/signals/retention.js +25 -8
  137. package/dist/signals/rhythm.d.ts +302 -0
  138. package/dist/signals/rhythm.js +262 -0
  139. package/dist/signals/rollup.d.ts +127 -1
  140. package/dist/signals/rollup.js +211 -24
  141. package/dist/signals/schema.d.ts +640 -3
  142. package/dist/signals/schema.js +239 -3
  143. package/dist/signals/silences.d.ts +310 -11
  144. package/dist/signals/silences.js +243 -0
  145. package/dist/signals/subtrees.d.ts +123 -0
  146. package/dist/signals/subtrees.js +102 -0
  147. package/dist/signals/tally.d.ts +125 -4
  148. package/dist/signals/unread.d.ts +292 -0
  149. package/dist/signals/unread.js +137 -0
  150. package/dist/signals/window-agenda.d.ts +276 -0
  151. package/dist/signals/window-agenda.js +83 -0
  152. package/dist/signals/window-funnels.d.ts +88 -0
  153. package/dist/signals/window-funnels.js +47 -0
  154. package/dist/store/cache.d.ts +101 -0
  155. package/dist/store/cache.js +149 -0
  156. package/dist/store/history.d.ts +82 -0
  157. package/dist/store/history.js +36 -0
  158. package/dist/store/index.d.ts +11 -0
  159. package/dist/store/index.js +11 -0
  160. package/dist/store/migrate.d.ts +26 -0
  161. package/dist/store/migrate.js +64 -0
  162. package/dist/store/postgres-audience.d.ts +14 -0
  163. package/dist/store/postgres-audience.js +272 -0
  164. package/dist/store/postgres.d.ts +1 -0
  165. package/dist/store/postgres.js +1 -0
  166. package/dist/store/schema.d.ts +312 -0
  167. package/dist/store/schema.js +77 -0
  168. package/dist/store/source.d.ts +57 -1
  169. package/dist/store/source.js +65 -1
  170. package/dist/submit/resolve.d.ts +1 -1
  171. package/dist/telemetry/index.d.ts +1 -0
  172. package/dist/telemetry/index.js +1 -0
  173. package/dist/telemetry/journal.d.ts +32 -0
  174. package/dist/telemetry/memory.js +10 -1
  175. package/dist/telemetry/postgres.js +18 -2
  176. package/dist/telemetry/window.d.ts +135 -0
  177. package/dist/telemetry/window.js +101 -0
  178. package/dist/testing/audience-overlay-contract.d.ts +31 -0
  179. package/dist/testing/audience-overlay-contract.js +354 -0
  180. package/dist/testing/contracts.d.ts +1 -0
  181. package/dist/testing/contracts.js +1 -0
  182. package/dist/testing/journal-contract.js +158 -5
  183. package/dist/theme/contrast.d.ts +19 -14
  184. package/dist/theme/contrast.js +181 -17
  185. package/dist/tree/apply.js +13 -0
  186. package/dist/tree/mutation.d.ts +18 -0
  187. package/dist/tree/mutation.js +24 -12
  188. package/dist/tree/navigation.d.ts +5 -0
  189. package/dist/tree/navigation.js +32 -10
  190. package/dist/tree/outline.d.ts +7 -0
  191. package/dist/tree/outline.js +9 -5
  192. package/package.json +39 -96
  193. package/dist/runtime/inverse-interpreter.d.ts +0 -90
  194. package/dist/runtime/inverse-interpreter.js +0 -56
@@ -0,0 +1,378 @@
1
+ import type { AudienceId } from "../audience/audience.js";
2
+ import type { NodeId, TreeId } from "../ids.js";
3
+ import type { PrimitiveType } from "../primitive-type.js";
4
+ import type { PrimitiveRole } from "../role.js";
5
+ import type { KindPaceSilence, LibraryPaceOptions } from "./library-pace.js";
6
+ import type { UnscaledPage } from "./library-reach.js";
7
+ import { type PaceSilence, type PaceStanding } from "./pace.js";
8
+ import { type StoredPageViews } from "./page-views.js";
9
+ import type { PageReading } from "./parts.js";
10
+ import type { ReachSilence } from "./reach.js";
11
+ /**
12
+ * Whether the readers who reach **one part** have time for what it says, across
13
+ * every page it stands on.
14
+ *
15
+ * A goal is a kind of signal on a part
16
+ * ([0350](../../decisions/0350-a-project-sets-goals-from-signals-already-collected-and-one-of-them-is-primary.md)):
17
+ * one node id, counted on the pages a project named or on every page that has
18
+ * it. Every figure a goal has is therefore keyed on a part across pages — and
19
+ * **the one a screen has been waiting for since 8 November is how long readers
20
+ * stay on it**, which `docs/portal.md` records twice as *waiting on time on a
21
+ * part being counted per reader*.
22
+ *
23
+ * The time was already in the rows. A tally carries `dwellMs` beside `reached`
24
+ * for every part of every revision, and [`pace.ts`](pace.ts) has divided the
25
+ * two for a part of **one** page since it landed. What was unaskable is the
26
+ * same question of a part that stands on nine pages: a goal's part has nine
27
+ * rows, nine word counts and nine doors, and nothing added them up. So this is
28
+ * the join, and it is the **twenty-third** thing taken out of what this
29
+ * subsystem already knows rather than collected: no payload field, no counter,
30
+ * no column, no byte on any wire and nothing in a browser.
31
+ *
32
+ * ## It is `library-pace.ts`' arithmetic keyed on a node instead of a kind
33
+ *
34
+ * [`library-pace.ts`](library-pace.ts) answers the same question of a *kind* of
35
+ * part (0325) and this one shares its terms exactly, deliberately and by
36
+ * reading its published pieces rather than by respelling them: a pooled
37
+ * quotient of two reader-millisecond sums, `dwellMs` added as the rows hold it
38
+ * and `readers × wordsWithin × msPerWord` as the denominator, each page's
39
+ * readers put on its **own** door's scale before two pages are added (0250),
40
+ * the verdict taken by {@link paceStandingOf} so that a floor can hold up
41
+ * anything but `skimmed`, and a page the door cannot scale kept rather than
42
+ * refused, because the missing correction only ever moves a pace towards the
43
+ * safe verdict.
44
+ *
45
+ * **A goal's part is not a kind of part**, which is why this is a reading and
46
+ * not a row of that one. A kind pools every placement of a type; a goal names
47
+ * one node, and the type row a screen could have read instead holds the
48
+ * forty-nine other sections of the deployment. Nothing in the library readings
49
+ * can narrow to a node, and a surface narrowing one by hand would be dividing
50
+ * two columns with none of the five rules above applied to them.
51
+ *
52
+ * ## Nothing nests, and that is the whole of what this reading does not need
53
+ *
54
+ * A kind's pace carries a nesting rule, because a stack inside a stack would
55
+ * put one page's words into one row twice. **A node id stands at most once in a
56
+ * revision**, so there is nothing here for an outer placement to stand for: one
57
+ * reading contributes one placement or none, every term is a sum over distinct
58
+ * pages, and the only way a page can enter twice is a caller handing the same
59
+ * reading in twice — which is what {@link PartPace.duplicated} counts and the
60
+ * one error that would be permanent if it were let through (0158).
61
+ *
62
+ * ## Which page it is skimmed on is the same rows, kept rather than summed away
63
+ *
64
+ * The pooled quotient is one number about nine pages, and `standings` says *and
65
+ * skimmed on two of them* without saying which two. The per-page rows were
66
+ * always there — the loop reads each page's own pace, its own words and its own
67
+ * door, and threw them away — so publishing them costs an array and no further
68
+ * arithmetic
69
+ * ([0390](../../decisions/0390-a-parts-pages-are-a-second-order-ranked-on-the-reading-time-its-readers-did-not-have.md)).
70
+ *
71
+ * The decision in it is the **order**, and it is this subsystem's ordinary one:
72
+ * the pages are ranked on the reading time their readers did not have, a
73
+ * magnitude in reader-milliseconds, rather than on the pace, a rate. A page one
74
+ * reader hurried past has the worst rate in the deployment and is not the page
75
+ * to go to (0250, 0377).
76
+ *
77
+ * ## The silences are a kind's four, as values
78
+ *
79
+ * {@link KindPaceSilence} unchanged, and reused rather than respelled for the
80
+ * reason `library-pace.ts` reuses a census's two (0256): *it stands nowhere*,
81
+ * *nowhere it stands was read*, *its words could not be counted* and *it says
82
+ * nothing that takes time* are the same four states of the same quotient, and a
83
+ * twenty-third silence vocabulary naming them again would give a screen two
84
+ * names for one state and two mappings to keep in step. What is part-shaped is
85
+ * the **sentence**, which {@link describePartPaceSilence} says; the meaning a
86
+ * window publishes is `meaningOfKindPaceSilence` and stays one function.
87
+ *
88
+ * Pure. It reaches no store, no clock and no DOM, it is linear in the parts of
89
+ * the readings times the rows handed in, and nothing in it survives into a
90
+ * browser bundle.
91
+ */
92
+ /** One line per silence, for a surface saying why one part has no pace. */
93
+ export declare const describePartPaceSilence: (silence: KindPaceSilence) => string;
94
+ /**
95
+ * One page a part stands on, with that page's own figures.
96
+ *
97
+ * {@link PartPace} answers *how long do readers stay on this part* with one
98
+ * pooled quotient over every page it stands on, and publishes `standings` —
99
+ * so a screen can say *paced across your pages and skimmed on two of them* and
100
+ * **cannot say which two**. These are the two rows, and nothing extra was
101
+ * computed to get them: `partPaceOf` already reads each page's own pace, its
102
+ * own words and its own door, and summed them away
103
+ * ([0390](../../decisions/0390-a-parts-pages-are-a-second-order-ranked-on-the-reading-time-its-readers-did-not-have.md)).
104
+ *
105
+ * Every figure here is the one the page's own reading holds, at that page's own
106
+ * door scale (0250) — not a share of the figure above it. The terms that add do
107
+ * add: `ranked`'s `readers`, `dwellMs` and `needMs` are exactly
108
+ * {@link PartPace}'s three, which is the only thing tying this breakdown to the
109
+ * figure it breaks down.
110
+ */
111
+ export type PacedPlace = {
112
+ readonly treeId: TreeId;
113
+ readonly revision: number;
114
+ /** The audience this page's counters are of, as the reading has it; `null` where nothing said. */
115
+ readonly audienceId: AudienceId | null;
116
+ /**
117
+ * Page views that reached the part here, at this page's own door scale.
118
+ *
119
+ * **Not a count of people and deliberately not rounded into one** (0256), for
120
+ * the reason {@link PartPace.readers} is not: it is a scaled page-view count,
121
+ * and two pages' are added without either being rounded first.
122
+ */
123
+ readonly readers: number;
124
+ /** Time on screen here, summed across every view in the window, exactly as the rows hold it. */
125
+ readonly dwellMs: number;
126
+ /** The words this placement puts on screen: its own and its subtree's, which is the denominator's input. */
127
+ readonly wordsWithin: number;
128
+ /** Whether {@link wordsWithin} is a floor rather than a count, because something in it declares no `copy` (0122). */
129
+ readonly floored: boolean;
130
+ /** Whether the part is this page's root, so its words are every word the page says. */
131
+ readonly whole: boolean;
132
+ /**
133
+ * Why no straddle correction was applied to this page's readers, and `null`
134
+ * where one was.
135
+ *
136
+ * A page the door cannot scale is kept rather than refused, and the
137
+ * correction it is missing only ever moves its pace **down**, towards the one
138
+ * safe verdict — so this row can rank too low and never too high.
139
+ */
140
+ readonly unscaled: ReachSilence | null;
141
+ /** `readers × wordsWithin × msPerWord`: the time its words take the readers who reached it here. `null` under a silence. */
142
+ readonly needMs: number | null;
143
+ /** `dwellMs ÷ readers`: the time the typical reader who reached it here had. `null` under a silence. */
144
+ readonly spentMs: number | null;
145
+ /**
146
+ * `needMs − dwellMs` where positive: the reading time this page's readers did
147
+ * not have. The ranking key of {@link PartPace.ranked}, and `null` under a
148
+ * silence.
149
+ *
150
+ * **It does not add**, and it is the one term here that does not: the rows'
151
+ * `shortMs` sum to at least {@link PartPace.shortMs} and are equal to it only
152
+ * where no page had time to spare, because a page whose readers lingered pays
153
+ * for a page whose readers skimmed in the pooled figure and pays for nothing
154
+ * here. Both figures are true and the difference is the whole reason this
155
+ * breakdown is worth drawing — but a surface adding these rows up has
156
+ * published a number the reading above it contradicts.
157
+ */
158
+ readonly shortMs: number | null;
159
+ /** `dwellMs ÷ needMs`. `1` is exactly time enough. `null` under a silence. */
160
+ readonly pace: number | null;
161
+ /** This page's own verdict, by `paceStandingOf` — so one page can be `skimmed` while the part is `paced`. */
162
+ readonly standing: PaceStanding;
163
+ /** Why this page has no figures, and `null` where it has them. */
164
+ readonly silence: PaceSilence | null;
165
+ };
166
+ /**
167
+ * A placement with figures of its own, which is every row of
168
+ * {@link PartPace.ranked} and no row of {@link PartPace.unranked}.
169
+ *
170
+ * Published as a type of its own so a screen drawing the order does not
171
+ * null-check four fields that an ordered row cannot be missing: a row is in
172
+ * `ranked` *because* it has a reading time to be short of.
173
+ */
174
+ export type MeasuredPlace = PacedPlace & {
175
+ readonly needMs: number;
176
+ readonly spentMs: number;
177
+ readonly shortMs: number;
178
+ readonly pace: number;
179
+ readonly silence: null;
180
+ };
181
+ /** One part, against the time its readers had for what it says, across the pages it stands on. */
182
+ export type PartPace = {
183
+ readonly nodeId: NodeId;
184
+ /**
185
+ * What the part is, as the **first** reading holding it has it, and `null`
186
+ * where no reading holds it at all.
187
+ *
188
+ * First rather than commonest, which is the rule the library readings take
189
+ * about a type's role: a disagreement is reported rather than voted on.
190
+ */
191
+ readonly type: PrimitiveType | null;
192
+ /** What part it plays (0114), as the same reading has it; `null` where its type declared none. */
193
+ readonly role: PrimitiveRole | null;
194
+ /**
195
+ * Types a later reading had this node as, where the first reading's answer
196
+ * stands.
197
+ *
198
+ * Empty is the ordinary state and the healthy one. A node id standing as two
199
+ * different primitives on two pages means the two halves of every sum here
200
+ * are about two different things, which a screen naming one of them would
201
+ * never show — so it is published rather than resolved, in the shape
202
+ * `LibraryPace.roleDisagreed` uses for the neighbouring disagreement.
203
+ */
204
+ readonly typeDisagreed: readonly PrimitiveType[];
205
+ /** Readings that hold the part at all, after duplicates are dropped. */
206
+ readonly placements: number;
207
+ /** Placements in the figures: reached, and saying something counted. */
208
+ readonly counted: number;
209
+ /** Why the rest have no pace of their own. The counts add to `placements − counted`. */
210
+ readonly silences: Readonly<Record<PaceSilence, number>>;
211
+ /**
212
+ * Every placement by its own page's verdict, which is the census view of the
213
+ * same set.
214
+ *
215
+ * The counts add to {@link placements}, and `unknown` is a placement with no
216
+ * pace of its own *or* one whose words are a floor.
217
+ */
218
+ readonly standings: Readonly<Record<PaceStanding, number>>;
219
+ /** Revisions bearing a counted placement. */
220
+ readonly pages: number;
221
+ /** Distinct trees across them, which is pages rather than versions of pages. */
222
+ readonly trees: number;
223
+ /** Counted placements whose words are a floor, because a type in them declares no `copy` (0122). */
224
+ readonly floored: number;
225
+ /**
226
+ * Counted placements that are their page's root.
227
+ *
228
+ * A goal on a page's outermost part is a goal on the whole page, and its
229
+ * words are every word the page says — worth a screen knowing before it reads
230
+ * a pace as being about a band.
231
+ */
232
+ readonly whole: number;
233
+ /**
234
+ * Page views that reached a counted placement, at each page's own door scale,
235
+ * counted once per page it stands on.
236
+ *
237
+ * **Not a count of people and deliberately not rounded into one** (0256): a
238
+ * reader who met the part on two pages is two of them. `null` under a
239
+ * silence.
240
+ */
241
+ readonly readers: number | null;
242
+ /**
243
+ * Time on screen across the counted placements, added, exactly as the rows
244
+ * hold it.
245
+ *
246
+ * Sound without a correction: a page view a rollup counted twice carries one
247
+ * page view's dwell, so the straddle correction divides out of the numerator
248
+ * and the whole of it is in the readers.
249
+ */
250
+ readonly dwellMs: number;
251
+ /**
252
+ * The time its words take the readers who reached it: `readers × wordsWithin
253
+ * × msPerWord`, added over the counted placements.
254
+ *
255
+ * The denominator, in the same reader-milliseconds {@link dwellMs} is in, and
256
+ * each page's own words — the same part can say more on one page than on
257
+ * another, and a sum of paces would have let the quiet page outvote the busy
258
+ * one. `null` under a silence.
259
+ */
260
+ readonly needMs: number | null;
261
+ /**
262
+ * `dwellMs ÷ readers`: **the time the typical reader who reached this part
263
+ * had there**, which is the figure a goal's screen asks for.
264
+ *
265
+ * `null` under a silence, which is the state a screen draws instead of a
266
+ * nought: *nobody was seen on it* and *they had no time on it* are different
267
+ * answers.
268
+ */
269
+ readonly spentMs: number | null;
270
+ /**
271
+ * `needMs − dwellMs` where positive: the reading time its readers did not
272
+ * have. Nought where they had enough, `null` under a silence.
273
+ *
274
+ * Taken over the pooled sums, so a page whose readers lingered pays for a page
275
+ * whose readers skimmed. The per-page figures on {@link PartPace.ranked} are
276
+ * each page's own and are **not** addable to this one; see
277
+ * {@link PacedPlace.shortMs}.
278
+ */
279
+ readonly shortMs: number | null;
280
+ /** `dwellMs ÷ needMs`. `1` is exactly time enough. `null` under a silence. */
281
+ readonly pace: number | null;
282
+ /** The verdict, by `paceStandingOf` — so a floor can hold up anything but `skimmed`. */
283
+ readonly standing: PaceStanding;
284
+ /** Why there is no verdict, and `null` where there is one. */
285
+ readonly silence: KindPaceSilence | null;
286
+ /**
287
+ * Of {@link readers}, those on a page the door could not scale, so no
288
+ * straddle correction was applied to them.
289
+ *
290
+ * It biases the pace **down**, towards `skimmed`, which is why those pages
291
+ * are kept rather than withheld.
292
+ */
293
+ readonly unscaled: number;
294
+ /**
295
+ * The pages bearing a counted placement that the door could not scale, by
296
+ * tree and newest revision first.
297
+ *
298
+ * The actionable half of the figure above: one of these pages is why. Empty
299
+ * is the healthy state.
300
+ */
301
+ readonly unscaledPages: readonly UnscaledPage[];
302
+ /**
303
+ * Readings of a revision beyond the first, which were dropped.
304
+ *
305
+ * A caller that concatenated two reads holds one page twice, and a page twice
306
+ * doubles both terms of the quotient while looking like twice the evidence.
307
+ */
308
+ readonly duplicated: number;
309
+ /** Door rows for one revision beyond the first, which were ignored. */
310
+ readonly duplicatedRows: number;
311
+ /**
312
+ * Every page the part is **counted** on, by the reading time its readers did
313
+ * not have, most first (0390).
314
+ *
315
+ * Then the lower pace, then by tree id and newest revision first, so two
316
+ * pages that cost the same do not reorder on a refresh. The key is
317
+ * {@link PacedPlace.shortMs}, which is a magnitude in reader-milliseconds
318
+ * rather than a rate: *which page is this part skimmed on* asked of a pace
319
+ * would put a page one reader hurried past above a page four hundred readers
320
+ * skimmed, and the second is the page to go to.
321
+ *
322
+ * `ranked.length` is {@link counted}, and the rows' `readers`, `dwellMs` and
323
+ * `needMs` add to {@link PartPace.readers}, {@link PartPace.dwellMs} and
324
+ * {@link PartPace.needMs} exactly — wherever those three are published. A
325
+ * part whose pooled pace is withheld keeps its rows, because the pages are
326
+ * then the only thing on the reading that says where to go and look.
327
+ *
328
+ * Each row's {@link PacedPlace.standing} is its page's own verdict and agrees
329
+ * with {@link standings} by construction; its {@link PacedPlace.shortMs} is
330
+ * its page's own and is the one term that does not add.
331
+ */
332
+ readonly ranked: readonly MeasuredPlace[];
333
+ /**
334
+ * Every other page it stands on, by tree id and newest revision first.
335
+ *
336
+ * A placement with no figures of its own, each carrying the
337
+ * {@link PacedPlace.silence} saying why — and **none of its terms is in the
338
+ * sums above**, which is not a rounding: a `wordless` placement can hold real
339
+ * time on screen that no quotient can use, and adding it to `dwellMs` would
340
+ * put time in a numerator whose denominator refused it.
341
+ *
342
+ * `ranked.length + unranked.length` is {@link placements}.
343
+ */
344
+ readonly unranked: readonly PacedPlace[];
345
+ /**
346
+ * The head of the order: the one page of this part to go and look at.
347
+ *
348
+ * `null` where no page is counted, which is exactly where {@link silence} is
349
+ * not.
350
+ */
351
+ readonly worst: MeasuredPlace | null;
352
+ /** The costing rate that was applied, which is the default unless one was given. */
353
+ readonly wordsPerMinute: number;
354
+ };
355
+ /**
356
+ * Whether the readers who reach one part have time for what it says.
357
+ *
358
+ * Takes the node, the readings of the pages it is counted on, and the whole
359
+ * window of page-view rows a deployment holds — each page's own row is picked
360
+ * out of them by the published matching rule (`pageViewsFor`) rather than by a
361
+ * hand-written copy of it, because the pairing is the part of every join here
362
+ * that fails quietly when it is got wrong.
363
+ *
364
+ * **Which readings are handed in is the caller's answer to *which pages*.** A
365
+ * goal naming pages hands in those pages' readings; a goal naming none hands in
366
+ * every page it can read, and a reading with no row for the node contributes
367
+ * nothing but a count. Narrowing here rather than inside would have made this
368
+ * function hold the goal vocabulary, which is the portal's and not this
369
+ * subsystem's (0350).
370
+ *
371
+ * There is **no `inflation` option**, for the reason `libraryPaceOf` has none:
372
+ * one scalar over nine pages with nine straddle rates would be a correction
373
+ * nobody measured, so each page's own is read off its own door row.
374
+ *
375
+ * Linear in the parts of the readings times the rows.
376
+ */
377
+ export declare const partPaceOf: (nodeId: NodeId, readings: readonly PageReading[], rows: readonly StoredPageViews[], options?: LibraryPaceOptions) => PartPace;
378
+ //# sourceMappingURL=part-pace.d.ts.map