@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.
- package/LICENSE +202 -0
- package/NOTICE +17 -0
- package/README.md +368 -0
- package/dist/actions.d.ts +572 -0
- package/dist/actions.js +829 -0
- package/dist/annexFields.d.ts +234 -0
- package/dist/annexFields.js +413 -0
- package/dist/announce.d.ts +464 -0
- package/dist/announce.js +426 -0
- package/dist/attributes.d.ts +670 -0
- package/dist/attributes.js +904 -0
- package/dist/bands.d.ts +125 -0
- package/dist/bands.js +256 -0
- package/dist/builder.d.ts +683 -0
- package/dist/builder.js +677 -0
- package/dist/candidates.d.ts +109 -0
- package/dist/candidates.js +118 -0
- package/dist/capabilities.d.ts +744 -0
- package/dist/capabilities.js +679 -0
- package/dist/channels.d.ts +106 -0
- package/dist/channels.js +129 -0
- package/dist/clauses.d.ts +40 -0
- package/dist/clauses.js +43 -0
- package/dist/component.d.ts +33 -0
- package/dist/component.js +27 -0
- package/dist/componentBuild.d.ts +48 -0
- package/dist/componentBuild.js +84 -0
- package/dist/componentClient.d.ts +100 -0
- package/dist/componentClient.js +13 -0
- package/dist/componentImports.d.ts +51 -0
- package/dist/componentImports.js +106 -0
- package/dist/componentModule.d.ts +8 -0
- package/dist/componentModule.js +270 -0
- package/dist/componentWire.d.ts +130 -0
- package/dist/componentWire.js +280 -0
- package/dist/config.d.ts +295 -0
- package/dist/config.js +231 -0
- package/dist/connections.d.ts +89 -0
- package/dist/connections.js +131 -0
- package/dist/declarations.d.ts +290 -0
- package/dist/declarations.js +794 -0
- package/dist/descriptors.d.ts +1774 -0
- package/dist/descriptors.js +1329 -0
- package/dist/dev.d.ts +136 -0
- package/dist/dev.js +161 -0
- package/dist/document.d.ts +202 -0
- package/dist/document.js +312 -0
- package/dist/engines.d.ts +117 -0
- package/dist/engines.js +203 -0
- package/dist/eventMapLaws.d.ts +63 -0
- package/dist/eventMapLaws.js +128 -0
- package/dist/events.d.ts +554 -0
- package/dist/events.js +633 -0
- package/dist/executor.d.ts +771 -0
- package/dist/executor.js +1829 -0
- package/dist/extension.d.ts +448 -0
- package/dist/extension.js +315 -0
- package/dist/facets.d.ts +53 -0
- package/dist/facets.js +60 -0
- package/dist/foldedSections.d.ts +74 -0
- package/dist/foldedSections.js +161 -0
- package/dist/genres.d.ts +507 -0
- package/dist/genres.js +633 -0
- package/dist/guardedConnection.d.ts +138 -0
- package/dist/guardedConnection.js +341 -0
- package/dist/handlebarsReach.d.ts +122 -0
- package/dist/handlebarsReach.js +222 -0
- package/dist/hash.d.ts +146 -0
- package/dist/hash.js +166 -0
- package/dist/hookGrants.d.ts +47 -0
- package/dist/hookGrants.js +68 -0
- package/dist/hooks.d.ts +290 -0
- package/dist/hooks.js +113 -0
- package/dist/hostElements.d.ts +447 -0
- package/dist/hostElements.js +702 -0
- package/dist/i18n.d.ts +94 -0
- package/dist/i18n.js +123 -0
- package/dist/identity.d.ts +93 -0
- package/dist/identity.js +135 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.js +176 -0
- package/dist/layout.d.ts +194 -0
- package/dist/layout.js +40 -0
- package/dist/media.d.ts +202 -0
- package/dist/media.js +70 -0
- package/dist/messageBlocks.d.ts +487 -0
- package/dist/messageBlocks.js +683 -0
- package/dist/migration.d.ts +128 -0
- package/dist/migration.js +261 -0
- package/dist/names.d.ts +78 -0
- package/dist/names.js +136 -0
- package/dist/nodeInput.d.ts +399 -0
- package/dist/nodeInput.js +178 -0
- package/dist/participants.d.ts +291 -0
- package/dist/participants.js +252 -0
- package/dist/personGate.d.ts +62 -0
- package/dist/personGate.js +77 -0
- package/dist/pick.d.ts +84 -0
- package/dist/pick.js +103 -0
- package/dist/pluginHarness.d.ts +235 -0
- package/dist/pluginHarness.js +558 -0
- package/dist/pluginPermissions.d.ts +25 -0
- package/dist/pluginPermissions.js +97 -0
- package/dist/pluginRuleRef.d.ts +13 -0
- package/dist/pluginRuleRef.js +10 -0
- package/dist/predicates.d.ts +182 -0
- package/dist/predicates.js +249 -0
- package/dist/preview.d.ts +120 -0
- package/dist/preview.js +82 -0
- package/dist/promptBlocks.d.ts +130 -0
- package/dist/promptBlocks.js +197 -0
- package/dist/rankingDecisions.d.ts +60 -0
- package/dist/rankingDecisions.js +48 -0
- package/dist/receipt.d.ts +313 -0
- package/dist/receipt.js +60 -0
- package/dist/receiverRules.d.ts +24 -0
- package/dist/receiverRules.js +94 -0
- package/dist/refs.d.ts +117 -0
- package/dist/refs.js +137 -0
- package/dist/registry.d.ts +230 -0
- package/dist/registry.js +273 -0
- package/dist/review.d.ts +108 -0
- package/dist/review.js +97 -0
- package/dist/sampling.d.ts +152 -0
- package/dist/sampling.js +712 -0
- package/dist/scope.d.ts +65 -0
- package/dist/scope.js +128 -0
- package/dist/scripts.d.ts +243 -0
- package/dist/scripts.js +326 -0
- package/dist/sessionLayout.d.ts +339 -0
- package/dist/sessionLayout.js +503 -0
- package/dist/sessionSettings.d.ts +70 -0
- package/dist/sessionSettings.js +2 -0
- package/dist/settings.d.ts +501 -0
- package/dist/settings.js +604 -0
- package/dist/settingsSlot.d.ts +108 -0
- package/dist/settingsSlot.js +166 -0
- package/dist/shapes.d.ts +373 -0
- package/dist/shapes.js +408 -0
- package/dist/sheets.d.ts +165 -0
- package/dist/sheets.js +251 -0
- package/dist/statShapes.d.ts +96 -0
- package/dist/statShapes.js +112 -0
- package/dist/status.d.ts +103 -0
- package/dist/status.js +125 -0
- package/dist/storage.d.ts +145 -0
- package/dist/storage.js +33 -0
- package/dist/storyTime.d.ts +308 -0
- package/dist/storyTime.js +560 -0
- package/dist/surfaces.d.ts +501 -0
- package/dist/surfaces.js +292 -0
- package/dist/template.d.ts +312 -0
- package/dist/template.js +554 -0
- package/dist/templateCheck.d.ts +60 -0
- package/dist/templateCheck.js +516 -0
- package/dist/templateFit.d.ts +157 -0
- package/dist/templateFit.js +349 -0
- package/dist/templateIds.d.ts +138 -0
- package/dist/templateIds.js +144 -0
- package/dist/templateScopeAt.d.ts +131 -0
- package/dist/templateScopeAt.js +354 -0
- package/dist/testing.d.ts +177 -0
- package/dist/testing.js +383 -0
- package/dist/tokenizers.d.ts +113 -0
- package/dist/tokenizers.js +184 -0
- package/dist/turnLock.d.ts +96 -0
- package/dist/turnLock.js +79 -0
- package/dist/turnOrder.d.ts +143 -0
- package/dist/turnOrder.js +128 -0
- package/dist/validate.d.ts +74 -0
- package/dist/validate.js +1399 -0
- package/dist/values.d.ts +212 -0
- package/dist/values.js +390 -0
- package/dist/variables.d.ts +493 -0
- package/dist/variables.js +662 -0
- package/dist/verdicts.d.ts +275 -0
- package/dist/verdicts.js +348 -0
- package/dist/widgetDecls.d.ts +88 -0
- package/dist/widgetDecls.js +119 -0
- package/dist/widgets.d.ts +1527 -0
- package/dist/widgets.js +208 -0
- package/dist/wire.d.ts +126 -0
- package/dist/wire.js +140 -0
- package/dist/worldinfo.d.ts +150 -0
- package/dist/worldinfo.js +212 -0
- package/host-elements.d.ts +914 -0
- package/package.json +67 -0
|
@@ -0,0 +1,914 @@
|
|
|
1
|
+
// Generated from SP_HOST_ELEMENTS (sdk/src/hostElements.ts) — do not edit.
|
|
2
|
+
// Regenerate: npm run host-elements -w sdk
|
|
3
|
+
|
|
4
|
+
/** Attributes are strings on the wire; booleans are present-or-absent. @experimental 🚧 until C7 settles. */
|
|
5
|
+
type SpAttr = string | number | boolean | null | undefined
|
|
6
|
+
|
|
7
|
+
/** Every element a component may place, with the attributes each accepts. @experimental 🚧 until C7 settles. */
|
|
8
|
+
export interface SpHostElements {
|
|
9
|
+
/**
|
|
10
|
+
* A block.
|
|
11
|
+
*/
|
|
12
|
+
'div': {
|
|
13
|
+
'id'?: SpAttr
|
|
14
|
+
'role'?: SpAttr
|
|
15
|
+
'aria-label'?: SpAttr
|
|
16
|
+
'aria-labelledby'?: SpAttr
|
|
17
|
+
'aria-describedby'?: SpAttr
|
|
18
|
+
'aria-hidden'?: SpAttr
|
|
19
|
+
'aria-current'?: SpAttr
|
|
20
|
+
'aria-live'?: SpAttr
|
|
21
|
+
'title'?: SpAttr
|
|
22
|
+
'class'?: SpAttr
|
|
23
|
+
slot?: string
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* An inline run.
|
|
27
|
+
*/
|
|
28
|
+
'span': {
|
|
29
|
+
'id'?: SpAttr
|
|
30
|
+
'role'?: SpAttr
|
|
31
|
+
'aria-label'?: SpAttr
|
|
32
|
+
'aria-labelledby'?: SpAttr
|
|
33
|
+
'aria-describedby'?: SpAttr
|
|
34
|
+
'aria-hidden'?: SpAttr
|
|
35
|
+
'aria-current'?: SpAttr
|
|
36
|
+
'aria-live'?: SpAttr
|
|
37
|
+
'title'?: SpAttr
|
|
38
|
+
'class'?: SpAttr
|
|
39
|
+
slot?: string
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A paragraph.
|
|
43
|
+
*/
|
|
44
|
+
'p': {
|
|
45
|
+
'id'?: SpAttr
|
|
46
|
+
'role'?: SpAttr
|
|
47
|
+
'aria-label'?: SpAttr
|
|
48
|
+
'aria-labelledby'?: SpAttr
|
|
49
|
+
'aria-describedby'?: SpAttr
|
|
50
|
+
'aria-hidden'?: SpAttr
|
|
51
|
+
'aria-current'?: SpAttr
|
|
52
|
+
'aria-live'?: SpAttr
|
|
53
|
+
'title'?: SpAttr
|
|
54
|
+
'class'?: SpAttr
|
|
55
|
+
slot?: string
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* An unordered list.
|
|
59
|
+
*/
|
|
60
|
+
'ul': {
|
|
61
|
+
'id'?: SpAttr
|
|
62
|
+
'role'?: SpAttr
|
|
63
|
+
'aria-label'?: SpAttr
|
|
64
|
+
'aria-labelledby'?: SpAttr
|
|
65
|
+
'aria-describedby'?: SpAttr
|
|
66
|
+
'aria-hidden'?: SpAttr
|
|
67
|
+
'aria-current'?: SpAttr
|
|
68
|
+
'aria-live'?: SpAttr
|
|
69
|
+
'title'?: SpAttr
|
|
70
|
+
'class'?: SpAttr
|
|
71
|
+
slot?: string
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* An ordered list.
|
|
75
|
+
*/
|
|
76
|
+
'ol': {
|
|
77
|
+
'id'?: SpAttr
|
|
78
|
+
'role'?: SpAttr
|
|
79
|
+
'aria-label'?: SpAttr
|
|
80
|
+
'aria-labelledby'?: SpAttr
|
|
81
|
+
'aria-describedby'?: SpAttr
|
|
82
|
+
'aria-hidden'?: SpAttr
|
|
83
|
+
'aria-current'?: SpAttr
|
|
84
|
+
'aria-live'?: SpAttr
|
|
85
|
+
'title'?: SpAttr
|
|
86
|
+
'class'?: SpAttr
|
|
87
|
+
slot?: string
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A list item.
|
|
91
|
+
*/
|
|
92
|
+
'li': {
|
|
93
|
+
'id'?: SpAttr
|
|
94
|
+
'role'?: SpAttr
|
|
95
|
+
'aria-label'?: SpAttr
|
|
96
|
+
'aria-labelledby'?: SpAttr
|
|
97
|
+
'aria-describedby'?: SpAttr
|
|
98
|
+
'aria-hidden'?: SpAttr
|
|
99
|
+
'aria-current'?: SpAttr
|
|
100
|
+
'aria-live'?: SpAttr
|
|
101
|
+
'title'?: SpAttr
|
|
102
|
+
'class'?: SpAttr
|
|
103
|
+
slot?: string
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* A heading.
|
|
107
|
+
*/
|
|
108
|
+
'h1': {
|
|
109
|
+
'id'?: SpAttr
|
|
110
|
+
'role'?: SpAttr
|
|
111
|
+
'aria-label'?: SpAttr
|
|
112
|
+
'aria-labelledby'?: SpAttr
|
|
113
|
+
'aria-describedby'?: SpAttr
|
|
114
|
+
'aria-hidden'?: SpAttr
|
|
115
|
+
'aria-current'?: SpAttr
|
|
116
|
+
'aria-live'?: SpAttr
|
|
117
|
+
'title'?: SpAttr
|
|
118
|
+
'class'?: SpAttr
|
|
119
|
+
slot?: string
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* A heading.
|
|
123
|
+
*/
|
|
124
|
+
'h2': {
|
|
125
|
+
'id'?: SpAttr
|
|
126
|
+
'role'?: SpAttr
|
|
127
|
+
'aria-label'?: SpAttr
|
|
128
|
+
'aria-labelledby'?: SpAttr
|
|
129
|
+
'aria-describedby'?: SpAttr
|
|
130
|
+
'aria-hidden'?: SpAttr
|
|
131
|
+
'aria-current'?: SpAttr
|
|
132
|
+
'aria-live'?: SpAttr
|
|
133
|
+
'title'?: SpAttr
|
|
134
|
+
'class'?: SpAttr
|
|
135
|
+
slot?: string
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* A heading.
|
|
139
|
+
*/
|
|
140
|
+
'h3': {
|
|
141
|
+
'id'?: SpAttr
|
|
142
|
+
'role'?: SpAttr
|
|
143
|
+
'aria-label'?: SpAttr
|
|
144
|
+
'aria-labelledby'?: SpAttr
|
|
145
|
+
'aria-describedby'?: SpAttr
|
|
146
|
+
'aria-hidden'?: SpAttr
|
|
147
|
+
'aria-current'?: SpAttr
|
|
148
|
+
'aria-live'?: SpAttr
|
|
149
|
+
'title'?: SpAttr
|
|
150
|
+
'class'?: SpAttr
|
|
151
|
+
slot?: string
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* A heading.
|
|
155
|
+
*/
|
|
156
|
+
'h4': {
|
|
157
|
+
'id'?: SpAttr
|
|
158
|
+
'role'?: SpAttr
|
|
159
|
+
'aria-label'?: SpAttr
|
|
160
|
+
'aria-labelledby'?: SpAttr
|
|
161
|
+
'aria-describedby'?: SpAttr
|
|
162
|
+
'aria-hidden'?: SpAttr
|
|
163
|
+
'aria-current'?: SpAttr
|
|
164
|
+
'aria-live'?: SpAttr
|
|
165
|
+
'title'?: SpAttr
|
|
166
|
+
'class'?: SpAttr
|
|
167
|
+
slot?: string
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Strong emphasis.
|
|
171
|
+
*/
|
|
172
|
+
'strong': {
|
|
173
|
+
'id'?: SpAttr
|
|
174
|
+
'role'?: SpAttr
|
|
175
|
+
'aria-label'?: SpAttr
|
|
176
|
+
'aria-labelledby'?: SpAttr
|
|
177
|
+
'aria-describedby'?: SpAttr
|
|
178
|
+
'aria-hidden'?: SpAttr
|
|
179
|
+
'aria-current'?: SpAttr
|
|
180
|
+
'aria-live'?: SpAttr
|
|
181
|
+
'title'?: SpAttr
|
|
182
|
+
'class'?: SpAttr
|
|
183
|
+
slot?: string
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Emphasis.
|
|
187
|
+
*/
|
|
188
|
+
'em': {
|
|
189
|
+
'id'?: SpAttr
|
|
190
|
+
'role'?: SpAttr
|
|
191
|
+
'aria-label'?: SpAttr
|
|
192
|
+
'aria-labelledby'?: SpAttr
|
|
193
|
+
'aria-describedby'?: SpAttr
|
|
194
|
+
'aria-hidden'?: SpAttr
|
|
195
|
+
'aria-current'?: SpAttr
|
|
196
|
+
'aria-live'?: SpAttr
|
|
197
|
+
'title'?: SpAttr
|
|
198
|
+
'class'?: SpAttr
|
|
199
|
+
slot?: string
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Small print.
|
|
203
|
+
*/
|
|
204
|
+
'small': {
|
|
205
|
+
'id'?: SpAttr
|
|
206
|
+
'role'?: SpAttr
|
|
207
|
+
'aria-label'?: SpAttr
|
|
208
|
+
'aria-labelledby'?: SpAttr
|
|
209
|
+
'aria-describedby'?: SpAttr
|
|
210
|
+
'aria-hidden'?: SpAttr
|
|
211
|
+
'aria-current'?: SpAttr
|
|
212
|
+
'aria-live'?: SpAttr
|
|
213
|
+
'title'?: SpAttr
|
|
214
|
+
'class'?: SpAttr
|
|
215
|
+
slot?: string
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Inline code.
|
|
219
|
+
*/
|
|
220
|
+
'code': {
|
|
221
|
+
'id'?: SpAttr
|
|
222
|
+
'role'?: SpAttr
|
|
223
|
+
'aria-label'?: SpAttr
|
|
224
|
+
'aria-labelledby'?: SpAttr
|
|
225
|
+
'aria-describedby'?: SpAttr
|
|
226
|
+
'aria-hidden'?: SpAttr
|
|
227
|
+
'aria-current'?: SpAttr
|
|
228
|
+
'aria-live'?: SpAttr
|
|
229
|
+
'title'?: SpAttr
|
|
230
|
+
'class'?: SpAttr
|
|
231
|
+
slot?: string
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* A key a person presses.
|
|
235
|
+
*/
|
|
236
|
+
'kbd': {
|
|
237
|
+
'id'?: SpAttr
|
|
238
|
+
'role'?: SpAttr
|
|
239
|
+
'aria-label'?: SpAttr
|
|
240
|
+
'aria-labelledby'?: SpAttr
|
|
241
|
+
'aria-describedby'?: SpAttr
|
|
242
|
+
'aria-hidden'?: SpAttr
|
|
243
|
+
'aria-current'?: SpAttr
|
|
244
|
+
'aria-live'?: SpAttr
|
|
245
|
+
'title'?: SpAttr
|
|
246
|
+
'class'?: SpAttr
|
|
247
|
+
slot?: string
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* A self-contained item (a message, a card).
|
|
251
|
+
*/
|
|
252
|
+
'article': {
|
|
253
|
+
'id'?: SpAttr
|
|
254
|
+
'role'?: SpAttr
|
|
255
|
+
'aria-label'?: SpAttr
|
|
256
|
+
'aria-labelledby'?: SpAttr
|
|
257
|
+
'aria-describedby'?: SpAttr
|
|
258
|
+
'aria-hidden'?: SpAttr
|
|
259
|
+
'aria-current'?: SpAttr
|
|
260
|
+
'aria-live'?: SpAttr
|
|
261
|
+
'title'?: SpAttr
|
|
262
|
+
'class'?: SpAttr
|
|
263
|
+
slot?: string
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* A group's heading row.
|
|
267
|
+
*/
|
|
268
|
+
'header': {
|
|
269
|
+
'id'?: SpAttr
|
|
270
|
+
'role'?: SpAttr
|
|
271
|
+
'aria-label'?: SpAttr
|
|
272
|
+
'aria-labelledby'?: SpAttr
|
|
273
|
+
'aria-describedby'?: SpAttr
|
|
274
|
+
'aria-hidden'?: SpAttr
|
|
275
|
+
'aria-current'?: SpAttr
|
|
276
|
+
'aria-live'?: SpAttr
|
|
277
|
+
'title'?: SpAttr
|
|
278
|
+
'class'?: SpAttr
|
|
279
|
+
slot?: string
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* A titled part of a component (label it: `aria-label` or a heading).
|
|
283
|
+
*/
|
|
284
|
+
'section': {
|
|
285
|
+
'id'?: SpAttr
|
|
286
|
+
'role'?: SpAttr
|
|
287
|
+
'aria-label'?: SpAttr
|
|
288
|
+
'aria-labelledby'?: SpAttr
|
|
289
|
+
'aria-describedby'?: SpAttr
|
|
290
|
+
'aria-hidden'?: SpAttr
|
|
291
|
+
'aria-current'?: SpAttr
|
|
292
|
+
'aria-live'?: SpAttr
|
|
293
|
+
'title'?: SpAttr
|
|
294
|
+
'class'?: SpAttr
|
|
295
|
+
slot?: string
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* A description list.
|
|
299
|
+
*/
|
|
300
|
+
'dl': {
|
|
301
|
+
'id'?: SpAttr
|
|
302
|
+
'role'?: SpAttr
|
|
303
|
+
'aria-label'?: SpAttr
|
|
304
|
+
'aria-labelledby'?: SpAttr
|
|
305
|
+
'aria-describedby'?: SpAttr
|
|
306
|
+
'aria-hidden'?: SpAttr
|
|
307
|
+
'aria-current'?: SpAttr
|
|
308
|
+
'aria-live'?: SpAttr
|
|
309
|
+
'title'?: SpAttr
|
|
310
|
+
'class'?: SpAttr
|
|
311
|
+
slot?: string
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* A described term.
|
|
315
|
+
*/
|
|
316
|
+
'dt': {
|
|
317
|
+
'id'?: SpAttr
|
|
318
|
+
'role'?: SpAttr
|
|
319
|
+
'aria-label'?: SpAttr
|
|
320
|
+
'aria-labelledby'?: SpAttr
|
|
321
|
+
'aria-describedby'?: SpAttr
|
|
322
|
+
'aria-hidden'?: SpAttr
|
|
323
|
+
'aria-current'?: SpAttr
|
|
324
|
+
'aria-live'?: SpAttr
|
|
325
|
+
'title'?: SpAttr
|
|
326
|
+
'class'?: SpAttr
|
|
327
|
+
slot?: string
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* A term's description.
|
|
331
|
+
*/
|
|
332
|
+
'dd': {
|
|
333
|
+
'id'?: SpAttr
|
|
334
|
+
'role'?: SpAttr
|
|
335
|
+
'aria-label'?: SpAttr
|
|
336
|
+
'aria-labelledby'?: SpAttr
|
|
337
|
+
'aria-describedby'?: SpAttr
|
|
338
|
+
'aria-hidden'?: SpAttr
|
|
339
|
+
'aria-current'?: SpAttr
|
|
340
|
+
'aria-live'?: SpAttr
|
|
341
|
+
'title'?: SpAttr
|
|
342
|
+
'class'?: SpAttr
|
|
343
|
+
slot?: string
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* A thematic break.
|
|
347
|
+
*/
|
|
348
|
+
'hr': {
|
|
349
|
+
'id'?: SpAttr
|
|
350
|
+
'role'?: SpAttr
|
|
351
|
+
'aria-label'?: SpAttr
|
|
352
|
+
'aria-labelledby'?: SpAttr
|
|
353
|
+
'aria-describedby'?: SpAttr
|
|
354
|
+
'aria-hidden'?: SpAttr
|
|
355
|
+
'aria-current'?: SpAttr
|
|
356
|
+
'aria-live'?: SpAttr
|
|
357
|
+
'title'?: SpAttr
|
|
358
|
+
'class'?: SpAttr
|
|
359
|
+
slot?: string
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* A line break.
|
|
363
|
+
*/
|
|
364
|
+
'br': {
|
|
365
|
+
'class'?: SpAttr
|
|
366
|
+
slot?: string
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* A table.
|
|
370
|
+
*/
|
|
371
|
+
'table': {
|
|
372
|
+
'id'?: SpAttr
|
|
373
|
+
'role'?: SpAttr
|
|
374
|
+
'aria-label'?: SpAttr
|
|
375
|
+
'aria-labelledby'?: SpAttr
|
|
376
|
+
'aria-describedby'?: SpAttr
|
|
377
|
+
'aria-hidden'?: SpAttr
|
|
378
|
+
'aria-current'?: SpAttr
|
|
379
|
+
'aria-live'?: SpAttr
|
|
380
|
+
'title'?: SpAttr
|
|
381
|
+
'class'?: SpAttr
|
|
382
|
+
slot?: string
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* A table head.
|
|
386
|
+
*/
|
|
387
|
+
'thead': {
|
|
388
|
+
'id'?: SpAttr
|
|
389
|
+
'role'?: SpAttr
|
|
390
|
+
'aria-label'?: SpAttr
|
|
391
|
+
'aria-labelledby'?: SpAttr
|
|
392
|
+
'aria-describedby'?: SpAttr
|
|
393
|
+
'aria-hidden'?: SpAttr
|
|
394
|
+
'aria-current'?: SpAttr
|
|
395
|
+
'aria-live'?: SpAttr
|
|
396
|
+
'title'?: SpAttr
|
|
397
|
+
'class'?: SpAttr
|
|
398
|
+
slot?: string
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* A table body.
|
|
402
|
+
*/
|
|
403
|
+
'tbody': {
|
|
404
|
+
'id'?: SpAttr
|
|
405
|
+
'role'?: SpAttr
|
|
406
|
+
'aria-label'?: SpAttr
|
|
407
|
+
'aria-labelledby'?: SpAttr
|
|
408
|
+
'aria-describedby'?: SpAttr
|
|
409
|
+
'aria-hidden'?: SpAttr
|
|
410
|
+
'aria-current'?: SpAttr
|
|
411
|
+
'aria-live'?: SpAttr
|
|
412
|
+
'title'?: SpAttr
|
|
413
|
+
'class'?: SpAttr
|
|
414
|
+
slot?: string
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* A table row.
|
|
418
|
+
*/
|
|
419
|
+
'tr': {
|
|
420
|
+
'id'?: SpAttr
|
|
421
|
+
'role'?: SpAttr
|
|
422
|
+
'aria-label'?: SpAttr
|
|
423
|
+
'aria-labelledby'?: SpAttr
|
|
424
|
+
'aria-describedby'?: SpAttr
|
|
425
|
+
'aria-hidden'?: SpAttr
|
|
426
|
+
'aria-current'?: SpAttr
|
|
427
|
+
'aria-live'?: SpAttr
|
|
428
|
+
'title'?: SpAttr
|
|
429
|
+
'class'?: SpAttr
|
|
430
|
+
slot?: string
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* A header cell.
|
|
434
|
+
*/
|
|
435
|
+
'th': {
|
|
436
|
+
'id'?: SpAttr
|
|
437
|
+
'role'?: SpAttr
|
|
438
|
+
'aria-label'?: SpAttr
|
|
439
|
+
'aria-labelledby'?: SpAttr
|
|
440
|
+
'aria-describedby'?: SpAttr
|
|
441
|
+
'aria-hidden'?: SpAttr
|
|
442
|
+
'aria-current'?: SpAttr
|
|
443
|
+
'aria-live'?: SpAttr
|
|
444
|
+
'title'?: SpAttr
|
|
445
|
+
'scope'?: SpAttr
|
|
446
|
+
'colspan'?: SpAttr
|
|
447
|
+
'rowspan'?: SpAttr
|
|
448
|
+
'class'?: SpAttr
|
|
449
|
+
slot?: string
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* A data cell.
|
|
453
|
+
*/
|
|
454
|
+
'td': {
|
|
455
|
+
'id'?: SpAttr
|
|
456
|
+
'role'?: SpAttr
|
|
457
|
+
'aria-label'?: SpAttr
|
|
458
|
+
'aria-labelledby'?: SpAttr
|
|
459
|
+
'aria-describedby'?: SpAttr
|
|
460
|
+
'aria-hidden'?: SpAttr
|
|
461
|
+
'aria-current'?: SpAttr
|
|
462
|
+
'aria-live'?: SpAttr
|
|
463
|
+
'title'?: SpAttr
|
|
464
|
+
'colspan'?: SpAttr
|
|
465
|
+
'rowspan'?: SpAttr
|
|
466
|
+
'class'?: SpAttr
|
|
467
|
+
slot?: string
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* A button. `click` carries nothing.
|
|
471
|
+
* Events: `click`.
|
|
472
|
+
*/
|
|
473
|
+
'button': {
|
|
474
|
+
'id'?: SpAttr
|
|
475
|
+
'role'?: SpAttr
|
|
476
|
+
'aria-label'?: SpAttr
|
|
477
|
+
'aria-labelledby'?: SpAttr
|
|
478
|
+
'aria-describedby'?: SpAttr
|
|
479
|
+
'aria-hidden'?: SpAttr
|
|
480
|
+
'aria-current'?: SpAttr
|
|
481
|
+
'aria-live'?: SpAttr
|
|
482
|
+
'title'?: SpAttr
|
|
483
|
+
'type'?: SpAttr
|
|
484
|
+
'disabled'?: SpAttr
|
|
485
|
+
'aria-pressed'?: SpAttr
|
|
486
|
+
'aria-expanded'?: SpAttr
|
|
487
|
+
'class'?: SpAttr
|
|
488
|
+
slot?: string
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* A host-owned text, number or checkbox input. `input` / `change` carry `{ value }` (`{ checked }` for a checkbox); `value` written by the component resets it. `keys` names keys the widget handles itself, in `sp-composer-field`'s words (`Escape Enter`, `Control+Enter`): each is kept from the field and raised as `key` (`{ key, shift, ctrl, meta }`); every other key is the field's own, so a number field still steps on its arrows. `blur` (nothing carried) is the field losing focus — a number field raises `change` on every spinner step, so an editor that closes when the person is done listens for `blur`.
|
|
492
|
+
* Events: `input`, `change`, `key`, `blur`.
|
|
493
|
+
*/
|
|
494
|
+
'input': {
|
|
495
|
+
'id'?: SpAttr
|
|
496
|
+
'role'?: SpAttr
|
|
497
|
+
'aria-label'?: SpAttr
|
|
498
|
+
'aria-labelledby'?: SpAttr
|
|
499
|
+
'aria-describedby'?: SpAttr
|
|
500
|
+
'aria-hidden'?: SpAttr
|
|
501
|
+
'aria-current'?: SpAttr
|
|
502
|
+
'aria-live'?: SpAttr
|
|
503
|
+
'title'?: SpAttr
|
|
504
|
+
'type'?: SpAttr
|
|
505
|
+
'value'?: SpAttr
|
|
506
|
+
'checked'?: SpAttr
|
|
507
|
+
'placeholder'?: SpAttr
|
|
508
|
+
'disabled'?: SpAttr
|
|
509
|
+
'min'?: SpAttr
|
|
510
|
+
'max'?: SpAttr
|
|
511
|
+
'step'?: SpAttr
|
|
512
|
+
'name'?: SpAttr
|
|
513
|
+
'autocomplete'?: SpAttr
|
|
514
|
+
'spellcheck'?: SpAttr
|
|
515
|
+
'autofocus'?: SpAttr
|
|
516
|
+
'keys'?: SpAttr
|
|
517
|
+
'class'?: SpAttr
|
|
518
|
+
slot?: string
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* A host-owned multi-line input. `input` / `change` carry `{ value }`.
|
|
522
|
+
* Events: `input`, `change`.
|
|
523
|
+
*/
|
|
524
|
+
'textarea': {
|
|
525
|
+
'id'?: SpAttr
|
|
526
|
+
'role'?: SpAttr
|
|
527
|
+
'aria-label'?: SpAttr
|
|
528
|
+
'aria-labelledby'?: SpAttr
|
|
529
|
+
'aria-describedby'?: SpAttr
|
|
530
|
+
'aria-hidden'?: SpAttr
|
|
531
|
+
'aria-current'?: SpAttr
|
|
532
|
+
'aria-live'?: SpAttr
|
|
533
|
+
'title'?: SpAttr
|
|
534
|
+
'value'?: SpAttr
|
|
535
|
+
'placeholder'?: SpAttr
|
|
536
|
+
'disabled'?: SpAttr
|
|
537
|
+
'rows'?: SpAttr
|
|
538
|
+
'name'?: SpAttr
|
|
539
|
+
'autocomplete'?: SpAttr
|
|
540
|
+
'spellcheck'?: SpAttr
|
|
541
|
+
'autofocus'?: SpAttr
|
|
542
|
+
'class'?: SpAttr
|
|
543
|
+
slot?: string
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* A label for a control.
|
|
547
|
+
*/
|
|
548
|
+
'label': {
|
|
549
|
+
'for'?: SpAttr
|
|
550
|
+
'id'?: SpAttr
|
|
551
|
+
'class'?: SpAttr
|
|
552
|
+
slot?: string
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* An image. `src` is an app media URL (`/media/…`, a session asset `/session-assets/<id>`) or the plugin's own file (`/plugin-ui/…`) — never another host. `loading` is `lazy` · `eager` and `decoding` `async` · `sync` · `auto` (1.2). `error` (nothing carried) is the image failing to load — a file deleted since, say — so a widget can draw its own stand-in rather than a broken image (1.2).
|
|
556
|
+
* Events: `error`.
|
|
557
|
+
*/
|
|
558
|
+
'img': {
|
|
559
|
+
'src'?: SpAttr
|
|
560
|
+
'alt'?: SpAttr
|
|
561
|
+
'width'?: SpAttr
|
|
562
|
+
'height'?: SpAttr
|
|
563
|
+
'id'?: SpAttr
|
|
564
|
+
'title'?: SpAttr
|
|
565
|
+
'loading'?: SpAttr
|
|
566
|
+
'decoding'?: SpAttr
|
|
567
|
+
'class'?: SpAttr
|
|
568
|
+
slot?: string
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* A link. `href` is `https:`, a fragment or one of the app's own files (`/media/…`, `/session-assets/…`); `target` may only be `_blank`, `download` names a saved file, and the host sets `rel="noopener noreferrer"`.
|
|
572
|
+
* Events: `click`.
|
|
573
|
+
*/
|
|
574
|
+
'a': {
|
|
575
|
+
'id'?: SpAttr
|
|
576
|
+
'role'?: SpAttr
|
|
577
|
+
'aria-label'?: SpAttr
|
|
578
|
+
'aria-labelledby'?: SpAttr
|
|
579
|
+
'aria-describedby'?: SpAttr
|
|
580
|
+
'aria-hidden'?: SpAttr
|
|
581
|
+
'aria-current'?: SpAttr
|
|
582
|
+
'aria-live'?: SpAttr
|
|
583
|
+
'title'?: SpAttr
|
|
584
|
+
'href'?: SpAttr
|
|
585
|
+
'target'?: SpAttr
|
|
586
|
+
'download'?: SpAttr
|
|
587
|
+
'class'?: SpAttr
|
|
588
|
+
slot?: string
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* A participant's avatar, by participant reference (`character:3`, `user:1`). `size` is `sm` · `md` · `lg`.
|
|
592
|
+
* Parts: `.sp-avatar`, `.sp-avatar-image`, `.sp-avatar-fallback`.
|
|
593
|
+
*/
|
|
594
|
+
'sp-avatar': {
|
|
595
|
+
'ref'?: SpAttr
|
|
596
|
+
'size'?: SpAttr
|
|
597
|
+
'class'?: SpAttr
|
|
598
|
+
slot?: string
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* An icon from the app's set, by kebab-case name (`book-open`). With no `label` it is decorative.
|
|
602
|
+
* Parts: `.sp-icon`.
|
|
603
|
+
*/
|
|
604
|
+
'sp-icon': {
|
|
605
|
+
'name'?: SpAttr
|
|
606
|
+
'size'?: SpAttr
|
|
607
|
+
'label'?: SpAttr
|
|
608
|
+
'class'?: SpAttr
|
|
609
|
+
slot?: string
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* A short label. `tone` is `neutral` · `primary` · `success` · `warning` · `error`.
|
|
613
|
+
* Parts: `.sp-badge`.
|
|
614
|
+
*/
|
|
615
|
+
'sp-badge': {
|
|
616
|
+
'tone'?: SpAttr
|
|
617
|
+
'class'?: SpAttr
|
|
618
|
+
slot?: string
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* A progress bar. No `value` is indeterminate.
|
|
622
|
+
* Parts: `.sp-progress`, `.sp-progress-track`, `.sp-progress-fill`.
|
|
623
|
+
*/
|
|
624
|
+
'sp-progress': {
|
|
625
|
+
'value'?: SpAttr
|
|
626
|
+
'max'?: SpAttr
|
|
627
|
+
'label'?: SpAttr
|
|
628
|
+
'class'?: SpAttr
|
|
629
|
+
slot?: string
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* A tooltip over its body, which is the trigger. `placement` is a side (`top` · `bottom` · `left` · `right`).
|
|
633
|
+
* Parts: `.sp-tooltip`, `.sp-tooltip-panel`.
|
|
634
|
+
*/
|
|
635
|
+
'sp-tooltip': {
|
|
636
|
+
'text'?: SpAttr
|
|
637
|
+
'placement'?: SpAttr
|
|
638
|
+
'class'?: SpAttr
|
|
639
|
+
slot?: string
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* A positioned panel. The `trigger` slot opens it; the body is the panel. `open-change` carries `{ open }`.
|
|
643
|
+
* Slots: `trigger`.
|
|
644
|
+
* Parts: `.sp-popover`, `.sp-popover-panel`.
|
|
645
|
+
* Events: `open-change`.
|
|
646
|
+
*/
|
|
647
|
+
'sp-popover': {
|
|
648
|
+
'open'?: SpAttr
|
|
649
|
+
'placement'?: SpAttr
|
|
650
|
+
'label'?: SpAttr
|
|
651
|
+
'class'?: SpAttr
|
|
652
|
+
slot?: string
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* A menu of actions. The `trigger` slot opens it. `select` carries `{ value }`; `open-change` carries `{ open }`.
|
|
656
|
+
* Slots: `trigger`.
|
|
657
|
+
* Children: `<sp-menu-item>`.
|
|
658
|
+
* Parts: `.sp-menu`, `.sp-menu-panel`, `.sp-menu-row`.
|
|
659
|
+
* Events: `select`, `open-change`.
|
|
660
|
+
*/
|
|
661
|
+
'sp-menu': {
|
|
662
|
+
'open'?: SpAttr
|
|
663
|
+
'placement'?: SpAttr
|
|
664
|
+
'label'?: SpAttr
|
|
665
|
+
'class'?: SpAttr
|
|
666
|
+
slot?: string
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* One action in an `sp-menu`; its content (a label, an icon, a note) is the row's.
|
|
670
|
+
* Parts: `.sp-menu-item`.
|
|
671
|
+
*/
|
|
672
|
+
'sp-menu-item': {
|
|
673
|
+
'value'?: SpAttr
|
|
674
|
+
'disabled'?: SpAttr
|
|
675
|
+
'class'?: SpAttr
|
|
676
|
+
slot?: string
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* A modal dialog, focus-trapped by the host. `open-change` carries `{ open }` — Escape and the backdrop close it.
|
|
680
|
+
* Slots: `title`, `footer`.
|
|
681
|
+
* Parts: `.sp-dialog`, `.sp-dialog-backdrop`, `.sp-dialog-panel`.
|
|
682
|
+
* Events: `open-change`.
|
|
683
|
+
*/
|
|
684
|
+
'sp-dialog': {
|
|
685
|
+
'open'?: SpAttr
|
|
686
|
+
'label'?: SpAttr
|
|
687
|
+
'class'?: SpAttr
|
|
688
|
+
slot?: string
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* 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 }`.
|
|
692
|
+
* Slots: `list-end`.
|
|
693
|
+
* Children: `<sp-tab>`, `<sp-tab-panel>`.
|
|
694
|
+
* Parts: `.sp-tabs`, `.sp-tabs-list`, `.sp-tab-trigger`.
|
|
695
|
+
* Events: `change`.
|
|
696
|
+
*/
|
|
697
|
+
'sp-tabs': {
|
|
698
|
+
'value'?: SpAttr
|
|
699
|
+
'label'?: SpAttr
|
|
700
|
+
'class'?: SpAttr
|
|
701
|
+
slot?: string
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* 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.
|
|
705
|
+
* Parts: `.sp-tab`.
|
|
706
|
+
*/
|
|
707
|
+
'sp-tab': {
|
|
708
|
+
'value'?: SpAttr
|
|
709
|
+
'disabled'?: SpAttr
|
|
710
|
+
'label'?: SpAttr
|
|
711
|
+
'class'?: SpAttr
|
|
712
|
+
slot?: string
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* The panel an `sp-tab` of the same `value` shows.
|
|
716
|
+
* Parts: `.sp-tab-panel`.
|
|
717
|
+
*/
|
|
718
|
+
'sp-tab-panel': {
|
|
719
|
+
'value'?: SpAttr
|
|
720
|
+
'class'?: SpAttr
|
|
721
|
+
slot?: string
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Collapsible sections. `value` is the open item (space-separated when `multiple`). `change` carries `{ value }`.
|
|
725
|
+
* Children: `<sp-accordion-item>`.
|
|
726
|
+
* Parts: `.sp-accordion`.
|
|
727
|
+
* Events: `change`.
|
|
728
|
+
*/
|
|
729
|
+
'sp-accordion': {
|
|
730
|
+
'value'?: SpAttr
|
|
731
|
+
'multiple'?: SpAttr
|
|
732
|
+
'class'?: SpAttr
|
|
733
|
+
slot?: string
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* One section of an `sp-accordion`; `heading` is its trigger text (a heading of `level` 2–6, default 3), its body the panel.
|
|
737
|
+
* Parts: `.sp-accordion-item`, `.sp-accordion-trigger`, `.sp-accordion-panel`.
|
|
738
|
+
*/
|
|
739
|
+
'sp-accordion-item': {
|
|
740
|
+
'value'?: SpAttr
|
|
741
|
+
'heading'?: SpAttr
|
|
742
|
+
'level'?: SpAttr
|
|
743
|
+
'class'?: SpAttr
|
|
744
|
+
slot?: string
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* A host-owned on/off switch. `change` carries `{ checked }`.
|
|
748
|
+
* Parts: `.sp-switch`.
|
|
749
|
+
* Events: `change`.
|
|
750
|
+
*/
|
|
751
|
+
'sp-switch': {
|
|
752
|
+
'checked'?: SpAttr
|
|
753
|
+
'disabled'?: SpAttr
|
|
754
|
+
'label'?: SpAttr
|
|
755
|
+
'class'?: SpAttr
|
|
756
|
+
slot?: string
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* A host-owned slider. `input` (while dragging) and `change` (on release) carry `{ value }`.
|
|
760
|
+
* Parts: `.sp-slider`.
|
|
761
|
+
* Events: `input`, `change`.
|
|
762
|
+
*/
|
|
763
|
+
'sp-slider': {
|
|
764
|
+
'value'?: SpAttr
|
|
765
|
+
'min'?: SpAttr
|
|
766
|
+
'max'?: SpAttr
|
|
767
|
+
'step'?: SpAttr
|
|
768
|
+
'disabled'?: SpAttr
|
|
769
|
+
'label'?: SpAttr
|
|
770
|
+
'class'?: SpAttr
|
|
771
|
+
slot?: string
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* A host-owned searchable select. `input` carries `{ query }` as the person types; `change` carries `{ value }`.
|
|
775
|
+
* Children: `<sp-option>`.
|
|
776
|
+
* Parts: `.sp-combobox`.
|
|
777
|
+
* Events: `input`, `change`.
|
|
778
|
+
*/
|
|
779
|
+
'sp-combobox': {
|
|
780
|
+
'value'?: SpAttr
|
|
781
|
+
'placeholder'?: SpAttr
|
|
782
|
+
'disabled'?: SpAttr
|
|
783
|
+
'label'?: SpAttr
|
|
784
|
+
'class'?: SpAttr
|
|
785
|
+
slot?: string
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* One option of an `sp-combobox`; its body is the label.
|
|
789
|
+
* Parts: `.sp-option`.
|
|
790
|
+
*/
|
|
791
|
+
'sp-option': {
|
|
792
|
+
'value'?: SpAttr
|
|
793
|
+
'disabled'?: SpAttr
|
|
794
|
+
'class'?: SpAttr
|
|
795
|
+
slot?: string
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* 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.
|
|
799
|
+
* Parts: `.sp-message-body`.
|
|
800
|
+
* Events: `open-image`.
|
|
801
|
+
*/
|
|
802
|
+
'sp-message-body': {
|
|
803
|
+
'text'?: SpAttr
|
|
804
|
+
'streaming'?: SpAttr
|
|
805
|
+
'class'?: SpAttr
|
|
806
|
+
slot?: string
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* The app's composer text field, host-owned: the caret stays on the page. `input` / `change` carry `{ value }`; `submit` carries `{ value }` on the send key (Enter without Shift) unless `submit-on="none"`. `keys` names keys the widget handles itself (`ArrowUp ArrowDown Tab Escape Enter`; a bare `Enter` leaves Shift+Enter to the field), or a key only while a modifier is held (`Control+Enter Meta+Enter`; `Control`, `Meta`, `Shift`): each is kept from the field and raised as `key` (`{ key, shift, ctrl, meta }`). `autofocus` (core's alone) gives the field the caret, at its end, as it lands. The `aria-*` given here go on the field itself; `field-class` replaces the field's own classes (a composer skin styles the field, not its wrapper).
|
|
810
|
+
* Parts: `.sp-composer-field`.
|
|
811
|
+
* Events: `input`, `change`, `submit`, `key`, `focus`.
|
|
812
|
+
*/
|
|
813
|
+
'sp-composer-field': {
|
|
814
|
+
'value'?: SpAttr
|
|
815
|
+
'placeholder'?: SpAttr
|
|
816
|
+
'disabled'?: SpAttr
|
|
817
|
+
'label'?: SpAttr
|
|
818
|
+
'rows'?: SpAttr
|
|
819
|
+
'class'?: SpAttr
|
|
820
|
+
'submit-on'?: SpAttr
|
|
821
|
+
'keys'?: SpAttr
|
|
822
|
+
'field-class'?: SpAttr
|
|
823
|
+
'spellcheck'?: SpAttr
|
|
824
|
+
'aria-invalid'?: SpAttr
|
|
825
|
+
'aria-describedby'?: SpAttr
|
|
826
|
+
'aria-controls'?: SpAttr
|
|
827
|
+
'aria-activedescendant'?: SpAttr
|
|
828
|
+
'aria-autocomplete'?: SpAttr
|
|
829
|
+
'autofocus'?: SpAttr
|
|
830
|
+
slot?: string
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* 🚧 Opens the device's file picker when its body is clicked (1.3). The body is the widget's own control — a `button` it draws and names (`aria-label="Attach files"`) — so its look and label stay the widget's. `accept` is the picker's filter (`image/png,.md`), `multiple` lets several be chosen, `disabled` opens nothing. `files` carries `{ files: File[] }`, the chosen files as the page holds them. A file `input` is not in the vocabulary (`input type`): this is the one way to a file.
|
|
834
|
+
* Parts: `.sp-file-picker`.
|
|
835
|
+
* Events: `files`.
|
|
836
|
+
*/
|
|
837
|
+
'sp-file-picker': {
|
|
838
|
+
'accept'?: SpAttr
|
|
839
|
+
'multiple'?: SpAttr
|
|
840
|
+
'disabled'?: SpAttr
|
|
841
|
+
'class'?: SpAttr
|
|
842
|
+
slot?: string
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* 🚧 A region files can be dropped onto or pasted into (1.3). Its body is the region. While files are dragged over it the host shows an overlay (`sp-drop-zone-overlay`) saying `label` (default "Drop to attach"). `files` carries `{ files: File[], via: "drop" | "paste" }` — a drop, or a paste of files (a screenshot) anywhere inside the region; a paste of text stays the field's.
|
|
846
|
+
* Parts: `.sp-drop-zone`, `.sp-drop-zone-overlay`.
|
|
847
|
+
* Events: `files`.
|
|
848
|
+
*/
|
|
849
|
+
'sp-drop-zone': {
|
|
850
|
+
'disabled'?: SpAttr
|
|
851
|
+
'label'?: SpAttr
|
|
852
|
+
'class'?: SpAttr
|
|
853
|
+
slot?: string
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* 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).
|
|
857
|
+
* Parts: `.sp-scroll`.
|
|
858
|
+
* Events: `reach-start`.
|
|
859
|
+
*/
|
|
860
|
+
'sp-scroll': {
|
|
861
|
+
'stick'?: SpAttr
|
|
862
|
+
'label'?: SpAttr
|
|
863
|
+
'class'?: SpAttr
|
|
864
|
+
slot?: string
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* 🚧 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.
|
|
868
|
+
* Parts: `.sp-host-view`.
|
|
869
|
+
*/
|
|
870
|
+
'sp-host-view': {
|
|
871
|
+
'name'?: SpAttr
|
|
872
|
+
'channel'?: SpAttr
|
|
873
|
+
'class'?: SpAttr
|
|
874
|
+
slot?: string
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* 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.
|
|
878
|
+
* Parts: `.sp-frame`.
|
|
879
|
+
* Events: `action`, `error`, `invoke`.
|
|
880
|
+
*/
|
|
881
|
+
'sp-frame': {
|
|
882
|
+
'src'?: SpAttr
|
|
883
|
+
'props'?: SpAttr
|
|
884
|
+
'title'?: SpAttr
|
|
885
|
+
'class'?: SpAttr
|
|
886
|
+
slot?: string
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
/** Every tag a component may place. @experimental 🚧 until C7 settles. */
|
|
891
|
+
export type SpHostTag = keyof SpHostElements
|
|
892
|
+
|
|
893
|
+
/** The events each tag raises, for `addEventListener` typing. @experimental 🚧 until C7 settles. */
|
|
894
|
+
export interface SpHostEvents {
|
|
895
|
+
'button': 'click'
|
|
896
|
+
'input': 'input' | 'change' | 'key' | 'blur'
|
|
897
|
+
'textarea': 'input' | 'change'
|
|
898
|
+
'img': 'error'
|
|
899
|
+
'a': 'click'
|
|
900
|
+
'sp-popover': 'open-change'
|
|
901
|
+
'sp-menu': 'select' | 'open-change'
|
|
902
|
+
'sp-dialog': 'open-change'
|
|
903
|
+
'sp-tabs': 'change'
|
|
904
|
+
'sp-accordion': 'change'
|
|
905
|
+
'sp-switch': 'change'
|
|
906
|
+
'sp-slider': 'input' | 'change'
|
|
907
|
+
'sp-combobox': 'input' | 'change'
|
|
908
|
+
'sp-message-body': 'open-image'
|
|
909
|
+
'sp-composer-field': 'input' | 'change' | 'submit' | 'key' | 'focus'
|
|
910
|
+
'sp-file-picker': 'files'
|
|
911
|
+
'sp-drop-zone': 'files'
|
|
912
|
+
'sp-scroll': 'reach-start'
|
|
913
|
+
'sp-frame': 'action' | 'error' | 'invoke'
|
|
914
|
+
}
|