@plitzi/sdk-authoring 0.38.4 → 0.38.6
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 +342 -0
- package/dist/index-compactSvg.js +4 -1
- package/dist/index.d.ts +430 -170
- package/dist/index.js +1450 -904
- package/dist/node.d.ts +55 -0
- package/dist/node.js +41 -13
- package/package.json +8 -7
- package/skills/plitzi-authoring/CHEATSHEET.md +4 -2
- package/skills/plitzi-authoring/SKILL.md +20 -19
- package/skills/plitzi-authoring/recipes/plugin.ts +1 -1
- package/skills/plitzi-authoring/recipes/server-data.ts +3 -3
- package/skills/plitzi-authoring/recipes/show-data.ts +3 -2
- package/skills/plitzi-authoring/recipes/typed-data.ts +1 -1
- package/skills/plitzi-authoring/reference/authoring-errors.md +8 -2
- package/skills/plitzi-authoring/reference/colours-and-motion.md +3 -1
- package/skills/plitzi-authoring/reference/data-and-visibility.md +24 -22
- package/skills/plitzi-authoring/reference/drawing.md +24 -0
- package/skills/plitzi-authoring/reference/efficiency.md +19 -2
- package/skills/plitzi-authoring/reference/flows.md +3 -0
- package/skills/plitzi-authoring/reference/layouts.md +8 -23
- package/skills/plitzi-authoring/reference/performance.md +2 -2
- package/skills/plitzi-authoring/reference/plugins.md +51 -38
- package/skills/plitzi-authoring/reference/review-checklist.md +2 -0
- package/skills/plitzi-authoring/reference/structure.md +32 -1
- package/skills/plitzi-authoring/reference/templates.md +5 -2
- package/skills/plitzi-authoring/reference/testing.md +9 -2
- package/skills/plitzi-authoring/reference/typed-sources.md +3 -1
- package/skills/plitzi-authoring/reference/validation.md +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { KeyboardEventHandler } from 'react';
|
|
|
12
12
|
import { MouseEventHandler } from 'react';
|
|
13
13
|
import { PointerEventHandler } from 'react';
|
|
14
14
|
import { ReactEventHandler } from 'react';
|
|
15
|
-
import { ReactNode } from 'react';
|
|
16
15
|
import { RefObject } from 'react';
|
|
17
16
|
import { SubmitEventHandler } from 'react';
|
|
18
17
|
import { ToggleEventHandler } from 'react';
|
|
@@ -55,6 +54,9 @@ export declare type ActionAccess =
|
|
|
55
54
|
permissions: string[];
|
|
56
55
|
};
|
|
57
56
|
|
|
57
|
+
/** What the action answers: its output, or a function of the input the page sent. */
|
|
58
|
+
export declare type ActionAnswer = Record<string, unknown> | ((input: Record<string, unknown>) => Record<string, unknown>);
|
|
59
|
+
|
|
58
60
|
/**
|
|
59
61
|
* A server action: a declarative flow, stored per space, executed by the server.
|
|
60
62
|
*
|
|
@@ -138,6 +140,9 @@ export declare type ActionLimits = {
|
|
|
138
140
|
maxResponseBytes?: number;
|
|
139
141
|
};
|
|
140
142
|
|
|
143
|
+
/** What an `apiContainer` fed by a server action publishes: the action's output at its root, beside its state. */
|
|
144
|
+
export declare type ActionProviderSource<Output> = Output & ProviderState;
|
|
145
|
+
|
|
141
146
|
/**
|
|
142
147
|
* A server action read back into the `defineAction` call that writes it: the other direction from {@link defineAction},
|
|
143
148
|
* as `specFromSpace` is for a space.
|
|
@@ -161,6 +166,23 @@ export declare type ActionSource = {
|
|
|
161
166
|
source: string;
|
|
162
167
|
};
|
|
163
168
|
|
|
169
|
+
/**
|
|
170
|
+
* The `apiContainer` with this id, fed by a server action, as a typed source: the action's OUTPUT is published at its
|
|
171
|
+
* root — `feed.stories`, never `feed.data.stories` — typed and checked by a sample of that output:
|
|
172
|
+
*
|
|
173
|
+
* ```ts
|
|
174
|
+
* const feed = actionSource('feed', { stories: [{ id: 'a', title: '' }], updatedAt: '' });
|
|
175
|
+
* apiContainer({ id: feed.id, runtime: 'server', action: 'world-report', children: [
|
|
176
|
+
* list({ id: 'stories', items: feed.stories, row: s => listItem({ children: [text({ from: s.item.title })] }) })
|
|
177
|
+
* ] });
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* The output is what the action's last step answers — a sample written by hand, or the type of the task's result.
|
|
181
|
+
*/
|
|
182
|
+
export declare const actionSource: <Output extends object>(id: string, sample: Output) => SourcePath<ActionProviderSource<Output>> & {
|
|
183
|
+
readonly id: string;
|
|
184
|
+
};
|
|
185
|
+
|
|
164
186
|
export declare interface ActionSourceOptions {
|
|
165
187
|
/** Where `defineAction` is imported from. */
|
|
166
188
|
packageName?: string;
|
|
@@ -323,6 +345,46 @@ export declare interface AncestorSpec {
|
|
|
323
345
|
/** Announces this page on a `channel` with presence — a name, a colour: what the other members see of it. */
|
|
324
346
|
export declare const announceOn: (target: string, state: unknown) => StepSpec;
|
|
325
347
|
|
|
348
|
+
/**
|
|
349
|
+
* Answers one server action in the browser, so a test never runs it: the page's `runServerAction` gets `output` as if
|
|
350
|
+
* the server had completed the run, and the server — its `kv`, its files, what the developer saved — is not touched.
|
|
351
|
+
*
|
|
352
|
+
* For the test that would otherwise write the state it reads: one that opens windows changes the wall the developer
|
|
353
|
+
* kept, and a wall somebody kept covers the controls the next test clicks. Every other call goes through.
|
|
354
|
+
*
|
|
355
|
+
* ```ts
|
|
356
|
+
* await answerAction(page, 'world-workspace', { windows: [] });
|
|
357
|
+
* await answerAction(page, 'search', input => ({ results: fixtureFor(input.query) }));
|
|
358
|
+
* await openPage(page, '/');
|
|
359
|
+
* ```
|
|
360
|
+
*
|
|
361
|
+
* Answers a `stream` step too, with the one `done` frame a run that streamed nothing ends with.
|
|
362
|
+
*/
|
|
363
|
+
export declare const answerAction: (page: RoutingPage, actionId: string, answer: ActionAnswer, { path }?: AnswerActionOptions) => Promise<void>;
|
|
364
|
+
|
|
365
|
+
export declare interface AnswerActionOptions {
|
|
366
|
+
/** Where the server takes action calls: `createServer({ action: { path } })`. `/_action` unless it was moved. */
|
|
367
|
+
path?: string;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/** A request, as `answerAction` reads it — a Playwright `Request` is one. */
|
|
371
|
+
export declare interface AnsweredRequest {
|
|
372
|
+
method(): string;
|
|
373
|
+
postData(): string | null;
|
|
374
|
+
headers(): Record<string, string>;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/** A routed request, as `answerAction` answers it — a Playwright `Route` is one. */
|
|
378
|
+
export declare interface AnsweredRoute {
|
|
379
|
+
request(): AnsweredRequest;
|
|
380
|
+
fulfill(response: {
|
|
381
|
+
status?: number;
|
|
382
|
+
contentType?: string;
|
|
383
|
+
body: string;
|
|
384
|
+
}): Promise<void>;
|
|
385
|
+
fallback(): Promise<void>;
|
|
386
|
+
}
|
|
387
|
+
|
|
326
388
|
/**
|
|
327
389
|
* A factory per element, named after it.
|
|
328
390
|
*
|
|
@@ -338,104 +400,71 @@ export declare const announceOn: (target: string, state: unknown) => StepSpec;
|
|
|
338
400
|
* which is why their declarations had to be written before they could be authored at all.
|
|
339
401
|
*/
|
|
340
402
|
export declare const apiContainer: {
|
|
341
|
-
(props?: ElementProps<
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
/** Renders children while the first client-side request is still in flight, so a loading state can be bound. */
|
|
402
|
-
renderWhileLoading?: boolean;
|
|
403
|
-
/**
|
|
404
|
-
* The id of a child shown in place of the others until the first answer arrives — a skeleton of what is coming — and
|
|
405
|
-
* gone after it. In the builder every child shows, so the slot can be edited beside what it stands for.
|
|
406
|
-
*/
|
|
407
|
-
loadingSlot?: string;
|
|
408
|
-
/**
|
|
409
|
-
* Keep a browser request's answer in the page's query cache, shared with every provider asking the same thing.
|
|
410
|
-
* Off by default: an author opts in knowing the page may show an answer up to `staleTime` old.
|
|
411
|
-
*/
|
|
412
|
-
cache?: boolean;
|
|
413
|
-
/**
|
|
414
|
-
* With `cache`: seconds an answer is served without asking again. A stale answer is still shown while the new one
|
|
415
|
-
* is fetched; `0` asks on every mount. A text field in the builder, hence the string.
|
|
416
|
-
*/
|
|
417
|
-
staleTime?: number | string;
|
|
418
|
-
/** With `cache`: seconds an answer nobody renders is kept, so coming back within it paints at once. */
|
|
419
|
-
gcTime?: number | string;
|
|
420
|
-
/**
|
|
421
|
-
* Asks again on its own every this many seconds — for a page showing something that keeps moving: a queue, a
|
|
422
|
-
* feed, a status board. Off (`0`) by default.
|
|
423
|
-
*
|
|
424
|
-
* The same refresh `performQuery` runs, for either runtime: a browser request is re-sent, a server provider
|
|
425
|
-
* asks the server for its own slice again. Skipped while the tab is hidden and never stacked on one still in
|
|
426
|
-
* flight. A text field in the builder, hence the string.
|
|
427
|
-
*/
|
|
428
|
-
refreshSeconds?: number | string;
|
|
403
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
404
|
+
when?: RuleGroup | undefined;
|
|
405
|
+
action?: string | undefined;
|
|
406
|
+
cache?: boolean | undefined;
|
|
407
|
+
endpoint?: string | undefined;
|
|
408
|
+
input?: (Record<string, unknown> | string) | undefined;
|
|
409
|
+
method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
|
|
410
|
+
resource?: string | undefined;
|
|
411
|
+
headers?: Record<string, string> | undefined;
|
|
412
|
+
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "" | undefined;
|
|
413
|
+
query?: string | undefined;
|
|
414
|
+
accessToken?: string | undefined;
|
|
415
|
+
mockData?: (Record<string, unknown> | string) | undefined;
|
|
416
|
+
credentials?: RequestCredentials | undefined;
|
|
417
|
+
connector?: string | undefined;
|
|
418
|
+
limit?: string | undefined;
|
|
419
|
+
singleRecord?: boolean | undefined;
|
|
420
|
+
filters?: {
|
|
421
|
+
field: string;
|
|
422
|
+
operator: string;
|
|
423
|
+
value: string;
|
|
424
|
+
}[] | undefined;
|
|
425
|
+
pagination?: ProviderPagination | undefined;
|
|
426
|
+
pageParam?: string | undefined;
|
|
427
|
+
renderWhileLoading?: boolean | undefined;
|
|
428
|
+
loadingSlot?: string | undefined;
|
|
429
|
+
staleTime?: number | string | undefined;
|
|
430
|
+
gcTime?: number | string | undefined;
|
|
431
|
+
refreshSeconds?: number | string | undefined;
|
|
432
|
+
}>> | undefined): ElementSpec;
|
|
433
|
+
(props?: ElementProps<Partial<{
|
|
434
|
+
when?: RuleGroup | undefined;
|
|
435
|
+
action?: string | undefined;
|
|
436
|
+
cache?: boolean | undefined;
|
|
437
|
+
endpoint?: string | undefined;
|
|
438
|
+
input?: (Record<string, unknown> | string) | undefined;
|
|
439
|
+
method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
|
|
440
|
+
resource?: string | undefined;
|
|
441
|
+
headers?: Record<string, string> | undefined;
|
|
442
|
+
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "" | undefined;
|
|
443
|
+
query?: string | undefined;
|
|
444
|
+
accessToken?: string | undefined;
|
|
445
|
+
mockData?: (Record<string, unknown> | string) | undefined;
|
|
446
|
+
credentials?: RequestCredentials | undefined;
|
|
447
|
+
connector?: string | undefined;
|
|
448
|
+
limit?: string | undefined;
|
|
449
|
+
singleRecord?: boolean | undefined;
|
|
450
|
+
filters?: {
|
|
451
|
+
field: string;
|
|
452
|
+
operator: string;
|
|
453
|
+
value: string;
|
|
454
|
+
}[] | undefined;
|
|
455
|
+
pagination?: ProviderPagination | undefined;
|
|
456
|
+
pageParam?: string | undefined;
|
|
457
|
+
renderWhileLoading?: boolean | undefined;
|
|
458
|
+
loadingSlot?: string | undefined;
|
|
459
|
+
staleTime?: number | string | undefined;
|
|
460
|
+
gcTime?: number | string | undefined;
|
|
461
|
+
refreshSeconds?: number | string | undefined;
|
|
462
|
+
}>> | undefined): ElementSpec;
|
|
429
463
|
};
|
|
430
464
|
|
|
431
|
-
/** What an `apiContainer` publishes: the answer under `data`, and how the asking went. */
|
|
432
|
-
export declare interface ApiContainerSource<Data> {
|
|
465
|
+
/** What an `apiContainer` asking a `query` publishes: the answer under `data`, and how the asking went. */
|
|
466
|
+
export declare interface ApiContainerSource<Data> extends ProviderState {
|
|
433
467
|
data: Data;
|
|
434
|
-
isLoading: boolean;
|
|
435
|
-
isEmpty: boolean;
|
|
436
|
-
hasError: boolean;
|
|
437
|
-
errorMessage: string;
|
|
438
|
-
isStale: boolean;
|
|
439
468
|
}
|
|
440
469
|
|
|
441
470
|
/**
|
|
@@ -1042,6 +1071,11 @@ export declare const AUTHORING_CODES: {
|
|
|
1042
1071
|
readonly means: "an `apiContainer` that asks nothing";
|
|
1043
1072
|
readonly fix: "a `query` (or `action`, `connector`, `resource`)";
|
|
1044
1073
|
};
|
|
1074
|
+
readonly 'action-output-path': {
|
|
1075
|
+
readonly kind: "warned";
|
|
1076
|
+
readonly means: "a read of `.data` on a provider fed by a server action — it publishes the action’s output at its root, and `.data` is a `query` provider’s answer";
|
|
1077
|
+
readonly fix: "the output’s own field — `apiContainer_feed.stories`, not `apiContainer_feed.data.stories`";
|
|
1078
|
+
};
|
|
1045
1079
|
readonly 'path-not-in-data': {
|
|
1046
1080
|
readonly kind: "warned";
|
|
1047
1081
|
readonly means: "a binding onto a provider whose answer the author could read (`data`), through a path that answer does not have";
|
|
@@ -1052,6 +1086,11 @@ export declare const AUTHORING_CODES: {
|
|
|
1052
1086
|
readonly means: "a `runtime: 'server'` element inside a component: the page server resolves a page's and its layouts', never a component's";
|
|
1053
1087
|
readonly fix: "put the provider on the page, around the instance, and hand the component its rows as a prop";
|
|
1054
1088
|
};
|
|
1089
|
+
readonly 'server-data-in-browser': {
|
|
1090
|
+
readonly kind: "refused";
|
|
1091
|
+
readonly means: "a provider asking for the project's own data (`/data/…`, read by its server from `src/data/` and never served) from the browser";
|
|
1092
|
+
readonly fix: "`runtime: 'server'` on the provider: the page arrives with the data in it";
|
|
1093
|
+
};
|
|
1055
1094
|
readonly 'server-data-without-rsc': {
|
|
1056
1095
|
readonly kind: "warned";
|
|
1057
1096
|
readonly means: "a `runtime: 'server'` provider — `connector`, `action` or `query` — in a space that turns server data off (`rsc: { enabled: false }`)";
|
|
@@ -1334,7 +1373,7 @@ export declare const AUTHORING_CODES: {
|
|
|
1334
1373
|
};
|
|
1335
1374
|
readonly 'while-running': {
|
|
1336
1375
|
readonly kind: "refused";
|
|
1337
|
-
readonly means: "`whileRunning` on a step that is not the trigger, or a mode other than `skip`, `parallel`, `queue`";
|
|
1376
|
+
readonly means: "`whileRunning` on a step that is not the trigger, or a mode other than `skip`, `parallel`, `queue`, `latest`";
|
|
1338
1377
|
readonly fix: "`[whileRunning('queue', onClick()), …]`";
|
|
1339
1378
|
};
|
|
1340
1379
|
readonly 'callback-not-answered': {
|
|
@@ -1492,6 +1531,26 @@ export declare const AUTHORING_CODES: {
|
|
|
1492
1531
|
readonly means: "keyframes animating what the browser repaints or lays out again on every frame — a size, a position, a blur, a shadow, or a colour in a loop — which stutters whenever the page is busy, most of all while it loads";
|
|
1493
1532
|
readonly fix: "`opacity` and `transform`: a size or a position is `translate`/`scale`, a blur or a shadow is the `opacity` of a layer carrying it; a loop that must animate anything else starts `paused` and runs under `[data-hydrated]`";
|
|
1494
1533
|
};
|
|
1534
|
+
readonly 'unused-class': {
|
|
1535
|
+
readonly kind: "suggested";
|
|
1536
|
+
readonly means: "a class declared in `classes` that no element, binding, flow or other class names";
|
|
1537
|
+
readonly fix: "remove it from `classes` — or wear it where it was meant to go";
|
|
1538
|
+
};
|
|
1539
|
+
readonly 'unused-token': {
|
|
1540
|
+
readonly kind: "suggested";
|
|
1541
|
+
readonly means: "a token of `variables` no `var(--…)` reads — not a class, an element, `customCss` nor another token";
|
|
1542
|
+
readonly fix: "remove it, or write it where its colour is written out";
|
|
1543
|
+
};
|
|
1544
|
+
readonly 'literal-colour': {
|
|
1545
|
+
readonly kind: "suggested";
|
|
1546
|
+
readonly means: "a colour written out in a class where the space has a token of that value — it stays put in the dark scheme";
|
|
1547
|
+
readonly fix: "`var(--token)` when it should follow the scheme; a token of one value of its own when it must stay the same in both";
|
|
1548
|
+
};
|
|
1549
|
+
readonly 'unused-component': {
|
|
1550
|
+
readonly kind: "suggested";
|
|
1551
|
+
readonly means: "a component no page, layout or other component places";
|
|
1552
|
+
readonly fix: "remove it from `components`, or place it where it was meant to go";
|
|
1553
|
+
};
|
|
1495
1554
|
};
|
|
1496
1555
|
|
|
1497
1556
|
export declare type AuthoringCode = keyof Codes;
|
|
@@ -1713,6 +1772,13 @@ export declare interface AuthorSpaceOptions {
|
|
|
1713
1772
|
* answer, which is left unchecked.
|
|
1714
1773
|
*/
|
|
1715
1774
|
data?: (query: string) => unknown;
|
|
1775
|
+
/**
|
|
1776
|
+
* The project's own data, which only the server reads (`dataDir`): what a provider's `/data/<file>` query answers —
|
|
1777
|
+
* `projectData` from `@plitzi/sdk-authoring/node` reads them from `src/data/`. Bindings onto it are held to the answer
|
|
1778
|
+
* as with `data`, and a provider asking for `/data/…` from the browser is refused (`server-data-in-browser`): no
|
|
1779
|
+
* browser is answered.
|
|
1780
|
+
*/
|
|
1781
|
+
serverData?: (query: string) => unknown;
|
|
1716
1782
|
}
|
|
1717
1783
|
|
|
1718
1784
|
export declare const authRefreshDetails: () => StepSpec;
|
|
@@ -1784,23 +1850,33 @@ export declare interface BindTemplateOptions {
|
|
|
1784
1850
|
/** The two documents, authored fresh — so one caller writing its own name in cannot mark the next one's copy. */
|
|
1785
1851
|
export declare const blankSpace: () => AuthoredSpace;
|
|
1786
1852
|
|
|
1787
|
-
export declare const
|
|
1853
|
+
export declare const blankSpaceSpec: SpaceSpec;
|
|
1854
|
+
|
|
1855
|
+
/**
|
|
1856
|
+
* The welcome space as a project's files, by path: the page and the space in `index.ts`, the palette in `tokens.ts`,
|
|
1857
|
+
* the classes in `theme.ts`, what the page says in `content.ts` — a file per part, as a space is written once it is
|
|
1858
|
+
* more than a screen. The plugin a project hosts and the name it carries go in `index.ts`, which holds both.
|
|
1859
|
+
*/
|
|
1860
|
+
export declare const blankTemplateFiles: ({ name, dir, plugin }?: BlankTemplateOptions) => Record<string, string>;
|
|
1788
1861
|
|
|
1789
1862
|
/**
|
|
1790
|
-
* The declaration as
|
|
1863
|
+
* The declaration as files somebody can drop into their own project, optionally under a name of its own.
|
|
1791
1864
|
*
|
|
1792
|
-
* The
|
|
1793
|
-
* with and what Plitzi creates cannot come apart.
|
|
1794
|
-
*
|
|
1865
|
+
* The sources are this package's own — the same text that produced the documents above, so what a project starts
|
|
1866
|
+
* with and what Plitzi creates cannot come apart. Their imports of the package's modules are relative here because
|
|
1867
|
+
* they live inside it; on the way out they are rewritten to the package name, which is how the copy resolves anywhere
|
|
1868
|
+
* else. The files import each other as siblings, so the folder travels whole.
|
|
1795
1869
|
*
|
|
1796
1870
|
* The rename lives here, and not in the scaffold that asks for it, for the reason the whole function exists: a
|
|
1797
|
-
* caller renaming the copy would have to know which literals
|
|
1871
|
+
* caller renaming the copy would have to know which literals these files happen to contain, and a caller that
|
|
1798
1872
|
* knows that is a caller that breaks silently the day one of them changes. Here the literals are read off
|
|
1799
1873
|
* `blankSpaceSpec`, so they cannot be out of date, and a rename that finds nothing to replace throws.
|
|
1800
1874
|
*/
|
|
1801
|
-
export declare interface
|
|
1875
|
+
export declare interface BlankTemplateOptions {
|
|
1802
1876
|
/** The name the copy carries. `permanentUrl` follows it, slugged. */
|
|
1803
1877
|
name?: string;
|
|
1878
|
+
/** The folder the files are written in, relative to the project: `src/space` unless said. */
|
|
1879
|
+
dir?: string;
|
|
1804
1880
|
/**
|
|
1805
1881
|
* Add a `custom` element hosting a plugin the receiver supplies — or several, one after another, given a list.
|
|
1806
1882
|
*
|
|
@@ -1812,8 +1888,6 @@ export declare interface BlankSpaceSourceOptions {
|
|
|
1812
1888
|
plugin?: PluginHostOptions | readonly PluginHostOptions[];
|
|
1813
1889
|
}
|
|
1814
1890
|
|
|
1815
|
-
export declare const blankSpaceSpec: SpaceSpec;
|
|
1816
|
-
|
|
1817
1891
|
export declare const blockHtml: ElementFactory<Partial<{
|
|
1818
1892
|
content?: string | undefined;
|
|
1819
1893
|
}>>;
|
|
@@ -1950,6 +2024,15 @@ export declare const button: ElementFactory<Partial<{
|
|
|
1950
2024
|
|
|
1951
2025
|
declare type CallbackName<D extends DeclaresInteractions> = keyof NonNullable<D['callbacks']> & string;
|
|
1952
2026
|
|
|
2027
|
+
/**
|
|
2028
|
+
* Stops an `apiContainer`'s request in flight, by id — a STOP for a slow report: the request is dropped, on the
|
|
2029
|
+
* server too, and what the container shows stays. Its `isLoading` turns false.
|
|
2030
|
+
*
|
|
2031
|
+
* A newer `reloadApi` of the same container already drops the older one, so this is only for the visitor who is done
|
|
2032
|
+
* waiting. An element callback, so `target` is the CONTAINER's id.
|
|
2033
|
+
*/
|
|
2034
|
+
export declare const cancelApi: (target: string) => StepSpec;
|
|
2035
|
+
|
|
1953
2036
|
export declare const cancelServerAction: (params: {
|
|
1954
2037
|
runId: string;
|
|
1955
2038
|
}) => StepSpec;
|
|
@@ -1959,7 +2042,7 @@ export declare const cancelServerAction: (params: {
|
|
|
1959
2042
|
* 'site.data.slides', row: r => … })` writes the slide into a `carouselTrack`, and its `children` are the controls.
|
|
1960
2043
|
*/
|
|
1961
2044
|
export declare const carousel: {
|
|
1962
|
-
(props?: ElementProps<Omit<Partial<{
|
|
2045
|
+
(children: ElementSpec[], props?: ElementProps<Omit<Partial<{
|
|
1963
2046
|
mode?: CarouselMode | undefined;
|
|
1964
2047
|
label?: string | undefined;
|
|
1965
2048
|
items?: unknown[] | undefined;
|
|
@@ -1972,7 +2055,7 @@ export declare const carousel: {
|
|
|
1972
2055
|
}>, "items"> & {
|
|
1973
2056
|
items?: CarouselAttributes["items"] | SourceName;
|
|
1974
2057
|
}> | undefined): ElementSpec;
|
|
1975
|
-
(
|
|
2058
|
+
(props?: ElementProps<Omit<Partial<{
|
|
1976
2059
|
mode?: CarouselMode | undefined;
|
|
1977
2060
|
label?: string | undefined;
|
|
1978
2061
|
items?: unknown[] | undefined;
|
|
@@ -2009,8 +2092,8 @@ export declare const carouselPlay: (target: string) => StepSpec;
|
|
|
2009
2092
|
export declare const carouselPrevious: (target: string) => StepSpec;
|
|
2010
2093
|
|
|
2011
2094
|
export declare const carouselTrack: {
|
|
2012
|
-
(props?: AuthoringProps | undefined): ElementSpec;
|
|
2013
2095
|
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
2096
|
+
(props?: AuthoringProps | undefined): ElementSpec;
|
|
2014
2097
|
};
|
|
2015
2098
|
|
|
2016
2099
|
declare type CarouselTransition = 'slide' | 'fade' | 'none';
|
|
@@ -2023,23 +2106,25 @@ export declare const CATALOG_TEMPLATE_IDENTITY: {
|
|
|
2023
2106
|
|
|
2024
2107
|
/**
|
|
2025
2108
|
* The catalog template as a project's files, by path: a shop with a layout, a product card, a home, a filtered
|
|
2026
|
-
* catalog and a page per product
|
|
2027
|
-
*
|
|
2028
|
-
*
|
|
2109
|
+
* catalog and a page per product — a file per part, as a space bigger than one screen is written. Its data is the
|
|
2110
|
+
* project's own, `src/data/products.json`, read on the server; a project with no server (`mode: 'client'`) has it in
|
|
2111
|
+
* `public/data/`, fetched by the browser. The files are the template's own (`templates/catalog`), the ones its test
|
|
2112
|
+
* authors; they import `@plitzi/sdk-authoring` by name already, so the copy is the file.
|
|
2029
2113
|
*/
|
|
2030
|
-
export declare const catalogTemplateFiles: ({ name }?: {
|
|
2114
|
+
export declare const catalogTemplateFiles: ({ name, mode }?: {
|
|
2031
2115
|
name?: string;
|
|
2116
|
+
mode?: "server" | "client";
|
|
2032
2117
|
}) => Record<string, string>;
|
|
2033
2118
|
|
|
2034
2119
|
export declare const channel: {
|
|
2035
|
-
(props?: ElementProps<Partial<{
|
|
2120
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
2036
2121
|
subType?: "" | "div" | "section" | "aside" | "main" | undefined;
|
|
2037
2122
|
topic?: string | undefined;
|
|
2038
2123
|
grant?: string | undefined;
|
|
2039
2124
|
presence?: unknown;
|
|
2040
2125
|
keep?: number | string | undefined;
|
|
2041
2126
|
}>> | undefined): ElementSpec;
|
|
2042
|
-
(
|
|
2127
|
+
(props?: ElementProps<Partial<{
|
|
2043
2128
|
subType?: "" | "div" | "section" | "aside" | "main" | undefined;
|
|
2044
2129
|
topic?: string | undefined;
|
|
2045
2130
|
grant?: string | undefined;
|
|
@@ -2188,7 +2273,7 @@ export declare const component: (componentId: string, instance?: ComponentInstan
|
|
|
2188
2273
|
export declare const COMPONENT_SOURCES: string[];
|
|
2189
2274
|
|
|
2190
2275
|
/** How an instance is authored: what it hands in, what fills its slots, and the authoring fields any element takes. */
|
|
2191
|
-
export declare type ComponentInstanceProps = Pick<AuthoringProps, 'id' | 'class' | 'css' | 'states' | 'selector' | 'bind' | 'visible' | 'flows' | 'meta'> & {
|
|
2276
|
+
export declare type ComponentInstanceProps = Pick<AuthoringProps, 'id' | 'class' | 'css' | 'states' | 'selector' | 'bind' | 'visible' | 'flows' | 'meta' | 'quiet'> & {
|
|
2192
2277
|
/** The props the component declares, by name. A prop is an attribute of the instance: `bind` can land on one too. */
|
|
2193
2278
|
props?: Record<string, unknown>;
|
|
2194
2279
|
/** What fills the slots: a list, for a component with one slot, or one list per slot it declares. */
|
|
@@ -2240,14 +2325,16 @@ export declare interface ComponentSpec {
|
|
|
2240
2325
|
}
|
|
2241
2326
|
|
|
2242
2327
|
export declare const container: {
|
|
2243
|
-
(props?: ElementProps<Partial<{
|
|
2328
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
2244
2329
|
label?: string | undefined;
|
|
2330
|
+
title?: string | undefined;
|
|
2245
2331
|
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | undefined;
|
|
2246
2332
|
live?: "polite" | "assertive" | "" | undefined;
|
|
2247
2333
|
decorative?: boolean | undefined;
|
|
2248
2334
|
}>> | undefined): ElementSpec;
|
|
2249
|
-
(
|
|
2335
|
+
(props?: ElementProps<Partial<{
|
|
2250
2336
|
label?: string | undefined;
|
|
2337
|
+
title?: string | undefined;
|
|
2251
2338
|
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | undefined;
|
|
2252
2339
|
live?: "polite" | "assertive" | "" | undefined;
|
|
2253
2340
|
decorative?: boolean | undefined;
|
|
@@ -2393,6 +2480,9 @@ declare type DeclarationByType = {
|
|
|
2393
2480
|
[Name in keyof typeof elementDeclarations as (typeof elementDeclarations)[Name]['type']]: (typeof elementDeclarations)[Name];
|
|
2394
2481
|
};
|
|
2395
2482
|
|
|
2483
|
+
/** The parts of the style document what is declared is read from. */
|
|
2484
|
+
declare type Declared = Pick<Style, 'platform' | 'variables' | 'fonts'>;
|
|
2485
|
+
|
|
2396
2486
|
/**
|
|
2397
2487
|
* A step that runs one of the actions a declaration says its element answers to — on the element named by `on`.
|
|
2398
2488
|
*
|
|
@@ -2490,14 +2580,14 @@ export declare interface DevToolsReport {
|
|
|
2490
2580
|
}
|
|
2491
2581
|
|
|
2492
2582
|
export declare const dialogContainer: {
|
|
2493
|
-
(props?: ElementProps<Partial<{
|
|
2583
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
2494
2584
|
headerLabel: string;
|
|
2495
2585
|
acceptButtonLabel: string;
|
|
2496
2586
|
acceptButtonLabelLoading: string;
|
|
2497
2587
|
rejectButtonLabel: string;
|
|
2498
2588
|
autoHideAfterClick: boolean;
|
|
2499
2589
|
}>> | undefined): ElementSpec;
|
|
2500
|
-
(
|
|
2590
|
+
(props?: ElementProps<Partial<{
|
|
2501
2591
|
headerLabel: string;
|
|
2502
2592
|
acceptButtonLabel: string;
|
|
2503
2593
|
acceptButtonLabelLoading: string;
|
|
@@ -2526,7 +2616,7 @@ export declare type DisplayMode = 'desktop' | 'tablet' | 'mobile';
|
|
|
2526
2616
|
export declare type DocumentChecks = Pick<InspectOptions, 'skip' | 'timeout'>;
|
|
2527
2617
|
|
|
2528
2618
|
export declare const dropdown: {
|
|
2529
|
-
(props?: ElementProps<Partial<{
|
|
2619
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
2530
2620
|
disabled?: boolean | undefined;
|
|
2531
2621
|
closeOnClickPopup?: boolean | undefined;
|
|
2532
2622
|
popupPlacement?: "left" | "right" | "top" | "bottom" | undefined;
|
|
@@ -2536,7 +2626,7 @@ export declare const dropdown: {
|
|
|
2536
2626
|
containerTopOffset?: number | undefined;
|
|
2537
2627
|
containerLeftOffset?: number | undefined;
|
|
2538
2628
|
}>> | undefined): ElementSpec;
|
|
2539
|
-
(
|
|
2629
|
+
(props?: ElementProps<Partial<{
|
|
2540
2630
|
disabled?: boolean | undefined;
|
|
2541
2631
|
closeOnClickPopup?: boolean | undefined;
|
|
2542
2632
|
popupPlacement?: "left" | "right" | "top" | "bottom" | undefined;
|
|
@@ -2549,8 +2639,8 @@ export declare const dropdown: {
|
|
|
2549
2639
|
};
|
|
2550
2640
|
|
|
2551
2641
|
export declare const dropdownPopup: {
|
|
2552
|
-
(props?: AuthoringProps | undefined): ElementSpec;
|
|
2553
2642
|
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
2643
|
+
(props?: AuthoringProps | undefined): ElementSpec;
|
|
2554
2644
|
};
|
|
2555
2645
|
|
|
2556
2646
|
/**
|
|
@@ -2605,7 +2695,7 @@ export declare const elementAttributeNames: {
|
|
|
2605
2695
|
readonly carousel: readonly ["autoplay", "itemKey", "items", "label", "loop", "mode", "pauseOnHover", "speed", "transition"];
|
|
2606
2696
|
readonly carouselTrack: readonly [];
|
|
2607
2697
|
readonly channel: readonly ["grant", "keep", "presence", "subType", "topic"];
|
|
2608
|
-
readonly container: readonly ["decorative", "label", "live", "subType"];
|
|
2698
|
+
readonly container: readonly ["decorative", "label", "live", "subType", "title"];
|
|
2609
2699
|
readonly custom: null;
|
|
2610
2700
|
readonly dialogContainer: readonly ["acceptButtonLabel", "acceptButtonLabelLoading", "autoHideAfterClick", "headerLabel", "rejectButtonLabel"];
|
|
2611
2701
|
readonly dropdown: readonly ["backgroundDisabled", "closeOnClickBackground", "closeOnClickPopup", "containerLeftOffset", "containerTopOffset", "disabled", "openPopup", "popupPlacement"];
|
|
@@ -2635,7 +2725,7 @@ export declare const elementAttributeNames: {
|
|
|
2635
2725
|
readonly tabContainerBody: readonly [];
|
|
2636
2726
|
readonly tabContainerHeader: readonly [];
|
|
2637
2727
|
readonly tabContainerItem: readonly [];
|
|
2638
|
-
readonly text: readonly ["content"];
|
|
2728
|
+
readonly text: readonly ["content", "title"];
|
|
2639
2729
|
readonly themeToggle: readonly ["darkLabel", "lightLabel", "showSystem", "subType", "systemLabel"];
|
|
2640
2730
|
readonly video: readonly ["autoPlay", "loop", "muted", "playsInline", "src"];
|
|
2641
2731
|
};
|
|
@@ -2803,6 +2893,13 @@ declare const elementDeclarations: {
|
|
|
2803
2893
|
};
|
|
2804
2894
|
};
|
|
2805
2895
|
};
|
|
2896
|
+
readonly cancelQuery: {
|
|
2897
|
+
readonly action: "cancelQuery";
|
|
2898
|
+
readonly title: "Cancel Query";
|
|
2899
|
+
readonly type: "callback";
|
|
2900
|
+
readonly preview: {};
|
|
2901
|
+
readonly params: {};
|
|
2902
|
+
};
|
|
2806
2903
|
readonly loadMore: {
|
|
2807
2904
|
readonly action: "loadMore";
|
|
2808
2905
|
readonly title: "Load More";
|
|
@@ -2907,7 +3004,36 @@ declare const elementDeclarations: {
|
|
|
2907
3004
|
};
|
|
2908
3005
|
readonly settings: {};
|
|
2909
3006
|
};
|
|
2910
|
-
} & ElementAttributesBrand<
|
|
3007
|
+
} & ElementAttributesBrand<Partial<{
|
|
3008
|
+
when?: RuleGroup | undefined;
|
|
3009
|
+
action?: string | undefined;
|
|
3010
|
+
cache?: boolean | undefined;
|
|
3011
|
+
endpoint?: string | undefined;
|
|
3012
|
+
input?: (Record<string, unknown> | string) | undefined;
|
|
3013
|
+
method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
|
|
3014
|
+
resource?: string | undefined;
|
|
3015
|
+
headers?: Record<string, string> | undefined;
|
|
3016
|
+
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "" | undefined;
|
|
3017
|
+
query?: string | undefined;
|
|
3018
|
+
accessToken?: string | undefined;
|
|
3019
|
+
mockData?: (Record<string, unknown> | string) | undefined;
|
|
3020
|
+
credentials?: RequestCredentials | undefined;
|
|
3021
|
+
connector?: string | undefined;
|
|
3022
|
+
limit?: string | undefined;
|
|
3023
|
+
singleRecord?: boolean | undefined;
|
|
3024
|
+
filters?: {
|
|
3025
|
+
field: string;
|
|
3026
|
+
operator: string;
|
|
3027
|
+
value: string;
|
|
3028
|
+
}[] | undefined;
|
|
3029
|
+
pagination?: ProviderPagination | undefined;
|
|
3030
|
+
pageParam?: string | undefined;
|
|
3031
|
+
renderWhileLoading?: boolean | undefined;
|
|
3032
|
+
loadingSlot?: string | undefined;
|
|
3033
|
+
staleTime?: number | string | undefined;
|
|
3034
|
+
gcTime?: number | string | undefined;
|
|
3035
|
+
refreshSeconds?: number | string | undefined;
|
|
3036
|
+
}>>;
|
|
2911
3037
|
readonly BlockHtml: {
|
|
2912
3038
|
readonly type: "blockHtml";
|
|
2913
3039
|
readonly content: {
|
|
@@ -3055,7 +3181,7 @@ declare const elementDeclarations: {
|
|
|
3055
3181
|
readonly license: "MIT";
|
|
3056
3182
|
readonly website: "https://plitzi.com";
|
|
3057
3183
|
readonly backgroundColor: "#4422ee";
|
|
3058
|
-
readonly icon: "fa-solid fa-
|
|
3184
|
+
readonly icon: "fa-solid fa-hand-pointer";
|
|
3059
3185
|
};
|
|
3060
3186
|
readonly defaultStyle: {
|
|
3061
3187
|
readonly name: "Button";
|
|
@@ -3492,7 +3618,7 @@ declare const elementDeclarations: {
|
|
|
3492
3618
|
readonly license: "MIT";
|
|
3493
3619
|
readonly website: "https://plitzi.com";
|
|
3494
3620
|
readonly backgroundColor: "#4422ee";
|
|
3495
|
-
readonly icon: "fa-
|
|
3621
|
+
readonly icon: "fa-solid fa-crop-simple";
|
|
3496
3622
|
};
|
|
3497
3623
|
readonly defaultStyle: {
|
|
3498
3624
|
readonly name: "Container";
|
|
@@ -3508,6 +3634,7 @@ declare const elementDeclarations: {
|
|
|
3508
3634
|
};
|
|
3509
3635
|
} & ElementAttributesBrand<Partial<{
|
|
3510
3636
|
label?: string | undefined;
|
|
3637
|
+
title?: string | undefined;
|
|
3511
3638
|
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | undefined;
|
|
3512
3639
|
live?: "polite" | "assertive" | "" | undefined;
|
|
3513
3640
|
decorative?: boolean | undefined;
|
|
@@ -3694,7 +3821,7 @@ declare const elementDeclarations: {
|
|
|
3694
3821
|
readonly license: "MIT";
|
|
3695
3822
|
readonly website: "https://plitzi.com";
|
|
3696
3823
|
readonly backgroundColor: "#4422ee";
|
|
3697
|
-
readonly icon: "fa-regular fa-
|
|
3824
|
+
readonly icon: "fa-regular fa-message";
|
|
3698
3825
|
};
|
|
3699
3826
|
readonly defaultStyle: {
|
|
3700
3827
|
readonly name: "Dialog Container";
|
|
@@ -3911,7 +4038,7 @@ declare const elementDeclarations: {
|
|
|
3911
4038
|
readonly license: "MIT";
|
|
3912
4039
|
readonly website: "https://plitzi.com";
|
|
3913
4040
|
readonly backgroundColor: "#4422ee";
|
|
3914
|
-
readonly icon: "";
|
|
4041
|
+
readonly icon: "fa-regular fa-window-restore";
|
|
3915
4042
|
};
|
|
3916
4043
|
readonly defaultStyle: {
|
|
3917
4044
|
readonly name: "Dropdown Popup";
|
|
@@ -4166,6 +4293,7 @@ declare const elementDeclarations: {
|
|
|
4166
4293
|
readonly license: "MIT";
|
|
4167
4294
|
readonly website: "https://plitzi.com";
|
|
4168
4295
|
readonly backgroundColor: "#4422ee";
|
|
4296
|
+
readonly icon: "fa-solid fa-rectangle-list";
|
|
4169
4297
|
};
|
|
4170
4298
|
readonly defaultStyle: {
|
|
4171
4299
|
readonly name: "Form";
|
|
@@ -4259,6 +4387,7 @@ declare const elementDeclarations: {
|
|
|
4259
4387
|
readonly license: "MIT";
|
|
4260
4388
|
readonly website: "https://plitzi.com";
|
|
4261
4389
|
readonly backgroundColor: "#4422ee";
|
|
4390
|
+
readonly icon: "fa-solid fa-i-cursor";
|
|
4262
4391
|
};
|
|
4263
4392
|
readonly defaultStyle: {
|
|
4264
4393
|
readonly name: "Form Control";
|
|
@@ -5172,7 +5301,7 @@ declare const elementDeclarations: {
|
|
|
5172
5301
|
readonly license: "MIT";
|
|
5173
5302
|
readonly website: "https://plitzi.com";
|
|
5174
5303
|
readonly backgroundColor: "#4422ee";
|
|
5175
|
-
readonly icon: "fa-solid fa-
|
|
5304
|
+
readonly icon: "fa-solid fa-grip-lines";
|
|
5176
5305
|
};
|
|
5177
5306
|
readonly defaultStyle: {
|
|
5178
5307
|
readonly name: "List Item";
|
|
@@ -5283,7 +5412,7 @@ declare const elementDeclarations: {
|
|
|
5283
5412
|
readonly settings: {};
|
|
5284
5413
|
};
|
|
5285
5414
|
} & ElementAttributesBrand<Partial<{
|
|
5286
|
-
content
|
|
5415
|
+
content?: string | undefined;
|
|
5287
5416
|
}>>;
|
|
5288
5417
|
readonly ModalContainer: {
|
|
5289
5418
|
readonly type: "modalContainer";
|
|
@@ -6180,7 +6309,7 @@ declare const elementDeclarations: {
|
|
|
6180
6309
|
readonly license: "MIT";
|
|
6181
6310
|
readonly website: "https://plitzi.com";
|
|
6182
6311
|
readonly backgroundColor: "#4422ee";
|
|
6183
|
-
readonly icon: "fa-solid fa-
|
|
6312
|
+
readonly icon: "fa-solid fa-file-lines";
|
|
6184
6313
|
};
|
|
6185
6314
|
readonly defaultStyle: {
|
|
6186
6315
|
readonly name: "Rich Text";
|
|
@@ -6437,7 +6566,7 @@ declare const elementDeclarations: {
|
|
|
6437
6566
|
readonly license: "MIT";
|
|
6438
6567
|
readonly website: "https://plitzi.com";
|
|
6439
6568
|
readonly backgroundColor: "#4422ee";
|
|
6440
|
-
readonly icon: "fa-
|
|
6569
|
+
readonly icon: "fa-regular fa-folder";
|
|
6441
6570
|
};
|
|
6442
6571
|
readonly defaultStyle: {
|
|
6443
6572
|
readonly name: "Tab Container Item";
|
|
@@ -6504,6 +6633,7 @@ declare const elementDeclarations: {
|
|
|
6504
6633
|
readonly settings: {};
|
|
6505
6634
|
};
|
|
6506
6635
|
} & ElementAttributesBrand<Partial<{
|
|
6636
|
+
title?: string | undefined;
|
|
6507
6637
|
content?: string | number | undefined;
|
|
6508
6638
|
}>>;
|
|
6509
6639
|
readonly ThemeToggle: {
|
|
@@ -6695,10 +6825,13 @@ export declare type ElementDefinition = {
|
|
|
6695
6825
|
/**
|
|
6696
6826
|
* The three ways to call a factory: props, children first, or — for anything with a `content` attribute — the
|
|
6697
6827
|
* content itself, which is what most of a page is.
|
|
6828
|
+
*
|
|
6829
|
+
* Props LAST: a call no overload accepts is reported by the last one, and an attribute the element does not have is
|
|
6830
|
+
* nearly always the reason — named against the props, not as "'id' does not exist in type ElementSpec[]".
|
|
6698
6831
|
*/
|
|
6699
6832
|
export declare type ElementFactory<A> = ContentShorthand<A> & {
|
|
6700
|
-
(props?: ElementProps<A>): ElementSpec;
|
|
6701
6833
|
(children: ElementSpec[], props?: ElementProps<A>): ElementSpec;
|
|
6834
|
+
(props?: ElementProps<A>): ElementSpec;
|
|
6702
6835
|
};
|
|
6703
6836
|
|
|
6704
6837
|
/**
|
|
@@ -7093,7 +7226,7 @@ export declare type ElementTypeName = keyof DeclarationByType;
|
|
|
7093
7226
|
export declare const elementTypeNames: string[];
|
|
7094
7227
|
|
|
7095
7228
|
export declare const embed: {
|
|
7096
|
-
(props?: ElementProps<Partial<{
|
|
7229
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
7097
7230
|
title?: string | undefined;
|
|
7098
7231
|
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
7099
7232
|
src?: string | undefined;
|
|
@@ -7101,7 +7234,7 @@ export declare const embed: {
|
|
|
7101
7234
|
loading?: "lazy" | "eager" | undefined;
|
|
7102
7235
|
sandbox?: string | undefined;
|
|
7103
7236
|
}>> | undefined): ElementSpec;
|
|
7104
|
-
(
|
|
7237
|
+
(props?: ElementProps<Partial<{
|
|
7105
7238
|
title?: string | undefined;
|
|
7106
7239
|
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
7107
7240
|
src?: string | undefined;
|
|
@@ -7272,13 +7405,13 @@ export declare const flagSpecOf: (gate: ElementFlagGate) => string;
|
|
|
7272
7405
|
export declare const flowStepIds: (flows: StepSpec[][]) => string[][];
|
|
7273
7406
|
|
|
7274
7407
|
export declare const fontAwesome: {
|
|
7275
|
-
(props?: ElementProps<Partial<{
|
|
7408
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
7276
7409
|
size?: string | undefined;
|
|
7277
7410
|
label?: string | undefined;
|
|
7278
7411
|
icon?: string | undefined;
|
|
7279
7412
|
iconAnimation?: string | undefined;
|
|
7280
7413
|
}>> | undefined): ElementSpec;
|
|
7281
|
-
(
|
|
7414
|
+
(props?: ElementProps<Partial<{
|
|
7282
7415
|
size?: string | undefined;
|
|
7283
7416
|
label?: string | undefined;
|
|
7284
7417
|
icon?: string | undefined;
|
|
@@ -7316,7 +7449,7 @@ export { FontFace_2 as FontFace }
|
|
|
7316
7449
|
export declare type FontStyle = 'normal' | 'italic';
|
|
7317
7450
|
|
|
7318
7451
|
export declare const form: {
|
|
7319
|
-
(props?: ElementProps<Partial<{
|
|
7452
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
7320
7453
|
values: Record<string, unknown>;
|
|
7321
7454
|
method: "get" | "post";
|
|
7322
7455
|
noValidate: boolean;
|
|
@@ -7324,7 +7457,7 @@ export declare const form: {
|
|
|
7324
7457
|
managedByInteractions: boolean;
|
|
7325
7458
|
errors: Record<string, string>;
|
|
7326
7459
|
}>> | undefined): ElementSpec;
|
|
7327
|
-
(
|
|
7460
|
+
(props?: ElementProps<Partial<{
|
|
7328
7461
|
values: Record<string, unknown>;
|
|
7329
7462
|
method: "get" | "post";
|
|
7330
7463
|
noValidate: boolean;
|
|
@@ -7335,8 +7468,8 @@ export declare const form: {
|
|
|
7335
7468
|
};
|
|
7336
7469
|
|
|
7337
7470
|
export declare const formControl: {
|
|
7338
|
-
(props?: ElementProps< FormControlAttributes> | undefined): ElementSpec;
|
|
7339
7471
|
(children: ElementSpec[], props?: ElementProps< FormControlAttributes> | undefined): ElementSpec;
|
|
7472
|
+
(props?: ElementProps< FormControlAttributes> | undefined): ElementSpec;
|
|
7340
7473
|
};
|
|
7341
7474
|
|
|
7342
7475
|
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
@@ -7500,7 +7633,7 @@ export declare type HostedFont = FontBase & {
|
|
|
7500
7633
|
declare type IconPlacement = 'before' | 'after';
|
|
7501
7634
|
|
|
7502
7635
|
export declare const image: {
|
|
7503
|
-
(props?: ElementProps<Partial<{
|
|
7636
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
7504
7637
|
resize?: boolean | undefined;
|
|
7505
7638
|
height?: number | undefined;
|
|
7506
7639
|
width?: number | undefined;
|
|
@@ -7511,7 +7644,7 @@ export declare const image: {
|
|
|
7511
7644
|
decorative?: boolean | undefined;
|
|
7512
7645
|
loadMode?: "auto" | "eager" | "lazy" | undefined;
|
|
7513
7646
|
}>> | undefined): ElementSpec;
|
|
7514
|
-
(
|
|
7647
|
+
(props?: ElementProps<Partial<{
|
|
7515
7648
|
resize?: boolean | undefined;
|
|
7516
7649
|
height?: number | undefined;
|
|
7517
7650
|
width?: number | undefined;
|
|
@@ -7752,6 +7885,11 @@ export declare type InteractionCallback<T extends Record<string, unknown> = Reco
|
|
|
7752
7885
|
export declare type InteractionCallbackContext = {
|
|
7753
7886
|
/** Id of the element this flow fired on. Absent for a flow with no host element. */
|
|
7754
7887
|
hostElementId?: string;
|
|
7888
|
+
/**
|
|
7889
|
+
* Aborted when the flow running this step is superseded — its trigger fired again under `whileRunning: 'latest'`. A
|
|
7890
|
+
* step waiting on something it can stop (a request, a server run) stops it; the flow starts no further step.
|
|
7891
|
+
*/
|
|
7892
|
+
signal?: AbortSignal;
|
|
7755
7893
|
};
|
|
7756
7894
|
|
|
7757
7895
|
export declare type InteractionCallbackParam<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
@@ -7766,6 +7904,11 @@ export declare type InteractionCallbackParam<T extends Record<string, unknown> =
|
|
|
7766
7904
|
} & ({
|
|
7767
7905
|
type: 'text';
|
|
7768
7906
|
defaultValue?: string | number;
|
|
7907
|
+
}
|
|
7908
|
+
/** Written as text — a number or a template — and handed to the callback as a number. */
|
|
7909
|
+
| {
|
|
7910
|
+
type: 'number';
|
|
7911
|
+
defaultValue?: number;
|
|
7769
7912
|
} | {
|
|
7770
7913
|
type: 'textarea';
|
|
7771
7914
|
defaultValue?: string | number;
|
|
@@ -7810,13 +7953,17 @@ export declare type InteractionCallbackParam<T extends Record<string, unknown> =
|
|
|
7810
7953
|
|
|
7811
7954
|
export declare type InteractionCallbackParamValues<T extends Record<string, unknown> = Record<string, unknown>> = T;
|
|
7812
7955
|
|
|
7813
|
-
|
|
7956
|
+
/**
|
|
7957
|
+
* What a field a step or a trigger hands its flow looks like — a sample, shown where a flow is written, never sent: `0`
|
|
7958
|
+
* for a count, `false` for a flag, `[]` for a list, as well as the text `''`.
|
|
7959
|
+
*/
|
|
7960
|
+
export declare type InteractionCallbackPreview = string | number | boolean | null | unknown[] | Record<string, unknown>;
|
|
7814
7961
|
|
|
7815
7962
|
export declare type InteractionCallbackPreviews = Record<string, InteractionCallbackPreview>;
|
|
7816
7963
|
|
|
7817
7964
|
export declare type InteractionCallbackType = 'trigger' | 'globalCallback' | 'callback' | 'utility' | 'task';
|
|
7818
7965
|
|
|
7819
|
-
export declare type InteractionParamType = 'boolean' | 'select' | 'text' | 'textarea' | 'codemirror-text' | 'codemirror-json' | 'elements';
|
|
7966
|
+
export declare type InteractionParamType = 'boolean' | 'select' | 'text' | 'number' | 'textarea' | 'codemirror-text' | 'codemirror-json' | 'elements';
|
|
7820
7967
|
|
|
7821
7968
|
export declare type InteractionPostCallback<T extends Record<string, unknown> = Record<string, unknown>> = (params: InteractionCallbackParamValues<T>, callbackResult?: unknown) => unknown;
|
|
7822
7969
|
|
|
@@ -7987,8 +8134,8 @@ export declare function list(children: ElementSpec[], props?: ListProps): Elemen
|
|
|
7987
8134
|
declare type ListAttributes = AttributesOf<typeof elementDeclarations.List>;
|
|
7988
8135
|
|
|
7989
8136
|
export declare const listItem: {
|
|
7990
|
-
(props?: AuthoringProps | undefined): ElementSpec;
|
|
7991
8137
|
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
8138
|
+
(props?: AuthoringProps | undefined): ElementSpec;
|
|
7992
8139
|
};
|
|
7993
8140
|
|
|
7994
8141
|
declare type ListProps = ElementProps<Omit<ListAttributes, 'items'> & {
|
|
@@ -8061,7 +8208,7 @@ export declare type ManifestAsset = {
|
|
|
8061
8208
|
};
|
|
8062
8209
|
|
|
8063
8210
|
export declare const markdown: ElementFactory<Partial<{
|
|
8064
|
-
content
|
|
8211
|
+
content?: string | undefined;
|
|
8065
8212
|
}>>;
|
|
8066
8213
|
|
|
8067
8214
|
/** Declared params marked `required` that the agent did NOT supply, and whose `when` guard holds against the
|
|
@@ -8071,11 +8218,11 @@ export declare const markdown: ElementFactory<Partial<{
|
|
|
8071
8218
|
export declare const missingRequiredParams: (provided: Record<string, unknown>, effective: Record<string, unknown>, spec: ParamSpec) => string[];
|
|
8072
8219
|
|
|
8073
8220
|
export declare const modalContainer: {
|
|
8074
|
-
(props?: ElementProps<Partial<{
|
|
8221
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
8075
8222
|
title?: string | undefined;
|
|
8076
8223
|
autoHideAfterClick?: boolean | undefined;
|
|
8077
8224
|
}>> | undefined): ElementSpec;
|
|
8078
|
-
(
|
|
8225
|
+
(props?: ElementProps<Partial<{
|
|
8079
8226
|
title?: string | undefined;
|
|
8080
8227
|
autoHideAfterClick?: boolean | undefined;
|
|
8081
8228
|
}>> | undefined): ElementSpec;
|
|
@@ -8553,6 +8700,23 @@ export declare const openDialog: (target: string, metadata?: string) => StepSpec
|
|
|
8553
8700
|
*/
|
|
8554
8701
|
export declare const openModal: (target: string, metadata?: string) => StepSpec;
|
|
8555
8702
|
|
|
8703
|
+
/**
|
|
8704
|
+
* Opens a page and waits until it has settled: loaded, and nothing asked for in `quietMs` — the server data, the
|
|
8705
|
+
* images, the plugins it fetches after the HTML.
|
|
8706
|
+
*
|
|
8707
|
+
* What Playwright's `networkidle` would be if it knew a page with a live channel: `networkidle` counts the channel's
|
|
8708
|
+
* stream, which never ends, so on any page with a `channel` it never came — and every check of that page answered
|
|
8709
|
+
* that nothing was there. Answers what `goto` did: the response, or `null` when nothing answered.
|
|
8710
|
+
*/
|
|
8711
|
+
export declare const openPage: (page: SettlingPage, url: string, { quietMs, timeout }?: OpenPageOptions) => Promise<unknown>;
|
|
8712
|
+
|
|
8713
|
+
export declare interface OpenPageOptions {
|
|
8714
|
+
/** How long nothing may be asked for before the page counts as settled. 500 ms, as `networkidle`. */
|
|
8715
|
+
quietMs?: number;
|
|
8716
|
+
/** The longest it waits for that quiet, after the page loaded — then it goes on anyway. 15 s. */
|
|
8717
|
+
timeout?: number;
|
|
8718
|
+
}
|
|
8719
|
+
|
|
8556
8720
|
declare type Operator = '' | '=' | '!=' | '<' | '>' | '<=' | '>=' | 'contains' | 'doesNotContain' | 'beginsWith' | 'doesNotBeginWith' | 'endsWith' | 'doesNotEndWith' | 'empty' | 'notEmpty' | 'in' | 'notIn' | 'between' | 'notBetween';
|
|
8557
8721
|
|
|
8558
8722
|
/** How many texts a page is read for: enough for a long page, few enough to stay quick. */
|
|
@@ -8567,6 +8731,46 @@ export declare interface PageEvaluator {
|
|
|
8567
8731
|
evaluate<R>(fn: (input: ProbeInput) => R, input: ProbeInput): Promise<R>;
|
|
8568
8732
|
}
|
|
8569
8733
|
|
|
8734
|
+
/** What every page of a family shares: where it lives, what frames it, how it is titled, and the shape of its body. */
|
|
8735
|
+
export declare interface PageFamily<Entry extends PageFamilyEntry> {
|
|
8736
|
+
folder?: string;
|
|
8737
|
+
layout?: LayoutRef;
|
|
8738
|
+
accessLevel?: PageSpec['accessLevel'];
|
|
8739
|
+
/** The document title: `entry => \`${entry.title} — Docs\``. The entry's own title when absent. */
|
|
8740
|
+
seoTitle?: (entry: Entry) => string;
|
|
8741
|
+
/**
|
|
8742
|
+
* One page's body, built inside `scope(entry.id, …)`: an `id` given here is the page's own (`id: 'title'` is
|
|
8743
|
+
* `<entry.id>-title`), and `ref` is the full name, for whatever names one — a binding, a step's target, a template.
|
|
8744
|
+
*/
|
|
8745
|
+
body: (entry: Entry, ref: (id: string) => string) => ElementSpec[];
|
|
8746
|
+
}
|
|
8747
|
+
|
|
8748
|
+
/**
|
|
8749
|
+
* Pages of one shape, each from its entry — the docs pages from their list, a menu's sections, a team's profiles.
|
|
8750
|
+
*
|
|
8751
|
+
* A function a space writes for itself does the same, and every space wrote the same one: the id, the slug, the titles,
|
|
8752
|
+
* the folder, the layout, and the prefix every id inside needs, because ids are one namespace for the whole space and
|
|
8753
|
+
* two pages of one shape give the same ones. Here it is once: the entries are data — an array in `src/data/`, typed —
|
|
8754
|
+
* and adding a page is adding an entry. Two entries with one id or one slug are refused as any two pages are.
|
|
8755
|
+
*
|
|
8756
|
+
* For one shape over a collection the visitor browses — a product, a post — a single page with a route param
|
|
8757
|
+
* (`slug: 'posts/:postId'`) reading the record is the answer instead: one page, as many addresses as records, and
|
|
8758
|
+
* nothing to author per record.
|
|
8759
|
+
*/
|
|
8760
|
+
export declare const pageFamily: <Entry extends PageFamilyEntry>({ folder, layout, accessLevel, seoTitle, body }: PageFamily<Entry>, entries: readonly Entry[]) => PageSpec[];
|
|
8761
|
+
|
|
8762
|
+
/** What one page of a family says that its siblings do not. */
|
|
8763
|
+
export declare interface PageFamilyEntry {
|
|
8764
|
+
/** The page's id — and the prefix of every id its body gives, so two pages of the family never share one. */
|
|
8765
|
+
id: string;
|
|
8766
|
+
/** Its name in the builder, and its document title unless the family words one (`seoTitle`). */
|
|
8767
|
+
title: string;
|
|
8768
|
+
/** Its path, relative to the family's folder. */
|
|
8769
|
+
slug: string;
|
|
8770
|
+
/** Its meta description, and its share preview's. */
|
|
8771
|
+
description?: string;
|
|
8772
|
+
}
|
|
8773
|
+
|
|
8570
8774
|
export declare type PageFolder = {
|
|
8571
8775
|
id: string;
|
|
8572
8776
|
name: string;
|
|
@@ -8727,7 +8931,7 @@ export declare interface PageText {
|
|
|
8727
8931
|
export declare const pageTexts: (limit: number) => PageText[];
|
|
8728
8932
|
|
|
8729
8933
|
export declare const pagination: {
|
|
8730
|
-
(props?: ElementProps<Partial<{
|
|
8934
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
8731
8935
|
mode?: "pages" | "loadMore" | undefined;
|
|
8732
8936
|
label?: string | undefined;
|
|
8733
8937
|
target?: "url" | "interaction" | undefined;
|
|
@@ -8738,7 +8942,7 @@ export declare const pagination: {
|
|
|
8738
8942
|
nextLabel?: string | undefined;
|
|
8739
8943
|
loadMoreLabel?: string | undefined;
|
|
8740
8944
|
}>> | undefined): ElementSpec;
|
|
8741
|
-
(
|
|
8945
|
+
(props?: ElementProps<Partial<{
|
|
8742
8946
|
mode?: "pages" | "loadMore" | undefined;
|
|
8743
8947
|
label?: string | undefined;
|
|
8744
8948
|
target?: "url" | "interaction" | undefined;
|
|
@@ -8875,7 +9079,7 @@ export declare interface PlannedFix {
|
|
|
8875
9079
|
code: string;
|
|
8876
9080
|
message: string;
|
|
8877
9081
|
elementId: string | null;
|
|
8878
|
-
/** Where the element was written: `src/
|
|
9082
|
+
/** Where the element was written: `src/space/pages/home.ts:42`. Absent for an element no factory wrote. */
|
|
8879
9083
|
at?: string;
|
|
8880
9084
|
/** The same place exactly — the factory's name, at its line and column — which is what the edit is made at. */
|
|
8881
9085
|
position?: WrittenPosition;
|
|
@@ -9087,9 +9291,11 @@ export declare interface ProbeFindings {
|
|
|
9087
9291
|
* Plain data both ways, because it crosses into the page as a serialized argument and comes back the same way.
|
|
9088
9292
|
*/
|
|
9089
9293
|
export declare interface ProbeInput {
|
|
9294
|
+
/** `list`: a list, whose box is only its rows — none drawn is a list with nothing in it, not one hidden. */
|
|
9090
9295
|
expected: {
|
|
9091
9296
|
id: string;
|
|
9092
9297
|
selector: string;
|
|
9298
|
+
list?: true;
|
|
9093
9299
|
}[];
|
|
9094
9300
|
images: boolean;
|
|
9095
9301
|
overflow: boolean;
|
|
@@ -9108,6 +9314,15 @@ export declare const profilePictures: ({ a, b, columns }: {
|
|
|
9108
9314
|
|
|
9109
9315
|
declare type ProviderPagination = 'none' | 'url' | 'append';
|
|
9110
9316
|
|
|
9317
|
+
/** How a provider's asking went — what every `apiContainer` publishes beside its answer. */
|
|
9318
|
+
export declare interface ProviderState {
|
|
9319
|
+
isLoading: boolean;
|
|
9320
|
+
isEmpty: boolean;
|
|
9321
|
+
hasError: boolean;
|
|
9322
|
+
errorMessage: string;
|
|
9323
|
+
isStale: boolean;
|
|
9324
|
+
}
|
|
9325
|
+
|
|
9111
9326
|
/**
|
|
9112
9327
|
* Says something on a `channel`, by id: every page on its topic hears it — `onMessage`, and the channel's source.
|
|
9113
9328
|
*
|
|
@@ -9128,11 +9343,11 @@ export declare const readDevToolsInPage: ({ state, element }: DevToolsInput) =>
|
|
|
9128
9343
|
export declare const reconcileParams: (params: Record<string, unknown>, spec: ParamSpec, strict: boolean) => Record<string, unknown>;
|
|
9129
9344
|
|
|
9130
9345
|
export declare const reference: {
|
|
9131
|
-
(props?: ElementProps<Partial<{
|
|
9346
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
9132
9347
|
referenceId: string;
|
|
9133
9348
|
referenceType: "element" | "component";
|
|
9134
9349
|
}>> | undefined): ElementSpec;
|
|
9135
|
-
(
|
|
9350
|
+
(props?: ElementProps<Partial<{
|
|
9136
9351
|
referenceId: string;
|
|
9137
9352
|
referenceType: "element" | "component";
|
|
9138
9353
|
}>> | undefined): ElementSpec;
|
|
@@ -9260,6 +9475,11 @@ export declare const richText: ElementFactory<Partial<{
|
|
|
9260
9475
|
mediaBaseUrl?: string | undefined;
|
|
9261
9476
|
}>>;
|
|
9262
9477
|
|
|
9478
|
+
/** What `answerAction` needs of a page — a Playwright `Page` is one. */
|
|
9479
|
+
export declare interface RoutingPage {
|
|
9480
|
+
route(url: string, handler: (route: AnsweredRoute) => Promise<void>): Promise<void>;
|
|
9481
|
+
}
|
|
9482
|
+
|
|
9263
9483
|
export declare const row: (gap: string, extra?: CssProps) => StyleRules;
|
|
9264
9484
|
|
|
9265
9485
|
/** A picture read row by row: each row the mean colour of each of `columns` bands across it, `columns * 3` values. */
|
|
@@ -9671,6 +9891,26 @@ export declare const setState: (params: {
|
|
|
9671
9891
|
value: unknown;
|
|
9672
9892
|
}) => StepSpec;
|
|
9673
9893
|
|
|
9894
|
+
/** The events `openPage` follows a page's requests by. */
|
|
9895
|
+
export declare type SettlingEvent = 'request' | 'requestfinished' | 'requestfailed';
|
|
9896
|
+
|
|
9897
|
+
/** What `openPage` needs of a page — a Playwright `Page` is one. */
|
|
9898
|
+
export declare interface SettlingPage {
|
|
9899
|
+
goto(url: string, options: {
|
|
9900
|
+
waitUntil: 'load';
|
|
9901
|
+
}): Promise<unknown>;
|
|
9902
|
+
on(event: SettlingEvent, listener: (request: SettlingRequest) => void): unknown;
|
|
9903
|
+
off(event: SettlingEvent, listener: (request: SettlingRequest) => void): unknown;
|
|
9904
|
+
waitForTimeout(milliseconds: number): Promise<void>;
|
|
9905
|
+
}
|
|
9906
|
+
|
|
9907
|
+
/** A request, as `openPage` reads it: enough to tell a stream that stays open from a request that ends. */
|
|
9908
|
+
export declare interface SettlingRequest {
|
|
9909
|
+
url(): string;
|
|
9910
|
+
resourceType(): string;
|
|
9911
|
+
headers(): Record<string, string>;
|
|
9912
|
+
}
|
|
9913
|
+
|
|
9674
9914
|
/** A shortcut as `onKey` writes it, as the key a driver presses. Refuses anything `onKey` would. */
|
|
9675
9915
|
export declare const shortcutKey: (shortcut: string, isMac: boolean) => string;
|
|
9676
9916
|
|
|
@@ -9901,7 +10141,7 @@ export declare interface SpaceHandles {
|
|
|
9901
10141
|
export declare type SpaceRefusal = {
|
|
9902
10142
|
/** The nearest named element and the steps from it — `"store-footer" › container[1]`. Empty for the space itself. */
|
|
9903
10143
|
place: string;
|
|
9904
|
-
/** The line of the author's own code that wrote it — `src/
|
|
10144
|
+
/** The line of the author's own code that wrote it — `src/space/layout.ts:417` — when a factory recorded one. */
|
|
9905
10145
|
at?: string;
|
|
9906
10146
|
/** What `authoring-errors.md` files it under — a code of `AUTHORING_CODES`, or a structural one of `validateSchema`. */
|
|
9907
10147
|
code?: string;
|
|
@@ -10607,8 +10847,13 @@ export declare interface Suggestion {
|
|
|
10607
10847
|
/** The elements it is about, the first being the one to look at. Empty for one about the stylesheet. */
|
|
10608
10848
|
elementIds: string[];
|
|
10609
10849
|
saves: number;
|
|
10610
|
-
/** Where the first of them was written: `src/
|
|
10850
|
+
/** Where the first of them was written: `src/space/pages/home.ts:42`. Absent when no factory wrote it. */
|
|
10611
10851
|
at?: string;
|
|
10852
|
+
/**
|
|
10853
|
+
* The declarations a suggestion about the stylesheet or the components is about — the classes, tokens or components
|
|
10854
|
+
* it names — so whoever reports only what is new (the MCP, after a batch) can tell a new one from those said before.
|
|
10855
|
+
*/
|
|
10856
|
+
subjects?: string[];
|
|
10612
10857
|
}
|
|
10613
10858
|
|
|
10614
10859
|
export declare type SuggestionCode = {
|
|
@@ -10622,9 +10867,10 @@ export declare type SuggestionCode = {
|
|
|
10622
10867
|
* Not the linter. `lintSpace` reports what renders something other than what was written, and a space is refused or
|
|
10623
10868
|
* warned for it; nothing here is wrong — the page renders exactly as written. These are the platform's own ways to say
|
|
10624
10869
|
* it once instead of many times (layouts, components, lists, an element's own `content`, a class's states, the SDK's
|
|
10625
|
-
* defaults)
|
|
10626
|
-
* that did not know them, or a person who has not met them yet.
|
|
10627
|
-
* elements say how many it saves, which is what they are ranked
|
|
10870
|
+
* defaults), to move it cheaply (the compositor's properties), and what it declares and never uses or says twice —
|
|
10871
|
+
* offered to whoever wrote it the long way: an agent that did not know them, or a person who has not met them yet.
|
|
10872
|
+
* Each names what to write instead, and the ones about elements say how many it saves, which is what they are ranked
|
|
10873
|
+
* by.
|
|
10628
10874
|
*/
|
|
10629
10875
|
export declare const suggestSpace: ({ schema, style }: {
|
|
10630
10876
|
schema: Schema;
|
|
@@ -10649,23 +10895,23 @@ export declare type SystemFont = FontBase & {
|
|
|
10649
10895
|
};
|
|
10650
10896
|
|
|
10651
10897
|
export declare const tabContainer: {
|
|
10652
|
-
(props?: AuthoringProps | undefined): ElementSpec;
|
|
10653
10898
|
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
10899
|
+
(props?: AuthoringProps | undefined): ElementSpec;
|
|
10654
10900
|
};
|
|
10655
10901
|
|
|
10656
10902
|
export declare const tabContainerBody: {
|
|
10657
|
-
(props?: AuthoringProps | undefined): ElementSpec;
|
|
10658
10903
|
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
10904
|
+
(props?: AuthoringProps | undefined): ElementSpec;
|
|
10659
10905
|
};
|
|
10660
10906
|
|
|
10661
10907
|
export declare const tabContainerHeader: {
|
|
10662
|
-
(props?: AuthoringProps | undefined): ElementSpec;
|
|
10663
10908
|
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
10909
|
+
(props?: AuthoringProps | undefined): ElementSpec;
|
|
10664
10910
|
};
|
|
10665
10911
|
|
|
10666
10912
|
export declare const tabContainerItem: {
|
|
10667
|
-
(props?: AuthoringProps | undefined): ElementSpec;
|
|
10668
10913
|
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
10914
|
+
(props?: AuthoringProps | undefined): ElementSpec;
|
|
10669
10915
|
};
|
|
10670
10916
|
|
|
10671
10917
|
export declare type TagType = 'class' | 'element' | 'id';
|
|
@@ -10677,6 +10923,7 @@ export declare type TailwindColors = Readonly<Record<string, string>>;
|
|
|
10677
10923
|
export declare type TemplateReturns = 'text' | 'value';
|
|
10678
10924
|
|
|
10679
10925
|
export declare const text: ElementFactory<Partial<{
|
|
10926
|
+
title?: string | undefined;
|
|
10680
10927
|
content?: string | number | undefined;
|
|
10681
10928
|
}>>;
|
|
10682
10929
|
|
|
@@ -10702,14 +10949,14 @@ export declare interface TextDifference {
|
|
|
10702
10949
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
10703
10950
|
|
|
10704
10951
|
export declare const themeToggle: {
|
|
10705
|
-
(props?: ElementProps<Partial<{
|
|
10952
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
10706
10953
|
subType?: "switch" | "segmented" | undefined;
|
|
10707
10954
|
lightLabel?: string | undefined;
|
|
10708
10955
|
darkLabel?: string | undefined;
|
|
10709
10956
|
systemLabel?: string | undefined;
|
|
10710
10957
|
showSystem?: boolean | undefined;
|
|
10711
10958
|
}>> | undefined): ElementSpec;
|
|
10712
|
-
(
|
|
10959
|
+
(props?: ElementProps<Partial<{
|
|
10713
10960
|
subType?: "switch" | "segmented" | undefined;
|
|
10714
10961
|
lightLabel?: string | undefined;
|
|
10715
10962
|
darkLabel?: string | undefined;
|
|
@@ -10919,6 +11166,16 @@ export declare const typeTriggerDefinitions: Record<string, InteractionCallback>
|
|
|
10919
11166
|
*/
|
|
10920
11167
|
export declare const unrollPage: () => number;
|
|
10921
11168
|
|
|
11169
|
+
/**
|
|
11170
|
+
* What a space declares and nothing uses — its classes, tokens and components — by the one rule the suggestions, the
|
|
11171
|
+
* builder's Usages panel and anything else that says "unused" read, so they never disagree.
|
|
11172
|
+
*/
|
|
11173
|
+
export declare const unusedDeclarations: (schema: Schema, style: Declared) => {
|
|
11174
|
+
classes: string[];
|
|
11175
|
+
tokens: string[];
|
|
11176
|
+
components: string[];
|
|
11177
|
+
};
|
|
11178
|
+
|
|
10922
11179
|
/**
|
|
10923
11180
|
* Changes one element's own attribute or state — the element `setState`, which is NOT the global one that writes
|
|
10924
11181
|
* `runtime.state`. Left without a target it runs against the element the flow is declared on.
|
|
@@ -10993,14 +11250,14 @@ export declare interface VariantSpec {
|
|
|
10993
11250
|
}
|
|
10994
11251
|
|
|
10995
11252
|
export declare const video: {
|
|
10996
|
-
(props?: ElementProps<Partial<{
|
|
11253
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
10997
11254
|
src?: string | undefined;
|
|
10998
11255
|
autoPlay?: boolean | undefined;
|
|
10999
11256
|
loop?: boolean | undefined;
|
|
11000
11257
|
muted?: boolean | undefined;
|
|
11001
11258
|
playsInline?: boolean | undefined;
|
|
11002
11259
|
}>> | undefined): ElementSpec;
|
|
11003
|
-
(
|
|
11260
|
+
(props?: ElementProps<Partial<{
|
|
11004
11261
|
src?: string | undefined;
|
|
11005
11262
|
autoPlay?: boolean | undefined;
|
|
11006
11263
|
loop?: boolean | undefined;
|
|
@@ -11140,15 +11397,18 @@ export declare const whenSucceeded: (stepId: string, step: StepSpec) => StepSpec
|
|
|
11140
11397
|
* - `skip` (the default): the new firing is ignored — what keeps a double click from submitting twice.
|
|
11141
11398
|
* - `parallel`: every firing runs its own flow, at the same time.
|
|
11142
11399
|
* - `queue`: every firing runs, one after another, in the order they came — none lost, none overlapping.
|
|
11400
|
+
* - `latest`: every firing runs, and the run before it stops — it starts no further step, and the step it is waiting
|
|
11401
|
+
* on stops if it can (a server action, a request). A search as you type: only the last question is answered.
|
|
11143
11402
|
*/
|
|
11144
|
-
export declare type WhileRunning = 'skip' | 'parallel' | 'queue';
|
|
11403
|
+
export declare type WhileRunning = 'skip' | 'parallel' | 'queue' | 'latest';
|
|
11145
11404
|
|
|
11146
11405
|
/**
|
|
11147
11406
|
* What a trigger does when it fires again while the flow it started still runs.
|
|
11148
11407
|
*
|
|
11149
11408
|
* `skip` is what happens without this: the new firing is ignored — which is what keeps a double click from submitting
|
|
11150
11409
|
* twice, and exactly wrong for a stream of events a flow must answer every one of. `queue` runs each firing after the
|
|
11151
|
-
* last, in order; `parallel` runs them all at once
|
|
11410
|
+
* last, in order; `parallel` runs them all at once; `latest` stops the run in progress — the server action or request
|
|
11411
|
+
* it waits on included — and runs the new one: a search as you type, where only the last question matters.
|
|
11152
11412
|
*
|
|
11153
11413
|
* ```ts
|
|
11154
11414
|
* [whileRunning('queue', named('arrived', on('onArrival'))), addNotification({ … }), delay(8000), …]
|