@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/hooks.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The three kinds of extension callable and their injected surfaces
|
|
2
|
+
* The three kinds of extension callable and their injected surfaces.
|
|
3
3
|
*
|
|
4
|
-
* A **hook** is a declared point where authored code may run
|
|
5
|
-
* three callables are named for what they are
|
|
4
|
+
* A **hook** is a declared point where authored code may run; the
|
|
5
|
+
* three callables are named for what they are: a **handler**
|
|
6
6
|
* implements a node definition, a **lifecycle callback** answers a core moment, an
|
|
7
|
-
* **event listener** answers a core event.
|
|
8
|
-
* *event hook* are the same three under the old word
|
|
7
|
+
* **event listener** answers a core event. The older *pipeline hook* / *lifecycle hook* /
|
|
8
|
+
* *event hook* are the same three under the old word.
|
|
9
9
|
*
|
|
10
10
|
* The rules are enforced by *what is in the object*, not by a document someone reads.
|
|
11
11
|
* A capability that isn't on the surface cannot be called, which is why these are
|
|
12
12
|
* types rather than a checklist.
|
|
13
|
+
* @ruling 01 §9, F10, F32, NOMENCLATURE §12, R-1 (ruled 2026-09-14), 01, U3 (2026-09-16)
|
|
13
14
|
*/
|
|
14
15
|
/**
|
|
15
16
|
* The moments a lifecycle callback may be registered against:
|
|
16
17
|
*
|
|
17
18
|
* - `startup` — at boot, before the ready-gate opens.
|
|
18
|
-
* - `load` — declared, and not called yet
|
|
19
|
+
* - `load` — declared, and not called yet.
|
|
19
20
|
* - `enable` — after the plugin is switched on.
|
|
20
21
|
* - `disable` — before it is switched off. Bounded; a failure never stops the switch.
|
|
21
22
|
* - `update` — once, after a reinstall replaced its bundle, on the new bundle's
|
|
@@ -85,10 +86,11 @@ const FORBIDDEN_ON_ANY_HOOK = [
|
|
|
85
86
|
'emit',
|
|
86
87
|
];
|
|
87
88
|
/**
|
|
88
|
-
*
|
|
89
|
-
* actually hands out — a regression that adds `callProvider` back fails here instead
|
|
89
|
+
* The forbidden surface members, checked rather than documented. The probe
|
|
90
|
+
* reads the surface an implementation actually hands out — a regression that adds `callProvider` back fails here instead
|
|
90
91
|
* of shipping.
|
|
91
92
|
* @experimental
|
|
93
|
+
* @ruling F32
|
|
92
94
|
*/
|
|
93
95
|
export function assertHookSurface(kind, surface) {
|
|
94
96
|
const keys = new Set(Object.keys(surface));
|
|
@@ -101,9 +103,9 @@ export function assertHookSurface(kind, surface) {
|
|
|
101
103
|
return found.length ? { ok: false, found } : { ok: true };
|
|
102
104
|
}
|
|
103
105
|
/**
|
|
104
|
-
* The scheduled-work path, stated as code so it is discoverable from the SDK
|
|
105
|
-
* than only from 13 §7c.
|
|
106
|
+
* The scheduled-work path, stated as code so it is discoverable from the SDK.
|
|
106
107
|
* @experimental
|
|
108
|
+
* @ruling 13 §7c
|
|
107
109
|
*/
|
|
108
110
|
export const SCHEDULED_WORK_PATH = {
|
|
109
111
|
instead: 'core:event/schedule-tick@1',
|
package/dist/hostElements.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The host-element vocabulary
|
|
2
|
+
* The host-element vocabulary: every element a component
|
|
3
3
|
* may place, with the attributes it takes, the events it raises and the
|
|
4
4
|
* named slots it fills. A component runs in the page's UI worker and the
|
|
5
5
|
* host mirrors what it renders into the widget box; **this table is the
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* that keep the caret on the page, markdown that streams, a scroll that
|
|
22
22
|
* sticks to the bottom, a real document for a charting library).
|
|
23
23
|
*
|
|
24
|
-
* **Sp elements are unopinionated about style
|
|
24
|
+
* **Sp elements are unopinionated about style.** An sp element renders the markup
|
|
25
25
|
* its behaviour needs and the structural hooks a skin targets — `.sp-<name>`
|
|
26
26
|
* on its root and the parts named in its `parts` — and no colour, radius or
|
|
27
27
|
* spacing beyond what the behaviour requires. A widget styles it through
|
|
@@ -52,8 +52,9 @@
|
|
|
52
52
|
* to prefix per widget box, so a remote cannot collide with the page's.
|
|
53
53
|
*
|
|
54
54
|
* @experimental 🚧 provisional until core's own session widgets render
|
|
55
|
-
* through it
|
|
55
|
+
* through it: the set may grow and an attribute may be renamed
|
|
56
56
|
* before then. It never shrinks after 1.0.
|
|
57
|
+
* @ruling §3.5, R17, R22, C7, R21
|
|
57
58
|
*/
|
|
58
59
|
/** One element in the vocabulary. @experimental */
|
|
59
60
|
export interface HostElementSpec {
|
|
@@ -73,7 +74,8 @@ export interface HostElementSpec {
|
|
|
73
74
|
/**
|
|
74
75
|
* The allowlist. Keys are tag names; order is the order the `.d.ts` prints.
|
|
75
76
|
*
|
|
76
|
-
* @experimental 🚧
|
|
77
|
+
* @experimental 🚧 provisional (see the module note).
|
|
78
|
+
* @ruling C7
|
|
77
79
|
*/
|
|
78
80
|
export declare const SP_HOST_ELEMENTS: {
|
|
79
81
|
readonly div: HostElementSpec;
|
|
@@ -238,6 +240,12 @@ export declare const SP_HOST_ELEMENTS: {
|
|
|
238
240
|
readonly parts: readonly ["sp-drop-zone-overlay"];
|
|
239
241
|
readonly doc: string;
|
|
240
242
|
};
|
|
243
|
+
readonly 'sp-drag-handle': {
|
|
244
|
+
readonly attributes: readonly ["along", "label", "disabled", "class"];
|
|
245
|
+
readonly events: readonly ["move"];
|
|
246
|
+
readonly parts: readonly ["sp-drag-handle-grip", "sp-drag-handle-line"];
|
|
247
|
+
readonly doc: string;
|
|
248
|
+
};
|
|
241
249
|
readonly 'sp-scroll': {
|
|
242
250
|
readonly attributes: readonly ["stick", "label", "class"];
|
|
243
251
|
readonly events: readonly ["reach-start"];
|
|
@@ -256,14 +264,18 @@ export declare const SP_HOST_ELEMENTS: {
|
|
|
256
264
|
};
|
|
257
265
|
/** @experimental */
|
|
258
266
|
export type HostElementTag = keyof typeof SP_HOST_ELEMENTS;
|
|
259
|
-
/**
|
|
267
|
+
/**
|
|
268
|
+
* The host sp elements alone — the elements the host must implement, checked at boot.
|
|
269
|
+
* @experimental
|
|
270
|
+
* @ruling C1b
|
|
271
|
+
*/
|
|
260
272
|
export declare const SP_ELEMENT_TAGS: Array<Extract<HostElementTag, `sp-${string}`>>;
|
|
261
273
|
/** Is this element in the vocabulary? @experimental */
|
|
262
274
|
export declare function isHostElement(tag: string): boolean;
|
|
263
275
|
/** Does this element accept this attribute? `slot` is accepted on every element. @experimental */
|
|
264
276
|
export declare function hostAttributeAllowed(tag: string, attribute: string): boolean;
|
|
265
277
|
/**
|
|
266
|
-
* Attributes every element takes
|
|
278
|
+
* Attributes every element takes, besides `aria-*` (all of them; the
|
|
267
279
|
* ones naming an element by id are the host's to prefix) and a widget's own
|
|
268
280
|
* `data-*`: `hidden` and `inert` hide and disable what the widget drew;
|
|
269
281
|
* `role`; `tabindex` (0 or -1 — into the tab order or out of it, never
|
|
@@ -271,6 +283,7 @@ export declare function hostAttributeAllowed(tag: string, attribute: string): bo
|
|
|
271
283
|
* (`--sp-fill: 40%`), which the widget's skin reads — a declaration of its
|
|
272
284
|
* own could fetch (`url()`) or cover the page.
|
|
273
285
|
* @experimental
|
|
286
|
+
* @ruling C0b
|
|
274
287
|
*/
|
|
275
288
|
export declare const GLOBAL_ATTRIBUTES: readonly string[];
|
|
276
289
|
/** One `style` value's custom properties, or why it holds something else. @experimental */
|
|
@@ -284,11 +297,12 @@ export declare function customPropertiesFinding(value: string): string | undefin
|
|
|
284
297
|
export declare const isDataAttribute: (attribute: string) => boolean;
|
|
285
298
|
/** `input type`s a component may place — no `file`, `password`, `submit`, `image`, `hidden`. */
|
|
286
299
|
/**
|
|
287
|
-
* 🚧 The host views a widget may place with `sp-host-view`
|
|
300
|
+
* 🚧 The host views a widget may place with `sp-host-view` — parts of
|
|
288
301
|
* the page that belong to the session, not to any widget: the status strips
|
|
289
302
|
* above the composer and the composer's own page tabs. The list grows; a name
|
|
290
303
|
* the host does not know renders nothing.
|
|
291
304
|
* @experimental
|
|
305
|
+
* @ruling C0b
|
|
292
306
|
*/
|
|
293
307
|
export declare const HOST_VIEW_NAMES: readonly ['session-banners', 'session-actions', 'retrieval-notice', 'run-progress', 'session-controls', 'session-workflow', 'retrieval-preview', 'session-usage', 'scene-images', 'session-statistics'];
|
|
294
308
|
/** @experimental */
|
|
@@ -308,10 +322,11 @@ export declare const HOST_ARIA_LIVE: readonly ['off', 'polite'];
|
|
|
308
322
|
/** @experimental */
|
|
309
323
|
export declare const HOST_INPUT_TYPES: readonly ['text', 'search', 'number', 'checkbox', 'radio', 'range', 'email', 'url', 'color', 'date', 'time'];
|
|
310
324
|
/**
|
|
311
|
-
* 🚧 What a `key` event carries
|
|
325
|
+
* 🚧 What a `key` event carries — `sp-composer-field`'s and a plain
|
|
312
326
|
* `input`'s alike: the key pressed (`KeyboardEvent.key`), and the modifiers
|
|
313
327
|
* held with it.
|
|
314
328
|
* @experimental
|
|
329
|
+
* @ruling R80
|
|
315
330
|
*/
|
|
316
331
|
export interface HostKeyEventDetail {
|
|
317
332
|
key: string;
|
|
@@ -329,16 +344,21 @@ export interface HostKeyPress {
|
|
|
329
344
|
readonly isComposing?: boolean;
|
|
330
345
|
}
|
|
331
346
|
/**
|
|
332
|
-
* 🚧 Does this `keys` value name this press
|
|
347
|
+
* 🚧 Does this `keys` value name this press? THE reading of the
|
|
333
348
|
* grammar, for every element that takes `keys`: a bare key names it whatever
|
|
334
349
|
* is held — except that a bare `Enter` leaves Shift+Enter to the field (a
|
|
335
350
|
* composer's newline) — and `Control+Enter` names it only while Control is
|
|
336
351
|
* held (every modifier the token names held; others may be too). A press
|
|
337
352
|
* mid-composition is named by nothing.
|
|
338
353
|
* @experimental
|
|
354
|
+
* @ruling R80
|
|
339
355
|
*/
|
|
340
356
|
export declare function hostKeysMatch(keys: string | null | undefined, press: HostKeyPress): boolean;
|
|
341
|
-
/**
|
|
357
|
+
/**
|
|
358
|
+
* 🚧 The `key` event's detail for this press.
|
|
359
|
+
* @experimental
|
|
360
|
+
* @ruling R80
|
|
361
|
+
*/
|
|
342
362
|
export declare function hostKeyEventDetail(press: HostKeyPress): HostKeyEventDetail;
|
|
343
363
|
/**
|
|
344
364
|
* Why this value may not be written to this attribute, or `undefined` if it
|
|
@@ -351,7 +371,7 @@ export declare function hostAttributeValueFinding(tag: string, attribute: string
|
|
|
351
371
|
/** Does this element raise this event? @experimental */
|
|
352
372
|
export declare function hostEventAllowed(tag: string, event: string): boolean;
|
|
353
373
|
/**
|
|
354
|
-
* 🚧 The events the page re-delivers
|
|
374
|
+
* 🚧 The events the page re-delivers: `click` alone. The receiver
|
|
355
375
|
* forwards an event only from the node that listens for it, and only the
|
|
356
376
|
* vocabulary's listeners exist — a button hears `click`; the `span` label
|
|
357
377
|
* inside it does not, nor the `svg` an icon draws for itself — so a click on
|
|
@@ -359,6 +379,7 @@ export declare function hostEventAllowed(tag: string, event: string): boolean;
|
|
|
359
379
|
* descendant's, re-delivered, would arrive as the ANCESTOR's own event
|
|
360
380
|
* carrying the descendant's value.
|
|
361
381
|
* @experimental
|
|
382
|
+
* @ruling C7
|
|
362
383
|
*/
|
|
363
384
|
export declare const REDELIVERED_EVENTS: readonly ['click'];
|
|
364
385
|
/**
|
|
@@ -389,7 +410,7 @@ export declare function redeliveryTarget(origin: Node, type: string, territory:
|
|
|
389
410
|
*/
|
|
390
411
|
export declare function redeliveredCopy(e: Event): Event;
|
|
391
412
|
/**
|
|
392
|
-
* 🚧 Where the page raises `key` for a keydown
|
|
413
|
+
* 🚧 Where the page raises `key` for a keydown: the plain `input` the
|
|
393
414
|
* press landed on, when it sits strictly inside `territory` (a remote's box,
|
|
394
415
|
* or a panel one of its elements portaled out) and its `keys` names the
|
|
395
416
|
* press ({@link hostKeysMatch}) — else `null`. `sp-composer-field` reads its
|
|
@@ -397,14 +418,16 @@ export declare function redeliveredCopy(e: Event): Event;
|
|
|
397
418
|
* page and the component harness share it, and each keeps the press from the
|
|
398
419
|
* field (`preventDefault`) and dispatches {@link hostKeyEvent} there.
|
|
399
420
|
* @experimental
|
|
421
|
+
* @ruling R80
|
|
400
422
|
*/
|
|
401
423
|
export declare function keyedInputTarget(e: KeyboardEvent, territory: Element): Element | null;
|
|
402
424
|
/**
|
|
403
|
-
* 🚧 The `key` event the page dispatches at {@link keyedInputTarget}
|
|
425
|
+
* 🚧 The `key` event the page dispatches at {@link keyedInputTarget}:
|
|
404
426
|
* a `CustomEvent` carrying {@link HostKeyEventDetail}, unbubbling — the
|
|
405
427
|
* receiver listens on the field itself, and the page has no business with
|
|
406
428
|
* it. Made in the press's own window, as {@link redeliveredCopy} is.
|
|
407
429
|
* @experimental
|
|
430
|
+
* @ruling R80
|
|
408
431
|
*/
|
|
409
432
|
export declare function hostKeyEvent(e: KeyboardEvent): CustomEvent<HostKeyEventDetail>;
|
|
410
433
|
/**
|
|
@@ -417,14 +440,14 @@ export declare function hostKeyEvent(e: KeyboardEvent): CustomEvent<HostKeyEvent
|
|
|
417
440
|
*/
|
|
418
441
|
export declare function hostElementsDts(): string;
|
|
419
442
|
/**
|
|
420
|
-
* @experimental 🚧 with the vocabulary it versions
|
|
443
|
+
* @experimental 🚧 with the vocabulary it versions.
|
|
421
444
|
*
|
|
422
445
|
* The version of the host-element vocabulary's PUBLIC SHAPE — every tag in
|
|
423
446
|
* {@link SP_HOST_ELEMENTS} with its attributes, events, slots, children and
|
|
424
447
|
* parts, and the closed value lists beside it ({@link GLOBAL_ATTRIBUTES},
|
|
425
448
|
* {@link HOST_VIEW_NAMES}, {@link HOST_ARIA_CURRENT}, {@link HOST_ARIA_LIVE},
|
|
426
449
|
* {@link HOST_INPUT_TYPES}). A built component records the one it was built
|
|
427
|
-
* against (`builtAgainst.hostElements
|
|
450
|
+
* against (`builtAgainst.hostElements`), and a host refuses to mount one
|
|
428
451
|
* whose MAJOR it lacks (`componentBuiltAgainstFinding`).
|
|
429
452
|
*
|
|
430
453
|
* `major.minor`, never a hash: a hash changes on every addition and cannot
|
|
@@ -434,7 +457,7 @@ export declare function hostElementsDts(): string;
|
|
|
434
457
|
* - **minor** bumps when the shape GROWS: a tag, an attribute, an event, a
|
|
435
458
|
* slot, a part, a value. A component built for a newer minor still mounts
|
|
436
459
|
* on an older host — what that host does not know it drops, the
|
|
437
|
-
* vocabulary's stated failure mode (unstyled-but-correct
|
|
460
|
+
* vocabulary's stated failure mode (unstyled-but-correct).
|
|
438
461
|
* - **major** bumps when anything is REMOVED, RENAMED or NARROWED (a value
|
|
439
462
|
* list loses a value, an event changes its `detail`). A host that has
|
|
440
463
|
* moved to a new major still lists the majors it keeps mounting.
|
|
@@ -442,6 +465,7 @@ export declare function hostElementsDts(): string;
|
|
|
442
465
|
* A test pins a hash of the shape to this version (`sdk-tests/
|
|
443
466
|
* componentBuiltAgainst.test.ts`): change the table without bumping this and
|
|
444
467
|
* the suite says which to bump. `doc` strings are not the shape.
|
|
468
|
+
* @ruling F1, R22
|
|
445
469
|
*/
|
|
446
|
-
export declare const HOST_ELEMENTS_VERSION: '1.
|
|
470
|
+
export declare const HOST_ELEMENTS_VERSION: '1.4';
|
|
447
471
|
//# sourceMappingURL=hostElements.d.ts.map
|
package/dist/hostElements.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The host-element vocabulary
|
|
2
|
+
* The host-element vocabulary: every element a component
|
|
3
3
|
* may place, with the attributes it takes, the events it raises and the
|
|
4
4
|
* named slots it fills. A component runs in the page's UI worker and the
|
|
5
5
|
* host mirrors what it renders into the widget box; **this table is the
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* that keep the caret on the page, markdown that streams, a scroll that
|
|
22
22
|
* sticks to the bottom, a real document for a charting library).
|
|
23
23
|
*
|
|
24
|
-
* **Sp elements are unopinionated about style
|
|
24
|
+
* **Sp elements are unopinionated about style.** An sp element renders the markup
|
|
25
25
|
* its behaviour needs and the structural hooks a skin targets — `.sp-<name>`
|
|
26
26
|
* on its root and the parts named in its `parts` — and no colour, radius or
|
|
27
27
|
* spacing beyond what the behaviour requires. A widget styles it through
|
|
@@ -52,8 +52,9 @@
|
|
|
52
52
|
* to prefix per widget box, so a remote cannot collide with the page's.
|
|
53
53
|
*
|
|
54
54
|
* @experimental 🚧 provisional until core's own session widgets render
|
|
55
|
-
* through it
|
|
55
|
+
* through it: the set may grow and an attribute may be renamed
|
|
56
56
|
* before then. It never shrinks after 1.0.
|
|
57
|
+
* @ruling §3.5, R17, R22, C7, R21
|
|
57
58
|
*/
|
|
58
59
|
const plain = (doc, attributes = [], events = []) => ({
|
|
59
60
|
attributes: [...attributes, 'class'],
|
|
@@ -80,7 +81,8 @@ const ARIA = [
|
|
|
80
81
|
/**
|
|
81
82
|
* The allowlist. Keys are tag names; order is the order the `.d.ts` prints.
|
|
82
83
|
*
|
|
83
|
-
* @experimental 🚧
|
|
84
|
+
* @experimental 🚧 provisional (see the module note).
|
|
85
|
+
* @ruling C7
|
|
84
86
|
*/
|
|
85
87
|
export const SP_HOST_ELEMENTS = {
|
|
86
88
|
// ── plain elements ────────────────────────────────────────────────────
|
|
@@ -284,6 +286,18 @@ export const SP_HOST_ELEMENTS = {
|
|
|
284
286
|
'`{ files: File[], via: "drop" | "paste" }` — a drop, or a paste of files (a screenshot) anywhere inside the region; ' +
|
|
285
287
|
'a paste of text stays the field\'s.',
|
|
286
288
|
},
|
|
289
|
+
'sp-drag-handle': {
|
|
290
|
+
attributes: ['along', 'label', 'disabled', 'class'],
|
|
291
|
+
events: ['move'],
|
|
292
|
+
parts: ['sp-drag-handle-grip', 'sp-drag-handle-line'],
|
|
293
|
+
doc: '🚧 A handle a person drags along a list to move a boundary between its items (1.4) — a scene divider\'s start. ' +
|
|
294
|
+
'Its body is the grip (`sp-drag-handle-grip`), drawn by the widget. `along` names the items, by one widget part ' +
|
|
295
|
+
'(`messages.message-row`); each item carries its key as `data-drag-key`, and an item drawn `hidden` is passed over. ' +
|
|
296
|
+
'While dragged, a line (`sp-drag-handle-line`) shows the gap between items the handle would land in, snapping to ' +
|
|
297
|
+
'the nearest; Escape cancels. On release `move` carries `{ prev, next }` — the keys of the items before and after ' +
|
|
298
|
+
'that gap, in document order (null at either end). Pointer only: the widget offers the same move another way ' +
|
|
299
|
+
'(a menu row), and the grip is hidden from assistive technology.',
|
|
300
|
+
},
|
|
287
301
|
'sp-scroll': {
|
|
288
302
|
attributes: ['stick', 'label', 'class'],
|
|
289
303
|
events: ['reach-start'],
|
|
@@ -300,7 +314,11 @@ export const SP_HOST_ELEMENTS = {
|
|
|
300
314
|
doc: "A real document inside the widget, for what needs one (a rich-text editor, a charting library that measures). `src` is a document the plugin ships; `props` is JSON forwarded as the frame's props. The document's `invoke` is raised unresolved — `detail: { key, messageId?, payload?, blockId? }` — for the component to pass to `ctx.invoke(key, …)`, so the press meets this widget's actions and gate.",
|
|
301
315
|
},
|
|
302
316
|
};
|
|
303
|
-
/**
|
|
317
|
+
/**
|
|
318
|
+
* The host sp elements alone — the elements the host must implement, checked at boot.
|
|
319
|
+
* @experimental
|
|
320
|
+
* @ruling C1b
|
|
321
|
+
*/
|
|
304
322
|
export const SP_ELEMENT_TAGS = Object.keys(SP_HOST_ELEMENTS).filter((t) => t.startsWith('sp-'));
|
|
305
323
|
const isTag = (tag) => Object.hasOwn(SP_HOST_ELEMENTS, tag);
|
|
306
324
|
/** Is this element in the vocabulary? @experimental */
|
|
@@ -319,7 +337,7 @@ export function hostAttributeAllowed(tag, attribute) {
|
|
|
319
337
|
SP_HOST_ELEMENTS[t].attributes.includes(attribute));
|
|
320
338
|
}
|
|
321
339
|
/**
|
|
322
|
-
* Attributes every element takes
|
|
340
|
+
* Attributes every element takes, besides `aria-*` (all of them; the
|
|
323
341
|
* ones naming an element by id are the host's to prefix) and a widget's own
|
|
324
342
|
* `data-*`: `hidden` and `inert` hide and disable what the widget drew;
|
|
325
343
|
* `role`; `tabindex` (0 or -1 — into the tab order or out of it, never
|
|
@@ -327,6 +345,7 @@ export function hostAttributeAllowed(tag, attribute) {
|
|
|
327
345
|
* (`--sp-fill: 40%`), which the widget's skin reads — a declaration of its
|
|
328
346
|
* own could fetch (`url()`) or cover the page.
|
|
329
347
|
* @experimental
|
|
348
|
+
* @ruling C0b
|
|
330
349
|
*/
|
|
331
350
|
export const GLOBAL_ATTRIBUTES = ['hidden', 'inert', 'role', 'tabindex', 'style'];
|
|
332
351
|
/** One `style` value's custom properties, or why it holds something else. @experimental */
|
|
@@ -352,11 +371,12 @@ export function customPropertiesFinding(value) {
|
|
|
352
371
|
export const isDataAttribute = (attribute) => /^data-[a-z0-9][a-z0-9-]*$/.test(attribute) && !attribute.startsWith('data-sp-');
|
|
353
372
|
/** `input type`s a component may place — no `file`, `password`, `submit`, `image`, `hidden`. */
|
|
354
373
|
/**
|
|
355
|
-
* 🚧 The host views a widget may place with `sp-host-view`
|
|
374
|
+
* 🚧 The host views a widget may place with `sp-host-view` — parts of
|
|
356
375
|
* the page that belong to the session, not to any widget: the status strips
|
|
357
376
|
* above the composer and the composer's own page tabs. The list grows; a name
|
|
358
377
|
* the host does not know renders nothing.
|
|
359
378
|
* @experimental
|
|
379
|
+
* @ruling C0b
|
|
360
380
|
*/
|
|
361
381
|
export const HOST_VIEW_NAMES = [
|
|
362
382
|
'session-banners',
|
|
@@ -367,6 +387,8 @@ export const HOST_VIEW_NAMES = [
|
|
|
367
387
|
'session-workflow',
|
|
368
388
|
'retrieval-preview',
|
|
369
389
|
'session-usage',
|
|
390
|
+
// ⏳ The composer's Pinned images pane, retired by W6 (2026-10-11): the
|
|
391
|
+
// page draws nothing under it now. REMOVE in 0.7.0.
|
|
370
392
|
'scene-images',
|
|
371
393
|
'session-statistics',
|
|
372
394
|
];
|
|
@@ -404,13 +426,14 @@ const SESSION_ASSET = /^\/session-assets\/[1-9][0-9]*(\?[A-Za-z0-9._~%=&-]*)?$/;
|
|
|
404
426
|
const DOT_SEGMENT = /(^|\/)(\.|%2e){1,2}(\/|$)/i;
|
|
405
427
|
const isAppMedia = (v) => SESSION_ASSET.test(v) || (APP_MEDIA.test(v) && !DOT_SEGMENT.test(v.split('?')[0]));
|
|
406
428
|
/**
|
|
407
|
-
* One `keys` token — `sp-composer-field`'s and a plain `input`'s
|
|
429
|
+
* One `keys` token — `sp-composer-field`'s and a plain `input`'s: a
|
|
408
430
|
* key, after any number of the modifiers the host reads (`Control+Enter`,
|
|
409
431
|
* `Shift+Meta+ArrowUp`). The key holds no `+`: {@link hostKeysMatch} splits
|
|
410
432
|
* a token at its `+`s, so `+` or `Control++` would read as an empty key. A
|
|
411
433
|
* modifier the host does not read (`Alt+`, `Ctrl+`, a lowercase `control+`)
|
|
412
434
|
* or a token that ends at its `+` would be a key no press ever matches —
|
|
413
435
|
* kept from nothing, and silently — so it is refused instead.
|
|
436
|
+
* @ruling R80
|
|
414
437
|
*/
|
|
415
438
|
const HOST_KEYS_TOKEN = /^(?:(?:Control|Meta|Shift)\+)*[^+]+$/;
|
|
416
439
|
/** The elements that take `keys`, and raise `key` for a press it names. */
|
|
@@ -422,13 +445,14 @@ const HELD_MODIFIERS = new Map([
|
|
|
422
445
|
['Shift', (p) => p.shiftKey],
|
|
423
446
|
]);
|
|
424
447
|
/**
|
|
425
|
-
* 🚧 Does this `keys` value name this press
|
|
448
|
+
* 🚧 Does this `keys` value name this press? THE reading of the
|
|
426
449
|
* grammar, for every element that takes `keys`: a bare key names it whatever
|
|
427
450
|
* is held — except that a bare `Enter` leaves Shift+Enter to the field (a
|
|
428
451
|
* composer's newline) — and `Control+Enter` names it only while Control is
|
|
429
452
|
* held (every modifier the token names held; others may be too). A press
|
|
430
453
|
* mid-composition is named by nothing.
|
|
431
454
|
* @experimental
|
|
455
|
+
* @ruling R80
|
|
432
456
|
*/
|
|
433
457
|
export function hostKeysMatch(keys, press) {
|
|
434
458
|
if (!keys || press.isComposing)
|
|
@@ -445,7 +469,11 @@ export function hostKeysMatch(keys, press) {
|
|
|
445
469
|
}
|
|
446
470
|
return false;
|
|
447
471
|
}
|
|
448
|
-
/**
|
|
472
|
+
/**
|
|
473
|
+
* 🚧 The `key` event's detail for this press.
|
|
474
|
+
* @experimental
|
|
475
|
+
* @ruling R80
|
|
476
|
+
*/
|
|
449
477
|
export function hostKeyEventDetail(press) {
|
|
450
478
|
return { key: press.key, shift: press.shiftKey, ctrl: press.ctrlKey, meta: press.metaKey };
|
|
451
479
|
}
|
|
@@ -527,7 +555,7 @@ export function hostEventAllowed(tag, event) {
|
|
|
527
555
|
return isTag(t) && SP_HOST_ELEMENTS[t].events.includes(event);
|
|
528
556
|
}
|
|
529
557
|
/**
|
|
530
|
-
* 🚧 The events the page re-delivers
|
|
558
|
+
* 🚧 The events the page re-delivers: `click` alone. The receiver
|
|
531
559
|
* forwards an event only from the node that listens for it, and only the
|
|
532
560
|
* vocabulary's listeners exist — a button hears `click`; the `span` label
|
|
533
561
|
* inside it does not, nor the `svg` an icon draws for itself — so a click on
|
|
@@ -535,6 +563,7 @@ export function hostEventAllowed(tag, event) {
|
|
|
535
563
|
* descendant's, re-delivered, would arrive as the ANCESTOR's own event
|
|
536
564
|
* carrying the descendant's value.
|
|
537
565
|
* @experimental
|
|
566
|
+
* @ruling C7
|
|
538
567
|
*/
|
|
539
568
|
export const REDELIVERED_EVENTS = ['click'];
|
|
540
569
|
const takes = (el, type) => isTag(el.localName) && SP_HOST_ELEMENTS[el.localName].events.includes(type);
|
|
@@ -591,7 +620,7 @@ export function redeliveredCopy(e) {
|
|
|
591
620
|
return new Custom(e.type, { bubbles: false, cancelable: e.cancelable });
|
|
592
621
|
}
|
|
593
622
|
/**
|
|
594
|
-
* 🚧 Where the page raises `key` for a keydown
|
|
623
|
+
* 🚧 Where the page raises `key` for a keydown: the plain `input` the
|
|
595
624
|
* press landed on, when it sits strictly inside `territory` (a remote's box,
|
|
596
625
|
* or a panel one of its elements portaled out) and its `keys` names the
|
|
597
626
|
* press ({@link hostKeysMatch}) — else `null`. `sp-composer-field` reads its
|
|
@@ -599,6 +628,7 @@ export function redeliveredCopy(e) {
|
|
|
599
628
|
* page and the component harness share it, and each keeps the press from the
|
|
600
629
|
* field (`preventDefault`) and dispatches {@link hostKeyEvent} there.
|
|
601
630
|
* @experimental
|
|
631
|
+
* @ruling R80
|
|
602
632
|
*/
|
|
603
633
|
export function keyedInputTarget(e, territory) {
|
|
604
634
|
const t = e.target;
|
|
@@ -609,11 +639,12 @@ export function keyedInputTarget(e, territory) {
|
|
|
609
639
|
return hostKeysMatch(t.getAttribute('keys'), e) ? t : null;
|
|
610
640
|
}
|
|
611
641
|
/**
|
|
612
|
-
* 🚧 The `key` event the page dispatches at {@link keyedInputTarget}
|
|
642
|
+
* 🚧 The `key` event the page dispatches at {@link keyedInputTarget}:
|
|
613
643
|
* a `CustomEvent` carrying {@link HostKeyEventDetail}, unbubbling — the
|
|
614
644
|
* receiver listens on the field itself, and the page has no business with
|
|
615
645
|
* it. Made in the press's own window, as {@link redeliveredCopy} is.
|
|
616
646
|
* @experimental
|
|
647
|
+
* @ruling R80
|
|
617
648
|
*/
|
|
618
649
|
export function hostKeyEvent(e) {
|
|
619
650
|
const view = e.target?.ownerDocument?.defaultView;
|
|
@@ -672,14 +703,14 @@ export function hostElementsDts() {
|
|
|
672
703
|
return lines.join('\n');
|
|
673
704
|
}
|
|
674
705
|
/**
|
|
675
|
-
* @experimental 🚧 with the vocabulary it versions
|
|
706
|
+
* @experimental 🚧 with the vocabulary it versions.
|
|
676
707
|
*
|
|
677
708
|
* The version of the host-element vocabulary's PUBLIC SHAPE — every tag in
|
|
678
709
|
* {@link SP_HOST_ELEMENTS} with its attributes, events, slots, children and
|
|
679
710
|
* parts, and the closed value lists beside it ({@link GLOBAL_ATTRIBUTES},
|
|
680
711
|
* {@link HOST_VIEW_NAMES}, {@link HOST_ARIA_CURRENT}, {@link HOST_ARIA_LIVE},
|
|
681
712
|
* {@link HOST_INPUT_TYPES}). A built component records the one it was built
|
|
682
|
-
* against (`builtAgainst.hostElements
|
|
713
|
+
* against (`builtAgainst.hostElements`), and a host refuses to mount one
|
|
683
714
|
* whose MAJOR it lacks (`componentBuiltAgainstFinding`).
|
|
684
715
|
*
|
|
685
716
|
* `major.minor`, never a hash: a hash changes on every addition and cannot
|
|
@@ -689,7 +720,7 @@ export function hostElementsDts() {
|
|
|
689
720
|
* - **minor** bumps when the shape GROWS: a tag, an attribute, an event, a
|
|
690
721
|
* slot, a part, a value. A component built for a newer minor still mounts
|
|
691
722
|
* on an older host — what that host does not know it drops, the
|
|
692
|
-
* vocabulary's stated failure mode (unstyled-but-correct
|
|
723
|
+
* vocabulary's stated failure mode (unstyled-but-correct).
|
|
693
724
|
* - **major** bumps when anything is REMOVED, RENAMED or NARROWED (a value
|
|
694
725
|
* list loses a value, an event changes its `detail`). A host that has
|
|
695
726
|
* moved to a new major still lists the majors it keeps mounting.
|
|
@@ -697,6 +728,7 @@ export function hostElementsDts() {
|
|
|
697
728
|
* A test pins a hash of the shape to this version (`sdk-tests/
|
|
698
729
|
* componentBuiltAgainst.test.ts`): change the table without bumping this and
|
|
699
730
|
* the suite says which to bump. `doc` strings are not the shape.
|
|
731
|
+
* @ruling F1, R22
|
|
700
732
|
*/
|
|
701
|
-
export const HOST_ELEMENTS_VERSION = '1.
|
|
733
|
+
export const HOST_ELEMENTS_VERSION = '1.4';
|
|
702
734
|
//# sourceMappingURL=hostElements.js.map
|
package/dist/i18n.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Display text
|
|
2
|
+
* Display text — one type, one check, one
|
|
3
3
|
* resolver.
|
|
4
4
|
*
|
|
5
5
|
* Every string an author writes for a person to read — a definition's name, a
|
|
6
6
|
* slot's description, an action's label, a preset's title, a status — is
|
|
7
7
|
* `I18n`: a bare string or a **locale map**. The two spellings are one value:
|
|
8
8
|
* `title: 'Title'` is `title: { en: 'Title' }` (ruled 2026-09-17, which
|
|
9
|
-
* supersedes
|
|
9
|
+
* supersedes an earlier ruling that "a bare string is refused"). A bare string reads as
|
|
10
10
|
* `en`, and `en` is the locale every other falls back to.
|
|
11
11
|
*
|
|
12
12
|
* ## Enforced at publish
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
* answers the requested locale, else `en`. After publish enforcement a
|
|
43
43
|
* malformed value cannot reach a reader, so a malformed value answers
|
|
44
44
|
* `undefined` rather than being patched over — nothing swallows one silently.
|
|
45
|
+
* @ruling plans/29 R-20, plans/30 U5i, 09-B B11
|
|
45
46
|
*/
|
|
46
47
|
/** A locale map: `en` required, any other language code beside it. @public */
|
|
47
48
|
export type LocaleMap = {
|
|
@@ -69,7 +70,7 @@ export declare const isI18n: (v: unknown) => v is I18n;
|
|
|
69
70
|
export declare const localeMapOf: (v: I18n) => LocaleMap;
|
|
70
71
|
/**
|
|
71
72
|
* Every fault in one display-text value, as sentences that name the field and
|
|
72
|
-
* say what to write instead (the teaching-error pattern
|
|
73
|
+
* say what to write instead (the teaching-error pattern). Empty when
|
|
73
74
|
* the value is sound, and for an absent optional value; `required` makes
|
|
74
75
|
* absence a finding.
|
|
75
76
|
*
|
|
@@ -77,6 +78,7 @@ export declare const localeMapOf: (v: I18n) => LocaleMap;
|
|
|
77
78
|
* i18n.name`, `contributes.actions[roll].label`), so the sentence can be
|
|
78
79
|
* acted on without a search.
|
|
79
80
|
* @experimental
|
|
81
|
+
* @ruling 15 §1.3
|
|
80
82
|
*/
|
|
81
83
|
export declare function i18nFindings(v: unknown, where: string, opts?: {
|
|
82
84
|
required?: boolean;
|
package/dist/i18n.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Display text
|
|
2
|
+
* Display text — one type, one check, one
|
|
3
3
|
* resolver.
|
|
4
4
|
*
|
|
5
5
|
* Every string an author writes for a person to read — a definition's name, a
|
|
6
6
|
* slot's description, an action's label, a preset's title, a status — is
|
|
7
7
|
* `I18n`: a bare string or a **locale map**. The two spellings are one value:
|
|
8
8
|
* `title: 'Title'` is `title: { en: 'Title' }` (ruled 2026-09-17, which
|
|
9
|
-
* supersedes
|
|
9
|
+
* supersedes an earlier ruling that "a bare string is refused"). A bare string reads as
|
|
10
10
|
* `en`, and `en` is the locale every other falls back to.
|
|
11
11
|
*
|
|
12
12
|
* ## Enforced at publish
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
* answers the requested locale, else `en`. After publish enforcement a
|
|
43
43
|
* malformed value cannot reach a reader, so a malformed value answers
|
|
44
44
|
* `undefined` rather than being patched over — nothing swallows one silently.
|
|
45
|
+
* @ruling plans/29 R-20, plans/30 U5i, 09-B B11
|
|
45
46
|
*/
|
|
46
47
|
const blank = (s) => s.trim().length === 0;
|
|
47
48
|
/** Has the value the shape of a locale map — an object, not an array, with a string `en`? @experimental */
|
|
@@ -67,7 +68,7 @@ const describe = (v) => {
|
|
|
67
68
|
};
|
|
68
69
|
/**
|
|
69
70
|
* Every fault in one display-text value, as sentences that name the field and
|
|
70
|
-
* say what to write instead (the teaching-error pattern
|
|
71
|
+
* say what to write instead (the teaching-error pattern). Empty when
|
|
71
72
|
* the value is sound, and for an absent optional value; `required` makes
|
|
72
73
|
* absence a finding.
|
|
73
74
|
*
|
|
@@ -75,6 +76,7 @@ const describe = (v) => {
|
|
|
75
76
|
* i18n.name`, `contributes.actions[roll].label`), so the sentence can be
|
|
76
77
|
* acted on without a search.
|
|
77
78
|
* @experimental
|
|
79
|
+
* @ruling 15 §1.3
|
|
78
80
|
*/
|
|
79
81
|
export function i18nFindings(v, where, opts = {}) {
|
|
80
82
|
if (v === undefined) {
|
package/dist/identity.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Spec identity: **owner + slug + version
|
|
2
|
+
* Spec identity: **owner + slug + version**.
|
|
3
3
|
*
|
|
4
4
|
* Two versioning schemes live in this system and conflating them causes real confusion,
|
|
5
5
|
* so they are stated apart:
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* So a spec id carries **no `@N` suffix**. The version is not part of the identity; it is
|
|
14
14
|
* what the identity is compared *at*.
|
|
15
15
|
* @experimental
|
|
16
|
+
* @ruling 12 §3b, 02 §3
|
|
16
17
|
*/
|
|
17
18
|
export interface SpecIdentity {
|
|
18
19
|
/** Who ships it: a plugin slug, `core`, or absent for a hand-imported document. */
|
|
@@ -62,14 +63,14 @@ export declare const qualify: (i: SpecIdentity) => string;
|
|
|
62
63
|
export declare const CORE_ACTION_SPEC_ID = "core";
|
|
63
64
|
/**
|
|
64
65
|
* An action's **identity** on the wire: `<spec slug>#<key>` — a spec slug
|
|
65
|
-
* (`core`, `core:spec/narrate`, `acme:spec/roll`; versionless, so no `@`)
|
|
66
|
+
* (`core`, `core:spec/chat-narrate`, `acme:spec/roll`; versionless, so no `@`)
|
|
66
67
|
* and a key (a lowercase kebab token), joined by `#`. One string names one
|
|
67
68
|
* declaration; everything that keys on an action keys on this — a binding's
|
|
68
69
|
* subject, a preset's included set, a session's enablement row, a genre's
|
|
69
|
-
* enabled-when default, the fire, a block's `action`, the *new* mark (
|
|
70
|
-
* V2: the one key; there is no bare function beside it). The host's
|
|
70
|
+
* enabled-when default, the fire, a block's `action`, the *new* mark (the one key; there is no bare function beside it). The host's
|
|
71
71
|
* `shared/actions/identity.ts` reads the same grammar from here.
|
|
72
72
|
* @internal
|
|
73
|
+
* @ruling plans/31 V2
|
|
73
74
|
*/
|
|
74
75
|
export declare const ACTION_IDENTITY: RegExp;
|
|
75
76
|
/** The longest identity the wire accepts; a spec slug is never near this. @internal */
|
package/dist/identity.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Spec identity: **owner + slug + version
|
|
2
|
+
* Spec identity: **owner + slug + version**.
|
|
3
3
|
*
|
|
4
4
|
* Two versioning schemes live in this system and conflating them causes real confusion,
|
|
5
5
|
* so they are stated apart:
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* So a spec id carries **no `@N` suffix**. The version is not part of the identity; it is
|
|
14
14
|
* what the identity is compared *at*.
|
|
15
15
|
* @experimental
|
|
16
|
+
* @ruling 12 §3b, 02 §3
|
|
16
17
|
*/
|
|
17
18
|
const SLUG_PART = /^[a-z0-9]+([./-][a-z0-9]+)*$/;
|
|
18
19
|
/**
|
|
@@ -103,14 +104,14 @@ export const qualify = (i) => `${i.owner ? `${i.owner}:` : ''}${i.slug}@${i.vers
|
|
|
103
104
|
export const CORE_ACTION_SPEC_ID = 'core';
|
|
104
105
|
/**
|
|
105
106
|
* An action's **identity** on the wire: `<spec slug>#<key>` — a spec slug
|
|
106
|
-
* (`core`, `core:spec/narrate`, `acme:spec/roll`; versionless, so no `@`)
|
|
107
|
+
* (`core`, `core:spec/chat-narrate`, `acme:spec/roll`; versionless, so no `@`)
|
|
107
108
|
* and a key (a lowercase kebab token), joined by `#`. One string names one
|
|
108
109
|
* declaration; everything that keys on an action keys on this — a binding's
|
|
109
110
|
* subject, a preset's included set, a session's enablement row, a genre's
|
|
110
|
-
* enabled-when default, the fire, a block's `action`, the *new* mark (
|
|
111
|
-
* V2: the one key; there is no bare function beside it). The host's
|
|
111
|
+
* enabled-when default, the fire, a block's `action`, the *new* mark (the one key; there is no bare function beside it). The host's
|
|
112
112
|
* `shared/actions/identity.ts` reads the same grammar from here.
|
|
113
113
|
* @internal
|
|
114
|
+
* @ruling plans/31 V2
|
|
114
115
|
*/
|
|
115
116
|
export const ACTION_IDENTITY = /^[a-z0-9:./-]+#[a-z0-9-]+$/;
|
|
116
117
|
/** The longest identity the wire accepts; a spec slug is never near this. @internal */
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from './facets.js';
|
|
|
27
27
|
export * from './template.js';
|
|
28
28
|
export * from './engines.js';
|
|
29
29
|
export * from './templateIds.js';
|
|
30
|
+
export * from './loadouts.js';
|
|
30
31
|
export * from './variables.js';
|
|
31
32
|
export * from './bands.js';
|
|
32
33
|
export * from './templateScopeAt.js';
|
|
@@ -34,8 +35,11 @@ export * from './templateFit.js';
|
|
|
34
35
|
export * from './handlebarsReach.js';
|
|
35
36
|
export * from './attributes.js';
|
|
36
37
|
export * from './sheets.js';
|
|
38
|
+
export * from './strokes.js';
|
|
39
|
+
export * from './dowry.js';
|
|
37
40
|
export * from './statShapes.js';
|
|
38
41
|
export * from './storyTime.js';
|
|
42
|
+
export * from './sceneSettings.js';
|
|
39
43
|
export * from './turnLock.js';
|
|
40
44
|
export * from './scripts.js';
|
|
41
45
|
export * from './wire.js';
|
|
@@ -58,6 +62,7 @@ export * from './hookGrants.js';
|
|
|
58
62
|
export * from './pluginPermissions.js';
|
|
59
63
|
export * from './worldinfo.js';
|
|
60
64
|
export * from './widgets.js';
|
|
65
|
+
export * from './sessionDossier.js';
|
|
61
66
|
export * from './personGate.js';
|
|
62
67
|
export * from './annexFields.js';
|
|
63
68
|
export * from './surfaces.js';
|