@plitzi/sdk-authoring 0.38.12 → 0.38.13
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/CHANGELOG.md +6 -0
- package/dist/plugin.d.ts +861 -0
- package/dist/plugin.js +2 -0
- package/package.json +8 -6
package/CHANGELOG.md
CHANGED
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,861 @@
|
|
|
1
|
+
declare type BindingCategory = 'attributes' | 'style' | 'initialState';
|
|
2
|
+
|
|
3
|
+
declare type BindingTransformer = {
|
|
4
|
+
action: string;
|
|
5
|
+
/**
|
|
6
|
+
* Mostly text, and not only: a param the builder draws as a checkbox (`styleVariant`'s `append`) is stored as the
|
|
7
|
+
* boolean it is, and the transformer reads it as one — `if (!append)`. Writing `"false"` there would read as true.
|
|
8
|
+
*/
|
|
9
|
+
params: Record<string, string | number | boolean>;
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
declare type Combinator = 'and' | 'or';
|
|
14
|
+
|
|
15
|
+
export declare type DeclaredCallbacks<C extends Record<string, PluginCallbackSpec>> = {
|
|
16
|
+
[K in keyof C & string]: Omit<InteractionCallback, 'action'> & {
|
|
17
|
+
action: K;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** A plugin's events and actions as its declaration carries them: each named by its key, its preview kept as written. */
|
|
22
|
+
export declare type DeclaredTriggers<T extends Record<string, PluginTriggerSpec>> = {
|
|
23
|
+
[K in keyof T & string]: Omit<InteractionCallback, 'action' | 'preview'> & {
|
|
24
|
+
action: K;
|
|
25
|
+
preview: T[K]['preview'] extends object ? T[K]['preview'] : Record<string, never>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** What {@link definePlugin} answers: the declaration, its events and actions named, and its attributes in its type. */
|
|
30
|
+
export declare type DefinedPlugin<A extends object, T extends Record<string, PluginTriggerSpec>, C extends Record<string, PluginCallbackSpec>> = Omit<PluginDeclaration<A>, 'triggers' | 'callbacks'> & {
|
|
31
|
+
triggers: DeclaredTriggers<T>;
|
|
32
|
+
callbacks: DeclaredCallbacks<C>;
|
|
33
|
+
} & ElementAttributesBrand<A>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A plugin's declaration, written from what only it can say — its type, its words, its attributes, what it fires and
|
|
37
|
+
* answers — with everything else at the default every plugin shares: the builder's gestures, the catalogue entry, a
|
|
38
|
+
* bindable attribute for each one, an empty style.
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* export default definePlugin<SeatPickerAttributes>()({
|
|
42
|
+
* type: 'seatPicker',
|
|
43
|
+
* label: 'Seat Picker',
|
|
44
|
+
* description: 'Picks a seat from a plan.',
|
|
45
|
+
* attributes: { start: 0, label: 'Seats' },
|
|
46
|
+
* triggers: { onPick: { preview: { seat: '' } } },
|
|
47
|
+
* callbacks: { reset: {} }
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* Called twice, as `elementDeclaration` is: the first call takes the attributes the element accepts (its component's
|
|
52
|
+
* props, minus what the runtime supplies), which TypeScript cannot read off defaults that leave some out; the second the
|
|
53
|
+
* rest, whose events it reads as written. The whole declaration comes back — what the build writes into the manifest
|
|
54
|
+
* and the builder reads — branded with the attributes, so `defineElement(declaration)` authors the element typed
|
|
55
|
+
* without being told.
|
|
56
|
+
*/
|
|
57
|
+
export declare const definePlugin: <A extends object>() => <const T extends Record<string, PluginTriggerSpec> = never, const C extends Record<string, PluginCallbackSpec> = never>({ type, label, description, attributes, triggers, callbacks, builder, market, bindable, style, definition, settings, ...rest }: PluginSpec<A, T, C>) => DefinedPlugin<A, T, C>;
|
|
58
|
+
|
|
59
|
+
declare type DisplayMode = 'desktop' | 'tablet' | 'mobile';
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* An element, keyed by the one name it answers to.
|
|
63
|
+
*
|
|
64
|
+
* `id` is that name: the `flat` key, what `parentId`/`items`/`rootId` point at, the `<type>_<id>` a binding's source
|
|
65
|
+
* is built from, and the target an interaction wires to. It is chosen — typed by a person in the builder's tree,
|
|
66
|
+
* written by an agent, or minted as `<type>-<n>` — never an opaque generated handle, so the key an author writes
|
|
67
|
+
* down is the key the runtime resolves. `definition.label` stays free display text and wires nothing.
|
|
68
|
+
*/
|
|
69
|
+
declare type Element_2<TAttributes extends Record<string, unknown> = Record<string, unknown>> = {
|
|
70
|
+
id: string;
|
|
71
|
+
attributes: TAttributes & {
|
|
72
|
+
subType?: string;
|
|
73
|
+
};
|
|
74
|
+
definition: ElementDefinition;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* How an element says what it can be authored with.
|
|
79
|
+
*
|
|
80
|
+
* A declaration is data — `type`, default attributes, the metadata the builder shows — and the one thing it could
|
|
81
|
+
* not say until now is what those attributes *are*: `subType: 'h1'` in a default says `string`, not the six
|
|
82
|
+
* headings that exist. That type is already written and already maintained, on the element's own component, so
|
|
83
|
+
* this carries it rather than restating it: `elementDeclaration<HeadingAttributes>()({ … })` brands the
|
|
84
|
+
* declaration with the attributes it accepts, and every factory downstream reads them off the catalogue.
|
|
85
|
+
*
|
|
86
|
+
* A type-level brand rather than a field, because there is nothing to attach at runtime: a declaration is
|
|
87
|
+
* serialized into documents and manifests, and a marker with a value would travel with it. Nothing ever reads
|
|
88
|
+
* `__attributes` — it exists so `AttributesOf` has somewhere to look.
|
|
89
|
+
*/
|
|
90
|
+
export declare interface ElementAttributesBrand<A> {
|
|
91
|
+
readonly __attributes: A;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare type ElementBinding = {
|
|
95
|
+
id: string;
|
|
96
|
+
source: string;
|
|
97
|
+
transformers?: BindingTransformer[];
|
|
98
|
+
when?: RuleGroup;
|
|
99
|
+
enabled?: boolean;
|
|
100
|
+
to: string;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** What every declaration is, whatever else it carries. */
|
|
104
|
+
export declare interface ElementDeclarationData {
|
|
105
|
+
type: string;
|
|
106
|
+
/**
|
|
107
|
+
* The kind of data source this element publishes, when it publishes one.
|
|
108
|
+
*
|
|
109
|
+
* A source is named `<sourceType>_<id>`, and the two halves come from different places: the id is the
|
|
110
|
+
* author's, and this is the ELEMENT'S. They are not always the same word — a `form` publishes under
|
|
111
|
+
* `apiContainer`, because what it offers descendants is a record like any other provider's — so an author who
|
|
112
|
+
* assembles the name from the type they can see writes one that resolves to nothing.
|
|
113
|
+
*
|
|
114
|
+
* Declared here so there is one answer: the component reads it to register under, and the authoring surface
|
|
115
|
+
* reads it to resolve a binding that named the element alone.
|
|
116
|
+
*/
|
|
117
|
+
sourceType?: string;
|
|
118
|
+
/**
|
|
119
|
+
* The triggers this type fires on top of the ones every element does (`onClick`, `onLoad`…), by action name.
|
|
120
|
+
*
|
|
121
|
+
* Declared here for the reason `sourceType` is: the component registers exactly these, and the authoring surface
|
|
122
|
+
* reads them to refuse a flow that starts on a trigger its element never fires — an `onSubmit` on the submit
|
|
123
|
+
* button rather than on the form is a flow that is written, saved and silently never runs.
|
|
124
|
+
*/
|
|
125
|
+
triggers?: Record<string, InteractionCallback>;
|
|
126
|
+
/**
|
|
127
|
+
* The callbacks this type runs on itself on top of the ones every element does (`setState`, `toggleState`) —
|
|
128
|
+
* their static half. The component adds what only a mounted element has: the function, a title naming its label,
|
|
129
|
+
* options drawn from its children. Read by the authoring surface to refuse a step aimed at an element that does not
|
|
130
|
+
* answer to it — an `openModal` sent to a plain container is a button that does nothing.
|
|
131
|
+
*/
|
|
132
|
+
callbacks?: Record<string, InteractionCallback>;
|
|
133
|
+
/**
|
|
134
|
+
* The type this one only works somewhere inside: it reads its state from that element's context, and anywhere
|
|
135
|
+
* else it throws on its first render. A dropdown's panel, a tab container's header and body.
|
|
136
|
+
*/
|
|
137
|
+
ancestorType?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The values an enumerated attribute takes — a heading's `subType`, a link's `mode` — by attribute name.
|
|
140
|
+
*
|
|
141
|
+
* A component's props say this in TypeScript, which is gone at run time; an author writing JavaScript, a document
|
|
142
|
+
* that arrived as JSON or a value that went through a cast reaches the element anyway, and `subType: 'h7'` renders an
|
|
143
|
+
* `<h7>`. Written with {@link valuesOf}, so the list cannot drift from the props it mirrors; read by the authoring
|
|
144
|
+
* surface to refuse a value outside it.
|
|
145
|
+
*/
|
|
146
|
+
attributeValues?: Record<string, readonly string[]>;
|
|
147
|
+
/**
|
|
148
|
+
* Whether the element is behaviour rather than content — a clock that fires a flow, a listener — and draws nothing on
|
|
149
|
+
* a page (at most a tag in the builder, to have something to select). Read by the page checks (`inspectPage`,
|
|
150
|
+
* `plitzi page check`), which would otherwise wait for it to be on screen and report it hidden.
|
|
151
|
+
*/
|
|
152
|
+
drawsNothing?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* The attributes the page server evaluates against a context of its own, never where the element renders: a
|
|
155
|
+
* provider's `notFound`, read against its answer; a page's title and description, read against its server providers.
|
|
156
|
+
* Interpolated in the element's own scope they resolved to nothing — a `|default(…)` to its fallback — before the
|
|
157
|
+
* reader that has their names could see them. Read by the element runtime, which leaves them as written, and by the
|
|
158
|
+
* authoring lint, which holds them to that context.
|
|
159
|
+
*/
|
|
160
|
+
serverTemplates?: readonly string[];
|
|
161
|
+
content?: {
|
|
162
|
+
attributes?: Record<string, unknown>;
|
|
163
|
+
definition?: {
|
|
164
|
+
label?: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare type ElementDefinition = {
|
|
170
|
+
rootId: Element_2['id'];
|
|
171
|
+
label: string;
|
|
172
|
+
type: string;
|
|
173
|
+
parentId?: Element_2['id'];
|
|
174
|
+
items?: Element_2['id'][];
|
|
175
|
+
styleSelectors: {
|
|
176
|
+
base: string;
|
|
177
|
+
[selector: string]: string;
|
|
178
|
+
};
|
|
179
|
+
bindings?: Partial<Record<BindingCategory, ElementBinding[]>>;
|
|
180
|
+
interactions?: Record<string, ElementInteraction>;
|
|
181
|
+
initialState?: {
|
|
182
|
+
styleVariant?: Partial<Record<string, Partial<Record<string, string | string[]>>>>;
|
|
183
|
+
styleSelectors?: ElementDefinition['styleSelectors'];
|
|
184
|
+
visibility?: boolean;
|
|
185
|
+
[key: string]: unknown;
|
|
186
|
+
};
|
|
187
|
+
/** Where this element is rendered. 'server' = SSR only, 'client' = browser only, 'shared' = both (default). */
|
|
188
|
+
runtime?: ElementRuntime;
|
|
189
|
+
/** When this element's items are mounted, relative to its `visibility`. See {@link ElementLoadStrategy}. */
|
|
190
|
+
loadStrategy?: ElementLoadStrategy;
|
|
191
|
+
/** The feature flag this element exists under. See {@link ElementFlagGate}. */
|
|
192
|
+
flag?: ElementFlagGate;
|
|
193
|
+
/**
|
|
194
|
+
* The `id` this element carries in the DOM, so a link to `/page#anchor` lands on it — `data-id` names the element
|
|
195
|
+
* for the platform, this names it for the URL. One per rendered page, layouts included (`isAnchor`).
|
|
196
|
+
*/
|
|
197
|
+
anchor?: string;
|
|
198
|
+
/** How it arrives and whether it keeps moving, played by the SDK's stylesheet. See {@link ElementMotion}. */
|
|
199
|
+
motion?: ElementMotion;
|
|
200
|
+
/**
|
|
201
|
+
* The codes of the suggestions this element is not offered, because it is written this way on purpose —
|
|
202
|
+
* `['repeated-shape']`. Read by the one place suggestions are made (`suggestSpace`), so authoring, the builder and
|
|
203
|
+
* the MCP leave out the same ones. Never a problem's code.
|
|
204
|
+
*/
|
|
205
|
+
quiet?: string[];
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* What a feature flag gates an element on: it exists only while the flag `name` resolves to `is`.
|
|
210
|
+
*
|
|
211
|
+
* Not a visibility. A hidden element is still rendered, its markup still in the page; a gated one whose flag says no
|
|
212
|
+
* is not rendered at all — not on the server, not in the browser, not its subtree — and the data of its server
|
|
213
|
+
* elements is not resolved. Its declaration still travels with the space's document, as every element's does, so a
|
|
214
|
+
* flag switches a feature off; it does not keep it secret. `is: false` is the other half of a rollout: the old
|
|
215
|
+
* version, shown until the flag turns on.
|
|
216
|
+
* On a page, a flag that says no makes the page not found.
|
|
217
|
+
*/
|
|
218
|
+
declare type ElementFlagGate = {
|
|
219
|
+
name: string;
|
|
220
|
+
is: boolean;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
declare type ElementInteraction<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
224
|
+
id: string;
|
|
225
|
+
title: string;
|
|
226
|
+
type: InteractionCallbackType;
|
|
227
|
+
action: string;
|
|
228
|
+
params: InteractionCallbackParamValues<T>;
|
|
229
|
+
preview: Record<string, unknown>;
|
|
230
|
+
elementId: Element_2['id'] | null;
|
|
231
|
+
beforeNode: string;
|
|
232
|
+
afterNode: string;
|
|
233
|
+
flowId: string;
|
|
234
|
+
enabled: boolean;
|
|
235
|
+
when?: RuleGroup;
|
|
236
|
+
/** On a trigger only: what a firing does while this flow is still running. `skip` when absent. */
|
|
237
|
+
whileRunning?: WhileRunning;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* When an element's CONTENTS are mounted, relative to its own `visibility`.
|
|
242
|
+
*
|
|
243
|
+
* About the subtree, never about the element itself: whatever a hidden element registers — a modal's `openModal`
|
|
244
|
+
* callback, a form's source, an interaction trigger — is registered by the element, so an element that stops
|
|
245
|
+
* rendering is an element nothing can ever show again. The shell always renders; what these decide is its items.
|
|
246
|
+
*
|
|
247
|
+
* - `eager` (default): always mounted. Right for an element that is on screen almost always — deferring it would only
|
|
248
|
+
* add a render cycle between the page loading and the page appearing — and for a hidden element whose contents
|
|
249
|
+
* have to be in the server's HTML: a section a search engine should read, a panel a CSS-only accordion opens
|
|
250
|
+
* without the SDK's help.
|
|
251
|
+
* - `lazy`: mounted the first time it is shown, and kept from then on. The one for elements that start hidden by
|
|
252
|
+
* nature, and those declare it themselves — a modal or a dialog nobody opens costs nothing, and one that has been
|
|
253
|
+
* opened keeps what the visitor typed into it.
|
|
254
|
+
* - `visible`: mounted only while shown. Pays the build cost on every reveal and drops the subtree's state on
|
|
255
|
+
* every hide — worth it for contents that are expensive to KEEP (a live map, a video, a polling source).
|
|
256
|
+
*/
|
|
257
|
+
declare type ElementLoadStrategy = 'eager' | 'lazy' | 'visible';
|
|
258
|
+
|
|
259
|
+
declare interface ElementMotion {
|
|
260
|
+
/** How it arrives. */
|
|
261
|
+
enter?: MotionEnter;
|
|
262
|
+
/** When it arrives: `load` (the default), `view` (once, as it comes into view) or `scroll` (with the scroll). */
|
|
263
|
+
on?: MotionTrigger;
|
|
264
|
+
/** How long it takes to arrive, in ms (600 by default). Ignored under `scroll`, which follows the scroll. */
|
|
265
|
+
duration?: number;
|
|
266
|
+
/** How long it waits before it does, in ms. */
|
|
267
|
+
delay?: number;
|
|
268
|
+
/**
|
|
269
|
+
* Its CHILDREN arrive one after another, this many ms apart — a grid of cards, a list's rows — rather than the
|
|
270
|
+
* element itself. Up to the first 24; the rest arrive with the 24th.
|
|
271
|
+
*/
|
|
272
|
+
stagger?: number;
|
|
273
|
+
/** Keeps moving after it arrived. */
|
|
274
|
+
loop?: MotionLoop;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
declare type ElementRuntime = 'server' | 'client' | 'shared';
|
|
278
|
+
|
|
279
|
+
export declare type InteractionCallback<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
280
|
+
elementId?: string;
|
|
281
|
+
action: string;
|
|
282
|
+
title: string;
|
|
283
|
+
type: InteractionCallbackType;
|
|
284
|
+
/**
|
|
285
|
+
* The heading the editor's picker lists it under, when that is not its type's: a space's own functions are tasks to
|
|
286
|
+
* the run, and a category of their own to whoever picks a step.
|
|
287
|
+
*/
|
|
288
|
+
group?: string;
|
|
289
|
+
enabled?: boolean;
|
|
290
|
+
params: Record<keyof T, InteractionCallbackParam<T>> | ((params: InteractionCallbackParamValues<T>) => Record<keyof T, InteractionCallbackParam<T>>);
|
|
291
|
+
callback?: (params: InteractionCallbackParamValues<T>, context?: InteractionCallbackContext) => unknown;
|
|
292
|
+
postCallback?: InteractionPostCallback<T>;
|
|
293
|
+
preview?: InteractionCallbackPreviews | ((params: InteractionCallbackParamValues<T>) => InteractionCallbackPreviews);
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* What a callback learns about the flow running it.
|
|
298
|
+
*
|
|
299
|
+
* Only the element the flow fired on, and only because a step that starts something asynchronous has to be able to
|
|
300
|
+
* report back TO that element — a server action running detached finishes long after the flow that launched it
|
|
301
|
+
* returned, and `onFlowEnd` has to fire somewhere specific.
|
|
302
|
+
*/
|
|
303
|
+
declare type InteractionCallbackContext = {
|
|
304
|
+
/** Id of the element this flow fired on. Absent for a flow with no host element. */
|
|
305
|
+
hostElementId?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Aborted when the flow running this step is superseded — its trigger fired again under `whileRunning: 'latest'`. A
|
|
308
|
+
* step waiting on something it can stop (a request, a server run) stops it; the flow starts no further step.
|
|
309
|
+
*/
|
|
310
|
+
signal?: AbortSignal;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
declare type InteractionCallbackParam<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
314
|
+
canBind?: boolean;
|
|
315
|
+
label?: string;
|
|
316
|
+
when?: boolean | ((params: InteractionCallbackParamValues<T>) => boolean);
|
|
317
|
+
/**
|
|
318
|
+
* This param names one of the space's credentials, of this provider. Serializable on purpose: an editor offers the
|
|
319
|
+
* space's credentials of that kind to pick from, rather than a text box somebody has to type an identifier into.
|
|
320
|
+
*/
|
|
321
|
+
credentialProvider?: SpaceCredentialProvider;
|
|
322
|
+
/**
|
|
323
|
+
* A space's task refuses to run without it — empty, or only spaces — saying so with the param's `label`, before its
|
|
324
|
+
* code runs: what a task otherwise checked by hand in its first lines.
|
|
325
|
+
*/
|
|
326
|
+
required?: boolean;
|
|
327
|
+
} &
|
|
328
|
+
/** Handed to a task as text, whatever was written or bound — a number as its digits — at most `maxLength` long. */
|
|
329
|
+
({
|
|
330
|
+
type: 'text';
|
|
331
|
+
defaultValue?: string | number;
|
|
332
|
+
maxLength?: number;
|
|
333
|
+
}
|
|
334
|
+
/** Written as text — a number or a template — and handed to the callback as a number, within `min` and `max`. */
|
|
335
|
+
| {
|
|
336
|
+
type: 'number';
|
|
337
|
+
defaultValue?: number;
|
|
338
|
+
min?: number;
|
|
339
|
+
max?: number;
|
|
340
|
+
} | {
|
|
341
|
+
type: 'textarea';
|
|
342
|
+
defaultValue?: string | number;
|
|
343
|
+
maxLength?: number;
|
|
344
|
+
} | {
|
|
345
|
+
type: 'codemirror-text';
|
|
346
|
+
defaultValue?: string;
|
|
347
|
+
} | {
|
|
348
|
+
type: 'codemirror-json';
|
|
349
|
+
defaultValue?: string;
|
|
350
|
+
} | {
|
|
351
|
+
type: 'boolean';
|
|
352
|
+
defaultValue?: boolean;
|
|
353
|
+
} | {
|
|
354
|
+
/**
|
|
355
|
+
* Several elements of the space, stored as their ids. The editor offers the elements of `elementType` to pick
|
|
356
|
+
* from — it is the one that knows the page — so a step never asks for ids typed by hand.
|
|
357
|
+
*/
|
|
358
|
+
type: 'elements';
|
|
359
|
+
defaultValue?: string[];
|
|
360
|
+
elementType?: string;
|
|
361
|
+
} | {
|
|
362
|
+
type: 'select';
|
|
363
|
+
defaultValue?: string;
|
|
364
|
+
options: {
|
|
365
|
+
label: string;
|
|
366
|
+
value: string;
|
|
367
|
+
}[] | ((params: InteractionCallbackParamValues<T>) => {
|
|
368
|
+
label: string;
|
|
369
|
+
value: string;
|
|
370
|
+
}[]);
|
|
371
|
+
} | {
|
|
372
|
+
type: (params: InteractionCallbackParamValues<T>) => InteractionParamType;
|
|
373
|
+
defaultValue?: string | number | boolean | string[];
|
|
374
|
+
options?: {
|
|
375
|
+
label: string;
|
|
376
|
+
value: string;
|
|
377
|
+
}[] | ((params: InteractionCallbackParamValues<T>) => {
|
|
378
|
+
label: string;
|
|
379
|
+
value: string;
|
|
380
|
+
}[]);
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
declare type InteractionCallbackParamValues<T extends Record<string, unknown> = Record<string, unknown>> = T;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* What a field a step or a trigger hands its flow looks like — a sample, shown where a flow is written, never sent: `0`
|
|
387
|
+
* for a count, `false` for a flag, `[]` for a list, as well as the text `''`.
|
|
388
|
+
*/
|
|
389
|
+
declare type InteractionCallbackPreview = string | number | boolean | null | unknown[] | Record<string, unknown>;
|
|
390
|
+
|
|
391
|
+
export declare type InteractionCallbackPreviews = Record<string, InteractionCallbackPreview>;
|
|
392
|
+
|
|
393
|
+
declare type InteractionCallbackType = 'trigger' | 'globalCallback' | 'callback' | 'utility' | 'task';
|
|
394
|
+
|
|
395
|
+
declare type InteractionParamType = 'boolean' | 'select' | 'text' | 'number' | 'textarea' | 'codemirror-text' | 'codemirror-json' | 'elements';
|
|
396
|
+
|
|
397
|
+
declare type InteractionPostCallback<T extends Record<string, unknown> = Record<string, unknown>> = (params: InteractionCallbackParamValues<T>, callbackResult?: unknown) => unknown;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* An element's declared motion — how it arrives, when, and whether it keeps moving — which the SDK's own stylesheet
|
|
401
|
+
* plays (`_motion.scss`). Every preset moves only `opacity` and `transform`, which the compositor animates without
|
|
402
|
+
* laying the page out again, and every one is stilled for a visitor who asked for less motion: the motion good
|
|
403
|
+
* practices, kept by construction rather than by the author.
|
|
404
|
+
*
|
|
405
|
+
* The one description the authoring package, the builder's Motion tab, the MCP and the validator all read; the
|
|
406
|
+
* stylesheet mirrors its presets and frames, and a test in `apps/sdk` holds the two together.
|
|
407
|
+
*/
|
|
408
|
+
declare const MOTION_ENTERS: readonly ["fade", "fade-up", "fade-down", "slide-left", "slide-right", "slide-up", "scale", "zoom-in", "zoom-out", "pop", "bounce-in", "tilt", "spin-in"];
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* A motion that repeats: a gentle rise and fall, a breath, a turn, a sway — a bounce, a wobble, a small orbit, a
|
|
412
|
+
* heartbeat, a drift. Held until the page is live.
|
|
413
|
+
*/
|
|
414
|
+
declare const MOTION_LOOPS: readonly ["float", "pulse", "spin", "sway", "bounce", "wobble", "orbit", "heartbeat", "drift"];
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* When an arrival plays: as the page loads (`load`); once, as the element first comes into view, and then it stays
|
|
418
|
+
* (`view`); or with the scroll itself, at the reader's pace — played backwards when the reader scrolls back up past it
|
|
419
|
+
* (`scroll`).
|
|
420
|
+
*/
|
|
421
|
+
declare const MOTION_TRIGGERS: readonly ["load", "view", "scroll"];
|
|
422
|
+
|
|
423
|
+
declare type MotionEnter = (typeof MOTION_ENTERS)[number];
|
|
424
|
+
|
|
425
|
+
declare type MotionLoop = (typeof MOTION_LOOPS)[number];
|
|
426
|
+
|
|
427
|
+
declare type MotionTrigger = (typeof MOTION_TRIGGERS)[number];
|
|
428
|
+
|
|
429
|
+
declare type Operator = '' | '=' | '!=' | '<' | '>' | '<=' | '>=' | 'contains' | 'doesNotContain' | 'beginsWith' | 'doesNotBeginWith' | 'endsWith' | 'doesNotEndWith' | 'empty' | 'notEmpty' | 'in' | 'notIn' | 'between' | 'notBetween';
|
|
430
|
+
|
|
431
|
+
declare type PluginBuilder = {
|
|
432
|
+
canDelete?: boolean;
|
|
433
|
+
canDragDrop?: boolean;
|
|
434
|
+
canSelect?: boolean;
|
|
435
|
+
canMove?: boolean;
|
|
436
|
+
canSnippet?: boolean;
|
|
437
|
+
itemsAllowed?: string[];
|
|
438
|
+
itemsNotAllowed?: string[];
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
/** An action a plugin answers, as {@link definePlugin} takes it: its params — the rest derived. */
|
|
442
|
+
export declare type PluginCallbackSpec = {
|
|
443
|
+
title?: string;
|
|
444
|
+
params?: InteractionCallback['params'];
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
declare type PluginContent<A extends object> = PluginDeclaration<A>['content'];
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* A plugin's declaration: an element of somebody's own, declared the way the built-in ones declare themselves.
|
|
451
|
+
*
|
|
452
|
+
* On top of what {@link ElementDeclarationData} says of any element it carries the whole `content`, because for a
|
|
453
|
+
* plugin that is also what gets PUBLISHED — its build writes it into `plugin-manifest.json`, which the builder, the page
|
|
454
|
+
* server and the MCP server read before they load any code. Data only, so that build can read it without React.
|
|
455
|
+
*
|
|
456
|
+
* `A` is the attributes the element accepts: its component's props, minus what the runtime supplies.
|
|
457
|
+
* `const declaration = { … } satisfies PluginDeclaration<SeatPickerAttributes>` then refuses a default the component
|
|
458
|
+
* does not take.
|
|
459
|
+
*/
|
|
460
|
+
export declare interface PluginDeclaration<A extends object = Record<string, unknown>> extends Omit<ElementDeclarationData, 'content'> {
|
|
461
|
+
content: {
|
|
462
|
+
/** The element's starting attributes — its component's defaults, where the builder can show them. */
|
|
463
|
+
attributes: A;
|
|
464
|
+
definition: Omit<ElementDefinition, 'rootId' | 'parentId' | 'interactions' | 'runtime' | 'loadStrategy'> & {
|
|
465
|
+
/** What the element is for, in a sentence: the builder shows it, and an agent reads it to choose the element. */
|
|
466
|
+
description?: string;
|
|
467
|
+
};
|
|
468
|
+
builder: PluginBuilder;
|
|
469
|
+
/** How the builder's catalogue shows the element. Whether it is verified is the platform's to say, never its own. */
|
|
470
|
+
market: {
|
|
471
|
+
category: string;
|
|
472
|
+
owner: string;
|
|
473
|
+
license: string;
|
|
474
|
+
website: string;
|
|
475
|
+
backgroundColor: string;
|
|
476
|
+
icon: string;
|
|
477
|
+
};
|
|
478
|
+
defaultStyle: PluginSchema['defaultStyle'];
|
|
479
|
+
settings?: Record<string, string | number | boolean>;
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
declare type PluginSchema = {
|
|
484
|
+
attributes: Element_2['attributes'];
|
|
485
|
+
builder: PluginBuilder;
|
|
486
|
+
initialItems?: string[];
|
|
487
|
+
definition: Element_2['definition'];
|
|
488
|
+
defaultStyle: {
|
|
489
|
+
name: string;
|
|
490
|
+
displayMode: DisplayMode;
|
|
491
|
+
style: StyleAttributes;
|
|
492
|
+
subTypes?: Record<string, Omit<PluginSchema['defaultStyle'], 'subTypes'>>;
|
|
493
|
+
bindingsAllowed: {
|
|
494
|
+
attributes: {
|
|
495
|
+
path: string;
|
|
496
|
+
label: string;
|
|
497
|
+
}[];
|
|
498
|
+
initialState: {
|
|
499
|
+
path: string;
|
|
500
|
+
label: string;
|
|
501
|
+
}[];
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
/** What a plugin is, said once: {@link definePlugin} writes the rest of its declaration from it. */
|
|
507
|
+
export declare interface PluginSpec<A extends object, T extends Record<string, PluginTriggerSpec>, C extends Record<string, PluginCallbackSpec>> extends Omit<ElementDeclarationData, 'type' | 'triggers' | 'callbacks' | 'content'> {
|
|
508
|
+
/** What a space names it by — the element type. Renaming it orphans every one. */
|
|
509
|
+
type: string;
|
|
510
|
+
/** What the builder's catalogue calls it. */
|
|
511
|
+
label: string;
|
|
512
|
+
/** What it is for, in a sentence: the builder shows it, and an agent reads it to choose the element. */
|
|
513
|
+
description?: string;
|
|
514
|
+
/** Its starting attributes: the component's defaults. */
|
|
515
|
+
attributes: A;
|
|
516
|
+
triggers?: T;
|
|
517
|
+
callbacks?: C;
|
|
518
|
+
/** What the builder lets a person do with it. Left out, every gesture, and no children. */
|
|
519
|
+
builder?: PluginBuilder;
|
|
520
|
+
/** How the catalogue shows it. Left out, under its label, by nobody, MIT. */
|
|
521
|
+
market?: Partial<PluginContent<A>['market']>;
|
|
522
|
+
/** The attributes a data source may be pointed at. Left out, every one. */
|
|
523
|
+
bindable?: readonly (keyof A & string)[];
|
|
524
|
+
/** Its style before anybody styles it. */
|
|
525
|
+
style?: PluginSchema['defaultStyle']['style'];
|
|
526
|
+
/** More of the element's definition — children it starts with (`items`), its style selectors. */
|
|
527
|
+
definition?: Partial<PluginContent<A>['definition']>;
|
|
528
|
+
settings?: PluginContent<A>['settings'];
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/** An event a plugin fires, as {@link definePlugin} takes it: what a flow it starts reads (`preview`) — the rest derived. */
|
|
532
|
+
export declare type PluginTriggerSpec = {
|
|
533
|
+
/** Left out, the event's name in words: `onEdit` is "On Edit". */
|
|
534
|
+
title?: string;
|
|
535
|
+
/** What a flow started by it reads, `{ ops: '' }` — and so what the plugin hands it (`usePluginTrigger`). */
|
|
536
|
+
preview?: InteractionCallbackPreviews;
|
|
537
|
+
params?: InteractionCallback['params'];
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
declare type Rule = {
|
|
541
|
+
id?: string;
|
|
542
|
+
field: string;
|
|
543
|
+
operator: Operator;
|
|
544
|
+
enabled?: boolean;
|
|
545
|
+
} & ({
|
|
546
|
+
isBinding: true;
|
|
547
|
+
value: string;
|
|
548
|
+
} | {
|
|
549
|
+
isBinding?: false;
|
|
550
|
+
value: RuleValue;
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
declare type RuleGroup = {
|
|
554
|
+
id?: string;
|
|
555
|
+
combinator: Combinator;
|
|
556
|
+
rules: (Rule | RuleGroup)[];
|
|
557
|
+
enabled?: boolean;
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
declare type RuleValue = Date | string | number | boolean | undefined | null | object;
|
|
561
|
+
|
|
562
|
+
declare type SpaceCredentialProvider = 's3' | 'r2' | 'ssr' | 'custom' | 'smtp';
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* The pseudo-elements a class can dress — parts of an element the page has no node for: the box drawn before or after
|
|
566
|
+
* its content, a list item's bullet, an empty field's hint, the first letter or line of a paragraph, the text a visitor
|
|
567
|
+
* selects. One list, read by the type, the compiler, the style editor and authoring.
|
|
568
|
+
*
|
|
569
|
+
* Each is written last in its selector (`.card:hover::after`), which is the only place CSS allows it: a state, a
|
|
570
|
+
* variant or a condition of the class chooses WHEN, the pseudo-element WHAT.
|
|
571
|
+
*/
|
|
572
|
+
declare const STYLE_PSEUDOS: readonly ["before", "after", "marker", "placeholder", "first-letter", "first-line", "selection"];
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* The states a selector can react to — one list, read by the type, the style editor, the event schema and authoring.
|
|
576
|
+
*
|
|
577
|
+
* It used to be written out in each of those, and the copies drifted: the editor's `checked` and `visited` options had
|
|
578
|
+
* their label and value swapped, so choosing one stored a state nothing else recognised.
|
|
579
|
+
*
|
|
580
|
+
* `focus-visible` is the focus ring a keyboard user needs and a mouse user does not; `focus-within` dresses a
|
|
581
|
+
* container while anything inside it has focus — a field wrapper around its input.
|
|
582
|
+
*
|
|
583
|
+
* `current` is the chosen one of a set: the link to the page being shown (`aria-current`), the option pressed in a group
|
|
584
|
+
* of toggles (`aria-pressed`), the selected tab (`aria-selected`). The element says so itself — what a screen reader
|
|
585
|
+
* announces too — so a header written once in a layout marks the right item on every page, and a theme switch its
|
|
586
|
+
* chosen scheme, which a class chosen per page could not.
|
|
587
|
+
*
|
|
588
|
+
* `expanded` is the control that opens a panel while the panel is open — a dropdown's trigger, an accordion's header, a
|
|
589
|
+
* menu button (`aria-expanded`). The control says so itself, as the chosen one of a set does.
|
|
590
|
+
*
|
|
591
|
+
* `hidden` is not a pseudo-class: it is how an element looks while its `visible` says no — where it goes as it hides,
|
|
592
|
+
* and where it comes from as it shows. With a transition on the class (`display` among what it transitions, and
|
|
593
|
+
* `transition-behavior: allow-discrete`), a panel fades or slides in and out instead of blinking.
|
|
594
|
+
*
|
|
595
|
+
* `first`, `last`, `odd` and `even` are where the element sits among its siblings — the row of a list that has no
|
|
596
|
+
* divider above it, the alternate rows of a table. They count every sibling, as `:nth-child` does.
|
|
597
|
+
*/
|
|
598
|
+
declare const STYLE_STATES: readonly ["hover", "focus", "focus-visible", "focus-within", "active", "disabled", "checked", "visited", "current", "expanded", "hidden", "first", "last", "odd", "even"];
|
|
599
|
+
|
|
600
|
+
declare type StyleAncestor = {
|
|
601
|
+
default?: StyleObject;
|
|
602
|
+
states?: StyleStates;
|
|
603
|
+
variants?: Record<string, StyleStateBlock>;
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
declare type StyleAncestors = Record<string, StyleAncestor>;
|
|
607
|
+
|
|
608
|
+
declare type StyleAttributes = Record<string, StyleBlock>;
|
|
609
|
+
|
|
610
|
+
declare type StyleBlock = {
|
|
611
|
+
default?: StyleObject;
|
|
612
|
+
states?: StyleStates;
|
|
613
|
+
variants?: StyleVariants;
|
|
614
|
+
ancestors?: StyleAncestors;
|
|
615
|
+
pseudos?: StylePseudos;
|
|
616
|
+
conditions?: StyleConditions;
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
declare type StyleCategory = (typeof styleConstants)[keyof typeof styleConstants];
|
|
620
|
+
|
|
621
|
+
declare type StyleCondition = StyleStateBlock & {
|
|
622
|
+
pseudos?: StylePseudos;
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
declare type StyleConditions = Record<string, StyleCondition>;
|
|
626
|
+
|
|
627
|
+
declare const styleConstants: {
|
|
628
|
+
readonly DISPLAY: "display";
|
|
629
|
+
readonly FLEX_WRAP: "flex-wrap";
|
|
630
|
+
readonly FLEX_DIRECTION: "flex-direction";
|
|
631
|
+
readonly ALIGN_ITEMS: "align-items";
|
|
632
|
+
readonly JUSTIFY_ITEMS: "justify-items";
|
|
633
|
+
readonly JUSTIFY_CONTENT: "justify-content";
|
|
634
|
+
readonly ALIGN_CONTENT: "align-content";
|
|
635
|
+
readonly ROW_GAP: "row-gap";
|
|
636
|
+
readonly COLUMN_GAP: "column-gap";
|
|
637
|
+
readonly GRID_ROW_GAP: "grid-row-gap";
|
|
638
|
+
readonly GRID_COLUMN_GAP: "grid-column-gap";
|
|
639
|
+
readonly GRID_TEMPLATE_AREAS: "grid-template-areas";
|
|
640
|
+
readonly GRID_TEMPLATE_COLUMNS: "grid-template-columns";
|
|
641
|
+
readonly GRID_TEMPLATE_ROWS: "grid-template-rows";
|
|
642
|
+
readonly GRID_AUTO_FLOW: "grid-auto-flow";
|
|
643
|
+
readonly GRID_AUTO_ROWS: "grid-auto-rows";
|
|
644
|
+
readonly GRID_AUTO_COLUMNS: "grid-auto-columns";
|
|
645
|
+
readonly GRID_ROW_START: "grid-row-start";
|
|
646
|
+
readonly GRID_COLUMN_START: "grid-column-start";
|
|
647
|
+
readonly GRID_ROW_END: "grid-row-end";
|
|
648
|
+
readonly GRID_COLUMN_END: "grid-column-end";
|
|
649
|
+
readonly ALIGN_SELF: "align-self";
|
|
650
|
+
readonly JUSTIFY_SELF: "justify-self";
|
|
651
|
+
readonly ORDER: "order";
|
|
652
|
+
readonly FLEX_GROW: "flex-grow";
|
|
653
|
+
readonly FLEX_SHRINK: "flex-shrink";
|
|
654
|
+
readonly FLEX_BASIS: "flex-basis";
|
|
655
|
+
readonly LIST_STYLE: "list-style";
|
|
656
|
+
readonly LIST_STYLE_TYPE: "list-style-type";
|
|
657
|
+
readonly LIST_STYLE_POSITION: "list-style-position";
|
|
658
|
+
readonly LIST_STYLE_IMAGE: "list-style-image";
|
|
659
|
+
readonly BACKGROUND_COLOR: "background-color";
|
|
660
|
+
readonly BACKGROUND_IMAGE: "background-image";
|
|
661
|
+
readonly BACKGROUND_POSITION: "background-position";
|
|
662
|
+
readonly BACKGROUND_SIZE: "background-size";
|
|
663
|
+
readonly BACKGROUND_REPEAT: "background-repeat";
|
|
664
|
+
readonly BACKGROUND_ORIGIN: "background-origin";
|
|
665
|
+
readonly BACKGROUND_CLIP: "background-clip";
|
|
666
|
+
readonly BACKGROUND_ATTACHMENT: "background-attachment";
|
|
667
|
+
readonly BACKGROUND_BLEND_MODE: "background-blend-mode";
|
|
668
|
+
readonly MASK_IMAGE: "mask-image";
|
|
669
|
+
readonly MASK_SIZE: "mask-size";
|
|
670
|
+
readonly MASK_POSITION: "mask-position";
|
|
671
|
+
readonly MASK_REPEAT: "mask-repeat";
|
|
672
|
+
readonly MASK_COMPOSITE: "mask-composite";
|
|
673
|
+
readonly WEBKIT_MASK_IMAGE: "-webkit-mask-image";
|
|
674
|
+
readonly BORDER_TOP_STYLE: "border-top-style";
|
|
675
|
+
readonly BORDER_TOP_WIDTH: "border-top-width";
|
|
676
|
+
readonly BORDER_TOP_COLOR: "border-top-color";
|
|
677
|
+
readonly BORDER_BOTTOM_STYLE: "border-bottom-style";
|
|
678
|
+
readonly BORDER_BOTTOM_WIDTH: "border-bottom-width";
|
|
679
|
+
readonly BORDER_BOTTOM_COLOR: "border-bottom-color";
|
|
680
|
+
readonly BORDER_LEFT_STYLE: "border-left-style";
|
|
681
|
+
readonly BORDER_LEFT_WIDTH: "border-left-width";
|
|
682
|
+
readonly BORDER_LEFT_COLOR: "border-left-color";
|
|
683
|
+
readonly BORDER_RIGHT_STYLE: "border-right-style";
|
|
684
|
+
readonly BORDER_RIGHT_WIDTH: "border-right-width";
|
|
685
|
+
readonly BORDER_RIGHT_COLOR: "border-right-color";
|
|
686
|
+
readonly BORDER_TOP_LEFT_RADIUS: "border-top-left-radius";
|
|
687
|
+
readonly BORDER_TOP_RIGHT_RADIUS: "border-top-right-radius";
|
|
688
|
+
readonly BORDER_BOTTOM_LEFT_RADIUS: "border-bottom-left-radius";
|
|
689
|
+
readonly BORDER_BOTTOM_RIGHT_RADIUS: "border-bottom-right-radius";
|
|
690
|
+
readonly BORDER_COLLAPSE: "border-collapse";
|
|
691
|
+
readonly BORDER_SPACING: "border-spacing";
|
|
692
|
+
readonly TABLE_LAYOUT: "table-layout";
|
|
693
|
+
readonly OPACITY: "opacity";
|
|
694
|
+
readonly VISIBILITY: "visibility";
|
|
695
|
+
readonly CURSOR: "cursor";
|
|
696
|
+
readonly TRANSITION: "transition";
|
|
697
|
+
readonly TRANSITION_PROPERTY: "transition-property";
|
|
698
|
+
readonly TRANSITION_DURATION: "transition-duration";
|
|
699
|
+
readonly TRANSITION_TIMING_FUNCTION: "transition-timing-function";
|
|
700
|
+
readonly TRANSITION_DELAY: "transition-delay";
|
|
701
|
+
readonly TRANSITION_BEHAVIOR: "transition-behavior";
|
|
702
|
+
readonly ANIMATION: "animation";
|
|
703
|
+
readonly ANIMATION_NAME: "animation-name";
|
|
704
|
+
readonly ANIMATION_DURATION: "animation-duration";
|
|
705
|
+
readonly ANIMATION_TIMING_FUNCTION: "animation-timing-function";
|
|
706
|
+
readonly ANIMATION_DELAY: "animation-delay";
|
|
707
|
+
readonly ANIMATION_ITERATION_COUNT: "animation-iteration-count";
|
|
708
|
+
readonly ANIMATION_DIRECTION: "animation-direction";
|
|
709
|
+
readonly ANIMATION_FILL_MODE: "animation-fill-mode";
|
|
710
|
+
readonly ANIMATION_PLAY_STATE: "animation-play-state";
|
|
711
|
+
readonly ANIMATION_TIMELINE: "animation-timeline";
|
|
712
|
+
readonly ANIMATION_RANGE: "animation-range";
|
|
713
|
+
readonly BOX_SHADOW: "box-shadow";
|
|
714
|
+
readonly FILTER: "filter";
|
|
715
|
+
readonly BACKDROP_FILTER: "backdrop-filter";
|
|
716
|
+
readonly MIX_BLEND_MODE: "mix-blend-mode";
|
|
717
|
+
readonly ISOLATION: "isolation";
|
|
718
|
+
readonly CLIP_PATH: "clip-path";
|
|
719
|
+
readonly TRANSFORM: "transform";
|
|
720
|
+
readonly TRANSFORM_ORIGIN: "transform-origin";
|
|
721
|
+
readonly TRANSLATE: "translate";
|
|
722
|
+
readonly ROTATE: "rotate";
|
|
723
|
+
readonly SCALE: "scale";
|
|
724
|
+
readonly TRANSFORM_STYLE: "transform-style";
|
|
725
|
+
readonly PERSPECTIVE: "perspective";
|
|
726
|
+
readonly PERSPECTIVE_ORIGIN: "perspective-origin";
|
|
727
|
+
readonly BACKFACE_VISIBILITY: "backface-visibility";
|
|
728
|
+
readonly WILL_CHANGE: "will-change";
|
|
729
|
+
readonly OUTLINE_WIDTH: "outline-width";
|
|
730
|
+
readonly OUTLINE_STYLE: "outline-style";
|
|
731
|
+
readonly OUTLINE_COLOR: "outline-color";
|
|
732
|
+
readonly OUTLINE_OFFSET: "outline-offset";
|
|
733
|
+
readonly POINTER_EVENTS: "pointer-events";
|
|
734
|
+
readonly USER_SELECT: "user-select";
|
|
735
|
+
readonly TOUCH_ACTION: "touch-action";
|
|
736
|
+
readonly RESIZE: "resize";
|
|
737
|
+
readonly APPEARANCE: "appearance";
|
|
738
|
+
readonly SCROLL_BEHAVIOR: "scroll-behavior";
|
|
739
|
+
readonly OVERSCROLL_BEHAVIOR: "overscroll-behavior";
|
|
740
|
+
readonly SCROLL_SNAP_TYPE: "scroll-snap-type";
|
|
741
|
+
readonly SCROLL_SNAP_ALIGN: "scroll-snap-align";
|
|
742
|
+
readonly SCROLL_SNAP_STOP: "scroll-snap-stop";
|
|
743
|
+
readonly SCROLL_PADDING_TOP: "scroll-padding-top";
|
|
744
|
+
readonly SCROLL_MARGIN_TOP: "scroll-margin-top";
|
|
745
|
+
readonly ACCENT_COLOR: "accent-color";
|
|
746
|
+
readonly CARET_COLOR: "caret-color";
|
|
747
|
+
readonly COLOR_SCHEME: "color-scheme";
|
|
748
|
+
readonly CONTENT: "content";
|
|
749
|
+
readonly POSITION: "position";
|
|
750
|
+
readonly FLOAT: "float";
|
|
751
|
+
readonly CLEAR: "clear";
|
|
752
|
+
readonly Z_INDEX: "z-index";
|
|
753
|
+
readonly TOP: "top";
|
|
754
|
+
readonly BOTTOM: "bottom";
|
|
755
|
+
readonly LEFT: "left";
|
|
756
|
+
readonly RIGHT: "right";
|
|
757
|
+
readonly BOX_SIZING: "box-sizing";
|
|
758
|
+
readonly ASPECT_RATIO: "aspect-ratio";
|
|
759
|
+
readonly WIDTH: "width";
|
|
760
|
+
readonly HEIGHT: "height";
|
|
761
|
+
readonly MIN_WIDTH: "min-width";
|
|
762
|
+
readonly MIN_HEIGHT: "min-height";
|
|
763
|
+
readonly MAX_WIDTH: "max-width";
|
|
764
|
+
readonly MAX_HEIGHT: "max-height";
|
|
765
|
+
readonly OVERFLOW: "overflow";
|
|
766
|
+
readonly OVERFLOW_X: "overflow-x";
|
|
767
|
+
readonly OVERFLOW_Y: "overflow-y";
|
|
768
|
+
readonly SCROLLBAR_WIDTH: "scrollbar-width";
|
|
769
|
+
readonly SCROLLBAR_COLOR: "scrollbar-color";
|
|
770
|
+
readonly CONTAINER_TYPE: "container-type";
|
|
771
|
+
readonly CONTAINER_NAME: "container-name";
|
|
772
|
+
readonly OBJECT_FIT: "object-fit";
|
|
773
|
+
readonly OBJECT_POSITION: "object-position";
|
|
774
|
+
readonly COLUMN_WIDTH: "column-width";
|
|
775
|
+
readonly COLUMN_COUNT: "column-count";
|
|
776
|
+
readonly MARGIN_TOP: "margin-top";
|
|
777
|
+
readonly MARGIN_BOTTOM: "margin-bottom";
|
|
778
|
+
readonly MARGIN_LEFT: "margin-left";
|
|
779
|
+
readonly MARGIN_RIGHT: "margin-right";
|
|
780
|
+
readonly PADDING_TOP: "padding-top";
|
|
781
|
+
readonly PADDING_BOTTOM: "padding-bottom";
|
|
782
|
+
readonly PADDING_LEFT: "padding-left";
|
|
783
|
+
readonly PADDING_RIGHT: "padding-right";
|
|
784
|
+
readonly FONT_FAMILY: "font-family";
|
|
785
|
+
readonly FONT_WEIGHT: "font-weight";
|
|
786
|
+
readonly FONT_SIZE: "font-size";
|
|
787
|
+
readonly LINE_HEIGHT: "line-height";
|
|
788
|
+
readonly COLOR: "color";
|
|
789
|
+
readonly TEXT_ALIGN: "text-align";
|
|
790
|
+
readonly FONT_STYLE: "font-style";
|
|
791
|
+
readonly FONT_VARIANT: "font-variant";
|
|
792
|
+
readonly FONT_VARIANT_NUMERIC: "font-variant-numeric";
|
|
793
|
+
readonly FONT_FEATURE_SETTINGS: "font-feature-settings";
|
|
794
|
+
readonly TEXT_DECORATION: "text-decoration";
|
|
795
|
+
readonly TEXT_DECORATION_LINE: "text-decoration-line";
|
|
796
|
+
readonly TEXT_DECORATION_COLOR: "text-decoration-color";
|
|
797
|
+
readonly TEXT_DECORATION_STYLE: "text-decoration-style";
|
|
798
|
+
readonly TEXT_DECORATION_THICKNESS: "text-decoration-thickness";
|
|
799
|
+
readonly TEXT_UNDERLINE_OFFSET: "text-underline-offset";
|
|
800
|
+
readonly LETTER_SPACING: "letter-spacing";
|
|
801
|
+
readonly WORD_SPACING: "word-spacing";
|
|
802
|
+
readonly TEXT_INDENT: "text-indent";
|
|
803
|
+
readonly TEXT_TRANSFORM: "text-transform";
|
|
804
|
+
readonly DIRECTION: "direction";
|
|
805
|
+
readonly WRITING_MODE: "writing-mode";
|
|
806
|
+
readonly TEXT_ORIENTATION: "text-orientation";
|
|
807
|
+
readonly WHITE_SPACE: "white-space";
|
|
808
|
+
readonly TEXT_WRAP: "text-wrap";
|
|
809
|
+
readonly WORD_BREAK: "word-break";
|
|
810
|
+
readonly OVERFLOW_WRAP: "overflow-wrap";
|
|
811
|
+
readonly HYPHENS: "hyphens";
|
|
812
|
+
readonly VERTICAL_ALIGN: "vertical-align";
|
|
813
|
+
readonly TEXT_OVERFLOW: "text-overflow";
|
|
814
|
+
readonly TEXT_SHADOW: "text-shadow";
|
|
815
|
+
readonly LINE_CLAMP: "line-clamp";
|
|
816
|
+
readonly WEBKIT_LINE_CLAMP: "-webkit-line-clamp";
|
|
817
|
+
readonly WEBKIT_BOX_ORIENT: "-webkit-box-orient";
|
|
818
|
+
readonly WEBKIT_TEXT_FILL_COLOR: "-webkit-text-fill-color";
|
|
819
|
+
readonly WEBKIT_BACKGROUND_CLIP: "-webkit-background-clip";
|
|
820
|
+
readonly BOX_DECORATION_BREAK: "box-decoration-break";
|
|
821
|
+
readonly WEBKIT_BOX_DECORATION_BREAK: "-webkit-box-decoration-break";
|
|
822
|
+
readonly FILL: "fill";
|
|
823
|
+
readonly STROKE: "stroke";
|
|
824
|
+
readonly STROKE_WIDTH: "stroke-width";
|
|
825
|
+
};
|
|
826
|
+
|
|
827
|
+
declare type StyleObject = Partial<Record<StyleCategory, StyleValue>>;
|
|
828
|
+
|
|
829
|
+
declare type StylePseudo = (typeof STYLE_PSEUDOS)[number];
|
|
830
|
+
|
|
831
|
+
declare type StylePseudos = Partial<Record<StylePseudo, StyleStateBlock>>;
|
|
832
|
+
|
|
833
|
+
declare type StyleState = (typeof STYLE_STATES)[number];
|
|
834
|
+
|
|
835
|
+
declare type StyleStateBlock = {
|
|
836
|
+
default?: StyleObject;
|
|
837
|
+
states?: StyleStates;
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
declare type StyleStates = Partial<Record<StyleState, StyleObject>>;
|
|
841
|
+
|
|
842
|
+
declare type StyleValue = number | string;
|
|
843
|
+
|
|
844
|
+
declare type StyleVariant = StyleStateBlock & {
|
|
845
|
+
pseudos?: StylePseudos;
|
|
846
|
+
};
|
|
847
|
+
|
|
848
|
+
declare type StyleVariants = Record<string, StyleVariant>;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* What a trigger does when it fires again while the flow it started is still running.
|
|
852
|
+
*
|
|
853
|
+
* - `skip` (the default): the new firing is ignored — what keeps a double click from submitting twice.
|
|
854
|
+
* - `parallel`: every firing runs its own flow, at the same time.
|
|
855
|
+
* - `queue`: every firing runs, one after another, in the order they came — none lost, none overlapping.
|
|
856
|
+
* - `latest`: every firing runs, and the run before it stops — it starts no further step, and the step it is waiting
|
|
857
|
+
* on stops if it can (a server action, a request). A search as you type: only the last question is answered.
|
|
858
|
+
*/
|
|
859
|
+
declare type WhileRunning = 'skip' | 'parallel' | 'queue' | 'latest';
|
|
860
|
+
|
|
861
|
+
export { }
|
package/dist/plugin.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-authoring",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.13",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/index.js",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"dist/index-*.js",
|
|
9
9
|
"dist/node.js",
|
|
10
10
|
"dist/node.d.ts",
|
|
11
|
+
"dist/plugin.js",
|
|
12
|
+
"dist/plugin.d.ts",
|
|
11
13
|
"skills"
|
|
12
14
|
],
|
|
13
15
|
"main": "dist/index.js",
|
|
@@ -59,11 +61,11 @@
|
|
|
59
61
|
"devDependencies": {
|
|
60
62
|
"@microsoft/api-extractor": "^7.59.3",
|
|
61
63
|
"@plitzi/plitzi-ui": "^1.6.33",
|
|
62
|
-
"@plitzi/sdk-elements": "0.38.
|
|
63
|
-
"@plitzi/sdk-interactions": "0.38.
|
|
64
|
-
"@plitzi/sdk-schema": "0.38.
|
|
65
|
-
"@plitzi/sdk-shared": "0.38.
|
|
66
|
-
"@plitzi/sdk-style": "0.38.
|
|
64
|
+
"@plitzi/sdk-elements": "0.38.13",
|
|
65
|
+
"@plitzi/sdk-interactions": "0.38.13",
|
|
66
|
+
"@plitzi/sdk-schema": "0.38.13",
|
|
67
|
+
"@plitzi/sdk-shared": "0.38.13",
|
|
68
|
+
"@plitzi/sdk-style": "0.38.13",
|
|
67
69
|
"@types/react": "^19.3.0",
|
|
68
70
|
"eslint": "^9.39.5",
|
|
69
71
|
"prettier": "^3.9.9",
|