@serene-pub/sdk 0.6.0-pr-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.
Files changed (187) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +17 -0
  3. package/README.md +368 -0
  4. package/dist/actions.d.ts +572 -0
  5. package/dist/actions.js +829 -0
  6. package/dist/annexFields.d.ts +234 -0
  7. package/dist/annexFields.js +413 -0
  8. package/dist/announce.d.ts +464 -0
  9. package/dist/announce.js +426 -0
  10. package/dist/attributes.d.ts +670 -0
  11. package/dist/attributes.js +904 -0
  12. package/dist/bands.d.ts +125 -0
  13. package/dist/bands.js +256 -0
  14. package/dist/builder.d.ts +683 -0
  15. package/dist/builder.js +677 -0
  16. package/dist/candidates.d.ts +109 -0
  17. package/dist/candidates.js +118 -0
  18. package/dist/capabilities.d.ts +744 -0
  19. package/dist/capabilities.js +679 -0
  20. package/dist/channels.d.ts +106 -0
  21. package/dist/channels.js +129 -0
  22. package/dist/clauses.d.ts +40 -0
  23. package/dist/clauses.js +43 -0
  24. package/dist/component.d.ts +33 -0
  25. package/dist/component.js +27 -0
  26. package/dist/componentBuild.d.ts +48 -0
  27. package/dist/componentBuild.js +84 -0
  28. package/dist/componentClient.d.ts +100 -0
  29. package/dist/componentClient.js +13 -0
  30. package/dist/componentImports.d.ts +51 -0
  31. package/dist/componentImports.js +106 -0
  32. package/dist/componentModule.d.ts +8 -0
  33. package/dist/componentModule.js +270 -0
  34. package/dist/componentWire.d.ts +130 -0
  35. package/dist/componentWire.js +280 -0
  36. package/dist/config.d.ts +295 -0
  37. package/dist/config.js +231 -0
  38. package/dist/connections.d.ts +89 -0
  39. package/dist/connections.js +131 -0
  40. package/dist/declarations.d.ts +290 -0
  41. package/dist/declarations.js +794 -0
  42. package/dist/descriptors.d.ts +1774 -0
  43. package/dist/descriptors.js +1329 -0
  44. package/dist/dev.d.ts +136 -0
  45. package/dist/dev.js +161 -0
  46. package/dist/document.d.ts +202 -0
  47. package/dist/document.js +312 -0
  48. package/dist/engines.d.ts +117 -0
  49. package/dist/engines.js +203 -0
  50. package/dist/eventMapLaws.d.ts +63 -0
  51. package/dist/eventMapLaws.js +128 -0
  52. package/dist/events.d.ts +554 -0
  53. package/dist/events.js +633 -0
  54. package/dist/executor.d.ts +771 -0
  55. package/dist/executor.js +1829 -0
  56. package/dist/extension.d.ts +448 -0
  57. package/dist/extension.js +315 -0
  58. package/dist/facets.d.ts +53 -0
  59. package/dist/facets.js +60 -0
  60. package/dist/foldedSections.d.ts +74 -0
  61. package/dist/foldedSections.js +161 -0
  62. package/dist/genres.d.ts +507 -0
  63. package/dist/genres.js +633 -0
  64. package/dist/guardedConnection.d.ts +138 -0
  65. package/dist/guardedConnection.js +341 -0
  66. package/dist/handlebarsReach.d.ts +122 -0
  67. package/dist/handlebarsReach.js +222 -0
  68. package/dist/hash.d.ts +146 -0
  69. package/dist/hash.js +166 -0
  70. package/dist/hookGrants.d.ts +47 -0
  71. package/dist/hookGrants.js +68 -0
  72. package/dist/hooks.d.ts +290 -0
  73. package/dist/hooks.js +113 -0
  74. package/dist/hostElements.d.ts +447 -0
  75. package/dist/hostElements.js +702 -0
  76. package/dist/i18n.d.ts +94 -0
  77. package/dist/i18n.js +123 -0
  78. package/dist/identity.d.ts +93 -0
  79. package/dist/identity.js +135 -0
  80. package/dist/index.d.ts +85 -0
  81. package/dist/index.js +176 -0
  82. package/dist/layout.d.ts +194 -0
  83. package/dist/layout.js +40 -0
  84. package/dist/media.d.ts +202 -0
  85. package/dist/media.js +70 -0
  86. package/dist/messageBlocks.d.ts +487 -0
  87. package/dist/messageBlocks.js +683 -0
  88. package/dist/migration.d.ts +128 -0
  89. package/dist/migration.js +261 -0
  90. package/dist/names.d.ts +78 -0
  91. package/dist/names.js +136 -0
  92. package/dist/nodeInput.d.ts +399 -0
  93. package/dist/nodeInput.js +178 -0
  94. package/dist/participants.d.ts +291 -0
  95. package/dist/participants.js +252 -0
  96. package/dist/personGate.d.ts +62 -0
  97. package/dist/personGate.js +77 -0
  98. package/dist/pick.d.ts +84 -0
  99. package/dist/pick.js +103 -0
  100. package/dist/pluginHarness.d.ts +235 -0
  101. package/dist/pluginHarness.js +558 -0
  102. package/dist/pluginPermissions.d.ts +25 -0
  103. package/dist/pluginPermissions.js +97 -0
  104. package/dist/pluginRuleRef.d.ts +13 -0
  105. package/dist/pluginRuleRef.js +10 -0
  106. package/dist/predicates.d.ts +182 -0
  107. package/dist/predicates.js +249 -0
  108. package/dist/preview.d.ts +120 -0
  109. package/dist/preview.js +82 -0
  110. package/dist/promptBlocks.d.ts +130 -0
  111. package/dist/promptBlocks.js +197 -0
  112. package/dist/rankingDecisions.d.ts +60 -0
  113. package/dist/rankingDecisions.js +48 -0
  114. package/dist/receipt.d.ts +313 -0
  115. package/dist/receipt.js +60 -0
  116. package/dist/receiverRules.d.ts +24 -0
  117. package/dist/receiverRules.js +94 -0
  118. package/dist/refs.d.ts +117 -0
  119. package/dist/refs.js +137 -0
  120. package/dist/registry.d.ts +230 -0
  121. package/dist/registry.js +273 -0
  122. package/dist/review.d.ts +108 -0
  123. package/dist/review.js +97 -0
  124. package/dist/sampling.d.ts +152 -0
  125. package/dist/sampling.js +712 -0
  126. package/dist/scope.d.ts +65 -0
  127. package/dist/scope.js +128 -0
  128. package/dist/scripts.d.ts +243 -0
  129. package/dist/scripts.js +326 -0
  130. package/dist/sessionLayout.d.ts +339 -0
  131. package/dist/sessionLayout.js +503 -0
  132. package/dist/sessionSettings.d.ts +70 -0
  133. package/dist/sessionSettings.js +2 -0
  134. package/dist/settings.d.ts +501 -0
  135. package/dist/settings.js +604 -0
  136. package/dist/settingsSlot.d.ts +108 -0
  137. package/dist/settingsSlot.js +166 -0
  138. package/dist/shapes.d.ts +373 -0
  139. package/dist/shapes.js +408 -0
  140. package/dist/sheets.d.ts +165 -0
  141. package/dist/sheets.js +251 -0
  142. package/dist/statShapes.d.ts +96 -0
  143. package/dist/statShapes.js +112 -0
  144. package/dist/status.d.ts +103 -0
  145. package/dist/status.js +125 -0
  146. package/dist/storage.d.ts +145 -0
  147. package/dist/storage.js +33 -0
  148. package/dist/storyTime.d.ts +308 -0
  149. package/dist/storyTime.js +560 -0
  150. package/dist/surfaces.d.ts +501 -0
  151. package/dist/surfaces.js +292 -0
  152. package/dist/template.d.ts +312 -0
  153. package/dist/template.js +554 -0
  154. package/dist/templateCheck.d.ts +60 -0
  155. package/dist/templateCheck.js +516 -0
  156. package/dist/templateFit.d.ts +157 -0
  157. package/dist/templateFit.js +349 -0
  158. package/dist/templateIds.d.ts +138 -0
  159. package/dist/templateIds.js +144 -0
  160. package/dist/templateScopeAt.d.ts +131 -0
  161. package/dist/templateScopeAt.js +354 -0
  162. package/dist/testing.d.ts +177 -0
  163. package/dist/testing.js +383 -0
  164. package/dist/tokenizers.d.ts +113 -0
  165. package/dist/tokenizers.js +184 -0
  166. package/dist/turnLock.d.ts +96 -0
  167. package/dist/turnLock.js +79 -0
  168. package/dist/turnOrder.d.ts +143 -0
  169. package/dist/turnOrder.js +128 -0
  170. package/dist/validate.d.ts +74 -0
  171. package/dist/validate.js +1399 -0
  172. package/dist/values.d.ts +212 -0
  173. package/dist/values.js +390 -0
  174. package/dist/variables.d.ts +493 -0
  175. package/dist/variables.js +662 -0
  176. package/dist/verdicts.d.ts +275 -0
  177. package/dist/verdicts.js +348 -0
  178. package/dist/widgetDecls.d.ts +88 -0
  179. package/dist/widgetDecls.js +119 -0
  180. package/dist/widgets.d.ts +1527 -0
  181. package/dist/widgets.js +208 -0
  182. package/dist/wire.d.ts +126 -0
  183. package/dist/wire.js +140 -0
  184. package/dist/worldinfo.d.ts +150 -0
  185. package/dist/worldinfo.js +212 -0
  186. package/host-elements.d.ts +914 -0
  187. package/package.json +67 -0
