@jam-overture/loom 0.1.0 → 0.2.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 (290) hide show
  1. package/README.md +3 -1
  2. package/dist/application/application.d.ts +109 -0
  3. package/dist/application/application.js +97 -0
  4. package/dist/application/memory.d.ts +20 -0
  5. package/dist/application/memory.js +79 -0
  6. package/dist/application/store.d.ts +101 -0
  7. package/dist/application/store.js +25 -0
  8. package/dist/audience/audience.d.ts +36 -0
  9. package/dist/audience/audience.js +41 -0
  10. package/dist/cli/templates.js +19 -0
  11. package/dist/data/plan.js +0 -0
  12. package/dist/data/resolution.d.ts +23 -1
  13. package/dist/data/resolve.d.ts +30 -3
  14. package/dist/data/resolve.js +11 -3
  15. package/dist/ids.d.ts +10 -0
  16. package/dist/ids.js +11 -1
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +1 -0
  19. package/dist/patch.d.ts +54 -0
  20. package/dist/patch.js +44 -0
  21. package/dist/project/closing.d.ts +51 -0
  22. package/dist/project/closing.js +53 -0
  23. package/dist/project/memory.d.ts +20 -0
  24. package/dist/project/memory.js +97 -0
  25. package/dist/project/project.d.ts +90 -0
  26. package/dist/project/project.js +91 -0
  27. package/dist/project/store.d.ts +135 -0
  28. package/dist/project/store.js +41 -0
  29. package/dist/registered.d.ts +64 -0
  30. package/dist/registered.js +118 -0
  31. package/dist/render/behaviour-adjust.d.ts +11 -19
  32. package/dist/render/behaviour-adjust.js +75 -21
  33. package/dist/render/behaviour-present.d.ts +8 -0
  34. package/dist/render/behaviour-present.js +57 -6
  35. package/dist/render/behaviour.d.ts +98 -17
  36. package/dist/render/behaviour.js +91 -26
  37. package/dist/render/control-name.d.ts +68 -0
  38. package/dist/render/control-name.js +37 -0
  39. package/dist/render/diagnostics.d.ts +72 -0
  40. package/dist/render/diagnostics.js +7 -0
  41. package/dist/render/index.d.ts +2 -0
  42. package/dist/render/index.js +2 -0
  43. package/dist/render/reads.d.ts +11 -0
  44. package/dist/render/reads.js +12 -1
  45. package/dist/render/render.js +102 -7
  46. package/dist/render/slots.d.ts +52 -0
  47. package/dist/render/slots.js +24 -0
  48. package/dist/render/theme.d.ts +54 -1
  49. package/dist/render/theme.js +23 -1
  50. package/dist/render/unshown.d.ts +152 -0
  51. package/dist/render/unshown.js +80 -0
  52. package/dist/runtime/analysis.d.ts +94 -9
  53. package/dist/runtime/analysis.js +54 -9
  54. package/dist/runtime/assessment.d.ts +36 -2
  55. package/dist/runtime/assessment.js +27 -2
  56. package/dist/runtime/checks.d.ts +148 -0
  57. package/dist/runtime/checks.js +112 -0
  58. package/dist/runtime/disposition.d.ts +96 -0
  59. package/dist/runtime/disposition.js +46 -0
  60. package/dist/runtime/gate.js +22 -0
  61. package/dist/runtime/index.d.ts +3 -0
  62. package/dist/runtime/index.js +3 -0
  63. package/dist/runtime/irreversibility.d.ts +64 -0
  64. package/dist/runtime/irreversibility.js +45 -0
  65. package/dist/runtime/pipeline.d.ts +43 -0
  66. package/dist/runtime/pipeline.js +10 -2
  67. package/dist/runtime/policy-change.d.ts +93 -0
  68. package/dist/runtime/policy-change.js +299 -0
  69. package/dist/runtime/policy-log.d.ts +406 -0
  70. package/dist/runtime/policy-log.js +285 -0
  71. package/dist/runtime/reversibility.d.ts +11 -9
  72. package/dist/runtime/stakes.d.ts +129 -1
  73. package/dist/runtime/stakes.js +240 -26
  74. package/dist/runtime/vocabulary.d.ts +164 -7
  75. package/dist/runtime/vocabulary.js +181 -8
  76. package/dist/sdk/audit.d.ts +174 -3
  77. package/dist/sdk/audit.js +176 -17
  78. package/dist/sdk/catalogue.d.ts +9 -1
  79. package/dist/sdk/conformance.d.ts +37 -3
  80. package/dist/sdk/conformance.js +25 -4
  81. package/dist/sdk/definition.d.ts +65 -0
  82. package/dist/sdk/definition.js +22 -0
  83. package/dist/sdk/registry.d.ts +29 -2
  84. package/dist/sdk/registry.js +63 -1
  85. package/dist/signals/action-change.d.ts +507 -0
  86. package/dist/signals/action-change.js +265 -0
  87. package/dist/signals/action.d.ts +331 -0
  88. package/dist/signals/action.js +182 -0
  89. package/dist/signals/applied-window.contract.d.ts +23 -0
  90. package/dist/signals/applied-window.contract.js +160 -0
  91. package/dist/signals/arriving.d.ts +210 -0
  92. package/dist/signals/arriving.js +133 -0
  93. package/dist/signals/audiences.d.ts +528 -0
  94. package/dist/signals/audiences.js +255 -0
  95. package/dist/signals/broadcast.d.ts +8 -2
  96. package/dist/signals/broadcast.js +58 -8
  97. package/dist/signals/change.d.ts +378 -0
  98. package/dist/signals/change.js +327 -0
  99. package/dist/signals/collect.d.ts +41 -0
  100. package/dist/signals/collect.js +88 -7
  101. package/dist/signals/copy-change.d.ts +553 -0
  102. package/dist/signals/copy-change.js +377 -0
  103. package/dist/signals/copy.d.ts +337 -0
  104. package/dist/signals/copy.js +211 -0
  105. package/dist/signals/counters.d.ts +46 -0
  106. package/dist/signals/counters.js +102 -0
  107. package/dist/signals/deliver.d.ts +23 -4
  108. package/dist/signals/deliver.js +34 -6
  109. package/dist/signals/deployment-change.d.ts +371 -0
  110. package/dist/signals/deployment-change.js +268 -0
  111. package/dist/signals/deployment.d.ts +265 -0
  112. package/dist/signals/deployment.js +152 -0
  113. package/dist/signals/door.d.ts +92 -0
  114. package/dist/signals/door.js +53 -0
  115. package/dist/signals/fold.d.ts +10 -0
  116. package/dist/signals/fold.js +5 -1
  117. package/dist/signals/form-action.d.ts +302 -0
  118. package/dist/signals/form-action.js +169 -0
  119. package/dist/signals/form-copy.d.ts +523 -0
  120. package/dist/signals/form-copy.js +346 -0
  121. package/dist/signals/forms.d.ts +247 -0
  122. package/dist/signals/forms.js +147 -0
  123. package/dist/signals/funnel-change.d.ts +548 -0
  124. package/dist/signals/funnel-change.js +361 -0
  125. package/dist/signals/funnel.d.ts +532 -0
  126. package/dist/signals/funnel.js +216 -0
  127. package/dist/signals/health.d.ts +497 -0
  128. package/dist/signals/health.js +361 -0
  129. package/dist/signals/index.d.ts +41 -0
  130. package/dist/signals/index.js +41 -0
  131. package/dist/signals/ingest.d.ts +56 -1
  132. package/dist/signals/ingest.js +91 -1
  133. package/dist/signals/journal.d.ts +11 -0
  134. package/dist/signals/kinds.d.ts +8 -6
  135. package/dist/signals/kinds.js +14 -6
  136. package/dist/signals/library-action.d.ts +430 -0
  137. package/dist/signals/library-action.js +336 -0
  138. package/dist/signals/library-change.d.ts +477 -0
  139. package/dist/signals/library-change.js +335 -0
  140. package/dist/signals/library-copy-change.d.ts +498 -0
  141. package/dist/signals/library-copy-change.js +476 -0
  142. package/dist/signals/library-pace.d.ts +319 -0
  143. package/dist/signals/library-pace.js +305 -0
  144. package/dist/signals/library-reach-change.d.ts +636 -0
  145. package/dist/signals/library-reach-change.js +534 -0
  146. package/dist/signals/library-reach.d.ts +377 -0
  147. package/dist/signals/library-reach.js +227 -0
  148. package/dist/signals/library-word-reach-change.d.ts +567 -0
  149. package/dist/signals/library-word-reach-change.js +568 -0
  150. package/dist/signals/library.d.ts +306 -0
  151. package/dist/signals/library.js +178 -0
  152. package/dist/signals/memory.d.ts +9 -0
  153. package/dist/signals/memory.js +105 -14
  154. package/dist/signals/migrate.d.ts +17 -2
  155. package/dist/signals/migrate.js +122 -5
  156. package/dist/signals/notice.d.ts +334 -0
  157. package/dist/signals/notice.js +228 -0
  158. package/dist/signals/pace-change.d.ts +501 -0
  159. package/dist/signals/pace-change.js +310 -0
  160. package/dist/signals/pace.d.ts +296 -0
  161. package/dist/signals/pace.js +291 -0
  162. package/dist/signals/page-views.d.ts +365 -0
  163. package/dist/signals/page-views.js +218 -0
  164. package/dist/signals/parts.d.ts +344 -0
  165. package/dist/signals/parts.js +273 -0
  166. package/dist/signals/postgres.d.ts +16 -2
  167. package/dist/signals/postgres.js +390 -87
  168. package/dist/signals/progress.d.ts +212 -0
  169. package/dist/signals/progress.js +150 -0
  170. package/dist/signals/ratios.d.ts +108 -0
  171. package/dist/signals/ratios.js +40 -0
  172. package/dist/signals/reach.d.ts +309 -0
  173. package/dist/signals/reach.js +93 -0
  174. package/dist/signals/readable.d.ts +34 -0
  175. package/dist/signals/readable.js +34 -0
  176. package/dist/signals/readership.d.ts +381 -0
  177. package/dist/signals/readership.js +308 -0
  178. package/dist/signals/region-pages.d.ts +173 -0
  179. package/dist/signals/region-pages.js +62 -0
  180. package/dist/signals/region.d.ts +287 -0
  181. package/dist/signals/region.js +198 -0
  182. package/dist/signals/retention.d.ts +141 -0
  183. package/dist/signals/retention.js +58 -0
  184. package/dist/signals/rollup.d.ts +67 -3
  185. package/dist/signals/rollup.js +0 -0
  186. package/dist/signals/schema.d.ts +432 -1
  187. package/dist/signals/schema.js +157 -3
  188. package/dist/signals/signal.d.ts +237 -11
  189. package/dist/signals/signal.js +70 -10
  190. package/dist/signals/silence-census.d.ts +205 -0
  191. package/dist/signals/silence-census.js +87 -0
  192. package/dist/signals/silences.d.ts +848 -0
  193. package/dist/signals/silences.js +753 -0
  194. package/dist/signals/tally.d.ts +140 -11
  195. package/dist/signals/window-figures.d.ts +148 -0
  196. package/dist/signals/window-figures.js +42 -0
  197. package/dist/signals/window.d.ts +866 -0
  198. package/dist/signals/window.js +693 -0
  199. package/dist/signals/words.d.ts +24 -0
  200. package/dist/signals/words.js +24 -0
  201. package/dist/store/index.d.ts +19 -0
  202. package/dist/store/index.js +19 -0
  203. package/dist/store/memory.d.ts +2 -1
  204. package/dist/store/memory.js +48 -12
  205. package/dist/store/migrate.d.ts +80 -0
  206. package/dist/store/migrate.js +259 -7
  207. package/dist/store/postgres-applications.d.ts +4 -0
  208. package/dist/store/postgres-applications.js +197 -0
  209. package/dist/store/postgres-holds.d.ts +10 -1
  210. package/dist/store/postgres-holds.js +116 -101
  211. package/dist/store/postgres-policy-log.d.ts +14 -0
  212. package/dist/store/postgres-policy-log.js +240 -0
  213. package/dist/store/postgres-projects.d.ts +4 -0
  214. package/dist/store/postgres-projects.js +217 -0
  215. package/dist/store/postgres.d.ts +16 -1
  216. package/dist/store/postgres.js +59 -9
  217. package/dist/store/replay.d.ts +102 -1
  218. package/dist/store/replay.js +190 -19
  219. package/dist/store/reseed.d.ts +238 -0
  220. package/dist/store/reseed.js +308 -0
  221. package/dist/store/schema.d.ts +450 -2
  222. package/dist/store/schema.js +141 -5
  223. package/dist/store/store.d.ts +29 -6
  224. package/dist/submit/resolve.js +2 -1
  225. package/dist/telemetry/calibration.d.ts +25 -0
  226. package/dist/telemetry/calibration.js +27 -1
  227. package/dist/telemetry/event.d.ts +391 -33
  228. package/dist/telemetry/event.js +84 -20
  229. package/dist/telemetry/index.d.ts +1 -0
  230. package/dist/telemetry/index.js +1 -0
  231. package/dist/telemetry/journal.d.ts +72 -3
  232. package/dist/telemetry/journal.js +9 -0
  233. package/dist/telemetry/lookup.d.ts +27 -0
  234. package/dist/telemetry/lookup.js +18 -0
  235. package/dist/telemetry/memory.js +23 -0
  236. package/dist/telemetry/migrate.js +22 -1
  237. package/dist/telemetry/postgres.d.ts +10 -1
  238. package/dist/telemetry/postgres.js +172 -90
  239. package/dist/telemetry/remeasure.d.ts +78 -0
  240. package/dist/telemetry/remeasure.js +83 -0
  241. package/dist/telemetry/retention.d.ts +2 -2
  242. package/dist/telemetry/schema.d.ts +17 -0
  243. package/dist/telemetry/schema.js +27 -1
  244. package/dist/telemetry/sink.d.ts +2 -2
  245. package/dist/testing/application-contract.d.ts +14 -0
  246. package/dist/testing/application-contract.js +270 -0
  247. package/dist/testing/contracts.d.ts +12 -7
  248. package/dist/testing/contracts.js +12 -7
  249. package/dist/testing/definitions.d.ts +78 -0
  250. package/dist/testing/definitions.js +134 -9
  251. package/dist/testing/doubles.d.ts +103 -0
  252. package/dist/testing/doubles.js +143 -0
  253. package/dist/testing/index.d.ts +2 -2
  254. package/dist/testing/index.js +2 -2
  255. package/dist/testing/journal-contract.js +140 -2
  256. package/dist/testing/model-contract.d.ts +110 -0
  257. package/dist/testing/model-contract.js +150 -0
  258. package/dist/testing/policy-log-contract.d.ts +26 -0
  259. package/dist/testing/policy-log-contract.js +344 -0
  260. package/dist/testing/project-contract.d.ts +14 -0
  261. package/dist/testing/project-contract.js +266 -0
  262. package/dist/testing/reader-signal-contract.d.ts +27 -2
  263. package/dist/testing/reader-signal-contract.js +475 -5
  264. package/dist/testing/store-contract.d.ts +7 -1
  265. package/dist/testing/store-contract.js +84 -3
  266. package/dist/theme/apply.d.ts +20 -1
  267. package/dist/theme/apply.js +5 -3
  268. package/dist/theme/derive.d.ts +22 -0
  269. package/dist/theme/derive.js +54 -1
  270. package/dist/theme/library.js +1 -1
  271. package/dist/theme/measure.d.ts +34 -0
  272. package/dist/theme/measure.js +30 -1
  273. package/dist/theme/palettes.js +7 -7
  274. package/dist/theme/ramp.d.ts +64 -0
  275. package/dist/theme/ramp.js +114 -0
  276. package/dist/theme/registry.d.ts +9 -0
  277. package/dist/theme/registry.js +11 -1
  278. package/dist/theme/separation.d.ts +97 -3
  279. package/dist/theme/separation.js +75 -0
  280. package/dist/tree/compare.d.ts +9 -0
  281. package/dist/tree/compare.js +18 -0
  282. package/dist/write/computed.d.ts +60 -0
  283. package/dist/write/computed.js +61 -0
  284. package/dist/write/held.d.ts +59 -0
  285. package/dist/write/index.d.ts +5 -2
  286. package/dist/write/index.js +5 -2
  287. package/dist/write/reseed.d.ts +151 -0
  288. package/dist/write/reseed.js +184 -0
  289. package/dist/write/revert.js +2 -16
  290. package/package.json +98 -19
