@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.
- package/README.md +3 -1
- package/dist/application/application.d.ts +109 -0
- package/dist/application/application.js +97 -0
- package/dist/application/memory.d.ts +20 -0
- package/dist/application/memory.js +79 -0
- package/dist/application/store.d.ts +101 -0
- package/dist/application/store.js +25 -0
- package/dist/audience/audience.d.ts +36 -0
- package/dist/audience/audience.js +41 -0
- package/dist/cli/templates.js +19 -0
- package/dist/data/plan.js +0 -0
- package/dist/data/resolution.d.ts +23 -1
- package/dist/data/resolve.d.ts +30 -3
- package/dist/data/resolve.js +11 -3
- package/dist/ids.d.ts +10 -0
- package/dist/ids.js +11 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/patch.d.ts +54 -0
- package/dist/patch.js +44 -0
- package/dist/project/closing.d.ts +51 -0
- package/dist/project/closing.js +53 -0
- package/dist/project/memory.d.ts +20 -0
- package/dist/project/memory.js +97 -0
- package/dist/project/project.d.ts +90 -0
- package/dist/project/project.js +91 -0
- package/dist/project/store.d.ts +135 -0
- package/dist/project/store.js +41 -0
- package/dist/registered.d.ts +64 -0
- package/dist/registered.js +118 -0
- package/dist/render/behaviour-adjust.d.ts +11 -19
- package/dist/render/behaviour-adjust.js +75 -21
- package/dist/render/behaviour-present.d.ts +8 -0
- package/dist/render/behaviour-present.js +57 -6
- package/dist/render/behaviour.d.ts +98 -17
- package/dist/render/behaviour.js +91 -26
- package/dist/render/control-name.d.ts +68 -0
- package/dist/render/control-name.js +37 -0
- package/dist/render/diagnostics.d.ts +72 -0
- package/dist/render/diagnostics.js +7 -0
- package/dist/render/index.d.ts +2 -0
- package/dist/render/index.js +2 -0
- package/dist/render/reads.d.ts +11 -0
- package/dist/render/reads.js +12 -1
- package/dist/render/render.js +102 -7
- package/dist/render/slots.d.ts +52 -0
- package/dist/render/slots.js +24 -0
- package/dist/render/theme.d.ts +54 -1
- package/dist/render/theme.js +23 -1
- package/dist/render/unshown.d.ts +152 -0
- package/dist/render/unshown.js +80 -0
- package/dist/runtime/analysis.d.ts +94 -9
- package/dist/runtime/analysis.js +54 -9
- package/dist/runtime/assessment.d.ts +36 -2
- package/dist/runtime/assessment.js +27 -2
- package/dist/runtime/checks.d.ts +148 -0
- package/dist/runtime/checks.js +112 -0
- package/dist/runtime/disposition.d.ts +96 -0
- package/dist/runtime/disposition.js +46 -0
- package/dist/runtime/gate.js +22 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.js +3 -0
- package/dist/runtime/irreversibility.d.ts +64 -0
- package/dist/runtime/irreversibility.js +45 -0
- package/dist/runtime/pipeline.d.ts +43 -0
- package/dist/runtime/pipeline.js +10 -2
- package/dist/runtime/policy-change.d.ts +93 -0
- package/dist/runtime/policy-change.js +299 -0
- package/dist/runtime/policy-log.d.ts +406 -0
- package/dist/runtime/policy-log.js +285 -0
- package/dist/runtime/reversibility.d.ts +11 -9
- package/dist/runtime/stakes.d.ts +129 -1
- package/dist/runtime/stakes.js +240 -26
- package/dist/runtime/vocabulary.d.ts +164 -7
- package/dist/runtime/vocabulary.js +181 -8
- package/dist/sdk/audit.d.ts +174 -3
- package/dist/sdk/audit.js +176 -17
- package/dist/sdk/catalogue.d.ts +9 -1
- package/dist/sdk/conformance.d.ts +37 -3
- package/dist/sdk/conformance.js +25 -4
- package/dist/sdk/definition.d.ts +65 -0
- package/dist/sdk/definition.js +22 -0
- package/dist/sdk/registry.d.ts +29 -2
- package/dist/sdk/registry.js +63 -1
- package/dist/signals/action-change.d.ts +507 -0
- package/dist/signals/action-change.js +265 -0
- package/dist/signals/action.d.ts +331 -0
- package/dist/signals/action.js +182 -0
- package/dist/signals/applied-window.contract.d.ts +23 -0
- package/dist/signals/applied-window.contract.js +160 -0
- package/dist/signals/arriving.d.ts +210 -0
- package/dist/signals/arriving.js +133 -0
- package/dist/signals/audiences.d.ts +528 -0
- package/dist/signals/audiences.js +255 -0
- package/dist/signals/broadcast.d.ts +8 -2
- package/dist/signals/broadcast.js +58 -8
- package/dist/signals/change.d.ts +378 -0
- package/dist/signals/change.js +327 -0
- package/dist/signals/collect.d.ts +41 -0
- package/dist/signals/collect.js +88 -7
- package/dist/signals/copy-change.d.ts +553 -0
- package/dist/signals/copy-change.js +377 -0
- package/dist/signals/copy.d.ts +337 -0
- package/dist/signals/copy.js +211 -0
- package/dist/signals/counters.d.ts +46 -0
- package/dist/signals/counters.js +102 -0
- package/dist/signals/deliver.d.ts +23 -4
- package/dist/signals/deliver.js +34 -6
- package/dist/signals/deployment-change.d.ts +371 -0
- package/dist/signals/deployment-change.js +268 -0
- package/dist/signals/deployment.d.ts +265 -0
- package/dist/signals/deployment.js +152 -0
- package/dist/signals/door.d.ts +92 -0
- package/dist/signals/door.js +53 -0
- package/dist/signals/fold.d.ts +10 -0
- package/dist/signals/fold.js +5 -1
- package/dist/signals/form-action.d.ts +302 -0
- package/dist/signals/form-action.js +169 -0
- package/dist/signals/form-copy.d.ts +523 -0
- package/dist/signals/form-copy.js +346 -0
- package/dist/signals/forms.d.ts +247 -0
- package/dist/signals/forms.js +147 -0
- package/dist/signals/funnel-change.d.ts +548 -0
- package/dist/signals/funnel-change.js +361 -0
- package/dist/signals/funnel.d.ts +532 -0
- package/dist/signals/funnel.js +216 -0
- package/dist/signals/health.d.ts +497 -0
- package/dist/signals/health.js +361 -0
- package/dist/signals/index.d.ts +41 -0
- package/dist/signals/index.js +41 -0
- package/dist/signals/ingest.d.ts +56 -1
- package/dist/signals/ingest.js +91 -1
- package/dist/signals/journal.d.ts +11 -0
- package/dist/signals/kinds.d.ts +8 -6
- package/dist/signals/kinds.js +14 -6
- package/dist/signals/library-action.d.ts +430 -0
- package/dist/signals/library-action.js +336 -0
- package/dist/signals/library-change.d.ts +477 -0
- package/dist/signals/library-change.js +335 -0
- package/dist/signals/library-copy-change.d.ts +498 -0
- package/dist/signals/library-copy-change.js +476 -0
- package/dist/signals/library-pace.d.ts +319 -0
- package/dist/signals/library-pace.js +305 -0
- package/dist/signals/library-reach-change.d.ts +636 -0
- package/dist/signals/library-reach-change.js +534 -0
- package/dist/signals/library-reach.d.ts +377 -0
- package/dist/signals/library-reach.js +227 -0
- package/dist/signals/library-word-reach-change.d.ts +567 -0
- package/dist/signals/library-word-reach-change.js +568 -0
- package/dist/signals/library.d.ts +306 -0
- package/dist/signals/library.js +178 -0
- package/dist/signals/memory.d.ts +9 -0
- package/dist/signals/memory.js +105 -14
- package/dist/signals/migrate.d.ts +17 -2
- package/dist/signals/migrate.js +122 -5
- package/dist/signals/notice.d.ts +334 -0
- package/dist/signals/notice.js +228 -0
- package/dist/signals/pace-change.d.ts +501 -0
- package/dist/signals/pace-change.js +310 -0
- package/dist/signals/pace.d.ts +296 -0
- package/dist/signals/pace.js +291 -0
- package/dist/signals/page-views.d.ts +365 -0
- package/dist/signals/page-views.js +218 -0
- package/dist/signals/parts.d.ts +344 -0
- package/dist/signals/parts.js +273 -0
- package/dist/signals/postgres.d.ts +16 -2
- package/dist/signals/postgres.js +390 -87
- package/dist/signals/progress.d.ts +212 -0
- package/dist/signals/progress.js +150 -0
- package/dist/signals/ratios.d.ts +108 -0
- package/dist/signals/ratios.js +40 -0
- package/dist/signals/reach.d.ts +309 -0
- package/dist/signals/reach.js +93 -0
- package/dist/signals/readable.d.ts +34 -0
- package/dist/signals/readable.js +34 -0
- package/dist/signals/readership.d.ts +381 -0
- package/dist/signals/readership.js +308 -0
- package/dist/signals/region-pages.d.ts +173 -0
- package/dist/signals/region-pages.js +62 -0
- package/dist/signals/region.d.ts +287 -0
- package/dist/signals/region.js +198 -0
- package/dist/signals/retention.d.ts +141 -0
- package/dist/signals/retention.js +58 -0
- package/dist/signals/rollup.d.ts +67 -3
- package/dist/signals/rollup.js +0 -0
- package/dist/signals/schema.d.ts +432 -1
- package/dist/signals/schema.js +157 -3
- package/dist/signals/signal.d.ts +237 -11
- package/dist/signals/signal.js +70 -10
- package/dist/signals/silence-census.d.ts +205 -0
- package/dist/signals/silence-census.js +87 -0
- package/dist/signals/silences.d.ts +848 -0
- package/dist/signals/silences.js +753 -0
- package/dist/signals/tally.d.ts +140 -11
- package/dist/signals/window-figures.d.ts +148 -0
- package/dist/signals/window-figures.js +42 -0
- package/dist/signals/window.d.ts +866 -0
- package/dist/signals/window.js +693 -0
- package/dist/signals/words.d.ts +24 -0
- package/dist/signals/words.js +24 -0
- package/dist/store/index.d.ts +19 -0
- package/dist/store/index.js +19 -0
- package/dist/store/memory.d.ts +2 -1
- package/dist/store/memory.js +48 -12
- package/dist/store/migrate.d.ts +80 -0
- package/dist/store/migrate.js +259 -7
- package/dist/store/postgres-applications.d.ts +4 -0
- package/dist/store/postgres-applications.js +197 -0
- package/dist/store/postgres-holds.d.ts +10 -1
- package/dist/store/postgres-holds.js +116 -101
- package/dist/store/postgres-policy-log.d.ts +14 -0
- package/dist/store/postgres-policy-log.js +240 -0
- package/dist/store/postgres-projects.d.ts +4 -0
- package/dist/store/postgres-projects.js +217 -0
- package/dist/store/postgres.d.ts +16 -1
- package/dist/store/postgres.js +59 -9
- package/dist/store/replay.d.ts +102 -1
- package/dist/store/replay.js +190 -19
- package/dist/store/reseed.d.ts +238 -0
- package/dist/store/reseed.js +308 -0
- package/dist/store/schema.d.ts +450 -2
- package/dist/store/schema.js +141 -5
- package/dist/store/store.d.ts +29 -6
- package/dist/submit/resolve.js +2 -1
- package/dist/telemetry/calibration.d.ts +25 -0
- package/dist/telemetry/calibration.js +27 -1
- package/dist/telemetry/event.d.ts +391 -33
- package/dist/telemetry/event.js +84 -20
- package/dist/telemetry/index.d.ts +1 -0
- package/dist/telemetry/index.js +1 -0
- package/dist/telemetry/journal.d.ts +72 -3
- package/dist/telemetry/journal.js +9 -0
- package/dist/telemetry/lookup.d.ts +27 -0
- package/dist/telemetry/lookup.js +18 -0
- package/dist/telemetry/memory.js +23 -0
- package/dist/telemetry/migrate.js +22 -1
- package/dist/telemetry/postgres.d.ts +10 -1
- package/dist/telemetry/postgres.js +172 -90
- package/dist/telemetry/remeasure.d.ts +78 -0
- package/dist/telemetry/remeasure.js +83 -0
- package/dist/telemetry/retention.d.ts +2 -2
- package/dist/telemetry/schema.d.ts +17 -0
- package/dist/telemetry/schema.js +27 -1
- package/dist/telemetry/sink.d.ts +2 -2
- package/dist/testing/application-contract.d.ts +14 -0
- package/dist/testing/application-contract.js +270 -0
- package/dist/testing/contracts.d.ts +12 -7
- package/dist/testing/contracts.js +12 -7
- package/dist/testing/definitions.d.ts +78 -0
- package/dist/testing/definitions.js +134 -9
- package/dist/testing/doubles.d.ts +103 -0
- package/dist/testing/doubles.js +143 -0
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +2 -2
- package/dist/testing/journal-contract.js +140 -2
- package/dist/testing/model-contract.d.ts +110 -0
- package/dist/testing/model-contract.js +150 -0
- package/dist/testing/policy-log-contract.d.ts +26 -0
- package/dist/testing/policy-log-contract.js +344 -0
- package/dist/testing/project-contract.d.ts +14 -0
- package/dist/testing/project-contract.js +266 -0
- package/dist/testing/reader-signal-contract.d.ts +27 -2
- package/dist/testing/reader-signal-contract.js +475 -5
- package/dist/testing/store-contract.d.ts +7 -1
- package/dist/testing/store-contract.js +84 -3
- package/dist/theme/apply.d.ts +20 -1
- package/dist/theme/apply.js +5 -3
- package/dist/theme/derive.d.ts +22 -0
- package/dist/theme/derive.js +54 -1
- package/dist/theme/library.js +1 -1
- package/dist/theme/measure.d.ts +34 -0
- package/dist/theme/measure.js +30 -1
- package/dist/theme/palettes.js +7 -7
- package/dist/theme/ramp.d.ts +64 -0
- package/dist/theme/ramp.js +114 -0
- package/dist/theme/registry.d.ts +9 -0
- package/dist/theme/registry.js +11 -1
- package/dist/theme/separation.d.ts +97 -3
- package/dist/theme/separation.js +75 -0
- package/dist/tree/compare.d.ts +9 -0
- package/dist/tree/compare.js +18 -0
- package/dist/write/computed.d.ts +60 -0
- package/dist/write/computed.js +61 -0
- package/dist/write/held.d.ts +59 -0
- package/dist/write/index.d.ts +5 -2
- package/dist/write/index.js +5 -2
- package/dist/write/reseed.d.ts +151 -0
- package/dist/write/reseed.js +184 -0
- package/dist/write/revert.js +2 -16
- package/package.json +98 -19
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
import type { PrimitiveType } from "../primitive-type.js";
|
|
2
|
+
import { type PrimitiveRole } from "../role.js";
|
|
3
|
+
import { type ComparedPopulations, type PageForm } from "./audiences.js";
|
|
4
|
+
import { type KindKey } from "./library.js";
|
|
5
|
+
import type { PageReading } from "./parts.js";
|
|
6
|
+
/**
|
|
7
|
+
* What a change did to the words a kind of part says, everywhere it stands.
|
|
8
|
+
*
|
|
9
|
+
* A comparison of two windows of one library answers *the band you rewrote was
|
|
10
|
+
* read in three of its nine places and is read in seven now*
|
|
11
|
+
* ([`library-change.ts`](library-change.ts)), and is explicit about the one
|
|
12
|
+
* thing it refuses: words. A paired placement is paired by **node**, so the
|
|
13
|
+
* page's revision may have moved underneath it — the two sides' words are then
|
|
14
|
+
* two different sentences and a share of one against a share of the other is
|
|
15
|
+
* not a before and an after.
|
|
16
|
+
*
|
|
17
|
+
* This is the other half, and it is the sentence closest to what an author
|
|
18
|
+
* changing copy inside a primitive actually did: *you rewrote the testimonial
|
|
19
|
+
* band and readers now reach two thirds of the words it kept.* The method is
|
|
20
|
+
* the one a change to one page is already read by (0239), taken per placement
|
|
21
|
+
* and then added across the placements of one kind: **the carried words**, the
|
|
22
|
+
* words both revisions say word for word, with what the change wrote counted
|
|
23
|
+
* beside them rather than inside them.
|
|
24
|
+
*
|
|
25
|
+
* It is the **eighteenth** thing taken out of what this subsystem already knows
|
|
26
|
+
* rather than collected: nothing is added to a payload, a browser, a column, a
|
|
27
|
+
* store or the vocabulary of kinds, and the broadcaster is not touched. What
|
|
28
|
+
* decides the shape below is
|
|
29
|
+
* [0270](../../decisions/0270-a-change-to-the-words-a-kind-of-part-says-is-read-over-the-words-both-windows-say-and-a-floor-costs-the-signed-figure.md).
|
|
30
|
+
*
|
|
31
|
+
* ## Why the words are the sounder denominator and not the harder one
|
|
32
|
+
*
|
|
33
|
+
* Every comparison here has to answer what its denominator moved with. A count
|
|
34
|
+
* of readers moves with the straddle (0147) and with the window's traffic; a
|
|
35
|
+
* count of **places** is held still by pairing them, which is what lets a
|
|
36
|
+
* change to a library be published as places changing hands (0266). A count of
|
|
37
|
+
* **words** is held still by something stronger than pairing: the carried words
|
|
38
|
+
* are *the same words on both sides*, so the denominator is not merely the same
|
|
39
|
+
* size in both terms — it is the same text, and the subtraction is over it.
|
|
40
|
+
*
|
|
41
|
+
* That buys the one thing no other reading of a library has. A figure added
|
|
42
|
+
* across kinds is refused in all four of them (0257), because a figure over
|
|
43
|
+
* every kind at once counts a page once per element node and so measures how
|
|
44
|
+
* finely the pages were written. **Words do not do that**: a part's own words
|
|
45
|
+
* partition the page exactly once (0212, 0235), so the rows here add, and the
|
|
46
|
+
* whole-library figure is the type rows added up rather than a second
|
|
47
|
+
* computation that could disagree with them.
|
|
48
|
+
*
|
|
49
|
+
* ## What it is confounded by, said before the figure is read
|
|
50
|
+
*
|
|
51
|
+
* A passage counts as read where **at least one** reader reached the part
|
|
52
|
+
* saying it (0212, 0235), so a quiet window leaves more words unread with
|
|
53
|
+
* nobody behaving differently. That is 0266's confound at another unit and it
|
|
54
|
+
* is handled the same way: the two windows' page views travel on the reading as
|
|
55
|
+
* {@link LibraryCopyChange.viewsWas} and {@link LibraryCopyChange.viewsNow},
|
|
56
|
+
* they are floors rather than counts, and nothing is scaled by them. A floor on
|
|
57
|
+
* a window's views is not a correction, and a threshold on how much traffic
|
|
58
|
+
* counts as comparable would be a threshold on a deployment's own schedule.
|
|
59
|
+
*
|
|
60
|
+
* The reader-weighted figure — *of the readers who met it, the share that
|
|
61
|
+
* reached its words* — needs the door on both sides and is a weighted mean
|
|
62
|
+
* whose weights move when traffic does. It is 0256's refusal in a third place
|
|
63
|
+
* and it is filed rather than shipped with a caveat.
|
|
64
|
+
*
|
|
65
|
+
* ## The one figure a floor can lie about, and it is the only one withheld
|
|
66
|
+
*
|
|
67
|
+
* A type that declares no `copy` leaves a passage short of words nothing here
|
|
68
|
+
* can see (0122), and 0239 drew the line exactly where it has to be drawn: a
|
|
69
|
+
* single passage's movement survives a floor, and a **signed sum** over
|
|
70
|
+
* passages does not. The sum here is `tookUp − fellAway`, and a floored
|
|
71
|
+
* passage that gained reading beside an exact one that lost it can carry the
|
|
72
|
+
* wrong sign — a hundred true words counted as ten against fifty counted as
|
|
73
|
+
* fifty is an improvement published as a regression.
|
|
74
|
+
*
|
|
75
|
+
* So the signed figure is withheld where any carried word of the row is a
|
|
76
|
+
* floor, with `floored` as the reason, and every unsigned figure stays: the two
|
|
77
|
+
* shares are each short in numerator and denominator together and say so, as a
|
|
78
|
+
* copy reading's own share does under the same floor. **The places answer is
|
|
79
|
+
* not withheld anywhere** — a placement that took up its reading is exact
|
|
80
|
+
* whatever its words are, and that reading is `library-change.ts`'s.
|
|
81
|
+
*
|
|
82
|
+
* ## What is counted beside the carried words rather than inside them
|
|
83
|
+
*
|
|
84
|
+
* **The rewriting.** A placement both windows bear whose text changed is in
|
|
85
|
+
* {@link KindCopyChange.rewritten} and in no share. It is the half of the
|
|
86
|
+
* answer an author most needs beside the other half: a band whose words are
|
|
87
|
+
* nine tenths rewritten has a carried share about the tenth it kept, and a
|
|
88
|
+
* surface that drew the share without the rewriting would be reporting a
|
|
89
|
+
* sentence about a tenth of a component as a sentence about the component.
|
|
90
|
+
*
|
|
91
|
+
* **The places that changed hands.** Words of placements only one window bears
|
|
92
|
+
* are in {@link KindCopyChange.wordsGained} and
|
|
93
|
+
* {@link KindCopyChange.wordsLost}, each with the mass of them that was read on
|
|
94
|
+
* the side that had them — *you took two hundred words away and nobody had
|
|
95
|
+
* reached a hundred and eighty of them* is a change that was right, and the
|
|
96
|
+
* opposite reading of the same row is the one worth stopping for.
|
|
97
|
+
*
|
|
98
|
+
* A node whose type changed is a place one kind left and another took (0266),
|
|
99
|
+
* so its words are lost by the old type and gained by the new, and
|
|
100
|
+
* {@link LibraryCopyChange.recast} is the size of that. The role rows hold such
|
|
101
|
+
* a node still wherever the two types play the same part, which is why the role
|
|
102
|
+
* rows can carry words the type rows report as having changed hands, and why
|
|
103
|
+
* the whole-library figure follows the **types**: a type is the thing an author
|
|
104
|
+
* replaces.
|
|
105
|
+
*
|
|
106
|
+
* Pure. It reaches no store, no clock and no DOM, it is linear in the parts of
|
|
107
|
+
* the readings handed to it, and nothing in it survives into a browser bundle.
|
|
108
|
+
*/
|
|
109
|
+
/** Why a kind of part has no before and after of its words. */
|
|
110
|
+
export type KindCopyChangeSilence =
|
|
111
|
+
/**
|
|
112
|
+
* Nothing in the pages read, in either window, is of this kind.
|
|
113
|
+
*
|
|
114
|
+
* Only ever a role row, and the reason a role row exists for every member of
|
|
115
|
+
* the vocabulary: *nothing in this library is a heading* is a fact about the
|
|
116
|
+
* library rather than a missing row.
|
|
117
|
+
*/
|
|
118
|
+
"unplaced"
|
|
119
|
+
/**
|
|
120
|
+
* It stands in both windows and no place of it kept a word.
|
|
121
|
+
*
|
|
122
|
+
* Every placement was gained, lost, recast, or rewritten end to end. There is
|
|
123
|
+
* no text held still, so there is nothing to read a change in — and that is
|
|
124
|
+
* an answer about the **library** rather than about its readers, which
|
|
125
|
+
* {@link KindCopyChange.rewritten}, `gained` and `lost` are the size of.
|
|
126
|
+
*
|
|
127
|
+
* A kind whose every word was rewritten is in this state, which is the
|
|
128
|
+
* commonest way to reach it and the one worth naming: a change that left no
|
|
129
|
+
* sentence standing cannot be read against the sentences it left standing.
|
|
130
|
+
*/
|
|
131
|
+
| "unpaired"
|
|
132
|
+
/**
|
|
133
|
+
* The places it keeps say nothing that could have been read.
|
|
134
|
+
*
|
|
135
|
+
* A placement is kept where it says something on one side or hides something
|
|
136
|
+
* on one side (0122), so a row can hold places whose visible words are none:
|
|
137
|
+
* a part whose type declares no `copy` says nothing this reading can see and
|
|
138
|
+
* may say a great deal. There is no denominator, and the floor is why.
|
|
139
|
+
*/
|
|
140
|
+
| "wordless"
|
|
141
|
+
/**
|
|
142
|
+
* It keeps words and none of them can be spoken for on both sides.
|
|
143
|
+
*
|
|
144
|
+
* Every carried word is in a window that measured nothing of its page, or in
|
|
145
|
+
* a part that reported something other than coming into view — so `skipped`
|
|
146
|
+
* would be a claim nobody made (0212). The words are still counted; what is
|
|
147
|
+
* withheld is the comparison.
|
|
148
|
+
*/
|
|
149
|
+
| "unread"
|
|
150
|
+
/**
|
|
151
|
+
* Some of its carried words are a floor, so the signed movement could have
|
|
152
|
+
* the wrong sign.
|
|
153
|
+
*
|
|
154
|
+
* The two shares survive this and the subtraction does not, which is the line
|
|
155
|
+
* a change to one page's words is already read along (0239). The places
|
|
156
|
+
* version of this comparison is unaffected and is the one to read instead
|
|
157
|
+
* (0266).
|
|
158
|
+
*/
|
|
159
|
+
| "floored";
|
|
160
|
+
export declare const KIND_COPY_CHANGE_SILENCES: readonly KindCopyChangeSilence[];
|
|
161
|
+
/** One line per silence, for a surface saying why a kind has no before and after. */
|
|
162
|
+
export declare const describeKindCopyChangeSilence: (silence: KindCopyChangeSilence) => string;
|
|
163
|
+
/**
|
|
164
|
+
* What happened to the reading of the words a kind of part kept.
|
|
165
|
+
*
|
|
166
|
+
* The verdict is the sign of `tookUp − fellAway`, which is a subtraction over
|
|
167
|
+
* one set of words rather than over two shares — the carried words are the same
|
|
168
|
+
* text on both sides, so nothing in the denominator moved and no threshold
|
|
169
|
+
* decides anything.
|
|
170
|
+
*/
|
|
171
|
+
export type KindWordMovement =
|
|
172
|
+
/** More of the words it kept are read now than were. */
|
|
173
|
+
"taken-up"
|
|
174
|
+
/** Fewer are. */
|
|
175
|
+
| "abandoned"
|
|
176
|
+
/**
|
|
177
|
+
* As many are, which includes words trading places: a passage taken up and
|
|
178
|
+
* another of the same length fallen away is `held`, and both masses are
|
|
179
|
+
* published so a surface can say so.
|
|
180
|
+
*/
|
|
181
|
+
| "held"
|
|
182
|
+
/**
|
|
183
|
+
* No word it kept was read in either window.
|
|
184
|
+
*
|
|
185
|
+
* Kept apart from `held` for the reason a comparison of places keeps it
|
|
186
|
+
* apart (0266): *unread everywhere, and still unread everywhere* is the one
|
|
187
|
+
* state here that is an instruction. There is deliberately no sibling for
|
|
188
|
+
* *read everywhere and still read everywhere* — that is `held` at a share of
|
|
189
|
+
* one, and it asks nobody to do anything.
|
|
190
|
+
*/
|
|
191
|
+
| "still-unread"
|
|
192
|
+
/** {@link KindCopyChange.silence} says why nothing can be said. */
|
|
193
|
+
| "unknown";
|
|
194
|
+
export declare const KIND_WORD_MOVEMENTS: readonly KindWordMovement[];
|
|
195
|
+
/** One line per movement, for a surface putting a kind's words in front of a person. */
|
|
196
|
+
export declare const describeKindWordMovement: (movement: KindWordMovement) => string;
|
|
197
|
+
/**
|
|
198
|
+
* The words two windows say identically, and what happened to the reading of
|
|
199
|
+
* them.
|
|
200
|
+
*
|
|
201
|
+
* One shape at two scales — a kind of part, and the whole library — because the
|
|
202
|
+
* whole library is the type rows added up. That identity is the thing words buy
|
|
203
|
+
* and places cannot: a part's own words partition its page exactly once (0212,
|
|
204
|
+
* 0235), so adding the rows counts no word twice, where adding a count of
|
|
205
|
+
* places counts a page once per part of it (0257).
|
|
206
|
+
*/
|
|
207
|
+
export type CarriedWords = {
|
|
208
|
+
/**
|
|
209
|
+
* Words both windows say, word for word, in the places both windows bear.
|
|
210
|
+
*
|
|
211
|
+
* The universe every figure below is about. A floor where
|
|
212
|
+
* {@link floored} is anything but nought: the words are there and there may
|
|
213
|
+
* be more (0122).
|
|
214
|
+
*/
|
|
215
|
+
readonly carried: number;
|
|
216
|
+
/**
|
|
217
|
+
* Of {@link carried}, the words with a verdict on **both** sides, which is
|
|
218
|
+
* the denominator of both shares.
|
|
219
|
+
*
|
|
220
|
+
* One number and not two, which is the whole of why the two shares are
|
|
221
|
+
* comparable: a word nothing can be said about in either window is in neither
|
|
222
|
+
* term, so the two sides are read over exactly the same text.
|
|
223
|
+
*/
|
|
224
|
+
readonly comparable: number;
|
|
225
|
+
/**
|
|
226
|
+
* Carried words one window or the other cannot be spoken for.
|
|
227
|
+
*
|
|
228
|
+
* A window that measured nothing of their page, or a part that reported
|
|
229
|
+
* something other than coming into view. Counted and never read as unread,
|
|
230
|
+
* which is the one direction a reading of a quiet window must not be wrong in
|
|
231
|
+
* (0212).
|
|
232
|
+
*/
|
|
233
|
+
readonly unspoken: number;
|
|
234
|
+
/** Comparable words read in both windows. */
|
|
235
|
+
readonly keptRead: number;
|
|
236
|
+
/** Comparable words read in neither — the words a change did not fix. */
|
|
237
|
+
readonly keptSkipped: number;
|
|
238
|
+
/** Comparable words nobody reached before and somebody reaches now. */
|
|
239
|
+
readonly tookUp: number;
|
|
240
|
+
/** Comparable words somebody reached before and nobody reaches now. */
|
|
241
|
+
readonly fellAway: number;
|
|
242
|
+
/**
|
|
243
|
+
* The share of {@link comparable} words that was read in the earlier window;
|
|
244
|
+
* `null` where there are none.
|
|
245
|
+
*
|
|
246
|
+
* *At least one reader reached the part saying them*, which is what read
|
|
247
|
+
* means here and not what a person reads the word as (0235). Short in both
|
|
248
|
+
* terms together under a floor, as a copy reading's own share is, and
|
|
249
|
+
* {@link floored} is the size of that.
|
|
250
|
+
*/
|
|
251
|
+
readonly readShareWas: number | null;
|
|
252
|
+
/** The same share in the later window, over the same words. */
|
|
253
|
+
readonly readShareNow: number | null;
|
|
254
|
+
/**
|
|
255
|
+
* `tookUp − fellAway`: the words that changed hands, signed. `null` where a
|
|
256
|
+
* floor could have given it the wrong sign.
|
|
257
|
+
*
|
|
258
|
+
* It is exactly the movement in the two shares, since they have one
|
|
259
|
+
* denominator by construction — taken from the two masses so that no division
|
|
260
|
+
* is in a verdict.
|
|
261
|
+
*/
|
|
262
|
+
readonly change: number | null;
|
|
263
|
+
/**
|
|
264
|
+
* Carried words that are a floor, because the type of the part saying them
|
|
265
|
+
* declares no `copy` (0122).
|
|
266
|
+
*
|
|
267
|
+
* The direction the figures above are wrong in, handed over rather than
|
|
268
|
+
* summarised, as a copy reading hands over its own floored passages.
|
|
269
|
+
*/
|
|
270
|
+
readonly floored: number;
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* One kind of part's words, held against themselves across two windows.
|
|
274
|
+
*
|
|
275
|
+
* The same shape for a type row and a role row, because they are one comparison
|
|
276
|
+
* asked of two keys — and the two give different answers about a node whose type
|
|
277
|
+
* changed, which is the point of asking both. See the module documentation.
|
|
278
|
+
*/
|
|
279
|
+
export type KindCopyChange = {
|
|
280
|
+
readonly kind: KindKey;
|
|
281
|
+
/**
|
|
282
|
+
* What part a type plays (0114), or `null`. Always `null` on a role row,
|
|
283
|
+
* which carries it as its key.
|
|
284
|
+
*
|
|
285
|
+
* The later window's answer where it stands there, so that a surface reading
|
|
286
|
+
* a row and the role beside it is reading today's library.
|
|
287
|
+
*/
|
|
288
|
+
readonly role: PrimitiveRole | null;
|
|
289
|
+
/** Places of this kind, in both windows, that say the same words in both. */
|
|
290
|
+
readonly placements: number;
|
|
291
|
+
/**
|
|
292
|
+
* Places of it in both windows whose words the change rewrote.
|
|
293
|
+
*
|
|
294
|
+
* In no share and in no word total above: two word counts cannot be a before
|
|
295
|
+
* and an after of one text. Published because it is the measure of how much
|
|
296
|
+
* of this kind the carried share is actually about.
|
|
297
|
+
*/
|
|
298
|
+
readonly rewritten: number;
|
|
299
|
+
/** The words of those places, which is two numbers for the reason there are two texts. */
|
|
300
|
+
readonly rewrittenWords: {
|
|
301
|
+
readonly was: number;
|
|
302
|
+
readonly now: number;
|
|
303
|
+
};
|
|
304
|
+
/** Places of it the later window bears and the earlier did not. */
|
|
305
|
+
readonly gained: number;
|
|
306
|
+
/** Places of it the earlier window bore and the later does not. */
|
|
307
|
+
readonly lost: number;
|
|
308
|
+
/** Words of the places it gained, as the later window says them. */
|
|
309
|
+
readonly wordsGained: number;
|
|
310
|
+
/**
|
|
311
|
+
* Of {@link wordsGained}, the words read in the window that has them.
|
|
312
|
+
*
|
|
313
|
+
* *Of the three hundred words this change put here, forty have been reached*
|
|
314
|
+
* — the one figure in this reading with no before, because the words did not
|
|
315
|
+
* exist to be read.
|
|
316
|
+
*/
|
|
317
|
+
readonly wordsGainedRead: number;
|
|
318
|
+
/** Words of the places it lost, as the earlier window said them. */
|
|
319
|
+
readonly wordsLost: number;
|
|
320
|
+
/** Of {@link wordsLost}, the words that had been read in the window that had them. */
|
|
321
|
+
readonly wordsLostRead: number;
|
|
322
|
+
/** Places it keeps whose words are a floor, which the row's own words count. */
|
|
323
|
+
readonly flooredPlacements: number;
|
|
324
|
+
/** The carried words and what happened to the reading of them. */
|
|
325
|
+
readonly words: CarriedWords;
|
|
326
|
+
readonly movement: KindWordMovement;
|
|
327
|
+
/**
|
|
328
|
+
* Why there is no verdict, and `null` where there is one.
|
|
329
|
+
*
|
|
330
|
+
* About the comparison and not about the row: every count above is a count of
|
|
331
|
+
* parts of trees and of the words they say, and those are true whatever any
|
|
332
|
+
* window measured — which is how a census publishes a standing beside a
|
|
333
|
+
* withheld share (0212).
|
|
334
|
+
*/
|
|
335
|
+
readonly silence: KindCopyChangeSilence | null;
|
|
336
|
+
};
|
|
337
|
+
/** What a change did to the words of a deployment's library, by kind of part. */
|
|
338
|
+
export type LibraryCopyChange = {
|
|
339
|
+
/**
|
|
340
|
+
* Every type that stands in either window, most words fallen away first.
|
|
341
|
+
*
|
|
342
|
+
* Then the lower read share in the later window, then by type, so two kinds
|
|
343
|
+
* that lost the same words do not reorder on a refresh.
|
|
344
|
+
*/
|
|
345
|
+
readonly byType: readonly KindCopyChange[];
|
|
346
|
+
/**
|
|
347
|
+
* Every role in the vocabulary that stands in either window, then the row for
|
|
348
|
+
* parts whose type declared none, in the same order as {@link byType}.
|
|
349
|
+
*
|
|
350
|
+
* Thin today for the reason every role figure in this subsystem is thin:
|
|
351
|
+
* nothing in `src/primitives/` declares one, so nearly every part is in the
|
|
352
|
+
* `null` row — and in this reading that row is also the one that keeps the
|
|
353
|
+
* words of a node whose type changed. The join is at read time (0212), so the
|
|
354
|
+
* day a role is declared these rows start answering without a migration.
|
|
355
|
+
*/
|
|
356
|
+
readonly byRole: readonly KindCopyChange[];
|
|
357
|
+
/**
|
|
358
|
+
* The whole library's carried words, which is {@link byType} added up.
|
|
359
|
+
*
|
|
360
|
+
* The one whole-library figure in any reading of a library, and the reason is
|
|
361
|
+
* in the module documentation: words partition a page and places do not. It
|
|
362
|
+
* follows the **type** rows rather than the role rows, because the two
|
|
363
|
+
* disagree about a node whose type changed and a type is the thing an author
|
|
364
|
+
* replaces.
|
|
365
|
+
*
|
|
366
|
+
* No verdict and no silence of its own. Every reason this reading has to
|
|
367
|
+
* withhold something is a reason about one kind of part, and inventing a
|
|
368
|
+
* second subject for a figure that is a sum of rows would put *there is none
|
|
369
|
+
* of this in your library* over a number about all of it (0240).
|
|
370
|
+
*/
|
|
371
|
+
readonly words: CarriedWords;
|
|
372
|
+
/** Forms read in both windows: a page in one of its forms, never a revision. */
|
|
373
|
+
readonly pages: number;
|
|
374
|
+
/** Forms read in the later window only, which is not pages published. */
|
|
375
|
+
readonly pagesGained: number;
|
|
376
|
+
/** Of {@link pagesGained}, forms whose page the earlier window already held. */
|
|
377
|
+
readonly formsGained: number;
|
|
378
|
+
/** Forms read in the earlier window only, which is not pages withdrawn. */
|
|
379
|
+
readonly pagesLost: number;
|
|
380
|
+
/** Of {@link pagesLost}, forms whose page the later window still holds. */
|
|
381
|
+
readonly formsLost: number;
|
|
382
|
+
/** The audiences each window's forms named, published and never refused. */
|
|
383
|
+
readonly audiences: ComparedPopulations;
|
|
384
|
+
/**
|
|
385
|
+
* Paired pages whose revision moved between the windows.
|
|
386
|
+
*
|
|
387
|
+
* What makes this reading worth more than the places one: a republished page
|
|
388
|
+
* is exactly where a paired placement's words may be two different sentences,
|
|
389
|
+
* and holding the **text** still rather than the node is what this module
|
|
390
|
+
* does about it. A reading where this is nought is two windows of one library
|
|
391
|
+
* and every placement's words are carried by construction.
|
|
392
|
+
*/
|
|
393
|
+
readonly republished: number;
|
|
394
|
+
/** Places that say the same words in both windows, over every kind. */
|
|
395
|
+
readonly placements: number;
|
|
396
|
+
/** Places both windows bear whose words the change rewrote. */
|
|
397
|
+
readonly rewritten: number;
|
|
398
|
+
/** Places the later window bears and the earlier did not, counting a recast node once. */
|
|
399
|
+
readonly gained: number;
|
|
400
|
+
/** Places the earlier window bore and the later does not, counting a recast node once. */
|
|
401
|
+
readonly lost: number;
|
|
402
|
+
/**
|
|
403
|
+
* Paired nodes whose primitive type changed.
|
|
404
|
+
*
|
|
405
|
+
* A place one kind left and another took (0266), so its words are in
|
|
406
|
+
* {@link wordsGained} and {@link wordsLost} both — the page did not gain or
|
|
407
|
+
* lose them and the two kinds did, which is what this number is here to say.
|
|
408
|
+
* Not an alarm: it is the commonest change an author makes to a library.
|
|
409
|
+
*/
|
|
410
|
+
readonly recast: number;
|
|
411
|
+
/** Words of the places the library gained, as the later window says them. */
|
|
412
|
+
readonly wordsGained: number;
|
|
413
|
+
/** Of {@link wordsGained}, the words read in the window that has them. */
|
|
414
|
+
readonly wordsGainedRead: number;
|
|
415
|
+
/** Words of the places it lost, as the earlier window said them. */
|
|
416
|
+
readonly wordsLost: number;
|
|
417
|
+
/** Of {@link wordsLost}, the words that had been read in the window that had them. */
|
|
418
|
+
readonly wordsLostRead: number;
|
|
419
|
+
/**
|
|
420
|
+
* A floor on the page views of the earlier window, added over the paired
|
|
421
|
+
* pages.
|
|
422
|
+
*
|
|
423
|
+
* `PageReading.views` is the largest `views` any one part of a page reports,
|
|
424
|
+
* which is a floor and not a count (0147). Published because every transition
|
|
425
|
+
* in this reading is confounded by it: a quieter window leaves more words
|
|
426
|
+
* unread with no reader behaving differently, and these two numbers are what
|
|
427
|
+
* let somebody see that before reading a movement as a finding.
|
|
428
|
+
*
|
|
429
|
+
* Not a count of readers, and not addable into one: a reader who read two
|
|
430
|
+
* pages is two page views here.
|
|
431
|
+
*/
|
|
432
|
+
readonly viewsWas: number;
|
|
433
|
+
/** The same floor for the later window, over the same pages. */
|
|
434
|
+
readonly viewsNow: number;
|
|
435
|
+
/**
|
|
436
|
+
* The type whose kept words lost the most reading, which is the kind to look
|
|
437
|
+
* at first.
|
|
438
|
+
*
|
|
439
|
+
* By the **mass** of words and not by the share, for the reason a page's
|
|
440
|
+
* falls are ranked by the readers they lose (0221) and a library's kinds by
|
|
441
|
+
* the places they are skipped in (0257): a label that lost its one reader is
|
|
442
|
+
* a perfect rate and a smaller problem than a band of four hundred words that
|
|
443
|
+
* lost half of them. `null` where nothing anywhere fell away.
|
|
444
|
+
*
|
|
445
|
+
* A type and never a role, because a type is the thing an author can replace.
|
|
446
|
+
*/
|
|
447
|
+
readonly mostAbandoned: KindCopyChange | null;
|
|
448
|
+
/** The type whose kept words gained the most reading, by the same rule. */
|
|
449
|
+
readonly mostTakenUp: KindCopyChange | null;
|
|
450
|
+
/**
|
|
451
|
+
* Forms read at two revisions in one window, which are in nothing above.
|
|
452
|
+
*
|
|
453
|
+
* A page that is two live revisions in one window has no single counterpart
|
|
454
|
+
* in the other, and the comparison pairs by page in its form: picking one
|
|
455
|
+
* would be a number nobody could account for (0266). A form and not a tree,
|
|
456
|
+
* because two forms of a page (0263) are two paired pages and one of them
|
|
457
|
+
* being ambiguous says nothing about the other.
|
|
458
|
+
*/
|
|
459
|
+
readonly ambiguous: readonly PageForm[];
|
|
460
|
+
/**
|
|
461
|
+
* Readings of a revision beyond the first, on either side, which were
|
|
462
|
+
* dropped.
|
|
463
|
+
*
|
|
464
|
+
* A caller that concatenated two reads of one window holds a page twice, and
|
|
465
|
+
* a page twice is the one way a comparison of two libraries can lie about how
|
|
466
|
+
* much of one there is (0158).
|
|
467
|
+
*/
|
|
468
|
+
readonly duplicated: number;
|
|
469
|
+
/**
|
|
470
|
+
* Types the two windows disagree about the role of, where the later window's
|
|
471
|
+
* answer stands.
|
|
472
|
+
*
|
|
473
|
+
* A type plays one part (0114), so a disagreement is not a change a
|
|
474
|
+
* deployment made: it is two readings joined against two different
|
|
475
|
+
* registries, held against each other. Every role row above is then about
|
|
476
|
+
* neither.
|
|
477
|
+
*/
|
|
478
|
+
readonly roleDisagreed: readonly PrimitiveType[];
|
|
479
|
+
};
|
|
480
|
+
/**
|
|
481
|
+
* What a change did to the words of a kind of part, across every page it stands
|
|
482
|
+
* on.
|
|
483
|
+
*
|
|
484
|
+
* Takes the two windows' readings rather than two censuses, and the reason is
|
|
485
|
+
* the method: a census publishes a kind's words added up, and the **text** has
|
|
486
|
+
* to be paired before anything can be held still. Two censuses cannot be
|
|
487
|
+
* subtracted, which is what this module is for.
|
|
488
|
+
*
|
|
489
|
+
* The labels are the caller's. Two readings of one window and one library come
|
|
490
|
+
* back as every word carried and nothing gained, lost or rewritten; a caller
|
|
491
|
+
* who holds the two sides backwards gets a comparison with every movement
|
|
492
|
+
* reversed rather than a refusal, exactly as a before-and-after reading of one
|
|
493
|
+
* page does.
|
|
494
|
+
*
|
|
495
|
+
* Linear in the parts handed in, with one comparison per paired page.
|
|
496
|
+
*/
|
|
497
|
+
export declare const libraryCopyChangeOf: (was: readonly PageReading[], now: readonly PageReading[]) => LibraryCopyChange;
|
|
498
|
+
//# sourceMappingURL=library-copy-change.d.ts.map
|