@serene-pub/sdk 0.6.0-pr-2 → 0.6.0-pr-5
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 +24 -20
- package/dist/actions.d.ts +150 -68
- package/dist/actions.js +90 -36
- package/dist/annexFields.d.ts +8 -4
- package/dist/annexFields.js +5 -2
- package/dist/announce.d.ts +78 -28
- package/dist/announce.js +14 -5
- package/dist/attributes.d.ts +9 -6
- package/dist/attributes.js +9 -5
- package/dist/bands.d.ts +41 -6
- package/dist/bands.js +83 -33
- package/dist/builder.d.ts +161 -58
- package/dist/builder.js +128 -22
- package/dist/candidates.d.ts +5 -3
- package/dist/candidates.js +3 -2
- package/dist/clauses.d.ts +2 -1
- package/dist/clauses.js +2 -1
- package/dist/component.d.ts +24 -7
- package/dist/component.js +16 -6
- package/dist/componentBuild.d.ts +16 -5
- package/dist/componentBuild.js +14 -5
- package/dist/componentClient.d.ts +61 -30
- package/dist/componentClient.js +11 -1
- package/dist/componentImports.d.ts +8 -5
- package/dist/componentImports.js +23 -4
- package/dist/componentModule.js +2 -1
- package/dist/componentWire.d.ts +2 -1
- package/dist/componentWire.js +34 -2
- package/dist/config.d.ts +28 -14
- package/dist/config.js +20 -10
- package/dist/connections.d.ts +9 -4
- package/dist/connections.js +7 -4
- package/dist/declarations.d.ts +46 -17
- package/dist/declarations.js +46 -15
- package/dist/descriptors.d.ts +242 -97
- package/dist/descriptors.js +145 -41
- package/dist/dev.d.ts +6 -5
- package/dist/dev.js +6 -5
- package/dist/document.d.ts +74 -25
- package/dist/document.js +32 -11
- package/dist/dowry.d.ts +241 -0
- package/dist/dowry.js +315 -0
- package/dist/engines.d.ts +16 -7
- package/dist/engines.js +6 -4
- package/dist/eventMapLaws.d.ts +19 -8
- package/dist/eventMapLaws.js +9 -6
- package/dist/events.d.ts +101 -39
- package/dist/events.js +106 -33
- package/dist/executor.d.ts +122 -41
- package/dist/executor.js +195 -96
- package/dist/extension.d.ts +99 -35
- package/dist/extension.js +43 -9
- package/dist/facets.d.ts +2 -1
- package/dist/facets.js +4 -2
- package/dist/foldedSections.d.ts +4 -2
- package/dist/foldedSections.js +2 -1
- package/dist/genres.d.ts +123 -41
- package/dist/genres.js +127 -22
- package/dist/guardedConnection.d.ts +4 -3
- package/dist/guardedConnection.js +4 -3
- package/dist/handlebarsReach.d.ts +1 -1
- package/dist/handlebarsReach.js +1 -1
- package/dist/hash.d.ts +16 -5
- package/dist/hash.js +14 -4
- package/dist/hookGrants.d.ts +3 -2
- package/dist/hookGrants.js +6 -4
- package/dist/hooks.d.ts +21 -16
- package/dist/hooks.js +12 -10
- package/dist/hostElements.d.ts +41 -17
- package/dist/hostElements.js +49 -17
- package/dist/i18n.d.ts +5 -3
- package/dist/i18n.js +5 -3
- package/dist/identity.d.ts +5 -4
- package/dist/identity.js +5 -4
- package/dist/index.d.ts +5 -0
- package/dist/index.js +15 -0
- package/dist/layout.d.ts +36 -15
- package/dist/layout.js +2 -2
- package/dist/loadouts.d.ts +97 -0
- package/dist/loadouts.js +81 -0
- package/dist/media.d.ts +26 -4
- package/dist/media.js +2 -1
- package/dist/messageBlocks.d.ts +44 -32
- package/dist/messageBlocks.js +23 -18
- package/dist/migration.d.ts +16 -8
- package/dist/migration.js +14 -8
- package/dist/names.d.ts +2 -1
- package/dist/names.js +2 -1
- package/dist/nodeInput.d.ts +2 -1
- package/dist/nodeInput.js +2 -1
- package/dist/participants.d.ts +22 -15
- package/dist/participants.js +14 -12
- package/dist/personGate.d.ts +2 -1
- package/dist/personGate.js +2 -1
- package/dist/pluginHarness.d.ts +8 -3
- package/dist/pluginHarness.js +4 -2
- package/dist/pluginPermissions.d.ts +2 -1
- package/dist/pluginPermissions.js +12 -1
- package/dist/pluginRuleRef.d.ts +2 -2
- package/dist/pluginRuleRef.js +1 -1
- package/dist/predicates.d.ts +16 -11
- package/dist/predicates.js +7 -6
- package/dist/preview.d.ts +8 -3
- package/dist/preview.js +2 -1
- package/dist/promptBlocks.d.ts +5 -3
- package/dist/promptBlocks.js +5 -3
- package/dist/rankingDecisions.d.ts +2 -1
- package/dist/rankingDecisions.js +2 -1
- package/dist/receipt.d.ts +65 -29
- package/dist/receipt.js +9 -4
- package/dist/receiverRules.js +3 -2
- package/dist/refs.d.ts +34 -9
- package/dist/refs.js +33 -13
- package/dist/registry.d.ts +42 -23
- package/dist/registry.js +7 -5
- package/dist/review.d.ts +16 -5
- package/dist/review.js +11 -4
- package/dist/sampling.d.ts +54 -0
- package/dist/sampling.js +95 -3
- package/dist/sceneSettings.d.ts +312 -0
- package/dist/sceneSettings.js +425 -0
- package/dist/scope.d.ts +6 -4
- package/dist/scope.js +4 -3
- package/dist/scripts.d.ts +81 -14
- package/dist/scripts.js +90 -11
- package/dist/sessionDossier.d.ts +521 -0
- package/dist/sessionDossier.js +33 -0
- package/dist/sessionLayout.d.ts +303 -19
- package/dist/sessionLayout.js +354 -40
- package/dist/sessionSettings.d.ts +8 -5
- package/dist/settings.d.ts +45 -20
- package/dist/settings.js +19 -12
- package/dist/settingsSlot.d.ts +11 -8
- package/dist/settingsSlot.js +11 -8
- package/dist/shapes.d.ts +103 -41
- package/dist/shapes.js +105 -40
- package/dist/sheets.d.ts +4 -2
- package/dist/sheets.js +6 -3
- package/dist/statShapes.d.ts +2 -1
- package/dist/statShapes.js +2 -1
- package/dist/status.d.ts +13 -9
- package/dist/status.js +8 -6
- package/dist/storage.d.ts +2 -1
- package/dist/storage.js +2 -1
- package/dist/storyTime.d.ts +13 -7
- package/dist/storyTime.js +11 -6
- package/dist/strokes.d.ts +176 -0
- package/dist/strokes.js +281 -0
- package/dist/surfaces.d.ts +54 -25
- package/dist/surfaces.js +3 -3
- package/dist/template.d.ts +9 -5
- package/dist/template.js +5 -3
- package/dist/templateCheck.d.ts +2 -2
- package/dist/templateCheck.js +2 -2
- package/dist/templateFit.d.ts +37 -8
- package/dist/templateFit.js +92 -8
- package/dist/templateIds.d.ts +3 -3
- package/dist/templateIds.js +3 -3
- package/dist/templateScopeAt.d.ts +21 -11
- package/dist/templateScopeAt.js +21 -11
- package/dist/testing.d.ts +11 -4
- package/dist/testing.js +13 -5
- package/dist/tokenizers.d.ts +2 -2
- package/dist/tokenizers.js +2 -2
- package/dist/turnLock.d.ts +4 -2
- package/dist/turnLock.js +2 -1
- package/dist/turnOrder.d.ts +17 -11
- package/dist/turnOrder.js +9 -5
- package/dist/validate.d.ts +11 -8
- package/dist/validate.js +81 -10
- package/dist/values.d.ts +17 -8
- package/dist/values.js +11 -6
- package/dist/variables.d.ts +46 -7
- package/dist/variables.js +87 -6
- package/dist/verdicts.d.ts +20 -13
- package/dist/verdicts.js +17 -11
- package/dist/widgetDecls.d.ts +8 -4
- package/dist/widgetDecls.js +4 -2
- package/dist/widgets.d.ts +987 -94
- package/dist/widgets.js +93 -18
- package/dist/wire.d.ts +13 -6
- package/dist/wire.js +3 -3
- package/dist/worldinfo.d.ts +11 -6
- package/dist/worldinfo.js +8 -4
- package/host-elements.d.ts +13 -0
- package/package.json +1 -1
package/dist/verdicts.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Verdicts — one function per rule, heard at every door
|
|
2
|
+
* Verdicts — one function per rule, heard at every door.
|
|
3
3
|
*
|
|
4
4
|
* *A rule has exactly one verdict function. Every door — construction,
|
|
5
5
|
* `validate()`, publish (`saveDocument`), the registry, the run, the fire,
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* A **verdict** is a declaration: an id (`core:verdict/<slug>`), the law it
|
|
12
12
|
* comes from (the label a `Finding` carries — `R-20`, `F39`), the **doors**
|
|
13
13
|
* that hear it, a `judge` over one input, and a `failing()` input the
|
|
14
|
-
* conformance kit feeds through every declared door
|
|
14
|
+
* conformance kit feeds through every declared door expecting the
|
|
15
15
|
* verdict's own sentence back. The judge answers `{ ok: true }` or
|
|
16
16
|
* `{ ok: false, sentence, fix? }` — the sentence is the refusal a person
|
|
17
|
-
* reads, the fix is what to do instead (the teaching-error pattern,
|
|
18
|
-
*
|
|
17
|
+
* reads, the fix is what to do instead (the teaching-error pattern),
|
|
18
|
+
* and both are display text. A door quotes them; it composes
|
|
19
19
|
* nothing. Where a door has one string to speak through — a throw, a halt
|
|
20
20
|
* reason, a receipt note — it says the sentence and then the fix; where it
|
|
21
21
|
* has a `Finding`, the two are its `message` and `fix`.
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
* content-keyed rule every registry here applies (`refuseUnlessIdentical`),
|
|
46
46
|
* so a dev server's hot reload re-running this module is a no-op and a
|
|
47
47
|
* *different* declaration under a registered id still throws.
|
|
48
|
+
* @ruling 01 §13, plans/31 V4, C27, 15 §1.3, R-20
|
|
48
49
|
*/
|
|
49
50
|
import { type I18n } from './i18n.js';
|
|
50
51
|
import { type EnabledWhen } from './predicates.js';
|
|
@@ -104,11 +105,12 @@ export interface VerdictDecl<I> {
|
|
|
104
105
|
/** The one judgement. Pure: the same input answers the same sentence at every door. */
|
|
105
106
|
judge(input: I): VerdictResult;
|
|
106
107
|
/**
|
|
107
|
-
* A failing input the conformance kit feeds through the named door
|
|
108
|
+
* A failing input the conformance kit feeds through the named door;
|
|
108
109
|
* `judge(failing(door))` must be `ok: false`. Named per door because a
|
|
109
110
|
* rule with several input kinds is heard through different ones at
|
|
110
|
-
* different doors —
|
|
111
|
+
* different doors — the settings-never-travel verdict's `construction` hears a declared port, its
|
|
111
112
|
* `validate` hears an edge — and the kit needs the one that door hears.
|
|
113
|
+
* @ruling C27, F39
|
|
112
114
|
*/
|
|
113
115
|
failing(door: Door): I;
|
|
114
116
|
}
|
|
@@ -150,14 +152,15 @@ export interface DisplayTextInput {
|
|
|
150
152
|
required?: boolean;
|
|
151
153
|
}
|
|
152
154
|
/**
|
|
153
|
-
* Display text is a non-blank string or a locale map with a non-blank `en
|
|
154
|
-
*
|
|
155
|
+
* Display text is a non-blank string or a locale map with a non-blank `en`.
|
|
156
|
+
* `i18nFindings` is the one check and
|
|
155
157
|
* answers at most one sentence per value; this is that check as a verdict.
|
|
156
158
|
* Every publish door runs it: `register()`, the builder's presets, `genre()`,
|
|
157
159
|
* `announce.build()`, the attribute, sheet, script-kind and value
|
|
158
160
|
* declarations, `validate()`, the CLI packager, a host's `saveDocument`, and
|
|
159
161
|
* the executor for a status (a note; the status is dropped, never a halt).
|
|
160
162
|
* @experimental
|
|
163
|
+
* @ruling R-20, U5i (ruled 2026-09-17)
|
|
161
164
|
*/
|
|
162
165
|
export declare const i18nVerdict: VerdictDecl<DisplayTextInput>;
|
|
163
166
|
/** @experimental */
|
|
@@ -169,12 +172,13 @@ export interface EnablementInput {
|
|
|
169
172
|
}
|
|
170
173
|
/**
|
|
171
174
|
* An action is offered now when every enabled-when predicate holds over the
|
|
172
|
-
* session's published values
|
|
175
|
+
* session's published values. The sentence is the
|
|
173
176
|
* author's own `reason` on the first predicate that fails — that is the
|
|
174
177
|
* design: the refusal a door quotes and the grey a listing shows are the
|
|
175
178
|
* author's words, in the person's language. `evaluateEnabledWhen` is the
|
|
176
179
|
* judge; the host's listing and its fire read it through here.
|
|
177
180
|
* @internal
|
|
181
|
+
* @ruling plans/29 R-15, U5e
|
|
178
182
|
*/
|
|
179
183
|
export declare const enablementVerdict: VerdictDecl<EnablementInput>;
|
|
180
184
|
/** @experimental */
|
|
@@ -198,11 +202,12 @@ export interface AudienceInput {
|
|
|
198
202
|
}
|
|
199
203
|
/**
|
|
200
204
|
* An action is a person's to use when they hold one of the references its
|
|
201
|
-
* audience names
|
|
205
|
+
* audience names: a portrayal naming them, or
|
|
202
206
|
* the item rule on the message. `audienceHolds` is the judge, the same
|
|
203
207
|
* function the listing's `canAct` reads, so a grey chip and a refusal at
|
|
204
208
|
* the fire can never disagree.
|
|
205
209
|
* @internal
|
|
210
|
+
* @ruling plans/29 R-15 *audience*
|
|
206
211
|
*/
|
|
207
212
|
export declare const audienceVerdict: VerdictDecl<AudienceInput>;
|
|
208
213
|
/**
|
|
@@ -230,7 +235,7 @@ export type SettingsTravelInput = {
|
|
|
230
235
|
port: string;
|
|
231
236
|
};
|
|
232
237
|
/**
|
|
233
|
-
* Settings never travel; only data does
|
|
238
|
+
* Settings never travel; only data does.
|
|
234
239
|
* `<nodeKey>.settings.*` — `enabled`, `review`, `mode` — is read by the
|
|
235
240
|
* executor at its owner and handed to nobody. It is not a port: a data edge
|
|
236
241
|
* drawn from it carries nothing, a reference naming it resolves to nothing,
|
|
@@ -240,6 +245,7 @@ export type SettingsTravelInput = {
|
|
|
240
245
|
* `validate()` (an edge, a reference) and by the executor (a reference in a
|
|
241
246
|
* document that skipped validation).
|
|
242
247
|
* @experimental
|
|
248
|
+
* @ruling 12 §2 P3, 29 §5d, F39
|
|
243
249
|
*/
|
|
244
250
|
export declare const settingsTravelVerdict: VerdictDecl<SettingsTravelInput>;
|
|
245
251
|
/**
|
|
@@ -261,8 +267,8 @@ export type ProvisionalInput = {
|
|
|
261
267
|
bound: boolean;
|
|
262
268
|
};
|
|
263
269
|
/**
|
|
264
|
-
* A provisional definition is declared, not bound
|
|
265
|
-
* because
|
|
270
|
+
* A provisional definition is declared, not bound: published
|
|
271
|
+
* because it is planned, run by no handler. A document placing one is
|
|
266
272
|
* refused where the author is — `validate()` — and again by the executor
|
|
267
273
|
* for a stored document older than the flag, so it halts on the law rather
|
|
268
274
|
* than on "no binding registered" pointing at the wrong file. The other
|
|
@@ -270,6 +276,7 @@ export type ProvisionalInput = {
|
|
|
270
276
|
* handler and no flag is a packaging error, said with the three things a
|
|
271
277
|
* person can do.
|
|
272
278
|
* @internal
|
|
279
|
+
* @ruling plans/29 R-2
|
|
273
280
|
*/
|
|
274
281
|
export declare const provisionalVerdict: VerdictDecl<ProvisionalInput>;
|
|
275
282
|
//# sourceMappingURL=verdicts.d.ts.map
|
package/dist/verdicts.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Verdicts — one function per rule, heard at every door
|
|
2
|
+
* Verdicts — one function per rule, heard at every door.
|
|
3
3
|
*
|
|
4
4
|
* *A rule has exactly one verdict function. Every door — construction,
|
|
5
5
|
* `validate()`, publish (`saveDocument`), the registry, the run, the fire,
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* A **verdict** is a declaration: an id (`core:verdict/<slug>`), the law it
|
|
12
12
|
* comes from (the label a `Finding` carries — `R-20`, `F39`), the **doors**
|
|
13
13
|
* that hear it, a `judge` over one input, and a `failing()` input the
|
|
14
|
-
* conformance kit feeds through every declared door
|
|
14
|
+
* conformance kit feeds through every declared door expecting the
|
|
15
15
|
* verdict's own sentence back. The judge answers `{ ok: true }` or
|
|
16
16
|
* `{ ok: false, sentence, fix? }` — the sentence is the refusal a person
|
|
17
|
-
* reads, the fix is what to do instead (the teaching-error pattern,
|
|
18
|
-
*
|
|
17
|
+
* reads, the fix is what to do instead (the teaching-error pattern),
|
|
18
|
+
* and both are display text. A door quotes them; it composes
|
|
19
19
|
* nothing. Where a door has one string to speak through — a throw, a halt
|
|
20
20
|
* reason, a receipt note — it says the sentence and then the fix; where it
|
|
21
21
|
* has a `Finding`, the two are its `message` and `fix`.
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
* content-keyed rule every registry here applies (`refuseUnlessIdentical`),
|
|
46
46
|
* so a dev server's hot reload re-running this module is a no-op and a
|
|
47
47
|
* *different* declaration under a registered id still throws.
|
|
48
|
+
* @ruling 01 §13, plans/31 V4, C27, 15 §1.3, R-20
|
|
48
49
|
*/
|
|
49
50
|
import { refuseUnlessIdentical } from './hash.js';
|
|
50
51
|
import { i18nFindings, i18nText } from './i18n.js';
|
|
@@ -133,14 +134,15 @@ export function sentenceText(r) {
|
|
|
133
134
|
return i18nText(r.sentence) ?? '';
|
|
134
135
|
}
|
|
135
136
|
/**
|
|
136
|
-
* Display text is a non-blank string or a locale map with a non-blank `en
|
|
137
|
-
*
|
|
137
|
+
* Display text is a non-blank string or a locale map with a non-blank `en`.
|
|
138
|
+
* `i18nFindings` is the one check and
|
|
138
139
|
* answers at most one sentence per value; this is that check as a verdict.
|
|
139
140
|
* Every publish door runs it: `register()`, the builder's presets, `genre()`,
|
|
140
141
|
* `announce.build()`, the attribute, sheet, script-kind and value
|
|
141
142
|
* declarations, `validate()`, the CLI packager, a host's `saveDocument`, and
|
|
142
143
|
* the executor for a status (a note; the status is dropped, never a halt).
|
|
143
144
|
* @experimental
|
|
145
|
+
* @ruling R-20, U5i (ruled 2026-09-17)
|
|
144
146
|
*/
|
|
145
147
|
export const i18nVerdict = defineVerdict({
|
|
146
148
|
id: 'core:verdict/i18n',
|
|
@@ -162,12 +164,13 @@ export const i18nVerdict = defineVerdict({
|
|
|
162
164
|
});
|
|
163
165
|
/**
|
|
164
166
|
* An action is offered now when every enabled-when predicate holds over the
|
|
165
|
-
* session's published values
|
|
167
|
+
* session's published values. The sentence is the
|
|
166
168
|
* author's own `reason` on the first predicate that fails — that is the
|
|
167
169
|
* design: the refusal a door quotes and the grey a listing shows are the
|
|
168
170
|
* author's words, in the person's language. `evaluateEnabledWhen` is the
|
|
169
171
|
* judge; the host's listing and its fire read it through here.
|
|
170
172
|
* @internal
|
|
173
|
+
* @ruling plans/29 R-15, U5e
|
|
171
174
|
*/
|
|
172
175
|
export const enablementVerdict = defineVerdict({
|
|
173
176
|
id: 'core:verdict/enablement',
|
|
@@ -190,11 +193,12 @@ export const enablementVerdict = defineVerdict({
|
|
|
190
193
|
});
|
|
191
194
|
/**
|
|
192
195
|
* An action is a person's to use when they hold one of the references its
|
|
193
|
-
* audience names
|
|
196
|
+
* audience names: a portrayal naming them, or
|
|
194
197
|
* the item rule on the message. `audienceHolds` is the judge, the same
|
|
195
198
|
* function the listing's `canAct` reads, so a grey chip and a refusal at
|
|
196
199
|
* the fire can never disagree.
|
|
197
200
|
* @internal
|
|
201
|
+
* @ruling plans/29 R-15 *audience*
|
|
198
202
|
*/
|
|
199
203
|
export const audienceVerdict = defineVerdict({
|
|
200
204
|
id: 'core:verdict/audience',
|
|
@@ -218,7 +222,7 @@ export const audienceVerdict = defineVerdict({
|
|
|
218
222
|
/** Is this the substrate's `settings` address, or a path under it? */
|
|
219
223
|
const isSettingsAddress = (name) => typeof name === 'string' && (name === SETTINGS_SLOT || name.startsWith(`${SETTINGS_SLOT}.`));
|
|
220
224
|
/**
|
|
221
|
-
* Settings never travel; only data does
|
|
225
|
+
* Settings never travel; only data does.
|
|
222
226
|
* `<nodeKey>.settings.*` — `enabled`, `review`, `mode` — is read by the
|
|
223
227
|
* executor at its owner and handed to nobody. It is not a port: a data edge
|
|
224
228
|
* drawn from it carries nothing, a reference naming it resolves to nothing,
|
|
@@ -228,6 +232,7 @@ const isSettingsAddress = (name) => typeof name === 'string' && (name === SETTIN
|
|
|
228
232
|
* `validate()` (an edge, a reference) and by the executor (a reference in a
|
|
229
233
|
* document that skipped validation).
|
|
230
234
|
* @experimental
|
|
235
|
+
* @ruling 12 §2 P3, 29 §5d, F39
|
|
231
236
|
*/
|
|
232
237
|
export const settingsTravelVerdict = defineVerdict({
|
|
233
238
|
id: 'core:verdict/settings-travel',
|
|
@@ -291,8 +296,8 @@ export const settingsTravelVerdict = defineVerdict({
|
|
|
291
296
|
: { kind: 'edge', from: 'save', fromPort: `${SETTINGS_SLOT}.review`, to: 'probe', toPort: 'main' },
|
|
292
297
|
});
|
|
293
298
|
/**
|
|
294
|
-
* A provisional definition is declared, not bound
|
|
295
|
-
* because
|
|
299
|
+
* A provisional definition is declared, not bound: published
|
|
300
|
+
* because it is planned, run by no handler. A document placing one is
|
|
296
301
|
* refused where the author is — `validate()` — and again by the executor
|
|
297
302
|
* for a stored document older than the flag, so it halts on the law rather
|
|
298
303
|
* than on "no binding registered" pointing at the wrong file. The other
|
|
@@ -300,6 +305,7 @@ export const settingsTravelVerdict = defineVerdict({
|
|
|
300
305
|
* handler and no flag is a packaging error, said with the three things a
|
|
301
306
|
* person can do.
|
|
302
307
|
* @internal
|
|
308
|
+
* @ruling plans/29 R-2
|
|
303
309
|
*/
|
|
304
310
|
export const provisionalVerdict = defineVerdict({
|
|
305
311
|
id: 'core:verdict/provisional',
|
package/dist/widgetDecls.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Widgets as a package declares them, and genres as they subtract and lay
|
|
3
|
-
* them out
|
|
3
|
+
* them out.
|
|
4
4
|
*
|
|
5
5
|
* - A **package** — a plugin, or core in `core-catalog` — declares its
|
|
6
6
|
* widgets once (`defineExtension({ widgets })`), each optionally scoped to
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* another package's widget by value names the id the page knows it by
|
|
17
17
|
* (`widgetRef`): core's bare (`stats`), a plugin's under its package
|
|
18
18
|
* (`acme.dice:tray`, the `pluginWidgetId` grammar).
|
|
19
|
+
* @ruling R71 (ruled 2026-09-24)
|
|
19
20
|
*/
|
|
20
21
|
import type { WidgetDecl } from './layout.js';
|
|
21
22
|
import { type SessionLayoutV1 } from './sessionLayout.js';
|
|
@@ -44,7 +45,7 @@ export interface WidgetInput extends Omit<WidgetDecl, 'genres'> {
|
|
|
44
45
|
genres?: readonly GenreLike[];
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
47
|
-
* The base sections a widget reads
|
|
48
|
+
* The base sections a widget reads: its `reads`, or every base section
|
|
48
49
|
* when it declares none — what its host sends it. A host asks this rather
|
|
49
50
|
* than reading `reads`, so the default lives in one place.
|
|
50
51
|
*
|
|
@@ -52,22 +53,25 @@ export interface WidgetInput extends Omit<WidgetDecl, 'genres'> {
|
|
|
52
53
|
* is not a base section (a scoped one, junk) never comes back, and each name
|
|
53
54
|
* comes back once.
|
|
54
55
|
* @experimental
|
|
56
|
+
* @ruling R75
|
|
55
57
|
*/
|
|
56
58
|
export declare function widgetReads(w: Pick<WidgetDecl, 'reads'>): readonly WidgetBaseSection[];
|
|
57
59
|
/**
|
|
58
|
-
* What is wrong with a widget's `reads
|
|
60
|
+
* What is wrong with a widget's `reads`, one sentence each, each led by
|
|
59
61
|
* `at` (where it was written): a name that is not a base section is refused
|
|
60
62
|
* where it is declared, rather than naming a section the widget would
|
|
61
63
|
* silently never receive.
|
|
62
64
|
* @experimental
|
|
65
|
+
* @ruling R75
|
|
63
66
|
*/
|
|
64
67
|
export declare function widgetReadsFindings(reads: unknown, at: string): string[];
|
|
65
68
|
/** Declare a widget — the value a package lists in `widgets` and a genre names in `omitWidgets` or a layout. @experimental */
|
|
66
69
|
export declare function widget(d: WidgetInput): WidgetDecl;
|
|
67
70
|
/**
|
|
68
|
-
* A layout a genre ships
|
|
71
|
+
* A layout a genre ships: a **session layout** under a slug and a name.
|
|
69
72
|
* The first is the genre's default — its **genre default layout**.
|
|
70
73
|
* @experimental
|
|
74
|
+
* @ruling R71
|
|
71
75
|
*/
|
|
72
76
|
export interface GenreLayoutDecl {
|
|
73
77
|
/** Unique within the genre; `default` for the first. */
|
package/dist/widgetDecls.js
CHANGED
|
@@ -41,7 +41,7 @@ export function widgetRef(w) {
|
|
|
41
41
|
}
|
|
42
42
|
const WIDGET_ID = /^[a-z][a-z0-9-]*$/;
|
|
43
43
|
/**
|
|
44
|
-
* The base sections a widget reads
|
|
44
|
+
* The base sections a widget reads: its `reads`, or every base section
|
|
45
45
|
* when it declares none — what its host sends it. A host asks this rather
|
|
46
46
|
* than reading `reads`, so the default lives in one place.
|
|
47
47
|
*
|
|
@@ -49,6 +49,7 @@ const WIDGET_ID = /^[a-z][a-z0-9-]*$/;
|
|
|
49
49
|
* is not a base section (a scoped one, junk) never comes back, and each name
|
|
50
50
|
* comes back once.
|
|
51
51
|
* @experimental
|
|
52
|
+
* @ruling R75
|
|
52
53
|
*/
|
|
53
54
|
export function widgetReads(w) {
|
|
54
55
|
if (!Array.isArray(w?.reads))
|
|
@@ -58,11 +59,12 @@ export function widgetReads(w) {
|
|
|
58
59
|
];
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
|
-
* What is wrong with a widget's `reads
|
|
62
|
+
* What is wrong with a widget's `reads`, one sentence each, each led by
|
|
62
63
|
* `at` (where it was written): a name that is not a base section is refused
|
|
63
64
|
* where it is declared, rather than naming a section the widget would
|
|
64
65
|
* silently never receive.
|
|
65
66
|
* @experimental
|
|
67
|
+
* @ruling R75
|
|
66
68
|
*/
|
|
67
69
|
export function widgetReadsFindings(reads, at) {
|
|
68
70
|
if (reads === undefined)
|