@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,77 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import type { ThemeVariables } from "../theme/apply.js";
|
|
3
|
+
import { type LoomPrimitive, type LoomPrimitiveProps } from "./primitive.js";
|
|
4
|
+
/**
|
|
5
|
+
* A render whose colours are values rather than references.
|
|
6
|
+
*
|
|
7
|
+
* The renderer is a total pure projection into React
|
|
8
|
+
* ([0008](../../decisions/0008-the-renderer-is-a-total-pure-projection.md)) and a
|
|
9
|
+
* primitive paints itself by *naming* a custom property — `loom.section` emits
|
|
10
|
+
* `var(--loom-bg-surface)`, and the root mounts the theme as variables
|
|
11
|
+
* ([0050](../../decisions/0050-the-runtimes-props-are-namespaced-and-the-root-mounts-the-theme.md)).
|
|
12
|
+
* Those two facts are what make a re-theme one `configure` on the root and
|
|
13
|
+
* nothing else (0049), and together they assume a cascade.
|
|
14
|
+
*
|
|
15
|
+
* Something has to render where there is no cascade. An image renderer takes
|
|
16
|
+
* inline styles and literal values; it resolves no custom properties, so a
|
|
17
|
+
* projection whose every colour is a `var()` renders as a blank rectangle. So
|
|
18
|
+
* does an email body, and so does anything else that has to show a page outside
|
|
19
|
+
* a browser. `Loom marketing` hit it first and drew its share card by hand,
|
|
20
|
+
* reading the resolved theme itself, and filed the hand-drawn copy of a page as
|
|
21
|
+
* the finding.
|
|
22
|
+
*
|
|
23
|
+
* This is the substitution the browser would have done, done here instead: the
|
|
24
|
+
* same walk the renderer already produced, with every `var(--loom-…)` in an
|
|
25
|
+
* inline style replaced by what the mounted theme says it is. Nothing about any
|
|
26
|
+
* primitive changes, and nothing about the tree changes — a primitive still
|
|
27
|
+
* names a slot and still never learns which palette answered it.
|
|
28
|
+
*
|
|
29
|
+
* **What it does not reach**, because a browser is doing more than substitution:
|
|
30
|
+
*
|
|
31
|
+
* - **The library stylesheet.** `:hover`, `:last-child`, keyframes and
|
|
32
|
+
* `::after` are the five things that cannot be said inline, and no renderer
|
|
33
|
+
* without a cascade evaluates them either — so a medium that needs this is a
|
|
34
|
+
* medium those rules were never going to reach.
|
|
35
|
+
* - **Inside a component element.** A control renders on the client, so its
|
|
36
|
+
* subtree does not exist yet. Its own `style` prop is substituted; what it
|
|
37
|
+
* returns is not there to walk.
|
|
38
|
+
*
|
|
39
|
+
* Both are the same shape of limit: this resolves the values a render *has*
|
|
40
|
+
* produced, and does not run the parts of CSS that are not values.
|
|
41
|
+
*/
|
|
42
|
+
/** A CSS value with the theme's variables resolved, and what could not be. */
|
|
43
|
+
export type VariableSubstitution = {
|
|
44
|
+
readonly value: string;
|
|
45
|
+
/**
|
|
46
|
+
* Custom properties the theme does not declare **and** that named no
|
|
47
|
+
* fallback. A reference with a fallback is not reported: the fallback is the
|
|
48
|
+
* value, exactly as it is in a browser, and `--loom-mono-family` is written
|
|
49
|
+
* that way on purpose (0085).
|
|
50
|
+
*/
|
|
51
|
+
readonly unresolved: readonly string[];
|
|
52
|
+
};
|
|
53
|
+
export declare const substituteVariables: (value: string, variables: ThemeVariables) => VariableSubstitution;
|
|
54
|
+
/** A projection with the theme resolved into it, and what the theme did not answer. */
|
|
55
|
+
export type InlinedProjection = {
|
|
56
|
+
readonly element: ReactNode;
|
|
57
|
+
readonly unresolved: readonly string[];
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* The projection, with every theme reference in an inline style replaced by
|
|
61
|
+
* what the mounted theme says it is.
|
|
62
|
+
*
|
|
63
|
+
* Pure and structurally sharing: a subtree with nothing to substitute comes back
|
|
64
|
+
* as the identical element, so a render this changes nothing about is the render
|
|
65
|
+
* it was handed.
|
|
66
|
+
*/
|
|
67
|
+
export declare const inlineThemeVariables: (element: ReactNode, variables: ThemeVariables) => InlinedProjection;
|
|
68
|
+
/**
|
|
69
|
+
* A node's primitive, standing behind the substitution, under the node's own key.
|
|
70
|
+
*
|
|
71
|
+
* A class component is mounted as it always was and keeps its references: it
|
|
72
|
+
* cannot be called, and the alternative — rendering it and walking the result —
|
|
73
|
+
* is the pass this file exists because nothing can do. Nothing in this package
|
|
74
|
+
* is one, and a host that registers one gets a page rather than an exception.
|
|
75
|
+
*/
|
|
76
|
+
export declare const literalThemeElement: (primitive: LoomPrimitive, variables: ThemeVariables, key: string, forwarded: LoomPrimitiveProps) => ReactElement;
|
|
77
|
+
//# sourceMappingURL=inline-variables.d.ts.map
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { cloneElement, createElement, isValidElement, } from "react";
|
|
2
|
+
import { asCallablePrimitive, } from "./primitive.js";
|
|
3
|
+
const REFERENCE = "var(";
|
|
4
|
+
/** A quote closes at its own kind, and a backslash inside one escapes anything. */
|
|
5
|
+
const endOfQuoted = (text, open) => {
|
|
6
|
+
const quote = text[open];
|
|
7
|
+
for (let index = open + 1; index < text.length; index += 1) {
|
|
8
|
+
if (text[index] === "\\") {
|
|
9
|
+
index += 1;
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
if (text[index] === quote)
|
|
13
|
+
return index;
|
|
14
|
+
}
|
|
15
|
+
return text.length - 1;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The index of the next `var(` outside a quoted string, or -1.
|
|
19
|
+
*
|
|
20
|
+
* The quote check is not pedantry: a font stack is the value most likely to
|
|
21
|
+
* carry a parenthesis, and `'Foo (Text)'` is a family somebody has shipped.
|
|
22
|
+
*/
|
|
23
|
+
const nextReference = (text, from) => {
|
|
24
|
+
for (let index = from; index < text.length; index += 1) {
|
|
25
|
+
const character = text[index];
|
|
26
|
+
if (character === '"' || character === "'") {
|
|
27
|
+
index = endOfQuoted(text, index);
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (text.startsWith(REFERENCE, index))
|
|
31
|
+
return index;
|
|
32
|
+
}
|
|
33
|
+
return -1;
|
|
34
|
+
};
|
|
35
|
+
/** The index of the `)` closing the `(` at `open`, or -1 if nothing does. */
|
|
36
|
+
const closingParen = (text, open) => {
|
|
37
|
+
let depth = 0;
|
|
38
|
+
for (let index = open; index < text.length; index += 1) {
|
|
39
|
+
const character = text[index];
|
|
40
|
+
if (character === '"' || character === "'") {
|
|
41
|
+
index = endOfQuoted(text, index);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (character === "(")
|
|
45
|
+
depth += 1;
|
|
46
|
+
else if (character === ")") {
|
|
47
|
+
depth -= 1;
|
|
48
|
+
if (depth === 0)
|
|
49
|
+
return index;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return -1;
|
|
53
|
+
};
|
|
54
|
+
/** `--loom-accent, #fff` → the name, and everything after the first comma. */
|
|
55
|
+
const readReference = (inner) => {
|
|
56
|
+
let depth = 0;
|
|
57
|
+
for (let index = 0; index < inner.length; index += 1) {
|
|
58
|
+
const character = inner[index];
|
|
59
|
+
if (character === '"' || character === "'") {
|
|
60
|
+
index = endOfQuoted(inner, index);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (character === "(")
|
|
64
|
+
depth += 1;
|
|
65
|
+
else if (character === ")")
|
|
66
|
+
depth -= 1;
|
|
67
|
+
else if (character === "," && depth === 0) {
|
|
68
|
+
/**
|
|
69
|
+
* Trimmed, because the space after the comma is how a reference is
|
|
70
|
+
* written and not part of the value — `var(--x, red)` falls back to `red`
|
|
71
|
+
* in a browser, not to ` red`.
|
|
72
|
+
*/
|
|
73
|
+
return { name: inner.slice(0, index).trim(), fallback: inner.slice(index + 1).trim() };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return { name: inner.trim(), fallback: undefined };
|
|
77
|
+
};
|
|
78
|
+
const substitute = (value, variables, unresolved) => {
|
|
79
|
+
let out = "";
|
|
80
|
+
let index = 0;
|
|
81
|
+
while (index < value.length) {
|
|
82
|
+
const at = nextReference(value, index);
|
|
83
|
+
if (at === -1)
|
|
84
|
+
return out + value.slice(index);
|
|
85
|
+
out += value.slice(index, at);
|
|
86
|
+
const close = closingParen(value, at + REFERENCE.length - 1);
|
|
87
|
+
/**
|
|
88
|
+
* An unclosed `var(` is not a reference this can read, and guessing where it
|
|
89
|
+
* ends would invent a value. The rest of the declaration is copied through
|
|
90
|
+
* exactly as the primitive wrote it.
|
|
91
|
+
*/
|
|
92
|
+
if (close === -1)
|
|
93
|
+
return out + value.slice(at);
|
|
94
|
+
const reference = readReference(value.slice(at + REFERENCE.length, close));
|
|
95
|
+
const declared = reference.name.startsWith("--") ? variables[reference.name] : undefined;
|
|
96
|
+
if (declared !== undefined) {
|
|
97
|
+
/**
|
|
98
|
+
* The declared value is written through as-is and not walked again. Every
|
|
99
|
+
* variable the theme mounts is a literal, so there is nothing to resolve
|
|
100
|
+
* — and not re-entering is what makes a theme that somehow referred to
|
|
101
|
+
* itself a value rather than a hang.
|
|
102
|
+
*/
|
|
103
|
+
out += declared;
|
|
104
|
+
}
|
|
105
|
+
else if (reference.fallback !== undefined) {
|
|
106
|
+
out += substitute(reference.fallback, variables, unresolved);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
if (reference.name.startsWith("--"))
|
|
110
|
+
unresolved.add(reference.name);
|
|
111
|
+
out += value.slice(at, close + 1);
|
|
112
|
+
}
|
|
113
|
+
index = close + 1;
|
|
114
|
+
}
|
|
115
|
+
return out;
|
|
116
|
+
};
|
|
117
|
+
export const substituteVariables = (value, variables) => {
|
|
118
|
+
const unresolved = new Set();
|
|
119
|
+
return { value: substitute(value, variables, unresolved), unresolved: [...unresolved].sort() };
|
|
120
|
+
};
|
|
121
|
+
const isStyleObject = (style) => typeof style === "object" && style !== null && !Array.isArray(style);
|
|
122
|
+
const inlineStyle = (style, variables, unresolved) => {
|
|
123
|
+
let next;
|
|
124
|
+
for (const [property, value] of Object.entries(style)) {
|
|
125
|
+
if (typeof value !== "string" || !value.includes(REFERENCE))
|
|
126
|
+
continue;
|
|
127
|
+
const resolved = substitute(value, variables, unresolved);
|
|
128
|
+
if (resolved === value)
|
|
129
|
+
continue;
|
|
130
|
+
next = next ?? { ...style };
|
|
131
|
+
next[property] = resolved;
|
|
132
|
+
}
|
|
133
|
+
return next;
|
|
134
|
+
};
|
|
135
|
+
const inlineNode = (node, variables, unresolved) => {
|
|
136
|
+
if (Array.isArray(node)) {
|
|
137
|
+
const children = node;
|
|
138
|
+
let changed = false;
|
|
139
|
+
const next = children.map((child) => {
|
|
140
|
+
const walked = inlineNode(child, variables, unresolved);
|
|
141
|
+
if (walked !== child)
|
|
142
|
+
changed = true;
|
|
143
|
+
return walked;
|
|
144
|
+
});
|
|
145
|
+
return changed ? next : node;
|
|
146
|
+
}
|
|
147
|
+
if (!isValidElement(node))
|
|
148
|
+
return node;
|
|
149
|
+
const element = node;
|
|
150
|
+
const { style, children } = element.props;
|
|
151
|
+
const nextStyle = isStyleObject(style) ? inlineStyle(style, variables, unresolved) : undefined;
|
|
152
|
+
const nextChildren = children === undefined ? undefined : inlineNode(children, variables, unresolved);
|
|
153
|
+
const childrenChanged = nextChildren !== undefined && nextChildren !== children;
|
|
154
|
+
if (!nextStyle && !childrenChanged)
|
|
155
|
+
return node;
|
|
156
|
+
/**
|
|
157
|
+
* `cloneElement` rather than `createElement`, because it carries the key and
|
|
158
|
+
* the ref across. Ids are React keys here (§1), so an element that lost its
|
|
159
|
+
* key on the way through would be reconciled as a delete and an insert — the
|
|
160
|
+
* one property the whole projection is built to keep.
|
|
161
|
+
*/
|
|
162
|
+
return cloneElement(element, {
|
|
163
|
+
...(nextStyle ? { style: nextStyle } : {}),
|
|
164
|
+
...(childrenChanged ? { children: nextChildren } : {}),
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* The projection, with every theme reference in an inline style replaced by
|
|
169
|
+
* what the mounted theme says it is.
|
|
170
|
+
*
|
|
171
|
+
* Pure and structurally sharing: a subtree with nothing to substitute comes back
|
|
172
|
+
* as the identical element, so a render this changes nothing about is the render
|
|
173
|
+
* it was handed.
|
|
174
|
+
*/
|
|
175
|
+
export const inlineThemeVariables = (element, variables) => {
|
|
176
|
+
const unresolved = new Set();
|
|
177
|
+
return {
|
|
178
|
+
element: inlineNode(element, variables, unresolved),
|
|
179
|
+
unresolved: [...unresolved].sort(),
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* One node's primitive, rendered and then resolved.
|
|
184
|
+
*
|
|
185
|
+
* The substitution cannot be a pass over what `renderLoomTree` returns, and the
|
|
186
|
+
* reason is worth stating because it is the whole shape of this file: the
|
|
187
|
+
* projection is a tree of *component* elements, and what a primitive paints does
|
|
188
|
+
* not exist until something renders it. A walk over the projection sees
|
|
189
|
+
* `<loom.card>` and no styles at all.
|
|
190
|
+
*
|
|
191
|
+
* So it happens one node in, where the styles are. This stands in for the
|
|
192
|
+
* primitive, calls it, and substitutes into what it produced — stopping at the
|
|
193
|
+
* child elements, which are the next nodes' stand-ins and resolve their own
|
|
194
|
+
* output the same way when they are rendered. Every node pays for itself and
|
|
195
|
+
* nothing is walked twice.
|
|
196
|
+
*
|
|
197
|
+
* **Calling the primitive rather than mounting it** is what keeps this one
|
|
198
|
+
* element per node instead of two. A primitive is a pure function of the props
|
|
199
|
+
* the seam hands it and holds no state (0008) — that is the same property the
|
|
200
|
+
* whole projection rests on, and a primitive that broke it would already have
|
|
201
|
+
* broken rendering the same tree twice. Hooks are what the rule forbids, and
|
|
202
|
+
* this is where forbidding them pays.
|
|
203
|
+
*/
|
|
204
|
+
const LiteralTheme = ({ primitive, variables, ...forwarded }) => inlineThemeVariables(primitive(forwarded), variables).element;
|
|
205
|
+
LiteralTheme.displayName = "loom(literal-theme)";
|
|
206
|
+
/**
|
|
207
|
+
* A node's primitive, standing behind the substitution, under the node's own key.
|
|
208
|
+
*
|
|
209
|
+
* A class component is mounted as it always was and keeps its references: it
|
|
210
|
+
* cannot be called, and the alternative — rendering it and walking the result —
|
|
211
|
+
* is the pass this file exists because nothing can do. Nothing in this package
|
|
212
|
+
* is one, and a host that registers one gets a page rather than an exception.
|
|
213
|
+
*/
|
|
214
|
+
export const literalThemeElement = (primitive, variables, key, forwarded) => {
|
|
215
|
+
const callable = asCallablePrimitive(primitive);
|
|
216
|
+
return callable.ok
|
|
217
|
+
? createElement(LiteralTheme, { key, primitive: callable.value, variables, ...forwarded })
|
|
218
|
+
: createElement(primitive, { key, ...forwarded });
|
|
219
|
+
};
|
|
220
|
+
//# sourceMappingURL=inline-variables.js.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The present contract's one name, in a module with nothing else in it.
|
|
3
|
+
*
|
|
4
|
+
* It lives apart from `behaviour.ts` for the reason `disclosed.ts` does: code
|
|
5
|
+
* that only needs to *read* whether a region is showing should not have to
|
|
6
|
+
* import the React controls that write it (0136).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The attribute a presentation control stamps on **the element the primitive
|
|
10
|
+
* placed it in**: `"true"` while the region it opens is showing, `"false"`
|
|
11
|
+
* otherwise.
|
|
12
|
+
*
|
|
13
|
+
* **This is the whole of the contract between the runtime and a primitive that
|
|
14
|
+
* takes `present`.** It is an attribute for `disclosed.ts`'s reason — a
|
|
15
|
+
* stylesheet is what reads it — and it is on the *parent* for
|
|
16
|
+
* [0096](../../decisions/0096-a-behaviour-publishes-a-value-on-the-element-the-primitive-placed-it-in.md)'s,
|
|
17
|
+
* with the opposite half of that record's reasoning doing the work.
|
|
18
|
+
*
|
|
19
|
+
* `data-loom-disclosed` sits on the control's own button and is read
|
|
20
|
+
* **sideways**, by a sibling selector, because the region a disclosure opens is
|
|
21
|
+
* laid out beside its button. An overlay is not: a dialog's panel, a dropdown's
|
|
22
|
+
* menu and a lightbox's frame are all *inside* the box the primitive owns and
|
|
23
|
+
* the trigger is one element within it. A sibling selector cannot reach from the
|
|
24
|
+
* button to a region that is not its sibling, and the primitive cannot make it
|
|
25
|
+
* one without giving the trigger a wrapper whose only purpose is to be selected
|
|
26
|
+
* from — which is the cost `control.ts` already records against that shape.
|
|
27
|
+
*
|
|
28
|
+
* So the state goes on the parent, where a **descendant** selector reaches
|
|
29
|
+
* anything the primitive laid out:
|
|
30
|
+
*
|
|
31
|
+
* ```css
|
|
32
|
+
* [data-loom-presented="false"] .my-panel { display: none }
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* The two properties that make the sibling form safe hold here unchanged, and
|
|
36
|
+
* they are the reason the rule must be written in this direction rather than
|
|
37
|
+
* its inverse. It matches nothing until the control has mounted, which is the
|
|
38
|
+
* no-scripting case — so the region must default to *visible* and be hidden by
|
|
39
|
+
* the rule, never shown by it, or a page served without scripting hides a panel
|
|
40
|
+
* behind a button that never arrives. And `display: none` takes the region out
|
|
41
|
+
* of the accessibility tree as well as the layout, so a closed panel is closed
|
|
42
|
+
* for a screen reader too, which the trigger's `aria-expanded` then describes
|
|
43
|
+
* correctly instead of contradicting.
|
|
44
|
+
*/
|
|
45
|
+
export declare const PRESENTED_ATTRIBUTE = "data-loom-presented";
|
|
46
|
+
/**
|
|
47
|
+
* The event a dismiss control dispatches to close the presentation it sits
|
|
48
|
+
* inside: bubbling, so the nearest presentation above it hears it and no other.
|
|
49
|
+
*
|
|
50
|
+
* This is the part of the seam that has no counterpart in `disclose`, and it is
|
|
51
|
+
* here because of the one thing a disclosure never has to do — **be closed by
|
|
52
|
+
* something that is not the control that opened it.** A menu is closed by its
|
|
53
|
+
* own button. A dialog is closed by a cross inside the panel, by Escape, and by
|
|
54
|
+
* a press on the page behind it; a dropdown by choosing something; a lightbox by
|
|
55
|
+
* any of the three. The first of those is a second control, and a click handler
|
|
56
|
+
* is a function, so it is the runtime's to build for the same reason the first
|
|
57
|
+
* one is (0009).
|
|
58
|
+
*
|
|
59
|
+
* Two controls of one primitive therefore have to agree about one boolean, and
|
|
60
|
+
* nothing in the seam let them. A behaviour is built as an independent node the
|
|
61
|
+
* primitive places where it likes, so the two have no common React ancestor to
|
|
62
|
+
* hold state, no provider between them, and no way to be handed a shared object:
|
|
63
|
+
* `build` runs on the server and a control's props cross the client boundary, so
|
|
64
|
+
* anything passed between them has to be serialisable.
|
|
65
|
+
*
|
|
66
|
+
* What they do share is the **DOM**, because the primitive placed both of them
|
|
67
|
+
* in it — and a bubbling event is the one channel that needs no common ancestor
|
|
68
|
+
* named in advance, no key to agree on, and nothing to clean up. The dismiss
|
|
69
|
+
* control dispatches from its own button; the presentation control listens on
|
|
70
|
+
* the element it was placed in. If the primitive laid the region out inside that
|
|
71
|
+
* element, which is what presenting a region means, the event arrives. If it did
|
|
72
|
+
* not, nothing happens — the same way a sibling selector matches nothing when a
|
|
73
|
+
* disclosure's region is not its sibling.
|
|
74
|
+
*
|
|
75
|
+
* A module-level store keyed by node id was the alternative and is worse in the
|
|
76
|
+
* way that matters: it would make two controls that are not in each other's
|
|
77
|
+
* subtree agree anyway, which reads as a feature and is really a guarantee that
|
|
78
|
+
* the first primitive to place them apart gets a dialog closed by a button
|
|
79
|
+
* somewhere else on the page.
|
|
80
|
+
*/
|
|
81
|
+
export declare const DISMISS_EVENT = "loom:dismiss";
|
|
82
|
+
//# sourceMappingURL=presented.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The present contract's one name, in a module with nothing else in it.
|
|
3
|
+
*
|
|
4
|
+
* It lives apart from `behaviour.ts` for the reason `disclosed.ts` does: code
|
|
5
|
+
* that only needs to *read* whether a region is showing should not have to
|
|
6
|
+
* import the React controls that write it (0136).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The attribute a presentation control stamps on **the element the primitive
|
|
10
|
+
* placed it in**: `"true"` while the region it opens is showing, `"false"`
|
|
11
|
+
* otherwise.
|
|
12
|
+
*
|
|
13
|
+
* **This is the whole of the contract between the runtime and a primitive that
|
|
14
|
+
* takes `present`.** It is an attribute for `disclosed.ts`'s reason — a
|
|
15
|
+
* stylesheet is what reads it — and it is on the *parent* for
|
|
16
|
+
* [0096](../../decisions/0096-a-behaviour-publishes-a-value-on-the-element-the-primitive-placed-it-in.md)'s,
|
|
17
|
+
* with the opposite half of that record's reasoning doing the work.
|
|
18
|
+
*
|
|
19
|
+
* `data-loom-disclosed` sits on the control's own button and is read
|
|
20
|
+
* **sideways**, by a sibling selector, because the region a disclosure opens is
|
|
21
|
+
* laid out beside its button. An overlay is not: a dialog's panel, a dropdown's
|
|
22
|
+
* menu and a lightbox's frame are all *inside* the box the primitive owns and
|
|
23
|
+
* the trigger is one element within it. A sibling selector cannot reach from the
|
|
24
|
+
* button to a region that is not its sibling, and the primitive cannot make it
|
|
25
|
+
* one without giving the trigger a wrapper whose only purpose is to be selected
|
|
26
|
+
* from — which is the cost `control.ts` already records against that shape.
|
|
27
|
+
*
|
|
28
|
+
* So the state goes on the parent, where a **descendant** selector reaches
|
|
29
|
+
* anything the primitive laid out:
|
|
30
|
+
*
|
|
31
|
+
* ```css
|
|
32
|
+
* [data-loom-presented="false"] .my-panel { display: none }
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* The two properties that make the sibling form safe hold here unchanged, and
|
|
36
|
+
* they are the reason the rule must be written in this direction rather than
|
|
37
|
+
* its inverse. It matches nothing until the control has mounted, which is the
|
|
38
|
+
* no-scripting case — so the region must default to *visible* and be hidden by
|
|
39
|
+
* the rule, never shown by it, or a page served without scripting hides a panel
|
|
40
|
+
* behind a button that never arrives. And `display: none` takes the region out
|
|
41
|
+
* of the accessibility tree as well as the layout, so a closed panel is closed
|
|
42
|
+
* for a screen reader too, which the trigger's `aria-expanded` then describes
|
|
43
|
+
* correctly instead of contradicting.
|
|
44
|
+
*/
|
|
45
|
+
export const PRESENTED_ATTRIBUTE = "data-loom-presented";
|
|
46
|
+
/**
|
|
47
|
+
* The event a dismiss control dispatches to close the presentation it sits
|
|
48
|
+
* inside: bubbling, so the nearest presentation above it hears it and no other.
|
|
49
|
+
*
|
|
50
|
+
* This is the part of the seam that has no counterpart in `disclose`, and it is
|
|
51
|
+
* here because of the one thing a disclosure never has to do — **be closed by
|
|
52
|
+
* something that is not the control that opened it.** A menu is closed by its
|
|
53
|
+
* own button. A dialog is closed by a cross inside the panel, by Escape, and by
|
|
54
|
+
* a press on the page behind it; a dropdown by choosing something; a lightbox by
|
|
55
|
+
* any of the three. The first of those is a second control, and a click handler
|
|
56
|
+
* is a function, so it is the runtime's to build for the same reason the first
|
|
57
|
+
* one is (0009).
|
|
58
|
+
*
|
|
59
|
+
* Two controls of one primitive therefore have to agree about one boolean, and
|
|
60
|
+
* nothing in the seam let them. A behaviour is built as an independent node the
|
|
61
|
+
* primitive places where it likes, so the two have no common React ancestor to
|
|
62
|
+
* hold state, no provider between them, and no way to be handed a shared object:
|
|
63
|
+
* `build` runs on the server and a control's props cross the client boundary, so
|
|
64
|
+
* anything passed between them has to be serialisable.
|
|
65
|
+
*
|
|
66
|
+
* What they do share is the **DOM**, because the primitive placed both of them
|
|
67
|
+
* in it — and a bubbling event is the one channel that needs no common ancestor
|
|
68
|
+
* named in advance, no key to agree on, and nothing to clean up. The dismiss
|
|
69
|
+
* control dispatches from its own button; the presentation control listens on
|
|
70
|
+
* the element it was placed in. If the primitive laid the region out inside that
|
|
71
|
+
* element, which is what presenting a region means, the event arrives. If it did
|
|
72
|
+
* not, nothing happens — the same way a sibling selector matches nothing when a
|
|
73
|
+
* disclosure's region is not its sibling.
|
|
74
|
+
*
|
|
75
|
+
* A module-level store keyed by node id was the alternative and is worse in the
|
|
76
|
+
* way that matters: it would make two controls that are not in each other's
|
|
77
|
+
* subtree agree anyway, which reads as a feature and is really a guarantee that
|
|
78
|
+
* the first primitive to place them apart gets a dialog closed by a button
|
|
79
|
+
* somewhere else on the page.
|
|
80
|
+
*/
|
|
81
|
+
export const DISMISS_EVENT = "loom:dismiss";
|
|
82
|
+
//# sourceMappingURL=presented.js.map
|