@wardic/solid 3.0.0-next.0 → 3.0.0-next.1
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 +17 -0
- package/dist/browser/animation-frame.js +1 -1
- package/dist/browser/animation-frame.js.map +1 -1
- package/dist/browser/config-view.js +2 -1
- package/dist/browser/config-view.js.map +1 -1
- package/dist/browser/diagnostic-codes.js +216 -0
- package/dist/browser/diagnostic-codes.js.map +1 -0
- package/dist/browser/diagnostics.js +79 -0
- package/dist/browser/diagnostics.js.map +1 -0
- package/dist/browser/element.js +7 -6
- package/dist/browser/element.js.map +1 -1
- package/dist/browser/frame-effect.js +1 -1
- package/dist/browser/frame-effect.js.map +1 -1
- package/dist/browser/gesture-callbacks.js +1 -1
- package/dist/browser/gesture-callbacks.js.map +1 -1
- package/dist/browser/hooks/drag.js +4 -3
- package/dist/browser/hooks/drag.js.map +1 -1
- package/dist/browser/hooks/presence-scope.js +2 -1
- package/dist/browser/hooks/presence-scope.js.map +1 -1
- package/dist/browser/hooks/reorder-elements.js +5 -4
- package/dist/browser/hooks/reorder-elements.js.map +1 -1
- package/dist/browser/hooks/rune.js +4 -3
- package/dist/browser/hooks/rune.js.map +1 -1
- package/dist/browser/hooks/ward.js +31 -12
- package/dist/browser/hooks/ward.js.map +1 -1
- package/dist/browser/hooks/wards.js +3 -2
- package/dist/browser/hooks/wards.js.map +1 -1
- package/dist/browser/provider.js +40 -21
- package/dist/browser/provider.js.map +1 -1
- package/dist/browser/reorder.js +5 -4
- package/dist/browser/reorder.js.map +1 -1
- package/dist/browser/runtime.js +26 -15
- package/dist/browser/runtime.js.map +1 -1
- package/dist/browser/spans-check.js +8 -3
- package/dist/browser/spans-check.js.map +1 -1
- package/dist/browser/v1/index.js +1 -1
- package/dist/browser/ward.js +25 -19
- package/dist/browser/ward.js.map +1 -1
- package/dist/server/animation-frame.js +1 -1
- package/dist/server/animation-frame.js.map +1 -1
- package/dist/server/config-view.js +2 -1
- package/dist/server/config-view.js.map +1 -1
- package/dist/server/diagnostic-codes.js +216 -0
- package/dist/server/diagnostic-codes.js.map +1 -0
- package/dist/server/diagnostics.js +79 -0
- package/dist/server/diagnostics.js.map +1 -0
- package/dist/server/element.js +7 -6
- package/dist/server/element.js.map +1 -1
- package/dist/server/frame-effect.js +1 -1
- package/dist/server/frame-effect.js.map +1 -1
- package/dist/server/gesture-callbacks.js +1 -1
- package/dist/server/gesture-callbacks.js.map +1 -1
- package/dist/server/hooks/drag.js +4 -3
- package/dist/server/hooks/drag.js.map +1 -1
- package/dist/server/hooks/presence-scope.js +2 -1
- package/dist/server/hooks/presence-scope.js.map +1 -1
- package/dist/server/hooks/reorder-elements.js +5 -4
- package/dist/server/hooks/reorder-elements.js.map +1 -1
- package/dist/server/hooks/rune.js +4 -3
- package/dist/server/hooks/rune.js.map +1 -1
- package/dist/server/hooks/ward.js +31 -12
- package/dist/server/hooks/ward.js.map +1 -1
- package/dist/server/hooks/wards.js +3 -2
- package/dist/server/hooks/wards.js.map +1 -1
- package/dist/server/provider.js +40 -21
- package/dist/server/provider.js.map +1 -1
- package/dist/server/reorder.js +5 -4
- package/dist/server/reorder.js.map +1 -1
- package/dist/server/runtime.js +26 -15
- package/dist/server/runtime.js.map +1 -1
- package/dist/server/spans-check.js +8 -3
- package/dist/server/spans-check.js.map +1 -1
- package/dist/server/v1/index.js +1 -1
- package/dist/server/ward.js +25 -19
- package/dist/server/ward.js.map +1 -1
- package/dist/solid/animation-frame.js +1 -1
- package/dist/solid/animation-frame.js.map +1 -1
- package/dist/solid/config-view.d.ts.map +1 -1
- package/dist/solid/config-view.js +2 -1
- package/dist/solid/config-view.js.map +1 -1
- package/dist/solid/diagnostic-codes.d.ts +10 -0
- package/dist/solid/diagnostic-codes.d.ts.map +1 -0
- package/dist/solid/diagnostic-codes.js +246 -0
- package/dist/solid/diagnostic-codes.js.map +1 -0
- package/dist/solid/diagnostics.d.ts +33 -0
- package/dist/solid/diagnostics.d.ts.map +1 -0
- package/dist/solid/diagnostics.js +76 -0
- package/dist/solid/diagnostics.js.map +1 -0
- package/dist/solid/element.d.ts.map +1 -1
- package/dist/solid/element.jsx +8 -8
- package/dist/solid/element.jsx.map +1 -1
- package/dist/solid/frame-effect.jsx +1 -1
- package/dist/solid/frame-effect.jsx.map +1 -1
- package/dist/solid/gesture-callbacks.js +1 -1
- package/dist/solid/gesture-callbacks.js.map +1 -1
- package/dist/solid/hooks/drag.d.ts.map +1 -1
- package/dist/solid/hooks/drag.js +4 -3
- package/dist/solid/hooks/drag.js.map +1 -1
- package/dist/solid/hooks/presence-scope.d.ts.map +1 -1
- package/dist/solid/hooks/presence-scope.jsx +2 -1
- package/dist/solid/hooks/presence-scope.jsx.map +1 -1
- package/dist/solid/hooks/reorder-elements.d.ts.map +1 -1
- package/dist/solid/hooks/reorder-elements.jsx +5 -4
- package/dist/solid/hooks/reorder-elements.jsx.map +1 -1
- package/dist/solid/hooks/rune.d.ts.map +1 -1
- package/dist/solid/hooks/rune.js +4 -3
- package/dist/solid/hooks/rune.js.map +1 -1
- package/dist/solid/hooks/ward.d.ts.map +1 -1
- package/dist/solid/hooks/ward.js +35 -14
- package/dist/solid/hooks/ward.js.map +1 -1
- package/dist/solid/hooks/wards.d.ts.map +1 -1
- package/dist/solid/hooks/wards.js +3 -2
- package/dist/solid/hooks/wards.js.map +1 -1
- package/dist/solid/provider.d.ts.map +1 -1
- package/dist/solid/provider.jsx +41 -21
- package/dist/solid/provider.jsx.map +1 -1
- package/dist/solid/reorder.d.ts.map +1 -1
- package/dist/solid/reorder.jsx +5 -4
- package/dist/solid/reorder.jsx.map +1 -1
- package/dist/solid/runtime.d.ts +20 -7
- package/dist/solid/runtime.d.ts.map +1 -1
- package/dist/solid/runtime.js +25 -14
- package/dist/solid/runtime.js.map +1 -1
- package/dist/solid/spans-check.d.ts +5 -1
- package/dist/solid/spans-check.d.ts.map +1 -1
- package/dist/solid/spans-check.js +8 -3
- package/dist/solid/spans-check.js.map +1 -1
- package/dist/solid/v1/index.d.ts +1 -1
- package/dist/solid/v1/index.jsx +1 -1
- package/dist/solid/ward.d.ts.map +1 -1
- package/dist/solid/ward.jsx +25 -19
- package/dist/solid/ward.jsx.map +1 -1
- package/package.json +8 -6
- package/skills/wardic-diagnostics/SKILL.md +472 -0
- package/skills/wardic-migrate/SKILL.md +204 -0
- package/skills/wardic-solid/SKILL.md +60 -0
- package/skills/wardic-solid/events.md +70 -0
- package/skills/wardic-solid/from-motion.md +59 -0
- package/skills/wardic-solid/lists-and-presence.md +110 -0
- package/skills/wardic-solid/reorder-and-grips.md +88 -0
- package/skills/wardic-solid/runes.md +151 -0
- package/skills/wardic-solid/scopes-and-settings.md +75 -0
- package/src/animation-frame.ts +1 -1
- package/src/config-view.ts +5 -1
- package/src/diagnostic-codes.ts +254 -0
- package/src/diagnostics.ts +88 -0
- package/src/element.tsx +13 -10
- package/src/frame-effect.tsx +1 -1
- package/src/gesture-callbacks.ts +1 -1
- package/src/hooks/drag.ts +4 -3
- package/src/hooks/presence-scope.tsx +2 -1
- package/src/hooks/reorder-elements.tsx +6 -4
- package/src/hooks/rune.ts +4 -3
- package/src/hooks/ward.ts +36 -12
- package/src/hooks/wards.ts +4 -2
- package/src/provider.tsx +43 -20
- package/src/reorder.tsx +5 -4
- package/src/runtime.ts +43 -13
- package/src/spans-check.ts +12 -3
- package/src/v1/index.tsx +1 -1
- package/src/ward.tsx +27 -19
package/src/ward.tsx
CHANGED
|
@@ -94,6 +94,7 @@ import * as OwnerScope from "@wardic/dom/unstable/OwnerScope"
|
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
import * as GestureFeatures from "@wardic/dom/unstable/GestureFeatures"
|
|
97
|
+
import { misuse, report } from "./diagnostics.ts"
|
|
97
98
|
import { inViewOptionsOf } from "./gesture-callbacks.ts"
|
|
98
99
|
import type { WardicRuntime, WardicServices } from "./runtime.ts"
|
|
99
100
|
import * as Keys from "@wardic/dom/unstable/features/Keys"
|
|
@@ -162,6 +163,10 @@ const missingMessage = (feature: string, what: string): string =>
|
|
|
162
163
|
`which this element's WardicProvider doesn't have. Add it: \`import { ${feature} } from "${ENTRY}"\`, then \`<WardicProvider features={[${feature}]}>\`, or give it to \`makeWard({ features })\`.`,
|
|
163
164
|
)
|
|
164
165
|
|
|
166
|
+
/** Development's word on a missing Feature, once a provider, as its coded diagnostic (solid-next). */
|
|
167
|
+
const warnMissing = (registry: Feature.FeatureRegistry, feature: string, what: string): void =>
|
|
168
|
+
registry.warnOnce(feature, missingMessage(feature, what), "WARDIC_FEATURE_MISSING")
|
|
169
|
+
|
|
165
170
|
/** A ward's config values: the element's motion, and its `style`. */
|
|
166
171
|
export interface WardConfigValues extends Omit<DomWardConfig.WardConfig, SolidOneCallback> {
|
|
167
172
|
/**
|
|
@@ -265,7 +270,7 @@ export const wardConfigView = (config: WardConfig): WardConfigValues => WARD_VIE
|
|
|
265
270
|
|
|
266
271
|
/** A config given whole as an accessor, which the Solid 2 binding no longer reads (#259). */
|
|
267
272
|
const WHOLE_ACCESSOR =
|
|
268
|
-
"ward(config) takes its config as an object, read per key
|
|
273
|
+
"ward(config) takes its config as an object, read per key: make a key reactive with an accessor " +
|
|
269
274
|
"(`ward({ animate: () => ({ x: x() }) })`), a getter, a store or a component's props, not the whole config " +
|
|
270
275
|
"(`ward(() => ({ … }))`)."
|
|
271
276
|
|
|
@@ -957,7 +962,7 @@ const warnUnreadColors = (registry: Feature.FeatureRegistry, features: Feature.F
|
|
|
957
962
|
},
|
|
958
963
|
(unread) => {
|
|
959
964
|
if (Predicate.isUndefined(unread)) return
|
|
960
|
-
registry
|
|
965
|
+
warnMissing(registry, "colors", `The colour \`${unread}\``)
|
|
961
966
|
},
|
|
962
967
|
CLIENT_ONLY,
|
|
963
968
|
)
|
|
@@ -972,7 +977,7 @@ const carriesFor = (internal: WardInternals, config: WardConfigValues): boolean
|
|
|
972
977
|
/** A child made with `{ parent }` naming a Listening ward (#398's Q10). */
|
|
973
978
|
const LISTENING_PARENT =
|
|
974
979
|
"ward(config, { parent }): the parent given carries no variants (no `variants` or `inherit` in its ward({ … })): it only listens, " +
|
|
975
|
-
"and its element's props hold its variants, so a child can't join it by `{ parent }
|
|
980
|
+
"and its element's props hold its variants, so a child can't join it by `{ parent }`. Render the child inside that " +
|
|
976
981
|
"ward's element, where it joins through the tree, or put the variants in the parent's ward({ … })."
|
|
977
982
|
|
|
978
983
|
/** The **Layout group** a ward made here with `internal` is in: its maker's choice, else the one around it. */
|
|
@@ -1007,7 +1012,7 @@ const variantParentOf = (internal: WardInternals): VariantTree.WardicVariantCont
|
|
|
1007
1012
|
}
|
|
1008
1013
|
const parent = shareOf(internal.parent)
|
|
1009
1014
|
if (Predicate.isNotUndefined(parent)) {
|
|
1010
|
-
if (Bool.not(parent.carries)) throw
|
|
1015
|
+
if (Bool.not(parent.carries)) throw misuse("WARDIC_PARENT_WITHOUT_VARIANTS", LISTENING_PARENT)
|
|
1011
1016
|
return parent.provided
|
|
1012
1017
|
}
|
|
1013
1018
|
return useVariantContext()
|
|
@@ -1150,7 +1155,7 @@ const variantChildBy = <C extends WardConfigValues>(internal: WardInternals, con
|
|
|
1150
1155
|
export const configAtSetup = (setup: { readonly config: WardConfigValues; readonly pending: ReadonlyArray<string> }): WardConfigValues => {
|
|
1151
1156
|
if (setup.pending.length === 0) return setup.config
|
|
1152
1157
|
const fixed = Arr.findFirst(setup.pending, (key) => Bool.not(LOADS_AS_IT_GOES.has(key)))
|
|
1153
|
-
if (Option.isSome(fixed)) throw
|
|
1158
|
+
if (Option.isSome(fixed)) throw misuse("WARDIC_KEY_LOADING_AT_SETUP", loadingAtSetup(fixed.value))
|
|
1154
1159
|
const config = setup.config
|
|
1155
1160
|
if (Bool.and(Arr.contains(setup.pending, "animate"), Predicate.isNotUndefined(config.variants))) return { ...config, animate: LOADING_NAMES as NonNullable<WardConfigValues["animate"]> }
|
|
1156
1161
|
return config
|
|
@@ -1175,7 +1180,7 @@ const layoutArrivedIn = (arrive: ((projection: ProjectionSystem.Shape) => void)
|
|
|
1175
1180
|
|
|
1176
1181
|
|
|
1177
1182
|
export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
1178
|
-
if (Predicate.isFunction(config)) throw
|
|
1183
|
+
if (Predicate.isFunction(config)) throw misuse("WARDIC_CONFIG_AS_ACCESSOR", WHOLE_ACCESSOR)
|
|
1179
1184
|
const runtime = useWardicRuntime()
|
|
1180
1185
|
// Its Features (#511, ADR-0067), a Complete element's every one: what they register, a server
|
|
1181
1186
|
// render's elements read too (the `colors` Feature's spaces).
|
|
@@ -1249,7 +1254,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
|
1249
1254
|
// The values it starts from, read once (ADR-0003): its `initial`, or the one it inherits, or its
|
|
1250
1255
|
// `animate` with `initial={false}` (its own, inherited, or its presence's first render, #134).
|
|
1251
1256
|
const presenceBlocks = PresenceRecord.presenceBlocksInitial(presence)
|
|
1252
|
-
if (Bool.and(Arr.contains(setup.pending, "animate"), VariantTree.startsAtAnimate(initialConfig, node.inherited, presenceBlocks))) throw
|
|
1257
|
+
if (Bool.and(Arr.contains(setup.pending, "animate"), VariantTree.startsAtAnimate(initialConfig, node.inherited, presenceBlocks))) throw misuse("WARDIC_KEY_LOADING_AT_SETUP", STARTS_AT_PENDING)
|
|
1253
1258
|
// Untracked as a whole: a target that's a store's (a store given as a hook's rune) is read here,
|
|
1254
1259
|
// in the component's body, for its values now.
|
|
1255
1260
|
const start = untrack(() => Spine.startOf(initialConfig, node.inherited, presenceBlocks, untrack))
|
|
@@ -1366,7 +1371,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
|
1366
1371
|
return UndefinedOr.match(pending, { onUndefined: () => untrack(features.pending), onDefined: identity })
|
|
1367
1372
|
}
|
|
1368
1373
|
if (DEV && wantsNode && Predicate.isUndefined(layoutProjection) && Bool.not(untrack(features.pending))) {
|
|
1369
|
-
useFeatureRegistry()
|
|
1374
|
+
warnMissing(useFeatureRegistry(), "layout", Feature.LAYOUT_PROPS)
|
|
1370
1375
|
}
|
|
1371
1376
|
const layoutNodes = Bool.match(wantsNode, { onTrue: () => layoutProjection, onFalse: constUndefined })
|
|
1372
1377
|
const dragTransition = DragTransition.dragTransitionOf(initialConfig.dragElastic, initialConfig.dragTransition)
|
|
@@ -1437,9 +1442,12 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
|
1437
1442
|
{ equals: sameTarget, transparent: true },
|
|
1438
1443
|
)
|
|
1439
1444
|
// A colour only the `colors` Feature reads, on a Slim element without it (#511, decision 7): said
|
|
1440
|
-
// once per provider, in development only, and not while a lazy load is on its way.
|
|
1445
|
+
// once per provider, in development only, and not while a lazy load is on its way. Not of a ward that
|
|
1446
|
+
// asks for its Features as it uses them (`targeted`, the hooks'): it asks for `colors` a microtask after
|
|
1447
|
+
// a colour shows, when this had already found none on its way, and said so wrongly (AS2, CL1; seen once
|
|
1448
|
+
// it was coded, where it had gone to Effect's log unread).
|
|
1441
1449
|
// eslint-disable-next-line solid/reactivity -- read inside the warning's effect, where it tracks
|
|
1442
|
-
if (DEV && internal.complete !== true) warnUnreadColors(useFeatureRegistry(), features, () => target().resolved)
|
|
1450
|
+
if (DEV && Bool.and(internal.complete !== true, Predicate.isUndefined(internal.targeted))) warnUnreadColors(useFeatureRegistry(), features, () => target().resolved)
|
|
1443
1451
|
// Its gesture states, for what its variant node hands down (#291): bound at setup, before its
|
|
1444
1452
|
// children read them. Read from the gestures themselves, not the target: a gesture whose layer
|
|
1445
1453
|
// resolves to nothing new leaves the target as it was (`sameResolution`), but is on all the same.
|
|
@@ -1520,7 +1528,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
|
1520
1528
|
if (Bool.not(wanted)) return undefined
|
|
1521
1529
|
const service = GestureFeatures.serviceIn(services, key)
|
|
1522
1530
|
if (DEV && Predicate.isUndefined(service) && Bool.not(untrack(features.pending))) {
|
|
1523
|
-
featureRegistry
|
|
1531
|
+
warnMissing(featureRegistry, name, GestureFeatures.GESTURE_WORDS[name])
|
|
1524
1532
|
}
|
|
1525
1533
|
return service
|
|
1526
1534
|
}
|
|
@@ -1657,7 +1665,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
|
1657
1665
|
})
|
|
1658
1666
|
|
|
1659
1667
|
const mount = (el: HTMLElement): Mounted => {
|
|
1660
|
-
if (justLeft.has(el)) throw
|
|
1668
|
+
if (justLeft.has(el)) throw misuse("WARDIC_WARD_MADE_IN_SPREAD", REMADE)
|
|
1661
1669
|
// The ward a component was given follows this element while it's mounted (#349): one at a time.
|
|
1662
1670
|
let undrive: (() => void) | undefined
|
|
1663
1671
|
if (Predicate.isNotUndefined(share)) {
|
|
@@ -1963,7 +1971,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
|
1963
1971
|
// Its node reads its config's options (its `layoutId`, an accessor's): untracked, as at its mount, so said.
|
|
1964
1972
|
UndefinedOr.map(mounted, (m) => untrack(() => layoutArrivedIn(m.arriveLayout, services)))
|
|
1965
1973
|
if (DEV && Predicate.isUndefined(Keys.projectionIn(services)) && Bool.not(pending)) {
|
|
1966
|
-
featureRegistry
|
|
1974
|
+
warnMissing(featureRegistry, "layout", Feature.LAYOUT_PROPS)
|
|
1967
1975
|
}
|
|
1968
1976
|
},
|
|
1969
1977
|
CLIENT_ONLY_DEFERRED,
|
|
@@ -1989,7 +1997,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
|
1989
1997
|
startRecognizers(m)
|
|
1990
1998
|
}),
|
|
1991
1999
|
onUndefined: () => {
|
|
1992
|
-
if (DEV && Bool.not(pending)) featureRegistry
|
|
2000
|
+
if (DEV && Bool.not(pending)) warnMissing(featureRegistry, "drag", GestureFeatures.GESTURE_WORDS.drag)
|
|
1993
2001
|
},
|
|
1994
2002
|
})
|
|
1995
2003
|
},
|
|
@@ -2035,7 +2043,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
|
2035
2043
|
if (Predicate.isUndefined(mounted) || mounted.element !== el) {
|
|
2036
2044
|
// Another element it was spread on, or the one it's on, still on the page: a ward drives one
|
|
2037
2045
|
// element at a time (#349's Q5). One the page has let go of is left behind.
|
|
2038
|
-
if (Bool.or(stillOn(refdBefore, el), stillOn(UndefinedOr.map(mounted, elementOfMount), el))) throw
|
|
2046
|
+
if (Bool.or(stillOn(refdBefore, el), stillOn(UndefinedOr.map(mounted, elementOfMount), el))) throw misuse("WARDIC_WARD_ON_TWO_SUBJECTS", secondElement("ward(config)"))
|
|
2039
2047
|
refdBefore = undefined
|
|
2040
2048
|
// Held off the page: nothing starts until it's on it.
|
|
2041
2049
|
if (heldBack(el)) return
|
|
@@ -2186,7 +2194,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
|
|
|
2186
2194
|
* element of its own (#349's Q5).
|
|
2187
2195
|
*/
|
|
2188
2196
|
const drive = (next: Driver, name: string): (() => void) => {
|
|
2189
|
-
if (Bool.or(Predicate.isNotUndefined(driver), stillOn(UndefinedOr.map(mounted, elementOfMount), undefined))) throw
|
|
2197
|
+
if (Bool.or(Predicate.isNotUndefined(driver), stillOn(UndefinedOr.map(mounted, elementOfMount), undefined))) throw misuse("WARDIC_WARD_ON_TWO_SUBJECTS", secondElement(name))
|
|
2190
2198
|
driver = next
|
|
2191
2199
|
UndefinedOr.map(driven, (atom) => registry().set(atom, next))
|
|
2192
2200
|
return () => {
|
|
@@ -2411,7 +2419,7 @@ const serverWard = (config: WardConfig, internal: WardInternals): Ward => {
|
|
|
2411
2419
|
// Where it's made, its given parent's, or its given ward's (#349).
|
|
2412
2420
|
const parent = variantParentOf(internal)
|
|
2413
2421
|
const presenceBlocks = PresenceRecord.presenceBlocksInitial(usePresenceContext())
|
|
2414
|
-
if (Bool.and(Arr.contains(setup.pending, "animate"), VariantTree.startsAtAnimate(atSetup, VariantTree.inheritedContext(atSetup, parent), presenceBlocks))) throw
|
|
2422
|
+
if (Bool.and(Arr.contains(setup.pending, "animate"), VariantTree.startsAtAnimate(atSetup, VariantTree.inheritedContext(atSetup, parent), presenceBlocks))) throw misuse("WARDIC_KEY_LOADING_AT_SETUP", STARTS_AT_PENDING)
|
|
2415
2423
|
const c = variantChildBy(internal, AnimationControls.uncontrolledOf(WARD_VIEW.snapshotOf(view)))
|
|
2416
2424
|
const node = VariantTree.serverVariantNode(c, parent)
|
|
2417
2425
|
const serverStart = Spine.startOf(c, node.inherited, presenceBlocks, untrack)
|
|
@@ -2539,7 +2547,7 @@ const sayEarly = (member: HandedOn): void => {
|
|
|
2539
2547
|
if (Predicate.isUndefined(DEV)) return
|
|
2540
2548
|
if (SAID_EARLY.has(member)) return
|
|
2541
2549
|
SAID_EARLY.add(member)
|
|
2542
|
-
|
|
2550
|
+
report("WARDIC_RUNE_READ_TOO_EARLY", usedEarly(member))
|
|
2543
2551
|
}
|
|
2544
2552
|
|
|
2545
2553
|
/** The finished ward each function rune's ward hands on to, told it by {@link holderFinished}. */
|
|
@@ -2616,7 +2624,7 @@ const clientHolder = (internal: WardInternals, parent: VariantTree.WardicVariant
|
|
|
2616
2624
|
}
|
|
2617
2625
|
// Followed by one finished ward at a time (#349's Q5).
|
|
2618
2626
|
const drive = (next: Driver, name: string): (() => void) => {
|
|
2619
|
-
if (Predicate.isNotUndefined(driver)) throw
|
|
2627
|
+
if (Predicate.isNotUndefined(driver)) throw misuse("WARDIC_WARD_ON_TWO_SUBJECTS", secondElement(name))
|
|
2620
2628
|
driver = next
|
|
2621
2629
|
UndefinedOr.map(driven, (atom) => registry().set(atom, next))
|
|
2622
2630
|
return () => {
|