@jam-overture/loom 0.1.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 (414) 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/audience/compose.d.ts +112 -0
  11. package/dist/audience/compose.js +134 -0
  12. package/dist/audience/memory.d.ts +14 -0
  13. package/dist/audience/memory.js +71 -0
  14. package/dist/audience/overlay-store.d.ts +343 -0
  15. package/dist/audience/overlay-store.js +217 -0
  16. package/dist/audience/rule.d.ts +121 -0
  17. package/dist/audience/rule.js +78 -0
  18. package/dist/cli/index.d.ts +3 -4
  19. package/dist/cli/index.js +3 -4
  20. package/dist/cli/templates.js +19 -0
  21. package/dist/data/adapter.d.ts +9 -1
  22. package/dist/data/adapter.js +2 -0
  23. package/dist/data/plan.js +0 -0
  24. package/dist/data/resolution.d.ts +23 -1
  25. package/dist/data/resolve.d.ts +31 -4
  26. package/dist/data/resolve.js +11 -3
  27. package/dist/ids.d.ts +10 -0
  28. package/dist/ids.js +11 -1
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +1 -0
  31. package/dist/interpretation/anthropic.d.ts +1 -1
  32. package/dist/interpretation/anthropic.js +2 -22
  33. package/dist/interpretation/client.d.ts +1 -1
  34. package/dist/interpretation/materialize.js +67 -22
  35. package/dist/interpretation/openai-compatible.d.ts +36 -0
  36. package/dist/interpretation/openai-compatible.js +79 -0
  37. package/dist/interpretation/status.d.ts +19 -0
  38. package/dist/interpretation/status.js +26 -0
  39. package/dist/live/index.d.ts +73 -0
  40. package/dist/live/index.js +73 -0
  41. package/dist/live/pages.d.ts +187 -0
  42. package/dist/live/pages.js +161 -0
  43. package/dist/live/pull.d.ts +147 -0
  44. package/dist/live/pull.js +398 -0
  45. package/dist/live/pulling.d.ts +79 -0
  46. package/dist/live/pulling.js +117 -0
  47. package/dist/live/window.d.ts +129 -0
  48. package/dist/live/window.js +132 -0
  49. package/dist/patch.d.ts +54 -0
  50. package/dist/patch.js +44 -0
  51. package/dist/project/closing.d.ts +51 -0
  52. package/dist/project/closing.js +53 -0
  53. package/dist/project/memory.d.ts +20 -0
  54. package/dist/project/memory.js +97 -0
  55. package/dist/project/project.d.ts +90 -0
  56. package/dist/project/project.js +91 -0
  57. package/dist/project/store.d.ts +135 -0
  58. package/dist/project/store.js +41 -0
  59. package/dist/registered.d.ts +64 -0
  60. package/dist/registered.js +118 -0
  61. package/dist/render/addressed.d.ts +35 -0
  62. package/dist/render/addressed.js +79 -0
  63. package/dist/render/behaviour-adjust.d.ts +11 -19
  64. package/dist/render/behaviour-adjust.js +75 -21
  65. package/dist/render/behaviour-present.d.ts +8 -0
  66. package/dist/render/behaviour-present.js +57 -6
  67. package/dist/render/behaviour.d.ts +98 -17
  68. package/dist/render/behaviour.js +91 -26
  69. package/dist/render/control-name.d.ts +68 -0
  70. package/dist/render/control-name.js +37 -0
  71. package/dist/render/diagnostics.d.ts +72 -0
  72. package/dist/render/diagnostics.js +7 -0
  73. package/dist/render/document-theme.d.ts +70 -0
  74. package/dist/render/document-theme.js +139 -0
  75. package/dist/render/editable.d.ts +15 -1
  76. package/dist/render/editable.js +13 -1
  77. package/dist/render/expected.d.ts +98 -0
  78. package/dist/render/expected.js +88 -0
  79. package/dist/render/index.d.ts +4 -0
  80. package/dist/render/index.js +4 -0
  81. package/dist/render/reads.d.ts +11 -0
  82. package/dist/render/reads.js +12 -1
  83. package/dist/render/render.d.ts +11 -0
  84. package/dist/render/render.js +294 -53
  85. package/dist/render/request.d.ts +8 -1
  86. package/dist/render/request.js +1 -0
  87. package/dist/render/slots.d.ts +52 -0
  88. package/dist/render/slots.js +24 -0
  89. package/dist/render/theme.d.ts +54 -1
  90. package/dist/render/theme.js +23 -1
  91. package/dist/render/unshown.d.ts +152 -0
  92. package/dist/render/unshown.js +80 -0
  93. package/dist/runtime/analysis.d.ts +94 -9
  94. package/dist/runtime/analysis.js +54 -9
  95. package/dist/runtime/assessment.d.ts +36 -2
  96. package/dist/runtime/assessment.js +27 -2
  97. package/dist/runtime/auto-apply-ceiling.d.ts +54 -0
  98. package/dist/runtime/auto-apply-ceiling.js +66 -0
  99. package/dist/runtime/checks.d.ts +148 -0
  100. package/dist/runtime/checks.js +112 -0
  101. package/dist/runtime/disposition.d.ts +96 -0
  102. package/dist/runtime/disposition.js +46 -0
  103. package/dist/runtime/gate.js +91 -10
  104. package/dist/runtime/index.d.ts +4 -0
  105. package/dist/runtime/index.js +4 -0
  106. package/dist/runtime/irreversibility.d.ts +64 -0
  107. package/dist/runtime/irreversibility.js +45 -0
  108. package/dist/runtime/nesting.d.ts +13 -1
  109. package/dist/runtime/nesting.js +41 -24
  110. package/dist/runtime/pipeline.d.ts +43 -0
  111. package/dist/runtime/pipeline.js +10 -2
  112. package/dist/runtime/policy-change.d.ts +93 -0
  113. package/dist/runtime/policy-change.js +305 -0
  114. package/dist/runtime/policy-log.d.ts +406 -0
  115. package/dist/runtime/policy-log.js +285 -0
  116. package/dist/runtime/policy.d.ts +8 -6
  117. package/dist/runtime/policy.js +5 -2
  118. package/dist/runtime/repointing.js +0 -0
  119. package/dist/runtime/reversibility.d.ts +11 -9
  120. package/dist/runtime/stakes.d.ts +129 -1
  121. package/dist/runtime/stakes.js +240 -26
  122. package/dist/runtime/vocabulary.d.ts +164 -7
  123. package/dist/runtime/vocabulary.js +181 -8
  124. package/dist/sdk/audit.d.ts +174 -3
  125. package/dist/sdk/audit.js +176 -17
  126. package/dist/sdk/catalogue.d.ts +9 -1
  127. package/dist/sdk/conformance.d.ts +37 -3
  128. package/dist/sdk/conformance.js +25 -4
  129. package/dist/sdk/definition.d.ts +129 -5
  130. package/dist/sdk/definition.js +66 -0
  131. package/dist/sdk/registry.d.ts +45 -2
  132. package/dist/sdk/registry.js +102 -1
  133. package/dist/signals/acted.contract.d.ts +21 -0
  134. package/dist/signals/acted.contract.js +236 -0
  135. package/dist/signals/acted.d.ts +359 -0
  136. package/dist/signals/acted.js +135 -0
  137. package/dist/signals/action-change.d.ts +507 -0
  138. package/dist/signals/action-change.js +265 -0
  139. package/dist/signals/action.d.ts +331 -0
  140. package/dist/signals/action.js +182 -0
  141. package/dist/signals/agenda.d.ts +585 -0
  142. package/dist/signals/agenda.js +295 -0
  143. package/dist/signals/applied-window.contract.d.ts +23 -0
  144. package/dist/signals/applied-window.contract.js +160 -0
  145. package/dist/signals/arrivals.contract.d.ts +21 -0
  146. package/dist/signals/arrivals.contract.js +180 -0
  147. package/dist/signals/arrivals.d.ts +375 -0
  148. package/dist/signals/arrivals.js +254 -0
  149. package/dist/signals/arriving.d.ts +210 -0
  150. package/dist/signals/arriving.js +133 -0
  151. package/dist/signals/audiences.d.ts +528 -0
  152. package/dist/signals/audiences.js +255 -0
  153. package/dist/signals/broadcast.d.ts +33 -17
  154. package/dist/signals/broadcast.js +255 -32
  155. package/dist/signals/change.d.ts +378 -0
  156. package/dist/signals/change.js +327 -0
  157. package/dist/signals/collect.d.ts +169 -34
  158. package/dist/signals/collect.js +186 -38
  159. package/dist/signals/conversion.d.ts +348 -0
  160. package/dist/signals/conversion.js +235 -0
  161. package/dist/signals/copy-change.d.ts +553 -0
  162. package/dist/signals/copy-change.js +377 -0
  163. package/dist/signals/copy.d.ts +337 -0
  164. package/dist/signals/copy.js +211 -0
  165. package/dist/signals/correlated.contract.d.ts +24 -0
  166. package/dist/signals/correlated.contract.js +94 -0
  167. package/dist/signals/counters.d.ts +97 -0
  168. package/dist/signals/counters.js +160 -0
  169. package/dist/signals/deliver.d.ts +23 -4
  170. package/dist/signals/deliver.js +34 -6
  171. package/dist/signals/deployment-change.d.ts +395 -0
  172. package/dist/signals/deployment-change.js +309 -0
  173. package/dist/signals/deployment.d.ts +278 -0
  174. package/dist/signals/deployment.js +178 -0
  175. package/dist/signals/door.d.ts +114 -0
  176. package/dist/signals/door.js +77 -0
  177. package/dist/signals/expire.d.ts +192 -0
  178. package/dist/signals/expire.js +213 -0
  179. package/dist/signals/fold.d.ts +10 -0
  180. package/dist/signals/fold.js +5 -1
  181. package/dist/signals/form-action.d.ts +302 -0
  182. package/dist/signals/form-action.js +169 -0
  183. package/dist/signals/form-copy.d.ts +523 -0
  184. package/dist/signals/form-copy.js +346 -0
  185. package/dist/signals/forms.d.ts +247 -0
  186. package/dist/signals/forms.js +147 -0
  187. package/dist/signals/frontier.d.ts +268 -0
  188. package/dist/signals/frontier.js +145 -0
  189. package/dist/signals/funnel-change.d.ts +548 -0
  190. package/dist/signals/funnel-change.js +361 -0
  191. package/dist/signals/funnel-hours.contract.d.ts +21 -0
  192. package/dist/signals/funnel-hours.contract.js +221 -0
  193. package/dist/signals/funnel-hours.d.ts +293 -0
  194. package/dist/signals/funnel-hours.js +99 -0
  195. package/dist/signals/funnel.d.ts +592 -0
  196. package/dist/signals/funnel.js +231 -0
  197. package/dist/signals/health.d.ts +694 -0
  198. package/dist/signals/health.js +573 -0
  199. package/dist/signals/index.d.ts +60 -0
  200. package/dist/signals/index.js +60 -0
  201. package/dist/signals/ingest.d.ts +56 -1
  202. package/dist/signals/ingest.js +91 -1
  203. package/dist/signals/inside.d.ts +190 -0
  204. package/dist/signals/inside.js +263 -0
  205. package/dist/signals/join.d.ts +56 -0
  206. package/dist/signals/join.js +60 -0
  207. package/dist/signals/journal.d.ts +123 -9
  208. package/dist/signals/kept.contract.d.ts +22 -0
  209. package/dist/signals/kept.contract.js +111 -0
  210. package/dist/signals/kinds.d.ts +8 -6
  211. package/dist/signals/kinds.js +14 -6
  212. package/dist/signals/library-action.d.ts +430 -0
  213. package/dist/signals/library-action.js +336 -0
  214. package/dist/signals/library-agenda-change.d.ts +324 -0
  215. package/dist/signals/library-agenda-change.js +199 -0
  216. package/dist/signals/library-agenda.d.ts +258 -0
  217. package/dist/signals/library-agenda.js +167 -0
  218. package/dist/signals/library-change.d.ts +477 -0
  219. package/dist/signals/library-change.js +335 -0
  220. package/dist/signals/library-copy-change.d.ts +498 -0
  221. package/dist/signals/library-copy-change.js +476 -0
  222. package/dist/signals/library-pace.d.ts +319 -0
  223. package/dist/signals/library-pace.js +305 -0
  224. package/dist/signals/library-reach-change.d.ts +646 -0
  225. package/dist/signals/library-reach-change.js +542 -0
  226. package/dist/signals/library-reach.d.ts +377 -0
  227. package/dist/signals/library-reach.js +227 -0
  228. package/dist/signals/library-senders-change.d.ts +457 -0
  229. package/dist/signals/library-senders-change.js +367 -0
  230. package/dist/signals/library-senders-reach-change.d.ts +486 -0
  231. package/dist/signals/library-senders-reach-change.js +538 -0
  232. package/dist/signals/library-senders-reach.d.ts +340 -0
  233. package/dist/signals/library-senders-reach.js +252 -0
  234. package/dist/signals/library-senders.d.ts +271 -0
  235. package/dist/signals/library-senders.js +180 -0
  236. package/dist/signals/library-word-reach-change.d.ts +567 -0
  237. package/dist/signals/library-word-reach-change.js +564 -0
  238. package/dist/signals/library.d.ts +306 -0
  239. package/dist/signals/library.js +178 -0
  240. package/dist/signals/memory.d.ts +9 -0
  241. package/dist/signals/memory.js +246 -14
  242. package/dist/signals/migrate.d.ts +20 -4
  243. package/dist/signals/migrate.js +269 -8
  244. package/dist/signals/notice.d.ts +389 -0
  245. package/dist/signals/notice.js +250 -0
  246. package/dist/signals/pace-change.d.ts +501 -0
  247. package/dist/signals/pace-change.js +310 -0
  248. package/dist/signals/pace.d.ts +296 -0
  249. package/dist/signals/pace.js +291 -0
  250. package/dist/signals/page-views.d.ts +365 -0
  251. package/dist/signals/page-views.js +218 -0
  252. package/dist/signals/part-pace.d.ts +378 -0
  253. package/dist/signals/part-pace.js +333 -0
  254. package/dist/signals/parts.d.ts +354 -0
  255. package/dist/signals/parts.js +232 -0
  256. package/dist/signals/postgres.d.ts +16 -2
  257. package/dist/signals/postgres.js +753 -76
  258. package/dist/signals/progress.d.ts +212 -0
  259. package/dist/signals/progress.js +150 -0
  260. package/dist/signals/ratios.d.ts +108 -0
  261. package/dist/signals/ratios.js +40 -0
  262. package/dist/signals/reach.d.ts +309 -0
  263. package/dist/signals/reach.js +93 -0
  264. package/dist/signals/readable.d.ts +34 -0
  265. package/dist/signals/readable.js +34 -0
  266. package/dist/signals/readership.d.ts +381 -0
  267. package/dist/signals/readership.js +308 -0
  268. package/dist/signals/region-pages.d.ts +173 -0
  269. package/dist/signals/region-pages.js +62 -0
  270. package/dist/signals/region.d.ts +287 -0
  271. package/dist/signals/region.js +198 -0
  272. package/dist/signals/retention.d.ts +163 -0
  273. package/dist/signals/retention.js +75 -0
  274. package/dist/signals/rhythm.d.ts +302 -0
  275. package/dist/signals/rhythm.js +262 -0
  276. package/dist/signals/rollup.d.ts +194 -4
  277. package/dist/signals/rollup.js +0 -0
  278. package/dist/signals/schema.d.ts +1069 -1
  279. package/dist/signals/schema.js +393 -3
  280. package/dist/signals/signal.d.ts +237 -11
  281. package/dist/signals/signal.js +70 -10
  282. package/dist/signals/silence-census.d.ts +205 -0
  283. package/dist/signals/silence-census.js +87 -0
  284. package/dist/signals/silences.d.ts +1147 -0
  285. package/dist/signals/silences.js +996 -0
  286. package/dist/signals/subtrees.d.ts +123 -0
  287. package/dist/signals/subtrees.js +102 -0
  288. package/dist/signals/tally.d.ts +262 -12
  289. package/dist/signals/unread.d.ts +292 -0
  290. package/dist/signals/unread.js +137 -0
  291. package/dist/signals/window-agenda.d.ts +276 -0
  292. package/dist/signals/window-agenda.js +83 -0
  293. package/dist/signals/window-figures.d.ts +148 -0
  294. package/dist/signals/window-figures.js +42 -0
  295. package/dist/signals/window-funnels.d.ts +88 -0
  296. package/dist/signals/window-funnels.js +47 -0
  297. package/dist/signals/window.d.ts +866 -0
  298. package/dist/signals/window.js +693 -0
  299. package/dist/signals/words.d.ts +24 -0
  300. package/dist/signals/words.js +24 -0
  301. package/dist/store/cache.d.ts +101 -0
  302. package/dist/store/cache.js +149 -0
  303. package/dist/store/history.d.ts +82 -0
  304. package/dist/store/history.js +36 -0
  305. package/dist/store/index.d.ts +30 -0
  306. package/dist/store/index.js +30 -0
  307. package/dist/store/memory.d.ts +2 -1
  308. package/dist/store/memory.js +48 -12
  309. package/dist/store/migrate.d.ts +106 -0
  310. package/dist/store/migrate.js +323 -7
  311. package/dist/store/postgres-applications.d.ts +4 -0
  312. package/dist/store/postgres-applications.js +197 -0
  313. package/dist/store/postgres-audience.d.ts +14 -0
  314. package/dist/store/postgres-audience.js +272 -0
  315. package/dist/store/postgres-holds.d.ts +10 -1
  316. package/dist/store/postgres-holds.js +116 -101
  317. package/dist/store/postgres-policy-log.d.ts +14 -0
  318. package/dist/store/postgres-policy-log.js +240 -0
  319. package/dist/store/postgres-projects.d.ts +4 -0
  320. package/dist/store/postgres-projects.js +217 -0
  321. package/dist/store/postgres.d.ts +17 -1
  322. package/dist/store/postgres.js +60 -9
  323. package/dist/store/replay.d.ts +102 -1
  324. package/dist/store/replay.js +190 -19
  325. package/dist/store/reseed.d.ts +238 -0
  326. package/dist/store/reseed.js +308 -0
  327. package/dist/store/schema.d.ts +762 -2
  328. package/dist/store/schema.js +218 -5
  329. package/dist/store/source.d.ts +57 -1
  330. package/dist/store/source.js +65 -1
  331. package/dist/store/store.d.ts +29 -6
  332. package/dist/submit/resolve.d.ts +1 -1
  333. package/dist/submit/resolve.js +2 -1
  334. package/dist/telemetry/calibration.d.ts +25 -0
  335. package/dist/telemetry/calibration.js +27 -1
  336. package/dist/telemetry/event.d.ts +391 -33
  337. package/dist/telemetry/event.js +84 -20
  338. package/dist/telemetry/index.d.ts +2 -0
  339. package/dist/telemetry/index.js +2 -0
  340. package/dist/telemetry/journal.d.ts +104 -3
  341. package/dist/telemetry/journal.js +9 -0
  342. package/dist/telemetry/lookup.d.ts +27 -0
  343. package/dist/telemetry/lookup.js +18 -0
  344. package/dist/telemetry/memory.js +33 -1
  345. package/dist/telemetry/migrate.js +22 -1
  346. package/dist/telemetry/postgres.d.ts +10 -1
  347. package/dist/telemetry/postgres.js +188 -90
  348. package/dist/telemetry/remeasure.d.ts +78 -0
  349. package/dist/telemetry/remeasure.js +83 -0
  350. package/dist/telemetry/retention.d.ts +2 -2
  351. package/dist/telemetry/schema.d.ts +17 -0
  352. package/dist/telemetry/schema.js +27 -1
  353. package/dist/telemetry/sink.d.ts +2 -2
  354. package/dist/telemetry/window.d.ts +135 -0
  355. package/dist/telemetry/window.js +101 -0
  356. package/dist/testing/application-contract.d.ts +14 -0
  357. package/dist/testing/application-contract.js +270 -0
  358. package/dist/testing/audience-overlay-contract.d.ts +31 -0
  359. package/dist/testing/audience-overlay-contract.js +354 -0
  360. package/dist/testing/contracts.d.ts +13 -7
  361. package/dist/testing/contracts.js +13 -7
  362. package/dist/testing/definitions.d.ts +78 -0
  363. package/dist/testing/definitions.js +134 -9
  364. package/dist/testing/doubles.d.ts +103 -0
  365. package/dist/testing/doubles.js +143 -0
  366. package/dist/testing/index.d.ts +2 -2
  367. package/dist/testing/index.js +2 -2
  368. package/dist/testing/journal-contract.js +297 -6
  369. package/dist/testing/model-contract.d.ts +110 -0
  370. package/dist/testing/model-contract.js +150 -0
  371. package/dist/testing/policy-log-contract.d.ts +26 -0
  372. package/dist/testing/policy-log-contract.js +344 -0
  373. package/dist/testing/project-contract.d.ts +14 -0
  374. package/dist/testing/project-contract.js +266 -0
  375. package/dist/testing/reader-signal-contract.d.ts +27 -2
  376. package/dist/testing/reader-signal-contract.js +475 -5
  377. package/dist/testing/store-contract.d.ts +7 -1
  378. package/dist/testing/store-contract.js +84 -3
  379. package/dist/theme/apply.d.ts +20 -1
  380. package/dist/theme/apply.js +5 -3
  381. package/dist/theme/contrast.d.ts +19 -14
  382. package/dist/theme/contrast.js +181 -17
  383. package/dist/theme/derive.d.ts +22 -0
  384. package/dist/theme/derive.js +54 -1
  385. package/dist/theme/library.js +1 -1
  386. package/dist/theme/measure.d.ts +34 -0
  387. package/dist/theme/measure.js +30 -1
  388. package/dist/theme/palettes.js +7 -7
  389. package/dist/theme/ramp.d.ts +64 -0
  390. package/dist/theme/ramp.js +114 -0
  391. package/dist/theme/registry.d.ts +9 -0
  392. package/dist/theme/registry.js +11 -1
  393. package/dist/theme/separation.d.ts +97 -3
  394. package/dist/theme/separation.js +75 -0
  395. package/dist/tree/apply.js +13 -0
  396. package/dist/tree/compare.d.ts +9 -0
  397. package/dist/tree/compare.js +18 -0
  398. package/dist/tree/mutation.d.ts +18 -0
  399. package/dist/tree/mutation.js +24 -12
  400. package/dist/tree/navigation.d.ts +5 -0
  401. package/dist/tree/navigation.js +32 -10
  402. package/dist/tree/outline.d.ts +7 -0
  403. package/dist/tree/outline.js +9 -5
  404. package/dist/write/computed.d.ts +60 -0
  405. package/dist/write/computed.js +61 -0
  406. package/dist/write/held.d.ts +59 -0
  407. package/dist/write/index.d.ts +5 -2
  408. package/dist/write/index.js +5 -2
  409. package/dist/write/reseed.d.ts +151 -0
  410. package/dist/write/reseed.js +184 -0
  411. package/dist/write/revert.js +2 -16
  412. package/package.json +25 -3
  413. package/dist/runtime/inverse-interpreter.d.ts +0 -90
  414. package/dist/runtime/inverse-interpreter.js +0 -56
