@jam-overture/loom 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +743 -0
- package/dist/catalogue.d.ts +70 -0
- package/dist/catalogue.js +88 -0
- package/dist/cli/args.d.ts +17 -0
- package/dist/cli/args.js +83 -0
- package/dist/cli/filesystem.d.ts +15 -0
- package/dist/cli/filesystem.js +31 -0
- package/dist/cli/index.d.ts +12 -0
- package/dist/cli/index.js +12 -0
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.js +30 -0
- package/dist/cli/namespace.d.ts +40 -0
- package/dist/cli/namespace.js +40 -0
- package/dist/cli/plan.d.ts +84 -0
- package/dist/cli/plan.js +113 -0
- package/dist/cli/run.d.ts +17 -0
- package/dist/cli/run.js +75 -0
- package/dist/cli/templates.d.ts +43 -0
- package/dist/cli/templates.js +134 -0
- package/dist/closed-set.d.ts +34 -0
- package/dist/closed-set.js +34 -0
- package/dist/data/adapter.d.ts +123 -0
- package/dist/data/adapter.js +91 -0
- package/dist/data/binding.d.ts +48 -0
- package/dist/data/binding.js +39 -0
- package/dist/data/catalogue.d.ts +26 -0
- package/dist/data/catalogue.js +6 -0
- package/dist/data/index.d.ts +14 -0
- package/dist/data/index.js +14 -0
- package/dist/data/plan.d.ts +58 -0
- package/dist/data/plan.js +0 -0
- package/dist/data/resolution.d.ts +91 -0
- package/dist/data/resolution.js +96 -0
- package/dist/data/resolve.d.ts +46 -0
- package/dist/data/resolve.js +37 -0
- package/dist/data/source.d.ts +40 -0
- package/dist/data/source.js +45 -0
- package/dist/deadline.d.ts +57 -0
- package/dist/deadline.js +78 -0
- package/dist/frame/catalogue.d.ts +24 -0
- package/dist/frame/catalogue.js +5 -0
- package/dist/frame/index.d.ts +12 -0
- package/dist/frame/index.js +12 -0
- package/dist/frame/origin.d.ts +87 -0
- package/dist/frame/origin.js +114 -0
- package/dist/frame/resolution.d.ts +85 -0
- package/dist/frame/resolution.js +79 -0
- package/dist/grammar.d.ts +26 -0
- package/dist/grammar.js +28 -0
- package/dist/ids.d.ts +57 -0
- package/dist/ids.js +104 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +26 -0
- package/dist/interactivity.d.ts +50 -0
- package/dist/interactivity.js +22 -0
- package/dist/interpretation/anthropic.d.ts +22 -0
- package/dist/interpretation/anthropic.js +76 -0
- package/dist/interpretation/client.d.ts +83 -0
- package/dist/interpretation/client.js +2 -0
- package/dist/interpretation/draft.d.ts +234 -0
- package/dist/interpretation/draft.js +84 -0
- package/dist/interpretation/index.d.ts +15 -0
- package/dist/interpretation/index.js +15 -0
- package/dist/interpretation/interpreter.d.ts +62 -0
- package/dist/interpretation/interpreter.js +151 -0
- package/dist/interpretation/materialize.d.ts +42 -0
- package/dist/interpretation/materialize.js +107 -0
- package/dist/interpretation/prompt.d.ts +229 -0
- package/dist/interpretation/prompt.js +285 -0
- package/dist/interpretation/render.d.ts +76 -0
- package/dist/interpretation/render.js +272 -0
- package/dist/interpretation/schema.d.ts +49 -0
- package/dist/interpretation/schema.js +131 -0
- package/dist/json.d.ts +35 -0
- package/dist/json.js +11 -0
- package/dist/paging.d.ts +60 -0
- package/dist/paging.js +49 -0
- package/dist/primitive-type.d.ts +32 -0
- package/dist/primitive-type.js +39 -0
- package/dist/render/addressing.d.ts +59 -0
- package/dist/render/addressing.js +60 -0
- package/dist/render/anchor.d.ts +105 -0
- package/dist/render/anchor.js +84 -0
- package/dist/render/behaviour-adjust.d.ts +62 -0
- package/dist/render/behaviour-adjust.js +78 -0
- package/dist/render/behaviour-copy.d.ts +53 -0
- package/dist/render/behaviour-copy.js +75 -0
- package/dist/render/behaviour-disclose.d.ts +74 -0
- package/dist/render/behaviour-disclose.js +77 -0
- package/dist/render/behaviour-present.d.ts +123 -0
- package/dist/render/behaviour-present.js +173 -0
- package/dist/render/behaviour.d.ts +243 -0
- package/dist/render/behaviour.js +284 -0
- package/dist/render/control.d.ts +81 -0
- package/dist/render/control.js +80 -0
- package/dist/render/decorative.d.ts +62 -0
- package/dist/render/decorative.js +2 -0
- package/dist/render/diagnostics.d.ts +260 -0
- package/dist/render/diagnostics.js +61 -0
- package/dist/render/disclosed.d.ts +37 -0
- package/dist/render/disclosed.js +37 -0
- package/dist/render/editable.d.ts +34 -0
- package/dist/render/editable.js +35 -0
- package/dist/render/frame.d.ts +42 -0
- package/dist/render/frame.js +31 -0
- package/dist/render/index.d.ts +35 -0
- package/dist/render/index.js +35 -0
- package/dist/render/inline-variables.d.ts +77 -0
- package/dist/render/inline-variables.js +220 -0
- package/dist/render/presented.d.ts +82 -0
- package/dist/render/presented.js +82 -0
- package/dist/render/primitive.d.ts +228 -0
- package/dist/render/primitive.js +36 -0
- package/dist/render/props.d.ts +48 -0
- package/dist/render/props.js +2 -0
- package/dist/render/reads.d.ts +73 -0
- package/dist/render/reads.js +45 -0
- package/dist/render/render.d.ts +164 -0
- package/dist/render/render.js +571 -0
- package/dist/render/request.d.ts +111 -0
- package/dist/render/request.js +60 -0
- package/dist/render/text.d.ts +91 -0
- package/dist/render/text.js +44 -0
- package/dist/render/theme.d.ts +61 -0
- package/dist/render/theme.js +52 -0
- package/dist/reserved-props.d.ts +35 -0
- package/dist/reserved-props.js +45 -0
- package/dist/result.d.ts +27 -0
- package/dist/result.js +30 -0
- package/dist/role.d.ts +71 -0
- package/dist/role.js +22 -0
- package/dist/runtime/analysis.d.ts +149 -0
- package/dist/runtime/analysis.js +187 -0
- package/dist/runtime/assessment.d.ts +35 -0
- package/dist/runtime/assessment.js +13 -0
- package/dist/runtime/disposition.d.ts +102 -0
- package/dist/runtime/disposition.js +59 -0
- package/dist/runtime/events.d.ts +187 -0
- package/dist/runtime/events.js +7 -0
- package/dist/runtime/gate.d.ts +43 -0
- package/dist/runtime/gate.js +169 -0
- package/dist/runtime/index.d.ts +27 -0
- package/dist/runtime/index.js +27 -0
- package/dist/runtime/intent.d.ts +60 -0
- package/dist/runtime/intent.js +36 -0
- package/dist/runtime/interpreter.d.ts +117 -0
- package/dist/runtime/interpreter.js +46 -0
- package/dist/runtime/inverse-interpreter.d.ts +90 -0
- package/dist/runtime/inverse-interpreter.js +56 -0
- package/dist/runtime/inverse.d.ts +87 -0
- package/dist/runtime/inverse.js +48 -0
- package/dist/runtime/narration.d.ts +24 -0
- package/dist/runtime/narration.js +36 -0
- package/dist/runtime/nesting.d.ts +31 -0
- package/dist/runtime/nesting.js +46 -0
- package/dist/runtime/pipeline.d.ts +124 -0
- package/dist/runtime/pipeline.js +178 -0
- package/dist/runtime/policy-fingerprint.d.ts +29 -0
- package/dist/runtime/policy-fingerprint.js +119 -0
- package/dist/runtime/policy-source.d.ts +42 -0
- package/dist/runtime/policy-source.js +8 -0
- package/dist/runtime/policy.d.ts +156 -0
- package/dist/runtime/policy.js +107 -0
- package/dist/runtime/proposal.d.ts +423 -0
- package/dist/runtime/proposal.js +109 -0
- package/dist/runtime/redirection.d.ts +53 -0
- package/dist/runtime/redirection.js +38 -0
- package/dist/runtime/repointing.d.ts +71 -0
- package/dist/runtime/repointing.js +0 -0
- package/dist/runtime/reversibility.d.ts +36 -0
- package/dist/runtime/reversibility.js +39 -0
- package/dist/runtime/stake-level.d.ts +33 -0
- package/dist/runtime/stake-level.js +58 -0
- package/dist/runtime/stakes.d.ts +47 -0
- package/dist/runtime/stakes.js +305 -0
- package/dist/runtime/vocabulary.d.ts +122 -0
- package/dist/runtime/vocabulary.js +87 -0
- package/dist/sdk/audit.d.ts +195 -0
- package/dist/sdk/audit.js +128 -0
- package/dist/sdk/catalogue.d.ts +37 -0
- package/dist/sdk/catalogue.js +16 -0
- package/dist/sdk/conformance.d.ts +342 -0
- package/dist/sdk/conformance.js +494 -0
- package/dist/sdk/copy.d.ts +105 -0
- package/dist/sdk/copy.js +90 -0
- package/dist/sdk/definition.d.ts +242 -0
- package/dist/sdk/definition.js +64 -0
- package/dist/sdk/index.d.ts +19 -0
- package/dist/sdk/index.js +19 -0
- package/dist/sdk/interactivity.d.ts +29 -0
- package/dist/sdk/interactivity.js +34 -0
- package/dist/sdk/pairings.d.ts +124 -0
- package/dist/sdk/pairings.js +81 -0
- package/dist/sdk/registry.d.ts +162 -0
- package/dist/sdk/registry.js +329 -0
- package/dist/sdk/selection.d.ts +46 -0
- package/dist/sdk/selection.js +24 -0
- package/dist/sdk/text.d.ts +100 -0
- package/dist/sdk/text.js +105 -0
- package/dist/sdk/vocabulary.d.ts +39 -0
- package/dist/sdk/vocabulary.js +36 -0
- package/dist/signals/broadcast.d.ts +134 -0
- package/dist/signals/broadcast.js +451 -0
- package/dist/signals/collect.d.ts +184 -0
- package/dist/signals/collect.js +196 -0
- package/dist/signals/deliver.d.ts +64 -0
- package/dist/signals/deliver.js +85 -0
- package/dist/signals/fold.d.ts +112 -0
- package/dist/signals/fold.js +76 -0
- package/dist/signals/index.d.ts +31 -0
- package/dist/signals/index.js +31 -0
- package/dist/signals/ingest.d.ts +51 -0
- package/dist/signals/ingest.js +70 -0
- package/dist/signals/intake.d.ts +149 -0
- package/dist/signals/intake.js +154 -0
- package/dist/signals/journal.d.ts +94 -0
- package/dist/signals/journal.js +11 -0
- package/dist/signals/kinds.d.ts +22 -0
- package/dist/signals/kinds.js +22 -0
- package/dist/signals/ledger.d.ts +46 -0
- package/dist/signals/ledger.js +81 -0
- package/dist/signals/memory.d.ts +17 -0
- package/dist/signals/memory.js +99 -0
- package/dist/signals/migrate.d.ts +27 -0
- package/dist/signals/migrate.js +78 -0
- package/dist/signals/postgres.d.ts +7 -0
- package/dist/signals/postgres.js +295 -0
- package/dist/signals/rollup.d.ts +142 -0
- package/dist/signals/rollup.js +0 -0
- package/dist/signals/schema.d.ts +534 -0
- package/dist/signals/schema.js +92 -0
- package/dist/signals/signal.d.ts +381 -0
- package/dist/signals/signal.js +150 -0
- package/dist/signals/tally.d.ts +70 -0
- package/dist/signals/tally.js +2 -0
- package/dist/signals/view.d.ts +51 -0
- package/dist/signals/view.js +54 -0
- package/dist/store/attribution.d.ts +125 -0
- package/dist/store/attribution.js +116 -0
- package/dist/store/database.d.ts +14 -0
- package/dist/store/database.js +2 -0
- package/dist/store/driver.d.ts +29 -0
- package/dist/store/driver.js +39 -0
- package/dist/store/errors.d.ts +56 -0
- package/dist/store/errors.js +37 -0
- package/dist/store/index.d.ts +16 -0
- package/dist/store/index.js +16 -0
- package/dist/store/memory.d.ts +3 -0
- package/dist/store/memory.js +115 -0
- package/dist/store/migrate.d.ts +54 -0
- package/dist/store/migrate.js +122 -0
- package/dist/store/postgres-holds.d.ts +4 -0
- package/dist/store/postgres-holds.js +192 -0
- package/dist/store/postgres.d.ts +8 -0
- package/dist/store/postgres.js +262 -0
- package/dist/store/replay.d.ts +94 -0
- package/dist/store/replay.js +82 -0
- package/dist/store/revert.d.ts +116 -0
- package/dist/store/revert.js +243 -0
- package/dist/store/schema.d.ts +371 -0
- package/dist/store/schema.js +78 -0
- package/dist/store/source.d.ts +23 -0
- package/dist/store/source.js +37 -0
- package/dist/store/store.d.ts +231 -0
- package/dist/store/store.js +52 -0
- package/dist/store/undone.d.ts +18 -0
- package/dist/store/undone.js +89 -0
- package/dist/submit/catalogue.d.ts +20 -0
- package/dist/submit/catalogue.js +5 -0
- package/dist/submit/declaration.d.ts +39 -0
- package/dist/submit/declaration.js +30 -0
- package/dist/submit/endpoint.d.ts +131 -0
- package/dist/submit/endpoint.js +160 -0
- package/dist/submit/index.d.ts +13 -0
- package/dist/submit/index.js +13 -0
- package/dist/submit/plan.d.ts +49 -0
- package/dist/submit/plan.js +47 -0
- package/dist/submit/resolution.d.ts +61 -0
- package/dist/submit/resolution.js +64 -0
- package/dist/submit/resolve.d.ts +45 -0
- package/dist/submit/resolve.js +36 -0
- package/dist/telemetry/calibration.d.ts +132 -0
- package/dist/telemetry/calibration.js +151 -0
- package/dist/telemetry/episode.d.ts +140 -0
- package/dist/telemetry/episode.js +272 -0
- package/dist/telemetry/event.d.ts +2310 -0
- package/dist/telemetry/event.js +405 -0
- package/dist/telemetry/index.d.ts +15 -0
- package/dist/telemetry/index.js +15 -0
- package/dist/telemetry/journal.d.ts +116 -0
- package/dist/telemetry/journal.js +11 -0
- package/dist/telemetry/memory.d.ts +24 -0
- package/dist/telemetry/memory.js +75 -0
- package/dist/telemetry/migrate.d.ts +26 -0
- package/dist/telemetry/migrate.js +40 -0
- package/dist/telemetry/postgres.d.ts +6 -0
- package/dist/telemetry/postgres.js +139 -0
- package/dist/telemetry/retention.d.ts +131 -0
- package/dist/telemetry/retention.js +217 -0
- package/dist/telemetry/schema.d.ts +113 -0
- package/dist/telemetry/schema.js +33 -0
- package/dist/telemetry/sink.d.ts +42 -0
- package/dist/telemetry/sink.js +61 -0
- package/dist/testing/contracts.d.ts +34 -0
- package/dist/testing/contracts.js +34 -0
- package/dist/testing/definitions.d.ts +15 -0
- package/dist/testing/definitions.js +48 -0
- package/dist/testing/doubles.d.ts +94 -0
- package/dist/testing/doubles.js +141 -0
- package/dist/testing/episode-harness.d.ts +49 -0
- package/dist/testing/episode-harness.js +65 -0
- package/dist/testing/filesystem.d.ts +17 -0
- package/dist/testing/filesystem.js +17 -0
- package/dist/testing/fixtures.d.ts +57 -0
- package/dist/testing/fixtures.js +84 -0
- package/dist/testing/hold-contract.d.ts +19 -0
- package/dist/testing/hold-contract.js +374 -0
- package/dist/testing/index.d.ts +41 -0
- package/dist/testing/index.js +41 -0
- package/dist/testing/journal-contract.d.ts +17 -0
- package/dist/testing/journal-contract.js +353 -0
- package/dist/testing/model-replies.d.ts +34 -0
- package/dist/testing/model-replies.js +101 -0
- package/dist/testing/primitives.d.ts +7 -0
- package/dist/testing/primitives.js +29 -0
- package/dist/testing/reader-signal-contract.d.ts +38 -0
- package/dist/testing/reader-signal-contract.js +318 -0
- package/dist/testing/row-security.d.ts +17 -0
- package/dist/testing/row-security.js +21 -0
- package/dist/testing/store-contract.d.ts +25 -0
- package/dist/testing/store-contract.js +500 -0
- package/dist/theme/apply.d.ts +17 -0
- package/dist/theme/apply.js +60 -0
- package/dist/theme/contrast.d.ts +197 -0
- package/dist/theme/contrast.js +259 -0
- package/dist/theme/derive.d.ts +77 -0
- package/dist/theme/derive.js +167 -0
- package/dist/theme/faces.d.ts +73 -0
- package/dist/theme/faces.js +119 -0
- package/dist/theme/font-packs.d.ts +25 -0
- package/dist/theme/font-packs.js +257 -0
- package/dist/theme/index.d.ts +20 -0
- package/dist/theme/index.js +20 -0
- package/dist/theme/lab.d.ts +30 -0
- package/dist/theme/lab.js +46 -0
- package/dist/theme/library.d.ts +114 -0
- package/dist/theme/library.js +300 -0
- package/dist/theme/measure.d.ts +144 -0
- package/dist/theme/measure.js +145 -0
- package/dist/theme/palettes.d.ts +64 -0
- package/dist/theme/palettes.js +497 -0
- package/dist/theme/registry.d.ts +59 -0
- package/dist/theme/registry.js +60 -0
- package/dist/theme/separation.d.ts +177 -0
- package/dist/theme/separation.js +203 -0
- package/dist/theme/style-presets.d.ts +60 -0
- package/dist/theme/style-presets.js +124 -0
- package/dist/theme/theme.d.ts +253 -0
- package/dist/theme/theme.js +171 -0
- package/dist/tree/apply.d.ts +16 -0
- package/dist/tree/apply.js +104 -0
- package/dist/tree/builders.d.ts +19 -0
- package/dist/tree/builders.js +20 -0
- package/dist/tree/compare.d.ts +68 -0
- package/dist/tree/compare.js +75 -0
- package/dist/tree/configuration.d.ts +25 -0
- package/dist/tree/configuration.js +108 -0
- package/dist/tree/delta.d.ts +288 -0
- package/dist/tree/delta.js +88 -0
- package/dist/tree/errors.d.ts +69 -0
- package/dist/tree/errors.js +34 -0
- package/dist/tree/identity.d.ts +117 -0
- package/dist/tree/identity.js +145 -0
- package/dist/tree/index.d.ts +21 -0
- package/dist/tree/index.js +21 -0
- package/dist/tree/inverse.d.ts +24 -0
- package/dist/tree/inverse.js +112 -0
- package/dist/tree/mutation.d.ts +18 -0
- package/dist/tree/mutation.js +49 -0
- package/dist/tree/naming.d.ts +4 -0
- package/dist/tree/naming.js +35 -0
- package/dist/tree/navigation.d.ts +38 -0
- package/dist/tree/navigation.js +83 -0
- package/dist/tree/node.d.ts +103 -0
- package/dist/tree/node.js +46 -0
- package/dist/tree/outline.d.ts +28 -0
- package/dist/tree/outline.js +10 -0
- package/dist/tree/tree.d.ts +83 -0
- package/dist/tree/tree.js +62 -0
- package/dist/write/commit.d.ts +124 -0
- package/dist/write/commit.js +234 -0
- package/dist/write/held.d.ts +674 -0
- package/dist/write/held.js +185 -0
- package/dist/write/index.d.ts +11 -0
- package/dist/write/index.js +11 -0
- package/dist/write/liveness.d.ts +132 -0
- package/dist/write/liveness.js +91 -0
- package/dist/write/revert.d.ts +79 -0
- package/dist/write/revert.js +134 -0
- package/package.json +160 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import type { ClosedChoice } from "../catalogue.js";
|
|
2
|
+
import { type NodeData } from "../data/resolution.js";
|
|
3
|
+
import type { JsonObject } from "../json.js";
|
|
4
|
+
import { type BehaviourName } from "../render/behaviour.js";
|
|
5
|
+
import { type LoomPrimitive } from "../render/primitive.js";
|
|
6
|
+
import { type PrimitiveText } from "../render/text.js";
|
|
7
|
+
import { type PaletteSlot } from "../theme/theme.js";
|
|
8
|
+
/**
|
|
9
|
+
* The conformance probe (0010).
|
|
10
|
+
*
|
|
11
|
+
* Edit mode decorates by handing a primitive `loom.editable` and trusting it to
|
|
12
|
+
* spread the attributes onto its own root element. A primitive that ignores them
|
|
13
|
+
* renders perfectly and is invisible to the portal — nothing to click, no id to
|
|
14
|
+
* address, and no error anywhere. 0010 asked §4 to catch that at registration
|
|
15
|
+
* rather than leave it as a runtime surprise.
|
|
16
|
+
*
|
|
17
|
+
* This is a probe, not a proof. It calls the component once, with a synthetic
|
|
18
|
+
* render context, and looks through the elements it returned for the attributes
|
|
19
|
+
* it was given. That answers the common case honestly and says so when it
|
|
20
|
+
* cannot answer at all:
|
|
21
|
+
*
|
|
22
|
+
* - a component that hands a *copy* of the decoration to another component
|
|
23
|
+
* reads as `not-decorated`, which is a false negative — identity is all there
|
|
24
|
+
* is to go on once the object has been rebuilt under a name of the
|
|
25
|
+
* primitive's choosing
|
|
26
|
+
* - a component that uses hooks, or is a class, cannot be called outside a
|
|
27
|
+
* renderer and reads as `not-probeable`
|
|
28
|
+
*
|
|
29
|
+
* Both are reported rather than guessed at, and neither blocks registration —
|
|
30
|
+
* `registry.ts` never calls a primitive. Enforcement is the host's call, which
|
|
31
|
+
* is why the verdict is a value.
|
|
32
|
+
*/
|
|
33
|
+
/** A configuration the schema accepts that the component threw on. */
|
|
34
|
+
export type ProbeFailure = {
|
|
35
|
+
readonly props: JsonObject;
|
|
36
|
+
readonly reason: string;
|
|
37
|
+
/**
|
|
38
|
+
* The binding names the node had answers under when it threw, sorted, and
|
|
39
|
+
* absent when it had none.
|
|
40
|
+
*
|
|
41
|
+
* Without it two failures of `loom.feed` at its default props read as the
|
|
42
|
+
* same line twice, and the one that matters — *it renders until you answer
|
|
43
|
+
* it* — is the one a reader cannot pick out (0185).
|
|
44
|
+
*/
|
|
45
|
+
readonly answered?: readonly string[];
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Why a probe declined to answer.
|
|
49
|
+
*
|
|
50
|
+
* 0012 made `not-probeable` a third answer rather than a failure, because a
|
|
51
|
+
* hook-using component and a class component are both legitimate primitives the
|
|
52
|
+
* probe cannot judge. That is still true, and it was hiding a second population
|
|
53
|
+
* that is never legitimate: a component that is perfectly callable and throws on
|
|
54
|
+
* every configuration its own schema accepts.
|
|
55
|
+
*
|
|
56
|
+
* The two are told apart by whether anything was called at all.
|
|
57
|
+
*
|
|
58
|
+
* - `not-callable` — nothing was called. Not a function, or a class component.
|
|
59
|
+
* `failures` is empty because there is nothing to report.
|
|
60
|
+
* - `threw` — it was called under every configuration and threw under all of
|
|
61
|
+
* them, and `failures` carries each one.
|
|
62
|
+
*
|
|
63
|
+
* A hook-using component lands in `threw` alongside a broken one, and no
|
|
64
|
+
* function-call probe can separate them: both are functions, both throw, and the
|
|
65
|
+
* error React raises for a hook outside a render is a message rather than a
|
|
66
|
+
* type. So this does not say *which* fault it is. It says the probe got as far
|
|
67
|
+
* as calling the component, which is the line a host can act on.
|
|
68
|
+
*/
|
|
69
|
+
export type NotProbeableCause = "not-callable" | "threw";
|
|
70
|
+
export type NotProbeable = {
|
|
71
|
+
readonly outcome: "not-probeable";
|
|
72
|
+
readonly cause: NotProbeableCause;
|
|
73
|
+
readonly reason: string;
|
|
74
|
+
/** Every configuration that threw. Empty exactly when nothing was called. */
|
|
75
|
+
readonly failures: readonly ProbeFailure[];
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Named rather than counted. Whoever reads this has to reproduce it, and
|
|
79
|
+
* `{"type":"select"}` is the whole reproduction.
|
|
80
|
+
*/
|
|
81
|
+
export declare const describeProbeFailures: (failures: readonly ProbeFailure[]) => string;
|
|
82
|
+
export type ConformanceVerdict = {
|
|
83
|
+
readonly outcome: "decorates";
|
|
84
|
+
} | {
|
|
85
|
+
readonly outcome: "not-decorated";
|
|
86
|
+
} | NotProbeable;
|
|
87
|
+
/**
|
|
88
|
+
* One call of the probe: the props the node carries, and the answers it had.
|
|
89
|
+
*
|
|
90
|
+
* The second half was `NO_DATA` for every probe in this module until 0185, and
|
|
91
|
+
* that was not a default — it was the only state reachable. A primitive that
|
|
92
|
+
* places a region only when a source failed placed it in no probe, so
|
|
93
|
+
* `unplacedSlots` read that region as dropped content and 0180 wrote the
|
|
94
|
+
* consequence down as a rule about what a bound primitive may declare. The
|
|
95
|
+
* rule was the probe's limit wearing the library's clothes.
|
|
96
|
+
*/
|
|
97
|
+
export type ProbeConfiguration = {
|
|
98
|
+
readonly props: JsonObject;
|
|
99
|
+
/** `NO_DATA` means *this node asked nothing*, which is most of them. */
|
|
100
|
+
readonly data: NodeData;
|
|
101
|
+
};
|
|
102
|
+
/** Props with nothing answered beside them, which is most configurations (0185). */
|
|
103
|
+
export declare const unasked: (props: JsonObject) => ProbeConfiguration;
|
|
104
|
+
/**
|
|
105
|
+
* An answer state a caller wants a primitive probed in, beside the states its
|
|
106
|
+
* own schema closes over.
|
|
107
|
+
*
|
|
108
|
+
* Supplied rather than derived, for the reason the specimen's `endpoints` is:
|
|
109
|
+
* the probe would have to invent a value, and an invented answer is either one
|
|
110
|
+
* the primitive happens to be able to draw — in which case the probe is
|
|
111
|
+
* measuring the guess — or one it cannot, in which case every bound primitive
|
|
112
|
+
* reports its failure region as the only one it places. Whoever registered the
|
|
113
|
+
* primitive knows what it reads; the probe does not.
|
|
114
|
+
*/
|
|
115
|
+
export type ProbeAnswers = {
|
|
116
|
+
/** Answers by binding name, as the render walk would hand them over. */
|
|
117
|
+
readonly data: NodeData;
|
|
118
|
+
/**
|
|
119
|
+
* The props the node carries in this state. Absent means its defaults, which
|
|
120
|
+
* is the configuration a binding name's default was chosen for (0184).
|
|
121
|
+
*/
|
|
122
|
+
readonly props?: JsonObject;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* The prop configurations a primitive is probed under (0075).
|
|
126
|
+
*
|
|
127
|
+
* The default configuration first, then each closed choice's values one at a
|
|
128
|
+
* time with everything else left alone. The **sum** of the choices rather than
|
|
129
|
+
* their product: a schema with six enums of eight members is forty-eight
|
|
130
|
+
* renders this way and two hundred and sixty thousand the other, and the cost
|
|
131
|
+
* of the cheap answer is that a primitive which places children only under two
|
|
132
|
+
* particular values together is not found. Nothing in the library is shaped
|
|
133
|
+
* that way, and a primitive that were would be one nobody can read.
|
|
134
|
+
*/
|
|
135
|
+
export declare const probeConfigurations: (choices: readonly ClosedChoice[]) => readonly JsonObject[];
|
|
136
|
+
/**
|
|
137
|
+
* The states a primitive is probed in: what its schema closes over, then what
|
|
138
|
+
* its registrant declared it can be answered with (0185).
|
|
139
|
+
*
|
|
140
|
+
* Two functions rather than one, and the split is the argument. What a schema
|
|
141
|
+
* closes over is **derived** — `probeConfigurations` reads it off the
|
|
142
|
+
* registration and cannot be wrong about it. What a bound primitive can be
|
|
143
|
+
* answered with is **supplied**, because nothing here knows it. Folding the
|
|
144
|
+
* second into the first would put a caller's declaration and a machine's
|
|
145
|
+
* enumeration behind one name, and the day they disagree is the day nobody can
|
|
146
|
+
* tell which half was wrong.
|
|
147
|
+
*
|
|
148
|
+
* The answers are summed in rather than crossed with every prop value, for the
|
|
149
|
+
* reason 0075 sums the choices, and it costs less here: what a bound primitive
|
|
150
|
+
* draws turns on the *answer*, and the state a caller has to reach to find an
|
|
151
|
+
* unplaced region is the answer under the props that name it — which is why an
|
|
152
|
+
* answer carries its own optional props.
|
|
153
|
+
*/
|
|
154
|
+
export declare const probeStates: (configurations: readonly JsonObject[], answers?: readonly ProbeAnswers[]) => readonly ProbeConfiguration[];
|
|
155
|
+
/**
|
|
156
|
+
* Decoration is a promise that holds however the primitive is configured, so
|
|
157
|
+
* one configuration that fails to decorate makes the answer `not-decorated`
|
|
158
|
+
* even if the rest pass. A configuration that throws answers nothing either
|
|
159
|
+
* way and is skipped; when none of them answer, every failure is carried on the
|
|
160
|
+
* verdict, so the reason the probe declined is a value rather than the prose of
|
|
161
|
+
* whichever configuration happened to be first.
|
|
162
|
+
*/
|
|
163
|
+
export declare const probeEditableDecoration: (primitive: LoomPrimitive, text?: PrimitiveText<string>, configurations?: readonly ProbeConfiguration[], declaredFrames?: readonly string[]) => ConformanceVerdict;
|
|
164
|
+
/**
|
|
165
|
+
* The second probe: does a primitive place what it was handed?
|
|
166
|
+
*
|
|
167
|
+
* A declared behaviour is a promise of the same kind and fails the same way. A
|
|
168
|
+
* primitive that asks for the copy control and never reads
|
|
169
|
+
* `loom.behaviours.copy` registers cleanly, renders correctly and simply has no
|
|
170
|
+
* copy button — the gap the behaviour was declared to close, still open, with
|
|
171
|
+
* the declaration saying otherwise.
|
|
172
|
+
*
|
|
173
|
+
* A declared slot is a promise. The catalogue tells a model the region exists,
|
|
174
|
+
* a proposal puts content there, and a primitive that never reads
|
|
175
|
+
* `loom.slots.aside` drops it — rendering correctly, reporting nothing, with the
|
|
176
|
+
* content gone from the page and still present in the tree. That is the same
|
|
177
|
+
* failure shape as ignoring `loom.editable`, and 0051 made it more likely by
|
|
178
|
+
* making slots mean something: before, a region nobody placed still appeared
|
|
179
|
+
* inline in `children`.
|
|
180
|
+
*
|
|
181
|
+
* It answers a second question at the same time, because one call can. A
|
|
182
|
+
* primitive that renders no `children` is a leaf: `loom.stat` holds its value
|
|
183
|
+
* and label as props, so a text node underneath it has nowhere to go and is
|
|
184
|
+
* dropped just as silently. The renderer cannot tell a leaf from a container —
|
|
185
|
+
* the registry records declared slots, not whether a component reads
|
|
186
|
+
* `children` — but the probe can simply look, which is cheaper than asking
|
|
187
|
+
* every author to declare it and impossible to get out of step with the code.
|
|
188
|
+
*
|
|
189
|
+
* Reported, never enforced, for the reason `audit.ts` gives: a primitive that
|
|
190
|
+
* deliberately ignores a region under some prop combination is a design choice.
|
|
191
|
+
*
|
|
192
|
+
* **It answers from every configuration the schema closes over** (0075), not
|
|
193
|
+
* from one render. `loom.field` places children only when its `type` is
|
|
194
|
+
* `select`, because only a select has choices, and probed at its default type
|
|
195
|
+
* alone it reported as a leaf — a primitive with nowhere to put a child node,
|
|
196
|
+
* which is false and is the one thing a portal reads this to decide. A claim
|
|
197
|
+
* about a primitive that holds under one prop value is not a claim about the
|
|
198
|
+
* primitive.
|
|
199
|
+
*/
|
|
200
|
+
export type PlacementVerdict = {
|
|
201
|
+
readonly outcome: "probed";
|
|
202
|
+
/** Declared slots that no probed configuration placed. */
|
|
203
|
+
readonly unplacedSlots: readonly string[];
|
|
204
|
+
/** Declared behaviours whose control no probed configuration placed. */
|
|
205
|
+
readonly unplacedBehaviours: readonly BehaviourName[];
|
|
206
|
+
/** Whether any probed configuration placed the children it was handed. */
|
|
207
|
+
readonly rendersChildren: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* The configurations that answered — one unasked `{}` alone when the
|
|
210
|
+
* schema closes over nothing and the caller supplied no answers.
|
|
211
|
+
*/
|
|
212
|
+
readonly probed: readonly ProbeConfiguration[];
|
|
213
|
+
/**
|
|
214
|
+
* Configurations built from the primitive's own schema that it threw on.
|
|
215
|
+
* Never a reason to distrust the verdict — the configurations that
|
|
216
|
+
* answered still answered — and always a fault: a component that throws
|
|
217
|
+
* on a value its schema accepts is one a valid tree can crash a page with.
|
|
218
|
+
*/
|
|
219
|
+
readonly threw: readonly ProbeFailure[];
|
|
220
|
+
} | NotProbeable;
|
|
221
|
+
export declare const probePlacement: (primitive: LoomPrimitive, declaredSlots: readonly string[], text?: PrimitiveText<string>, configurations?: readonly ProbeConfiguration[], declaredBehaviours?: readonly BehaviourName[], declaredFrames?: readonly string[]) => PlacementVerdict;
|
|
222
|
+
/**
|
|
223
|
+
* The third probe: does a primitive that posts put the address on the page?
|
|
224
|
+
*
|
|
225
|
+
* `loom.submit` is the one thing on the render context whose absence is
|
|
226
|
+
* survivable and whose *silent* absence is not (0065). A tree names an
|
|
227
|
+
* endpoint, a deployment resolves it before the walk, and the primitive is
|
|
228
|
+
* handed a target — but nothing makes it read one. A form that ignores it
|
|
229
|
+
* renders a set of fields and a submit control with no `action` at all, which a
|
|
230
|
+
* browser resolves by posting to the page the form is sitting on. Nothing
|
|
231
|
+
* throws, nothing is logged, and the first person to find out is whoever filled
|
|
232
|
+
* it in.
|
|
233
|
+
*
|
|
234
|
+
* So the probe hands the component a target whose action is a string nothing
|
|
235
|
+
* else would produce, and looks for that string in what came back. Placing the
|
|
236
|
+
* address is the claim, because the address is the whole of what the seam
|
|
237
|
+
* delivers: a primitive that reads the outcome only to choose between two
|
|
238
|
+
* sentences has not connected anything.
|
|
239
|
+
*
|
|
240
|
+
* Its false negative is the one `containsMarker` cannot avoid: a primitive that
|
|
241
|
+
* rebuilds the action — appending a query string, say — has posted somewhere
|
|
242
|
+
* real and reads here as `not-placed`. That is the same bargain the decoration
|
|
243
|
+
* probe makes with identity, and it errs towards reporting a fault that is not
|
|
244
|
+
* one, which a person reading the audit can dismiss in a second. The reverse
|
|
245
|
+
* error is the one this exists to prevent.
|
|
246
|
+
*/
|
|
247
|
+
export type SubmissionVerdict = {
|
|
248
|
+
readonly outcome: "places";
|
|
249
|
+
} | {
|
|
250
|
+
readonly outcome: "not-placed";
|
|
251
|
+
} | NotProbeable;
|
|
252
|
+
/**
|
|
253
|
+
* `some` rather than `every`, matching `probePlacement`. The question is
|
|
254
|
+
* whether this primitive posts at all, and a primitive that renders a form
|
|
255
|
+
* under one layout and a summary under another is answering honestly in both.
|
|
256
|
+
*/
|
|
257
|
+
export declare const probeSubmissionPlacement: (primitive: LoomPrimitive, text?: PrimitiveText<string>, configurations?: readonly ProbeConfiguration[], declaredFrames?: readonly string[]) => SubmissionVerdict;
|
|
258
|
+
/**
|
|
259
|
+
* The fourth probe: which colours does this primitive put on which grounds?
|
|
260
|
+
*
|
|
261
|
+
* `PALETTE_TEXT_PAIRINGS` in `src/theme/contrast.ts` says of itself that it is
|
|
262
|
+
* *read off `src/primitives` rather than imagined*, and until now that was a
|
|
263
|
+
* promise a person kept by hand. A pairing a new primitive rendered was audited
|
|
264
|
+
* only if somebody remembered to add a row, and the audit's silence about the
|
|
265
|
+
* rest read exactly like a pass. This answers the question from the components
|
|
266
|
+
* instead, the same way `submits` stopped being a declaration and became an
|
|
267
|
+
* observation.
|
|
268
|
+
*
|
|
269
|
+
* ## Painted and floating
|
|
270
|
+
*
|
|
271
|
+
* A primitive that sets `color` under a ground it painted itself has said
|
|
272
|
+
* everything about that pair: both ends are its own and no container can change
|
|
273
|
+
* them. That is a **painted** pairing.
|
|
274
|
+
*
|
|
275
|
+
* A primitive that sets `color` and paints no ground under it — `loom.perk`'s
|
|
276
|
+
* subtle note, `loom.milestone`'s marker — has said only half. The other half
|
|
277
|
+
* is whatever it is placed in, and 0008 leaves parentage to the tree, so the
|
|
278
|
+
* ground is any ground a container puts children on. Those inks are reported
|
|
279
|
+
* as **floating**, with the grounds separately, and pairing them up is
|
|
280
|
+
* `pairings.ts`'s job because it needs the whole registry to know what the
|
|
281
|
+
* grounds are.
|
|
282
|
+
*
|
|
283
|
+
* ## A ground is not always an ancestor
|
|
284
|
+
*
|
|
285
|
+
* CSS inherits `color` down the tree and paints a background on whatever box
|
|
286
|
+
* is behind the glyphs, and those two are not the same walk. A run of text sits
|
|
287
|
+
* on the ground of the nearest box *behind* it, which is an ancestor only when
|
|
288
|
+
* nothing is stacked in between.
|
|
289
|
+
*
|
|
290
|
+
* `loom.overlay` is the case that proves it. It sets `fg-default` on its root
|
|
291
|
+
* and paints nothing there; a scrim child paints `bg-overlay` in grid cell
|
|
292
|
+
* `1 / 1` at `zIndex: 1`; the content sits in the same cell at `zIndex: 2` and
|
|
293
|
+
* sets no colour of its own. Every word of it renders in `fg-default` on
|
|
294
|
+
* `bg-overlay` — and read as an ancestor chain the two ends never meet, so the
|
|
295
|
+
* pairing was invisible here from the day the primitive shipped.
|
|
296
|
+
*
|
|
297
|
+
* So two things travel down: the ground in effect **and the ink in effect**,
|
|
298
|
+
* and a pairing is recorded wherever either changes under the other. Siblings
|
|
299
|
+
* that declare the same `gridArea` are one stack ordered by `zIndex`, and an
|
|
300
|
+
* element's ground is the nearest member below it that paints one.
|
|
301
|
+
*
|
|
302
|
+
* ## What it does not see
|
|
303
|
+
*
|
|
304
|
+
* Only `children` is walked, matching `carriesDecoration`, so an element handed
|
|
305
|
+
* to another component through a prop of the primitive's own naming is not
|
|
306
|
+
* followed. Only `background`, `backgroundColor` and `color` are read, and only
|
|
307
|
+
* where the value is exactly the `var(--loom-…)` form `colour()` produces — a
|
|
308
|
+
* primitive that composes a gradient or interpolates a variable into a longhand
|
|
309
|
+
* answers nothing rather than a guess, for the reason `contrastRatio` declines
|
|
310
|
+
* a colour it would have to parse.
|
|
311
|
+
*
|
|
312
|
+
* **Stacking is read from `gridArea` and from nothing else.** An absolutely
|
|
313
|
+
* positioned sibling also lies under its neighbours, and whether it lies under
|
|
314
|
+
* *all* of them is a question about an arbitrary length expression —
|
|
315
|
+
* `inset: calc(-1 * 4px)` is `loom.halo`'s, and no reading of that string says
|
|
316
|
+
* what it covers. A grid area is a name two elements either share or do not.
|
|
317
|
+
* Neither `loom.halo` nor `loom.backdrop` paints a palette slot under its
|
|
318
|
+
* content today (both draw gradients, which `slotOf` declines), so the narrow
|
|
319
|
+
* rule costs nothing real and the wide one would have been a guess.
|
|
320
|
+
*/
|
|
321
|
+
export type ColourPairing = {
|
|
322
|
+
readonly foreground: PaletteSlot;
|
|
323
|
+
readonly background: PaletteSlot;
|
|
324
|
+
};
|
|
325
|
+
export type ColourVerdict = {
|
|
326
|
+
readonly outcome: "probed";
|
|
327
|
+
/** Ink and ground both set by this primitive. */
|
|
328
|
+
readonly painted: readonly ColourPairing[];
|
|
329
|
+
/** Ink set here, ground left to whatever this is placed in. */
|
|
330
|
+
readonly floating: readonly PaletteSlot[];
|
|
331
|
+
/** Grounds this primitive puts its declared children and slots on. */
|
|
332
|
+
readonly childGrounds: readonly PaletteSlot[];
|
|
333
|
+
} | NotProbeable;
|
|
334
|
+
/**
|
|
335
|
+
* The union across every configuration, rather than the intersection the
|
|
336
|
+
* decoration probe takes. Decoration is a promise that has to hold however the
|
|
337
|
+
* primitive is configured; a colour pairing is a fact about one configuration,
|
|
338
|
+
* and a `loom.section` that paints `accent-subtle` only under `tone: "accent"`
|
|
339
|
+
* renders that pairing on a real page whatever the other tones do.
|
|
340
|
+
*/
|
|
341
|
+
export declare const probeColourPairings: (primitive: LoomPrimitive, declaredSlots?: readonly string[], text?: PrimitiveText<string>, configurations?: readonly ProbeConfiguration[], declaredFrames?: readonly string[]) => ColourVerdict;
|
|
342
|
+
//# sourceMappingURL=conformance.d.ts.map
|