@plitzi/sdk-authoring 0.37.9 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +601 -0
- package/dist/index.d.ts +2606 -248
- package/dist/index.js +15698 -9654
- package/package.json +13 -12
- package/skills/plitzi-authoring/CHEATSHEET.md +135 -0
- package/skills/plitzi-authoring/SKILL.md +71 -71
- package/skills/plitzi-authoring/recipes/carousel.ts +114 -0
- package/skills/plitzi-authoring/recipes/detail-page.ts +70 -0
- package/skills/plitzi-authoring/recipes/embed-and-svg.ts +48 -0
- package/skills/plitzi-authoring/recipes/every-few-seconds.ts +119 -0
- package/skills/plitzi-authoring/recipes/feature-flag.ts +24 -0
- package/skills/plitzi-authoring/recipes/filter-a-list.ts +63 -0
- package/skills/plitzi-authoring/recipes/forms-and-modals.ts +64 -0
- package/skills/plitzi-authoring/recipes/from-tailwind.ts +52 -0
- package/skills/plitzi-authoring/recipes/link-to-a-section.ts +35 -0
- package/skills/plitzi-authoring/recipes/link-with-data.ts +40 -0
- package/skills/plitzi-authoring/recipes/marquee.ts +57 -0
- package/skills/plitzi-authoring/recipes/plugin.ts +53 -0
- package/skills/plitzi-authoring/recipes/scroll-a-row.ts +79 -0
- package/skills/plitzi-authoring/recipes/show-data.ts +73 -0
- package/skills/plitzi-authoring/recipes/style-a-page.ts +45 -0
- package/skills/plitzi-authoring/recipes/typed-data.ts +64 -0
- package/skills/plitzi-authoring/recipes/usable-without-sight.ts +39 -0
- package/skills/plitzi-authoring/reference/accessibility.md +2 -2
- package/skills/plitzi-authoring/reference/authoring-errors.md +195 -53
- package/skills/plitzi-authoring/reference/colours-and-motion.md +63 -0
- package/skills/plitzi-authoring/reference/components.md +9 -1
- package/skills/plitzi-authoring/reference/data-and-visibility.md +29 -29
- package/skills/plitzi-authoring/reference/efficiency.md +53 -0
- package/skills/plitzi-authoring/reference/elements-and-styles.md +39 -24
- package/skills/plitzi-authoring/reference/feature-flags.md +78 -0
- package/skills/plitzi-authoring/reference/flows.md +25 -36
- package/skills/plitzi-authoring/reference/kept-state.md +28 -0
- package/skills/plitzi-authoring/reference/layouts.md +20 -3
- package/skills/plitzi-authoring/reference/lists.md +45 -16
- package/skills/plitzi-authoring/reference/plugins.md +15 -0
- package/skills/plitzi-authoring/reference/realtime.md +35 -0
- package/skills/plitzi-authoring/reference/review-checklist.md +8 -3
- package/skills/plitzi-authoring/reference/{templates-and-export.md → snippets-and-export.md} +9 -8
- package/skills/plitzi-authoring/reference/structure.md +29 -20
- package/skills/plitzi-authoring/reference/tailwind.md +19 -0
- package/skills/plitzi-authoring/reference/templates.md +6 -5
- package/skills/plitzi-authoring/reference/testing.md +11 -0
- package/skills/plitzi-authoring/reference/typed-sources.md +20 -0
- package/skills/plitzi-authoring/reference/validation.md +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare type AccessSpec = ActionAccess | 'public' | 'session';
|
|
|
40
40
|
* There is no implicit default: a trigger that declares no access is refused at save time rather than falling back
|
|
41
41
|
* to something a reader has to guess at.
|
|
42
42
|
*/
|
|
43
|
-
declare type ActionAccess =
|
|
43
|
+
export declare type ActionAccess =
|
|
44
44
|
/** Anyone, including an anonymous visitor. Implicit for a webhook; anywhere else it is a deliberate choice. */
|
|
45
45
|
{
|
|
46
46
|
mode: 'public';
|
|
@@ -73,7 +73,7 @@ declare type ActionAccess =
|
|
|
73
73
|
* actually reaches for. A field beside the flow was the same fact written twice, with no rule for which won.
|
|
74
74
|
* Read it with `isActionEnabled` from `@plitzi/sdk-shared/actions`.
|
|
75
75
|
*/
|
|
76
|
-
declare type ActionDocument = {
|
|
76
|
+
export declare type ActionDocument = {
|
|
77
77
|
name: string;
|
|
78
78
|
description?: string;
|
|
79
79
|
/**
|
|
@@ -99,12 +99,12 @@ declare type ActionDocument = {
|
|
|
99
99
|
* `id` is stamped by the store rather than carried by the document, for the same reason `ConnectorManifestDraft`
|
|
100
100
|
* drops it: a document holding its own id can disagree with the one it was fetched by.
|
|
101
101
|
*/
|
|
102
|
-
declare type ActionEntry = {
|
|
102
|
+
export declare type ActionEntry = {
|
|
103
103
|
id: string;
|
|
104
104
|
document: ActionDocument;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
declare type ActionField = {
|
|
107
|
+
export declare type ActionField = {
|
|
108
108
|
type: ActionFieldType;
|
|
109
109
|
required?: boolean;
|
|
110
110
|
defaultValue?: string | number | boolean;
|
|
@@ -119,10 +119,10 @@ declare type ActionField = {
|
|
|
119
119
|
* `video`) and an action takes arguments, not entries. `json` is the escape hatch for a nested payload, and it is
|
|
120
120
|
* the only one whose contents are not validated beyond being parseable.
|
|
121
121
|
*/
|
|
122
|
-
declare type ActionFieldType = 'text' | 'number' | 'boolean' | 'date' | 'json' | 'file';
|
|
122
|
+
export declare type ActionFieldType = 'text' | 'number' | 'boolean' | 'date' | 'json' | 'file';
|
|
123
123
|
|
|
124
124
|
/** Ceilings for one run. A per-action value may only tighten the deployment's own. */
|
|
125
|
-
declare type ActionLimits = {
|
|
125
|
+
export declare type ActionLimits = {
|
|
126
126
|
timeoutMs?: number;
|
|
127
127
|
/** Ceiling for a streaming run, which is allowed to be longer-lived than a request/response one. */
|
|
128
128
|
streamTimeoutMs?: number;
|
|
@@ -274,6 +274,13 @@ export declare interface ActiveOnOptions {
|
|
|
274
274
|
slot?: string;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
+
/**
|
|
278
|
+
* Wears a class's variant while a condition holds — the dot of the slide on screen, the tab whose panel is open:
|
|
279
|
+
* `activeWhen(dot, '{{ list_dots.index == state.slide }}')`. The general form of {@link activeOn}, which is this for
|
|
280
|
+
* "the current page"; the condition is written as an attribute's token is, names in full, braces optional.
|
|
281
|
+
*/
|
|
282
|
+
export declare const activeWhen: (cls: ClassRef, condition: string, options?: ActiveOnOptions) => BindingSpec;
|
|
283
|
+
|
|
277
284
|
export declare const addNotification: (params: {
|
|
278
285
|
content: string;
|
|
279
286
|
placement?: "top-right" | "top-center" | "top-left" | "bottom-right" | "bottom-center" | "bottom-left";
|
|
@@ -323,8 +330,8 @@ export declare const announceOn: (target: string, state: unknown) => StepSpec;
|
|
|
323
330
|
* which is why their declarations had to be written before they could be authored at all.
|
|
324
331
|
*/
|
|
325
332
|
export declare const apiContainer: {
|
|
326
|
-
(props?: ElementProps<ApiContainerAttributes> | undefined): ElementSpec;
|
|
327
|
-
(children: ElementSpec[], props?: ElementProps<ApiContainerAttributes> | undefined): ElementSpec;
|
|
333
|
+
(props?: ElementProps< ApiContainerAttributes> | undefined): ElementSpec;
|
|
334
|
+
(children: ElementSpec[], props?: ElementProps< ApiContainerAttributes> | undefined): ElementSpec;
|
|
328
335
|
};
|
|
329
336
|
|
|
330
337
|
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
@@ -385,6 +392,11 @@ declare type ApiContainerProps = {
|
|
|
385
392
|
pageParam?: string;
|
|
386
393
|
/** Renders children while the first client-side request is still in flight, so a loading state can be bound. */
|
|
387
394
|
renderWhileLoading?: boolean;
|
|
395
|
+
/**
|
|
396
|
+
* The id of a child shown in place of the others until the first answer arrives — a skeleton of what is coming — and
|
|
397
|
+
* gone after it. In the builder every child shows, so the slot can be edited beside what it stands for.
|
|
398
|
+
*/
|
|
399
|
+
loadingSlot?: string;
|
|
388
400
|
/**
|
|
389
401
|
* Keep a browser request's answer in the page's query cache, shared with every provider asking the same thing.
|
|
390
402
|
* Off by default: an author opts in knowing the page may show an answer up to `staleTime` old.
|
|
@@ -408,6 +420,16 @@ declare type ApiContainerProps = {
|
|
|
408
420
|
refreshSeconds?: number | string;
|
|
409
421
|
};
|
|
410
422
|
|
|
423
|
+
/** What an `apiContainer` publishes: the answer under `data`, and how the asking went. */
|
|
424
|
+
export declare interface ApiContainerSource<Data> {
|
|
425
|
+
data: Data;
|
|
426
|
+
isLoading: boolean;
|
|
427
|
+
isEmpty: boolean;
|
|
428
|
+
hasError: boolean;
|
|
429
|
+
errorMessage: string;
|
|
430
|
+
isStale: boolean;
|
|
431
|
+
}
|
|
432
|
+
|
|
411
433
|
/**
|
|
412
434
|
* Adds to the list at `runtime.state.<key>`, creating it if it is not there.
|
|
413
435
|
*
|
|
@@ -434,6 +456,8 @@ export declare interface AppliedFix {
|
|
|
434
456
|
code: string;
|
|
435
457
|
elementId: string | null;
|
|
436
458
|
message: string;
|
|
459
|
+
/** The change itself, when there is one way to write it in the source; a message alone otherwise. */
|
|
460
|
+
change?: FixChange;
|
|
437
461
|
}
|
|
438
462
|
|
|
439
463
|
/** Resolve a `globalCallback` action against the built-in catalog: returns the module id it is registered under
|
|
@@ -460,6 +484,9 @@ export declare const applyUtility: (action: string, params: Record<string, unkno
|
|
|
460
484
|
params: Record<string, unknown>;
|
|
461
485
|
};
|
|
462
486
|
|
|
487
|
+
/** The throwing flavour. Returns what was survivable so a caller can decide what to do about it. */
|
|
488
|
+
export declare const assertSnippetValid: (snippet: Snippet, context: string, options?: SpaceValidationOptions) => SchemaValidationError[];
|
|
489
|
+
|
|
463
490
|
/**
|
|
464
491
|
* The throwing flavour. Returns what was survivable so a caller can decide what to do about it.
|
|
465
492
|
*
|
|
@@ -467,9 +494,6 @@ export declare const applyUtility: (action: string, params: Record<string, unkno
|
|
|
467
494
|
*/
|
|
468
495
|
export declare const assertSpaceValid: (space: SpaceDocuments, context: string, options?: SpaceValidationOptions, allow?: readonly AllowedBreak[]) => SchemaValidationError[];
|
|
469
496
|
|
|
470
|
-
/** The throwing flavour. Returns what was survivable so a caller can decide what to do about it. */
|
|
471
|
-
export declare const assertTemplateValid: (template: Template, context: string, options?: SpaceValidationOptions) => SchemaValidationError[];
|
|
472
|
-
|
|
473
497
|
/**
|
|
474
498
|
* The attributes of one built-in element, by type name — `Attributes<'heading'>['subType']`.
|
|
475
499
|
*
|
|
@@ -533,6 +557,17 @@ declare type AuthorableProps<Props, Injected extends keyof Props> = Omit<Props,
|
|
|
533
557
|
* nothing outside the element ever names one — so it says what it targets and where in the list it sits. */
|
|
534
558
|
export declare const authorBinding: (index: number, spec: BindingSpec) => ElementBinding;
|
|
535
559
|
|
|
560
|
+
export declare interface AuthoredSnippet {
|
|
561
|
+
/** The manifest as it is published: `JSON.stringify` it and host it. */
|
|
562
|
+
snippet: Snippet;
|
|
563
|
+
/**
|
|
564
|
+
* What the validators had to say that was not fatal — a class the snippet names but does not carry, a step
|
|
565
|
+
* naming an action no built-in source declares. Beside the manifest rather than inside it: what ships is a
|
|
566
|
+
* document a builder fetches, and it carries nothing that is not part of the snippet.
|
|
567
|
+
*/
|
|
568
|
+
warnings: SchemaValidationError[];
|
|
569
|
+
}
|
|
570
|
+
|
|
536
571
|
export declare interface AuthoredSpace {
|
|
537
572
|
schema: Schema;
|
|
538
573
|
style: Style;
|
|
@@ -549,17 +584,12 @@ export declare interface AuthoredSpace {
|
|
|
549
584
|
* errors of its own.
|
|
550
585
|
*/
|
|
551
586
|
warnings: SchemaValidationError[];
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
export declare interface AuthoredTemplate {
|
|
555
|
-
/** The manifest as it is published: `JSON.stringify` it and host it. */
|
|
556
|
-
template: Template;
|
|
557
587
|
/**
|
|
558
|
-
*
|
|
559
|
-
*
|
|
560
|
-
*
|
|
588
|
+
* A shorter way to the same page — a layout for a header on every page, a component for cards written ten times, an
|
|
589
|
+
* element's own `content` — ranked by the elements each would save. Not a problem: nothing here is wrong. See
|
|
590
|
+
* `suggestSpace`.
|
|
561
591
|
*/
|
|
562
|
-
|
|
592
|
+
suggestions: Suggestion[];
|
|
563
593
|
}
|
|
564
594
|
|
|
565
595
|
/**
|
|
@@ -573,6 +603,887 @@ export declare const authorFlow: (steps: StepSpec[], host?: string, counters?: M
|
|
|
573
603
|
|
|
574
604
|
export declare const authorFlows: (flows: StepSpec[][], host?: string) => Record<string, ElementInteraction>;
|
|
575
605
|
|
|
606
|
+
export declare const AUTHORING_CODES: {
|
|
607
|
+
readonly 'no-pages': {
|
|
608
|
+
readonly kind: "refused";
|
|
609
|
+
readonly means: "a space with no pages";
|
|
610
|
+
readonly fix: "`pages: [{ id: 'home', name: 'Home', slug: '', body: [] }]`";
|
|
611
|
+
};
|
|
612
|
+
readonly 'setting-misplaced': {
|
|
613
|
+
readonly kind: "refused";
|
|
614
|
+
readonly means: "`settings.computed` or `settings.channels` written inside `settings`";
|
|
615
|
+
readonly fix: "`computed` and `channels` at the top of the space";
|
|
616
|
+
};
|
|
617
|
+
readonly 'state-key-list': {
|
|
618
|
+
readonly kind: "refused";
|
|
619
|
+
readonly means: "`settings.transientState` / `paintedState` that is not a list of top-level state keys";
|
|
620
|
+
readonly fix: "`transientState: ['demoStep']` — a dotted path names its top key";
|
|
621
|
+
};
|
|
622
|
+
readonly 'state-painted-and-transient': {
|
|
623
|
+
readonly kind: "refused";
|
|
624
|
+
readonly means: "a state key both painted (kept for the server) and transient (never kept)";
|
|
625
|
+
readonly fix: "remove it from one of the two";
|
|
626
|
+
};
|
|
627
|
+
readonly 'transient-state-without-keep-state': {
|
|
628
|
+
readonly kind: "warned";
|
|
629
|
+
readonly means: "`transientState` without `keepState` — nothing is kept in the first place";
|
|
630
|
+
readonly fix: "`settings.keepState: true`, or remove `transientState`";
|
|
631
|
+
};
|
|
632
|
+
readonly 'painted-state-without-keep-state': {
|
|
633
|
+
readonly kind: "warned";
|
|
634
|
+
readonly means: "`paintedState` without `keepState` — nothing is kept for the server to draw with";
|
|
635
|
+
readonly fix: "`settings.keepState: true`, or remove `paintedState`";
|
|
636
|
+
};
|
|
637
|
+
readonly 'visitor-roles': {
|
|
638
|
+
readonly kind: "refused";
|
|
639
|
+
readonly means: "`settings.visitorRoles` written in a shape the runtime does not read";
|
|
640
|
+
readonly fix: "the shape the message gives";
|
|
641
|
+
};
|
|
642
|
+
readonly 'font-invalid': {
|
|
643
|
+
readonly kind: "refused";
|
|
644
|
+
readonly means: "a font the space cannot load as declared";
|
|
645
|
+
readonly fix: "the field the message names";
|
|
646
|
+
};
|
|
647
|
+
readonly 'notifications-shape': {
|
|
648
|
+
readonly kind: "refused";
|
|
649
|
+
readonly means: "`notifications` with a field it does not have, or a value that is not one CSS value";
|
|
650
|
+
readonly fix: "the fields it lists; a colour or a length, like 'var(--card)' or '12px'";
|
|
651
|
+
};
|
|
652
|
+
readonly 'unknown-field': {
|
|
653
|
+
readonly kind: "refused";
|
|
654
|
+
readonly means: "a field the space, a page, an element, a binding or a step does not have";
|
|
655
|
+
readonly fix: "the field it suggests; an element's attribute goes inside the factory's props (`button({ content })`)";
|
|
656
|
+
};
|
|
657
|
+
readonly 'page-without-slug': {
|
|
658
|
+
readonly kind: "refused";
|
|
659
|
+
readonly means: "a page with no `slug`";
|
|
660
|
+
readonly fix: "`slug: ''` for the home page, its path for any other: `'about'`, `'blog/:slug'`";
|
|
661
|
+
};
|
|
662
|
+
readonly 'page-route-taken': {
|
|
663
|
+
readonly kind: "refused";
|
|
664
|
+
readonly means: "two pages at one address for the same visitors";
|
|
665
|
+
readonly fix: "another slug — or `accessLevel` `'public'` on one and `'authenticated'` on the other";
|
|
666
|
+
};
|
|
667
|
+
readonly 'page-route-reserved': {
|
|
668
|
+
readonly kind: "refused";
|
|
669
|
+
readonly means: "a page under `/fn`, where the space's functions answer";
|
|
670
|
+
readonly fix: "another slug";
|
|
671
|
+
};
|
|
672
|
+
readonly 'page-access-level': {
|
|
673
|
+
readonly kind: "refused";
|
|
674
|
+
readonly means: "an `accessLevel` that is not one the router reads";
|
|
675
|
+
readonly fix: "one of the values the message lists";
|
|
676
|
+
};
|
|
677
|
+
readonly 'page-target-unknown': {
|
|
678
|
+
readonly kind: "refused";
|
|
679
|
+
readonly means: "a link or `navigate` to a page id that does not exist";
|
|
680
|
+
readonly fix: "an existing page id, or a path with its slash (`'/about'`)";
|
|
681
|
+
};
|
|
682
|
+
readonly 'page-target-url': {
|
|
683
|
+
readonly kind: "refused";
|
|
684
|
+
readonly means: "a URL, `mailto:` or `tel:` in a link left in page mode";
|
|
685
|
+
readonly fix: "`mode: 'external'`";
|
|
686
|
+
};
|
|
687
|
+
readonly 'redirect-target-unknown': {
|
|
688
|
+
readonly kind: "refused";
|
|
689
|
+
readonly means: "a page that sends visitors it is not for to a page the space does not have";
|
|
690
|
+
readonly fix: "a page's id or slug (`''` is the home page), or a full URL";
|
|
691
|
+
};
|
|
692
|
+
readonly 'folder-undeclared': {
|
|
693
|
+
readonly kind: "refused";
|
|
694
|
+
readonly means: "a page, a layout or a folder filed in a folder the space does not declare";
|
|
695
|
+
readonly fix: "declare the folder, or the name it suggests";
|
|
696
|
+
};
|
|
697
|
+
readonly 'folder-cycle': {
|
|
698
|
+
readonly kind: "refused";
|
|
699
|
+
readonly means: "a page folder inside itself";
|
|
700
|
+
readonly fix: "a `parent` that leads to the top";
|
|
701
|
+
};
|
|
702
|
+
readonly 'layout-undeclared': {
|
|
703
|
+
readonly kind: "refused";
|
|
704
|
+
readonly means: "a page or a layout inside a layout the space does not declare";
|
|
705
|
+
readonly fix: "the layout's id, or declare it in `layouts`";
|
|
706
|
+
};
|
|
707
|
+
readonly 'layout-slot-unknown': {
|
|
708
|
+
readonly kind: "refused";
|
|
709
|
+
readonly means: "a layout `slot` that is not an element inside that layout";
|
|
710
|
+
readonly fix: "the id of the element in the shell where the body goes";
|
|
711
|
+
};
|
|
712
|
+
readonly 'anchor-invalid': {
|
|
713
|
+
readonly kind: "refused";
|
|
714
|
+
readonly means: "an `anchor` or a link's `hash` that is not lowercase letters, digits and `-`";
|
|
715
|
+
readonly fix: "`anchor: 'plans'`, `hash: 'plans'` — no `#`";
|
|
716
|
+
};
|
|
717
|
+
readonly 'anchor-no-tag': {
|
|
718
|
+
readonly kind: "refused";
|
|
719
|
+
readonly means: "an anchor on an element that renders no element of its own";
|
|
720
|
+
readonly fix: "the anchor on the element around it, or `subType: 'div'` on the provider";
|
|
721
|
+
};
|
|
722
|
+
readonly 'anchor-repeated': {
|
|
723
|
+
readonly kind: "refused";
|
|
724
|
+
readonly means: "an anchor inside a list row or a component — it would be in the page once per row or instance";
|
|
725
|
+
readonly fix: "the anchor on the list, or on the element around the instance";
|
|
726
|
+
};
|
|
727
|
+
readonly 'anchor-duplicate': {
|
|
728
|
+
readonly kind: "refused";
|
|
729
|
+
readonly means: "one anchor on two elements of the same page (layouts included)";
|
|
730
|
+
readonly fix: "rename all but one";
|
|
731
|
+
};
|
|
732
|
+
readonly 'anchor-missing': {
|
|
733
|
+
readonly kind: "refused";
|
|
734
|
+
readonly means: "a link whose `hash` no element on the page it goes to carries — it would land at the top";
|
|
735
|
+
readonly fix: "the anchor the message lists, or give the section that `anchor`";
|
|
736
|
+
};
|
|
737
|
+
readonly 'id-invalid': {
|
|
738
|
+
readonly kind: "refused";
|
|
739
|
+
readonly means: "an id a binding, a template or a test cannot name";
|
|
740
|
+
readonly fix: "a letter first, then letters, digits, `-` and `_`: `'hero-title'`";
|
|
741
|
+
};
|
|
742
|
+
readonly 'id-taken': {
|
|
743
|
+
readonly kind: "refused";
|
|
744
|
+
readonly means: "two elements with one id — ids are one namespace for the whole space";
|
|
745
|
+
readonly fix: "wrap what a helper builds in `scope('promos', ref => …)`: every id inside is prefixed, `ref('slides')` names one";
|
|
746
|
+
};
|
|
747
|
+
readonly 'id-shadows-global': {
|
|
748
|
+
readonly kind: "refused";
|
|
749
|
+
readonly means: "an element named like a global data source (`state`, `navigation`, `auth`…)";
|
|
750
|
+
readonly fix: "another id";
|
|
751
|
+
};
|
|
752
|
+
readonly 'class-undeclared': {
|
|
753
|
+
readonly kind: "refused";
|
|
754
|
+
readonly means: "a class name the space does not declare";
|
|
755
|
+
readonly fix: "declare it in `classes`, hand the `styles()` declaration itself, or write the rules with `css`";
|
|
756
|
+
};
|
|
757
|
+
readonly 'class-conflict': {
|
|
758
|
+
readonly kind: "refused";
|
|
759
|
+
readonly means: "two different declarations for one class name";
|
|
760
|
+
readonly fix: "rename one, or make them agree";
|
|
761
|
+
};
|
|
762
|
+
readonly 'class-listed-under-other-name': {
|
|
763
|
+
readonly kind: "refused";
|
|
764
|
+
readonly means: "a `styles()` declaration listed in `classes` under another name";
|
|
765
|
+
readonly fix: "list it under its own name";
|
|
766
|
+
};
|
|
767
|
+
readonly 'class-and-css': {
|
|
768
|
+
readonly kind: "refused";
|
|
769
|
+
readonly means: "an element wearing a shared class AND `css` or `states` of its own — it has one base selector";
|
|
770
|
+
readonly fix: "the rules on top of the class: `class: [card, { opacity: '0.5' }]` (needs an `id`) — or into the class";
|
|
771
|
+
};
|
|
772
|
+
readonly 'class-and-selector': {
|
|
773
|
+
readonly kind: "refused";
|
|
774
|
+
readonly means: "an element with a shared class and a `selector` of its own";
|
|
775
|
+
readonly fix: "drop one: a shared class IS its selector";
|
|
776
|
+
};
|
|
777
|
+
readonly 'modifier-count': {
|
|
778
|
+
readonly kind: "refused";
|
|
779
|
+
readonly means: "more than one set of rules in a class list";
|
|
780
|
+
readonly fix: "one set, after the classes: `class: [card, { opacity: '0.5', 'margin-top': '8px' }]`";
|
|
781
|
+
};
|
|
782
|
+
readonly 'modifier-without-id': {
|
|
783
|
+
readonly kind: "refused";
|
|
784
|
+
readonly means: "rules on top of a class on an element with no `id` — the id names the class they become";
|
|
785
|
+
readonly fix: "`id: 'hero-bg'`";
|
|
786
|
+
};
|
|
787
|
+
readonly 'selector-invalid': {
|
|
788
|
+
readonly kind: "refused";
|
|
789
|
+
readonly means: "a `selector` that is not a CSS class name";
|
|
790
|
+
readonly fix: "letters, digits, `-` and `_`";
|
|
791
|
+
};
|
|
792
|
+
readonly 'selector-taken': {
|
|
793
|
+
readonly kind: "refused";
|
|
794
|
+
readonly means: "a `selector` that is a declared class, or another element's";
|
|
795
|
+
readonly fix: "`class` to share rules; a selector of an element's own is its alone";
|
|
796
|
+
};
|
|
797
|
+
readonly 'css-value': {
|
|
798
|
+
readonly kind: "refused";
|
|
799
|
+
readonly means: "an empty CSS value, or one with `;` or `{}`";
|
|
800
|
+
readonly fix: "one value per property; leave a property out instead of writing it empty";
|
|
801
|
+
};
|
|
802
|
+
readonly 'css-property-twice': {
|
|
803
|
+
readonly kind: "refused";
|
|
804
|
+
readonly means: "one property written twice in a rule set — `paddingTop` beside `'padding-top'` — so one would silently win";
|
|
805
|
+
readonly fix: "keep one";
|
|
806
|
+
};
|
|
807
|
+
readonly 'css-property-unknown': {
|
|
808
|
+
readonly kind: "refused";
|
|
809
|
+
readonly means: "a CSS property that does not exist";
|
|
810
|
+
readonly fix: "the property it suggests; a custom property starts with `--`";
|
|
811
|
+
};
|
|
812
|
+
readonly UNKNOWN_CSS_PROPERTY: {
|
|
813
|
+
readonly kind: "refused";
|
|
814
|
+
readonly means: "a property in the style document the style editor cannot read back";
|
|
815
|
+
readonly fix: "the property it suggests";
|
|
816
|
+
};
|
|
817
|
+
readonly 'rule-set-mixed': {
|
|
818
|
+
readonly kind: "refused";
|
|
819
|
+
readonly means: "a style that writes its rules beside `states`, `variants` or `ancestors` instead of under `css`";
|
|
820
|
+
readonly fix: "`{ css: { desktop: { … } }, states: { hover: { … } } }` — the rules under `css`, each of the others beside it";
|
|
821
|
+
};
|
|
822
|
+
readonly 'style-state-unknown': {
|
|
823
|
+
readonly kind: "refused";
|
|
824
|
+
readonly means: "a state a selector does not react to";
|
|
825
|
+
readonly fix: "one of the states it lists (`hover`, `focus`, `active`…)";
|
|
826
|
+
};
|
|
827
|
+
readonly 'ancestor-not-class': {
|
|
828
|
+
readonly kind: "refused";
|
|
829
|
+
readonly means: "an ancestor condition keyed by something that is not a class name";
|
|
830
|
+
readonly fix: "`[card.name]` for a `styles()` declaration";
|
|
831
|
+
};
|
|
832
|
+
readonly 'tablet-rule-skips-mobile': {
|
|
833
|
+
readonly kind: "warned";
|
|
834
|
+
readonly means: "a tablet rule phones never get — mobile inherits desktop, not tablet";
|
|
835
|
+
readonly fix: "write it under `compact` (tablet and mobile together)";
|
|
836
|
+
};
|
|
837
|
+
readonly 'tw-unknown-class': {
|
|
838
|
+
readonly kind: "refused";
|
|
839
|
+
readonly means: "a class `tw()` does not know as Tailwind";
|
|
840
|
+
readonly fix: "the class it suggests; a colour of the space through `createTw({ colors })`; any CSS as `[property:value]`";
|
|
841
|
+
};
|
|
842
|
+
readonly 'tw-no-equivalent': {
|
|
843
|
+
readonly kind: "refused";
|
|
844
|
+
readonly means: "a Tailwind class or variant with no exact equivalent in a Plitzi style (`sm:`, `dark:`, `space-x-4`)";
|
|
845
|
+
readonly fix: "what the message names: `md:`/`lg:`/`max-md:`/`max-lg:`, a token with both themes, `gap`";
|
|
846
|
+
};
|
|
847
|
+
readonly 'tw-class-conflict': {
|
|
848
|
+
readonly kind: "refused";
|
|
849
|
+
readonly means: "two classes set the same property and neither is the narrower one (`p-2 p-4`)";
|
|
850
|
+
readonly fix: "keep one";
|
|
851
|
+
};
|
|
852
|
+
readonly 'unknown-variable': {
|
|
853
|
+
readonly kind: "warned";
|
|
854
|
+
readonly means: "a `var(--x)` nothing in the space declares — the property it is in is dropped";
|
|
855
|
+
readonly fix: "declare it under `variables`, fix the name, or give it a fallback: `var(--x, …)`";
|
|
856
|
+
};
|
|
857
|
+
readonly 'colour-without-dark': {
|
|
858
|
+
readonly kind: "warned";
|
|
859
|
+
readonly means: "a colour token with no dark value";
|
|
860
|
+
readonly fix: "`{ light, dark, default }`";
|
|
861
|
+
};
|
|
862
|
+
readonly STYLE_WITHOUT_TAG: {
|
|
863
|
+
readonly kind: "warned";
|
|
864
|
+
readonly means: "style on a provider that renders no element of its own";
|
|
865
|
+
readonly fix: "`subType: 'div'` on the provider, or style its parent";
|
|
866
|
+
};
|
|
867
|
+
readonly 'element-shape': {
|
|
868
|
+
readonly kind: "refused";
|
|
869
|
+
readonly means: "an element that is not an object with a `type`, `attributes` and a list of `children`";
|
|
870
|
+
readonly fix: "build elements with their factories — `text(…)`, `container(…)`";
|
|
871
|
+
};
|
|
872
|
+
readonly 'element-rejected': {
|
|
873
|
+
readonly kind: "refused";
|
|
874
|
+
readonly means: "an element the schema refused to hold";
|
|
875
|
+
readonly fix: "the problem listed with it";
|
|
876
|
+
};
|
|
877
|
+
readonly 'unknown-element-type': {
|
|
878
|
+
readonly kind: "warned";
|
|
879
|
+
readonly means: "a type no built-in element has";
|
|
880
|
+
readonly fix: "the built-in it suggests; a plugin's declaration goes in `authorSpace(space, { plugins: [declaration] })`";
|
|
881
|
+
};
|
|
882
|
+
readonly 'unknown-attribute': {
|
|
883
|
+
readonly kind: "refused";
|
|
884
|
+
readonly means: "an attribute the element does not have";
|
|
885
|
+
readonly fix: "one it lists; an event (`onClick`) is a flow: `flows: [[onClick(), …]]`";
|
|
886
|
+
};
|
|
887
|
+
readonly 'attribute-value': {
|
|
888
|
+
readonly kind: "refused";
|
|
889
|
+
readonly means: "a value outside the attribute's list (`subType: 'h7'`)";
|
|
890
|
+
readonly fix: "one of the listed values";
|
|
891
|
+
};
|
|
892
|
+
readonly 'attribute-kind': {
|
|
893
|
+
readonly kind: "refused";
|
|
894
|
+
readonly means: "text where a flag or a list is read";
|
|
895
|
+
readonly fix: "`disabled: true`, not `'true'`; `items: [ … ]`";
|
|
896
|
+
};
|
|
897
|
+
readonly 'element-runtime': {
|
|
898
|
+
readonly kind: "refused";
|
|
899
|
+
readonly means: "a `runtime` the element does not run in";
|
|
900
|
+
readonly fix: "one of the values the message lists";
|
|
901
|
+
};
|
|
902
|
+
readonly 'element-load-strategy': {
|
|
903
|
+
readonly kind: "refused";
|
|
904
|
+
readonly means: "a `loadStrategy` the element does not take";
|
|
905
|
+
readonly fix: "one of the values the message lists";
|
|
906
|
+
};
|
|
907
|
+
readonly 'children-in-leaf': {
|
|
908
|
+
readonly kind: "refused";
|
|
909
|
+
readonly means: "children on a type that renders only its own attributes (`heading`, `text`, `image`…)";
|
|
910
|
+
readonly fix: "a `container` — for a heading made of parts, `container({ subType: 'h1', children })`";
|
|
911
|
+
};
|
|
912
|
+
readonly 'span-holds-block': {
|
|
913
|
+
readonly kind: "warned";
|
|
914
|
+
readonly means: "a `container({ subType: 'span' })` holding a heading, a paragraph, a list, a form or prose";
|
|
915
|
+
readonly fix: "a `div` (leave `subType` out), or words: a `text` with `display: inline` in its class";
|
|
916
|
+
};
|
|
917
|
+
readonly 'part-missing': {
|
|
918
|
+
readonly kind: "refused";
|
|
919
|
+
readonly means: "a compound element — a carousel, a tab container, a dropdown — without a part it renders through";
|
|
920
|
+
readonly fix: "the part the message names, inside it (`carousel()` writes its own track)";
|
|
921
|
+
};
|
|
922
|
+
readonly 'outside-ancestor': {
|
|
923
|
+
readonly kind: "refused";
|
|
924
|
+
readonly means: "an element that reads the state of an element it is not inside";
|
|
925
|
+
readonly fix: "nest it in the element the message names";
|
|
926
|
+
};
|
|
927
|
+
readonly 'default-content-beside-children': {
|
|
928
|
+
readonly kind: "warned";
|
|
929
|
+
readonly means: "a button printing its default \"Button\" beside its children";
|
|
930
|
+
readonly fix: "`content: ''`";
|
|
931
|
+
};
|
|
932
|
+
readonly 'loading-slot-unknown': {
|
|
933
|
+
readonly kind: "refused";
|
|
934
|
+
readonly means: "an `apiContainer`'s `loadingSlot` that is not the id of one of its children";
|
|
935
|
+
readonly fix: "the id of the child to show until the first answer — `loadingSlot: 'catalog-skeleton'` beside that child";
|
|
936
|
+
};
|
|
937
|
+
readonly 'row-and-children': {
|
|
938
|
+
readonly kind: "refused";
|
|
939
|
+
readonly means: "a list with a `row` and `children` — the row is what it renders";
|
|
940
|
+
readonly fix: "one of the two";
|
|
941
|
+
};
|
|
942
|
+
readonly 'row-without-id': {
|
|
943
|
+
readonly kind: "refused";
|
|
944
|
+
readonly means: "a list whose `row` is a function, with no `id` — the row's sources are named after it";
|
|
945
|
+
readonly fix: "`list({ id: 'products', items, row: r => … })`";
|
|
946
|
+
};
|
|
947
|
+
readonly 'row-outside-list': {
|
|
948
|
+
readonly kind: "refused";
|
|
949
|
+
readonly means: "`row` on an element that is not a list";
|
|
950
|
+
readonly fix: "a `list` around it";
|
|
951
|
+
};
|
|
952
|
+
readonly 'source-field-unknown': {
|
|
953
|
+
readonly kind: "refused";
|
|
954
|
+
readonly means: "a path into a typed source that its sample does not have";
|
|
955
|
+
readonly fix: "read a field the sample has, or add the field to the sample";
|
|
956
|
+
};
|
|
957
|
+
readonly 'svg-not-svg': {
|
|
958
|
+
readonly kind: "refused";
|
|
959
|
+
readonly means: "an `svg` whose `content` is not one `<svg>…</svg>` — it draws nothing";
|
|
960
|
+
readonly fix: "the SVG markup alone; HTML around it goes in a `blockHtml`";
|
|
961
|
+
};
|
|
962
|
+
readonly 'row-component': {
|
|
963
|
+
readonly kind: "refused";
|
|
964
|
+
readonly means: "a list's `row` naming a component the space does not declare, or one with no prop to take the row";
|
|
965
|
+
readonly fix: "a declared component with an `item` prop — or a single prop — for the row";
|
|
966
|
+
};
|
|
967
|
+
readonly 'list-without-items': {
|
|
968
|
+
readonly kind: "refused";
|
|
969
|
+
readonly means: "a controlled list with nothing to render";
|
|
970
|
+
readonly fix: "`items: [ … ]` or `bind: { items: 'provider.data.rows' }`";
|
|
971
|
+
};
|
|
972
|
+
readonly 'list-item-key-missing': {
|
|
973
|
+
readonly kind: "warned";
|
|
974
|
+
readonly means: "a list's `itemKey` that some of its items lack, or two of them share — the rows fall back to `id`, then position";
|
|
975
|
+
readonly fix: "a field every item has, once each";
|
|
976
|
+
};
|
|
977
|
+
readonly 'list-items-ignored': {
|
|
978
|
+
readonly kind: "refused";
|
|
979
|
+
readonly means: "a list whose items nothing reads — `source: 'none'` renders its children once";
|
|
980
|
+
readonly fix: "`source: 'controlled'`";
|
|
981
|
+
};
|
|
982
|
+
readonly 'overlay-starts-open': {
|
|
983
|
+
readonly kind: "warned";
|
|
984
|
+
readonly means: "a modal or a dialog open when the page loads";
|
|
985
|
+
readonly fix: "`visible: false`, opened by `openModal`";
|
|
986
|
+
};
|
|
987
|
+
readonly 'overlay-never-opened': {
|
|
988
|
+
readonly kind: "warned";
|
|
989
|
+
readonly means: "a modal or a dialog that starts hidden and that no step opens";
|
|
990
|
+
readonly fix: "a flow with `openModal('id')` / `openDialog('id')`";
|
|
991
|
+
};
|
|
992
|
+
readonly 'provider-without-source': {
|
|
993
|
+
readonly kind: "warned";
|
|
994
|
+
readonly means: "an `apiContainer` that asks nothing";
|
|
995
|
+
readonly fix: "a `query` (or `action`, `connector`, `resource`)";
|
|
996
|
+
};
|
|
997
|
+
readonly 'server-data-without-rsc': {
|
|
998
|
+
readonly kind: "warned";
|
|
999
|
+
readonly means: "a `runtime: 'server'` provider with a `connector` or `action` in a space that does not turn server data on";
|
|
1000
|
+
readonly fix: "`rsc: { enabled: true }` on the space";
|
|
1001
|
+
};
|
|
1002
|
+
readonly 'route-param-undeclared': {
|
|
1003
|
+
readonly kind: "warned";
|
|
1004
|
+
readonly means: "`navigation.routeParams.x` read on a page whose slug has no `:x` — always empty";
|
|
1005
|
+
readonly fix: "add `:x` to the slug, or read `navigation.queryParams.x`";
|
|
1006
|
+
};
|
|
1007
|
+
readonly 'form-control-unnamed': {
|
|
1008
|
+
readonly kind: "warned";
|
|
1009
|
+
readonly means: "a control in a form with no `name` — its value never reaches `values`";
|
|
1010
|
+
readonly fix: "`formControl({ name: 'email', … })`";
|
|
1011
|
+
};
|
|
1012
|
+
readonly 'form-control-name-taken': {
|
|
1013
|
+
readonly kind: "warned";
|
|
1014
|
+
readonly means: "two controls in one form with one name — one overwrites the other";
|
|
1015
|
+
readonly fix: "a name each";
|
|
1016
|
+
};
|
|
1017
|
+
readonly FORM_SUBMIT_UNMANAGED: {
|
|
1018
|
+
readonly kind: "warned";
|
|
1019
|
+
readonly means: "a form the browser would submit itself, reloading the page";
|
|
1020
|
+
readonly fix: "`managedByInteractions: true`";
|
|
1021
|
+
};
|
|
1022
|
+
readonly 'from-without-attribute': {
|
|
1023
|
+
readonly kind: "refused";
|
|
1024
|
+
readonly means: "`from` on a type with no one attribute that shows its data (a container, a form)";
|
|
1025
|
+
readonly fix: "bind the attribute you mean: `bind: { attribute: 'source' }`";
|
|
1026
|
+
};
|
|
1027
|
+
readonly 'from-and-bind': {
|
|
1028
|
+
readonly kind: "refused";
|
|
1029
|
+
readonly means: "the main attribute bound twice, with `from` and in `bind`";
|
|
1030
|
+
readonly fix: "keep `from`, and give `bind` the other attributes";
|
|
1031
|
+
};
|
|
1032
|
+
readonly 'as-without-from': {
|
|
1033
|
+
readonly kind: "refused";
|
|
1034
|
+
readonly means: "`as` with no `from` — `as` is how the source `from` names is shown";
|
|
1035
|
+
readonly fix: "`from: 'products.item.price', as: 'price'`";
|
|
1036
|
+
};
|
|
1037
|
+
readonly 'format-unknown': {
|
|
1038
|
+
readonly kind: "refused";
|
|
1039
|
+
readonly means: "an `as` that names no format of the space's `formats`";
|
|
1040
|
+
readonly fix: "declare it once — `formats: { price: \"{{ source|currency('USD') }}\" }` — or write the template in its place";
|
|
1041
|
+
};
|
|
1042
|
+
readonly 'binding-shape': {
|
|
1043
|
+
readonly kind: "refused";
|
|
1044
|
+
readonly means: "a binding with no `to` or no `source`";
|
|
1045
|
+
readonly fix: "`bind: { content: 'posts.item.title' }`, or `bindTemplate(to, source, template)`";
|
|
1046
|
+
};
|
|
1047
|
+
readonly 'binding-category': {
|
|
1048
|
+
readonly kind: "refused";
|
|
1049
|
+
readonly means: "a binding `category` that does not exist";
|
|
1050
|
+
readonly fix: "one of the categories it lists";
|
|
1051
|
+
};
|
|
1052
|
+
readonly 'binding-source-unknown': {
|
|
1053
|
+
readonly kind: "refused";
|
|
1054
|
+
readonly means: "a binding whose source names an element that does not exist, or with its prefix written wrong";
|
|
1055
|
+
readonly fix: "the id of the element that publishes it, written alone — the prefix is filled in";
|
|
1056
|
+
};
|
|
1057
|
+
readonly 'binding-source-out-of-scope': {
|
|
1058
|
+
readonly kind: "refused";
|
|
1059
|
+
readonly means: "a source read by an element that is not inside the element publishing it";
|
|
1060
|
+
readonly fix: "move the element inside it, or share the value through `state`";
|
|
1061
|
+
};
|
|
1062
|
+
readonly 'binding-target-unknown': {
|
|
1063
|
+
readonly kind: "refused";
|
|
1064
|
+
readonly means: "a binding onto an attribute the element does not have — the value arrives and nothing shows it";
|
|
1065
|
+
readonly fix: "one it lists (`content`); to follow data with a class, `variantFrom`";
|
|
1066
|
+
};
|
|
1067
|
+
readonly 'active-when-constant': {
|
|
1068
|
+
readonly kind: "refused";
|
|
1069
|
+
readonly means: "an `activeWhen` condition that reads nothing — always or never true";
|
|
1070
|
+
readonly fix: "name what it depends on: `'{{ list_dots.index == state.slide }}'`";
|
|
1071
|
+
};
|
|
1072
|
+
readonly 'visibility-as-attribute': {
|
|
1073
|
+
readonly kind: "refused";
|
|
1074
|
+
readonly means: "`visibility` bound as an attribute, which no element reads";
|
|
1075
|
+
readonly fix: "`visible: { source, template }`";
|
|
1076
|
+
};
|
|
1077
|
+
readonly 'unknown-transformer': {
|
|
1078
|
+
readonly kind: "refused";
|
|
1079
|
+
readonly means: "a transformer that does not exist";
|
|
1080
|
+
readonly fix: "one of the transformers it lists";
|
|
1081
|
+
};
|
|
1082
|
+
readonly 'transformer-params': {
|
|
1083
|
+
readonly kind: "refused";
|
|
1084
|
+
readonly means: "a transformer param that does not exist, or a value outside its options";
|
|
1085
|
+
readonly fix: "the params and values it lists";
|
|
1086
|
+
};
|
|
1087
|
+
readonly 'template-text-into-value': {
|
|
1088
|
+
readonly kind: "refused";
|
|
1089
|
+
readonly means: "a template, which renders text, feeding an attribute that holds a list or an object";
|
|
1090
|
+
readonly fix: "`bindTemplate('items', source, '{{ … }}', { returns: 'value' })`";
|
|
1091
|
+
};
|
|
1092
|
+
readonly 'template-unreadable': {
|
|
1093
|
+
readonly kind: "refused";
|
|
1094
|
+
readonly means: "a template with an operator, a filter or a function that does not exist, or broken syntax";
|
|
1095
|
+
readonly fix: "an operator, a filter or a function the interpreter has — the message names the one it could not read; `matches` never exists";
|
|
1096
|
+
};
|
|
1097
|
+
readonly 'template-unknown-name': {
|
|
1098
|
+
readonly kind: "refused";
|
|
1099
|
+
readonly means: "a name in a template that is not a source, a variable or a route param";
|
|
1100
|
+
readonly fix: "the full source name (`list_rows.item`), `navigation.queryParams.x`, or `source` for the bound value";
|
|
1101
|
+
};
|
|
1102
|
+
readonly 'template-short-source': {
|
|
1103
|
+
readonly kind: "refused";
|
|
1104
|
+
readonly means: "a source named without its prefix inside a template or a step";
|
|
1105
|
+
readonly fix: "the full name: `apiContainer_stats`, `list_rows`";
|
|
1106
|
+
};
|
|
1107
|
+
readonly 'template-source-out-of-scope': {
|
|
1108
|
+
readonly kind: "refused";
|
|
1109
|
+
readonly means: "a template reading the source of an element it is not inside";
|
|
1110
|
+
readonly fix: "move the element inside it, or share the value through `state`";
|
|
1111
|
+
};
|
|
1112
|
+
readonly 'template-never-resolved': {
|
|
1113
|
+
readonly kind: "warned";
|
|
1114
|
+
readonly means: "a condition in an attribute, which only resolves `{{ name|filter }}` — used as written";
|
|
1115
|
+
readonly fix: "move it into `bindTemplate`";
|
|
1116
|
+
};
|
|
1117
|
+
readonly 'condition-starts-visible': {
|
|
1118
|
+
readonly kind: "warned";
|
|
1119
|
+
readonly means: "a computed visibility that shows until its data answers";
|
|
1120
|
+
readonly fix: "`visible: { source, template }`";
|
|
1121
|
+
};
|
|
1122
|
+
readonly 'computed-name': {
|
|
1123
|
+
readonly kind: "refused";
|
|
1124
|
+
readonly means: "a computed value whose name a template cannot read as `computed.x`";
|
|
1125
|
+
readonly fix: "letters, digits and `_`";
|
|
1126
|
+
};
|
|
1127
|
+
readonly 'computed-not-template': {
|
|
1128
|
+
readonly kind: "refused";
|
|
1129
|
+
readonly means: "a computed value that is not a template";
|
|
1130
|
+
readonly fix: "`'{{ state.x * 2 }}'`";
|
|
1131
|
+
};
|
|
1132
|
+
readonly 'computed-reads-element': {
|
|
1133
|
+
readonly kind: "refused";
|
|
1134
|
+
readonly means: "a computed value reading an element's source — no element is around the whole space";
|
|
1135
|
+
readonly fix: "compute it from the globals and the variables, or bind it on the element";
|
|
1136
|
+
};
|
|
1137
|
+
readonly 'computed-unknown': {
|
|
1138
|
+
readonly kind: "refused";
|
|
1139
|
+
readonly means: "a computed value read before it is declared, or never declared";
|
|
1140
|
+
readonly fix: "declare it in `computed`, above the one that reads it";
|
|
1141
|
+
};
|
|
1142
|
+
readonly 'component-id': {
|
|
1143
|
+
readonly kind: "refused";
|
|
1144
|
+
readonly means: "a component whose `id` is not a name it can be placed by";
|
|
1145
|
+
readonly fix: "a letter first, then letters, digits, `-` and `_`";
|
|
1146
|
+
};
|
|
1147
|
+
readonly 'component-duplicate': {
|
|
1148
|
+
readonly kind: "refused";
|
|
1149
|
+
readonly means: "two components with one id";
|
|
1150
|
+
readonly fix: "a name each";
|
|
1151
|
+
};
|
|
1152
|
+
readonly 'component-undeclared': {
|
|
1153
|
+
readonly kind: "refused";
|
|
1154
|
+
readonly means: "an instance of a component the space does not declare";
|
|
1155
|
+
readonly fix: "the id it suggests, or declare it in `components`";
|
|
1156
|
+
};
|
|
1157
|
+
readonly 'prop-name': {
|
|
1158
|
+
readonly kind: "refused";
|
|
1159
|
+
readonly means: "a prop whose name a template cannot read as `props.x`";
|
|
1160
|
+
readonly fix: "letters, digits and `_`";
|
|
1161
|
+
};
|
|
1162
|
+
readonly 'prop-unknown': {
|
|
1163
|
+
readonly kind: "refused";
|
|
1164
|
+
readonly means: "a prop the component does not declare, handed in or read";
|
|
1165
|
+
readonly fix: "the prop it suggests, or declare it: `props: { name: { type: 'text' } }`";
|
|
1166
|
+
};
|
|
1167
|
+
readonly 'prop-missing': {
|
|
1168
|
+
readonly kind: "refused";
|
|
1169
|
+
readonly means: "an instance without a prop its component requires";
|
|
1170
|
+
readonly fix: "`component('card', { props: { name: … } })`, or bind it";
|
|
1171
|
+
};
|
|
1172
|
+
readonly 'prop-value': {
|
|
1173
|
+
readonly kind: "refused";
|
|
1174
|
+
readonly means: "a prop handed in with a value its declaration does not take";
|
|
1175
|
+
readonly fix: "a value of the declared type, or one of its options";
|
|
1176
|
+
};
|
|
1177
|
+
readonly 'props-outside-component': {
|
|
1178
|
+
readonly kind: "refused";
|
|
1179
|
+
readonly means: "`props.x` read outside a component";
|
|
1180
|
+
readonly fix: "read the source it would have come from";
|
|
1181
|
+
};
|
|
1182
|
+
readonly 'slot-unknown': {
|
|
1183
|
+
readonly kind: "refused";
|
|
1184
|
+
readonly means: "a component slot that is not an element of its tree";
|
|
1185
|
+
readonly fix: "the id of an element inside the component — usually an empty container";
|
|
1186
|
+
};
|
|
1187
|
+
readonly 'slot-children': {
|
|
1188
|
+
readonly kind: "refused";
|
|
1189
|
+
readonly means: "children handed to an instance outside its slots";
|
|
1190
|
+
readonly fix: "`children: { slotName: [ … ] }`; a component with no slots takes no children";
|
|
1191
|
+
};
|
|
1192
|
+
readonly 'flag-gate': {
|
|
1193
|
+
readonly kind: "refused";
|
|
1194
|
+
readonly means: "an element's or a page's `flag` that is not a flag name";
|
|
1195
|
+
readonly fix: "`flag: 'newCheckout'`, or `flag: '!newCheckout'` for \"only while off\"";
|
|
1196
|
+
};
|
|
1197
|
+
readonly 'flag-undeclared': {
|
|
1198
|
+
readonly kind: "refused";
|
|
1199
|
+
readonly means: "a gate on a flag the space does not declare — it reads as off, so the element never (or always) renders";
|
|
1200
|
+
readonly fix: "declare it in `flags`, or remove the gate";
|
|
1201
|
+
};
|
|
1202
|
+
readonly 'flag-unknown': {
|
|
1203
|
+
readonly kind: "refused";
|
|
1204
|
+
readonly means: "a template reading a flag the space does not declare";
|
|
1205
|
+
readonly fix: "the declared name it suggests, or declare it";
|
|
1206
|
+
};
|
|
1207
|
+
readonly 'flag-name': {
|
|
1208
|
+
readonly kind: "refused";
|
|
1209
|
+
readonly means: "a flag whose name a template cannot read as `flags.x`";
|
|
1210
|
+
readonly fix: "letters, digits and `_`";
|
|
1211
|
+
};
|
|
1212
|
+
readonly 'flag-shape': {
|
|
1213
|
+
readonly kind: "refused";
|
|
1214
|
+
readonly means: "a flag whose `value` is not `true` or `false`";
|
|
1215
|
+
readonly fix: "`{ value: false, rules: [] }`";
|
|
1216
|
+
};
|
|
1217
|
+
readonly 'flag-rule-shape': {
|
|
1218
|
+
readonly kind: "refused";
|
|
1219
|
+
readonly means: "a flag rule that is not `{ when, value }`, or whose `value` is not `true` or `false`";
|
|
1220
|
+
readonly fix: "`{ when: { … }, value: true }`";
|
|
1221
|
+
};
|
|
1222
|
+
readonly 'flag-rule-empty': {
|
|
1223
|
+
readonly kind: "warned";
|
|
1224
|
+
readonly means: "a flag rule with no conditions — skipped, never read as \"always\"";
|
|
1225
|
+
readonly fix: "give it a condition, or set the flag's `value` instead";
|
|
1226
|
+
};
|
|
1227
|
+
readonly 'flag-unused': {
|
|
1228
|
+
readonly kind: "warned";
|
|
1229
|
+
readonly means: "a declared flag nothing gates on and no template reads";
|
|
1230
|
+
readonly fix: "gate what it switches (`flag: 'x'`), or remove it once the feature has shipped";
|
|
1231
|
+
};
|
|
1232
|
+
readonly 'flow-empty': {
|
|
1233
|
+
readonly kind: "refused";
|
|
1234
|
+
readonly means: "a flow with no steps";
|
|
1235
|
+
readonly fix: "`[onClick(), setState({ … })]`";
|
|
1236
|
+
};
|
|
1237
|
+
readonly 'flow-without-trigger': {
|
|
1238
|
+
readonly kind: "refused";
|
|
1239
|
+
readonly means: "a flow whose first step is not the event that runs it";
|
|
1240
|
+
readonly fix: "`[onClick(), setState(…)]`";
|
|
1241
|
+
};
|
|
1242
|
+
readonly 'step-name': {
|
|
1243
|
+
readonly kind: "refused";
|
|
1244
|
+
readonly means: "a step name a later step cannot read as `{{ name.field }}`";
|
|
1245
|
+
readonly fix: "a letter first, then letters, digits, `-` and `_`";
|
|
1246
|
+
};
|
|
1247
|
+
readonly 'step-duplicate': {
|
|
1248
|
+
readonly kind: "refused";
|
|
1249
|
+
readonly means: "two steps with one name in a flow or an action";
|
|
1250
|
+
readonly fix: "a name each";
|
|
1251
|
+
};
|
|
1252
|
+
readonly 'step-type': {
|
|
1253
|
+
readonly kind: "refused";
|
|
1254
|
+
readonly means: "a step `type` that does not exist";
|
|
1255
|
+
readonly fix: "the step builders — `setState(…)`, `navigate(…)` — write it";
|
|
1256
|
+
};
|
|
1257
|
+
readonly 'step-params': {
|
|
1258
|
+
readonly kind: "refused";
|
|
1259
|
+
readonly means: "a step param that does not exist, or a value outside its options";
|
|
1260
|
+
readonly fix: "the params and values it lists";
|
|
1261
|
+
};
|
|
1262
|
+
readonly 'trigger-never-fired': {
|
|
1263
|
+
readonly kind: "refused";
|
|
1264
|
+
readonly means: "a flow on an event the element never fires";
|
|
1265
|
+
readonly fix: "the element that fires it; for a plugin, `declaredTrigger(declaration, 'onPick')`";
|
|
1266
|
+
};
|
|
1267
|
+
readonly 'trigger-keys': {
|
|
1268
|
+
readonly kind: "refused";
|
|
1269
|
+
readonly means: "an `onKey` shortcut that cannot fire: two keys at once, only modifiers, or a name that is not a key";
|
|
1270
|
+
readonly fix: "`onKey('f')`, `onKey('shift+f')`, `onKey('mod+k, escape')`";
|
|
1271
|
+
};
|
|
1272
|
+
readonly 'trigger-interval': {
|
|
1273
|
+
readonly kind: "refused";
|
|
1274
|
+
readonly means: "an `onInterval` that never ticks: not a whole number of milliseconds, or below 250";
|
|
1275
|
+
readonly fix: "`onInterval(5000)`";
|
|
1276
|
+
};
|
|
1277
|
+
readonly 'while-running': {
|
|
1278
|
+
readonly kind: "refused";
|
|
1279
|
+
readonly means: "`whileRunning` on a step that is not the trigger, or a mode other than `skip`, `parallel`, `queue`";
|
|
1280
|
+
readonly fix: "`[whileRunning('queue', onClick()), …]`";
|
|
1281
|
+
};
|
|
1282
|
+
readonly 'callback-not-answered': {
|
|
1283
|
+
readonly kind: "refused";
|
|
1284
|
+
readonly means: "a step sending an action the target element never answers to";
|
|
1285
|
+
readonly fix: "the element that answers it; for a plugin, `declaredCallback(declaration, 'reset', { on })`";
|
|
1286
|
+
};
|
|
1287
|
+
readonly 'callback-key-unknown': {
|
|
1288
|
+
readonly kind: "refused";
|
|
1289
|
+
readonly means: "a `setState` / `toggleState` on an element writing a field it does not have";
|
|
1290
|
+
readonly fix: "an attribute it lists, or for `category: 'state'` `visibility` / `styleSelectors.<selector>`";
|
|
1291
|
+
};
|
|
1292
|
+
readonly 'global-callback-undeclared': {
|
|
1293
|
+
readonly kind: "refused";
|
|
1294
|
+
readonly means: "a global-callback step builder naming an action no source declares";
|
|
1295
|
+
readonly fix: "one of the actions it lists";
|
|
1296
|
+
};
|
|
1297
|
+
readonly 'global-callback-module': {
|
|
1298
|
+
readonly kind: "refused";
|
|
1299
|
+
readonly means: "a global callback sent to a module other than the one that registers it";
|
|
1300
|
+
readonly fix: "the step builder, which knows the module";
|
|
1301
|
+
};
|
|
1302
|
+
readonly 'unknown-global-callback': {
|
|
1303
|
+
readonly kind: "warned";
|
|
1304
|
+
readonly means: "a global callback no built-in source declares — it runs only if something registers it";
|
|
1305
|
+
readonly fix: "the built-in it suggests, or make sure a plugin or module of the space registers it";
|
|
1306
|
+
};
|
|
1307
|
+
readonly 'utility-module': {
|
|
1308
|
+
readonly kind: "refused";
|
|
1309
|
+
readonly means: "a utility sent to a module — a utility takes none";
|
|
1310
|
+
readonly fix: "drop the `on`";
|
|
1311
|
+
};
|
|
1312
|
+
readonly 'unknown-utility': {
|
|
1313
|
+
readonly kind: "warned";
|
|
1314
|
+
readonly means: "a utility that is not one of the built-in ones";
|
|
1315
|
+
readonly fix: "one of the built-in utilities";
|
|
1316
|
+
};
|
|
1317
|
+
readonly 'state-key-has-runtime-prefix': {
|
|
1318
|
+
readonly kind: "warned";
|
|
1319
|
+
readonly means: "a state key written with `runtime.state.` in front — the state callbacks already write below it";
|
|
1320
|
+
readonly fix: "`key: 'cart'`, not `'runtime.state.cart'`";
|
|
1321
|
+
};
|
|
1322
|
+
readonly 'state-toggled-in-branches': {
|
|
1323
|
+
readonly kind: "warned";
|
|
1324
|
+
readonly means: "two `setState` of one key, each under a `when` on that key — the second flips back what the first wrote";
|
|
1325
|
+
readonly fix: "`toggleState({ key })`; for something shown by default, a key named for hiding it";
|
|
1326
|
+
};
|
|
1327
|
+
readonly 'form-value-compared-to-blank': {
|
|
1328
|
+
readonly kind: "warned";
|
|
1329
|
+
readonly means: "a `when` comparing a submitted field to `\"\"` — a field nobody typed in is not sent";
|
|
1330
|
+
readonly fix: "`operator: 'empty'` / `'notEmpty'`";
|
|
1331
|
+
};
|
|
1332
|
+
readonly 'action-without-entry': {
|
|
1333
|
+
readonly kind: "refused";
|
|
1334
|
+
readonly means: "an action with no way in, so nothing can start it";
|
|
1335
|
+
readonly fix: "a `trigger` — `{ type: 'call', access }`, or `render`, `webhook`, `custom`, `schedule`";
|
|
1336
|
+
};
|
|
1337
|
+
readonly 'action-without-steps': {
|
|
1338
|
+
readonly kind: "refused";
|
|
1339
|
+
readonly means: "an action with no steps";
|
|
1340
|
+
readonly fix: "the steps it runs";
|
|
1341
|
+
};
|
|
1342
|
+
readonly 'action-step-params': {
|
|
1343
|
+
readonly kind: "refused";
|
|
1344
|
+
readonly means: "a step with no params in an action whose ways in declare different inputs";
|
|
1345
|
+
readonly fix: "the step's params";
|
|
1346
|
+
};
|
|
1347
|
+
readonly 'channel-declaration': {
|
|
1348
|
+
readonly kind: "refused";
|
|
1349
|
+
readonly means: "a channel whose pattern or access the server cannot read";
|
|
1350
|
+
readonly fix: "what the message says: `{ access: { mode: 'public' } }`, a pattern like `room:{id}`";
|
|
1351
|
+
};
|
|
1352
|
+
readonly 'channel-topic': {
|
|
1353
|
+
readonly kind: "refused";
|
|
1354
|
+
readonly means: "a `channel` element with no topic";
|
|
1355
|
+
readonly fix: "a topic a channel of the space covers";
|
|
1356
|
+
};
|
|
1357
|
+
readonly 'channel-grant': {
|
|
1358
|
+
readonly kind: "refused";
|
|
1359
|
+
readonly means: "a topic of a private channel opened with no grant to it";
|
|
1360
|
+
readonly fix: "the grant the message names, or a public channel";
|
|
1361
|
+
};
|
|
1362
|
+
readonly 'control-without-name': {
|
|
1363
|
+
readonly kind: "warned";
|
|
1364
|
+
readonly means: "a button or a link with no words, or a field nothing names";
|
|
1365
|
+
readonly fix: "`title` on the button, `label` on the link, `label` (with `hideLabel: true`) on the field";
|
|
1366
|
+
};
|
|
1367
|
+
readonly 'embed-without-title': {
|
|
1368
|
+
readonly kind: "warned";
|
|
1369
|
+
readonly means: "an `embed` with no `title` — a frame a screen reader cannot describe";
|
|
1370
|
+
readonly fix: "say what it shows in `title`";
|
|
1371
|
+
};
|
|
1372
|
+
readonly 'image-without-alt': {
|
|
1373
|
+
readonly kind: "warned";
|
|
1374
|
+
readonly means: "an image that is not `decorative` and has no `alt`";
|
|
1375
|
+
readonly fix: "say what it shows, or `decorative: true`";
|
|
1376
|
+
};
|
|
1377
|
+
readonly 'click-on-static-element': {
|
|
1378
|
+
readonly kind: "warned";
|
|
1379
|
+
readonly means: "a click flow on a container, text, heading, image or list item — no keyboard reaches it";
|
|
1380
|
+
readonly fix: "the flow on a `button` (it holds children) or a `link`";
|
|
1381
|
+
};
|
|
1382
|
+
readonly 'heading-level-skipped': {
|
|
1383
|
+
readonly kind: "warned";
|
|
1384
|
+
readonly means: "an `h4` right after an `h2` — the outline misses a level";
|
|
1385
|
+
readonly fix: "the next level down; size it with its class";
|
|
1386
|
+
};
|
|
1387
|
+
readonly 'label-ignored': {
|
|
1388
|
+
readonly kind: "warned";
|
|
1389
|
+
readonly means: "a `label` on a container whose tag is named by what it holds (`li`, a heading)";
|
|
1390
|
+
readonly fix: "the words inside, or a landmark tag (`nav`, `section`…)";
|
|
1391
|
+
};
|
|
1392
|
+
readonly 'dropdown-without-control': {
|
|
1393
|
+
readonly kind: "warned";
|
|
1394
|
+
readonly means: "a dropdown opened from a box or an icon — no keyboard opens it";
|
|
1395
|
+
readonly fix: "a `button` as what opens it (`title` if it is only an icon)";
|
|
1396
|
+
};
|
|
1397
|
+
readonly 'control-in-decorative': {
|
|
1398
|
+
readonly kind: "warned";
|
|
1399
|
+
readonly means: "a control inside a `decorative` container — Tab lands on something nothing announces";
|
|
1400
|
+
readonly fix: "move it out of the illustration";
|
|
1401
|
+
};
|
|
1402
|
+
readonly 'repeated-on-pages': {
|
|
1403
|
+
readonly kind: "suggested";
|
|
1404
|
+
readonly means: "the same block — a header, a footer, a side panel — written into several pages";
|
|
1405
|
+
readonly fix: "a layout holding it once (`layouts`, and `layout: { id, slot }` on each page) — a component when only some pages of a layout carry it; a link marks its own page with the `current` state";
|
|
1406
|
+
};
|
|
1407
|
+
readonly 'repeated-shape': {
|
|
1408
|
+
readonly kind: "suggested";
|
|
1409
|
+
readonly means: "the same structure written again and again with different words — cards, rows, tiles";
|
|
1410
|
+
readonly fix: "a component with props (`components`, `component(id, { props })`), or one `list` when they are rows of data side by side — a few cards a person rewords on the canvas can stay cards";
|
|
1411
|
+
};
|
|
1412
|
+
readonly 'content-attribute': {
|
|
1413
|
+
readonly kind: "suggested";
|
|
1414
|
+
readonly means: "a button or a link whose children are only its words and an icon — a `text`, a `fontAwesome` — elements more than it needs";
|
|
1415
|
+
readonly fix: "its own `content` and `icon` (`link({ href, content: 'Docs', icon: 'fa-solid fa-arrow-right', iconPlacement: 'after' })`); the icon's class goes on the `icon` slot, and what the text's class adds on the box's class, never the class itself";
|
|
1416
|
+
};
|
|
1417
|
+
readonly 'custom-css-class': {
|
|
1418
|
+
readonly kind: "suggested";
|
|
1419
|
+
readonly means: "a `customCss` rule a class can hold — `.card:hover`, `.panel .icon`";
|
|
1420
|
+
readonly fix: "the class's own `states` or `ancestors`, where the style editor reads it back and a breakpoint can change it";
|
|
1421
|
+
};
|
|
1422
|
+
readonly 'custom-css-sdk-default': {
|
|
1423
|
+
readonly kind: "suggested";
|
|
1424
|
+
readonly means: "`customCss` repeating what the SDK already does for every space — less motion when asked, the theme toggle showing one icon";
|
|
1425
|
+
readonly fix: "nothing: remove it";
|
|
1426
|
+
};
|
|
1427
|
+
readonly 'custom-css-notifications': {
|
|
1428
|
+
readonly kind: "suggested";
|
|
1429
|
+
readonly means: "the toasts dressed with `.Toastify__toast` rules in `customCss`";
|
|
1430
|
+
readonly fix: "`notifications: { font, fontSize, border, shadow, padding, background, text, radius }`";
|
|
1431
|
+
};
|
|
1432
|
+
readonly 'heavy-animation': {
|
|
1433
|
+
readonly kind: "suggested";
|
|
1434
|
+
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";
|
|
1435
|
+
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]`";
|
|
1436
|
+
};
|
|
1437
|
+
};
|
|
1438
|
+
|
|
1439
|
+
export declare type AuthoringCode = keyof Codes;
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* Every problem `authorSpace` and `lintSpace` report, by its code: whether it is refused or warned, what was wrong, and
|
|
1443
|
+
* what to write instead — and every suggestion `suggestSpace` makes, a shorter way to the same page.
|
|
1444
|
+
*
|
|
1445
|
+
* The one table: a refusal or a warning raised with a code that is not here is a compile error, and the skill's
|
|
1446
|
+
* `authoring-errors.md` is generated from it (`yarn generate:authoring-errors`), so the page cannot miss one. The
|
|
1447
|
+
* UPPER_CASE codes beside these come from the documents' own structure (`validateSchema`) and only a hand-written or
|
|
1448
|
+
* hand-edited JSON has them — the three an authored space can meet are listed here too.
|
|
1449
|
+
*/
|
|
1450
|
+
export declare type AuthoringCodeEntry = {
|
|
1451
|
+
/**
|
|
1452
|
+
* Refused stops the space from being written; warned writes it, and says it will not do what it says; suggested is
|
|
1453
|
+
* not a problem at all — the page renders as written, and a shorter way to the same page exists.
|
|
1454
|
+
*/
|
|
1455
|
+
kind: 'refused' | 'warned' | 'suggested';
|
|
1456
|
+
/** What was wrong, in a line. */
|
|
1457
|
+
means: string;
|
|
1458
|
+
/** What to write instead. */
|
|
1459
|
+
fix: string;
|
|
1460
|
+
};
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* The row of a code a problem was reported with — what any tool that relays a problem adds to it (the MCP, the CLI),
|
|
1464
|
+
* so the fix travels with the code and nobody needs the skill's page to read it. `undefined` for a structural
|
|
1465
|
+
* UPPER_CASE code of `validateSchema` the table does not hold.
|
|
1466
|
+
*/
|
|
1467
|
+
export declare const authoringCodeEntry: (code: string) => AuthoringCodeEntry | undefined;
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* Every code of one kind as a Markdown table — code, what was wrong, what to write instead — for any page that explains
|
|
1471
|
+
* them: the skill's `authoring-errors.md` and the website's both render it, so neither can miss a code.
|
|
1472
|
+
*/
|
|
1473
|
+
export declare const authoringCodesTable: (kind: AuthoringCodeEntry["kind"]) => string;
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* A declaration `authorSpace` will not write, with the code its row in `authoring-errors.md` is filed under.
|
|
1477
|
+
*
|
|
1478
|
+
* `reason` is the sentence alone; `message` leads with the code, so an error that escapes on its own still says where
|
|
1479
|
+
* to look it up.
|
|
1480
|
+
*/
|
|
1481
|
+
export declare class AuthoringError extends Error {
|
|
1482
|
+
readonly code: RefusalCode;
|
|
1483
|
+
readonly reason: string;
|
|
1484
|
+
constructor(code: RefusalCode, reason: string, options?: ErrorOptions);
|
|
1485
|
+
}
|
|
1486
|
+
|
|
576
1487
|
/**
|
|
577
1488
|
* Authoring an element.
|
|
578
1489
|
*
|
|
@@ -593,10 +1504,10 @@ export declare interface AuthoringProps {
|
|
|
593
1504
|
*/
|
|
594
1505
|
id?: string;
|
|
595
1506
|
/**
|
|
596
|
-
* A shared class — a name from the space's `classes`, or a `styles()` declaration — or a list of them
|
|
597
|
-
* with {@link AuthoringProps.css}.
|
|
1507
|
+
* A shared class — a name from the space's `classes`, or a `styles()` declaration — or a list of them, which may end
|
|
1508
|
+
* with rules of this element's own on top: `[cover, { opacity: '0.25' }]`. Exclusive with {@link AuthoringProps.css}.
|
|
598
1509
|
*/
|
|
599
|
-
class?:
|
|
1510
|
+
class?: ElementClassList;
|
|
600
1511
|
/** Rules of this element's own: one set, or one per breakpoint. Shorthands are expanded when the space is written. */
|
|
601
1512
|
css?: CssSpec;
|
|
602
1513
|
/** How the element's own rules react — `hover`, `focus` — beside {@link AuthoringProps.css}. */
|
|
@@ -608,23 +1519,45 @@ export declare interface AuthoringProps {
|
|
|
608
1519
|
/** A class for one of the element's other selectors — a form control's `input`, `label`, `error`. */
|
|
609
1520
|
slots?: Record<string, ClassList>;
|
|
610
1521
|
/** `{ content: 'posts.title' }`, or the full form for state, transformers and conditions. */
|
|
611
|
-
bind?:
|
|
1522
|
+
bind?: BindingsInput;
|
|
1523
|
+
/** The source the element's main attribute shows — see {@link ElementSpec.from}. */
|
|
1524
|
+
from?: SourceName;
|
|
1525
|
+
/** How `from` is shown: a name of the space's `formats`, or a template of its own. */
|
|
1526
|
+
as?: string;
|
|
1527
|
+
/**
|
|
1528
|
+
* A list's row — what it renders once per item: a component's id, placed with the row bound to its `item` prop, or
|
|
1529
|
+
* a function handed the row's names (`r.item`, `r.index`, and `r.inTemplate` for a template) returning the elements.
|
|
1530
|
+
*/
|
|
1531
|
+
row?: string | RowWriter<ListRow>;
|
|
612
1532
|
/**
|
|
613
1533
|
* Show this element only while the value at this source is true. `!source` shows it while the value is false,
|
|
614
1534
|
* `{ source, template }` while a template over it says `true`, and `false` starts it hidden for a flow to reveal.
|
|
615
1535
|
*/
|
|
616
|
-
visible?:
|
|
1536
|
+
visible?: SourceName | false | VisibleInput;
|
|
617
1537
|
/** One flow per entry; steps are chained in the order written. */
|
|
618
1538
|
flows?: StepSpec[][];
|
|
619
1539
|
/** `server` resolves this element's data on the server rather than in the browser. */
|
|
620
1540
|
runtime?: ElementRuntime;
|
|
621
1541
|
/** When the element's contents mount relative to its visibility. Left out, the element type decides. */
|
|
622
1542
|
loadStrategy?: ElementLoadStrategy;
|
|
1543
|
+
/** Its `id` in the DOM, so `/page#anchor` lands on it. One per page; not inside a list row or a component. */
|
|
1544
|
+
anchor?: string;
|
|
1545
|
+
/** The feature flag it exists under: `'newCheckout'` while on, `'!newCheckout'` while off. Not a visibility. */
|
|
1546
|
+
flag?: string;
|
|
623
1547
|
children?: ElementSpec[];
|
|
624
1548
|
/** What the builder shows, not what the runtime reads. */
|
|
625
1549
|
meta?: SpecMeta;
|
|
626
1550
|
}
|
|
627
1551
|
|
|
1552
|
+
/**
|
|
1553
|
+
* `authorSnippet`, holding the same vocabularies — the artefact you publish when you are not building a space.
|
|
1554
|
+
*
|
|
1555
|
+
* A snippet is a subtree hosted as a JSON and dragged onto someone else's canvas, so the checks that matter are
|
|
1556
|
+
* the ones about what does NOT travel with it: a class it names but does not carry, a binding onto a provider that
|
|
1557
|
+
* stayed behind. Those are the assembly half's; what this adds is the catalog that tells a real source from a typo.
|
|
1558
|
+
*/
|
|
1559
|
+
export declare const authorSnippet: (spec: SnippetSpec, options?: AuthorSpaceOptions) => AuthoredSnippet;
|
|
1560
|
+
|
|
628
1561
|
/**
|
|
629
1562
|
* `authorSpace`, holding this SDK's own vocabularies — and each plugin handed in as `plugins`, held to its declaration.
|
|
630
1563
|
*
|
|
@@ -659,6 +1592,8 @@ export declare interface AuthorSpaceOptions {
|
|
|
659
1592
|
slotNames?: Record<string, readonly string[]>;
|
|
660
1593
|
/** Element type → the type it only works inside. Left out, a sub-element is placed wherever it is written. */
|
|
661
1594
|
ancestorTypes?: Record<string, string>;
|
|
1595
|
+
/** Element type → the parts it renders through, each a child it needs. Left out, a compound type is never checked. */
|
|
1596
|
+
partTypes?: Record<string, readonly string[]>;
|
|
662
1597
|
/**
|
|
663
1598
|
* Element type → the attributes its component reads, `null` for one that reads any. Left out, an attribute
|
|
664
1599
|
* nothing reads is written without a word.
|
|
@@ -701,18 +1636,14 @@ export declare interface AuthorSpaceOptions {
|
|
|
701
1636
|
}>>;
|
|
702
1637
|
}
|
|
703
1638
|
|
|
704
|
-
/**
|
|
705
|
-
* `authorTemplate`, holding the same vocabularies — the artefact you publish when you are not building a space.
|
|
706
|
-
*
|
|
707
|
-
* A template is a subtree hosted as a JSON and dragged onto someone else's canvas, so the checks that matter are
|
|
708
|
-
* the ones about what does NOT travel with it: a class it names but does not carry, a binding onto a provider that
|
|
709
|
-
* stayed behind. Those are the assembly half's; what this adds is the catalog that tells a real source from a typo.
|
|
710
|
-
*/
|
|
711
|
-
export declare const authorTemplate: (spec: TemplateSpec, options?: AuthorSpaceOptions) => AuthoredTemplate;
|
|
712
|
-
|
|
713
1639
|
export declare const authRefreshDetails: () => StepSpec;
|
|
714
1640
|
|
|
715
|
-
declare type BindingCategory = 'attributes' | 'style' | 'initialState';
|
|
1641
|
+
export declare type BindingCategory = 'attributes' | 'style' | 'initialState';
|
|
1642
|
+
|
|
1643
|
+
/** A binding whose source may be a typed source's path as well as a name. */
|
|
1644
|
+
export declare type BindingsInput = Record<string, SourceName> | (Omit<BindingSpec, 'source'> & {
|
|
1645
|
+
source: SourceName;
|
|
1646
|
+
})[];
|
|
716
1647
|
|
|
717
1648
|
export declare interface BindingSpec {
|
|
718
1649
|
/** Attribute, style property or state key that receives the value. */
|
|
@@ -740,7 +1671,7 @@ export declare interface BindingSpec {
|
|
|
740
1671
|
*/
|
|
741
1672
|
export declare type BindingsSpec = Record<string, string> | BindingSpec[];
|
|
742
1673
|
|
|
743
|
-
declare type BindingTransformer = {
|
|
1674
|
+
export declare type BindingTransformer = {
|
|
744
1675
|
action: string;
|
|
745
1676
|
/**
|
|
746
1677
|
* Mostly text, and not only: a param the builder draws as a checkbox (`styleVariant`'s `append`) is stored as the
|
|
@@ -826,6 +1757,12 @@ declare type BlockJsxProps = {
|
|
|
826
1757
|
/** The breakpoints a rule set can be written for, widest first — the order they cascade in. */
|
|
827
1758
|
export declare const BREAKPOINTS: DisplayMode[];
|
|
828
1759
|
|
|
1760
|
+
/**
|
|
1761
|
+
* The builder of an action whose builder is not named after it. Checked by a test against the exports, so a renamed
|
|
1762
|
+
* builder breaks the build rather than this answer.
|
|
1763
|
+
*/
|
|
1764
|
+
export declare const BUILDER_NAMES: Record<string, string>;
|
|
1765
|
+
|
|
829
1766
|
export declare const buildHandles: (pages: Record<string, PageHandle>, layouts?: Record<string, LayoutHandle>) => SpaceHandles;
|
|
830
1767
|
|
|
831
1768
|
export declare const BUILTIN_ELEMENT_CALLBACKS: Record<string, BuiltinElementCallback>;
|
|
@@ -923,7 +1860,9 @@ export declare const button: ElementFactory<Partial<{
|
|
|
923
1860
|
title?: string | undefined;
|
|
924
1861
|
content?: string | undefined;
|
|
925
1862
|
disabled?: boolean | undefined;
|
|
1863
|
+
icon?: string | undefined;
|
|
926
1864
|
subType?: "button" | "submit" | "reset" | undefined;
|
|
1865
|
+
iconPlacement?: IconPlacement | undefined;
|
|
927
1866
|
contentPlacement?: "before" | "after" | undefined;
|
|
928
1867
|
ariaExpanded?: boolean | undefined;
|
|
929
1868
|
ariaPressed?: boolean | undefined;
|
|
@@ -935,6 +1874,83 @@ export declare const cancelServerAction: (params: {
|
|
|
935
1874
|
runId: string;
|
|
936
1875
|
}) => StepSpec;
|
|
937
1876
|
|
|
1877
|
+
/**
|
|
1878
|
+
* A carousel's `items` may name the source its slides come from, as a list's may: `carousel({ id: 'hero', items:
|
|
1879
|
+
* 'site.data.slides', row: r => … })` writes the slide into a `carouselTrack`, and its `children` are the controls.
|
|
1880
|
+
*/
|
|
1881
|
+
export declare const carousel: {
|
|
1882
|
+
(props?: ElementProps<Omit<Partial<{
|
|
1883
|
+
mode?: CarouselMode | undefined;
|
|
1884
|
+
label?: string | undefined;
|
|
1885
|
+
items?: unknown[] | undefined;
|
|
1886
|
+
speed?: number | undefined;
|
|
1887
|
+
loop?: boolean | undefined;
|
|
1888
|
+
autoplay?: number | undefined;
|
|
1889
|
+
pauseOnHover?: boolean | undefined;
|
|
1890
|
+
transition?: CarouselTransition | undefined;
|
|
1891
|
+
itemKey?: string | undefined;
|
|
1892
|
+
}>, "items"> & {
|
|
1893
|
+
items?: CarouselAttributes["items"] | SourceName;
|
|
1894
|
+
}> | undefined): ElementSpec;
|
|
1895
|
+
(children: ElementSpec[], props?: ElementProps<Omit<Partial<{
|
|
1896
|
+
mode?: CarouselMode | undefined;
|
|
1897
|
+
label?: string | undefined;
|
|
1898
|
+
items?: unknown[] | undefined;
|
|
1899
|
+
speed?: number | undefined;
|
|
1900
|
+
loop?: boolean | undefined;
|
|
1901
|
+
autoplay?: number | undefined;
|
|
1902
|
+
pauseOnHover?: boolean | undefined;
|
|
1903
|
+
transition?: CarouselTransition | undefined;
|
|
1904
|
+
itemKey?: string | undefined;
|
|
1905
|
+
}>, "items"> & {
|
|
1906
|
+
items?: CarouselAttributes["items"] | SourceName;
|
|
1907
|
+
}> | undefined): ElementSpec;
|
|
1908
|
+
};
|
|
1909
|
+
|
|
1910
|
+
declare type CarouselAttributes = AttributesOf<typeof elementDeclarations.Carousel>;
|
|
1911
|
+
|
|
1912
|
+
/**
|
|
1913
|
+
* The carousel `target` shows the slide at `index`, from 0 — a dot's own row: `carouselGoTo('hero', '{{ list_dots.index }}')`.
|
|
1914
|
+
*/
|
|
1915
|
+
export declare const carouselGoTo: (target: string, index: number | string) => StepSpec;
|
|
1916
|
+
|
|
1917
|
+
declare type CarouselMode = 'slide' | 'marquee' | 'scroll';
|
|
1918
|
+
|
|
1919
|
+
/** The carousel `target` shows its next slide — round to the first after the last when it loops. */
|
|
1920
|
+
export declare const carouselNext: (target: string) => StepSpec;
|
|
1921
|
+
|
|
1922
|
+
/** The carousel `target` stops moving by itself until it is told to play. */
|
|
1923
|
+
export declare const carouselPause: (target: string) => StepSpec;
|
|
1924
|
+
|
|
1925
|
+
/** The carousel `target` moves on by itself again, every `autoplay` milliseconds. */
|
|
1926
|
+
export declare const carouselPlay: (target: string) => StepSpec;
|
|
1927
|
+
|
|
1928
|
+
/** The carousel `target` shows its previous slide; the slide enters from the left. */
|
|
1929
|
+
export declare const carouselPrevious: (target: string) => StepSpec;
|
|
1930
|
+
|
|
1931
|
+
export declare const carouselTrack: {
|
|
1932
|
+
(props?: AuthoringProps | undefined): ElementSpec;
|
|
1933
|
+
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
1934
|
+
};
|
|
1935
|
+
|
|
1936
|
+
declare type CarouselTransition = 'slide' | 'fade' | 'none';
|
|
1937
|
+
|
|
1938
|
+
/** The name and address the catalog template is written under — what a copy under another name replaces. */
|
|
1939
|
+
export declare const CATALOG_TEMPLATE_IDENTITY: {
|
|
1940
|
+
readonly name: "Catalog";
|
|
1941
|
+
readonly permanentUrl: "catalog";
|
|
1942
|
+
};
|
|
1943
|
+
|
|
1944
|
+
/**
|
|
1945
|
+
* The catalog template as a project's files, by path: a shop with a layout, a product card, a home, a filtered
|
|
1946
|
+
* catalog and a page per product, its data in `public/data/products.json` — a file per part, as a space bigger than
|
|
1947
|
+
* one screen is written. The files are the template's own (`templates/catalog`), the ones its test authors; they
|
|
1948
|
+
* import `@plitzi/sdk-authoring` by name already, so the copy is the file.
|
|
1949
|
+
*/
|
|
1950
|
+
export declare const catalogTemplateFiles: ({ name }?: {
|
|
1951
|
+
name?: string;
|
|
1952
|
+
}) => Record<string, string>;
|
|
1953
|
+
|
|
938
1954
|
export declare const channel: {
|
|
939
1955
|
(props?: ElementProps<Partial<{
|
|
940
1956
|
subType?: "" | "div" | "section" | "aside" | "main" | undefined;
|
|
@@ -958,7 +1974,7 @@ export declare const channel: {
|
|
|
958
1974
|
* A topic no pattern of the space matches is refused, by the server and at authoring: a page cannot open a channel
|
|
959
1975
|
* nobody decided should exist.
|
|
960
1976
|
*/
|
|
961
|
-
declare type ChannelDeclaration = {
|
|
1977
|
+
export declare type ChannelDeclaration = {
|
|
962
1978
|
/** Who may subscribe and publish — the access vocabulary actions use. */
|
|
963
1979
|
access: ActionAccess;
|
|
964
1980
|
/**
|
|
@@ -981,7 +1997,7 @@ declare type ChannelDeclaration = {
|
|
|
981
1997
|
messagesPerSecond?: number;
|
|
982
1998
|
};
|
|
983
1999
|
|
|
984
|
-
declare type ChannelDeclarations = Record<string, ChannelDeclaration>;
|
|
2000
|
+
export declare type ChannelDeclarations = Record<string, ChannelDeclaration>;
|
|
985
2001
|
|
|
986
2002
|
/**
|
|
987
2003
|
* The classes a selector wears: one, or several.
|
|
@@ -1019,13 +2035,15 @@ export declare const closeDialog: (target: string) => StepSpec;
|
|
|
1019
2035
|
/** Closes a `modalContainer`, by id — from a button inside it or anywhere else. */
|
|
1020
2036
|
export declare const closeModal: (target: string) => StepSpec;
|
|
1021
2037
|
|
|
2038
|
+
declare type Codes = typeof AUTHORING_CODES;
|
|
2039
|
+
|
|
1022
2040
|
/**
|
|
1023
2041
|
* The answer, once `system` has been put to the machine: what is actually on screen.
|
|
1024
2042
|
*
|
|
1025
2043
|
* Every consumer that paints something wants this one — a code editor, a chart, the dev-tools panel. `theme` is
|
|
1026
2044
|
* the CHOICE and can be `system`, which is not a colour and cannot be compared against one.
|
|
1027
2045
|
*/
|
|
1028
|
-
declare type ColorScheme = Exclude<Theme, 'system'>;
|
|
2046
|
+
export declare type ColorScheme = Exclude<Theme, 'system'>;
|
|
1029
2047
|
|
|
1030
2048
|
/**
|
|
1031
2049
|
* The three layouts every space writes over and over.
|
|
@@ -1037,6 +2055,9 @@ export declare const column: (gap: string, extra?: CssProps) => StyleRules;
|
|
|
1037
2055
|
|
|
1038
2056
|
declare type Combinator = 'and' | 'or';
|
|
1039
2057
|
|
|
2058
|
+
/** Two pictures compared in a page the driver holds — any page will do, nothing of it is read. */
|
|
2059
|
+
export declare const comparePictures: (driver: PictureDriver, a: string, b: string, regions?: PictureRegion[], tolerance?: number) => Promise<PictureDiff>;
|
|
2060
|
+
|
|
1040
2061
|
/** Every observable way `actual` differs from `expected`. Empty means they render the same space. */
|
|
1041
2062
|
export declare const compareSpaces: (expected: SpaceDocuments, actual: SpaceDocuments) => SpaceDifference[];
|
|
1042
2063
|
|
|
@@ -1068,7 +2089,7 @@ export declare type ComponentInstanceProps = Pick<AuthoringProps, 'id' | 'class'
|
|
|
1068
2089
|
* A prop a component declares, as the document stores it: the part of a `BuiltinParam` that survives JSON — no `when`
|
|
1069
2090
|
* guard and no `builderType` worked out from other params, which are functions and only ever live in code.
|
|
1070
2091
|
*/
|
|
1071
|
-
declare type ComponentProp = Pick<BuiltinParam, 'type' | 'description' | 'default' | 'options' | 'required' | 'label' | 'optionLabels' | 'elementType'>;
|
|
2092
|
+
export declare type ComponentProp = Pick<BuiltinParam, 'type' | 'description' | 'default' | 'options' | 'required' | 'label' | 'optionLabels' | 'elementType'>;
|
|
1072
2093
|
|
|
1073
2094
|
/**
|
|
1074
2095
|
* A reusable subtree of the space: written once, placed anywhere with {@link component}, and published, versioned and
|
|
@@ -1111,12 +2132,12 @@ export declare interface ComponentSpec {
|
|
|
1111
2132
|
export declare const container: {
|
|
1112
2133
|
(props?: ElementProps<Partial<{
|
|
1113
2134
|
label?: string | undefined;
|
|
1114
|
-
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
2135
|
+
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | undefined;
|
|
1115
2136
|
decorative?: boolean | undefined;
|
|
1116
2137
|
}>> | undefined): ElementSpec;
|
|
1117
2138
|
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
1118
2139
|
label?: string | undefined;
|
|
1119
|
-
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
2140
|
+
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | undefined;
|
|
1120
2141
|
decorative?: boolean | undefined;
|
|
1121
2142
|
}>> | undefined): ElementSpec;
|
|
1122
2143
|
};
|
|
@@ -1125,7 +2146,27 @@ declare type ContentShorthand<A> = 'content' extends keyof A ? {
|
|
|
1125
2146
|
(content: string, props?: ElementProps<A>): ElementSpec;
|
|
1126
2147
|
} : unknown;
|
|
1127
2148
|
|
|
1128
|
-
|
|
2149
|
+
/**
|
|
2150
|
+
* A `tw()` with colours of its own: `createTw({ colors: tokens(variables) })` makes `bg-surface` the space's token.
|
|
2151
|
+
*
|
|
2152
|
+
* `tw('flex items-center gap-2 px-5 py-2 rounded-full bg-slate-950/90 hover:scale-105 md:text-sm')` is the rules those
|
|
2153
|
+
* classes mean, written out when the space is — nothing of Tailwind runs in the page. Tailwind's breakpoints become
|
|
2154
|
+
* Plitzi's (`md:` tablet and desktop, `lg:` desktop, `max-md:` mobile, `max-lg:` tablet and mobile), its states the
|
|
2155
|
+
* class's states, `group-hover/<class>:` how it looks inside an ancestor wearing that class. A class Tailwind does not
|
|
2156
|
+
* have, or one with no exact equivalent here (`sm:`, `dark:`, `space-x-4`), is refused with what to write instead.
|
|
2157
|
+
*/
|
|
2158
|
+
export declare const createTw: ({ colors }?: TwOptions) => Tw;
|
|
2159
|
+
|
|
2160
|
+
export declare const css: (input: CssProps) => StyleRules;
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* Plain rules as an author writes them: kebab-case or camelCase keys (`paddingTop`), a bare number for a length in
|
|
2164
|
+
* pixels (`gap: 16`), and a property that changes on another breakpoint given a value per breakpoint in place.
|
|
2165
|
+
*/
|
|
2166
|
+
export declare type CssInput = Record<string, StyleValue | ResponsiveValue>;
|
|
2167
|
+
|
|
2168
|
+
/** A number written as a value, as CSS reads it: itself where a bare number is a whole value, pixels otherwise. */
|
|
2169
|
+
export declare const cssNumberValue: (property: string, value: number) => string | number;
|
|
1129
2170
|
|
|
1130
2171
|
/** The patch flavour of {@link CssProps}: `null` clears every longhand the key controls. */
|
|
1131
2172
|
export declare type CssPatch = Record<string, StyleValue | null>;
|
|
@@ -1134,6 +2175,13 @@ export declare type CssPatch = Record<string, StyleValue | null>;
|
|
|
1134
2175
|
* exact keys — camelCase or unknown keys are rejected. */
|
|
1135
2176
|
export declare const cssProperties: string[];
|
|
1136
2177
|
|
|
2178
|
+
/**
|
|
2179
|
+
* A property as an author may write it, in the spelling the document keeps: kebab-case already, or camelCase the way a
|
|
2180
|
+
* React style object writes it — `paddingTop` is `padding-top`, `WebkitLineClamp` is `-webkit-line-clamp`. A custom
|
|
2181
|
+
* property (`--brand`) is the author's own spelling and is kept.
|
|
2182
|
+
*/
|
|
2183
|
+
export declare const cssPropertyName: (key: string) => string;
|
|
2184
|
+
|
|
1137
2185
|
/**
|
|
1138
2186
|
* The two shapes CSS has while a space is being authored.
|
|
1139
2187
|
*
|
|
@@ -1156,7 +2204,7 @@ export declare const cssShorthands: string[];
|
|
|
1156
2204
|
* properties and never will be, so a rule set that mentions one is per-breakpoint and one that does not is the
|
|
1157
2205
|
* desktop rules.
|
|
1158
2206
|
*/
|
|
1159
|
-
export declare type CssSpec =
|
|
2207
|
+
export declare type CssSpec = CssInput | ResponsiveCss;
|
|
1160
2208
|
|
|
1161
2209
|
export declare const custom: ElementFactory<CustomAttributes>;
|
|
1162
2210
|
|
|
@@ -1177,6 +2225,24 @@ declare type CustomProps = {
|
|
|
1177
2225
|
scriptUrl?: string;
|
|
1178
2226
|
};
|
|
1179
2227
|
|
|
2228
|
+
/**
|
|
2229
|
+
* Moves a number in state round a cycle of `length` — the slide after the last is the first, the one before the first
|
|
2230
|
+
* the last: `cycleState({ key: 'slide', length: 3 })` is "next", `by: -1` "previous". `length` is a number, or an
|
|
2231
|
+
* expression for one (`'apiContainer_site.data.slides|length'`). The same `setState` written out, without the
|
|
2232
|
+
* arithmetic in a template.
|
|
2233
|
+
*/
|
|
2234
|
+
export declare const cycleState: (params: {
|
|
2235
|
+
key: string;
|
|
2236
|
+
length: StepNumber;
|
|
2237
|
+
by?: StepNumber;
|
|
2238
|
+
}) => StepSpec;
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* What the dark scheme changes, from a probe of it that read the light probe's colour samples again — or nothing,
|
|
2242
|
+
* when the page looks the same in both and has no dark scheme of its own.
|
|
2243
|
+
*/
|
|
2244
|
+
export declare const darkScheme: (light: ImportProbe, dark: ImportProbe) => ImportedDark | undefined;
|
|
2245
|
+
|
|
1180
2246
|
declare type DeclarationByType = {
|
|
1181
2247
|
[Name in keyof typeof elementDeclarations as (typeof elementDeclarations)[Name]['type']]: (typeof elementDeclarations)[Name];
|
|
1182
2248
|
};
|
|
@@ -1233,6 +2299,50 @@ export declare const defineElement: <A = Record<string, unknown>>(declaration: E
|
|
|
1233
2299
|
/** Milliseconds. The param is `time` — not `delay`, `duration` or `ms`, any of which waits zero. */
|
|
1234
2300
|
export declare const delay: (time: number) => StepSpec;
|
|
1235
2301
|
|
|
2302
|
+
/** Anything that can run a function in a browser page — Playwright's `Page`, Puppeteer's. */
|
|
2303
|
+
export declare interface DevToolsDriver {
|
|
2304
|
+
evaluate<R, A>(fn: (input: A) => R | Promise<R>, input: A): Promise<R>;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
/** A flow that ran: what fired it, on what, how it ended, and its steps. */
|
|
2308
|
+
export declare interface DevToolsFlow {
|
|
2309
|
+
at: string;
|
|
2310
|
+
trigger: string;
|
|
2311
|
+
on?: string;
|
|
2312
|
+
status: string;
|
|
2313
|
+
ms: number;
|
|
2314
|
+
steps: DevToolsFlowStep[];
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
/**
|
|
2318
|
+
* What the page's dev tools know, read from the page in text: the flows that ran — the failed ones above all — the
|
|
2319
|
+
* state, the sources and one element. The dev tools publish it on `window.__plitzi` while they are on (debug mode,
|
|
2320
|
+
* any development server); a page without them answers nothing, and says so.
|
|
2321
|
+
*/
|
|
2322
|
+
/** One step of a flow that ran, as the dev tools tell it. */
|
|
2323
|
+
export declare interface DevToolsFlowStep {
|
|
2324
|
+
title: string;
|
|
2325
|
+
action: string;
|
|
2326
|
+
status: string;
|
|
2327
|
+
ms: number;
|
|
2328
|
+
error?: string;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
export declare interface DevToolsInput {
|
|
2332
|
+
state: boolean;
|
|
2333
|
+
element?: string;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
export declare interface DevToolsReport {
|
|
2337
|
+
/** Whether the page had its dev tools on — without them there is nothing to read. */
|
|
2338
|
+
available: boolean;
|
|
2339
|
+
flows: DevToolsFlow[];
|
|
2340
|
+
state?: unknown;
|
|
2341
|
+
/** Every source by its full name, with the shape of what it holds now. */
|
|
2342
|
+
sources?: Record<string, unknown>;
|
|
2343
|
+
element?: unknown;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
1236
2346
|
export declare const dialogContainer: {
|
|
1237
2347
|
(props?: ElementProps<Partial<{
|
|
1238
2348
|
headerLabel: string;
|
|
@@ -1250,6 +2360,9 @@ export declare const dialogContainer: {
|
|
|
1250
2360
|
}>> | undefined): ElementSpec;
|
|
1251
2361
|
};
|
|
1252
2362
|
|
|
2363
|
+
/** Runs in the page: both pictures decoded on canvases, compared pixel by pixel. Self-contained — it is serialised. */
|
|
2364
|
+
export declare const diffPictures: ({ a, b, regions, tolerance }: PictureDiffInput) => Promise<PictureDiff>;
|
|
2365
|
+
|
|
1253
2366
|
/**
|
|
1254
2367
|
* Deterministic hex digest, in plain TypeScript. What names a style selector — never an element, a page or a step:
|
|
1255
2368
|
* those answer to names a person reads.
|
|
@@ -1261,7 +2374,7 @@ export declare const dialogContainer: {
|
|
|
1261
2374
|
*/
|
|
1262
2375
|
export declare const digest: (value: string, length: number) => string;
|
|
1263
2376
|
|
|
1264
|
-
declare type DisplayMode = 'desktop' | 'tablet' | 'mobile';
|
|
2377
|
+
export declare type DisplayMode = 'desktop' | 'tablet' | 'mobile';
|
|
1265
2378
|
|
|
1266
2379
|
/** Checks that need no space: what any rendered page owes, whoever wrote it. */
|
|
1267
2380
|
export declare type DocumentChecks = Pick<InspectOptions, 'skip' | 'timeout'>;
|
|
@@ -1318,6 +2431,7 @@ declare type Element_2<TAttributes extends Record<string, unknown> = Record<stri
|
|
|
1318
2431
|
};
|
|
1319
2432
|
definition: ElementDefinition;
|
|
1320
2433
|
};
|
|
2434
|
+
export { Element_2 as Element }
|
|
1321
2435
|
|
|
1322
2436
|
/**
|
|
1323
2437
|
* Every field of an element spec, in the order the emitter writes them.
|
|
@@ -1326,7 +2440,7 @@ declare type Element_2<TAttributes extends Record<string, unknown> = Record<stri
|
|
|
1326
2440
|
* export drops without a word. `specFields.test.ts` refuses to compile until it is listed here — and once it is, it is
|
|
1327
2441
|
* written like any other, so growing the authoring surface needs nothing more from the emitter than this line.
|
|
1328
2442
|
*/
|
|
1329
|
-
export declare const ELEMENT_FIELDS: readonly ["type", "id", "attributes", "class", "css", "states", "selector", "variant", "slots", "bind", "visible", "flows", "runtime", "loadStrategy", "meta", "children"];
|
|
2443
|
+
export declare const ELEMENT_FIELDS: readonly ["type", "id", "attributes", "class", "css", "states", "selector", "variant", "slots", "bind", "from", "as", "row", "visible", "flows", "runtime", "loadStrategy", "anchor", "flag", "meta", "children"];
|
|
1330
2444
|
|
|
1331
2445
|
/** The sub-elements that only work inside another type, and that type — see `ElementDeclarationData.ancestorType`. */
|
|
1332
2446
|
export declare const elementAncestorTypes: Record<string, string>;
|
|
@@ -1338,24 +2452,27 @@ export declare const elementAncestorTypes: Record<string, string>;
|
|
|
1338
2452
|
* a builder that has since moved on, and nothing renders it.
|
|
1339
2453
|
*/
|
|
1340
2454
|
export declare const elementAttributeNames: {
|
|
1341
|
-
readonly apiContainer: readonly ["accessToken", "action", "cache", "connector", "credentials", "endpoint", "filters", "gcTime", "headers", "input", "limit", "method", "mockData", "pageParam", "pagination", "query", "refreshSeconds", "renderWhileLoading", "resource", "singleRecord", "staleTime", "subType", "when"];
|
|
2455
|
+
readonly apiContainer: readonly ["accessToken", "action", "cache", "connector", "credentials", "endpoint", "filters", "gcTime", "headers", "input", "limit", "loadingSlot", "method", "mockData", "pageParam", "pagination", "query", "refreshSeconds", "renderWhileLoading", "resource", "singleRecord", "staleTime", "subType", "when"];
|
|
1342
2456
|
readonly blockHtml: readonly ["content"];
|
|
1343
2457
|
readonly blockJsx: readonly ["allowEmptyRender", "content", "contentCache", "props"];
|
|
1344
|
-
readonly button: readonly ["ariaExpanded", "ariaPressed", "content", "contentPlacement", "disabled", "label", "subType", "title"];
|
|
2458
|
+
readonly button: readonly ["ariaExpanded", "ariaPressed", "content", "contentPlacement", "disabled", "icon", "iconPlacement", "label", "subType", "title"];
|
|
2459
|
+
readonly carousel: readonly ["autoplay", "itemKey", "items", "label", "loop", "mode", "pauseOnHover", "speed", "transition"];
|
|
2460
|
+
readonly carouselTrack: readonly [];
|
|
1345
2461
|
readonly channel: readonly ["grant", "keep", "presence", "subType", "topic"];
|
|
1346
2462
|
readonly container: readonly ["decorative", "label", "subType"];
|
|
1347
2463
|
readonly custom: null;
|
|
1348
2464
|
readonly dialogContainer: readonly ["acceptButtonLabel", "acceptButtonLabelLoading", "autoHideAfterClick", "headerLabel", "rejectButtonLabel"];
|
|
1349
2465
|
readonly dropdown: readonly ["backgroundDisabled", "closeOnClickBackground", "closeOnClickPopup", "containerLeftOffset", "containerTopOffset", "disabled", "openPopup", "popupPlacement"];
|
|
1350
2466
|
readonly dropdownPopup: readonly [];
|
|
2467
|
+
readonly embed: readonly ["allow", "loading", "referrerPolicy", "sandbox", "src", "title"];
|
|
1351
2468
|
readonly fontAwesome: readonly ["icon", "iconAnimation", "label", "size"];
|
|
1352
2469
|
readonly form: readonly ["actionUrl", "errors", "managedByInteractions", "method", "noValidate", "values"];
|
|
1353
2470
|
readonly formControl: readonly ["autoComplete", "autoFocus", "defaultValue", "disabled", "formatMessage", "hideLabel", "label", "matches", "matchesMessage", "maxLength", "maxLengthMessage", "minLength", "minLengthMessage", "name", "options", "pattern", "patternMessage", "placeholder", "previewError", "readOnly", "required", "requiredMessage", "subType"];
|
|
1354
2471
|
readonly heading: readonly ["content", "subType"];
|
|
1355
|
-
readonly image: readonly ["alt", "decorative", "fetchPriority", "loadMode", "src"];
|
|
2472
|
+
readonly image: readonly ["alt", "decorative", "fetchPriority", "height", "loadMode", "sizes", "src", "width"];
|
|
1356
2473
|
readonly layoutContainer: readonly ["layout", "layoutContainer", "subType"];
|
|
1357
|
-
readonly link: readonly ["href", "label", "mode", "target"];
|
|
1358
|
-
readonly list: readonly ["items", "source", "subType"];
|
|
2474
|
+
readonly link: readonly ["content", "contentPlacement", "hash", "href", "icon", "iconPlacement", "label", "mode", "target"];
|
|
2475
|
+
readonly list: readonly ["itemKey", "items", "source", "subType"];
|
|
1359
2476
|
readonly listItem: readonly [];
|
|
1360
2477
|
readonly loading: readonly [];
|
|
1361
2478
|
readonly markdown: readonly ["content"];
|
|
@@ -1367,6 +2484,7 @@ export declare const elementAttributeNames: {
|
|
|
1367
2484
|
readonly paragraph: readonly ["content"];
|
|
1368
2485
|
readonly reference: readonly ["referenceId", "referenceType"];
|
|
1369
2486
|
readonly richText: readonly ["content", "format", "mediaBaseUrl"];
|
|
2487
|
+
readonly svg: readonly ["content", "label"];
|
|
1370
2488
|
readonly tabContainer: readonly [];
|
|
1371
2489
|
readonly tabContainerBody: readonly [];
|
|
1372
2490
|
readonly tabContainerHeader: readonly [];
|
|
@@ -1396,7 +2514,7 @@ export declare interface ElementAttributesBrand<A> {
|
|
|
1396
2514
|
/** The values each built-in type's enumerated attributes take — a heading's `subType`, a link's `mode`. */
|
|
1397
2515
|
export declare const elementAttributeValues: Record<string, Record<string, readonly string[]>>;
|
|
1398
2516
|
|
|
1399
|
-
declare type ElementBinding = {
|
|
2517
|
+
export declare type ElementBinding = {
|
|
1400
2518
|
id: string;
|
|
1401
2519
|
source: string;
|
|
1402
2520
|
transformers?: BindingTransformer[];
|
|
@@ -1417,6 +2535,15 @@ export declare const elementCallbacks: Record<string, string[]>;
|
|
|
1417
2535
|
/** Keyed by the schema `type`, which is what a document and every catalog address a type by. */
|
|
1418
2536
|
export declare const elementCatalog: Record<string, ElementSemantics>;
|
|
1419
2537
|
|
|
2538
|
+
/**
|
|
2539
|
+
* An element's classes, and at most one set of rules of its own on top of them — `class: [cover, { opacity: '0.25' }]`.
|
|
2540
|
+
*
|
|
2541
|
+
* "This class, plus one thing" is the commonest shape there is. The rules become a class named after the element,
|
|
2542
|
+
* `<id>--own`, declared after every shared one so it wins over them; it is still one class, visible and editable in the
|
|
2543
|
+
* builder, and the element still has one base selector. Needs the element's `id`, which names it.
|
|
2544
|
+
*/
|
|
2545
|
+
export declare type ElementClassList = ClassList | readonly (ClassRef | StyleSpec)[];
|
|
2546
|
+
|
|
1420
2547
|
export declare const elementDeclaration: <A>() => <const D extends ElementDeclarationData>(declaration: D) => D & ElementAttributesBrand<A>;
|
|
1421
2548
|
|
|
1422
2549
|
/** What every declaration is, whatever else it carries. */
|
|
@@ -1603,7 +2730,7 @@ declare const elementDeclarations: {
|
|
|
1603
2730
|
readonly canSelect: true;
|
|
1604
2731
|
readonly canDragDrop: true;
|
|
1605
2732
|
readonly canMove: true;
|
|
1606
|
-
readonly
|
|
2733
|
+
readonly canSnippet: true;
|
|
1607
2734
|
readonly itemsAllowed: readonly [];
|
|
1608
2735
|
readonly itemsNotAllowed: readonly [];
|
|
1609
2736
|
};
|
|
@@ -1652,7 +2779,7 @@ declare const elementDeclarations: {
|
|
|
1652
2779
|
readonly canSelect: true;
|
|
1653
2780
|
readonly canDragDrop: true;
|
|
1654
2781
|
readonly canMove: true;
|
|
1655
|
-
readonly
|
|
2782
|
+
readonly canSnippet: true;
|
|
1656
2783
|
readonly itemsAllowed: readonly [];
|
|
1657
2784
|
readonly itemsNotAllowed: readonly [];
|
|
1658
2785
|
};
|
|
@@ -1705,7 +2832,7 @@ declare const elementDeclarations: {
|
|
|
1705
2832
|
readonly canSelect: true;
|
|
1706
2833
|
readonly canDragDrop: true;
|
|
1707
2834
|
readonly canMove: true;
|
|
1708
|
-
readonly
|
|
2835
|
+
readonly canSnippet: true;
|
|
1709
2836
|
readonly itemsAllowed: readonly [];
|
|
1710
2837
|
readonly itemsNotAllowed: readonly [];
|
|
1711
2838
|
};
|
|
@@ -1735,11 +2862,14 @@ declare const elementDeclarations: {
|
|
|
1735
2862
|
readonly attributeValues: {
|
|
1736
2863
|
readonly subType: readonly string[];
|
|
1737
2864
|
readonly contentPlacement: readonly string[];
|
|
2865
|
+
readonly iconPlacement: readonly string[];
|
|
1738
2866
|
};
|
|
1739
2867
|
readonly content: {
|
|
1740
2868
|
readonly attributes: {
|
|
1741
2869
|
readonly contentPlacement: "after";
|
|
1742
2870
|
readonly content: "Button";
|
|
2871
|
+
readonly icon: "";
|
|
2872
|
+
readonly iconPlacement: "before";
|
|
1743
2873
|
readonly subType: "button";
|
|
1744
2874
|
readonly disabled: false;
|
|
1745
2875
|
};
|
|
@@ -1751,6 +2881,7 @@ declare const elementDeclarations: {
|
|
|
1751
2881
|
readonly bindings: {};
|
|
1752
2882
|
readonly styleSelectors: {
|
|
1753
2883
|
readonly base: "";
|
|
2884
|
+
readonly icon: "";
|
|
1754
2885
|
};
|
|
1755
2886
|
readonly initialState: {
|
|
1756
2887
|
readonly visibility: true;
|
|
@@ -1761,7 +2892,7 @@ declare const elementDeclarations: {
|
|
|
1761
2892
|
readonly canSelect: true;
|
|
1762
2893
|
readonly canDragDrop: true;
|
|
1763
2894
|
readonly canMove: true;
|
|
1764
|
-
readonly
|
|
2895
|
+
readonly canSnippet: true;
|
|
1765
2896
|
readonly itemsAllowed: readonly [];
|
|
1766
2897
|
readonly itemsNotAllowed: readonly [];
|
|
1767
2898
|
};
|
|
@@ -1855,11 +2986,187 @@ declare const elementDeclarations: {
|
|
|
1855
2986
|
title?: string | undefined;
|
|
1856
2987
|
content?: string | undefined;
|
|
1857
2988
|
disabled?: boolean | undefined;
|
|
2989
|
+
icon?: string | undefined;
|
|
1858
2990
|
subType?: "button" | "submit" | "reset" | undefined;
|
|
2991
|
+
iconPlacement?: IconPlacement | undefined;
|
|
1859
2992
|
contentPlacement?: "before" | "after" | undefined;
|
|
1860
2993
|
ariaExpanded?: boolean | undefined;
|
|
1861
2994
|
ariaPressed?: boolean | undefined;
|
|
1862
2995
|
}>>;
|
|
2996
|
+
readonly Carousel: {
|
|
2997
|
+
readonly type: "carousel";
|
|
2998
|
+
readonly sourceType: "carousel";
|
|
2999
|
+
readonly triggers: {
|
|
3000
|
+
readonly onChange: {
|
|
3001
|
+
readonly action: "onChange";
|
|
3002
|
+
readonly title: "On Slide Change";
|
|
3003
|
+
readonly type: "trigger";
|
|
3004
|
+
readonly params: {};
|
|
3005
|
+
readonly preview: {
|
|
3006
|
+
readonly index: "0";
|
|
3007
|
+
readonly item: {};
|
|
3008
|
+
};
|
|
3009
|
+
};
|
|
3010
|
+
};
|
|
3011
|
+
readonly callbacks: {
|
|
3012
|
+
readonly next: {
|
|
3013
|
+
readonly action: "next";
|
|
3014
|
+
readonly title: "Next Slide";
|
|
3015
|
+
readonly type: "callback";
|
|
3016
|
+
readonly params: {};
|
|
3017
|
+
readonly preview: {};
|
|
3018
|
+
};
|
|
3019
|
+
readonly previous: {
|
|
3020
|
+
readonly action: "previous";
|
|
3021
|
+
readonly title: "Previous Slide";
|
|
3022
|
+
readonly type: "callback";
|
|
3023
|
+
readonly params: {};
|
|
3024
|
+
readonly preview: {};
|
|
3025
|
+
};
|
|
3026
|
+
readonly goTo: {
|
|
3027
|
+
readonly action: "goTo";
|
|
3028
|
+
readonly title: "Go To Slide";
|
|
3029
|
+
readonly type: "callback";
|
|
3030
|
+
readonly params: {
|
|
3031
|
+
readonly index: {
|
|
3032
|
+
readonly type: "text";
|
|
3033
|
+
readonly label: "Index (from 0)";
|
|
3034
|
+
readonly defaultValue: "0";
|
|
3035
|
+
readonly canBind: true;
|
|
3036
|
+
};
|
|
3037
|
+
};
|
|
3038
|
+
readonly preview: {};
|
|
3039
|
+
};
|
|
3040
|
+
readonly play: {
|
|
3041
|
+
readonly action: "play";
|
|
3042
|
+
readonly title: "Play";
|
|
3043
|
+
readonly type: "callback";
|
|
3044
|
+
readonly params: {};
|
|
3045
|
+
readonly preview: {};
|
|
3046
|
+
};
|
|
3047
|
+
readonly pause: {
|
|
3048
|
+
readonly action: "pause";
|
|
3049
|
+
readonly title: "Pause";
|
|
3050
|
+
readonly type: "callback";
|
|
3051
|
+
readonly params: {};
|
|
3052
|
+
readonly preview: {};
|
|
3053
|
+
};
|
|
3054
|
+
};
|
|
3055
|
+
readonly content: {
|
|
3056
|
+
readonly attributes: {
|
|
3057
|
+
readonly items: readonly [];
|
|
3058
|
+
readonly mode: "slide";
|
|
3059
|
+
readonly autoplay: 0;
|
|
3060
|
+
readonly pauseOnHover: true;
|
|
3061
|
+
readonly loop: true;
|
|
3062
|
+
readonly transition: "slide";
|
|
3063
|
+
readonly speed: 30;
|
|
3064
|
+
readonly label: "";
|
|
3065
|
+
};
|
|
3066
|
+
readonly definition: {
|
|
3067
|
+
readonly label: "Carousel";
|
|
3068
|
+
readonly type: "carousel";
|
|
3069
|
+
readonly description: "Items shown one at a time, scrolled past as a marquee, or swiped as a row — with controls of its own inside.";
|
|
3070
|
+
readonly items: readonly [];
|
|
3071
|
+
readonly bindings: {};
|
|
3072
|
+
readonly styleSelectors: {
|
|
3073
|
+
readonly base: "";
|
|
3074
|
+
};
|
|
3075
|
+
readonly initialState: {
|
|
3076
|
+
readonly visibility: true;
|
|
3077
|
+
};
|
|
3078
|
+
};
|
|
3079
|
+
readonly builder: {
|
|
3080
|
+
readonly canDelete: true;
|
|
3081
|
+
readonly canSelect: true;
|
|
3082
|
+
readonly canDragDrop: true;
|
|
3083
|
+
readonly canMove: true;
|
|
3084
|
+
readonly canSnippet: true;
|
|
3085
|
+
readonly itemsAllowed: readonly [];
|
|
3086
|
+
readonly itemsNotAllowed: readonly [];
|
|
3087
|
+
};
|
|
3088
|
+
readonly market: {
|
|
3089
|
+
readonly category: "structure";
|
|
3090
|
+
readonly owner: "Plitzi";
|
|
3091
|
+
readonly verified: true;
|
|
3092
|
+
readonly license: "MIT";
|
|
3093
|
+
readonly website: "https://plitzi.com";
|
|
3094
|
+
readonly backgroundColor: "#4422ee";
|
|
3095
|
+
readonly icon: "fa-solid fa-images";
|
|
3096
|
+
};
|
|
3097
|
+
readonly defaultStyle: {
|
|
3098
|
+
readonly name: "Carousel";
|
|
3099
|
+
readonly displayMode: "desktop";
|
|
3100
|
+
readonly style: {
|
|
3101
|
+
readonly base: {
|
|
3102
|
+
readonly default: {
|
|
3103
|
+
readonly position: "relative";
|
|
3104
|
+
};
|
|
3105
|
+
};
|
|
3106
|
+
};
|
|
3107
|
+
};
|
|
3108
|
+
readonly settings: {};
|
|
3109
|
+
};
|
|
3110
|
+
readonly initialItems: readonly ["carouselTrack"];
|
|
3111
|
+
} & ElementAttributesBrand<Partial<{
|
|
3112
|
+
mode?: CarouselMode | undefined;
|
|
3113
|
+
label?: string | undefined;
|
|
3114
|
+
items?: unknown[] | undefined;
|
|
3115
|
+
speed?: number | undefined;
|
|
3116
|
+
loop?: boolean | undefined;
|
|
3117
|
+
autoplay?: number | undefined;
|
|
3118
|
+
pauseOnHover?: boolean | undefined;
|
|
3119
|
+
transition?: CarouselTransition | undefined;
|
|
3120
|
+
itemKey?: string | undefined;
|
|
3121
|
+
}>>;
|
|
3122
|
+
readonly CarouselTrack: {
|
|
3123
|
+
readonly type: "carouselTrack";
|
|
3124
|
+
readonly ancestorType: "carousel";
|
|
3125
|
+
readonly content: {
|
|
3126
|
+
readonly attributes: {};
|
|
3127
|
+
readonly definition: {
|
|
3128
|
+
readonly label: "Carousel Track";
|
|
3129
|
+
readonly type: "carouselTrack";
|
|
3130
|
+
readonly description: "Where a carousel shows its slides: what is inside is one slide, rendered once per item.";
|
|
3131
|
+
readonly items: readonly [];
|
|
3132
|
+
readonly bindings: {};
|
|
3133
|
+
readonly styleSelectors: {
|
|
3134
|
+
readonly base: "";
|
|
3135
|
+
};
|
|
3136
|
+
readonly initialState: {
|
|
3137
|
+
readonly visibility: true;
|
|
3138
|
+
};
|
|
3139
|
+
};
|
|
3140
|
+
readonly builder: {
|
|
3141
|
+
readonly canDelete: true;
|
|
3142
|
+
readonly canSelect: true;
|
|
3143
|
+
readonly canDragDrop: true;
|
|
3144
|
+
readonly canMove: true;
|
|
3145
|
+
readonly canSnippet: false;
|
|
3146
|
+
readonly itemsAllowed: readonly [];
|
|
3147
|
+
readonly itemsNotAllowed: readonly [];
|
|
3148
|
+
};
|
|
3149
|
+
readonly market: {
|
|
3150
|
+
readonly category: "structure";
|
|
3151
|
+
readonly owner: "Plitzi";
|
|
3152
|
+
readonly verified: true;
|
|
3153
|
+
readonly license: "MIT";
|
|
3154
|
+
readonly website: "https://plitzi.com";
|
|
3155
|
+
readonly backgroundColor: "#4422ee";
|
|
3156
|
+
readonly icon: "fa-solid fa-film";
|
|
3157
|
+
};
|
|
3158
|
+
readonly defaultStyle: {
|
|
3159
|
+
readonly name: "Carousel Track";
|
|
3160
|
+
readonly displayMode: "desktop";
|
|
3161
|
+
readonly style: {
|
|
3162
|
+
readonly base: {
|
|
3163
|
+
readonly default: {};
|
|
3164
|
+
};
|
|
3165
|
+
};
|
|
3166
|
+
};
|
|
3167
|
+
readonly settings: {};
|
|
3168
|
+
};
|
|
3169
|
+
} & ElementAttributesBrand<unknown>;
|
|
1863
3170
|
readonly Channel: {
|
|
1864
3171
|
readonly type: "channel";
|
|
1865
3172
|
readonly attributeValues: {
|
|
@@ -1961,7 +3268,7 @@ declare const elementDeclarations: {
|
|
|
1961
3268
|
readonly canSelect: true;
|
|
1962
3269
|
readonly canDragDrop: true;
|
|
1963
3270
|
readonly canMove: true;
|
|
1964
|
-
readonly
|
|
3271
|
+
readonly canSnippet: true;
|
|
1965
3272
|
readonly itemsAllowed: readonly [];
|
|
1966
3273
|
readonly itemsNotAllowed: readonly [];
|
|
1967
3274
|
};
|
|
@@ -2020,7 +3327,7 @@ declare const elementDeclarations: {
|
|
|
2020
3327
|
readonly canSelect: true;
|
|
2021
3328
|
readonly canDragDrop: true;
|
|
2022
3329
|
readonly canMove: true;
|
|
2023
|
-
readonly
|
|
3330
|
+
readonly canSnippet: true;
|
|
2024
3331
|
readonly itemsAllowed: readonly [];
|
|
2025
3332
|
readonly itemsNotAllowed: readonly [];
|
|
2026
3333
|
};
|
|
@@ -2047,7 +3354,7 @@ declare const elementDeclarations: {
|
|
|
2047
3354
|
};
|
|
2048
3355
|
} & ElementAttributesBrand<Partial<{
|
|
2049
3356
|
label?: string | undefined;
|
|
2050
|
-
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
3357
|
+
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | undefined;
|
|
2051
3358
|
decorative?: boolean | undefined;
|
|
2052
3359
|
}>>;
|
|
2053
3360
|
readonly Custom: {
|
|
@@ -2077,7 +3384,7 @@ declare const elementDeclarations: {
|
|
|
2077
3384
|
readonly canSelect: true;
|
|
2078
3385
|
readonly canDragDrop: true;
|
|
2079
3386
|
readonly canMove: true;
|
|
2080
|
-
readonly
|
|
3387
|
+
readonly canSnippet: true;
|
|
2081
3388
|
readonly itemsAllowed: readonly [];
|
|
2082
3389
|
readonly itemsNotAllowed: readonly [];
|
|
2083
3390
|
};
|
|
@@ -2221,7 +3528,7 @@ declare const elementDeclarations: {
|
|
|
2221
3528
|
readonly canSelect: true;
|
|
2222
3529
|
readonly canDragDrop: true;
|
|
2223
3530
|
readonly canMove: true;
|
|
2224
|
-
readonly
|
|
3531
|
+
readonly canSnippet: true;
|
|
2225
3532
|
readonly itemsAllowed: readonly [];
|
|
2226
3533
|
readonly itemsNotAllowed: readonly [];
|
|
2227
3534
|
};
|
|
@@ -2368,7 +3675,7 @@ declare const elementDeclarations: {
|
|
|
2368
3675
|
readonly canSelect: true;
|
|
2369
3676
|
readonly canDragDrop: true;
|
|
2370
3677
|
readonly canMove: true;
|
|
2371
|
-
readonly
|
|
3678
|
+
readonly canSnippet: true;
|
|
2372
3679
|
readonly itemsAllowed: readonly [];
|
|
2373
3680
|
readonly itemsNotAllowed: readonly [];
|
|
2374
3681
|
};
|
|
@@ -2438,7 +3745,7 @@ declare const elementDeclarations: {
|
|
|
2438
3745
|
readonly canSelect: true;
|
|
2439
3746
|
readonly canDragDrop: false;
|
|
2440
3747
|
readonly canMove: false;
|
|
2441
|
-
readonly
|
|
3748
|
+
readonly canSnippet: false;
|
|
2442
3749
|
readonly itemsAllowed: readonly [];
|
|
2443
3750
|
readonly itemsNotAllowed: readonly [];
|
|
2444
3751
|
};
|
|
@@ -2474,12 +3781,77 @@ declare const elementDeclarations: {
|
|
|
2474
3781
|
};
|
|
2475
3782
|
};
|
|
2476
3783
|
};
|
|
2477
|
-
readonly subTypes: {};
|
|
3784
|
+
readonly subTypes: {};
|
|
3785
|
+
};
|
|
3786
|
+
readonly settings: {};
|
|
3787
|
+
};
|
|
3788
|
+
readonly initialItems: readonly [];
|
|
3789
|
+
} & ElementAttributesBrand<unknown>;
|
|
3790
|
+
readonly Embed: {
|
|
3791
|
+
readonly type: "embed";
|
|
3792
|
+
readonly content: {
|
|
3793
|
+
readonly attributes: {
|
|
3794
|
+
readonly src: "";
|
|
3795
|
+
readonly title: "";
|
|
3796
|
+
readonly loading: "lazy";
|
|
3797
|
+
};
|
|
3798
|
+
readonly definition: {
|
|
3799
|
+
readonly label: "Embed";
|
|
3800
|
+
readonly type: "embed";
|
|
3801
|
+
readonly description: "Another page inside this one — a map, a video player, a form — in a frame.";
|
|
3802
|
+
readonly bindings: {};
|
|
3803
|
+
readonly styleSelectors: {
|
|
3804
|
+
readonly base: "";
|
|
3805
|
+
};
|
|
3806
|
+
readonly initialState: {
|
|
3807
|
+
readonly visibility: true;
|
|
3808
|
+
};
|
|
3809
|
+
};
|
|
3810
|
+
readonly builder: {
|
|
3811
|
+
readonly canDelete: true;
|
|
3812
|
+
readonly canSelect: true;
|
|
3813
|
+
readonly canDragDrop: true;
|
|
3814
|
+
readonly canMove: true;
|
|
3815
|
+
readonly canSnippet: true;
|
|
3816
|
+
readonly itemsAllowed: readonly [];
|
|
3817
|
+
readonly itemsNotAllowed: readonly [];
|
|
3818
|
+
};
|
|
3819
|
+
readonly market: {
|
|
3820
|
+
readonly category: "media";
|
|
3821
|
+
readonly owner: "Plitzi";
|
|
3822
|
+
readonly verified: true;
|
|
3823
|
+
readonly license: "MIT";
|
|
3824
|
+
readonly website: "https://plitzi.com";
|
|
3825
|
+
readonly backgroundColor: "#4422ee";
|
|
3826
|
+
readonly icon: "fa-solid fa-window-maximize";
|
|
3827
|
+
};
|
|
3828
|
+
readonly defaultStyle: {
|
|
3829
|
+
readonly name: "Embed";
|
|
3830
|
+
readonly displayMode: "desktop";
|
|
3831
|
+
readonly style: {
|
|
3832
|
+
readonly base: {
|
|
3833
|
+
readonly default: {
|
|
3834
|
+
readonly display: "block";
|
|
3835
|
+
readonly width: "100%";
|
|
3836
|
+
readonly 'aspect-ratio': "16 / 9";
|
|
3837
|
+
readonly 'border-top-width': "0px";
|
|
3838
|
+
readonly 'border-right-width': "0px";
|
|
3839
|
+
readonly 'border-bottom-width': "0px";
|
|
3840
|
+
readonly 'border-left-width': "0px";
|
|
3841
|
+
};
|
|
3842
|
+
};
|
|
3843
|
+
};
|
|
2478
3844
|
};
|
|
2479
3845
|
readonly settings: {};
|
|
2480
3846
|
};
|
|
2481
|
-
|
|
2482
|
-
|
|
3847
|
+
} & ElementAttributesBrand<Partial<{
|
|
3848
|
+
title?: string | undefined;
|
|
3849
|
+
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
3850
|
+
src?: string | undefined;
|
|
3851
|
+
allow?: string | undefined;
|
|
3852
|
+
loading?: "lazy" | "eager" | undefined;
|
|
3853
|
+
sandbox?: string | undefined;
|
|
3854
|
+
}>>;
|
|
2483
3855
|
readonly FontAwesome: {
|
|
2484
3856
|
readonly type: "fontAwesome";
|
|
2485
3857
|
readonly content: {
|
|
@@ -2505,7 +3877,7 @@ declare const elementDeclarations: {
|
|
|
2505
3877
|
readonly canSelect: true;
|
|
2506
3878
|
readonly canDragDrop: true;
|
|
2507
3879
|
readonly canMove: true;
|
|
2508
|
-
readonly
|
|
3880
|
+
readonly canSnippet: true;
|
|
2509
3881
|
readonly itemsAllowed: readonly [];
|
|
2510
3882
|
readonly itemsNotAllowed: readonly [];
|
|
2511
3883
|
};
|
|
@@ -2628,7 +4000,7 @@ declare const elementDeclarations: {
|
|
|
2628
4000
|
readonly canSelect: true;
|
|
2629
4001
|
readonly canDragDrop: true;
|
|
2630
4002
|
readonly canMove: true;
|
|
2631
|
-
readonly
|
|
4003
|
+
readonly canSnippet: true;
|
|
2632
4004
|
readonly itemsAllowed: readonly [];
|
|
2633
4005
|
readonly itemsNotAllowed: readonly [];
|
|
2634
4006
|
};
|
|
@@ -2721,7 +4093,7 @@ declare const elementDeclarations: {
|
|
|
2721
4093
|
readonly canSelect: true;
|
|
2722
4094
|
readonly canDragDrop: true;
|
|
2723
4095
|
readonly canMove: true;
|
|
2724
|
-
readonly
|
|
4096
|
+
readonly canSnippet: false;
|
|
2725
4097
|
readonly itemsAllowed: readonly [];
|
|
2726
4098
|
readonly itemsNotAllowed: readonly [];
|
|
2727
4099
|
};
|
|
@@ -3197,7 +4569,7 @@ declare const elementDeclarations: {
|
|
|
3197
4569
|
readonly canSelect: true;
|
|
3198
4570
|
readonly canDragDrop: true;
|
|
3199
4571
|
readonly canMove: true;
|
|
3200
|
-
readonly
|
|
4572
|
+
readonly canSnippet: true;
|
|
3201
4573
|
readonly itemsAllowed: readonly [];
|
|
3202
4574
|
readonly itemsNotAllowed: readonly [];
|
|
3203
4575
|
};
|
|
@@ -3348,7 +4720,7 @@ declare const elementDeclarations: {
|
|
|
3348
4720
|
readonly canSelect: true;
|
|
3349
4721
|
readonly canDragDrop: true;
|
|
3350
4722
|
readonly canMove: true;
|
|
3351
|
-
readonly
|
|
4723
|
+
readonly canSnippet: true;
|
|
3352
4724
|
readonly itemsAllowed: readonly [];
|
|
3353
4725
|
readonly itemsNotAllowed: readonly [];
|
|
3354
4726
|
};
|
|
@@ -3377,7 +4749,10 @@ declare const elementDeclarations: {
|
|
|
3377
4749
|
readonly settings: {};
|
|
3378
4750
|
};
|
|
3379
4751
|
} & ElementAttributesBrand<Partial<{
|
|
4752
|
+
height?: number | undefined;
|
|
4753
|
+
width?: number | undefined;
|
|
3380
4754
|
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
4755
|
+
sizes?: string | undefined;
|
|
3381
4756
|
src?: string | undefined;
|
|
3382
4757
|
alt?: string | undefined;
|
|
3383
4758
|
decorative?: boolean | undefined;
|
|
@@ -3410,7 +4785,7 @@ declare const elementDeclarations: {
|
|
|
3410
4785
|
readonly canSelect: true;
|
|
3411
4786
|
readonly canDragDrop: false;
|
|
3412
4787
|
readonly canMove: true;
|
|
3413
|
-
readonly
|
|
4788
|
+
readonly canSnippet: true;
|
|
3414
4789
|
readonly itemsAllowed: readonly [];
|
|
3415
4790
|
readonly itemsNotAllowed: readonly [];
|
|
3416
4791
|
};
|
|
@@ -3445,13 +4820,20 @@ declare const elementDeclarations: {
|
|
|
3445
4820
|
readonly attributeValues: {
|
|
3446
4821
|
readonly mode: readonly string[];
|
|
3447
4822
|
readonly target: readonly string[];
|
|
4823
|
+
readonly contentPlacement: readonly string[];
|
|
4824
|
+
readonly iconPlacement: readonly string[];
|
|
3448
4825
|
};
|
|
3449
4826
|
readonly content: {
|
|
3450
4827
|
readonly attributes: {
|
|
3451
4828
|
readonly href: "#";
|
|
3452
4829
|
readonly target: "self";
|
|
3453
4830
|
readonly mode: "page";
|
|
4831
|
+
readonly hash: "";
|
|
3454
4832
|
readonly label: "";
|
|
4833
|
+
readonly content: "";
|
|
4834
|
+
readonly contentPlacement: "after";
|
|
4835
|
+
readonly icon: "";
|
|
4836
|
+
readonly iconPlacement: "before";
|
|
3455
4837
|
};
|
|
3456
4838
|
readonly definition: {
|
|
3457
4839
|
readonly label: "Link";
|
|
@@ -3461,6 +4843,7 @@ declare const elementDeclarations: {
|
|
|
3461
4843
|
readonly bindings: {};
|
|
3462
4844
|
readonly styleSelectors: {
|
|
3463
4845
|
readonly base: "";
|
|
4846
|
+
readonly icon: "";
|
|
3464
4847
|
};
|
|
3465
4848
|
readonly initialState: {
|
|
3466
4849
|
readonly visibility: true;
|
|
@@ -3471,7 +4854,7 @@ declare const elementDeclarations: {
|
|
|
3471
4854
|
readonly canSelect: true;
|
|
3472
4855
|
readonly canDragDrop: true;
|
|
3473
4856
|
readonly canMove: true;
|
|
3474
|
-
readonly
|
|
4857
|
+
readonly canSnippet: true;
|
|
3475
4858
|
readonly itemsAllowed: readonly [];
|
|
3476
4859
|
readonly itemsNotAllowed: readonly ["link"];
|
|
3477
4860
|
};
|
|
@@ -3504,6 +4887,11 @@ declare const elementDeclarations: {
|
|
|
3504
4887
|
href?: string | undefined;
|
|
3505
4888
|
label?: string | undefined;
|
|
3506
4889
|
target?: "self" | "blank" | "parent" | "top" | undefined;
|
|
4890
|
+
content?: string | undefined;
|
|
4891
|
+
icon?: string | undefined;
|
|
4892
|
+
iconPlacement?: IconPlacement | undefined;
|
|
4893
|
+
contentPlacement?: "before" | "after" | undefined;
|
|
4894
|
+
hash?: string | undefined;
|
|
3507
4895
|
}>>;
|
|
3508
4896
|
readonly List: {
|
|
3509
4897
|
readonly type: "list";
|
|
@@ -3536,7 +4924,7 @@ declare const elementDeclarations: {
|
|
|
3536
4924
|
readonly canSelect: true;
|
|
3537
4925
|
readonly canDragDrop: true;
|
|
3538
4926
|
readonly canMove: true;
|
|
3539
|
-
readonly
|
|
4927
|
+
readonly canSnippet: true;
|
|
3540
4928
|
readonly itemsAllowed: readonly [];
|
|
3541
4929
|
readonly itemsNotAllowed: readonly [];
|
|
3542
4930
|
};
|
|
@@ -3593,6 +4981,7 @@ declare const elementDeclarations: {
|
|
|
3593
4981
|
source?: "none" | "controlled" | undefined;
|
|
3594
4982
|
items?: unknown[] | undefined;
|
|
3595
4983
|
subType?: "ul" | "ol" | undefined;
|
|
4984
|
+
itemKey?: string | undefined;
|
|
3596
4985
|
}>>;
|
|
3597
4986
|
readonly ListItem: {
|
|
3598
4987
|
readonly type: "listItem";
|
|
@@ -3616,7 +5005,7 @@ declare const elementDeclarations: {
|
|
|
3616
5005
|
readonly canSelect: true;
|
|
3617
5006
|
readonly canDragDrop: true;
|
|
3618
5007
|
readonly canMove: true;
|
|
3619
|
-
readonly
|
|
5008
|
+
readonly canSnippet: true;
|
|
3620
5009
|
readonly itemsAllowed: readonly [];
|
|
3621
5010
|
readonly itemsNotAllowed: readonly ["listItem"];
|
|
3622
5011
|
};
|
|
@@ -3662,7 +5051,7 @@ declare const elementDeclarations: {
|
|
|
3662
5051
|
readonly canSelect: true;
|
|
3663
5052
|
readonly canDragDrop: false;
|
|
3664
5053
|
readonly canMove: true;
|
|
3665
|
-
readonly
|
|
5054
|
+
readonly canSnippet: true;
|
|
3666
5055
|
readonly itemsAllowed: readonly [];
|
|
3667
5056
|
readonly itemsNotAllowed: readonly [];
|
|
3668
5057
|
};
|
|
@@ -3710,7 +5099,7 @@ declare const elementDeclarations: {
|
|
|
3710
5099
|
readonly canSelect: true;
|
|
3711
5100
|
readonly canDragDrop: true;
|
|
3712
5101
|
readonly canMove: true;
|
|
3713
|
-
readonly
|
|
5102
|
+
readonly canSnippet: true;
|
|
3714
5103
|
readonly itemsAllowed: readonly [];
|
|
3715
5104
|
readonly itemsNotAllowed: readonly [];
|
|
3716
5105
|
};
|
|
@@ -3819,7 +5208,7 @@ declare const elementDeclarations: {
|
|
|
3819
5208
|
readonly canSelect: true;
|
|
3820
5209
|
readonly canDragDrop: true;
|
|
3821
5210
|
readonly canMove: true;
|
|
3822
|
-
readonly
|
|
5211
|
+
readonly canSnippet: true;
|
|
3823
5212
|
readonly itemsAllowed: readonly [];
|
|
3824
5213
|
readonly itemsNotAllowed: readonly [];
|
|
3825
5214
|
};
|
|
@@ -3951,7 +5340,7 @@ declare const elementDeclarations: {
|
|
|
3951
5340
|
readonly canSelect: true;
|
|
3952
5341
|
readonly canDragDrop: true;
|
|
3953
5342
|
readonly canMove: true;
|
|
3954
|
-
readonly
|
|
5343
|
+
readonly canSnippet: true;
|
|
3955
5344
|
readonly itemsAllowed: readonly [];
|
|
3956
5345
|
readonly itemsNotAllowed: readonly [];
|
|
3957
5346
|
};
|
|
@@ -3994,6 +5383,8 @@ declare const elementDeclarations: {
|
|
|
3994
5383
|
slot?: string | undefined | undefined;
|
|
3995
5384
|
title?: string | undefined | undefined;
|
|
3996
5385
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
5386
|
+
hidden?: boolean | undefined | undefined;
|
|
5387
|
+
onScroll?: UIEventHandler<"span"> | undefined;
|
|
3997
5388
|
onLoad?: ReactEventHandler<"span"> | undefined;
|
|
3998
5389
|
onClick?: MouseEventHandler<"span"> | undefined;
|
|
3999
5390
|
onPointerDown?: PointerEventHandler<"span"> | undefined;
|
|
@@ -4202,7 +5593,6 @@ declare const elementDeclarations: {
|
|
|
4202
5593
|
onGotPointerCaptureCapture?: PointerEventHandler<"span"> | undefined;
|
|
4203
5594
|
onLostPointerCapture?: PointerEventHandler<"span"> | undefined;
|
|
4204
5595
|
onLostPointerCaptureCapture?: PointerEventHandler<"span"> | undefined;
|
|
4205
|
-
onScroll?: UIEventHandler<"span"> | undefined;
|
|
4206
5596
|
onScrollCapture?: UIEventHandler<"span"> | undefined;
|
|
4207
5597
|
onScrollEnd?: UIEventHandler<"span"> | undefined;
|
|
4208
5598
|
onScrollEndCapture?: UIEventHandler<"span"> | undefined;
|
|
@@ -4234,7 +5624,6 @@ declare const elementDeclarations: {
|
|
|
4234
5624
|
dir?: string | undefined | undefined;
|
|
4235
5625
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
4236
5626
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
4237
|
-
hidden?: boolean | undefined | undefined;
|
|
4238
5627
|
spellCheck?: (boolean | "false" | "true") | undefined;
|
|
4239
5628
|
translate?: "yes" | "no" | undefined | undefined;
|
|
4240
5629
|
radioGroup?: string | undefined | undefined;
|
|
@@ -4289,7 +5678,7 @@ declare const elementDeclarations: {
|
|
|
4289
5678
|
readonly canSelect: true;
|
|
4290
5679
|
readonly canDragDrop: false;
|
|
4291
5680
|
readonly canMove: true;
|
|
4292
|
-
readonly
|
|
5681
|
+
readonly canSnippet: true;
|
|
4293
5682
|
readonly itemsAllowed: readonly [];
|
|
4294
5683
|
readonly itemsNotAllowed: readonly [];
|
|
4295
5684
|
};
|
|
@@ -4359,7 +5748,7 @@ declare const elementDeclarations: {
|
|
|
4359
5748
|
readonly canSelect: true;
|
|
4360
5749
|
readonly canDragDrop: false;
|
|
4361
5750
|
readonly canMove: false;
|
|
4362
|
-
readonly
|
|
5751
|
+
readonly canSnippet: true;
|
|
4363
5752
|
readonly itemsAllowed: readonly [];
|
|
4364
5753
|
readonly itemsNotAllowed: readonly [];
|
|
4365
5754
|
};
|
|
@@ -4448,7 +5837,7 @@ declare const elementDeclarations: {
|
|
|
4448
5837
|
readonly canSelect: true;
|
|
4449
5838
|
readonly canDragDrop: true;
|
|
4450
5839
|
readonly canMove: true;
|
|
4451
|
-
readonly
|
|
5840
|
+
readonly canSnippet: true;
|
|
4452
5841
|
readonly itemsAllowed: readonly [];
|
|
4453
5842
|
readonly itemsNotAllowed: readonly [];
|
|
4454
5843
|
};
|
|
@@ -4512,7 +5901,7 @@ declare const elementDeclarations: {
|
|
|
4512
5901
|
readonly canSelect: true;
|
|
4513
5902
|
readonly canDragDrop: true;
|
|
4514
5903
|
readonly canMove: true;
|
|
4515
|
-
readonly
|
|
5904
|
+
readonly canSnippet: true;
|
|
4516
5905
|
readonly itemsAllowed: readonly [];
|
|
4517
5906
|
readonly itemsNotAllowed: readonly [];
|
|
4518
5907
|
};
|
|
@@ -4567,7 +5956,7 @@ declare const elementDeclarations: {
|
|
|
4567
5956
|
readonly canSelect: true;
|
|
4568
5957
|
readonly canDragDrop: true;
|
|
4569
5958
|
readonly canMove: true;
|
|
4570
|
-
readonly
|
|
5959
|
+
readonly canSnippet: true;
|
|
4571
5960
|
readonly itemsAllowed: readonly [];
|
|
4572
5961
|
readonly itemsNotAllowed: readonly [];
|
|
4573
5962
|
};
|
|
@@ -4624,7 +6013,7 @@ declare const elementDeclarations: {
|
|
|
4624
6013
|
readonly canSelect: true;
|
|
4625
6014
|
readonly canDragDrop: true;
|
|
4626
6015
|
readonly canMove: true;
|
|
4627
|
-
readonly
|
|
6016
|
+
readonly canSnippet: true;
|
|
4628
6017
|
readonly itemsAllowed: readonly [];
|
|
4629
6018
|
readonly itemsNotAllowed: readonly [];
|
|
4630
6019
|
};
|
|
@@ -4654,6 +6043,62 @@ declare const elementDeclarations: {
|
|
|
4654
6043
|
content?: string | undefined;
|
|
4655
6044
|
mediaBaseUrl?: string | undefined;
|
|
4656
6045
|
}>>;
|
|
6046
|
+
readonly Svg: {
|
|
6047
|
+
readonly type: "svg";
|
|
6048
|
+
readonly content: {
|
|
6049
|
+
readonly attributes: {
|
|
6050
|
+
readonly content: "";
|
|
6051
|
+
readonly label: "";
|
|
6052
|
+
};
|
|
6053
|
+
readonly definition: {
|
|
6054
|
+
readonly label: "SVG";
|
|
6055
|
+
readonly type: "svg";
|
|
6056
|
+
readonly description: "A drawing written as SVG markup, coloured by its class.";
|
|
6057
|
+
readonly bindings: {};
|
|
6058
|
+
readonly styleSelectors: {
|
|
6059
|
+
readonly base: "";
|
|
6060
|
+
};
|
|
6061
|
+
readonly initialState: {
|
|
6062
|
+
readonly visibility: true;
|
|
6063
|
+
};
|
|
6064
|
+
};
|
|
6065
|
+
readonly builder: {
|
|
6066
|
+
readonly canDelete: true;
|
|
6067
|
+
readonly canSelect: true;
|
|
6068
|
+
readonly canDragDrop: true;
|
|
6069
|
+
readonly canMove: true;
|
|
6070
|
+
readonly canSnippet: true;
|
|
6071
|
+
readonly itemsAllowed: readonly [];
|
|
6072
|
+
readonly itemsNotAllowed: readonly [];
|
|
6073
|
+
};
|
|
6074
|
+
readonly market: {
|
|
6075
|
+
readonly category: "media";
|
|
6076
|
+
readonly owner: "Plitzi";
|
|
6077
|
+
readonly verified: true;
|
|
6078
|
+
readonly license: "MIT";
|
|
6079
|
+
readonly website: "https://plitzi.com";
|
|
6080
|
+
readonly backgroundColor: "#4422ee";
|
|
6081
|
+
readonly icon: "fa-solid fa-bezier-curve";
|
|
6082
|
+
};
|
|
6083
|
+
readonly defaultStyle: {
|
|
6084
|
+
readonly name: "Svg";
|
|
6085
|
+
readonly displayMode: "desktop";
|
|
6086
|
+
readonly style: {
|
|
6087
|
+
readonly base: {
|
|
6088
|
+
readonly default: {
|
|
6089
|
+
readonly display: "inline-flex";
|
|
6090
|
+
readonly width: "24px";
|
|
6091
|
+
readonly height: "24px";
|
|
6092
|
+
};
|
|
6093
|
+
};
|
|
6094
|
+
};
|
|
6095
|
+
};
|
|
6096
|
+
readonly settings: {};
|
|
6097
|
+
};
|
|
6098
|
+
} & ElementAttributesBrand<Partial<{
|
|
6099
|
+
label?: string | undefined;
|
|
6100
|
+
content?: string | undefined;
|
|
6101
|
+
}>>;
|
|
4657
6102
|
readonly TabContainer: {
|
|
4658
6103
|
readonly type: "tabContainer";
|
|
4659
6104
|
readonly content: {
|
|
@@ -4676,7 +6121,7 @@ declare const elementDeclarations: {
|
|
|
4676
6121
|
readonly canSelect: true;
|
|
4677
6122
|
readonly canDragDrop: true;
|
|
4678
6123
|
readonly canMove: true;
|
|
4679
|
-
readonly
|
|
6124
|
+
readonly canSnippet: true;
|
|
4680
6125
|
readonly itemsAllowed: readonly ["tabContainerHeader", "tabContainerBody"];
|
|
4681
6126
|
readonly itemsNotAllowed: readonly [];
|
|
4682
6127
|
};
|
|
@@ -4726,7 +6171,7 @@ declare const elementDeclarations: {
|
|
|
4726
6171
|
readonly canSelect: true;
|
|
4727
6172
|
readonly canDragDrop: false;
|
|
4728
6173
|
readonly canMove: false;
|
|
4729
|
-
readonly
|
|
6174
|
+
readonly canSnippet: false;
|
|
4730
6175
|
readonly itemsAllowed: readonly ["tabContainerItem"];
|
|
4731
6176
|
readonly itemsNotAllowed: readonly [];
|
|
4732
6177
|
};
|
|
@@ -4776,7 +6221,7 @@ declare const elementDeclarations: {
|
|
|
4776
6221
|
readonly canSelect: true;
|
|
4777
6222
|
readonly canDragDrop: false;
|
|
4778
6223
|
readonly canMove: false;
|
|
4779
|
-
readonly
|
|
6224
|
+
readonly canSnippet: false;
|
|
4780
6225
|
readonly itemsAllowed: readonly ["tabContainerItem"];
|
|
4781
6226
|
readonly itemsNotAllowed: readonly [];
|
|
4782
6227
|
};
|
|
@@ -4825,7 +6270,7 @@ declare const elementDeclarations: {
|
|
|
4825
6270
|
readonly canSelect: true;
|
|
4826
6271
|
readonly canDragDrop: true;
|
|
4827
6272
|
readonly canMove: true;
|
|
4828
|
-
readonly
|
|
6273
|
+
readonly canSnippet: true;
|
|
4829
6274
|
readonly itemsAllowed: readonly [];
|
|
4830
6275
|
readonly itemsNotAllowed: readonly ["tabContainerItem", "tabContainerHeader", "tabContainerBody"];
|
|
4831
6276
|
};
|
|
@@ -4874,7 +6319,7 @@ declare const elementDeclarations: {
|
|
|
4874
6319
|
readonly canSelect: true;
|
|
4875
6320
|
readonly canDragDrop: true;
|
|
4876
6321
|
readonly canMove: true;
|
|
4877
|
-
readonly
|
|
6322
|
+
readonly canSnippet: true;
|
|
4878
6323
|
readonly itemsAllowed: readonly [];
|
|
4879
6324
|
readonly itemsNotAllowed: readonly [];
|
|
4880
6325
|
};
|
|
@@ -4949,7 +6394,7 @@ declare const elementDeclarations: {
|
|
|
4949
6394
|
readonly canSelect: true;
|
|
4950
6395
|
readonly canDragDrop: true;
|
|
4951
6396
|
readonly canMove: true;
|
|
4952
|
-
readonly
|
|
6397
|
+
readonly canSnippet: true;
|
|
4953
6398
|
readonly itemsAllowed: readonly [];
|
|
4954
6399
|
readonly itemsNotAllowed: readonly [];
|
|
4955
6400
|
};
|
|
@@ -5012,7 +6457,7 @@ declare const elementDeclarations: {
|
|
|
5012
6457
|
readonly canSelect: true;
|
|
5013
6458
|
readonly canDragDrop: true;
|
|
5014
6459
|
readonly canMove: true;
|
|
5015
|
-
readonly
|
|
6460
|
+
readonly canSnippet: true;
|
|
5016
6461
|
readonly itemsAllowed: readonly [];
|
|
5017
6462
|
readonly itemsNotAllowed: readonly [];
|
|
5018
6463
|
};
|
|
@@ -5052,7 +6497,7 @@ declare const elementDeclarations: {
|
|
|
5052
6497
|
/** The attributes each built-in type starts with — what a factory merges under the author's own. */
|
|
5053
6498
|
export declare const elementDefaultAttributes: Record<string, Record<string, unknown>>;
|
|
5054
6499
|
|
|
5055
|
-
declare type ElementDefinition = {
|
|
6500
|
+
export declare type ElementDefinition = {
|
|
5056
6501
|
rootId: Element_2['id'];
|
|
5057
6502
|
label: string;
|
|
5058
6503
|
type: string;
|
|
@@ -5074,6 +6519,13 @@ declare type ElementDefinition = {
|
|
|
5074
6519
|
runtime?: ElementRuntime;
|
|
5075
6520
|
/** When this element's items are mounted, relative to its `visibility`. See {@link ElementLoadStrategy}. */
|
|
5076
6521
|
loadStrategy?: ElementLoadStrategy;
|
|
6522
|
+
/** The feature flag this element exists under. See {@link ElementFlagGate}. */
|
|
6523
|
+
flag?: ElementFlagGate;
|
|
6524
|
+
/**
|
|
6525
|
+
* The `id` this element carries in the DOM, so a link to `/page#anchor` lands on it — `data-id` names the element
|
|
6526
|
+
* for the platform, this names it for the URL. One per rendered page, layouts included (`isAnchor`).
|
|
6527
|
+
*/
|
|
6528
|
+
anchor?: string;
|
|
5077
6529
|
};
|
|
5078
6530
|
|
|
5079
6531
|
/**
|
|
@@ -5085,6 +6537,21 @@ export declare type ElementFactory<A> = ContentShorthand<A> & {
|
|
|
5085
6537
|
(children: ElementSpec[], props?: ElementProps<A>): ElementSpec;
|
|
5086
6538
|
};
|
|
5087
6539
|
|
|
6540
|
+
/**
|
|
6541
|
+
* What a feature flag gates an element on: it exists only while the flag `name` resolves to `is`.
|
|
6542
|
+
*
|
|
6543
|
+
* Not a visibility. A hidden element is still rendered, its markup still in the page; a gated one whose flag says no
|
|
6544
|
+
* is not rendered at all — not on the server, not in the browser, not its subtree — and the data of its server
|
|
6545
|
+
* elements is not resolved. Its declaration still travels with the space's document, as every element's does, so a
|
|
6546
|
+
* flag switches a feature off; it does not keep it secret. `is: false` is the other half of a rollout: the old
|
|
6547
|
+
* version, shown until the flag turns on.
|
|
6548
|
+
* On a page, a flag that says no makes the page not found.
|
|
6549
|
+
*/
|
|
6550
|
+
export declare type ElementFlagGate = {
|
|
6551
|
+
name: string;
|
|
6552
|
+
is: boolean;
|
|
6553
|
+
};
|
|
6554
|
+
|
|
5088
6555
|
/**
|
|
5089
6556
|
* How a test names what an author wrote.
|
|
5090
6557
|
*
|
|
@@ -5142,7 +6609,7 @@ export declare interface ElementHandle {
|
|
|
5142
6609
|
boxless?: true;
|
|
5143
6610
|
}
|
|
5144
6611
|
|
|
5145
|
-
declare type ElementInteraction<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
6612
|
+
export declare type ElementInteraction<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5146
6613
|
id: string;
|
|
5147
6614
|
title: string;
|
|
5148
6615
|
type: InteractionCallbackType;
|
|
@@ -5185,7 +6652,13 @@ export declare const elementLeafTypes: string[];
|
|
|
5185
6652
|
* - `visible`: mounted only while shown. Pays the build cost on every reveal and drops the subtree's state on
|
|
5186
6653
|
* every hide — worth it for contents that are expensive to KEEP (a live map, a video, a polling source).
|
|
5187
6654
|
*/
|
|
5188
|
-
declare type ElementLoadStrategy = 'eager' | 'lazy' | 'visible';
|
|
6655
|
+
export declare type ElementLoadStrategy = 'eager' | 'lazy' | 'visible';
|
|
6656
|
+
|
|
6657
|
+
/**
|
|
6658
|
+
* The parts each compound type renders through — a carousel's `carouselTrack`, a tab container's header and body: the
|
|
6659
|
+
* types it starts with (`initialItems`) that work only inside it. Without one it renders nothing of what it holds.
|
|
6660
|
+
*/
|
|
6661
|
+
export declare const elementPartTypes: Record<string, string[]>;
|
|
5189
6662
|
|
|
5190
6663
|
/** What a variant may change on one element: anything but what makes it that element. */
|
|
5191
6664
|
export declare type ElementPatch = Partial<Omit<ElementSpec, 'type' | 'id' | 'children'>>;
|
|
@@ -5211,7 +6684,7 @@ export declare interface ElementRenders {
|
|
|
5211
6684
|
changed: string[];
|
|
5212
6685
|
}
|
|
5213
6686
|
|
|
5214
|
-
declare type ElementRuntime = 'server' | 'client' | 'shared';
|
|
6687
|
+
export declare type ElementRuntime = 'server' | 'client' | 'shared';
|
|
5215
6688
|
|
|
5216
6689
|
/**
|
|
5217
6690
|
* What each built-in element IS, read off the declarations rather than listed somewhere.
|
|
@@ -5281,6 +6754,16 @@ export declare interface ElementSpec {
|
|
|
5281
6754
|
*/
|
|
5282
6755
|
id?: string;
|
|
5283
6756
|
attributes?: Record<string, unknown>;
|
|
6757
|
+
/**
|
|
6758
|
+
* The source the element's main attribute shows — `content` of a text, a heading, a paragraph or a button; `src`
|
|
6759
|
+
* of an image; `href` of a link; `items` of a list: `heading({ from: 'site.data.hero.title' })`. `bind` is for
|
|
6760
|
+
* the other attributes.
|
|
6761
|
+
*/
|
|
6762
|
+
from?: string;
|
|
6763
|
+
/** How `from` is shown: a name of the space's `formats`, or a template of its own (`'{{ source }} items'`). */
|
|
6764
|
+
as?: string;
|
|
6765
|
+
/** A list's row, by the component placed once per item with the row bound to its `item` prop. */
|
|
6766
|
+
row?: string;
|
|
5284
6767
|
/**
|
|
5285
6768
|
* A style variant the element starts in, e.g. a heading's `title`.
|
|
5286
6769
|
*
|
|
@@ -5315,9 +6798,10 @@ export declare interface ElementSpec {
|
|
|
5315
6798
|
* so declaring both is a question with no answer and is refused rather than silently resolved.
|
|
5316
6799
|
*
|
|
5317
6800
|
* Either a name from {@link SpaceSpec.classes}, or a `styles()` declaration that brings its own rules along — or a
|
|
5318
|
-
* list of them, for an element that wears a shared base and a modifier (`[panelCard, quotaPanel]`).
|
|
6801
|
+
* list of them, for an element that wears a shared base and a modifier (`[panelCard, quotaPanel]`). A list may end
|
|
6802
|
+
* with rules of the element's own on top of its classes, `[cover, { opacity: '0.25' }]` ({@link ElementClassList}).
|
|
5319
6803
|
*/
|
|
5320
|
-
class?:
|
|
6804
|
+
class?: ElementClassList;
|
|
5321
6805
|
/**
|
|
5322
6806
|
* A class for one of the element's OTHER style selectors, by selector name — a form control's `input`, `label`
|
|
5323
6807
|
* and `error`.
|
|
@@ -5354,6 +6838,18 @@ export declare interface ElementSpec {
|
|
|
5354
6838
|
runtime?: ElementRuntime;
|
|
5355
6839
|
/** When this element's contents mount relative to its visibility. Left out, the element type decides. */
|
|
5356
6840
|
loadStrategy?: ElementLoadStrategy;
|
|
6841
|
+
/**
|
|
6842
|
+
* The `id` this element carries in the DOM, so `/page#anchor` lands on it — `link({ href: 'home', hash: 'plans' })`.
|
|
6843
|
+
* Lowercase letters, digits and `-`; one per page, layouts included; not inside a list row or a component, which
|
|
6844
|
+
* would repeat it.
|
|
6845
|
+
*/
|
|
6846
|
+
anchor?: string;
|
|
6847
|
+
/**
|
|
6848
|
+
* The feature flag this exists under: `'newCheckout'` exists only while the flag is on, `'!newCheckout'` only while
|
|
6849
|
+
* it is off — the old version, kept until the new one ships. Not a visibility: gated off, it is not rendered at all,
|
|
6850
|
+
* on the server or in the browser. The flag is one {@link SpaceSpec.flags} declares.
|
|
6851
|
+
*/
|
|
6852
|
+
flag?: string;
|
|
5357
6853
|
children?: ElementSpec[];
|
|
5358
6854
|
meta?: SpecMeta;
|
|
5359
6855
|
}
|
|
@@ -5399,6 +6895,35 @@ export declare type ElementTypeName = keyof DeclarationByType;
|
|
|
5399
6895
|
/** Every built-in type name, for anything that has to tell a known type from one a plugin has to provide. */
|
|
5400
6896
|
export declare const elementTypeNames: string[];
|
|
5401
6897
|
|
|
6898
|
+
export declare const embed: {
|
|
6899
|
+
(props?: ElementProps<Partial<{
|
|
6900
|
+
title?: string | undefined;
|
|
6901
|
+
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
6902
|
+
src?: string | undefined;
|
|
6903
|
+
allow?: string | undefined;
|
|
6904
|
+
loading?: "lazy" | "eager" | undefined;
|
|
6905
|
+
sandbox?: string | undefined;
|
|
6906
|
+
}>> | undefined): ElementSpec;
|
|
6907
|
+
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
6908
|
+
title?: string | undefined;
|
|
6909
|
+
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
6910
|
+
src?: string | undefined;
|
|
6911
|
+
allow?: string | undefined;
|
|
6912
|
+
loading?: "lazy" | "eager" | undefined;
|
|
6913
|
+
sandbox?: string | undefined;
|
|
6914
|
+
}>> | undefined): ElementSpec;
|
|
6915
|
+
};
|
|
6916
|
+
|
|
6917
|
+
/**
|
|
6918
|
+
* The space `plitzi create --template blank` starts from, as a file: tokens, a layout and one empty page — for a
|
|
6919
|
+
* project about to be something specific, where the welcome tour is the first thing that would be deleted.
|
|
6920
|
+
*/
|
|
6921
|
+
export declare const emptySpaceSource: ({ name }?: {
|
|
6922
|
+
name?: string;
|
|
6923
|
+
}) => string;
|
|
6924
|
+
|
|
6925
|
+
export declare const emptySpaceSpec: SpaceSpec;
|
|
6926
|
+
|
|
5402
6927
|
/**
|
|
5403
6928
|
* Expand supported CSS shorthands to their longhand keys, in declaration order: the later declaration wins, as it
|
|
5404
6929
|
* does in a stylesheet. `{ padding: 8, 'padding-left': 0 }` keeps `padding-left: 0`, and
|
|
@@ -5412,9 +6937,112 @@ export declare const expandShorthand: (css: CssProps) => CssProps;
|
|
|
5412
6937
|
* `{ padding: null }` clears all four sides rather than a `padding` key that was never stored. */
|
|
5413
6938
|
export declare const expandShorthandPatch: (css: CssPatch) => CssPatch;
|
|
5414
6939
|
|
|
6940
|
+
/** Everything a name is — an action can be both a global and an element callback (`setState`), and is said as both. */
|
|
6941
|
+
export declare const explain: (name: string) => Explanation[];
|
|
6942
|
+
|
|
6943
|
+
/** What each kind is called when listed. */
|
|
6944
|
+
export declare const EXPLAIN_KINDS: Record<ExplainKind, string>;
|
|
6945
|
+
|
|
6946
|
+
export declare type ExplainKind = Explanation['kind'];
|
|
6947
|
+
|
|
6948
|
+
/** A kind by what it is called when listed (`steps`) or by itself (`step`). */
|
|
6949
|
+
export declare const explainKindOf: (name: string) => ExplainKind | undefined;
|
|
6950
|
+
|
|
6951
|
+
/** Every name of one kind, with a line about each — what to ask `explain` about next. */
|
|
6952
|
+
export declare const explainList: (kind: ExplainKind) => {
|
|
6953
|
+
name: string;
|
|
6954
|
+
summary: string;
|
|
6955
|
+
}[];
|
|
6956
|
+
|
|
6957
|
+
export declare type Explanation = {
|
|
6958
|
+
kind: 'element';
|
|
6959
|
+
name: string;
|
|
6960
|
+
label: string;
|
|
6961
|
+
description: string;
|
|
6962
|
+
factory: string;
|
|
6963
|
+
attributes: {
|
|
6964
|
+
name: string;
|
|
6965
|
+
default?: unknown;
|
|
6966
|
+
values?: readonly string[];
|
|
6967
|
+
}[];
|
|
6968
|
+
triggers: string[];
|
|
6969
|
+
callbacks: string[];
|
|
6970
|
+
slots: string[];
|
|
6971
|
+
/** The type it has to be inside, for one that only works in another. */
|
|
6972
|
+
inside?: string;
|
|
6973
|
+
/** The name its data source is published under: `<source>_<id>`. */
|
|
6974
|
+
source?: string;
|
|
6975
|
+
holdsChildren: boolean;
|
|
6976
|
+
} | {
|
|
6977
|
+
kind: 'step';
|
|
6978
|
+
name: string;
|
|
6979
|
+
title: string;
|
|
6980
|
+
/** How the runtime finds it: a global callback by its module, an element callback on an element, a utility alone. */
|
|
6981
|
+
type: 'globalCallback' | 'callback' | 'utility';
|
|
6982
|
+
/** The authoring function that writes it, when there is one. */
|
|
6983
|
+
builder?: string;
|
|
6984
|
+
/** The element types that answer to it, for an element callback. */
|
|
6985
|
+
answeredBy?: string[];
|
|
6986
|
+
params: ParamInfo[];
|
|
6987
|
+
} | {
|
|
6988
|
+
kind: 'trigger';
|
|
6989
|
+
name: string;
|
|
6990
|
+
title: string;
|
|
6991
|
+
builder?: string;
|
|
6992
|
+
/** What a flow it starts reads: `{{ <step>.field }}`. */
|
|
6993
|
+
reads: string[];
|
|
6994
|
+
/** The types that fire it — every element, or the ones named. */
|
|
6995
|
+
firedBy: string[] | 'every element';
|
|
6996
|
+
params: ParamInfo[];
|
|
6997
|
+
} | {
|
|
6998
|
+
kind: 'code';
|
|
6999
|
+
name: string;
|
|
7000
|
+
codeKind: AuthoringCodeEntry['kind'];
|
|
7001
|
+
means: string;
|
|
7002
|
+
fix: string;
|
|
7003
|
+
} | {
|
|
7004
|
+
kind: 'transformer';
|
|
7005
|
+
name: string;
|
|
7006
|
+
title: string;
|
|
7007
|
+
description: string;
|
|
7008
|
+
params: ParamInfo[];
|
|
7009
|
+
};
|
|
7010
|
+
|
|
7011
|
+
/** One explanation as text, for a person or an agent reading a terminal. */
|
|
7012
|
+
export declare const explanationText: (explanation: Explanation) => string;
|
|
7013
|
+
|
|
7014
|
+
/** A failed flow in one line, with the steps that failed under it. */
|
|
7015
|
+
export declare const failedFlowText: (flow: DevToolsFlow) => string;
|
|
7016
|
+
|
|
5415
7017
|
/** The lint codes `fixSpace` knows how to settle: what the builder offers to fix, and what the server will fix. */
|
|
5416
7018
|
export declare const FIXABLE_CODES: ReadonlySet<string>;
|
|
5417
7019
|
|
|
7020
|
+
/**
|
|
7021
|
+
* A change a fix made, in the words the author wrote it with: an attribute, one of the element's own fields
|
|
7022
|
+
* (`visible`), a binding by its target, or a field of one of its steps (`on`, a param). What lets the same fix be
|
|
7023
|
+
* offered as an edit to the source that wrote the element, as well as made to its document.
|
|
7024
|
+
*/
|
|
7025
|
+
export declare interface FixChange {
|
|
7026
|
+
on: 'attribute' | 'field' | 'binding' | {
|
|
7027
|
+
step: string;
|
|
7028
|
+
};
|
|
7029
|
+
/** `replace` swaps one literal text for another anywhere under the key — a transformer's action in a binding. */
|
|
7030
|
+
op: 'remove' | 'rename' | 'set' | 'replace';
|
|
7031
|
+
/** The attribute, field or param; a binding's target; the text `replace` looks for. */
|
|
7032
|
+
key: string;
|
|
7033
|
+
/** What `rename` renames to, and what `replace` writes. */
|
|
7034
|
+
to?: string;
|
|
7035
|
+
/** What `set` writes. */
|
|
7036
|
+
value?: string | boolean;
|
|
7037
|
+
}
|
|
7038
|
+
|
|
7039
|
+
/** What is wrong with a declaration, and what of it has one fix. */
|
|
7040
|
+
export declare interface FixPlan {
|
|
7041
|
+
/** Every problem the linter reports — errors and warnings alike, whether or not the space would be refused. */
|
|
7042
|
+
problems: PlanProblem[];
|
|
7043
|
+
fixes: PlannedFix[];
|
|
7044
|
+
}
|
|
7045
|
+
|
|
5418
7046
|
export declare interface FixResult {
|
|
5419
7047
|
schema: Schema;
|
|
5420
7048
|
style: Style;
|
|
@@ -5427,6 +7055,19 @@ export declare interface FixResult {
|
|
|
5427
7055
|
*/
|
|
5428
7056
|
export declare const fixSpace: (space: SpaceDocuments, options?: LintCatalogs, codes?: Iterable<string>, elements?: Iterable<string>) => FixResult;
|
|
5429
7057
|
|
|
7058
|
+
/**
|
|
7059
|
+
* The gate an element's or a page's `flag` writes: `'newCheckout'` while the flag is on, `'!newCheckout'` while it is
|
|
7060
|
+
* off. Whether the flag is DECLARED is `lintSpace`'s to say, with the declared ones to choose from; a value that names
|
|
7061
|
+
* no flag at all is refused here, where it was written.
|
|
7062
|
+
*/
|
|
7063
|
+
export declare const flagGateOf: (flag: unknown, where: string) => ElementFlagGate | undefined;
|
|
7064
|
+
|
|
7065
|
+
/** The other way round, for a document read back into a spec. */
|
|
7066
|
+
export declare const flagSpecOf: (gate: ElementFlagGate) => string;
|
|
7067
|
+
|
|
7068
|
+
/** Every step's id, flow by flow, as `authorFlows` writes them — where a step of the document was in the source. */
|
|
7069
|
+
export declare const flowStepIds: (flows: StepSpec[][]) => string[][];
|
|
7070
|
+
|
|
5430
7071
|
export declare const fontAwesome: {
|
|
5431
7072
|
(props?: ElementProps<Partial<{
|
|
5432
7073
|
size?: string | undefined;
|
|
@@ -5442,7 +7083,7 @@ export declare const fontAwesome: {
|
|
|
5442
7083
|
}>> | undefined): ElementSpec;
|
|
5443
7084
|
};
|
|
5444
7085
|
|
|
5445
|
-
declare type FontBase = {
|
|
7086
|
+
export declare type FontBase = {
|
|
5446
7087
|
/** What `font-family` names. Unique within a space. */
|
|
5447
7088
|
family: string;
|
|
5448
7089
|
/** Appended to the stack — `'Lato', sans-serif` — and what renders while the face loads. */
|
|
@@ -5457,6 +7098,7 @@ declare type FontBase = {
|
|
|
5457
7098
|
};
|
|
5458
7099
|
|
|
5459
7100
|
declare type FontDisplay_2 = 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
|
|
7101
|
+
export { FontDisplay_2 as FontDisplay }
|
|
5460
7102
|
|
|
5461
7103
|
/** One face of a family: the file carrying a given weight and slant. */
|
|
5462
7104
|
declare type FontFace_2 = {
|
|
@@ -5466,8 +7108,9 @@ declare type FontFace_2 = {
|
|
|
5466
7108
|
/** Limits the face to the code points it covers, so the browser fetches it only when needed. */
|
|
5467
7109
|
unicodeRange?: string;
|
|
5468
7110
|
};
|
|
7111
|
+
export { FontFace_2 as FontFace }
|
|
5469
7112
|
|
|
5470
|
-
declare type FontStyle = 'normal' | 'italic';
|
|
7113
|
+
export declare type FontStyle = 'normal' | 'italic';
|
|
5471
7114
|
|
|
5472
7115
|
export declare const form: {
|
|
5473
7116
|
(props?: ElementProps<Partial<{
|
|
@@ -5489,8 +7132,8 @@ export declare const form: {
|
|
|
5489
7132
|
};
|
|
5490
7133
|
|
|
5491
7134
|
export declare const formControl: {
|
|
5492
|
-
(props?: ElementProps<FormControlAttributes> | undefined): ElementSpec;
|
|
5493
|
-
(children: ElementSpec[], props?: ElementProps<FormControlAttributes> | undefined): ElementSpec;
|
|
7135
|
+
(props?: ElementProps< FormControlAttributes> | undefined): ElementSpec;
|
|
7136
|
+
(children: ElementSpec[], props?: ElementProps< FormControlAttributes> | undefined): ElementSpec;
|
|
5494
7137
|
};
|
|
5495
7138
|
|
|
5496
7139
|
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
@@ -5574,7 +7217,7 @@ export declare const getTransformer: (action: string) => BuiltinTransformer | un
|
|
|
5574
7217
|
export declare const getUtility: (action: string) => BuiltinUtility | undefined;
|
|
5575
7218
|
|
|
5576
7219
|
/**
|
|
5577
|
-
* The sources that belong to nobody, registered once for the whole space.
|
|
7220
|
+
* The sources that belong to nobody, registered once for the whole space — the runtime's own list.
|
|
5578
7221
|
*
|
|
5579
7222
|
* They are named as themselves rather than as `<type>_<id>`, which is what tells them apart from a source an
|
|
5580
7223
|
* element publishes — and is why an element may not answer to one of these names.
|
|
@@ -5585,12 +7228,14 @@ export declare const getUtility: (action: string) => BuiltinUtility | undefined;
|
|
|
5585
7228
|
*
|
|
5586
7229
|
* `theme` is `{ mode, resolved }` — `resolved` is always `light` or `dark`, which is what a URL or a rule wants.
|
|
5587
7230
|
*
|
|
7231
|
+
* `flags` holds the space's feature flags (`SpaceSpec.flags`) as they resolved, by name: `true` or `false`.
|
|
7232
|
+
*
|
|
5588
7233
|
* `computed` holds the space's own computed values (`SpaceSpec.computed`), by name.
|
|
5589
7234
|
*/
|
|
5590
|
-
export declare const GLOBAL_SOURCES: string[];
|
|
7235
|
+
export declare const GLOBAL_SOURCES: readonly string[];
|
|
5591
7236
|
|
|
5592
7237
|
/** Google Fonts, reached through the single aggregated `css2` request the resolver builds. */
|
|
5593
|
-
declare type GoogleFont = FontBase & {
|
|
7238
|
+
export declare type GoogleFont = FontBase & {
|
|
5594
7239
|
source: 'google';
|
|
5595
7240
|
subsets?: string[];
|
|
5596
7241
|
};
|
|
@@ -5638,23 +7283,31 @@ export declare const hostAction: (params: {
|
|
|
5638
7283
|
/** Uploaded to this deployment's font store. `path` is store-relative and never absolute: a
|
|
5639
7284
|
* manifest that carried `https://cdn.plitzi.com/...` would follow a space onto a server that is
|
|
5640
7285
|
* not ours and keep asking Plitzi for its fonts. The URL is made at render time. */
|
|
5641
|
-
declare type HostedFont = FontBase & {
|
|
7286
|
+
export declare type HostedFont = FontBase & {
|
|
5642
7287
|
source: 'hosted';
|
|
5643
7288
|
files: (FontFace_2 & {
|
|
5644
7289
|
path: string;
|
|
5645
7290
|
})[];
|
|
5646
7291
|
};
|
|
5647
7292
|
|
|
7293
|
+
declare type IconPlacement = 'before' | 'after';
|
|
7294
|
+
|
|
5648
7295
|
export declare const image: {
|
|
5649
7296
|
(props?: ElementProps<Partial<{
|
|
7297
|
+
height?: number | undefined;
|
|
7298
|
+
width?: number | undefined;
|
|
5650
7299
|
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
7300
|
+
sizes?: string | undefined;
|
|
5651
7301
|
src?: string | undefined;
|
|
5652
7302
|
alt?: string | undefined;
|
|
5653
7303
|
decorative?: boolean | undefined;
|
|
5654
7304
|
loadMode?: "auto" | "eager" | "lazy" | undefined;
|
|
5655
7305
|
}>> | undefined): ElementSpec;
|
|
5656
7306
|
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
7307
|
+
height?: number | undefined;
|
|
7308
|
+
width?: number | undefined;
|
|
5657
7309
|
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
7310
|
+
sizes?: string | undefined;
|
|
5658
7311
|
src?: string | undefined;
|
|
5659
7312
|
alt?: string | undefined;
|
|
5660
7313
|
decorative?: boolean | undefined;
|
|
@@ -5662,6 +7315,151 @@ export declare const image: {
|
|
|
5662
7315
|
}>> | undefined): ElementSpec;
|
|
5663
7316
|
};
|
|
5664
7317
|
|
|
7318
|
+
export declare interface ImportAsset {
|
|
7319
|
+
src: string;
|
|
7320
|
+
alt: string;
|
|
7321
|
+
width: number;
|
|
7322
|
+
height: number;
|
|
7323
|
+
}
|
|
7324
|
+
|
|
7325
|
+
/** Where a colour was seen: an element by its path, and which of its colours. */
|
|
7326
|
+
export declare interface ImportColourSample {
|
|
7327
|
+
path: string;
|
|
7328
|
+
property: 'color' | 'background-color';
|
|
7329
|
+
}
|
|
7330
|
+
|
|
7331
|
+
export declare interface Imported {
|
|
7332
|
+
files: ImportedFile[];
|
|
7333
|
+
summary: ImportSummary;
|
|
7334
|
+
}
|
|
7335
|
+
|
|
7336
|
+
/** The colours the page shows in the dark scheme, by the light colour each one replaces. */
|
|
7337
|
+
export declare interface ImportedDark {
|
|
7338
|
+
colours: Record<string, string>;
|
|
7339
|
+
customProperties: Record<string, string>;
|
|
7340
|
+
}
|
|
7341
|
+
|
|
7342
|
+
export declare interface ImportedFile {
|
|
7343
|
+
/** Relative to the folder the import is written in. */
|
|
7344
|
+
path: string;
|
|
7345
|
+
content: string;
|
|
7346
|
+
}
|
|
7347
|
+
|
|
7348
|
+
/**
|
|
7349
|
+
* The files an import is written as: tokens, the outline, one JSON per repeated list, the pictures it found and a
|
|
7350
|
+
* page saying what was not carried over. Pure — the CLI measures, takes the screenshots and writes them to disk.
|
|
7351
|
+
*/
|
|
7352
|
+
export declare const importedFiles: ({ probes, dark }: ImportedPage) => Imported;
|
|
7353
|
+
|
|
7354
|
+
/** The page as it was measured: once per width, and what changes in the dark scheme when it has one. */
|
|
7355
|
+
export declare interface ImportedPage {
|
|
7356
|
+
probes: ImportProbe[];
|
|
7357
|
+
dark?: ImportedDark;
|
|
7358
|
+
}
|
|
7359
|
+
|
|
7360
|
+
/** A run of siblings with the same shape — cards, rows, links — and the fields each one shows. */
|
|
7361
|
+
export declare interface ImportList {
|
|
7362
|
+
/** The heading of the block it is in, as written — the file it is saved as is named after it — or `''` with none. */
|
|
7363
|
+
name: string;
|
|
7364
|
+
path: string;
|
|
7365
|
+
items: Record<string, string>[];
|
|
7366
|
+
}
|
|
7367
|
+
|
|
7368
|
+
/**
|
|
7369
|
+
* A page measured for import: what it is built from — its tokens, the outline of its landmarks with their real
|
|
7370
|
+
* measures, the lists it repeats, its pictures — read in the browser that rendered it. Not its words: an import is a
|
|
7371
|
+
* place to start writing from, and the structure is what takes longest to work out by hand.
|
|
7372
|
+
*/
|
|
7373
|
+
/** One block of the page's outline, by where it is in the document. */
|
|
7374
|
+
export declare interface ImportNode {
|
|
7375
|
+
/** Its place among its parent's elements, from the body down: `0/2/1`. The same element at another width. */
|
|
7376
|
+
path: string;
|
|
7377
|
+
tag: string;
|
|
7378
|
+
/** The text of its first heading, which names it. */
|
|
7379
|
+
heading?: string;
|
|
7380
|
+
/** The `id` the page gave it. */
|
|
7381
|
+
id?: string;
|
|
7382
|
+
width: number;
|
|
7383
|
+
height: number;
|
|
7384
|
+
/** Its layout, as the page computes it: only what differs from a plain block. */
|
|
7385
|
+
style: Record<string, string>;
|
|
7386
|
+
/** How many siblings like it there are, when it stands for a repeated item. */
|
|
7387
|
+
repeats?: number;
|
|
7388
|
+
children: ImportNode[];
|
|
7389
|
+
}
|
|
7390
|
+
|
|
7391
|
+
export declare interface ImportProbe {
|
|
7392
|
+
url: string;
|
|
7393
|
+
title: string;
|
|
7394
|
+
/** The viewport width it was measured at. */
|
|
7395
|
+
width: number;
|
|
7396
|
+
/** The custom properties `:root` (or `html`) declares, resolved. */
|
|
7397
|
+
customProperties: Record<string, string>;
|
|
7398
|
+
/**
|
|
7399
|
+
* The colours that cover most of the page: its background, its text, and the next few — each with where it was seen,
|
|
7400
|
+
* so the same place can be read again in the dark scheme.
|
|
7401
|
+
*/
|
|
7402
|
+
colors: {
|
|
7403
|
+
background?: string;
|
|
7404
|
+
foreground?: string;
|
|
7405
|
+
accents: string[];
|
|
7406
|
+
samples: Record<string, ImportColourSample>;
|
|
7407
|
+
};
|
|
7408
|
+
fonts: {
|
|
7409
|
+
body?: string;
|
|
7410
|
+
heading?: string;
|
|
7411
|
+
google: {
|
|
7412
|
+
family: string;
|
|
7413
|
+
weights: number[];
|
|
7414
|
+
}[];
|
|
7415
|
+
loaded: string[];
|
|
7416
|
+
};
|
|
7417
|
+
/** Corner radii and shadows used three times or more, most used first. */
|
|
7418
|
+
radii: string[];
|
|
7419
|
+
shadows: string[];
|
|
7420
|
+
outline: ImportNode[];
|
|
7421
|
+
lists: ImportList[];
|
|
7422
|
+
assets: ImportAsset[];
|
|
7423
|
+
/** The colours at {@link ImportProbeInput.read}, in its order: `''` where nothing is there any more. */
|
|
7424
|
+
read: string[];
|
|
7425
|
+
}
|
|
7426
|
+
|
|
7427
|
+
/** Runs in the page. Self-contained — it is serialised. */
|
|
7428
|
+
export declare const importProbe: ({ depth, read }: ImportProbeInput) => ImportProbe;
|
|
7429
|
+
|
|
7430
|
+
export declare interface ImportProbeInput {
|
|
7431
|
+
/** At most this many blocks deep below the body. */
|
|
7432
|
+
depth: number;
|
|
7433
|
+
/** Places to read a colour at — another probe's samples, read again in another scheme. */
|
|
7434
|
+
read?: ImportColourSample[];
|
|
7435
|
+
}
|
|
7436
|
+
|
|
7437
|
+
export declare const importSlug: (text: string) => string;
|
|
7438
|
+
|
|
7439
|
+
/** What an import found, counted — the few lines `plitzi import` answers with. */
|
|
7440
|
+
export declare interface ImportSummary {
|
|
7441
|
+
url: string;
|
|
7442
|
+
widths: number[];
|
|
7443
|
+
colours: number;
|
|
7444
|
+
/** Whether the page had a scheme of its own in the dark, rather than the light one again. */
|
|
7445
|
+
dark: boolean;
|
|
7446
|
+
shadows: number;
|
|
7447
|
+
radii: number;
|
|
7448
|
+
fonts: string[];
|
|
7449
|
+
blocks: number;
|
|
7450
|
+
lists: {
|
|
7451
|
+
file: string;
|
|
7452
|
+
rows: number;
|
|
7453
|
+
}[];
|
|
7454
|
+
pictures: number;
|
|
7455
|
+
}
|
|
7456
|
+
|
|
7457
|
+
/**
|
|
7458
|
+
* What a link's `href` says it is when the author did not say: a path is a route of this space, a URL is somewhere
|
|
7459
|
+
* else, anything else is a page's id. `mode` stays for the rare link that means otherwise.
|
|
7460
|
+
*/
|
|
7461
|
+
export declare const inferredLinkMode: (href: unknown) => "page" | "internal" | "external";
|
|
7462
|
+
|
|
5665
7463
|
/**
|
|
5666
7464
|
* The half of `inspectPage` that needs no space: images, sideways scroll, legibility — for a page whose documents are
|
|
5667
7465
|
* not in hand, like an example served by somebody else's server. `page` in the report is `document`.
|
|
@@ -5712,7 +7510,7 @@ export declare const inspectRenders: (page: RenderEvaluator, act: () => Promise<
|
|
|
5712
7510
|
|
|
5713
7511
|
declare const interactionBasicTriggers: Record<string, InteractionCallback>;
|
|
5714
7512
|
|
|
5715
|
-
declare type InteractionCallback<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
7513
|
+
export declare type InteractionCallback<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5716
7514
|
elementId?: string;
|
|
5717
7515
|
action: string;
|
|
5718
7516
|
title: string;
|
|
@@ -5736,12 +7534,12 @@ declare type InteractionCallback<T extends Record<string, unknown> = Record<stri
|
|
|
5736
7534
|
* report back TO that element — a server action running detached finishes long after the flow that launched it
|
|
5737
7535
|
* returned, and `onFlowEnd` has to fire somewhere specific.
|
|
5738
7536
|
*/
|
|
5739
|
-
declare type InteractionCallbackContext = {
|
|
7537
|
+
export declare type InteractionCallbackContext = {
|
|
5740
7538
|
/** Id of the element this flow fired on. Absent for a flow with no host element. */
|
|
5741
7539
|
hostElementId?: string;
|
|
5742
7540
|
};
|
|
5743
7541
|
|
|
5744
|
-
declare type InteractionCallbackParam<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
7542
|
+
export declare type InteractionCallbackParam<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5745
7543
|
canBind?: boolean;
|
|
5746
7544
|
label?: string;
|
|
5747
7545
|
when?: boolean | ((params: InteractionCallbackParamValues<T>) => boolean);
|
|
@@ -5795,17 +7593,17 @@ declare type InteractionCallbackParam<T extends Record<string, unknown> = Record
|
|
|
5795
7593
|
}[]);
|
|
5796
7594
|
});
|
|
5797
7595
|
|
|
5798
|
-
declare type InteractionCallbackParamValues<T extends Record<string, unknown> = Record<string, unknown>> = T;
|
|
7596
|
+
export declare type InteractionCallbackParamValues<T extends Record<string, unknown> = Record<string, unknown>> = T;
|
|
5799
7597
|
|
|
5800
|
-
declare type InteractionCallbackPreview = string | Record<string, unknown>;
|
|
7598
|
+
export declare type InteractionCallbackPreview = string | Record<string, unknown>;
|
|
5801
7599
|
|
|
5802
|
-
declare type InteractionCallbackPreviews = Record<string, InteractionCallbackPreview>;
|
|
7600
|
+
export declare type InteractionCallbackPreviews = Record<string, InteractionCallbackPreview>;
|
|
5803
7601
|
|
|
5804
|
-
declare type InteractionCallbackType = 'trigger' | 'globalCallback' | 'callback' | 'utility' | 'task';
|
|
7602
|
+
export declare type InteractionCallbackType = 'trigger' | 'globalCallback' | 'callback' | 'utility' | 'task';
|
|
5805
7603
|
|
|
5806
|
-
declare type InteractionParamType = 'boolean' | 'select' | 'text' | 'textarea' | 'codemirror-text' | 'codemirror-json' | 'elements';
|
|
7604
|
+
export declare type InteractionParamType = 'boolean' | 'select' | 'text' | 'textarea' | 'codemirror-text' | 'codemirror-json' | 'elements';
|
|
5807
7605
|
|
|
5808
|
-
declare type InteractionPostCallback<T extends Record<string, unknown> = Record<string, unknown>> = (params: InteractionCallbackParamValues<T>, callbackResult?: unknown) => unknown;
|
|
7606
|
+
export declare type InteractionPostCallback<T extends Record<string, unknown> = Record<string, unknown>> = (params: InteractionCallbackParamValues<T>, callbackResult?: unknown) => unknown;
|
|
5809
7607
|
|
|
5810
7608
|
/**
|
|
5811
7609
|
* Tells the page's browser requests the data behind them changed, so the api containers showing them ask again.
|
|
@@ -5835,6 +7633,9 @@ export declare interface InvalidParam {
|
|
|
5835
7633
|
* that is not really used. Callers gate this to CLOSED (strict) catalogs, whose types we own authoritatively. */
|
|
5836
7634
|
export declare const invalidParams: (provided: Record<string, unknown>, effective: Record<string, unknown>, spec: ParamSpec) => InvalidParam[];
|
|
5837
7635
|
|
|
7636
|
+
/** An entry of an element's class list that is rules of its own rather than a class. */
|
|
7637
|
+
export declare const isClassModifier: (entry: ClassRef | StyleSpec) => entry is StyleSpec;
|
|
7638
|
+
|
|
5838
7639
|
export declare const isCssProperty: (key: string) => boolean;
|
|
5839
7640
|
|
|
5840
7641
|
/**
|
|
@@ -5925,20 +7726,17 @@ export declare interface LayoutSpec {
|
|
|
5925
7726
|
body: ElementSpec[];
|
|
5926
7727
|
}
|
|
5927
7728
|
|
|
5928
|
-
export declare const link: {
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
target?: "self" | "blank" | "parent" | "top" | undefined;
|
|
5940
|
-
}>> | undefined): ElementSpec;
|
|
5941
|
-
};
|
|
7729
|
+
export declare const link: ElementFactory<Partial<{
|
|
7730
|
+
mode?: "page" | "internal" | "external" | undefined;
|
|
7731
|
+
href?: string | undefined;
|
|
7732
|
+
label?: string | undefined;
|
|
7733
|
+
target?: "self" | "blank" | "parent" | "top" | undefined;
|
|
7734
|
+
content?: string | undefined;
|
|
7735
|
+
icon?: string | undefined;
|
|
7736
|
+
iconPlacement?: IconPlacement | undefined;
|
|
7737
|
+
contentPlacement?: "before" | "after" | undefined;
|
|
7738
|
+
hash?: string | undefined;
|
|
7739
|
+
}>>;
|
|
5942
7740
|
|
|
5943
7741
|
export declare type LintCatalogs = AuthorSpaceOptions;
|
|
5944
7742
|
|
|
@@ -5958,24 +7756,44 @@ export declare interface LintResult {
|
|
|
5958
7756
|
*/
|
|
5959
7757
|
export declare const lintSpace: (space: SpaceDocuments, options?: LintCatalogs) => LintResult;
|
|
5960
7758
|
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
};
|
|
7759
|
+
/**
|
|
7760
|
+
* A list's `items` may name the source its rows come from, in their place: `list({ items: 'catalog.data.products' })`
|
|
7761
|
+
* — or be a typed source's path (`items: site.data.grid`), whose `row` is then handed its item typed.
|
|
7762
|
+
*/
|
|
7763
|
+
export declare function list<Item>(props: TypedListProps<Item>): ElementSpec;
|
|
7764
|
+
|
|
7765
|
+
export declare function list(props?: ListProps): ElementSpec;
|
|
7766
|
+
|
|
7767
|
+
export declare function list(children: ElementSpec[], props?: ListProps): ElementSpec;
|
|
7768
|
+
|
|
7769
|
+
declare type ListAttributes = AttributesOf<typeof elementDeclarations.List>;
|
|
5973
7770
|
|
|
5974
7771
|
export declare const listItem: {
|
|
5975
7772
|
(props?: AuthoringProps | undefined): ElementSpec;
|
|
5976
7773
|
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
5977
7774
|
};
|
|
5978
7775
|
|
|
7776
|
+
declare type ListProps = ElementProps<Omit<ListAttributes, 'items'> & {
|
|
7777
|
+
items?: ListAttributes['items'] | string;
|
|
7778
|
+
}>;
|
|
7779
|
+
|
|
7780
|
+
/** A list's row by its names: short in a binding or `from`, spelled in full in a template or an attribute's token. */
|
|
7781
|
+
export declare interface ListRow {
|
|
7782
|
+
/** The list's own name, as the space knows it. */
|
|
7783
|
+
list: string;
|
|
7784
|
+
/** The source its rows publish, in full: `list_rows`, `carousel_hero`. */
|
|
7785
|
+
source: string;
|
|
7786
|
+
/** The row's item: `rows.item`, and a field of it `` `${r.item}.title` ``. */
|
|
7787
|
+
item: string;
|
|
7788
|
+
/** Its position: `rows.index`. */
|
|
7789
|
+
index: string;
|
|
7790
|
+
/** The same names in full, for a template or an attribute token: `{{ list_rows.item.slug }}`. */
|
|
7791
|
+
inTemplate: {
|
|
7792
|
+
item: string;
|
|
7793
|
+
index: string;
|
|
7794
|
+
};
|
|
7795
|
+
}
|
|
7796
|
+
|
|
5979
7797
|
/**
|
|
5980
7798
|
* A driver's locator for an authored element, by name.
|
|
5981
7799
|
*
|
|
@@ -5996,7 +7814,7 @@ export declare interface LocatorSource<L> {
|
|
|
5996
7814
|
locator(selector: string): L;
|
|
5997
7815
|
}
|
|
5998
7816
|
|
|
5999
|
-
declare type ManifestAsset = {
|
|
7817
|
+
export declare type ManifestAsset = {
|
|
6000
7818
|
integrity?: string;
|
|
6001
7819
|
src?: string;
|
|
6002
7820
|
srcPath?: string;
|
|
@@ -6026,6 +7844,9 @@ export declare const modalContainer: {
|
|
|
6026
7844
|
}>> | undefined): ElementSpec;
|
|
6027
7845
|
};
|
|
6028
7846
|
|
|
7847
|
+
/** The name of the class an element's own rules on top of its classes become. */
|
|
7848
|
+
export declare const modifierClassName: (elementId: string) => string;
|
|
7849
|
+
|
|
6029
7850
|
/**
|
|
6030
7851
|
* Moves one entry between two lists, and does nothing if it is not in the first.
|
|
6031
7852
|
*
|
|
@@ -6058,6 +7879,8 @@ export declare const nodeHtml: ElementFactory<Partial<{
|
|
|
6058
7879
|
slot?: string | undefined | undefined;
|
|
6059
7880
|
title?: string | undefined | undefined;
|
|
6060
7881
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
7882
|
+
hidden?: boolean | undefined | undefined;
|
|
7883
|
+
onScroll?: UIEventHandler<"span"> | undefined;
|
|
6061
7884
|
onLoad?: ReactEventHandler<"span"> | undefined;
|
|
6062
7885
|
onClick?: MouseEventHandler<"span"> | undefined;
|
|
6063
7886
|
onPointerDown?: PointerEventHandler<"span"> | undefined;
|
|
@@ -6266,7 +8089,6 @@ export declare const nodeHtml: ElementFactory<Partial<{
|
|
|
6266
8089
|
onGotPointerCaptureCapture?: PointerEventHandler<"span"> | undefined;
|
|
6267
8090
|
onLostPointerCapture?: PointerEventHandler<"span"> | undefined;
|
|
6268
8091
|
onLostPointerCaptureCapture?: PointerEventHandler<"span"> | undefined;
|
|
6269
|
-
onScroll?: UIEventHandler<"span"> | undefined;
|
|
6270
8092
|
onScrollCapture?: UIEventHandler<"span"> | undefined;
|
|
6271
8093
|
onScrollEnd?: UIEventHandler<"span"> | undefined;
|
|
6272
8094
|
onScrollEndCapture?: UIEventHandler<"span"> | undefined;
|
|
@@ -6298,7 +8120,6 @@ export declare const nodeHtml: ElementFactory<Partial<{
|
|
|
6298
8120
|
dir?: string | undefined | undefined;
|
|
6299
8121
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
6300
8122
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
6301
|
-
hidden?: boolean | undefined | undefined;
|
|
6302
8123
|
spellCheck?: (boolean | "false" | "true") | undefined;
|
|
6303
8124
|
translate?: "yes" | "no" | undefined | undefined;
|
|
6304
8125
|
radioGroup?: string | undefined | undefined;
|
|
@@ -6333,12 +8154,10 @@ export declare const nodeHtml: ElementFactory<Partial<{
|
|
|
6333
8154
|
subType?: "span" | undefined;
|
|
6334
8155
|
}>>;
|
|
6335
8156
|
|
|
6336
|
-
/**
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
* would end the declaration early and let the rest of the text become rules of its own.
|
|
6341
|
-
*/
|
|
8157
|
+
/** Every field `notifications` takes — what an editor of the setting (the MCP server's `patchSettings`) offers. */
|
|
8158
|
+
export declare const NOTIFICATIONS_FIELDS: readonly (keyof NotificationsSpec)[];
|
|
8159
|
+
|
|
8160
|
+
/** The rule that styles the toast container, or `''` when there is nothing to say; refuses a spec that is not sound. */
|
|
6342
8161
|
export declare const notificationsCss: (spec: NotificationsSpec | undefined) => string;
|
|
6343
8162
|
|
|
6344
8163
|
/**
|
|
@@ -6359,6 +8178,16 @@ export declare interface NotificationsSpec {
|
|
|
6359
8178
|
info?: string;
|
|
6360
8179
|
/** Corner radius, e.g. `'12px'`. */
|
|
6361
8180
|
radius?: string;
|
|
8181
|
+
/** Its typeface — the space's own, as a token: `'var(--font-sans)'`. */
|
|
8182
|
+
font?: string;
|
|
8183
|
+
/** Its text size, e.g. `'13px'`. */
|
|
8184
|
+
fontSize?: string;
|
|
8185
|
+
/** Its edge, as `border` writes it: `'1px solid var(--border)'`. */
|
|
8186
|
+
border?: string;
|
|
8187
|
+
/** Its depth, as `box-shadow` writes it: `'var(--shadow-lg)'`. */
|
|
8188
|
+
shadow?: string;
|
|
8189
|
+
/** The room inside it, e.g. `'12px 14px'`. */
|
|
8190
|
+
padding?: string;
|
|
6362
8191
|
}
|
|
6363
8192
|
|
|
6364
8193
|
export declare const on: (trigger: ElementTriggerName | (string & {}), params?: Record<string, unknown>) => StepSpec;
|
|
@@ -6377,6 +8206,15 @@ export declare const onFlowError: () => StepSpec;
|
|
|
6377
8206
|
|
|
6378
8207
|
export declare const onFlowProgress: () => StepSpec;
|
|
6379
8208
|
|
|
8209
|
+
/**
|
|
8210
|
+
* Every `ms` milliseconds while the element is on the page and the tab is in view — an autoplay, a clock, a refresh:
|
|
8211
|
+
* `[[onInterval(5000), setState({ key: 'slide', type: 'number', value: '{{ ((state.slide ?? 0) + 1) % 4 }}' })]]`.
|
|
8212
|
+
*
|
|
8213
|
+
* At least 250 ms. It does not tick in the builder outside preview. To pause it, put a condition on its steps
|
|
8214
|
+
* (`when(...)`) — a state an `onMouseEnter` sets, say. `{{ <this step's id>.count }}` is how many times it has ticked.
|
|
8215
|
+
*/
|
|
8216
|
+
export declare const onInterval: (ms: number) => StepSpec;
|
|
8217
|
+
|
|
6380
8218
|
/**
|
|
6381
8219
|
* A keyboard shortcut, heard on the whole page for as long as the element is mounted: `onKey('f')`,
|
|
6382
8220
|
* `onKey('shift+f')`, `onKey('mod+k')` (⌘ on a Mac, Ctrl elsewhere), several at once with commas (`onKey('plus, =')`).
|
|
@@ -6389,13 +8227,6 @@ export declare const onKey: (keys: string) => StepSpec;
|
|
|
6389
8227
|
|
|
6390
8228
|
export declare const onLoad: () => StepSpec;
|
|
6391
8229
|
|
|
6392
|
-
/**
|
|
6393
|
-
* A page has this second load event in addition to {@link onLoad}.
|
|
6394
|
-
*
|
|
6395
|
-
* `onLoad` runs for every mounted element, including a page. `onPageLoad` belongs only to the page and carries its
|
|
6396
|
-
* id plus the current route and query params, so it is the one to use when a flow needs to make a decision from the
|
|
6397
|
-
* address that brought the visitor here.
|
|
6398
|
-
*/
|
|
6399
8230
|
export declare const onPageLoad: () => StepSpec;
|
|
6400
8231
|
|
|
6401
8232
|
/** The press, before it is a click — where a drag away from the element starts. A click still follows it. */
|
|
@@ -6427,6 +8258,13 @@ export declare interface OnScreenOptions {
|
|
|
6427
8258
|
ignore?: string[];
|
|
6428
8259
|
}
|
|
6429
8260
|
|
|
8261
|
+
/**
|
|
8262
|
+
* The element's own box scrolled; once on mount too. Its flow reads `{ x, y, atStart, atEnd }` — name the trigger
|
|
8263
|
+
* and hide the arrow at the end already reached: `[named('row', onScroll()), setState({ key: 'atEnd', type:
|
|
8264
|
+
* 'boolean', value: '{{ row.atEnd }}' })]`.
|
|
8265
|
+
*/
|
|
8266
|
+
export declare const onScroll: () => StepSpec;
|
|
8267
|
+
|
|
6430
8268
|
/**
|
|
6431
8269
|
* A form submitting itself, with the values keyed by each control's `name`.
|
|
6432
8270
|
*
|
|
@@ -6459,7 +8297,7 @@ export declare interface PageEvaluator {
|
|
|
6459
8297
|
evaluate<R>(fn: (input: ProbeInput) => R, input: ProbeInput): Promise<R>;
|
|
6460
8298
|
}
|
|
6461
8299
|
|
|
6462
|
-
declare type PageFolder = {
|
|
8300
|
+
export declare type PageFolder = {
|
|
6463
8301
|
id: string;
|
|
6464
8302
|
name: string;
|
|
6465
8303
|
slug: string;
|
|
@@ -6499,6 +8337,13 @@ export declare interface PageHandle extends ElementHandle {
|
|
|
6499
8337
|
elements: Record<string, ElementHandle>;
|
|
6500
8338
|
}
|
|
6501
8339
|
|
|
8340
|
+
/**
|
|
8341
|
+
* Runs in the page that was pictured: its parts, where they are on the full page — its landmarks (header, nav, main,
|
|
8342
|
+
* footer, each section and aside), or, on a page that has none, the named blocks right inside the page. Each named by
|
|
8343
|
+
* its tag and its id or element name (`section#plans`, `div#hero`). Self-contained — it is serialised.
|
|
8344
|
+
*/
|
|
8345
|
+
export declare const pageRegions: () => PictureRegion[];
|
|
8346
|
+
|
|
6502
8347
|
export declare interface PageReport {
|
|
6503
8348
|
/** The page that was inspected, by id. */
|
|
6504
8349
|
page: string;
|
|
@@ -6555,6 +8400,8 @@ export declare interface PageSpec {
|
|
|
6555
8400
|
/** As {@link ElementSpec.class} — a shared class instead of a selector of this page's own. */
|
|
6556
8401
|
class?: ClassList;
|
|
6557
8402
|
flows?: StepSpec[][];
|
|
8403
|
+
/** As {@link ElementSpec.flag}: a page whose flag says no is not found. */
|
|
8404
|
+
flag?: string;
|
|
6558
8405
|
body: ElementSpec[];
|
|
6559
8406
|
}
|
|
6560
8407
|
|
|
@@ -6595,17 +8442,107 @@ export declare const paragraph: ElementFactory<Partial<{
|
|
|
6595
8442
|
content?: string | number | undefined;
|
|
6596
8443
|
}>>;
|
|
6597
8444
|
|
|
8445
|
+
/**
|
|
8446
|
+
* What a name means in the authoring surface — an element type, a step, a trigger, a problem's code, a transformer —
|
|
8447
|
+
* answered from the catalogues the checks themselves read, so it cannot say anything they do not.
|
|
8448
|
+
*
|
|
8449
|
+
* The question an agent otherwise answers by searching eight thousand lines of `.d.ts`: what does `navigate` take,
|
|
8450
|
+
* what does `onPageLoad` hand its flow, what attributes has a `container`. `plitzi explain` prints it, and the MCP
|
|
8451
|
+
* serves it, from here.
|
|
8452
|
+
*/
|
|
8453
|
+
export declare interface ParamInfo {
|
|
8454
|
+
name: string;
|
|
8455
|
+
type: string;
|
|
8456
|
+
description?: string;
|
|
8457
|
+
default?: unknown;
|
|
8458
|
+
options?: readonly string[];
|
|
8459
|
+
required?: boolean;
|
|
8460
|
+
}
|
|
8461
|
+
|
|
6598
8462
|
export declare type ParamSpec = Record<string, BuiltinParam>;
|
|
6599
8463
|
|
|
8464
|
+
declare const PATH: unique symbol;
|
|
8465
|
+
|
|
6600
8466
|
/** The route for a slug: authoring stores it bare, and everything that navigates wants it absolute. */
|
|
6601
8467
|
export declare const pathForSlug: (slug: string) => string;
|
|
6602
8468
|
|
|
6603
|
-
declare
|
|
8469
|
+
export declare interface PictureDiff {
|
|
8470
|
+
width: number;
|
|
8471
|
+
height: number;
|
|
8472
|
+
/** The share of pixels that differ, in percent, to one decimal. */
|
|
8473
|
+
changed: number;
|
|
8474
|
+
regions: {
|
|
8475
|
+
name: string;
|
|
8476
|
+
changed: number;
|
|
8477
|
+
}[];
|
|
8478
|
+
/** Both pictures beside each other, and the differences in red over a faded copy of the first — PNG data URLs. */
|
|
8479
|
+
sideBySide: string;
|
|
8480
|
+
diff: string;
|
|
8481
|
+
}
|
|
8482
|
+
|
|
8483
|
+
export declare interface PictureDiffInput {
|
|
8484
|
+
/** The two pictures, as `data:image/png;base64,…` URLs. */
|
|
8485
|
+
a: string;
|
|
8486
|
+
b: string;
|
|
8487
|
+
regions: PictureRegion[];
|
|
8488
|
+
/** How far apart two channels may be and still count as the same pixel (0–255) — anti-aliasing is not a change. */
|
|
8489
|
+
tolerance: number;
|
|
8490
|
+
}
|
|
8491
|
+
|
|
8492
|
+
/** Anything that can run a function in a browser page — Playwright's `Page`, Puppeteer's. */
|
|
8493
|
+
export declare interface PictureDriver {
|
|
8494
|
+
evaluate<R, A>(fn: (input: A) => R | Promise<R>, input: A): Promise<R>;
|
|
8495
|
+
}
|
|
8496
|
+
|
|
8497
|
+
/**
|
|
8498
|
+
* Two pictures of a page compared in numbers — how much differs, overall and in each part of the page — so an agent
|
|
8499
|
+
* reads "footer 2 %, spotlight 14 %" instead of looking at two full screenshots, and opens a picture only where the
|
|
8500
|
+
* numbers say something moved.
|
|
8501
|
+
*
|
|
8502
|
+
* The comparison runs in a browser page (any driver's `evaluate`): a canvas is the one image decoder every driver
|
|
8503
|
+
* already has, so this package stays one that installs nothing.
|
|
8504
|
+
*/
|
|
8505
|
+
/** A part of the page, by where it is in the picture: the landmarks a page is read by. */
|
|
8506
|
+
export declare interface PictureRegion {
|
|
8507
|
+
name: string;
|
|
8508
|
+
x: number;
|
|
8509
|
+
y: number;
|
|
8510
|
+
width: number;
|
|
8511
|
+
height: number;
|
|
8512
|
+
}
|
|
8513
|
+
|
|
8514
|
+
/**
|
|
8515
|
+
* `planFixes`, holding the same catalogs: every fix `fixSpace` would make in this declaration, each with the place in
|
|
8516
|
+
* the author's code that wrote the element and the edit that makes the fix there — what `plitzi fix` shows and writes.
|
|
8517
|
+
*/
|
|
8518
|
+
export declare const planFixes: (spec: SpaceSpec, options?: AuthorSpaceOptions) => FixPlan;
|
|
8519
|
+
|
|
8520
|
+
/** One fix `fixSpace` would make, with where it was written and the edit that makes it there. */
|
|
8521
|
+
export declare interface PlannedFix {
|
|
8522
|
+
code: string;
|
|
8523
|
+
message: string;
|
|
8524
|
+
elementId: string | null;
|
|
8525
|
+
/** Where the element was written: `src/site/home.ts:42`. Absent for an element no factory wrote. */
|
|
8526
|
+
at?: string;
|
|
8527
|
+
/** The same place exactly — the factory's name, at its line and column — which is what the edit is made at. */
|
|
8528
|
+
position?: WrittenPosition;
|
|
8529
|
+
/** Absent when the fix has no one way to be written in the source — it is said, and left to the author. */
|
|
8530
|
+
edit?: SpecEdit;
|
|
8531
|
+
}
|
|
8532
|
+
|
|
8533
|
+
/** A problem the linter reports, by its code and the element it is on. */
|
|
8534
|
+
export declare interface PlanProblem {
|
|
8535
|
+
code: string;
|
|
8536
|
+
elementId: string | null;
|
|
8537
|
+
message: string;
|
|
8538
|
+
}
|
|
8539
|
+
|
|
8540
|
+
export declare type PluginBuilder = {
|
|
6604
8541
|
canDelete?: boolean;
|
|
6605
8542
|
canDragDrop?: boolean;
|
|
6606
8543
|
canSelect?: boolean;
|
|
6607
8544
|
canMove?: boolean;
|
|
6608
|
-
|
|
8545
|
+
canSnippet?: boolean;
|
|
6609
8546
|
itemsAllowed?: string[];
|
|
6610
8547
|
itemsNotAllowed?: string[];
|
|
6611
8548
|
};
|
|
@@ -6703,7 +8640,7 @@ export declare interface PluginHostOptions {
|
|
|
6703
8640
|
};
|
|
6704
8641
|
}
|
|
6705
8642
|
|
|
6706
|
-
declare type PluginManifest = {
|
|
8643
|
+
export declare type PluginManifest = {
|
|
6707
8644
|
assets: Record<string, ManifestAsset>;
|
|
6708
8645
|
assetsSettings: Record<string, ManifestAsset>;
|
|
6709
8646
|
author: string;
|
|
@@ -6729,7 +8666,7 @@ declare type PluginManifest = {
|
|
|
6729
8666
|
version: string;
|
|
6730
8667
|
};
|
|
6731
8668
|
|
|
6732
|
-
declare type PluginSchema = {
|
|
8669
|
+
export declare type PluginSchema = {
|
|
6733
8670
|
attributes: Element_2['attributes'];
|
|
6734
8671
|
builder: PluginBuilder;
|
|
6735
8672
|
initialItems?: string[];
|
|
@@ -6803,6 +8740,12 @@ declare type ProviderPagination = 'none' | 'url' | 'append';
|
|
|
6803
8740
|
*/
|
|
6804
8741
|
export declare const publishOn: (target: string, type: string, data?: unknown) => StepSpec;
|
|
6805
8742
|
|
|
8743
|
+
/** The page's dev tools, read: the flows that ran and, when asked, the state, the sources and one element. */
|
|
8744
|
+
export declare const readDevTools: (driver: DevToolsDriver, input: DevToolsInput) => Promise<DevToolsReport>;
|
|
8745
|
+
|
|
8746
|
+
/** Runs in the page. Self-contained — it is serialised — and it trusts nothing it reads off `window`. */
|
|
8747
|
+
export declare const readDevToolsInPage: ({ state, element }: DevToolsInput) => DevToolsReport;
|
|
8748
|
+
|
|
6806
8749
|
/** Reconcile supplied params to a catalog schema: drop unknown keys when the set is CLOSED (strict), then fill the
|
|
6807
8750
|
* builder's defaults for any declared param the agent omitted whose `when` guard holds. Mirrors what the builder
|
|
6808
8751
|
* stores, so the persisted node round-trips cleanly. */
|
|
@@ -6819,6 +8762,13 @@ export declare const reference: {
|
|
|
6819
8762
|
}>> | undefined): ElementSpec;
|
|
6820
8763
|
};
|
|
6821
8764
|
|
|
8765
|
+
export declare type RefusalCode = {
|
|
8766
|
+
[Code in AuthoringCode]: Codes[Code]['kind'] extends 'refused' ? Code : never;
|
|
8767
|
+
}[AuthoringCode];
|
|
8768
|
+
|
|
8769
|
+
/** What a thrown problem says as a refusal: its code and sentence when it is an `AuthoringError`, its message otherwise. */
|
|
8770
|
+
export declare const refusalOf: (error: unknown) => Pick<SpaceRefusal, "code" | "message">;
|
|
8771
|
+
|
|
6822
8772
|
/**
|
|
6823
8773
|
* Asks an `apiContainer` to fetch again, by id.
|
|
6824
8774
|
*
|
|
@@ -6835,7 +8785,7 @@ export declare const reloadApi: (target: string, input?: Record<string, string>)
|
|
|
6835
8785
|
|
|
6836
8786
|
/** Someone else's origin — Adobe Fonts, Bunny, Fontshare, the customer's own CDN. Either a
|
|
6837
8787
|
* stylesheet that declares the faces, or the files themselves. */
|
|
6838
|
-
declare type RemoteFont = FontBase & {
|
|
8788
|
+
export declare type RemoteFont = FontBase & {
|
|
6839
8789
|
source: 'remote';
|
|
6840
8790
|
stylesheet?: string;
|
|
6841
8791
|
files?: (FontFace_2 & {
|
|
@@ -6925,6 +8875,9 @@ export declare type ResponsiveCss = Partial<Record<DisplayMode | 'compact', CssP
|
|
|
6925
8875
|
/** Per-breakpoint CSS as it reaches the document. */
|
|
6926
8876
|
export declare type ResponsiveStyle = Partial<Record<DisplayMode, StyleRules>>;
|
|
6927
8877
|
|
|
8878
|
+
/** One property's value per breakpoint — `{ desktop: '24px', mobile: '18px' }` — inside a plain rule set. */
|
|
8879
|
+
export declare type ResponsiveValue = Partial<Record<DisplayMode | 'compact', StyleValue>>;
|
|
8880
|
+
|
|
6928
8881
|
export declare const richText: ElementFactory<Partial<{
|
|
6929
8882
|
format?: "html" | "markdown" | "text" | undefined;
|
|
6930
8883
|
content?: string | undefined;
|
|
@@ -6933,6 +8886,9 @@ export declare const richText: ElementFactory<Partial<{
|
|
|
6933
8886
|
|
|
6934
8887
|
export declare const row: (gap: string, extra?: CssProps) => StyleRules;
|
|
6935
8888
|
|
|
8889
|
+
/** What a list's `row` function is: handed the row's names, it writes what the row renders. */
|
|
8890
|
+
export declare type RowWriter<Row> = (row: Row) => ElementSpec | ElementSpec[];
|
|
8891
|
+
|
|
6936
8892
|
export declare type Rule = {
|
|
6937
8893
|
id?: string;
|
|
6938
8894
|
field: string;
|
|
@@ -7008,13 +8964,15 @@ export declare const runServerAction: (params: {
|
|
|
7008
8964
|
/** Whether two normalised selectors say the same thing, whatever order they were written in. */
|
|
7009
8965
|
export declare const sameBlocks: (a: ResponsiveBlock, b: ResponsiveBlock) => boolean;
|
|
7010
8966
|
|
|
7011
|
-
declare type Schema = {
|
|
8967
|
+
export declare type Schema = {
|
|
7012
8968
|
flat: Record<string, Element_2>;
|
|
7013
8969
|
definition: {
|
|
7014
8970
|
name: string;
|
|
7015
8971
|
permanentUrl: string;
|
|
7016
8972
|
};
|
|
7017
8973
|
variables: SchemaVariable[];
|
|
8974
|
+
/** Keyed by the name each is read by. A space that declares none has none — documents written before flags too. */
|
|
8975
|
+
flags?: Record<string, SchemaFlag>;
|
|
7018
8976
|
settings: {
|
|
7019
8977
|
keepState?: boolean;
|
|
7020
8978
|
stateStorage?: 'localStorage' | 'sessionStorage';
|
|
@@ -7118,13 +9076,37 @@ declare type Schema = {
|
|
|
7118
9076
|
*/
|
|
7119
9077
|
export declare const SCHEMA_SETTINGS: readonly ["keepState", "stateStorage", "transientState", "paintedState", "customCss", "visitorRoles", "userProvider", "tokenStorage", "loginUrl", "userUrl", "refreshUrl", "logoutUrl", "detailsPath", "tokenPath", "refreshTokenPath", "expirationTimePath", "refreshExpirationTimePath", "sessionHintCookie", "sessionExchangeUrl", "mfaUrl", "sessionGate", "sessionRevalidateSeconds", "debugMode", "computed", "channels"];
|
|
7120
9078
|
|
|
7121
|
-
|
|
9079
|
+
/**
|
|
9080
|
+
* A feature flag the space declares, under the name it is read by: `{{ flags.newCheckout }}`.
|
|
9081
|
+
*
|
|
9082
|
+
* Read with the document, stored apart from it: each environment has one set, shared by every revision it serves, so a
|
|
9083
|
+
* flag is turned without a new revision and a rollback keeps the flags as they are. A revision keeps a copy of the flags
|
|
9084
|
+
* it was published with, read only when the environment's own cannot be. The draft (`main`) applies whatever it says
|
|
9085
|
+
* now; a published environment, what was last published to it. Its rules see the environment, the host, the URL and
|
|
9086
|
+
* who is visiting (`user.authenticated`, `user.email`, `user.username`, `user.roles`). Whoever runs the space may
|
|
9087
|
+
* override the answer — the server it is rendered by, then the SDK embedding it, then a tester with the dev tools —
|
|
9088
|
+
* but only for flags declared here.
|
|
9089
|
+
*/
|
|
9090
|
+
export declare type SchemaFlag = {
|
|
9091
|
+
description?: string;
|
|
9092
|
+
/** The answer when no rule matches. */
|
|
9093
|
+
value: boolean;
|
|
9094
|
+
rules: SchemaFlagRule[];
|
|
9095
|
+
};
|
|
9096
|
+
|
|
9097
|
+
/** A value a flag takes where its `when` matches. The first rule that matches decides. */
|
|
9098
|
+
export declare type SchemaFlagRule = {
|
|
9099
|
+
when: RuleGroup;
|
|
9100
|
+
value: boolean;
|
|
9101
|
+
};
|
|
9102
|
+
|
|
9103
|
+
export declare type SchemaRsc = {
|
|
7122
9104
|
enabled?: boolean;
|
|
7123
9105
|
/** Wire protocol for RSC updates. 'json' is the default (data-only). 'stream' uses the RSC wire format (requires react-server condition). */
|
|
7124
9106
|
transport?: 'json' | 'stream';
|
|
7125
9107
|
};
|
|
7126
9108
|
|
|
7127
|
-
declare type SchemaValidationError = {
|
|
9109
|
+
export declare type SchemaValidationError = {
|
|
7128
9110
|
code: string;
|
|
7129
9111
|
message: string;
|
|
7130
9112
|
elementId?: string;
|
|
@@ -7133,7 +9115,7 @@ declare type SchemaValidationError = {
|
|
|
7133
9115
|
details?: unknown;
|
|
7134
9116
|
};
|
|
7135
9117
|
|
|
7136
|
-
declare type SchemaValidationOptions = {
|
|
9118
|
+
export declare type SchemaValidationOptions = {
|
|
7137
9119
|
/** Validates `flat` as a fragment hung off this element — a component's tree — instead of as the pages' tree. */
|
|
7138
9120
|
baseElementId?: string;
|
|
7139
9121
|
/**
|
|
@@ -7146,13 +9128,13 @@ declare type SchemaValidationOptions = {
|
|
|
7146
9128
|
sourceTypes?: Record<string, string>;
|
|
7147
9129
|
};
|
|
7148
9130
|
|
|
7149
|
-
declare type SchemaValidationResult = {
|
|
9131
|
+
export declare type SchemaValidationResult = {
|
|
7150
9132
|
valid: boolean;
|
|
7151
9133
|
errors: SchemaValidationError[];
|
|
7152
9134
|
warnings: SchemaValidationError[];
|
|
7153
9135
|
};
|
|
7154
9136
|
|
|
7155
|
-
declare type SchemaVariable = SchemaVariableBase<'number', number> | SchemaVariableBase<'checkbox' | 'switch', boolean> | SchemaVariableBase<'text' | 'email' | 'password' | 'select' | 'select2' | 'textarea' | 'color', string>;
|
|
9137
|
+
export declare type SchemaVariable = SchemaVariableBase<'number', number> | SchemaVariableBase<'checkbox' | 'switch', boolean> | SchemaVariableBase<'text' | 'email' | 'password' | 'select' | 'select2' | 'textarea' | 'color', string>;
|
|
7156
9138
|
|
|
7157
9139
|
declare type SchemaVariableBase<TType extends string, TValue> = {
|
|
7158
9140
|
name: string;
|
|
@@ -7165,6 +9147,117 @@ declare type SchemaVariableBase<TType extends string, TValue> = {
|
|
|
7165
9147
|
}[];
|
|
7166
9148
|
};
|
|
7167
9149
|
|
|
9150
|
+
/**
|
|
9151
|
+
* Builds a part of the space whose ids are its own: every `id` given inside is prefixed — `scope('promos', ref => …)`
|
|
9152
|
+
* makes `id: 'panel'` the element `promos-panel` — so a helper that writes the same block twice writes two sets of ids,
|
|
9153
|
+
* not one id twice. `ref('slides')` is the full name, for whatever names a scoped element: a binding, a step's target,
|
|
9154
|
+
* a template (`` `{{ list_${ref('slides')}.index }}` ``). Scopes nest; a list's `row` already reads its list's full name.
|
|
9155
|
+
*/
|
|
9156
|
+
export declare const scope: <T>(prefix: string, build: (ref: (id: string) => string) => T) => T;
|
|
9157
|
+
|
|
9158
|
+
declare const SCROLL_BEHAVIORS: readonly ["smooth", "auto"];
|
|
9159
|
+
|
|
9160
|
+
/**
|
|
9161
|
+
* Moving what an element shows, on the element whose box scrolls (`overflow: auto` on a row of cards, a panel) — or,
|
|
9162
|
+
* with `scrollIntoView`, the page to an element. Arrows over a carousel that still swipes on a phone, a "back to the
|
|
9163
|
+
* top", a jump to the answer a form just showed. Its node names the element that moves; nothing happens where there is
|
|
9164
|
+
* no page to move (a server render).
|
|
9165
|
+
*/
|
|
9166
|
+
export declare const SCROLL_CALLBACKS: {
|
|
9167
|
+
scrollBy: {
|
|
9168
|
+
title: string;
|
|
9169
|
+
type: "callback";
|
|
9170
|
+
strictParams: true;
|
|
9171
|
+
params: {
|
|
9172
|
+
x: {
|
|
9173
|
+
type: "text";
|
|
9174
|
+
description: string;
|
|
9175
|
+
default: string;
|
|
9176
|
+
};
|
|
9177
|
+
y: {
|
|
9178
|
+
type: "text";
|
|
9179
|
+
description: string;
|
|
9180
|
+
default: string;
|
|
9181
|
+
};
|
|
9182
|
+
behavior: BuiltinParam;
|
|
9183
|
+
};
|
|
9184
|
+
};
|
|
9185
|
+
scrollTo: {
|
|
9186
|
+
title: string;
|
|
9187
|
+
type: "callback";
|
|
9188
|
+
strictParams: true;
|
|
9189
|
+
params: {
|
|
9190
|
+
x: {
|
|
9191
|
+
type: "text";
|
|
9192
|
+
description: string;
|
|
9193
|
+
default: string;
|
|
9194
|
+
};
|
|
9195
|
+
y: {
|
|
9196
|
+
type: "text";
|
|
9197
|
+
description: string;
|
|
9198
|
+
default: string;
|
|
9199
|
+
};
|
|
9200
|
+
behavior: BuiltinParam;
|
|
9201
|
+
};
|
|
9202
|
+
};
|
|
9203
|
+
scrollIntoView: {
|
|
9204
|
+
title: string;
|
|
9205
|
+
type: "callback";
|
|
9206
|
+
strictParams: true;
|
|
9207
|
+
params: {
|
|
9208
|
+
block: {
|
|
9209
|
+
type: "select";
|
|
9210
|
+
description: string;
|
|
9211
|
+
default: string;
|
|
9212
|
+
options: ("start" | "center" | "end" | "nearest")[];
|
|
9213
|
+
};
|
|
9214
|
+
inline: {
|
|
9215
|
+
type: "select";
|
|
9216
|
+
description: string;
|
|
9217
|
+
default: string;
|
|
9218
|
+
options: ("start" | "center" | "end" | "nearest")[];
|
|
9219
|
+
};
|
|
9220
|
+
behavior: BuiltinParam;
|
|
9221
|
+
};
|
|
9222
|
+
};
|
|
9223
|
+
};
|
|
9224
|
+
|
|
9225
|
+
/** Where `scrollIntoView` lands an element, on each axis. */
|
|
9226
|
+
declare const SCROLL_POSITIONS: readonly ["start", "center", "end", "nearest"];
|
|
9227
|
+
|
|
9228
|
+
/**
|
|
9229
|
+
* Moves what an element's box shows — a row of cards with `overflow: auto`, a panel — by an amount: pixels (`'240'`) or
|
|
9230
|
+
* a share of what the box shows (`'80%'`); negative goes back. `target` is the element whose box scrolls.
|
|
9231
|
+
*
|
|
9232
|
+
* `[onClick(), scrollBy('cards', { x: '80%' })]` is the "next" arrow over a row that still swipes on a phone.
|
|
9233
|
+
*/
|
|
9234
|
+
declare const scrollBy_2: (target: string, move: ScrollMove) => StepSpec;
|
|
9235
|
+
export { scrollBy_2 as scrollBy }
|
|
9236
|
+
|
|
9237
|
+
/**
|
|
9238
|
+
* Brings an element into view — the page, and every box around it that scrolls. For a link to a part of the page,
|
|
9239
|
+
* an `anchor` and a link's `hash` say it without a flow; this is for a flow that has more to do.
|
|
9240
|
+
*/
|
|
9241
|
+
export declare const scrollIntoView: (target: string, where?: {
|
|
9242
|
+
block?: ScrollStepPosition;
|
|
9243
|
+
inline?: ScrollStepPosition;
|
|
9244
|
+
behavior?: ScrollStepBehavior;
|
|
9245
|
+
}) => StepSpec;
|
|
9246
|
+
|
|
9247
|
+
declare type ScrollMove = {
|
|
9248
|
+
x?: string;
|
|
9249
|
+
y?: string;
|
|
9250
|
+
behavior?: ScrollStepBehavior;
|
|
9251
|
+
};
|
|
9252
|
+
|
|
9253
|
+
declare type ScrollStepBehavior = (typeof SCROLL_BEHAVIORS)[number];
|
|
9254
|
+
|
|
9255
|
+
declare type ScrollStepPosition = (typeof SCROLL_POSITIONS)[number];
|
|
9256
|
+
|
|
9257
|
+
/** Moves an element's box to a place: `'start'`, `'end'`, pixels from the start, or a share of the way (`'50%'`). */
|
|
9258
|
+
declare const scrollTo_2: (target: string, place: ScrollMove) => StepSpec;
|
|
9259
|
+
export { scrollTo_2 as scrollTo }
|
|
9260
|
+
|
|
7168
9261
|
export declare const selectorFor: (id: string) => string;
|
|
7169
9262
|
|
|
7170
9263
|
/**
|
|
@@ -7224,9 +9317,106 @@ export declare const singlePageSpace: (body: ElementSpec[], space?: Partial<Omit
|
|
|
7224
9317
|
*/
|
|
7225
9318
|
export declare const slugify: (value: string, fallback: string) => string;
|
|
7226
9319
|
|
|
9320
|
+
/**
|
|
9321
|
+
* A published snippet: a subtree, the style that dresses it, and the element a builder instantiates.
|
|
9322
|
+
*
|
|
9323
|
+
* The artefact someone hosts when they are not building a space — fetched by URL, shown in the Resources panel,
|
|
9324
|
+
* dragged onto a canvas — which is why it lives beside the schema and the style rather than with the builder's own
|
|
9325
|
+
* types: it is a document, produced and consumed by processes that never open a builder.
|
|
9326
|
+
*/
|
|
9327
|
+
export declare type Snippet = {
|
|
9328
|
+
id?: string;
|
|
9329
|
+
definition: {
|
|
9330
|
+
name: string;
|
|
9331
|
+
description: string;
|
|
9332
|
+
/** Root of what travels. Its subtree is the whole of `schema.flat`, and it answers to no parent. */
|
|
9333
|
+
baseElementId: Element_2['id'];
|
|
9334
|
+
};
|
|
9335
|
+
/**
|
|
9336
|
+
* Only what travels: the subtree and the variables its rules read. Nothing else of the space it was cut from — its
|
|
9337
|
+
* pages, settings or components — comes along, and a builder showing or dropping it reads nothing else.
|
|
9338
|
+
*/
|
|
9339
|
+
schema: Pick<Schema, 'flat' | 'variables'>;
|
|
9340
|
+
style: Style;
|
|
9341
|
+
};
|
|
9342
|
+
|
|
9343
|
+
/**
|
|
9344
|
+
* What a snippet author declares: a name, a description and a subtree.
|
|
9345
|
+
*
|
|
9346
|
+
* The style half is declared exactly as a space declares it — the classes the subtree names, the element defaults
|
|
9347
|
+
* it relies on, the variables its rules read — because that is precisely what has to TRAVEL with it. A snippet
|
|
9348
|
+
* that names a class the space it lands in happens not to declare renders unstyled, so anything the subtree reads
|
|
9349
|
+
* is carried in the manifest rather than assumed.
|
|
9350
|
+
*/
|
|
9351
|
+
export declare interface SnippetSpec {
|
|
9352
|
+
name: string;
|
|
9353
|
+
description: string;
|
|
9354
|
+
/**
|
|
9355
|
+
* What this snippet's ids are derived from, as `permanentUrl` is for a space. Defaults to a slug of the name.
|
|
9356
|
+
*
|
|
9357
|
+
* Ids are re-generated when the snippet is dropped into a space, so this decides nothing at run time — it
|
|
9358
|
+
* decides only that authoring the same snippet twice writes the same file.
|
|
9359
|
+
*/
|
|
9360
|
+
key?: string;
|
|
9361
|
+
variables?: Partial<StyleVariables>;
|
|
9362
|
+
/** As {@link SpaceSpec.classes}. Every class the subtree names has to be declared here, or it does not travel. */
|
|
9363
|
+
classes?: Record<string, StyleSpec | StyleDeclaration>;
|
|
9364
|
+
elements?: Record<string, ElementStyleSpec>;
|
|
9365
|
+
schemaVariables?: SchemaVariable[];
|
|
9366
|
+
mode?: Style['mode'];
|
|
9367
|
+
theme?: Style['theme'];
|
|
9368
|
+
/** The subtree, and its root is the element a builder instantiates. */
|
|
9369
|
+
root: ElementSpec;
|
|
9370
|
+
}
|
|
9371
|
+
|
|
9372
|
+
/**
|
|
9373
|
+
* The `apiContainer` with this id as a typed source, its `data` typed — and checked — by a sample of the answer: the
|
|
9374
|
+
* JSON file the query reads, imported (`import home from './home.json' with { type: 'json' }`):
|
|
9375
|
+
*
|
|
9376
|
+
* ```ts
|
|
9377
|
+
* const site = source('site', home);
|
|
9378
|
+
* apiContainer({ id: site.id, query: '/data/home.json', children: [heading({ from: site.data.hero.title })] });
|
|
9379
|
+
* ```
|
|
9380
|
+
*
|
|
9381
|
+
* A path the sample does not have is a type error, and refused (`source-field-unknown`) where the types were not
|
|
9382
|
+
* looking. Nothing of the sample is written into the space. Inside a `scope()`, the id is the scoped one, as the
|
|
9383
|
+
* element's is.
|
|
9384
|
+
*/
|
|
9385
|
+
export declare const source: <Data>(id: string, sample: Data) => SourcePath<ApiContainerSource<Data>> & {
|
|
9386
|
+
readonly id: string;
|
|
9387
|
+
};
|
|
9388
|
+
|
|
9389
|
+
/** What every path to a source's value is, whatever it leads to. */
|
|
9390
|
+
declare interface SourceBrand {
|
|
9391
|
+
readonly [PATH]: string;
|
|
9392
|
+
/** The full name: `String(site.data.total)`. */
|
|
9393
|
+
toString(): string;
|
|
9394
|
+
}
|
|
9395
|
+
|
|
7227
9396
|
/** What an element publishes: the source prefix its type registers under, by the id it was given. */
|
|
7228
9397
|
export declare type SourceIndex = Map<string, string>;
|
|
7229
9398
|
|
|
9399
|
+
/** A source's name: written by hand (`'catalog.data.products'`), or reached through {@link source}. */
|
|
9400
|
+
export declare type SourceName = string | SourceBrand;
|
|
9401
|
+
|
|
9402
|
+
/**
|
|
9403
|
+
* A path into a source, typed by a sample of what it holds: `site.data.hero.title` is the name
|
|
9404
|
+
* `apiContainer_site.data.hero.title`. A field the sample does not have is a type error where it is written. It is
|
|
9405
|
+
* the full name, so it reads the same in `from`, `items`, `bind` and a template (`` `{{ ${site.data.total} }}` ``); an
|
|
9406
|
+
* item of a list is `.0`, `.1` — `site.data.sections[1]`.
|
|
9407
|
+
*/
|
|
9408
|
+
export declare type SourcePath<T> = SourceBrand & (T extends readonly (infer Item)[] ? {
|
|
9409
|
+
readonly [index: number]: SourcePath<Item>;
|
|
9410
|
+
} : T extends object ? {
|
|
9411
|
+
readonly [Key in keyof T]-?: SourcePath<T[Key]>;
|
|
9412
|
+
} : unknown);
|
|
9413
|
+
|
|
9414
|
+
/** The row of a list fed by a typed source: its item as the sample's item, its position as a number. */
|
|
9415
|
+
export declare interface SourceRow<Item> {
|
|
9416
|
+
item: SourcePath<Item>;
|
|
9417
|
+
index: SourcePath<number>;
|
|
9418
|
+
}
|
|
9419
|
+
|
|
7230
9420
|
/**
|
|
7231
9421
|
* Which element types publish a data source, and under what name.
|
|
7232
9422
|
*
|
|
@@ -7236,7 +9426,7 @@ export declare type SourceIndex = Map<string, string>;
|
|
|
7236
9426
|
export declare type SourceTypes = Record<string, string>;
|
|
7237
9427
|
|
|
7238
9428
|
/** The same guarantee for the space itself, in the order its fields are written. */
|
|
7239
|
-
export declare const SPACE_FIELDS: readonly ["name", "permanentUrl", "mode", "theme", "variables", "fonts", "elements", "classes", "schemaVariables", "settings", "computed", "channels", "customCss", "notifications", "rsc", "pageFolders", "layouts", "components", "pages"];
|
|
9429
|
+
export declare const SPACE_FIELDS: readonly ["name", "permanentUrl", "mode", "theme", "variables", "fonts", "elements", "classes", "schemaVariables", "settings", "computed", "formats", "flags", "channels", "customCss", "notifications", "rsc", "pageFolders", "layouts", "components", "pages"];
|
|
7240
9430
|
|
|
7241
9431
|
/**
|
|
7242
9432
|
* The `space` source, which the SDK application registers rather than this package.
|
|
@@ -7255,7 +9445,7 @@ export declare const spaceCallbacks: Record<string, BuiltinGlobalCallback>;
|
|
|
7255
9445
|
* Its tree is a `flat` of its own rather than roots inside `schema.flat`: that one is the tree of the pages, and a
|
|
7256
9446
|
* component belongs to none. Ids are still one namespace across every tree, so an id alone says which tree it is in.
|
|
7257
9447
|
*/
|
|
7258
|
-
declare type SpaceComponent = {
|
|
9448
|
+
export declare type SpaceComponent = {
|
|
7259
9449
|
/** The key it is stored under, and what an instance names in `referenceId`. */
|
|
7260
9450
|
id: string;
|
|
7261
9451
|
label?: string;
|
|
@@ -7270,7 +9460,7 @@ declare type SpaceComponent = {
|
|
|
7270
9460
|
flat: Record<Element_2['id'], Element_2>;
|
|
7271
9461
|
};
|
|
7272
9462
|
|
|
7273
|
-
declare type SpaceCredentialProvider = 's3' | 'r2' | 'ssr' | 'custom' | 'smtp';
|
|
9463
|
+
export declare type SpaceCredentialProvider = 's3' | 'r2' | 'ssr' | 'custom' | 'smtp';
|
|
7274
9464
|
|
|
7275
9465
|
/**
|
|
7276
9466
|
* Whether two pairs of space documents render the same space.
|
|
@@ -7303,7 +9493,7 @@ export declare interface SpaceDocuments {
|
|
|
7303
9493
|
style: Style;
|
|
7304
9494
|
}
|
|
7305
9495
|
|
|
7306
|
-
declare type SpaceFont = SystemFont | GoogleFont | RemoteFont | HostedFont;
|
|
9496
|
+
export declare type SpaceFont = SystemFont | GoogleFont | RemoteFont | HostedFont;
|
|
7307
9497
|
|
|
7308
9498
|
export declare interface SpaceHandles {
|
|
7309
9499
|
/** The pages, by id. */
|
|
@@ -7323,6 +9513,32 @@ export declare interface SpaceHandles {
|
|
|
7323
9513
|
page(idOrSlug: string): PageHandle;
|
|
7324
9514
|
}
|
|
7325
9515
|
|
|
9516
|
+
/** One element `authorSpace` could not write: where to find it, and why. */
|
|
9517
|
+
export declare type SpaceRefusal = {
|
|
9518
|
+
/** The nearest named element and the steps from it — `"store-footer" › container[1]`. Empty for the space itself. */
|
|
9519
|
+
place: string;
|
|
9520
|
+
/** The line of the author's own code that wrote it — `src/site/layout.ts:417` — when a factory recorded one. */
|
|
9521
|
+
at?: string;
|
|
9522
|
+
/** What `authoring-errors.md` files it under — a code of `AUTHORING_CODES`, or a structural one of `validateSchema`. */
|
|
9523
|
+
code?: string;
|
|
9524
|
+
message: string;
|
|
9525
|
+
};
|
|
9526
|
+
|
|
9527
|
+
/**
|
|
9528
|
+
* Everything `authorSpace` refused in one run, rather than the first thing: an author fixes the lot in one pass instead
|
|
9529
|
+
* of discovering them one corrected run at a time. `refusals` holds them as data, for a tool that prints its own.
|
|
9530
|
+
*/
|
|
9531
|
+
export declare class SpaceRefusedError extends Error {
|
|
9532
|
+
readonly refusals: readonly SpaceRefusal[];
|
|
9533
|
+
/**
|
|
9534
|
+
* `linted: false` when elements had to be left out: the documents are not whole, so the space's other checks — the
|
|
9535
|
+
* ones that read what the elements mean — wait for these to be fixed rather than report what is merely missing.
|
|
9536
|
+
*/
|
|
9537
|
+
constructor(space: string, refusals: readonly SpaceRefusal[], { linted }?: {
|
|
9538
|
+
linted?: boolean;
|
|
9539
|
+
});
|
|
9540
|
+
}
|
|
9541
|
+
|
|
7326
9542
|
export declare interface SpaceSpec {
|
|
7327
9543
|
name: string;
|
|
7328
9544
|
permanentUrl: string;
|
|
@@ -7364,6 +9580,35 @@ export declare interface SpaceSpec {
|
|
|
7364
9580
|
* element's source (a list row, a provider) is not readable here: bind that on the element.
|
|
7365
9581
|
*/
|
|
7366
9582
|
computed?: Record<string, string>;
|
|
9583
|
+
/**
|
|
9584
|
+
* Templates by name, for what an element shows of its data: `formats: { price: "{{ source|currency('USD') }}" }`
|
|
9585
|
+
* once, then `text({ from: 'products.item.price', as: 'price' })` anywhere. `source` is the value `from` reads.
|
|
9586
|
+
*/
|
|
9587
|
+
formats?: Record<string, string>;
|
|
9588
|
+
/**
|
|
9589
|
+
* The space's feature flags, by the name each is read by — `{{ flags.newCheckout }}` in a binding or a `when`, and
|
|
9590
|
+
* what an element's or a page's `flag` names:
|
|
9591
|
+
*
|
|
9592
|
+
* ```ts
|
|
9593
|
+
* flags: {
|
|
9594
|
+
* newCheckout: {
|
|
9595
|
+
* description: 'The one-step checkout',
|
|
9596
|
+
* value: false,
|
|
9597
|
+
* rules: [
|
|
9598
|
+
* { when: { combinator: 'and', rules: [{ field: 'environment', operator: '=', value: 'staging' }] }, value: true },
|
|
9599
|
+
* { when: { combinator: 'and', rules: [{ field: 'user.roles', operator: 'contains', value: 'beta' }] }, value: true }
|
|
9600
|
+
* ]
|
|
9601
|
+
* }
|
|
9602
|
+
* }
|
|
9603
|
+
* ```
|
|
9604
|
+
*
|
|
9605
|
+
* `value` is the answer when no rule matches; the first rule that matches decides otherwise. A rule sees
|
|
9606
|
+
* `environment`, `hostname`, `routeParams.*`, `queryParams.*` and the visitor (`user.authenticated`, `user.email`,
|
|
9607
|
+
* `user.username`, `user.roles`). Kept apart from the space's snapshots — one set per environment, turned without a
|
|
9608
|
+
* new snapshot — and served with Plitzi down from a self-hosted server's cache. The server rendering it, the SDK
|
|
9609
|
+
* embedding it and a tester with the dev tools may each override the answer — only for flags declared here. See `docs/en/feature-flags.md`.
|
|
9610
|
+
*/
|
|
9611
|
+
flags?: Schema['flags'];
|
|
7367
9612
|
/**
|
|
7368
9613
|
* The realtime channels the space offers, by topic pattern — what a `channel` element's `topic` must match:
|
|
7369
9614
|
*
|
|
@@ -7434,6 +9679,19 @@ export declare interface SpecCorrection {
|
|
|
7434
9679
|
*/
|
|
7435
9680
|
export declare type SpecCorrectionCode = 'legacy-element-id' | 'legacy-element-type' | 'unknown-element-type' | 'dropped-field' | 'dropped-attribute' | 'fixed-attribute' | 'dropped-setting' | 'missing-element' | 'unreachable-element' | 'folded-state-selector' | 'dropped-selector' | 'unwritable-css' | 'folded-custom-css' | 'unknown-style-state' | 'broken-binding' | 'fixed-binding-source' | 'broken-flow' | 'dead-flow' | 'dead-step' | 'fixed-global-callback' | 'dropped-initial-state' | 'dropped-param' | 'missing-folder' | 'broken-layout';
|
|
7436
9681
|
|
|
9682
|
+
/**
|
|
9683
|
+
* A fix's change as an edit of the source that wrote the element: the same change, on the props of the call that wrote
|
|
9684
|
+
* it — or on one of its steps, by the flow it is in and its place there.
|
|
9685
|
+
*/
|
|
9686
|
+
export declare interface SpecEdit extends Omit<FixChange, 'on'> {
|
|
9687
|
+
on: 'attribute' | 'field' | 'binding' | 'step';
|
|
9688
|
+
/** For a step: which of the element's `flows`, and which step in it. */
|
|
9689
|
+
step?: {
|
|
9690
|
+
flow: number;
|
|
9691
|
+
index: number;
|
|
9692
|
+
};
|
|
9693
|
+
}
|
|
9694
|
+
|
|
7437
9695
|
export declare interface SpecFromSpace {
|
|
7438
9696
|
spec: SpaceSpec;
|
|
7439
9697
|
corrections: SpecCorrection[];
|
|
@@ -7508,9 +9766,29 @@ export declare interface SpecSourceOptions {
|
|
|
7508
9766
|
/** Writes a spec out as source files. See {@link SpecSourceOptions}. */
|
|
7509
9767
|
export declare const specToSource: (spec: SpaceSpec, options: SpecSourceOptions) => SpecSourceFiles;
|
|
7510
9768
|
|
|
9769
|
+
/** An element's class list taken apart: the classes it wears, and the rules of its own written on top of them. */
|
|
9770
|
+
export declare const splitClassList: (value: ElementClassList) => {
|
|
9771
|
+
refs: ClassRef[];
|
|
9772
|
+
modifiers: StyleSpec[];
|
|
9773
|
+
};
|
|
9774
|
+
|
|
9775
|
+
/**
|
|
9776
|
+
* A space's custom CSS read apart: the notifications' rule {@link notificationsCss} wrote, back as the spec, and the
|
|
9777
|
+
* space's own CSS without it — so an editor shows and changes each on its own, and writes them together again with
|
|
9778
|
+
* {@link withNotificationsCss}. A rule someone edited into something else (a declaration that is no field's) is left
|
|
9779
|
+
* where it is, as the space's own CSS: read back, it would lose what was added to it.
|
|
9780
|
+
*/
|
|
9781
|
+
export declare const splitNotificationsCss: (customCss: string) => {
|
|
9782
|
+
notifications: NotificationsSpec;
|
|
9783
|
+
customCss: string;
|
|
9784
|
+
};
|
|
9785
|
+
|
|
7511
9786
|
/** Rules for the states a selector reacts to — `hover`, `focus`, `active` — each one plain or per breakpoint. */
|
|
7512
9787
|
export declare type StatesSpec = Partial<Record<StyleState, CssSpec>>;
|
|
7513
9788
|
|
|
9789
|
+
/** A number a step adds or ends at: written as is, or a template expression (`'apiContainer_site.data.products|length'`). */
|
|
9790
|
+
declare type StepNumber = number | string;
|
|
9791
|
+
|
|
7514
9792
|
/**
|
|
7515
9793
|
* What an author declares, as opposed to what a document stores.
|
|
7516
9794
|
*
|
|
@@ -7542,6 +9820,17 @@ export declare interface StepSpec {
|
|
|
7542
9820
|
whileRunning?: ElementInteraction['whileRunning'];
|
|
7543
9821
|
}
|
|
7544
9822
|
|
|
9823
|
+
/**
|
|
9824
|
+
* Moves a number in state by `by`, stopping at `min` and `max` rather than going round — "show 40 more" up to the
|
|
9825
|
+
* total. Each bound a number or an expression for one, as in {@link cycleState}.
|
|
9826
|
+
*/
|
|
9827
|
+
export declare const stepState: (params: {
|
|
9828
|
+
key: string;
|
|
9829
|
+
by: StepNumber;
|
|
9830
|
+
min?: StepNumber;
|
|
9831
|
+
max?: StepNumber;
|
|
9832
|
+
}) => StepSpec;
|
|
9833
|
+
|
|
7545
9834
|
/**
|
|
7546
9835
|
* What a step is allowed to name, supplied by whoever owns the vocabulary.
|
|
7547
9836
|
*
|
|
@@ -7584,7 +9873,7 @@ export declare interface StepVocabulary {
|
|
|
7584
9873
|
}>;
|
|
7585
9874
|
}
|
|
7586
9875
|
|
|
7587
|
-
declare type Style = {
|
|
9876
|
+
export declare type Style = {
|
|
7588
9877
|
platform: Record<DisplayMode, Record<string, StyleItem>>;
|
|
7589
9878
|
mode?: StyleMode;
|
|
7590
9879
|
theme: {
|
|
@@ -7611,30 +9900,34 @@ export declare const STYLE_STATES: readonly StyleState[];
|
|
|
7611
9900
|
* `focus-visible` is the focus ring a keyboard user needs and a mouse user does not; `focus-within` dresses a
|
|
7612
9901
|
* container while anything inside it has focus — a field wrapper around its input.
|
|
7613
9902
|
*
|
|
9903
|
+
* `current` is the link to the page being shown — the navigation item of where the visitor is. The link says so itself
|
|
9904
|
+
* (`aria-current="page"`, what a screen reader announces too), so a header written once in a layout marks the right item
|
|
9905
|
+
* on every page, which a class chosen per page could not.
|
|
9906
|
+
*
|
|
7614
9907
|
* `hidden` is not a pseudo-class: it is how an element looks while its `visible` says no — where it goes as it hides,
|
|
7615
9908
|
* and where it comes from as it shows. With a transition on the class (`display` among what it transitions, and
|
|
7616
9909
|
* `transition-behavior: allow-discrete`), a panel fades or slides in and out instead of blinking.
|
|
7617
9910
|
*/
|
|
7618
|
-
declare const STYLE_STATES_2: readonly ["hover", "focus", "focus-visible", "focus-within", "active", "disabled", "checked", "visited", "hidden"];
|
|
9911
|
+
declare const STYLE_STATES_2: readonly ["hover", "focus", "focus-visible", "focus-within", "active", "disabled", "checked", "visited", "current", "hidden"];
|
|
7619
9912
|
|
|
7620
|
-
declare type StyleAncestor = {
|
|
9913
|
+
export declare type StyleAncestor = {
|
|
7621
9914
|
default?: StyleObject;
|
|
7622
9915
|
states?: StyleStates;
|
|
7623
9916
|
variants?: StyleVariants;
|
|
7624
9917
|
};
|
|
7625
9918
|
|
|
7626
|
-
declare type StyleAncestors = Record<string, StyleAncestor>;
|
|
9919
|
+
export declare type StyleAncestors = Record<string, StyleAncestor>;
|
|
7627
9920
|
|
|
7628
|
-
declare type StyleAttributes = Record<string, StyleBlock>;
|
|
9921
|
+
export declare type StyleAttributes = Record<string, StyleBlock>;
|
|
7629
9922
|
|
|
7630
|
-
declare type StyleBlock = {
|
|
9923
|
+
export declare type StyleBlock = {
|
|
7631
9924
|
default?: StyleObject;
|
|
7632
9925
|
states?: StyleStates;
|
|
7633
9926
|
variants?: StyleVariants;
|
|
7634
9927
|
ancestors?: StyleAncestors;
|
|
7635
9928
|
};
|
|
7636
9929
|
|
|
7637
|
-
declare type StyleCategory = (typeof styleConstants)[keyof typeof styleConstants];
|
|
9930
|
+
export declare type StyleCategory = (typeof styleConstants)[keyof typeof styleConstants];
|
|
7638
9931
|
|
|
7639
9932
|
declare const styleConstants: {
|
|
7640
9933
|
readonly DISPLAY: "display";
|
|
@@ -7738,6 +10031,11 @@ declare const styleConstants: {
|
|
|
7738
10031
|
readonly APPEARANCE: "appearance";
|
|
7739
10032
|
readonly SCROLL_BEHAVIOR: "scroll-behavior";
|
|
7740
10033
|
readonly OVERSCROLL_BEHAVIOR: "overscroll-behavior";
|
|
10034
|
+
readonly SCROLL_SNAP_TYPE: "scroll-snap-type";
|
|
10035
|
+
readonly SCROLL_SNAP_ALIGN: "scroll-snap-align";
|
|
10036
|
+
readonly SCROLL_SNAP_STOP: "scroll-snap-stop";
|
|
10037
|
+
readonly SCROLL_PADDING_TOP: "scroll-padding-top";
|
|
10038
|
+
readonly SCROLL_MARGIN_TOP: "scroll-margin-top";
|
|
7741
10039
|
readonly ACCENT_COLOR: "accent-color";
|
|
7742
10040
|
readonly CARET_COLOR: "caret-color";
|
|
7743
10041
|
readonly COLOR_SCHEME: "color-scheme";
|
|
@@ -7826,7 +10124,7 @@ export declare interface StyleDeclaration {
|
|
|
7826
10124
|
toString(): string;
|
|
7827
10125
|
}
|
|
7828
10126
|
|
|
7829
|
-
declare type StyleItem = {
|
|
10127
|
+
export declare type StyleItem = {
|
|
7830
10128
|
name: string;
|
|
7831
10129
|
type: TagType;
|
|
7832
10130
|
variables?: Partial<StyleVariables>;
|
|
@@ -7835,9 +10133,9 @@ declare type StyleItem = {
|
|
|
7835
10133
|
componentType?: string;
|
|
7836
10134
|
};
|
|
7837
10135
|
|
|
7838
|
-
declare type StyleMode = 'mobile-first' | 'desktop-first';
|
|
10136
|
+
export declare type StyleMode = 'mobile-first' | 'desktop-first';
|
|
7839
10137
|
|
|
7840
|
-
declare type StyleObject = Partial<Record<StyleCategory, StyleValue>>;
|
|
10138
|
+
export declare type StyleObject = Partial<Record<StyleCategory, StyleValue>>;
|
|
7841
10139
|
|
|
7842
10140
|
/** What reaches the document: expanded longhands, in the vocabulary the style editor understands. */
|
|
7843
10141
|
export declare type StyleRules = StyleObject;
|
|
@@ -7866,32 +10164,68 @@ export declare const styles: (name: string, rules: StyleSpec) => StyleDeclaratio
|
|
|
7866
10164
|
/** A selector's rules in either shape: plain CSS, or CSS with its states and variants beside it. */
|
|
7867
10165
|
export declare type StyleSpec = CssSpec | RuleSetSpec;
|
|
7868
10166
|
|
|
7869
|
-
declare type StyleState = (typeof STYLE_STATES_2)[number];
|
|
10167
|
+
export declare type StyleState = (typeof STYLE_STATES_2)[number];
|
|
7870
10168
|
|
|
7871
|
-
declare type StyleStates = Partial<Record<StyleState, StyleObject>>;
|
|
10169
|
+
export declare type StyleStates = Partial<Record<StyleState, StyleObject>>;
|
|
7872
10170
|
|
|
7873
|
-
declare type StyleThemeValue = Partial<Record<ColorScheme | 'default', string>>;
|
|
10171
|
+
export declare type StyleThemeValue = Partial<Record<ColorScheme | 'default', string>>;
|
|
7874
10172
|
|
|
7875
|
-
declare type StyleValue = number | string;
|
|
10173
|
+
export declare type StyleValue = number | string;
|
|
7876
10174
|
|
|
7877
|
-
declare enum StyleVariableCategory {
|
|
10175
|
+
export declare enum StyleVariableCategory {
|
|
7878
10176
|
COLOR = "color",
|
|
7879
10177
|
SPACING = "spacing",
|
|
7880
10178
|
SHADOW = "shadow",
|
|
7881
10179
|
CUSTOM = "custom"
|
|
7882
10180
|
}
|
|
7883
10181
|
|
|
7884
|
-
declare type StyleVariableGroup = Record<string, StyleVariableValue>;
|
|
10182
|
+
export declare type StyleVariableGroup = Record<string, StyleVariableValue>;
|
|
7885
10183
|
|
|
7886
|
-
declare type StyleVariables = Record<StyleVariableCategory, StyleVariableGroup>;
|
|
10184
|
+
export declare type StyleVariables = Record<StyleVariableCategory, StyleVariableGroup>;
|
|
7887
10185
|
|
|
7888
|
-
declare type StyleVariableValue = string | number | StyleThemeValue;
|
|
10186
|
+
export declare type StyleVariableValue = string | number | StyleThemeValue;
|
|
7889
10187
|
|
|
7890
|
-
declare type StyleVariants = Record<string, Omit<StyleBlock, 'variants' | 'ancestors'>>;
|
|
10188
|
+
export declare type StyleVariants = Record<string, Omit<StyleBlock, 'variants' | 'ancestors'>>;
|
|
7891
10189
|
|
|
7892
10190
|
/** If a camelCase key maps to a known kebab-case property, return it — used to name the correct key in an error. */
|
|
7893
10191
|
export declare const suggestCssProperty: (key: string) => string | undefined;
|
|
7894
10192
|
|
|
10193
|
+
/**
|
|
10194
|
+
* A shorter or lighter way to the same page — not a problem: what is written renders as written.
|
|
10195
|
+
*
|
|
10196
|
+
* `saves` is how many elements the space would no longer carry, the measure suggestions are ranked by; a suggestion
|
|
10197
|
+
* about the stylesheet saves none and is listed after those that do.
|
|
10198
|
+
*/
|
|
10199
|
+
export declare interface Suggestion {
|
|
10200
|
+
code: SuggestionCode;
|
|
10201
|
+
message: string;
|
|
10202
|
+
/** The elements it is about, the first being the one to look at. Empty for one about the stylesheet. */
|
|
10203
|
+
elementIds: string[];
|
|
10204
|
+
saves: number;
|
|
10205
|
+
/** Where the first of them was written: `src/site/home.ts:42`. Absent when no factory wrote it. */
|
|
10206
|
+
at?: string;
|
|
10207
|
+
}
|
|
10208
|
+
|
|
10209
|
+
export declare type SuggestionCode = {
|
|
10210
|
+
[Code in AuthoringCode]: Codes[Code]['kind'] extends 'suggested' ? Code : never;
|
|
10211
|
+
}[AuthoringCode];
|
|
10212
|
+
|
|
10213
|
+
/**
|
|
10214
|
+
* A shorter way to the same page: what a space's documents could say with fewer elements or less CSS — or, for its
|
|
10215
|
+
* animations, a lighter one.
|
|
10216
|
+
*
|
|
10217
|
+
* Not the linter. `lintSpace` reports what renders something other than what was written, and a space is refused or
|
|
10218
|
+
* warned for it; nothing here is wrong — the page renders exactly as written. These are the platform's own ways to say
|
|
10219
|
+
* it once instead of many times (layouts, components, lists, an element's own `content`, a class's states, the SDK's
|
|
10220
|
+
* defaults) or to move it cheaply (the compositor's properties), offered to whoever wrote it the long way: an agent
|
|
10221
|
+
* that did not know them, or a person who has not met them yet. Each names what to write instead, and the ones about
|
|
10222
|
+
* elements say how many it saves, which is what they are ranked by.
|
|
10223
|
+
*/
|
|
10224
|
+
export declare const suggestSpace: ({ schema, style }: {
|
|
10225
|
+
schema: Schema;
|
|
10226
|
+
style: Style;
|
|
10227
|
+
}) => Suggestion[];
|
|
10228
|
+
|
|
7895
10229
|
/** The closest known transformer action to a mistyped one (substring match either way), so a wrong action like
|
|
7896
10230
|
* "template" teaches "twigTemplate". Undefined when nothing is close. */
|
|
7897
10231
|
export declare const suggestTransformer: (action: string) => string | undefined;
|
|
@@ -7899,8 +10233,13 @@ export declare const suggestTransformer: (action: string) => string | undefined;
|
|
|
7899
10233
|
/** The commits as a report. Separate from the page so what a report SAYS is tested without a browser. */
|
|
7900
10234
|
export declare const summariseRenders: (commits: readonly TracedCommit[], max?: number) => RenderReport;
|
|
7901
10235
|
|
|
10236
|
+
export declare const svg: ElementFactory<Partial<{
|
|
10237
|
+
label?: string | undefined;
|
|
10238
|
+
content?: string | undefined;
|
|
10239
|
+
}>>;
|
|
10240
|
+
|
|
7902
10241
|
/** Installed nowhere: a stack the visitor's system already has. Costs no bytes. */
|
|
7903
|
-
declare type SystemFont = FontBase & {
|
|
10242
|
+
export declare type SystemFont = FontBase & {
|
|
7904
10243
|
source: 'system';
|
|
7905
10244
|
};
|
|
7906
10245
|
|
|
@@ -7924,64 +10263,19 @@ export declare const tabContainerItem: {
|
|
|
7924
10263
|
(children: ElementSpec[], props?: AuthoringProps | undefined): ElementSpec;
|
|
7925
10264
|
};
|
|
7926
10265
|
|
|
7927
|
-
declare type TagType = 'class' | 'element' | 'id';
|
|
10266
|
+
export declare type TagType = 'class' | 'element' | 'id';
|
|
7928
10267
|
|
|
7929
|
-
/**
|
|
7930
|
-
|
|
7931
|
-
*
|
|
7932
|
-
* The artefact someone hosts when they are not building a space — fetched by URL, shown in the Resources panel,
|
|
7933
|
-
* dragged onto a canvas — which is why it lives beside the schema and the style rather than with the builder's own
|
|
7934
|
-
* types: it is a document, produced and consumed by processes that never open a builder.
|
|
7935
|
-
*/
|
|
7936
|
-
export declare type Template = {
|
|
7937
|
-
id?: string;
|
|
7938
|
-
definition: {
|
|
7939
|
-
name: string;
|
|
7940
|
-
description: string;
|
|
7941
|
-
/** Root of what travels. Its subtree is the whole of `schema.flat`, and it answers to no parent. */
|
|
7942
|
-
baseElementId: Element_2['id'];
|
|
7943
|
-
};
|
|
7944
|
-
schema: Schema;
|
|
7945
|
-
style: Style;
|
|
7946
|
-
};
|
|
10268
|
+
/** Colour names beside the palette: a space's tokens (`surface: 'var(--surface)'`), or a palette name redefined. */
|
|
10269
|
+
export declare type TailwindColors = Readonly<Record<string, string>>;
|
|
7947
10270
|
|
|
7948
10271
|
/** What a binding's template hands its attribute: its rendered text, or the value of its one `{{ expression }}`. */
|
|
7949
10272
|
export declare type TemplateReturns = 'text' | 'value';
|
|
7950
10273
|
|
|
7951
|
-
/**
|
|
7952
|
-
* What a template author declares: a name, a description and a subtree.
|
|
7953
|
-
*
|
|
7954
|
-
* The style half is declared exactly as a space declares it — the classes the subtree names, the element defaults
|
|
7955
|
-
* it relies on, the variables its rules read — because that is precisely what has to TRAVEL with it. A template
|
|
7956
|
-
* that names a class the space it lands in happens not to declare renders unstyled, so anything the subtree reads
|
|
7957
|
-
* is carried in the manifest rather than assumed.
|
|
7958
|
-
*/
|
|
7959
|
-
export declare interface TemplateSpec {
|
|
7960
|
-
name: string;
|
|
7961
|
-
description: string;
|
|
7962
|
-
/**
|
|
7963
|
-
* What this template's ids are derived from, as `permanentUrl` is for a space. Defaults to a slug of the name.
|
|
7964
|
-
*
|
|
7965
|
-
* Ids are re-generated when the template is dropped into a space, so this decides nothing at run time — it
|
|
7966
|
-
* decides only that authoring the same template twice writes the same file.
|
|
7967
|
-
*/
|
|
7968
|
-
key?: string;
|
|
7969
|
-
variables?: Partial<StyleVariables>;
|
|
7970
|
-
/** As {@link SpaceSpec.classes}. Every class the subtree names has to be declared here, or it does not travel. */
|
|
7971
|
-
classes?: Record<string, StyleSpec | StyleDeclaration>;
|
|
7972
|
-
elements?: Record<string, ElementStyleSpec>;
|
|
7973
|
-
schemaVariables?: SchemaVariable[];
|
|
7974
|
-
mode?: Style['mode'];
|
|
7975
|
-
theme?: Style['theme'];
|
|
7976
|
-
/** The subtree, and its root is the element a builder instantiates. */
|
|
7977
|
-
root: ElementSpec;
|
|
7978
|
-
}
|
|
7979
|
-
|
|
7980
10274
|
export declare const text: ElementFactory<Partial<{
|
|
7981
10275
|
content?: string | number | undefined;
|
|
7982
10276
|
}>>;
|
|
7983
10277
|
|
|
7984
|
-
declare type Theme = 'dark' | 'light' | 'system';
|
|
10278
|
+
export declare type Theme = 'dark' | 'light' | 'system';
|
|
7985
10279
|
|
|
7986
10280
|
export declare const themeToggle: {
|
|
7987
10281
|
(props?: ElementProps<Partial<{
|
|
@@ -8076,6 +10370,17 @@ export declare const toInteractionCallback: <T extends Record<string, unknown> =
|
|
|
8076
10370
|
*/
|
|
8077
10371
|
export declare const toInteractionCallbacks: <C extends Record<string, BuiltinActionSpec>>(catalog: C, handlers: { [K in keyof C]: (params: never, context?: InteractionCallbackContext) => unknown; }, overrides?: { [K in keyof C]?: Partial<InteractionCallback>; }) => Record<string, InteractionCallback>;
|
|
8078
10372
|
|
|
10373
|
+
export declare type Tokens<Variables> = {
|
|
10374
|
+
readonly [Name in VariableName<Variables>]: `var(--${Name})`;
|
|
10375
|
+
};
|
|
10376
|
+
|
|
10377
|
+
/**
|
|
10378
|
+
* The space's variables as the values a rule writes: `tokens(variables).surface` is `'var(--surface)'`. A name the
|
|
10379
|
+
* space does not declare is a type error where it is written, not a property the browser drops — so declare the
|
|
10380
|
+
* variables `as const` or `satisfies SpaceSpec['variables']`, and hand the same object to the space.
|
|
10381
|
+
*/
|
|
10382
|
+
export declare const tokens: <const Variables extends Partial<StyleVariables>>(variables: Variables) => Tokens<Variables>;
|
|
10383
|
+
|
|
8079
10384
|
export declare const toPortableSource: (source: string) => string;
|
|
8080
10385
|
|
|
8081
10386
|
/**
|
|
@@ -8143,10 +10448,39 @@ declare interface TriggerCommon {
|
|
|
8143
10448
|
|
|
8144
10449
|
declare type TriggerName<D extends DeclaresInteractions> = keyof NonNullable<D['triggers']> & string;
|
|
8145
10450
|
|
|
10451
|
+
/** Turns Tailwind classes into the rules `styles()` takes. See {@link createTw}. */
|
|
10452
|
+
export declare type Tw = (classes: string) => RuleSetSpec;
|
|
10453
|
+
|
|
10454
|
+
/** {@link createTw} with Tailwind's palette and nothing else. */
|
|
10455
|
+
export declare const tw: Tw;
|
|
10456
|
+
|
|
10457
|
+
/**
|
|
10458
|
+
* A template with paths in it, each written as its full name: `` twig`{{ ${site.data.total} + 1 }}` ``. A plain
|
|
10459
|
+
* template literal writes the same text, but a type-checked lint refuses an object inside one.
|
|
10460
|
+
*/
|
|
10461
|
+
export declare const twig: (parts: TemplateStringsArray, ...values: (SourceName | number)[]) => string;
|
|
10462
|
+
|
|
8146
10463
|
export declare const twigTemplate: (params: {
|
|
8147
10464
|
template: string;
|
|
8148
10465
|
}) => StepSpec;
|
|
8149
10466
|
|
|
10467
|
+
export declare interface TwOptions {
|
|
10468
|
+
/**
|
|
10469
|
+
* Colour names beside Tailwind's palette, or in place of one of its names: the space's tokens, so `bg-surface` is
|
|
10470
|
+
* `var(--surface)` — `createTw({ colors: tokens(variables) })`.
|
|
10471
|
+
*/
|
|
10472
|
+
colors?: TailwindColors;
|
|
10473
|
+
}
|
|
10474
|
+
|
|
10475
|
+
/** The callbacks only some types answer to, by action name — with their params, for whatever explains or checks one. */
|
|
10476
|
+
export declare const typeCallbackDefinitions: Record<string, InteractionCallback>;
|
|
10477
|
+
|
|
10478
|
+
/** A list fed by a typed source: its `row` is handed the item typed as the sample's (`g => text({ from: g.item.title })`). */
|
|
10479
|
+
declare type TypedListProps<Item> = Omit<ListProps, 'items' | 'row'> & {
|
|
10480
|
+
items: SourcePath<readonly Item[]>;
|
|
10481
|
+
row?: string | RowWriter<SourceRow<Item>>;
|
|
10482
|
+
};
|
|
10483
|
+
|
|
8150
10484
|
/** The triggers only some types fire, by action name — for a step builder that wants the title the builder shows. */
|
|
8151
10485
|
export declare const typeTriggerDefinitions: Record<string, InteractionCallback>;
|
|
8152
10486
|
|
|
@@ -8169,15 +10503,15 @@ export declare const updateElement: (params: {
|
|
|
8169
10503
|
revertOnFinish?: boolean;
|
|
8170
10504
|
}, target?: string) => StepSpec;
|
|
8171
10505
|
|
|
10506
|
+
/** `validateSnippet`, holding this SDK's own catalogs — for a manifest authored elsewhere. */
|
|
10507
|
+
export declare const validateSnippet: (snippet: Snippet, options?: SpaceValidationOptions) => SchemaValidationResult;
|
|
10508
|
+
|
|
8172
10509
|
/**
|
|
8173
10510
|
* `validateSpace`, holding this SDK's own catalogs — the same gate `authorSpace` puts its output through, for documents
|
|
8174
10511
|
* written anywhere else: the builder saving through the API, an import, an agent's edit, a JSON edited by hand.
|
|
8175
10512
|
*/
|
|
8176
10513
|
export declare const validateSpace: (space: SpaceDocuments, options?: SpaceValidationOptions) => SchemaValidationResult;
|
|
8177
10514
|
|
|
8178
|
-
/** `validateTemplate`, holding this SDK's own catalogs — for a manifest authored elsewhere. */
|
|
8179
|
-
export declare const validateTemplate: (template: Template, options?: SpaceValidationOptions) => SchemaValidationResult;
|
|
8180
|
-
|
|
8181
10515
|
/**
|
|
8182
10516
|
* Every value of a string-literal union, as a list — and a compile error when the list leaves one out.
|
|
8183
10517
|
*
|
|
@@ -8188,6 +10522,10 @@ export declare const valuesOf: <T extends string>() => <const V extends readonly
|
|
|
8188
10522
|
readonly missing: Exclude<T, V[number]>;
|
|
8189
10523
|
})) => readonly string[];
|
|
8190
10524
|
|
|
10525
|
+
declare type VariableName<Variables> = {
|
|
10526
|
+
[Category in keyof Variables]: keyof Variables[Category] & string;
|
|
10527
|
+
}[keyof Variables];
|
|
10528
|
+
|
|
8191
10529
|
/**
|
|
8192
10530
|
* Switches one of a CLASS's variants from a value the data answered — a status pill that turns amber, green or red
|
|
8193
10531
|
* as the job it describes moves.
|
|
@@ -8249,6 +10587,11 @@ export declare interface VisibleCondition {
|
|
|
8249
10587
|
template: string;
|
|
8250
10588
|
}
|
|
8251
10589
|
|
|
10590
|
+
/** A visibility condition whose source may be a typed source's path as well as a name. */
|
|
10591
|
+
export declare type VisibleInput = Omit<VisibleCondition, 'source'> & {
|
|
10592
|
+
source: SourceName;
|
|
10593
|
+
};
|
|
10594
|
+
|
|
8252
10595
|
/**
|
|
8253
10596
|
* Shows or hides an element from a value the data answered.
|
|
8254
10597
|
*
|
|
@@ -8258,6 +10601,10 @@ export declare interface VisibleCondition {
|
|
|
8258
10601
|
*/
|
|
8259
10602
|
export declare const visibleWhen: (source: string, template?: string) => BindingSpec;
|
|
8260
10603
|
|
|
10604
|
+
export declare type WarningCode = {
|
|
10605
|
+
[Code in AuthoringCode]: Codes[Code]['kind'] extends 'warned' ? Code : never;
|
|
10606
|
+
}[AuthoringCode];
|
|
10607
|
+
|
|
8261
10608
|
/**
|
|
8262
10609
|
* Calls a URL and puts the answer in the flow scope as `{{ <id>.response.status }}` and `{{ <id>.response.data }}`.
|
|
8263
10610
|
*
|
|
@@ -8359,7 +10706,7 @@ export declare const whenSucceeded: (stepId: string, step: StepSpec) => StepSpec
|
|
|
8359
10706
|
* - `parallel`: every firing runs its own flow, at the same time.
|
|
8360
10707
|
* - `queue`: every firing runs, one after another, in the order they came — none lost, none overlapping.
|
|
8361
10708
|
*/
|
|
8362
|
-
declare type WhileRunning = 'skip' | 'parallel' | 'queue';
|
|
10709
|
+
export declare type WhileRunning = 'skip' | 'parallel' | 'queue';
|
|
8363
10710
|
|
|
8364
10711
|
/**
|
|
8365
10712
|
* What a trigger does when it fires again while the flow it started still runs.
|
|
@@ -8403,6 +10750,9 @@ export declare const withNamedIds: (schema: Schema) => {
|
|
|
8403
10750
|
renames: ElementRename[];
|
|
8404
10751
|
};
|
|
8405
10752
|
|
|
10753
|
+
/** The space's custom CSS with its notifications' rule after it; refuses a spec that is not sound. */
|
|
10754
|
+
export declare const withNotificationsCss: (customCss: string, spec: NotificationsSpec | undefined) => string;
|
|
10755
|
+
|
|
8406
10756
|
/**
|
|
8407
10757
|
* The catalogs `authorSpace` holds a space to, with each declared plugin in them as if it were built in.
|
|
8408
10758
|
*
|
|
@@ -8418,4 +10768,12 @@ export declare const withVisibility: (spec: {
|
|
|
8418
10768
|
visible?: string | false | VisibleCondition;
|
|
8419
10769
|
}) => BindingSpec[] | undefined;
|
|
8420
10770
|
|
|
10771
|
+
/** Where a call is, exactly: the file, its line and the column its function's name starts at, from 1. */
|
|
10772
|
+
export declare interface WrittenPosition {
|
|
10773
|
+
/** Relative to the working directory when it is under it. */
|
|
10774
|
+
file: string;
|
|
10775
|
+
line: number;
|
|
10776
|
+
column: number;
|
|
10777
|
+
}
|
|
10778
|
+
|
|
8421
10779
|
export { }
|