@@ -0,0 +1,265 @@
1
+ import { everyMemberOf } from "../closed-set.js";
2
+ import { pageActionOf } from "./action.js";
3
+ import { audienceScopeRead, comparedAudiencesOf, crossesAudiences, } from "./audiences.js";
4
+ import { ratioOf } from "./ratios.js";
5
+ /** The closed set, for a surface that has to account for every absent figure. */
6
+ export const ACTION_CHANGE_SILENCES = everyMemberOf()([
7
+ "different-trees",
8
+ "different-audiences",
9
+ "audiences-mixed",
10
+ "unwalked",
11
+ "nothing-measured",
12
+ "dissolved",
13
+ ]);
14
+ /** One line per silence, for a surface saying why a figure is not there. */
15
+ export const describeActionChangeSilence = (silence) => {
16
+ switch (silence) {
17
+ case "different-trees":
18
+ return "the two readings are of different pages";
19
+ case "different-audiences":
20
+ return "the two readings are of different audiences, and so of different readers";
21
+ case "audiences-mixed":
22
+ return "one window holds two forms of the page and says which readers neither";
23
+ case "unwalked":
24
+ return "one of the two windows does not report where actions happened, so its shares are noughts";
25
+ case "nothing-measured":
26
+ return "one of the two windows held no page views";
27
+ case "dissolved":
28
+ return "no part the two revisions share has anything to say on either side";
29
+ }
30
+ };
31
+ /** The closed set, for a surface accounting for every part it was handed. */
32
+ export const ACTION_MOVEMENTS = everyMemberOf()([
33
+ "taken-up",
34
+ "abandoned",
35
+ "still-untouched",
36
+ "held",
37
+ "unknown",
38
+ ]);
39
+ /** One line per movement, for a surface putting a part in front of a person. */
40
+ export const describeActionMovement = (movement) => {
41
+ switch (movement) {
42
+ case "taken-up":
43
+ return "readers reached this part and did nothing in it, and now they do something";
44
+ case "abandoned":
45
+ return "readers did something in this part, and now they reach it and do nothing";
46
+ case "still-untouched":
47
+ return "readers reached this part and did nothing in it, before and after";
48
+ case "held":
49
+ return "readers did something in this part, before and after";
50
+ case "unknown":
51
+ return "one of the two windows cannot say whether readers acted on this part";
52
+ }
53
+ };
54
+ /** The closed set, for a surface accounting for every compared part. */
55
+ export const INSIDE_MOVEMENTS = everyMemberOf()([
56
+ "kept",
57
+ "gained",
58
+ "lost",
59
+ "none",
60
+ ]);
61
+ /** One line per movement, for a surface saying what the change did to a part's shape. */
62
+ export const describeInsideMovement = (movement) => {
63
+ switch (movement) {
64
+ case "kept":
65
+ return "it held parts under it before and after, so its share means the same on both sides";
66
+ case "gained":
67
+ return "the change gave it parts under it, so it has a share where none could be measured";
68
+ case "lost":
69
+ return "the change left it with no parts under it, so its share is no longer measurable";
70
+ case "none":
71
+ return "it held no parts under it before or after, so neither window could measure a share";
72
+ }
73
+ };
74
+ const ZERO_BY_MOVEMENT = Object.freeze({
75
+ "taken-up": 0,
76
+ abandoned: 0,
77
+ "still-untouched": 0,
78
+ held: 0,
79
+ unknown: 0,
80
+ });
81
+ const ZERO_BY_INSIDE = Object.freeze({
82
+ kept: 0,
83
+ gained: 0,
84
+ lost: 0,
85
+ none: 0,
86
+ });
87
+ /**
88
+ * Whether a window reported anything at all about a part.
89
+ *
90
+ * `reached` is `undefined` exactly where no row named it (0242), which is the
91
+ * one thing that separates *nothing happened here* from *nothing was reported
92
+ * here* and is what keeps a page of spacers out of the movement counts.
93
+ */
94
+ const saysAnything = (part) => part.reached !== undefined;
95
+ /**
96
+ * What happened to a standing, where `unknown` on either side collapses the
97
+ * five combinations it appears in into one member.
98
+ */
99
+ const movementOf = (was, now) => {
100
+ if (was === "unknown" || now === "unknown")
101
+ return "unknown";
102
+ if (was === "acted")
103
+ return now === "acted" ? "held" : "abandoned";
104
+ return now === "acted" ? "taken-up" : "still-untouched";
105
+ };
106
+ /** What the change did to whether a share of a part is measurable. */
107
+ const insideOf = (was, now) => {
108
+ if (was && now)
109
+ return "kept";
110
+ if (now)
111
+ return "gained";
112
+ return was ? "lost" : "none";
113
+ };
114
+ /**
115
+ * One side's occurrences per reader, with a nought it withheld restored.
116
+ *
117
+ * `PartAction.usesPerReader` is withheld at `uses` of nought on purpose, and
118
+ * the reason is about one window: a nought there is the ordinary state of every
119
+ * heading on a page, and `uses` beside it already says so (0242). Across two
120
+ * windows that withholding is the wrong term: *readers used this twice each and
121
+ * do not touch it now* is a measurement on both sides, and handed an absence
122
+ * the ratio would call it unmeasured.
123
+ *
124
+ * So a side that reached readers and was used by none of them is a nought here,
125
+ * and a side with no readers to divide by stays absent. The field itself is
126
+ * published unaltered, because a card drawing one window has `uses` next to it
127
+ * and this one does not.
128
+ */
129
+ const intensityOf = (part) => part.usesPerReader ?? ((part.reached ?? 0) > 0 ? 0 : undefined);
130
+ /** Every part of a reading of what readers did, keyed by node. */
131
+ const partsOf = (page) => {
132
+ const byNode = new Map();
133
+ for (const part of page.parts)
134
+ byNode.set(part.nodeId, part);
135
+ return byNode;
136
+ };
137
+ /** The readers the later window credits a part with, which is the ranking key. */
138
+ const reachedNow = (part) => part.now.reached ?? 0;
139
+ /**
140
+ * The one more readers reached now, `>` keeping the first in the later reading
141
+ * order on a tie.
142
+ */
143
+ const moreOf = (standing, next) => standing === null || reachedNow(next) > reachedNow(standing) ? next : standing;
144
+ /** Descending by the readers the later window reached, strictly, so equals keep their order. */
145
+ const byReachedNow = (one, other) => reachedNow(other) - reachedNow(one);
146
+ /**
147
+ * Why a comparison answers nothing, in the order that reaches the sharpest
148
+ * diagnosis first.
149
+ *
150
+ * `unwalked` before `nothing-measured`: the two cannot ordinarily coincide, and
151
+ * where a malformed row makes them, *this window does not report where actions
152
+ * happened* is the thing worth printing.
153
+ */
154
+ /**
155
+ * Whether either side was read as neither of two forms.
156
+ *
157
+ * Taken off the two readings' own published scope rather than recomputed, which
158
+ * is what `audienceScopeRead` is for: five comparisons now ask this one question
159
+ * and a sixth spelling of it is how the rule comes to be agreed with by some of
160
+ * them (0293).
161
+ */
162
+ const unsplit = (was, now) => audienceScopeRead(was).reading === "mixed" || audienceScopeRead(now).reading === "mixed";
163
+ const silenceOf = (readings, compared, unsplitWindow) => {
164
+ if (unsplitWindow)
165
+ return "audiences-mixed";
166
+ if (readings.was.unwalked || readings.now.unwalked)
167
+ return "unwalked";
168
+ if (readings.was.views === 0 || readings.now.views === 0)
169
+ return "nothing-measured";
170
+ return compared.length === 0 ? "dissolved" : null;
171
+ };
172
+ /**
173
+ * What a change did to what readers do on a page, off two `PageReading`s and
174
+ * nothing else.
175
+ *
176
+ * Handed two readings rather than two finished `PageAction`s, for the reason
177
+ * `copyChangeOf` and `paceChangeOf` are: one input per side cannot be a
178
+ * mismatched pair, and the two readings it derives are returned so nothing
179
+ * downstream pays for them twice.
180
+ *
181
+ * The labels `was` and `now` are the caller's. Nothing here checks which reading
182
+ * is older, so a caller holding them backwards gets a comparison with every
183
+ * movement reversed rather than a refusal — the bargain 0224 struck, for its
184
+ * reason: *this week against last week* is the same question with the tree held
185
+ * still, and refusing one order would refuse that too.
186
+ */
187
+ export const actionChangeOf = (was, now) => {
188
+ const readings = { was: pageActionOf(was), now: pageActionOf(now) };
189
+ const head = {
190
+ treeId: was.treeId,
191
+ revisions: { was: was.revision, now: now.revision },
192
+ audiences: comparedAudiencesOf(was, now),
193
+ readings,
194
+ };
195
+ /** The two states in which neither half of the comparison stands. */
196
+ const refusing = (silence) => ({
197
+ ...head,
198
+ compared: [],
199
+ added: [],
200
+ removed: [],
201
+ movements: ZERO_BY_MOVEMENT,
202
+ insides: ZERO_BY_INSIDE,
203
+ whole: null,
204
+ mostTakenUp: null,
205
+ mostAbandoned: null,
206
+ stillUntouched: [],
207
+ silence,
208
+ });
209
+ if (was.treeId !== now.treeId)
210
+ return refusing("different-trees");
211
+ if (crossesAudiences(was, now))
212
+ return refusing("different-audiences");
213
+ const earlier = partsOf(readings.was);
214
+ const later = partsOf(readings.now);
215
+ const compared = [];
216
+ const added = [];
217
+ const removed = [];
218
+ for (const [nodeId, part] of later) {
219
+ const before = earlier.get(nodeId);
220
+ if (before === undefined) {
221
+ if (saysAnything(part))
222
+ added.push(part);
223
+ continue;
224
+ }
225
+ if (!saysAnything(before) && !saysAnything(part))
226
+ continue;
227
+ compared.push({
228
+ nodeId,
229
+ type: part.type,
230
+ role: part.role,
231
+ was: before,
232
+ now: part,
233
+ movement: movementOf(before.standing, part.standing),
234
+ inside: insideOf(before.bearsParts, part.bearsParts),
235
+ shareRatio: ratioOf(before.share, part.share),
236
+ usesRatio: ratioOf(intensityOf(before), intensityOf(part)),
237
+ });
238
+ }
239
+ for (const [nodeId, part] of earlier) {
240
+ if (later.has(nodeId))
241
+ continue;
242
+ if (saysAnything(part))
243
+ removed.push(part);
244
+ }
245
+ const movements = compared.reduce((counted, part) => ({ ...counted, [part.movement]: counted[part.movement] + 1 }), { ...ZERO_BY_MOVEMENT });
246
+ const insides = compared.reduce((counted, part) => ({ ...counted, [part.inside]: counted[part.inside] + 1 }), { ...ZERO_BY_INSIDE });
247
+ const whole = compared.find((part) => part.was.depth === 0 && part.now.depth === 0) ?? null;
248
+ const ranked = (movement) => compared.reduce((standing, next) => next.movement === movement && next !== whole ? moreOf(standing, next) : standing, null);
249
+ return {
250
+ ...head,
251
+ compared,
252
+ added,
253
+ removed,
254
+ movements,
255
+ insides,
256
+ whole,
257
+ mostTakenUp: ranked("taken-up"),
258
+ mostAbandoned: ranked("abandoned"),
259
+ stillUntouched: compared
260
+ .filter((part) => part.movement === "still-untouched" && part !== whole)
261
+ .sort(byReachedNow),
262
+ silence: silenceOf(readings, compared, unsplit(was, now)),
263
+ };
264
+ };
265
+ //# sourceMappingURL=action-change.js.map
@@ -0,0 +1,331 @@
1
+ import type { NodeId, TreeId } from "../ids.js";
2
+ import type { PrimitiveType } from "../primitive-type.js";
3
+ import type { PrimitiveRole } from "../role.js";
4
+ import type { PageReading } from "./parts.js";
5
+ /**
6
+ * What readers *did* on a page, rather than what they saw.
7
+ *
8
+ * Every reading in this subsystem so far is about attention. [`parts.ts`](parts.ts)
9
+ * answers which parts came into view, [`progress.ts`](progress.ts) where the
10
+ * reading stops, [`pace.ts`](pace.ts) whether there was time to take a part in,
11
+ * [`copy.ts`](copy.ts) how many of the page's words got reached. A tally has
12
+ * carried `engaged`, `activations`, `opens`, `closes` and `completions` since
13
+ * the counters existed, and **nothing interpreted any of them.** They were
14
+ * summed into a role row (0212) and otherwise sat there: a deployment could see
15
+ * that a band was read and had no way to ask whether anybody did anything in it.
16
+ *
17
+ * So this answers *four in ten readers who got to the pricing band did
18
+ * something in it, and nobody touched the one below it*. It is the tenth thing
19
+ * taken out of the server-side join rather than collected: **nothing is added
20
+ * to a payload, a browser, a column, a store or the vocabulary**, and the
21
+ * broadcaster is not touched. It is also the second thing here that tells a
22
+ * model something to act on rather than telling a person something true
23
+ * — where reading stops was the first (0221) — and *readers reach this band
24
+ * and touch nothing* is a
25
+ * sentence a proposal can be written from.
26
+ *
27
+ * ## The one rule everything else follows from
28
+ *
29
+ * **`engaged` is structurally zero on a part with no element children**, and a
30
+ * share built from it is therefore not a measurement of anything.
31
+ *
32
+ * A press is filed against the control, and `engaged` counts the views whose
33
+ * reader did something *strictly inside* a node (0167). A leaf has no inside.
34
+ * So a heading, a paragraph and a button alike report `engaged: 0` for ever —
35
+ * the button because the press is its own `activations`, the heading because
36
+ * there was never anything to press. Dividing that nought by `reached` would
37
+ * print *0% of readers acted here* against every text node on the page, which
38
+ * is a filing rule misread as a finding about readers (0167).
39
+ *
40
+ * {@link PartAction.share} is therefore **withheld on a leaf**, and
41
+ * {@link ActionStanding} `untouched` is said of nothing else. What a leaf
42
+ * reports instead is {@link PartAction.uses} — the occurrences filed against it
43
+ * — which is defined for every part and is a count of actions rather than of
44
+ * readers.
45
+ *
46
+ * ## The two numbers that must not be divided into each other
47
+ *
48
+ * `engaged` and `reached` are **distinct page view counts off one row**, so
49
+ * their ratio is sound for the reason a fall between two siblings is (0221): a
50
+ * reader who straddled a rollup window straddled it for the whole page, so the
51
+ * over-count the counts carry (0147) is very nearly common to the numerator and the
52
+ * denominator and divides out. *Four in ten readers did something here*
53
+ * survives an inflation that *four hundred readers* does not.
54
+ *
55
+ * `activations`, `opens`, `closes` and `completions` are **occurrences**. A
56
+ * reader who presses twice is two of them and one person, so they are not a
57
+ * count of readers and `uses ÷ reached` is not a rate: it is published as
58
+ * {@link PartAction.usesPerReader}, it may exceed 1, and it is named for what
59
+ * it is. A share of *readers who pressed this button* is not available from any
60
+ * counter the vocabulary has, and the only honest place to ask it is the band
61
+ * the button is inside.
62
+ *
63
+ * ## What it cannot tell apart, and whose that is
64
+ *
65
+ * A leaf readers reached with no uses against it is a button nobody pressed or
66
+ * a heading nobody could press, and nothing in the tree says which: `role`
67
+ * declares one member today and it is not *a control* (0238). That is the
68
+ * finding of 6 October, owned by `Loom primitives`, showing up in a second
69
+ * place — and it is why a leaf is `unknown` here rather than `untouched`.
70
+ *
71
+ * ## A window that credits nobody with being inside anything
72
+ *
73
+ * `engaged` is the one counter here the **ancestry walk** feeds: a press is
74
+ * filed against the control and credited to the addressed ancestors the signal
75
+ * carries (0167). A window whose delegated signals carry no `within` therefore
76
+ * reports occurrences and credits no reader with being inside anything — a
77
+ * sender with the walk off, a server synthesising batches, a fixture replayed.
78
+ * {@link PageAction.unwalked} is that state, and in it **every share on the
79
+ * page is a nought that is a filing artefact and every band reads
80
+ * `untouched`.**
81
+ *
82
+ * So the state is applied here and not only named (0304). Every share is
83
+ * withheld, nothing is `untouched`, and {@link PageAction.mostIgnored} is
84
+ * `null`. Everything the walk does not feed stands in full: `reached`, `uses`,
85
+ * the four counts, {@link PartAction.usesPerReader},
86
+ * {@link PartAction.shutAgain}, and the `acted` a part earns from uses filed
87
+ * against itself.
88
+ *
89
+ * **The rule lives here because this is where the fault is visible**, which is
90
+ * the direction 0282 says a rule should travel. Three readings are built on
91
+ * this one — the before-and-after, the two-form comparison and the library roll
92
+ * — and each of them would otherwise need its own copy of it, which is the
93
+ * fault this subsystem has been bitten by twice (0218, 0235).
94
+ *
95
+ * Pure, linear in the parts, and reaches no store, clock or DOM, so it adds
96
+ * nothing to the broadcaster's import graph.
97
+ */
98
+ /**
99
+ * What a window can say about whether readers acted on one part.
100
+ *
101
+ * Three members for the reason the part standings have three (0212): a
102
+ * two-valued reading has to call a part
103
+ * nobody could have acted on a part nobody acted on, and those are the two
104
+ * sentences a reader screen must never print over each other.
105
+ */
106
+ export type ActionStanding =
107
+ /** A row credits it with readers who acted inside it, or with uses of its own. */
108
+ "acted"
109
+ /**
110
+ * Readers reached it, it has an inside, and nothing happened in or on it.
111
+ *
112
+ * The only claim this module makes about an absence, and the sentence worth
113
+ * acting on.
114
+ */
115
+ | "untouched"
116
+ /**
117
+ * Nothing can be said.
118
+ *
119
+ * A part with no row at all, a part whose `reached` is 0 while the window held
120
+ * views — the unanchorable case (0221), where it reported something other than coming
121
+ * into view), or **a leaf**, whose nought is a filing rule rather than a
122
+ * measurement.
123
+ *
124
+ * And a part that bears an inside in an {@link PageAction.unwalked} window,
125
+ * where the nought the other three are told apart from is the ancestry
126
+ * missing rather than the readers idle (0304).
127
+ */
128
+ | "unknown";
129
+ export declare const ACTION_STANDINGS: readonly ActionStanding[];
130
+ export declare const describeActionStanding: (standing: ActionStanding) => string;
131
+ /** One element node of one revision, and what readers did with it. */
132
+ export type PartAction = {
133
+ readonly nodeId: NodeId;
134
+ readonly type: PrimitiveType;
135
+ /** What part it plays (0114), or `null` where its type declared none. */
136
+ readonly role: PrimitiveRole | null;
137
+ /** 0 at the root. */
138
+ readonly depth: number;
139
+ /** null at the root. */
140
+ readonly parentId: NodeId | null;
141
+ /**
142
+ * What this window can say about whether readers acted on this part.
143
+ *
144
+ * Per part, except for the one rule that is a property of the window: in an
145
+ * {@link PageAction.unwalked} window nothing is `untouched`, because the
146
+ * nought that member is read off is the ancestry missing (0304).
147
+ */
148
+ readonly standing: ActionStanding;
149
+ /**
150
+ * Whether any element part of this revision names it as a parent.
151
+ *
152
+ * The structural fact that decides whether a share is a measurement. Taken
153
+ * off the tree the reading was built from, so it is a property of the page
154
+ * and not of the window — a part with children keeps them in a window nobody
155
+ * read.
156
+ */
157
+ readonly bearsParts: boolean;
158
+ /** Distinct page views that reported it coming into view, or `undefined` where no row named it. */
159
+ readonly reached: number | undefined;
160
+ /**
161
+ * Distinct page views in which a reader used something strictly inside it
162
+ * (0167), or `undefined` where no row named it.
163
+ *
164
+ * `0` on a leaf is a filing rule and not a measurement; {@link share} is what
165
+ * is withheld on account of it, and this number is passed through unaltered
166
+ * because a caller looking at one part's row should see what the store holds.
167
+ */
168
+ readonly within: number | undefined;
169
+ /**
170
+ * `within ÷ reached`, in `[0, 1]`, or `undefined`.
171
+ *
172
+ * Withheld where the part bears no element parts, where no row named it, and
173
+ * where its `reached` is 0 — which are the three states the standing of
174
+ * `unknown` covers, so a withheld share and an unknown standing are the same
175
+ * fact said twice and never disagree.
176
+ *
177
+ * **And withheld on every part of an {@link PageAction.unwalked} window**,
178
+ * whatever its standing, because this is the one figure here built out of
179
+ * `engaged` and `engaged` is the one counter the ancestry walk feeds (0304).
180
+ * So an unknown standing still always means a withheld share, and in that one
181
+ * window a withheld share no longer means an unknown standing: a band with
182
+ * opens of its own is `acted` on evidence that needed no walk, and has no
183
+ * share all the same.
184
+ *
185
+ * Both terms are distinct view counts off the same row, which is why this is
186
+ * the figure on a card that can be trusted while the counts beside it are
187
+ * generous by the straddle, measured since the door counted openings
188
+ * (0147, 0219). It is deliberately
189
+ * **not** divided by the page views counted at the door: `opened` and
190
+ * `engaged` are written in different places and their ratio can honestly
191
+ * exceed 1, which is a refusal made once already (0221) and it still stands.
192
+ */
193
+ readonly share: number | undefined;
194
+ /**
195
+ * Presses, opens, closes and submissions filed against this part itself,
196
+ * added.
197
+ *
198
+ * **Occurrences, never readers.** Four counters go in because they are four
199
+ * ways of using a thing and a caller asking *was this used* wants one number;
200
+ * the four are on {@link PartAction.counts} apart for a caller that wants to
201
+ * tell a press from a dismissal. `0` where no row named it, because *nothing
202
+ * happened* and *nothing was reported* are told apart by the standing rather
203
+ * than by making every arithmetic consumer handle an absence.
204
+ */
205
+ readonly uses: number;
206
+ /** The four occurrence counters, kept apart. `0` each where no row named it. */
207
+ readonly counts: {
208
+ readonly activations: number;
209
+ readonly opens: number;
210
+ readonly closes: number;
211
+ readonly completions: number;
212
+ };
213
+ /**
214
+ * `uses ÷ reached`, or `undefined` where nothing was used or nobody reached
215
+ * it.
216
+ *
217
+ * **An intensity and not a rate.** It may exceed 1, and above 1 it says
218
+ * readers used this part more than once each rather than that more readers
219
+ * used it than reached it. Withheld at `uses` of 0 rather than published as a
220
+ * nought, because a nought here is the ordinary state of every heading on the
221
+ * page and {@link uses} already says it.
222
+ */
223
+ readonly usesPerReader: number | undefined;
224
+ /**
225
+ * `closes ÷ opens`, or `undefined` where nothing was opened.
226
+ *
227
+ * *Readers open this ask and shut it again nine times in ten* — two
228
+ * occurrence counts off one row, so the straddle divides out of it the way it
229
+ * does out of {@link share}.
230
+ *
231
+ * **Uncapped on purpose.** Above 1 means closes the page's own opens cannot
232
+ * account for, which is a disclosure a revision renders already open: the
233
+ * reader shuts something they never opened. Capping it would hide the one
234
+ * state it can diagnose, and a clause nothing can falsify is not a safeguard
235
+ * (0231).
236
+ */
237
+ readonly shutAgain: number | undefined;
238
+ };
239
+ export type PageAction = {
240
+ readonly treeId: TreeId;
241
+ readonly revision: number;
242
+ /**
243
+ * The page's view floor, carried through from the reading unchanged.
244
+ *
245
+ * Zero makes every standing `unknown`: nothing was measured, so nothing was
246
+ * left untouched.
247
+ */
248
+ readonly views: number;
249
+ /** Every element part of the revision, in reading order. */
250
+ readonly parts: readonly PartAction[];
251
+ readonly standings: Readonly<Record<ActionStanding, number>>;
252
+ /**
253
+ * The root, which is the one page-wide headcount this subsystem has.
254
+ *
255
+ * Every action anywhere on the page is strictly inside the root, and the root
256
+ * is an addressed node reached by every view that renders — so its `within` is
257
+ * **the distinct page views in which a reader did anything at all**, counted
258
+ * once, off one row. *Three in ten readers did something on this page* is one
259
+ * division and is the sentence a reader screen opens with.
260
+ *
261
+ * It is the only page-level total here and it is not an addition. Summing
262
+ * `within` across parts would charge one reader once per level of the tree
263
+ * they acted inside (0147, 0167), so there is no page total of readers who
264
+ * acted and this is what stands in for one.
265
+ *
266
+ * Kept out of {@link mostIgnored}, because the page contains every part it
267
+ * would outrank, which is how the pace reading treats it (0230) and for the
268
+ * same reason.
269
+ *
270
+ * `null` where the revision's root is not an element.
271
+ */
272
+ readonly whole: PartAction | null;
273
+ /**
274
+ * The part the most readers reached and did nothing in: most reached, then
275
+ * first in reading order.
276
+ *
277
+ * By headcount rather than by share (0221), which is the ranking rule spelled
278
+ * once: a band two readers out of three ignored is a worse ratio and a smaller
279
+ * problem than one four hundred of them did.
280
+ *
281
+ * `null` where nothing is `untouched`, which includes every
282
+ * {@link unwalked} window (0304): the page a sender does not walk reads as a
283
+ * page of ignored bands, and that is the sentence this field exists to make
284
+ * somebody act on.
285
+ */
286
+ readonly mostIgnored: PartAction | null;
287
+ /**
288
+ * Parts with no element parts under them, whose share is withheld for the
289
+ * structural reason.
290
+ *
291
+ * Published so a reading accounts for every part rather than leaving a caller
292
+ * to wonder where the shares went. What is withheld is still reported as a
293
+ * total (0214). On an ordinary page it is most of the page.
294
+ */
295
+ readonly leaves: number;
296
+ /**
297
+ * Whether the window holds uses and credits them to nobody.
298
+ *
299
+ * True where some part reports an occurrence and **no** part reports a reader
300
+ * inside it. A press is filed against the control and credited to its
301
+ * addressed ancestors from the ancestry the signal carries, so a batch whose
302
+ * delegated signals have no `within` adds occurrences and no `engaged` at all
303
+ * — a sender synthesising batches on a server, replaying a fixture, or with
304
+ * the walk turned off.
305
+ *
306
+ * It matters because the symptom would otherwise be *a page readers act on
307
+ * and nothing can say where*: every {@link PartAction.share} on the page a
308
+ * nought, every band reading `untouched`, and the counters looking healthy.
309
+ * §11's `unopened` diagnosis one counter across, and nothing else here would
310
+ * say so.
311
+ *
312
+ * **So it is not only reported, it is applied** (0304): in such a window
313
+ * every share is withheld and nothing is `untouched`, so
314
+ * {@link PageAction.mostIgnored} is `null` and the three comparisons built on
315
+ * this reading inherit the refusal rather than each spelling it. What stands
316
+ * is everything the walk does not feed — `reached`, `uses`, the four counts,
317
+ * {@link PartAction.usesPerReader}, {@link PartAction.shutAgain} and the
318
+ * `acted` a part earns from uses filed against itself.
319
+ */
320
+ readonly unwalked: boolean;
321
+ };
322
+ /**
323
+ * What readers did on one revision of one page, off the reading of
324
+ * [`parts.ts`](parts.ts) and nothing else.
325
+ *
326
+ * Takes the same `PageReading` every other reading here takes, so a caller that
327
+ * has built one has already paid for the join: no store read, no second walk of
328
+ * the tree, and the counters are the ones already in hand.
329
+ */
330
+ export declare const pageActionOf: (reading: PageReading) => PageAction;
331
+ //# sourceMappingURL=action.d.ts.map