@@ -0,0 +1,447 @@
1
+ /**
2
+ * The host-element vocabulary (§3.5, R17, R22): every element a component
3
+ * may place, with the attributes it takes, the events it raises and the
4
+ * named slots it fills. A component runs in the page's UI worker and the
5
+ * host mirrors what it renders into the widget box; **this table is the
6
+ * allowlist the host's receiver enforces**, so an element, attribute or
7
+ * event not listed here never reaches the page.
8
+ *
9
+ * Two families:
10
+ *
11
+ * - **plain elements** — the HTML a widget lays text out with. Each takes
12
+ * `class` (scoped by the widget-CSS rule, like every widget's). `href` must
13
+ * be `https:` or a fragment and opens in a new tab only (`target="_blank"`;
14
+ * the host sets `rel="noopener noreferrer"` itself); `src` is the app's own
15
+ * media or the plugin's own files — never another host, because an image
16
+ * URL is a request the page makes, and a remote's only path out is its
17
+ * plugin's own server-side actions.
18
+ * - **`sp-*` sp elements** — elements the HOST renders, with its own components:
19
+ * one per piece of behaviour a widget needs and cannot fake from plain
20
+ * elements (a positioned popover, a menu, a dialog, tabs, form controls
21
+ * that keep the caret on the page, markdown that streams, a scroll that
22
+ * sticks to the bottom, a real document for a charting library).
23
+ *
24
+ * **Sp elements are unopinionated about style (R22).** An sp element renders the markup
25
+ * its behaviour needs and the structural hooks a skin targets — `.sp-<name>`
26
+ * on its root and the parts named in its `parts` — and no colour, radius or
27
+ * spacing beyond what the behaviour requires. A widget styles it through
28
+ * `class`; a skin does the rest. Unstyled-but-correct is the accepted
29
+ * failure mode, never a broken widget.
30
+ *
31
+ * **Form controls are host-owned.** `input`, `textarea`, `sp-composer-field`,
32
+ * `sp-combobox`, `sp-slider` and `sp-switch` raise their value on `input` /
33
+ * `change`; a component never writes `value` back except to reset it, so a
34
+ * keystroke is one message and the caret never moves.
35
+ *
36
+ * **Events** arrive as `CustomEvent`s whose `detail` each element's `doc`
37
+ * states; a plain control's carry `{ value }` (`{ checked }` for a checkbox),
38
+ * and a click carries nothing.
39
+ *
40
+ * Every element also takes `slot` (which named slot of its sp-element
41
+ * parent it fills) — not listed per element, allowed everywhere.
42
+ *
43
+ * Nothing here is an `on*` attribute, a `style` attribute, `script`, `style`
44
+ * or `iframe` — `sp-frame` is the one way to a real document, through the
45
+ * frame machinery (opaque origin, CSP, a MessageChannel port). The SDK's own
46
+ * tests hold that line.
47
+ *
48
+ * **Values are checked too** ({@link hostAttributeValueFinding}): a name in
49
+ * the table is not a licence for any value — `href` is `https:` or a
50
+ * fragment, `target` only `_blank` / `_self`, `input type` a short list. The
51
+ * receiver calls it for every attribute it mirrors; ids are the receiver's
52
+ * to prefix per widget box, so a remote cannot collide with the page's.
53
+ *
54
+ * @experimental 🚧 provisional until core's own session widgets render
55
+ * through it (C7, R21): the set may grow and an attribute may be renamed
56
+ * before then. It never shrinks after 1.0.
57
+ */
58
+ /** One element in the vocabulary. @experimental */
59
+ export interface HostElementSpec {
60
+ /** Attributes the host accepts; anything else is dropped. */
61
+ readonly attributes: readonly string[];
62
+ /** Events the host raises to the component. */
63
+ readonly events: readonly string[];
64
+ /** Named slots a child fills with `slot="<name>"`; unslotted children are the body. */
65
+ readonly slots?: readonly string[];
66
+ /** Sp elements only: the child elements it lays out (a menu's items, a tab's panels). */
67
+ readonly children?: readonly string[];
68
+ /** Sp elements only: the structural classes a skin targets, besides `.sp-<name>` on the root. */
69
+ readonly parts?: readonly string[];
70
+ /** What the element is for, and what its events carry — the `.d.ts` prints it. */
71
+ readonly doc: string;
72
+ }
73
+ /**
74
+ * The allowlist. Keys are tag names; order is the order the `.d.ts` prints.
75
+ *
76
+ * @experimental 🚧 until C7 (see the module note).
77
+ */
78
+ export declare const SP_HOST_ELEMENTS: {
79
+ readonly div: HostElementSpec;
80
+ readonly span: HostElementSpec;
81
+ readonly p: HostElementSpec;
82
+ readonly ul: HostElementSpec;
83
+ readonly ol: HostElementSpec;
84
+ readonly li: HostElementSpec;
85
+ readonly h1: HostElementSpec;
86
+ readonly h2: HostElementSpec;
87
+ readonly h3: HostElementSpec;
88
+ readonly h4: HostElementSpec;
89
+ readonly strong: HostElementSpec;
90
+ readonly em: HostElementSpec;
91
+ readonly small: HostElementSpec;
92
+ readonly code: HostElementSpec;
93
+ readonly kbd: HostElementSpec;
94
+ readonly article: HostElementSpec;
95
+ readonly header: HostElementSpec;
96
+ readonly section: HostElementSpec;
97
+ readonly dl: HostElementSpec;
98
+ readonly dt: HostElementSpec;
99
+ readonly dd: HostElementSpec;
100
+ readonly hr: HostElementSpec;
101
+ readonly br: HostElementSpec;
102
+ readonly table: HostElementSpec;
103
+ readonly thead: HostElementSpec;
104
+ readonly tbody: HostElementSpec;
105
+ readonly tr: HostElementSpec;
106
+ readonly th: HostElementSpec;
107
+ readonly td: HostElementSpec;
108
+ readonly button: HostElementSpec;
109
+ readonly input: HostElementSpec;
110
+ readonly textarea: HostElementSpec;
111
+ readonly label: HostElementSpec;
112
+ readonly img: HostElementSpec;
113
+ readonly a: HostElementSpec;
114
+ readonly 'sp-avatar': {
115
+ readonly attributes: readonly ["ref", "size", "class"];
116
+ readonly events: readonly [];
117
+ readonly parts: readonly ["sp-avatar-image", "sp-avatar-fallback"];
118
+ readonly doc: "A participant's avatar, by participant reference (`character:3`, `user:1`). `size` is `sm` · `md` · `lg`.";
119
+ };
120
+ readonly 'sp-icon': {
121
+ readonly attributes: readonly ["name", "size", "label", "class"];
122
+ readonly events: readonly [];
123
+ readonly doc: 'An icon from the app\'s set, by kebab-case name (`book-open`). With no `label` it is decorative.';
124
+ };
125
+ readonly 'sp-badge': {
126
+ readonly attributes: readonly ["tone", "class"];
127
+ readonly events: readonly [];
128
+ readonly doc: 'A short label. `tone` is `neutral` · `primary` · `success` · `warning` · `error`.';
129
+ };
130
+ readonly 'sp-progress': {
131
+ readonly attributes: readonly ["value", "max", "label", "class"];
132
+ readonly events: readonly [];
133
+ readonly parts: readonly ["sp-progress-track", "sp-progress-fill"];
134
+ readonly doc: 'A progress bar. No `value` is indeterminate.';
135
+ };
136
+ readonly 'sp-tooltip': {
137
+ readonly attributes: readonly ["text", "placement", "class"];
138
+ readonly events: readonly [];
139
+ readonly parts: readonly ["sp-tooltip-panel"];
140
+ readonly doc: 'A tooltip over its body, which is the trigger. `placement` is a side (`top` · `bottom` · `left` · `right`).';
141
+ };
142
+ readonly 'sp-popover': {
143
+ readonly attributes: readonly ["open", "placement", "label", "class"];
144
+ readonly events: readonly ["open-change"];
145
+ readonly slots: readonly ["trigger"];
146
+ readonly parts: readonly ["sp-popover-panel"];
147
+ readonly doc: 'A positioned panel. The `trigger` slot opens it; the body is the panel. `open-change` carries `{ open }`.';
148
+ };
149
+ readonly 'sp-menu': {
150
+ readonly attributes: readonly ["open", "placement", "label", "class"];
151
+ readonly events: readonly ["select", "open-change"];
152
+ readonly slots: readonly ["trigger"];
153
+ readonly children: readonly ["sp-menu-item"];
154
+ readonly parts: readonly ["sp-menu-panel", "sp-menu-row"];
155
+ readonly doc: 'A menu of actions. The `trigger` slot opens it. `select` carries `{ value }`; `open-change` carries `{ open }`.';
156
+ };
157
+ readonly 'sp-menu-item': {
158
+ readonly attributes: readonly ["value", "disabled", "class"];
159
+ readonly events: readonly [];
160
+ readonly doc: 'One action in an `sp-menu`; its content (a label, an icon, a note) is the row\'s.';
161
+ };
162
+ readonly 'sp-dialog': {
163
+ readonly attributes: readonly ["open", "label", "class"];
164
+ readonly events: readonly ["open-change"];
165
+ readonly slots: readonly ["title", "footer"];
166
+ readonly parts: readonly ["sp-dialog-backdrop", "sp-dialog-panel"];
167
+ readonly doc: 'A modal dialog, focus-trapped by the host. `open-change` carries `{ open }` — Escape and the backdrop close it.';
168
+ };
169
+ readonly 'sp-tabs': {
170
+ readonly attributes: readonly ["value", "label", "class"];
171
+ readonly events: readonly ["change"];
172
+ readonly slots: readonly ["list-end"];
173
+ readonly children: readonly ["sp-tab", "sp-tab-panel"];
174
+ readonly parts: readonly ["sp-tabs-list", "sp-tab-trigger"];
175
+ readonly doc: 'Tabs. `sp-tab` children are the list, `sp-tab-panel` children the panels, matched by `value`; the `list-end` slot sits at the end of the list (an overflow control). `change` carries `{ value }`.';
176
+ };
177
+ readonly 'sp-tab': {
178
+ readonly attributes: readonly ["value", "disabled", "label", "class"];
179
+ readonly events: readonly [];
180
+ readonly doc: 'One tab in an `sp-tabs`; its content (a label, an icon) is the trigger\'s, `label` names the trigger when its content is only an icon, and its `class` is the trigger\'s too.';
181
+ };
182
+ readonly 'sp-tab-panel': {
183
+ readonly attributes: readonly ["value", "class"];
184
+ readonly events: readonly [];
185
+ readonly doc: 'The panel an `sp-tab` of the same `value` shows.';
186
+ };
187
+ readonly 'sp-accordion': {
188
+ readonly attributes: readonly ["value", "multiple", "class"];
189
+ readonly events: readonly ["change"];
190
+ readonly children: readonly ["sp-accordion-item"];
191
+ readonly doc: 'Collapsible sections. `value` is the open item (space-separated when `multiple`). `change` carries `{ value }`.';
192
+ };
193
+ readonly 'sp-accordion-item': {
194
+ readonly attributes: readonly ["value", "heading", "level", "class"];
195
+ readonly events: readonly [];
196
+ readonly parts: readonly ["sp-accordion-trigger", "sp-accordion-panel"];
197
+ readonly doc: 'One section of an `sp-accordion`; `heading` is its trigger text (a heading of `level` 2–6, default 3), its body the panel.';
198
+ };
199
+ readonly 'sp-switch': {
200
+ readonly attributes: readonly ["checked", "disabled", "label", "class"];
201
+ readonly events: readonly ["change"];
202
+ readonly doc: 'A host-owned on/off switch. `change` carries `{ checked }`.';
203
+ };
204
+ readonly 'sp-slider': {
205
+ readonly attributes: readonly ["value", "min", "max", "step", "disabled", "label", "class"];
206
+ readonly events: readonly ["input", "change"];
207
+ readonly doc: 'A host-owned slider. `input` (while dragging) and `change` (on release) carry `{ value }`.';
208
+ };
209
+ readonly 'sp-combobox': {
210
+ readonly attributes: readonly ["value", "placeholder", "disabled", "label", "class"];
211
+ readonly events: readonly ["input", "change"];
212
+ readonly children: readonly ["sp-option"];
213
+ readonly doc: 'A host-owned searchable select. `input` carries `{ query }` as the person types; `change` carries `{ value }`.';
214
+ };
215
+ readonly 'sp-option': {
216
+ readonly attributes: readonly ["value", "disabled", "class"];
217
+ readonly events: readonly [];
218
+ readonly doc: 'One option of an `sp-combobox`; its body is the label.';
219
+ };
220
+ readonly 'sp-message-body': {
221
+ readonly attributes: readonly ["text", "streaming", "class"];
222
+ readonly events: readonly ["open-image"];
223
+ readonly doc: "A message's text, rendered as the app renders messages (markdown, quotes, actions) by the host. Update `text` as message pushes arrive; `streaming` shows the in-progress state. `open-image` (`{ src }`) fires when a person clicks an image in the text.";
224
+ };
225
+ readonly 'sp-composer-field': {
226
+ readonly attributes: readonly ["value", "placeholder", "disabled", "label", "rows", "class", "submit-on", "keys", "field-class", "spellcheck", "aria-invalid", "aria-describedby", "aria-controls", "aria-activedescendant", "aria-autocomplete", "autofocus"];
227
+ readonly events: readonly ["input", "change", "submit", "key", "focus"];
228
+ readonly doc: string;
229
+ };
230
+ readonly 'sp-file-picker': {
231
+ readonly attributes: readonly ["accept", "multiple", "disabled", "class"];
232
+ readonly events: readonly ["files"];
233
+ readonly doc: string;
234
+ };
235
+ readonly 'sp-drop-zone': {
236
+ readonly attributes: readonly ["disabled", "label", "class"];
237
+ readonly events: readonly ["files"];
238
+ readonly parts: readonly ["sp-drop-zone-overlay"];
239
+ readonly doc: string;
240
+ };
241
+ readonly 'sp-scroll': {
242
+ readonly attributes: readonly ["stick", "label", "class"];
243
+ readonly events: readonly ["reach-start"];
244
+ readonly doc: 'A scroll region. `stick="bottom"` keeps it anchored to the end as content grows, as a log does (`stick="top"` for a newest-first log); scrolled away from that end, what is on screen stays put as rows arrive above or below. `reach-start` fires when the far end from `stick` is reached (load older).';
245
+ };
246
+ readonly 'sp-host-view': {
247
+ readonly attributes: readonly ["name", "channel", "class"];
248
+ readonly events: readonly [];
249
+ readonly doc: "🚧 One of the host's own views, drawn by the host where the element sits (`name` from `HOST_VIEW_NAMES`). The widget places it and never sees inside it — what the host draws there is the viewer's, not the widget's. `channel` (1.1) says which channel the place is for — a channel-pinned conversation's turn controls and action chips are that channel's listing; absent, the host's own composer channel.";
250
+ };
251
+ readonly 'sp-frame': {
252
+ readonly attributes: readonly ["src", "props", "title", "class"];
253
+ readonly events: readonly ["action", "error", "invoke"];
254
+ readonly 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.";
255
+ };
256
+ };
257
+ /** @experimental */
258
+ export type HostElementTag = keyof typeof SP_HOST_ELEMENTS;
259
+ /** The host sp elements alone — the elements the host must implement (C1b's boot gate). @experimental */
260
+ export declare const SP_ELEMENT_TAGS: Array<Extract<HostElementTag, `sp-${string}`>>;
261
+ /** Is this element in the vocabulary? @experimental */
262
+ export declare function isHostElement(tag: string): boolean;
263
+ /** Does this element accept this attribute? `slot` is accepted on every element. @experimental */
264
+ export declare function hostAttributeAllowed(tag: string, attribute: string): boolean;
265
+ /**
266
+ * Attributes every element takes (C0b), besides `aria-*` (all of them; the
267
+ * ones naming an element by id are the host's to prefix) and a widget's own
268
+ * `data-*`: `hidden` and `inert` hide and disable what the widget drew;
269
+ * `role`; `tabindex` (0 or -1 — into the tab order or out of it, never
270
+ * ahead of the page's); and `style`, holding CUSTOM PROPERTIES only
271
+ * (`--sp-fill: 40%`), which the widget's skin reads — a declaration of its
272
+ * own could fetch (`url()`) or cover the page.
273
+ * @experimental
274
+ */
275
+ export declare const GLOBAL_ATTRIBUTES: readonly string[];
276
+ /** One `style` value's custom properties, or why it holds something else. @experimental */
277
+ export declare function customPropertiesFinding(value: string): string | undefined;
278
+ /**
279
+ * A widget's own `data-*` attribute — what its skin and a style pack key
280
+ * off. `data-sp-*` is the HOST's (`data-sp-owner` decides whose rules an
281
+ * element falls under), so a widget never writes one.
282
+ * @experimental
283
+ */
284
+ export declare const isDataAttribute: (attribute: string) => boolean;
285
+ /** `input type`s a component may place — no `file`, `password`, `submit`, `image`, `hidden`. */
286
+ /**
287
+ * 🚧 The host views a widget may place with `sp-host-view` (C0b) — parts of
288
+ * the page that belong to the session, not to any widget: the status strips
289
+ * above the composer and the composer's own page tabs. The list grows; a name
290
+ * the host does not know renders nothing.
291
+ * @experimental
292
+ */
293
+ 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
+ /** @experimental */
295
+ export type HostViewName = (typeof HOST_VIEW_NAMES)[number];
296
+ /** 🚧 The `aria-current` values an element may carry — the ARIA tokens, no free text. @experimental */
297
+ export declare const HOST_ARIA_CURRENT: readonly ['page', 'step', 'location', 'date', 'time', 'true', 'false'];
298
+ /**
299
+ * 🚧 The `aria-live` values an element may carry: `off` and `polite` only.
300
+ * Never `assertive` — it interrupts whatever the screen reader is saying,
301
+ * and a widget is one box among many on a page the person is using; a
302
+ * widget that shouts over the composer or the page's own announcements
303
+ * takes the reader away from the person. The page keeps assertive for its
304
+ * own alerts.
305
+ * @experimental
306
+ */
307
+ export declare const HOST_ARIA_LIVE: readonly ['off', 'polite'];
308
+ /** @experimental */
309
+ export declare const HOST_INPUT_TYPES: readonly ['text', 'search', 'number', 'checkbox', 'radio', 'range', 'email', 'url', 'color', 'date', 'time'];
310
+ /**
311
+ * 🚧 What a `key` event carries (R80) — `sp-composer-field`'s and a plain
312
+ * `input`'s alike: the key pressed (`KeyboardEvent.key`), and the modifiers
313
+ * held with it.
314
+ * @experimental
315
+ */
316
+ export interface HostKeyEventDetail {
317
+ key: string;
318
+ shift: boolean;
319
+ ctrl: boolean;
320
+ meta: boolean;
321
+ }
322
+ /** 🚧 A key press as the host reads one — a `KeyboardEvent` is one. @experimental */
323
+ export interface HostKeyPress {
324
+ readonly key: string;
325
+ readonly shiftKey: boolean;
326
+ readonly ctrlKey: boolean;
327
+ readonly metaKey: boolean;
328
+ /** Mid-composition (an IME's): never a key the widget handles. */
329
+ readonly isComposing?: boolean;
330
+ }
331
+ /**
332
+ * 🚧 Does this `keys` value name this press (R80)? THE reading of the
333
+ * grammar, for every element that takes `keys`: a bare key names it whatever
334
+ * is held — except that a bare `Enter` leaves Shift+Enter to the field (a
335
+ * composer's newline) — and `Control+Enter` names it only while Control is
336
+ * held (every modifier the token names held; others may be too). A press
337
+ * mid-composition is named by nothing.
338
+ * @experimental
339
+ */
340
+ export declare function hostKeysMatch(keys: string | null | undefined, press: HostKeyPress): boolean;
341
+ /** 🚧 The `key` event's detail for this press (R80). @experimental */
342
+ export declare function hostKeyEventDetail(press: HostKeyPress): HostKeyEventDetail;
343
+ /**
344
+ * Why this value may not be written to this attribute, or `undefined` if it
345
+ * may. Assumes {@link hostAttributeAllowed} already said the name is fine.
346
+ * Per tag where one attribute means two things (`sp-frame`'s `src` is a
347
+ * document its plugin ships, a plain `img`'s is a URL).
348
+ * @experimental
349
+ */
350
+ export declare function hostAttributeValueFinding(tag: string, attribute: string, value: string): string | undefined;
351
+ /** Does this element raise this event? @experimental */
352
+ export declare function hostEventAllowed(tag: string, event: string): boolean;
353
+ /**
354
+ * 🚧 The events the page re-delivers (C7): `click` alone. The receiver
355
+ * forwards an event only from the node that listens for it, and only the
356
+ * vocabulary's listeners exist — a button hears `click`; the `span` label
357
+ * inside it does not, nor the `svg` an icon draws for itself — so a click on
358
+ * a button's label or icon was lost. Never `change`, `input` and the rest: a
359
+ * descendant's, re-delivered, would arrive as the ANCESTOR's own event
360
+ * carrying the descendant's value.
361
+ * @experimental
362
+ */
363
+ export declare const REDELIVERED_EVENTS: readonly ['click'];
364
+ /**
365
+ * 🚧 Where the page re-delivers an event that started on `origin`, or `null`
366
+ * when it does not: the nearest element strictly inside `territory` (a
367
+ * remote's box, or a panel one of its elements portaled out) that takes the
368
+ * event, above where it starts. It starts at `origin` (a text node's parent)
369
+ * — or, inside markup a host element drew for itself, at that element (the
370
+ * outermost whose `ownsMarkup(origin)` says so). `null` when where it starts
371
+ * takes the event (its own listener hears it), when nothing below
372
+ * `territory` does, when `origin` is `territory` or outside it, and for an
373
+ * event not in {@link REDELIVERED_EVENTS}.
374
+ *
375
+ * Reads the DOM and dispatches nothing: the page and the component harness
376
+ * share it, and each dispatches {@link redeliveredCopy} there.
377
+ * @experimental
378
+ */
379
+ export declare function redeliveryTarget(origin: Node, type: string, territory: Element): Element | null;
380
+ /**
381
+ * 🚧 The copy the page dispatches at {@link redeliveryTarget}: unbubbling, and
382
+ * a `CustomEvent` — never a `MouseEvent`, whose dispatch runs an `<a>`'s or a
383
+ * `<button>`'s activation, so the person's own click (which activates it on
384
+ * its way up) would activate it twice: two downloads, two tabs. The listener
385
+ * it reaches forwards nothing of it; the page's summary is read off the
386
+ * person's event. Made in the event's own window, so a DOM beside another
387
+ * realm's globals (a test's) dispatches it.
388
+ * @experimental
389
+ */
390
+ export declare function redeliveredCopy(e: Event): Event;
391
+ /**
392
+ * 🚧 Where the page raises `key` for a keydown (R80): the plain `input` the
393
+ * press landed on, when it sits strictly inside `territory` (a remote's box,
394
+ * or a panel one of its elements portaled out) and its `keys` names the
395
+ * press ({@link hostKeysMatch}) — else `null`. `sp-composer-field` reads its
396
+ * own `keys`, by the same rule. Reads the DOM and dispatches nothing: the
397
+ * page and the component harness share it, and each keeps the press from the
398
+ * field (`preventDefault`) and dispatches {@link hostKeyEvent} there.
399
+ * @experimental
400
+ */
401
+ export declare function keyedInputTarget(e: KeyboardEvent, territory: Element): Element | null;
402
+ /**
403
+ * 🚧 The `key` event the page dispatches at {@link keyedInputTarget} (R80):
404
+ * a `CustomEvent` carrying {@link HostKeyEventDetail}, unbubbling — the
405
+ * receiver listens on the field itself, and the page has no business with
406
+ * it. Made in the press's own window, as {@link redeliveredCopy} is.
407
+ * @experimental
408
+ */
409
+ export declare function hostKeyEvent(e: KeyboardEvent): CustomEvent<HostKeyEventDetail>;
410
+ /**
411
+ * The editor typings for the vocabulary, as the text of a `.d.ts` — shipped
412
+ * from the SDK as `@serene-pub/sdk/host-elements` so an editor and the CLI
413
+ * know every element, attribute, event and slot. Generated from the table,
414
+ * so the typings cannot disagree with what the host accepts; a test holds
415
+ * the checked-in file to this output.
416
+ * @experimental
417
+ */
418
+ export declare function hostElementsDts(): string;
419
+ /**
420
+ * @experimental 🚧 with the vocabulary it versions (F1).
421
+ *
422
+ * The version of the host-element vocabulary's PUBLIC SHAPE — every tag in
423
+ * {@link SP_HOST_ELEMENTS} with its attributes, events, slots, children and
424
+ * parts, and the closed value lists beside it ({@link GLOBAL_ATTRIBUTES},
425
+ * {@link HOST_VIEW_NAMES}, {@link HOST_ARIA_CURRENT}, {@link HOST_ARIA_LIVE},
426
+ * {@link HOST_INPUT_TYPES}). A built component records the one it was built
427
+ * against (`builtAgainst.hostElements`, F1), and a host refuses to mount one
428
+ * whose MAJOR it lacks (`componentBuiltAgainstFinding`).
429
+ *
430
+ * `major.minor`, never a hash: a hash changes on every addition and cannot
431
+ * tell "grew" (harmless — a year-old component places nothing new) from
432
+ * "shrank" (fatal — it places what the host now drops). So:
433
+ *
434
+ * - **minor** bumps when the shape GROWS: a tag, an attribute, an event, a
435
+ * slot, a part, a value. A component built for a newer minor still mounts
436
+ * on an older host — what that host does not know it drops, the
437
+ * vocabulary's stated failure mode (unstyled-but-correct, R22).
438
+ * - **major** bumps when anything is REMOVED, RENAMED or NARROWED (a value
439
+ * list loses a value, an event changes its `detail`). A host that has
440
+ * moved to a new major still lists the majors it keeps mounting.
441
+ *
442
+ * A test pins a hash of the shape to this version (`sdk-tests/
443
+ * componentBuiltAgainst.test.ts`): change the table without bumping this and
444
+ * the suite says which to bump. `doc` strings are not the shape.
445
+ */
446
+ export declare const HOST_ELEMENTS_VERSION: '1.3';
447
+ //# sourceMappingURL=hostElements.d.ts.map