@@ -1,3 +1,4 @@
1
+ import type { AudienceId } from "../audience/audience.js";
1
2
  import type { TreeId } from "../ids.js";
2
3
  import { type PageDirection, type PageEnds } from "../paging.js";
3
4
  import type { Result } from "../result.js";
@@ -40,6 +41,16 @@ export declare const describeReaderSignalStoreError: (error: ReaderSignalStoreEr
40
41
  export type ReceivedBatch = ReaderSignalBatch & {
41
42
  readonly seq: number;
42
43
  readonly receivedAt: string;
44
+ /**
45
+ * The audience it was **filed** under, which is resolved rather than
46
+ * optional (0284).
47
+ *
48
+ * `audience` is what the sender said and may be absent; this is what the
49
+ * buffer stored, and a stored row always names one — `aud_everyone` where the
50
+ * sender named nothing. A fold reads this, so that a window holding two
51
+ * audiences folds into two sets of counters rather than one.
52
+ */
53
+ readonly audienceId: AudienceId;
43
54
  };
44
55
  export type ReaderSignalReadRequest = {
45
56
  /** Absent reads every tree the handle can see, which is the scope rule (0020). */
@@ -1,22 +1,24 @@
1
1
  /**
2
- * The four kinds of reader signal, with nothing else in the module.
2
+ * The five kinds of reader signal, with nothing else in the module.
3
3
  *
4
4
  * The schema in `signal.ts` is built from this list. It lives apart so the
5
5
  * broadcaster, which runs in a visitor's browser, can know the kinds without
6
6
  * pulling in the schema library (0136).
7
7
  */
8
- export declare const READER_SIGNAL_KINDS: readonly ["viewed", "dwelled", "activated", "disclosed"];
8
+ export declare const READER_SIGNAL_KINDS: readonly ["viewed", "dwelled", "activated", "disclosed", "completed"];
9
9
  /**
10
10
  * The kinds whose node is not the thing a reader aimed at.
11
11
  *
12
12
  * A reader presses a button and opens a disclosure; both are addressed nodes of
13
13
  * their own, so the node such a signal is filed against is the control rather
14
- * than the region the control is in. `viewed` and `dwelled` have no such gap —
15
- * they are observed on the addressed element itself — which is why these two
16
- * carry an ancestry and the other two do not.
14
+ * than the region the control is in. A submitted form is the same shape — the
15
+ * node is the form, and the band the form was the end of is the thing a
16
+ * deployment wants to read. `viewed` and `dwelled` have no such gap — they are
17
+ * observed on the addressed element itself — which is why these three carry an
18
+ * ancestry and the other two do not (0167).
17
19
  *
18
20
  * Here rather than in `signal.ts` so the broadcaster can know which signals it
19
21
  * must walk for without loading the schema library (0136).
20
22
  */
21
- export declare const DELEGATED_READER_SIGNAL_KINDS: readonly ["activated", "disclosed"];
23
+ export declare const DELEGATED_READER_SIGNAL_KINDS: readonly ["activated", "disclosed", "completed"];
22
24
  //# sourceMappingURL=kinds.d.ts.map
@@ -1,22 +1,30 @@
1
1
  /**
2
- * The four kinds of reader signal, with nothing else in the module.
2
+ * The five kinds of reader signal, with nothing else in the module.
3
3
  *
4
4
  * The schema in `signal.ts` is built from this list. It lives apart so the
5
5
  * broadcaster, which runs in a visitor's browser, can know the kinds without
6
6
  * pulling in the schema library (0136).
7
7
  */
8
- export const READER_SIGNAL_KINDS = ["viewed", "dwelled", "activated", "disclosed"];
8
+ export const READER_SIGNAL_KINDS = [
9
+ "viewed",
10
+ "dwelled",
11
+ "activated",
12
+ "disclosed",
13
+ "completed",
14
+ ];
9
15
  /**
10
16
  * The kinds whose node is not the thing a reader aimed at.
11
17
  *
12
18
  * A reader presses a button and opens a disclosure; both are addressed nodes of
13
19
  * their own, so the node such a signal is filed against is the control rather
14
- * than the region the control is in. `viewed` and `dwelled` have no such gap —
15
- * they are observed on the addressed element itself — which is why these two
16
- * carry an ancestry and the other two do not.
20
+ * than the region the control is in. A submitted form is the same shape — the
21
+ * node is the form, and the band the form was the end of is the thing a
22
+ * deployment wants to read. `viewed` and `dwelled` have no such gap — they are
23
+ * observed on the addressed element itself — which is why these three carry an
24
+ * ancestry and the other two do not (0167).
17
25
  *
18
26
  * Here rather than in `signal.ts` so the broadcaster can know which signals it
19
27
  * must walk for without loading the schema library (0136).
20
28
  */
21
- export const DELEGATED_READER_SIGNAL_KINDS = ["activated", "disclosed"];
29
+ export const DELEGATED_READER_SIGNAL_KINDS = ["activated", "disclosed", "completed"];
22
30
  //# sourceMappingURL=kinds.js.map
@@ -0,0 +1,430 @@
1
+ import type { PrimitiveType } from "../primitive-type.js";
2
+ import { type PrimitiveRole } from "../role.js";
3
+ import { type ActionStanding } from "./action.js";
4
+ import { type KindKey } from "./library.js";
5
+ import type { KindReachSilence, UnscaledPage } from "./library-reach.js";
6
+ import { type RevisionOf, type StoredPageViews } from "./page-views.js";
7
+ import type { PageReading } from "./parts.js";
8
+ /**
9
+ * Of the readers who met a kind of part, the share that did something inside
10
+ * it.
11
+ *
12
+ * Three readings now stand on one list of `PageReading`s and answer three
13
+ * different questions about one primitive type. [`library.ts`](library.ts)
14
+ * counts the **places** it stands and how many of them were reached (0257);
15
+ * [`library-reach.ts`](library-reach.ts) counts the **readers** who met those
16
+ * places and read it (0256). Both are about attention. This is the third and it
17
+ * is about what readers *did*: *of the readers who met your pricing card, three
18
+ * in ten did something inside it.*
19
+ *
20
+ * It is the **sixteenth** thing taken out of what this subsystem already knows
21
+ * rather than collected. `engaged` has been on a tally since the counters
22
+ * existed and [`action.ts`](action.ts) interpreted it for one page (0242);
23
+ * nothing had ever asked it of a **component**, which is the question a person
24
+ * who wrote that component actually has. **Nothing is added to a payload, a
25
+ * browser, a column, a store or the vocabulary of kinds**, and the broadcaster
26
+ * is not touched.
27
+ *
28
+ * ## It is the page reading summed, and not a second reading of a nought
29
+ *
30
+ * Every rule about what a counter means is 0242's and is applied by
31
+ * {@link pageActionOf}, whose rows this folds. So *a leaf has no inside*, *a
32
+ * press is its own occurrence and not a reader*, and *an absent row is not a
33
+ * nought* are decided in one place and once. What is added here is the
34
+ * arithmetic of putting several pages' answers together, which is the only part
35
+ * a library-level reading can get wrong on its own.
36
+ *
37
+ * ## The door is a weight here, and nothing else — which is why this can answer
38
+ * where a share of arrivals cannot
39
+ *
40
+ * A placement's own share is `engaged ÷ reached`: two distinct page-view counts
41
+ * off one row, so the straddle over-count (0147) is common to both terms and
42
+ * divides out, which is the figure 0242 settled and 0221 established the
43
+ * soundness of.
44
+ *
45
+ * Across pages it does not divide out, because the straddle rate is each page's
46
+ * own (0250) — so the weight each page carries is put on the scale the door
47
+ * counts in, exactly as a kind's reach is (0256): `appearances ÷ (1 +
48
+ * inflation)`, which comes to `min(appearances, opened)`, taken as that minimum
49
+ * of two whole numbers rather than as the division it equals.
50
+ *
51
+ * **But the door appears in the weights only**, and that is the difference
52
+ * worth the record. 0256's share divides a reach by the *arrivals*, so the
53
+ * scale is in its denominator and a page the door cannot scale takes the whole
54
+ * figure with it. Here both terms are reaches off the same rows, so a page's
55
+ * own scale factor cancels inside that page's contribution and only the
56
+ * *relative* weight of one page against another needs the door. Two
57
+ * consequences, and they are the shape of this module:
58
+ *
59
+ * - **A kind borne by one page needs no door row at all.** Its share is that
60
+ * page's own sound figure, and 0256 would have had to withhold it. A deployment
61
+ * with one page, and a component that stands on one page of forty, are both
62
+ * answered.
63
+ * - **A page whose placements were reached by nobody needs no scale either**,
64
+ * because it contributes nothing to either term whatever its scale is. So the
65
+ * pages that must be scalable are exactly the ones that contributed reach, and
66
+ * {@link KindAction.weighed} is how many there were.
67
+ *
68
+ * Where more than one page contributed reach and one of them cannot be scaled,
69
+ * the whole kind is withheld — 0256's refusal unchanged, for its reason: a
70
+ * weighted mean over a subset is a figure whose denominator nobody named.
71
+ *
72
+ * ## There is no nought share, and that is not a gap
73
+ *
74
+ * A census can report that nobody read a kind; a reach reading can report that
75
+ * nobody who arrived met it. Neither is available to this one, because its
76
+ * denominator is **the readers who got there**. A kind nothing reached has no
77
+ * denominator, so *nobody acted in it* is a silence here and never a nought —
78
+ * and a surface that printed a nought would be saying the one thing the counters
79
+ * cannot distinguish from nobody ever seeing it.
80
+ *
81
+ * ## What is deliberately not published
82
+ *
83
+ * **No ceiling.** 0256 publishes a share against the folded page views and a
84
+ * bound against the openings, because openings are exact. Nothing counts an
85
+ * action at the door, so there is no exact term to bound this with — and none is
86
+ * needed, since the straddle cancels inside every page's contribution rather
87
+ * than being carried into the result. {@link KindAction.settled} says whether
88
+ * the evidence has stopped arriving, which is the only error left.
89
+ *
90
+ * **No count where there is no scale.** A scale-free row publishes its share and
91
+ * **not** `met` or `acted`: those are counts of page views at the door's scale,
92
+ * and a row whose page the door could not scale has no number on that scale to
93
+ * offer. Mixing the two scales in one column would misrank the one ordering
94
+ * here that matters, so {@link LibraryAction.unranked} says how many rows the
95
+ * ranking could not see.
96
+ *
97
+ * **No reading-wide share**, for 0256's reason: a share over every kind at once
98
+ * weighs a page by how finely it was built.
99
+ *
100
+ * **Nothing the census already says.** The standings of attention, the words,
101
+ * the dwell and the occurrence counts are a kind's row in `library.ts`. The
102
+ * three readings pair on {@link kindKeyOf}.
103
+ *
104
+ * Pure. It reaches no store, no clock and no DOM, it is linear in the parts of
105
+ * the readings times the rows handed in, and nothing in it survives into a
106
+ * browser bundle.
107
+ */
108
+ /**
109
+ * Why a kind has no share of the readers who acted inside it.
110
+ *
111
+ * **The reach reading's whole set is reused rather than restated**, which is the
112
+ * affirmative use of the limit 0256 found: a silence's subject is a property of
113
+ * the reading that publishes it (0240), and this reading's subject is a kind
114
+ * exactly as that one's is. Its five members are the same five states of the
115
+ * world at the same subject, so a surface drawing two of the three library
116
+ * readings prints one word for one state. Two are added, and only one of them
117
+ * brings a condition nothing else could report.
118
+ */
119
+ export type KindActionSilence = KindReachSilence
120
+ /**
121
+ * No place this kind stands has anything inside it.
122
+ *
123
+ * A heading, a paragraph, a rule, an image and a button are all this: a press
124
+ * is filed against the control and `engaged` counts the views whose reader
125
+ * did something *strictly inside* a node (0167), so a leaf reports a nought
126
+ * for ever and the nought is a filing rule rather than a measurement (0242).
127
+ *
128
+ * **It is a fact about the shape of the pages and not about the window**, and
129
+ * it is the one reason here that would be exactly as true if every reader in
130
+ * the world had read them. The question does not exist for this kind rather
131
+ * than having gone unanswered — so the instruction it carries is *ask the
132
+ * census instead*, never *collect more*.
133
+ *
134
+ * It is said of the kind only where **every** placement is a leaf. A kind that
135
+ * bears parts in some places and not others is answered over the places where
136
+ * the question exists, and {@link KindAction.leaves} is how many it stood in
137
+ * where it did not.
138
+ */
139
+ | "unenterable"
140
+ /**
141
+ * A page that contributed readers holds actions and credits them to nobody.
142
+ *
143
+ * A press is credited to the addressed ancestors the signal carries (0167), so
144
+ * a sender whose delegated signals have no `within` adds occurrences and no
145
+ * `engaged` anywhere on that page — a server synthesising batches, a replayed
146
+ * fixture, a walk turned off. Every share on such a page is a nought that is a
147
+ * filing rule, which is what `PageAction.unwalked` reports for one page.
148
+ *
149
+ * Withheld for the **whole** kind where any page behind the figure is in that
150
+ * state, and not blended: such a page puts reach into the denominator and
151
+ * nothing into the numerator, so a mean across pages would be dragged down by
152
+ * a sender's configuration with no reader involved. That is the same class of
153
+ * error as a page the door cannot scale, and it gets the same refusal.
154
+ * {@link LibraryAction.unwalked} names the pages, which is the actionable half.
155
+ */
156
+ | "unwalked";
157
+ export declare const KIND_ACTION_SILENCES: readonly KindActionSilence[];
158
+ /** One line per silence, for a surface saying why a kind has no share of its readers' actions. */
159
+ export declare const describeKindActionSilence: (silence: KindActionSilence) => string;
160
+ /**
161
+ * One kind of part, against what the readers who met it did inside it.
162
+ *
163
+ * Identity and the placement counts travel with the figures, so a surface
164
+ * drawing this never holds two lists side by side to find out how much is behind
165
+ * a share.
166
+ */
167
+ export type KindAction = {
168
+ readonly kind: KindKey;
169
+ /** What part a type plays (0114), or `null`. Always `null` on a role row, which carries it as its key. */
170
+ readonly role: PrimitiveRole | null;
171
+ /** Element nodes of this kind across the readings, as the census counts them. */
172
+ readonly placements: number;
173
+ /**
174
+ * Placements that bear element parts, which are the ones the question exists
175
+ * for.
176
+ *
177
+ * Taken off the tree the reading was built from, so it is a property of the
178
+ * pages and not of the window: a part keeps its children in a window nobody
179
+ * read.
180
+ */
181
+ readonly insides: number;
182
+ /**
183
+ * Placements with no element part under them, which are in no term here.
184
+ *
185
+ * `placements = insides + leaves`. Published rather than left to be inferred
186
+ * because on an ordinary library it is most of the rows, and a figure over a
187
+ * third of a kind's places should say so where it is.
188
+ */
189
+ readonly leaves: number;
190
+ /** Placements bearing parts that a window could speak for. */
191
+ readonly verdicts: number;
192
+ /** Placements bearing parts that no row named, and therefore excluded. */
193
+ readonly unknown: number;
194
+ /**
195
+ * Placements with a verdict that no reader reached.
196
+ *
197
+ * In neither term, because a reader who never got there says nothing about
198
+ * what readers do once they have. It is the reason a kind can have verdicts
199
+ * and still no share.
200
+ */
201
+ readonly unmet: number;
202
+ /**
203
+ * Placements at the root of their page.
204
+ *
205
+ * A root's `engaged` is the page-wide headcount of readers who did anything at
206
+ * all (0242), so a row whose placements are roots is that figure and not a
207
+ * fact about a component. A kind is not a node and the same type is a root on
208
+ * one page and nested on another, so nothing is excluded for it — this is the
209
+ * number that says how much of the row is page-wide.
210
+ */
211
+ readonly roots: number;
212
+ /**
213
+ * Placements by the standing a page's own reading gives them (0242), over
214
+ * **every** placement including the leaves.
215
+ *
216
+ * The *places* half of this row, and the one a surface must not print under
217
+ * the share's label: *readers acted in it in 3 of its 9 places* and *3 in 10
218
+ * of the readers who met it acted inside it* are different sentences about one
219
+ * component and can differ by an order of magnitude. It is the pairing care
220
+ * the other two readings of a library already needed once (0256, 0257).
221
+ */
222
+ readonly standings: Readonly<Record<ActionStanding, number>>;
223
+ /** Revisions bearing a placement with an inside and a verdict. */
224
+ readonly pages: number;
225
+ /**
226
+ * Of those, the pages that contributed reach — the weights that actually
227
+ * decide the share.
228
+ *
229
+ * 1 is the scale-free case: one page's own sound figure, needing no door row.
230
+ * It is also what makes the door's silences conditional, since a page nobody
231
+ * reached needs no scale.
232
+ */
233
+ readonly weighed: number;
234
+ /**
235
+ * Page views that reached an enterable place of this kind, at the door's
236
+ * scale: `reached × min(appearances, opened) ÷ appearances`, added over the
237
+ * bearing placements.
238
+ *
239
+ * The denominator of {@link share}. **Not a count of people and deliberately
240
+ * not rounded into one** (0256): the unit is the pair *(a page view, a place
241
+ * this kind stands on that page)*, so a page view of a page bearing three
242
+ * placements is three of them.
243
+ *
244
+ * `null` under a silence, and `null` on a scale-free row — where the share
245
+ * stands and there is no number on the door's scale to publish beside it.
246
+ */
247
+ readonly met: number | null;
248
+ /** The same page views whose reader acted inside the place, at the same scale. */
249
+ readonly acted: number | null;
250
+ /** `met − acted`: the page views that met an enterable place and did nothing in it. */
251
+ readonly ignored: number | null;
252
+ /**
253
+ * `acted ÷ met` — the share of the readers who met it that did something
254
+ * inside it.
255
+ *
256
+ * A weighted mean of each page's own sound share with that page's arrivals
257
+ * behind it, and the one figure here that survives where the counts do not:
258
+ * a scale-free row publishes this and no count. Above 1 exactly where
259
+ * {@link unreconciled} is non-nought and never otherwise.
260
+ */
261
+ readonly share: number | null;
262
+ /**
263
+ * Whether {@link met} and {@link acted} are on the door's scale, which is the
264
+ * only scale two rows' counts may be compared on.
265
+ *
266
+ * False on a scale-free row and under a silence. {@link share} is sound either
267
+ * way, which is the whole of what the door buys here.
268
+ */
269
+ readonly onDoorScale: boolean;
270
+ /**
271
+ * Appearances in excess of openings across the weighing pages, added **once
272
+ * per page** rather than once per placement.
273
+ *
274
+ * The weights here are a page's and not a placement's, which is where this
275
+ * parts from the reach reading's figure of the same name. It biases nothing:
276
+ * the straddle divided out inside each page's share before the pages met, so
277
+ * this is the measured size of a correction that has already happened.
278
+ */
279
+ readonly drift: number;
280
+ /**
281
+ * Openings across the weighing pages whose reading no rollup has folded yet.
282
+ *
283
+ * The one error left in the share, and it is in the weights rather than in any
284
+ * term: a lagging page weighs less than a caught-up one, which shifts the
285
+ * evidence and not the figure.
286
+ */
287
+ readonly pending: number;
288
+ /**
289
+ * No opening is waiting to be folded and nothing is unreconciled, so the
290
+ * weights are final.
291
+ *
292
+ * **Not an exactness claim and there is no `exact` here**, because no term of
293
+ * this share carries a straddle to be exact about. False under a silence.
294
+ */
295
+ readonly settled: boolean;
296
+ /**
297
+ * Placements crediting more readers with acting inside them than reached them,
298
+ * which no rollup produces.
299
+ *
300
+ * Counters older than the column, or a caller that concatenated two reads. It
301
+ * is the one thing that can put {@link share} above 1, and a surface should
302
+ * show the census instead where it is non-nought.
303
+ */
304
+ readonly unreconciled: number;
305
+ readonly silence: KindActionSilence | null;
306
+ };
307
+ /** What a deployment's library gets its readers to do, by kind of part. */
308
+ export type LibraryAction = {
309
+ /**
310
+ * Every type that stands anywhere, most readers ignored first.
311
+ *
312
+ * Then the lower share, then by type, so two kinds that are ignored equally
313
+ * do not reorder on a refresh. A kind with no share sorts after one whose
314
+ * share is nought.
315
+ */
316
+ readonly byType: readonly KindAction[];
317
+ /** Every role in the vocabulary, then the row for parts whose type declared none, in the same order. */
318
+ readonly byRole: readonly KindAction[];
319
+ /** Readings counted, which is revisions of pages and not trees. */
320
+ readonly pages: number;
321
+ /** Distinct trees across them. */
322
+ readonly trees: number;
323
+ /** Element nodes across them, which is the sum of every type row's placements. */
324
+ readonly placements: number;
325
+ /** Of those, the ones bearing element parts. */
326
+ readonly insides: number;
327
+ /** Of those, the ones with nothing inside them. `placements = insides + leaves`. */
328
+ readonly leaves: number;
329
+ /**
330
+ * Page views counted at the door across the pages read, added **once per
331
+ * page**.
332
+ *
333
+ * Addable for the reason no other count here is: a page view began on one
334
+ * revision of one tree and was counted once (0219). It is the weight behind
335
+ * the whole reading and is the denominator of nothing.
336
+ */
337
+ readonly arrivals: number;
338
+ /** Placements by standing, over the whole library. */
339
+ readonly standings: Readonly<Record<ActionStanding, number>>;
340
+ /**
341
+ * The type the most readers met and did nothing inside, which is the kind to
342
+ * look at first.
343
+ *
344
+ * By the **count** of page views and not by the share, for the reason a page's
345
+ * falls are ranked by the readers they lose (0221). A type and never a role,
346
+ * because a type is the thing an author can replace.
347
+ *
348
+ * **A kind that is only ever a page's root is not eligible**, which is how a
349
+ * page's own reading treats its root (0242) and the pace reading before it
350
+ * (0230): a root's reach is the whole page's, so such a row contains every row
351
+ * it would outrank and would lead with *readers opened your pages and did
352
+ * nothing* for ever. It is the row's `roots` against its `placements` that
353
+ * decides, never the type's name — a kind is not a node, and a type that is a
354
+ * root on one page and a band on another is a fact about a component and stays
355
+ * in the ranking with {@link KindAction.roots} saying how much of it is
356
+ * page-wide.
357
+ *
358
+ * It can only ever be a row on the door's scale, since a count is the thing
359
+ * being ranked. {@link unranked} is how many rows had a share the ranking
360
+ * could not see.
361
+ */
362
+ readonly mostIgnored: KindAction | null;
363
+ /**
364
+ * Type rows with a share and no count, which the ranking above cannot
365
+ * include.
366
+ *
367
+ * The scale-free rows, and only those: a row the ranking passes over for being
368
+ * a page's root is excluded by design rather than for want of a scale.
369
+ * Published because a ranking that silently skipped rows is the kind of
370
+ * omission a surface presents as a complete answer.
371
+ */
372
+ readonly unranked: number;
373
+ /** Pages the door could scale, which is where every count here comes from. */
374
+ readonly scaled: number;
375
+ /**
376
+ * The pages bearing a measured placement that the door could not scale, by
377
+ * tree and newest revision first, with the reason in the vocabulary a page's
378
+ * own reading publishes (0240).
379
+ *
380
+ * One of these pages is why a row above is withheld — or is harmless, because
381
+ * a page needs no scale until a second one is weighed against it. Reused from
382
+ * the reach reading rather than restated: it is a fact about a page either way.
383
+ */
384
+ readonly unscaled: readonly UnscaledPage[];
385
+ /**
386
+ * The pages holding actions that credit nobody, by tree and newest revision
387
+ * first.
388
+ *
389
+ * The sender diagnosis, and the actionable half of every `unwalked` row above.
390
+ * Empty is the healthy state, and so is a deployment nobody acted on at all —
391
+ * a page with no occurrences is not in this list.
392
+ */
393
+ readonly unwalked: readonly RevisionOf[];
394
+ /**
395
+ * Readings of a revision beyond the first, which were dropped.
396
+ *
397
+ * A caller that concatenated two reads holds one page twice, and a page twice
398
+ * is the one way a weighted figure can lie about how much weight is behind it.
399
+ */
400
+ readonly duplicated: number;
401
+ /**
402
+ * Door rows for one revision beyond the first, which were ignored.
403
+ *
404
+ * A store keeps one row per revision, so this is a caller's two reads again —
405
+ * and adding them would double a page's weight against every other page.
406
+ */
407
+ readonly duplicatedRows: number;
408
+ /**
409
+ * Types whose readings disagreed about the role they play, where the first
410
+ * reading's answer stands.
411
+ *
412
+ * Detected off the same readings by the same rule as the other two library
413
+ * readings, so the three cannot disagree about it.
414
+ */
415
+ readonly roleDisagreed: readonly PrimitiveType[];
416
+ };
417
+ /**
418
+ * What a deployment's library gets its readers to do, by kind of part.
419
+ *
420
+ * Takes the readings and the whole window of page-view rows a deployment holds —
421
+ * each page's own row is picked out of them by the published matching rule
422
+ * (`pageViewsFor`) rather than by a fourth hand-written copy of it, because the
423
+ * pairing is the part of every join here that fails quietly when it is got
424
+ * wrong.
425
+ *
426
+ * Linear in the parts of the readings times the rows, with one pass that fills
427
+ * both groupings.
428
+ */
429
+ export declare const libraryActionOf: (readings: readonly PageReading[], rows: readonly StoredPageViews[]) => LibraryAction;
430
+ //# sourceMappingURL=library-action.d.ts.map