@plitzi/sdk-authoring 0.38.7 → 0.38.9
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 +246 -0
- package/dist/index-src.js +969 -497
- package/dist/index.d.ts +150 -21
- package/dist/index.js +2 -2
- package/dist/node.d.ts +43 -1
- package/dist/node.js +52 -11
- package/package.json +6 -6
- package/skills/plitzi-authoring/SKILL.md +34 -149
- package/skills/plitzi-authoring/recipes/detail-page.ts +4 -2
- package/skills/plitzi-authoring/recipes/plugin.ts +1 -1
- package/skills/plitzi-authoring/reference/accessibility.md +3 -2
- package/skills/plitzi-authoring/reference/authoring-errors.md +4 -0
- package/skills/plitzi-authoring/reference/drawing.md +1 -1
- package/skills/plitzi-authoring/reference/flows.md +6 -4
- package/skills/plitzi-authoring/reference/index.md +33 -0
- package/skills/plitzi-authoring/reference/layouts.md +18 -0
- package/skills/plitzi-authoring/reference/plugins.md +2 -2
- package/skills/plitzi-authoring/reference/recipes.md +25 -0
- package/skills/plitzi-authoring/reference/rules.md +61 -0
- package/skills/plitzi-authoring/reference/snippets-and-export.md +2 -2
- package/skills/plitzi-authoring/reference/structure.md +1 -1
- package/skills/plitzi-authoring/reference/testing.md +1 -1
- package/skills/plitzi-authoring/reference/validation.md +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -411,6 +411,7 @@ export declare const apiContainer: {
|
|
|
411
411
|
method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
|
|
412
412
|
resource?: string | undefined;
|
|
413
413
|
headers?: Record<string, string> | undefined;
|
|
414
|
+
notFound?: string | undefined;
|
|
414
415
|
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "" | undefined;
|
|
415
416
|
query?: string | undefined;
|
|
416
417
|
accessToken?: string | undefined;
|
|
@@ -441,6 +442,7 @@ export declare const apiContainer: {
|
|
|
441
442
|
method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
|
|
442
443
|
resource?: string | undefined;
|
|
443
444
|
headers?: Record<string, string> | undefined;
|
|
445
|
+
notFound?: string | undefined;
|
|
444
446
|
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "" | undefined;
|
|
445
447
|
query?: string | undefined;
|
|
446
448
|
accessToken?: string | undefined;
|
|
@@ -1136,6 +1138,16 @@ export declare const AUTHORING_CODES: {
|
|
|
1136
1138
|
readonly means: "a `runtime: 'server'` element inside a component: the page server resolves a page's and its layouts', never a component's";
|
|
1137
1139
|
readonly fix: "put the provider on the page, around the instance, and hand the component its rows as a prop";
|
|
1138
1140
|
};
|
|
1141
|
+
readonly 'not-found-in-browser': {
|
|
1142
|
+
readonly kind: "refused";
|
|
1143
|
+
readonly means: "`notFound` on a provider asked from the browser — its answer arrives after the page was sent with its status";
|
|
1144
|
+
readonly fix: "`runtime: 'server'` on the provider, or `visible` on the page's \"not found\" part instead";
|
|
1145
|
+
};
|
|
1146
|
+
readonly 'not-found-not-a-template': {
|
|
1147
|
+
readonly kind: "refused";
|
|
1148
|
+
readonly means: "`notFound` that is not one `{{ expression }}` against the answer — never `true`, so never a 404";
|
|
1149
|
+
readonly fix: "`notFound: '{{ source.found == false }}'`";
|
|
1150
|
+
};
|
|
1139
1151
|
readonly 'server-data-in-browser': {
|
|
1140
1152
|
readonly kind: "refused";
|
|
1141
1153
|
readonly means: "a provider asking for the project's own data (`/data/…`, read by its server from `src/data/` and never served) from the browser";
|
|
@@ -1311,6 +1323,11 @@ export declare const AUTHORING_CODES: {
|
|
|
1311
1323
|
readonly means: "a prop whose name a template cannot read as `props.x`";
|
|
1312
1324
|
readonly fix: "letters, digits and `_`";
|
|
1313
1325
|
};
|
|
1326
|
+
readonly 'prop-type-unknown': {
|
|
1327
|
+
readonly kind: "refused";
|
|
1328
|
+
readonly means: "a prop declared with a type no editor offers and nothing checks a value against";
|
|
1329
|
+
readonly fix: "one of text, textarea, select, boolean, number, scalar, json, elementIds — words are `text`";
|
|
1330
|
+
};
|
|
1314
1331
|
readonly 'prop-unknown': {
|
|
1315
1332
|
readonly kind: "refused";
|
|
1316
1333
|
readonly means: "a prop the component does not declare, handed in or read";
|
|
@@ -1616,6 +1633,11 @@ export declare const AUTHORING_CODES: {
|
|
|
1616
1633
|
readonly means: "a colour written out in a class where the space has a token of that value — it stays put in the dark scheme";
|
|
1617
1634
|
readonly fix: "`var(--token)` when it should follow the scheme; a token of one value of its own when it must stay the same in both";
|
|
1618
1635
|
};
|
|
1636
|
+
readonly 'not-found-page': {
|
|
1637
|
+
readonly kind: "suggested";
|
|
1638
|
+
readonly means: "a space with no page of its own for an address no other page answers — a plain one was added, in the home page’s layout, sent with status 404";
|
|
1639
|
+
readonly fix: "a page whose slug is `'*'`: `{ id: 'not-found', name: 'Not found', slug: '*', layout: …, body: [...] }`";
|
|
1640
|
+
};
|
|
1619
1641
|
readonly 'unused-component': {
|
|
1620
1642
|
readonly kind: "suggested";
|
|
1621
1643
|
readonly means: "a component no page, layout or other component places";
|
|
@@ -1830,6 +1852,11 @@ export declare interface AuthorSpaceOptions {
|
|
|
1830
1852
|
* nothing.
|
|
1831
1853
|
*/
|
|
1832
1854
|
plugins?: readonly PluginDeclarationData[];
|
|
1855
|
+
/**
|
|
1856
|
+
* The CSS the space's pages load besides its own — its plugins' stylesheets. Read for the tokens they use: one only a
|
|
1857
|
+
* plugin reads (`var(--glass)` in its `.css`) is not said to be unused, which would have its colour deleted.
|
|
1858
|
+
*/
|
|
1859
|
+
stylesheets?: readonly string[];
|
|
1833
1860
|
/**
|
|
1834
1861
|
* What this document breaks ON PURPOSE — a fixture for how the runtime copes with something no author would write,
|
|
1835
1862
|
* like a provider whose URL names a route param no page has. See {@link AllowedBreak}.
|
|
@@ -2012,6 +2039,8 @@ export declare const BUILTIN_ELEMENT_CALLBACKS: Record<string, BuiltinElementCal
|
|
|
2012
2039
|
*/
|
|
2013
2040
|
export declare const BUILTIN_GLOBAL_CALLBACKS: Record<string, BuiltinGlobalCallback>;
|
|
2014
2041
|
|
|
2042
|
+
export declare const BUILTIN_PARAM_TYPES: readonly ["text", "textarea", "select", "boolean", "number", "scalar", "json", "elementIds"];
|
|
2043
|
+
|
|
2015
2044
|
export declare const BUILTIN_TRANSFORMERS: Record<string, BuiltinTransformer>;
|
|
2016
2045
|
|
|
2017
2046
|
export declare const BUILTIN_UTILITIES: Record<string, BuiltinUtility>;
|
|
@@ -2072,7 +2101,7 @@ export declare interface BuiltinParam {
|
|
|
2072
2101
|
elementType?: string;
|
|
2073
2102
|
}
|
|
2074
2103
|
|
|
2075
|
-
export declare type BuiltinParamType =
|
|
2104
|
+
export declare type BuiltinParamType = (typeof BUILTIN_PARAM_TYPES)[number];
|
|
2076
2105
|
|
|
2077
2106
|
export declare interface BuiltinTransformer {
|
|
2078
2107
|
title: string;
|
|
@@ -2275,6 +2304,8 @@ export declare const closeDialog: (target: string) => StepSpec;
|
|
|
2275
2304
|
/** Closes a `modalContainer`, by id — from a button inside it or anywhere else. */
|
|
2276
2305
|
export declare const closeModal: (target: string) => StepSpec;
|
|
2277
2306
|
|
|
2307
|
+
export declare const closest: (name: string, candidates: Iterable<string>) => string | undefined;
|
|
2308
|
+
|
|
2278
2309
|
declare type Codes = typeof AUTHORING_CODES;
|
|
2279
2310
|
|
|
2280
2311
|
/**
|
|
@@ -2432,6 +2463,13 @@ declare type ContentShorthand<A> = 'content' extends keyof A ? {
|
|
|
2432
2463
|
(content: string, props?: ElementProps<A>): ElementSpec;
|
|
2433
2464
|
} : unknown;
|
|
2434
2465
|
|
|
2466
|
+
/**
|
|
2467
|
+
* Copies `text` to the visitor's clipboard — a template like any param: `copyToClipboard('{{ navigation.href }}')` copies
|
|
2468
|
+
* the page's address. Where the browser offers no clipboard the step fails, so a flow's `onFailure` says so and its
|
|
2469
|
+
* "Copied" never shows for nothing.
|
|
2470
|
+
*/
|
|
2471
|
+
export declare const copyToClipboard: (text: string) => StepSpec;
|
|
2472
|
+
|
|
2435
2473
|
/**
|
|
2436
2474
|
* A `tw()` with colours of its own: `createTw({ colors: tokens(variables) })` makes `bg-surface` the space's token.
|
|
2437
2475
|
*
|
|
@@ -2544,7 +2582,7 @@ export declare interface DataIssue {
|
|
|
2544
2582
|
* — `landing.data.plans` where the answer is `{ plans }` — was "36 elements on screen, nothing wrong". Read here, with
|
|
2545
2583
|
* the provider's answer in hand, it is the binding, the path it reads and the keys that ARE there.
|
|
2546
2584
|
*
|
|
2547
|
-
* Pure: the sources come from the page's dev tools (`window.__plitzi.sources()`), so a suite or `plitzi check` reads
|
|
2585
|
+
* Pure: the sources come from the page's dev tools (`window.__plitzi.sources()`), so a suite or `plitzi page check` reads
|
|
2548
2586
|
* them however it reaches the page.
|
|
2549
2587
|
*/
|
|
2550
2588
|
export declare type DataIssueCode = 'binding-reads-nothing' | 'provider-failed';
|
|
@@ -2570,7 +2608,7 @@ export declare interface DataReport {
|
|
|
2570
2608
|
/**
|
|
2571
2609
|
* Every list of the page whose rows come from a provider: how many rows its source holds, `null` when it reads
|
|
2572
2610
|
* nothing. The source, before the binding's transformers: a list that filters or slices them draws fewer — what is
|
|
2573
|
-
* drawn is the page's to count (`plitzi check` does).
|
|
2611
|
+
* drawn is the page's to count (`plitzi page check` does).
|
|
2574
2612
|
*/
|
|
2575
2613
|
lists: Record<string, number | null>;
|
|
2576
2614
|
}
|
|
@@ -2787,7 +2825,7 @@ export declare const elementAncestorTypes: Record<string, string>;
|
|
|
2787
2825
|
* a builder that has since moved on, and nothing renders it.
|
|
2788
2826
|
*/
|
|
2789
2827
|
export declare const elementAttributeNames: {
|
|
2790
|
-
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"];
|
|
2828
|
+
readonly apiContainer: readonly ["accessToken", "action", "cache", "connector", "credentials", "endpoint", "filters", "gcTime", "headers", "input", "limit", "loadingSlot", "method", "mockData", "notFound", "pageParam", "pagination", "query", "refreshSeconds", "renderWhileLoading", "resource", "singleRecord", "staleTime", "subType", "when"];
|
|
2791
2829
|
readonly blockHtml: readonly ["content"];
|
|
2792
2830
|
readonly blockJsx: readonly ["allowEmptyRender", "content", "contentCache", "props"];
|
|
2793
2831
|
readonly button: readonly ["ariaExpanded", "ariaPressed", "content", "contentPlacement", "controls", "disabled", "icon", "iconPlacement", "label", "subType", "title"];
|
|
@@ -2807,7 +2845,7 @@ export declare const elementAttributeNames: {
|
|
|
2807
2845
|
readonly image: readonly ["alt", "decorative", "fetchPriority", "height", "loadMode", "resize", "sizes", "src", "width"];
|
|
2808
2846
|
readonly layoutContainer: readonly ["layout", "layoutContainer", "subType"];
|
|
2809
2847
|
readonly link: readonly ["content", "contentPlacement", "current", "hash", "href", "icon", "iconPlacement", "label", "mode", "target"];
|
|
2810
|
-
readonly list: readonly ["itemKey", "items", "source", "subType"];
|
|
2848
|
+
readonly list: readonly ["itemKey", "items", "label", "source", "subType"];
|
|
2811
2849
|
readonly listItem: readonly [];
|
|
2812
2850
|
readonly loading: readonly [];
|
|
2813
2851
|
readonly markdown: readonly ["content", "headingLinks"];
|
|
@@ -2824,7 +2862,7 @@ export declare const elementAttributeNames: {
|
|
|
2824
2862
|
readonly tabContainerBody: readonly [];
|
|
2825
2863
|
readonly tabContainerHeader: readonly [];
|
|
2826
2864
|
readonly tabContainerItem: readonly [];
|
|
2827
|
-
readonly text: readonly ["content", "title"];
|
|
2865
|
+
readonly text: readonly ["content", "decorative", "title"];
|
|
2828
2866
|
readonly themeToggle: readonly ["darkLabel", "lightLabel", "showSystem", "subType", "systemLabel"];
|
|
2829
2867
|
readonly video: readonly ["autoPlay", "loop", "muted", "playsInline", "src"];
|
|
2830
2868
|
};
|
|
@@ -2928,7 +2966,7 @@ export declare interface ElementDeclarationData {
|
|
|
2928
2966
|
/**
|
|
2929
2967
|
* Whether the element is behaviour rather than content — a clock that fires a flow, a listener — and draws nothing on
|
|
2930
2968
|
* a page (at most a tag in the builder, to have something to select). Read by the page checks (`inspectPage`,
|
|
2931
|
-
* `plitzi check`), which would otherwise wait for it to be on screen and report it hidden.
|
|
2969
|
+
* `plitzi page check`), which would otherwise wait for it to be on screen and report it hidden.
|
|
2932
2970
|
*/
|
|
2933
2971
|
drawsNothing?: boolean;
|
|
2934
2972
|
content?: {
|
|
@@ -3112,6 +3150,7 @@ declare const elementDeclarations: {
|
|
|
3112
3150
|
method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
|
|
3113
3151
|
resource?: string | undefined;
|
|
3114
3152
|
headers?: Record<string, string> | undefined;
|
|
3153
|
+
notFound?: string | undefined;
|
|
3115
3154
|
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "" | undefined;
|
|
3116
3155
|
query?: string | undefined;
|
|
3117
3156
|
accessToken?: string | undefined;
|
|
@@ -4523,7 +4562,7 @@ declare const elementDeclarations: {
|
|
|
4523
4562
|
readonly autoFocus: false;
|
|
4524
4563
|
readonly disabled: false;
|
|
4525
4564
|
readonly options: readonly [];
|
|
4526
|
-
readonly required:
|
|
4565
|
+
readonly required: false;
|
|
4527
4566
|
readonly requiredMessage: "";
|
|
4528
4567
|
readonly minLength: 0;
|
|
4529
4568
|
readonly minLengthMessage: "";
|
|
@@ -5703,6 +5742,7 @@ declare const elementDeclarations: {
|
|
|
5703
5742
|
readonly initialItems: readonly ["listItem", "listItem", "listItem"];
|
|
5704
5743
|
} & ElementAttributesBrand<Partial<{
|
|
5705
5744
|
source?: "none" | "controlled" | undefined;
|
|
5745
|
+
label?: string | undefined;
|
|
5706
5746
|
items?: unknown[] | undefined;
|
|
5707
5747
|
subType?: "ul" | "ol" | undefined;
|
|
5708
5748
|
itemKey?: string | undefined;
|
|
@@ -7153,6 +7193,7 @@ declare const elementDeclarations: {
|
|
|
7153
7193
|
} & ElementAttributesBrand<Partial<{
|
|
7154
7194
|
title?: string | undefined;
|
|
7155
7195
|
content?: string | number | undefined;
|
|
7196
|
+
decorative?: boolean | undefined;
|
|
7156
7197
|
}>>;
|
|
7157
7198
|
readonly ThemeToggle: {
|
|
7158
7199
|
readonly type: "themeToggle";
|
|
@@ -7808,15 +7849,17 @@ export declare const embed: {
|
|
|
7808
7849
|
}>> | undefined): ElementSpec;
|
|
7809
7850
|
};
|
|
7810
7851
|
|
|
7852
|
+
export declare const emptySpaceSpec: SpaceSpec;
|
|
7853
|
+
|
|
7811
7854
|
/**
|
|
7812
|
-
* The space `plitzi create --template blank` starts from, as
|
|
7813
|
-
* project about to be something specific, where the welcome tour is the first thing that would be deleted
|
|
7855
|
+
* The space `plitzi create --template blank` starts from, as its files by path: tokens, a layout and one empty page —
|
|
7856
|
+
* for a project about to be something specific, where the welcome tour is the first thing that would be deleted —
|
|
7857
|
+
* and the page for an address nothing answers, beside it.
|
|
7814
7858
|
*/
|
|
7815
|
-
export declare const
|
|
7859
|
+
export declare const emptyTemplateFiles: ({ name, dir }?: {
|
|
7816
7860
|
name?: string;
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
export declare const emptySpaceSpec: SpaceSpec;
|
|
7861
|
+
dir?: string;
|
|
7862
|
+
}) => Record<string, string>;
|
|
7820
7863
|
|
|
7821
7864
|
/**
|
|
7822
7865
|
* Expand supported CSS shorthands to their longhand keys, in declaration order: the later declaration wins, as it
|
|
@@ -7937,14 +7980,17 @@ export declare interface FixChange {
|
|
|
7937
7980
|
on: 'attribute' | 'field' | 'binding' | {
|
|
7938
7981
|
step: string;
|
|
7939
7982
|
};
|
|
7940
|
-
/**
|
|
7941
|
-
|
|
7983
|
+
/**
|
|
7984
|
+
* `replace` swaps one literal text for another anywhere under the key — a transformer's action in a binding.
|
|
7985
|
+
* `unwrap` puts what the key holds — an object — in its place, one level up: `attributes: { value: 5 }` → `value: 5`.
|
|
7986
|
+
*/
|
|
7987
|
+
op: 'remove' | 'rename' | 'set' | 'replace' | 'unwrap';
|
|
7942
7988
|
/** The attribute, field or param; a binding's target; the text `replace` looks for. */
|
|
7943
7989
|
key: string;
|
|
7944
7990
|
/** What `rename` renames to, and what `replace` writes. */
|
|
7945
7991
|
to?: string;
|
|
7946
7992
|
/** What `set` writes. */
|
|
7947
|
-
value?: string | boolean;
|
|
7993
|
+
value?: string | number | boolean;
|
|
7948
7994
|
}
|
|
7949
7995
|
|
|
7950
7996
|
/** What is wrong with a declaration, and what of it has one fix. */
|
|
@@ -8084,6 +8130,7 @@ declare type FormControlProps = {
|
|
|
8084
8130
|
label: string;
|
|
8085
8131
|
value: string;
|
|
8086
8132
|
}[];
|
|
8133
|
+
/** Optional unless it says so, as an HTML field is: a required field left empty stops the submit. */
|
|
8087
8134
|
required: boolean;
|
|
8088
8135
|
/**
|
|
8089
8136
|
* The rules a value has to meet before the form submits, checked by the form at submit time and by the control when
|
|
@@ -8360,7 +8407,7 @@ export declare interface ImportProbeInput {
|
|
|
8360
8407
|
|
|
8361
8408
|
export declare const importSlug: (text: string) => string;
|
|
8362
8409
|
|
|
8363
|
-
/** What an import found, counted — the few lines `plitzi import` answers with. */
|
|
8410
|
+
/** What an import found, counted — the few lines `plitzi page import` answers with. */
|
|
8364
8411
|
export declare interface ImportSummary {
|
|
8365
8412
|
url: string;
|
|
8366
8413
|
widths: number[];
|
|
@@ -8785,6 +8832,15 @@ export declare const loadImages: (budgetMs: number) => Promise<LoadedImages>;
|
|
|
8785
8832
|
*/
|
|
8786
8833
|
export declare const locate: <L>(source: LocatorSource<L>, handles: SpaceHandles) => (id: string) => L;
|
|
8787
8834
|
|
|
8835
|
+
/** `locateClasses`, holding the same catalogs: every class the space declares, with the `styles()` call that wrote it. */
|
|
8836
|
+
export declare const locateClasses: (spec: SpaceSpec, options?: AuthorSpaceOptions) => WrittenClass[];
|
|
8837
|
+
|
|
8838
|
+
/**
|
|
8839
|
+
* `locateElements`, holding the same catalogs: every element the space authors to, with the call in the author's code
|
|
8840
|
+
* that wrote it — what `plitzi element where` answers and `plitzi element edit` edits at.
|
|
8841
|
+
*/
|
|
8842
|
+
export declare const locateElements: (spec: SpaceSpec, options?: AuthorSpaceOptions) => WrittenElement[];
|
|
8843
|
+
|
|
8788
8844
|
/**
|
|
8789
8845
|
* The shape this borrows from a browser driver, declared structurally so the package still installs nothing.
|
|
8790
8846
|
*
|
|
@@ -9335,6 +9391,13 @@ export declare interface OpenPageOptions {
|
|
|
9335
9391
|
|
|
9336
9392
|
declare type Operator = '' | '=' | '!=' | '<' | '>' | '<=' | '>=' | 'contains' | 'doesNotContain' | 'beginsWith' | 'doesNotBeginWith' | 'endsWith' | 'doesNotEndWith' | 'empty' | 'notEmpty' | 'in' | 'notIn' | 'between' | 'notBetween';
|
|
9337
9393
|
|
|
9394
|
+
/**
|
|
9395
|
+
* A page's attributes that are one field of its `PageSpec` each, by attribute name: the page writes `seoTitle` and the
|
|
9396
|
+
* document reads `seoPageTitle`. What an edit of a page's attribute writes in the code. Its layout is not here — two
|
|
9397
|
+
* attributes from one field (`layout: { id, slot }`) — nor `seoEnabled`, which follows from the other two.
|
|
9398
|
+
*/
|
|
9399
|
+
export declare const PAGE_SPEC_FIELDS: Readonly<Record<string, keyof PageSpec>>;
|
|
9400
|
+
|
|
9338
9401
|
/** How many texts a page is read for: enough for a long page, few enough to stay quick. */
|
|
9339
9402
|
export declare const PAGE_TEXT_LIMIT = 2000;
|
|
9340
9403
|
|
|
@@ -9436,7 +9499,7 @@ export declare interface PageIssue {
|
|
|
9436
9499
|
}
|
|
9437
9500
|
|
|
9438
9501
|
/** What kind of problem a page check found: what a tool branches on, where `message` is what a person reads. */
|
|
9439
|
-
export declare type PageIssueCode = 'not-rendered' | 'element-missing' | 'element-hidden' | 'image-not-loaded' | 'sideways-scroll' | 'illegible-text';
|
|
9502
|
+
export declare type PageIssueCode = 'not-rendered' | 'element-missing' | 'element-hidden' | 'image-not-loaded' | 'sideways-scroll' | 'cut-off' | 'illegible-text';
|
|
9440
9503
|
|
|
9441
9504
|
/**
|
|
9442
9505
|
* Runs in the page that was pictured: its parts, where they are on the full page — its landmarks (header, nav, main,
|
|
@@ -9686,7 +9749,7 @@ export declare interface PictureRegion {
|
|
|
9686
9749
|
|
|
9687
9750
|
/**
|
|
9688
9751
|
* `planFixes`, holding the same catalogs: every fix `fixSpace` would make in this declaration, each with the place in
|
|
9689
|
-
* the author's code that wrote the element and the edit that makes the fix there — what `plitzi fix` shows and writes.
|
|
9752
|
+
* the author's code that wrote the element and the edit that makes the fix there — what `plitzi space fix` shows and writes.
|
|
9690
9753
|
*/
|
|
9691
9754
|
export declare const planFixes: (spec: SpaceSpec, options?: AuthorSpaceOptions) => FixPlan;
|
|
9692
9755
|
|
|
@@ -9895,6 +9958,11 @@ export declare interface ProbeFindings {
|
|
|
9895
9958
|
widest: string[];
|
|
9896
9959
|
elementIds: string[];
|
|
9897
9960
|
} | null;
|
|
9961
|
+
/** A link, a control or words of the space's cut at the screen's edge — by how many pixels fall outside it. */
|
|
9962
|
+
cutOff: {
|
|
9963
|
+
id: string;
|
|
9964
|
+
pixels: number;
|
|
9965
|
+
}[];
|
|
9898
9966
|
illegible: {
|
|
9899
9967
|
text: string;
|
|
9900
9968
|
elementId?: string;
|
|
@@ -10356,6 +10424,10 @@ export declare type SchemaValidationError = {
|
|
|
10356
10424
|
elementId?: string;
|
|
10357
10425
|
/** The component whose tree the error is in; absent for the pages' tree. */
|
|
10358
10426
|
componentId?: string;
|
|
10427
|
+
/** The name an element points at that no element answers to — what a suggestion of the nearest one is made from. */
|
|
10428
|
+
missing?: string;
|
|
10429
|
+
/** The step the missing element was to answer (`openModal`): a suggestion is drawn from the elements that do. */
|
|
10430
|
+
wantedBy?: string;
|
|
10359
10431
|
details?: unknown;
|
|
10360
10432
|
};
|
|
10361
10433
|
|
|
@@ -11413,6 +11485,8 @@ declare const styleConstants: {
|
|
|
11413
11485
|
readonly TEXT_INDENT: "text-indent";
|
|
11414
11486
|
readonly TEXT_TRANSFORM: "text-transform";
|
|
11415
11487
|
readonly DIRECTION: "direction";
|
|
11488
|
+
readonly WRITING_MODE: "writing-mode";
|
|
11489
|
+
readonly TEXT_ORIENTATION: "text-orientation";
|
|
11416
11490
|
readonly WHITE_SPACE: "white-space";
|
|
11417
11491
|
readonly TEXT_WRAP: "text-wrap";
|
|
11418
11492
|
readonly WORD_BREAK: "word-break";
|
|
@@ -11574,6 +11648,10 @@ export declare type SuggestionCode = {
|
|
|
11574
11648
|
export declare const suggestSpace: ({ schema, style }: {
|
|
11575
11649
|
schema: Schema;
|
|
11576
11650
|
style: Style;
|
|
11651
|
+
},
|
|
11652
|
+
/** The CSS the pages load besides the space's own — its plugins' stylesheets: a token read there is read. */
|
|
11653
|
+
{ stylesheets }?: {
|
|
11654
|
+
stylesheets?: readonly string[];
|
|
11577
11655
|
}) => Suggestion[];
|
|
11578
11656
|
|
|
11579
11657
|
/** The closest known transformer action to a mistyped one (substring match either way), so a wrong action like
|
|
@@ -11624,6 +11702,7 @@ export declare type TemplateReturns = 'text' | 'value';
|
|
|
11624
11702
|
export declare const text: ElementFactory<Partial<{
|
|
11625
11703
|
title?: string | undefined;
|
|
11626
11704
|
content?: string | number | undefined;
|
|
11705
|
+
decorative?: boolean | undefined;
|
|
11627
11706
|
}>>;
|
|
11628
11707
|
|
|
11629
11708
|
export declare interface TextComparison {
|
|
@@ -11869,7 +11948,9 @@ export declare const unrollPage: () => number;
|
|
|
11869
11948
|
* What a space declares and nothing uses — its classes, tokens and components — by the one rule the suggestions, the
|
|
11870
11949
|
* builder's Usages panel and anything else that says "unused" read, so they never disagree.
|
|
11871
11950
|
*/
|
|
11872
|
-
export declare const unusedDeclarations: (schema: Schema, style: Declared
|
|
11951
|
+
export declare const unusedDeclarations: (schema: Schema, style: Declared,
|
|
11952
|
+
/** The CSS the pages load besides the space's own — its plugins' stylesheets — whose `var(--…)` read tokens too. */
|
|
11953
|
+
stylesheets?: readonly string[]) => {
|
|
11873
11954
|
classes: string[];
|
|
11874
11955
|
tokens: string[];
|
|
11875
11956
|
components: string[];
|
|
@@ -12183,6 +12264,54 @@ export declare interface WornList {
|
|
|
12183
12264
|
classes: WornClass[];
|
|
12184
12265
|
}
|
|
12185
12266
|
|
|
12267
|
+
/** One class of the space, and where the author's code declares it. */
|
|
12268
|
+
export declare interface WrittenClass {
|
|
12269
|
+
name: string;
|
|
12270
|
+
/** Where it was declared: `src/space/styles.ts:118`. Absent for one no `styles()` call wrote (a space-wide object). */
|
|
12271
|
+
at?: string;
|
|
12272
|
+
position?: WrittenPosition;
|
|
12273
|
+
}
|
|
12274
|
+
|
|
12275
|
+
/** One element of the space, and the call in the author's code that wrote it. */
|
|
12276
|
+
export declare interface WrittenElement {
|
|
12277
|
+
elementId: string;
|
|
12278
|
+
type: string;
|
|
12279
|
+
/** The page, layout or component it is in. */
|
|
12280
|
+
rootId: string;
|
|
12281
|
+
/** The classes it wears, by name. */
|
|
12282
|
+
classes: string[];
|
|
12283
|
+
/** Its own words, when it has some. */
|
|
12284
|
+
content?: string;
|
|
12285
|
+
/** The templates its bindings compute an attribute with — where the words it shows live when they are not its own. */
|
|
12286
|
+
templates: string[];
|
|
12287
|
+
/**
|
|
12288
|
+
* Every word it says to a person, read or heard: its `content`, `label`, `title`, `alt` and `placeholder`, the
|
|
12289
|
+
* templates its bindings write, and — an instance of a component — the words it hands the component. What
|
|
12290
|
+
* `plitzi element where` finds an element by when it is asked for words.
|
|
12291
|
+
*/
|
|
12292
|
+
words: string[];
|
|
12293
|
+
/** Its attributes as authored. */
|
|
12294
|
+
attributes: Record<string, unknown>;
|
|
12295
|
+
/** The elements it holds, in their order. */
|
|
12296
|
+
children: string[];
|
|
12297
|
+
/** The other elements its flows act on, each with the step that does: what taking one of them away would break. */
|
|
12298
|
+
targets: {
|
|
12299
|
+
elementId: string;
|
|
12300
|
+
step: string;
|
|
12301
|
+
}[];
|
|
12302
|
+
/** The attributes its bindings compute: what the page shows of them is the binding's, never the value written. */
|
|
12303
|
+
bound: string[];
|
|
12304
|
+
/** Where it was written: `src/space/pages/home.ts:42`. Absent for an element no call of the author's code wrote. */
|
|
12305
|
+
at?: string;
|
|
12306
|
+
/** The same place exactly — the factory's name, at its line and column — which is what an edit is made at. */
|
|
12307
|
+
position?: WrittenPosition;
|
|
12308
|
+
/**
|
|
12309
|
+
* The calls of the author's code that led to `position`, the nearest first: a helper written once and called for
|
|
12310
|
+
* each element (`pageHead('about-head', …)`) is told apart by them.
|
|
12311
|
+
*/
|
|
12312
|
+
through: WrittenPosition[];
|
|
12313
|
+
}
|
|
12314
|
+
|
|
12186
12315
|
/** Where a call is, exactly: the file, its line and the column its function's name starts at, from 1. */
|
|
12187
12316
|
export declare interface WrittenPosition {
|
|
12188
12317
|
/** Relative to the working directory when it is under it. */
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { AUTHORING_CODES, AuthoringError, BREAKPOINTS, BUILDER_NAMES, a as BUILTIN_ELEMENT_CALLBACKS, BUILTIN_GLOBAL_CALLBACKS, BUILTIN_TRANSFORMERS, BUILTIN_UTILITIES, CATALOG_TEMPLATE_IDENTITY, COMPONENT_SOURCES, ELEMENT_FIELDS, EXPLAIN_KINDS, FIXABLE_CODES, GLOBAL_CALLBACK_BUILDERS, GLOBAL_SOURCES, t as MOTION_ENTERS, r as MOTION_LOOPS, n as MOTION_TRIGGERS, i as NOTIFICATIONS_FIELDS, PAGE_TEXT_LIMIT, SCHEMA_SETTINGS, i$1 as SCROLL_CALLBACKS, SET_STATE_TYPES, SPACE_FIELDS, STYLE_STATES, SpaceRefusedError, actionSource, actionSpecFromEntry, actionToSource, activeOn, activeWhen, addNotification, alignPictures, announceOn, answerAction, apiContainer, appendState, applyBuiltinCallback, s as applyElementCallback, applyUtility, assertSnippetValid, assertSpaceValid, authLogin, authLogout, authRefreshDetails, authorBinding, authorFlow, authorFlows, authorSnippet, authorSpace, authoringCodeEntry, authoringCodesTable, bindTemplate, blankSpace, space as blankSpaceSpec, blankTemplateFiles, blockHtml, blockJsx, buildHandles, button, cancelApi, cancelServerAction, carousel, carouselGoTo, carouselNext, carouselPause, carouselPlay, carouselPrevious, carouselTrack, catalogTemplateFiles, channel, className, classNames, classRefs, clearState, closeDialog, closeModal, column, compactSvg, comparePictures, compareSpaces, compareTexts, component, container, createTw, css, cssNumberValue, cssProperties, cssPropertyName, cssShorthands, custom, cycleState, darkScheme, dataIssues, declaredCallback, declaredTrigger, defaultAttributes, defaultLabel, defineAction, defineElement, delay, dialogContainer, diffPictures, digest, dropdown, dropdownPopup, element, elementAncestorTypes, elementAttributeNames, elementAttributeValues, elementCallbacks, elementCatalog, t$
|
|
1
|
+
import { $ as GLOBAL_CALLBACK_BUILDERS, $i as AUTHORING_CODES, $n as setState, $r as container, $t as isCssProperty, A as unrollPage, Ai as defaultLabel, An as whenFailed, Ar as onScroll, At as className, B as blankSpace, Bi as groupBindings, Bn as authLogout, Br as setFieldValue, Bt as css, C as pageTexts, Ca as c, Ci as tabContainerHeader, Cn as authoringCodesTable, Cr as onFlowError, Ct as unusedDeclarations, D as pageRegions, Da as t, Di as video, Dn as flowStepIds, Dr as onLoad, Dt as column, E as diffPictures, Ea as s$1, Ei as themeToggle, En as authorFlows, Er as onKey, Et as tw, F as readDevTools, Fi as GLOBAL_SOURCES, Fn as getUtility, Fr as reloadApi, Ft as modifierClassName, G as space$1, Gi as variantFrom, Gn as cycleState, Gt as cssShorthands, H as catalogTemplateFiles, Hi as hiddenWhen, Hn as cancelServerAction, Hr as updateElement, Ht as sameBlocks, I as readDevToolsInPage, Ii as activeOn, In as SET_STATE_TYPES, Ir as resetForm, It as splitClassList, J as importSlug, Ji as actionSource, Jn as invalidateQueries, Jr as blockJsx, Jt as expandShorthandTraced, K as space, Ki as visibleWhen, Kn as delay, Kr as apiContainer, Kt as expandShorthand, L as dataIssues, Li as activeWhen, Ln as addNotification, Lr as scrollBy, Lt as styles, M as inspectPage, Mi as element, Mn as whileRunning, Mr as openDialog, Mt as classRefs, N as onScreen, Ni as inferredLinkMode, Nn as BUILTIN_UTILITIES, Nr as openModal, Nt as isClassModifier, O as profilePictures, Oi as component, On as named, Or as onPageLoad, Ot as grid, P as failedFlowText, Pi as COMPONENT_SOURCES, Pn as applyUtility, Pr as publishOn, Pt as isStyleDeclaration, Q as EXPLAIN_KINDS, Qi as scope, Qn as runServerAction, Qr as channel, Qt as cssPropertyName, R as answerAction, Ri as authorBinding, Rn as appendState, Rr as scrollIntoView, Rt as BREAKPOINTS, S as compareTexts, Sa as s, Si as tabContainerBody, Sn as flagSpecOf, Sr as onFlowEnd, St as suggestClassOverrides, T as comparePictures, Ta as r$1, Ti as text, Tn as authorFlow, Tr as onInterval, Tt as createTw, U as emptyTemplateFiles, Ui as resolveSource, Un as clearState, Ur as elementsFromManifest, Ut as toBlocks, V as blankTemplateFiles, Vi as hasVisibilityBinding, Vn as authRefreshDetails, Vr as toggleElement, Vt as isRuleSetSpec, W as toPortableSource, Wi as toBindingSpecs, Wn as copyToClipboard, Wr as withPluginCatalogs, Wt as toResponsive, X as importProbe, Xi as twig, Xn as navigate, Xr as carousel, Xt as cssNumberValue, Y as importedFiles, Yi as source, Yn as moveState, Yr as button, Yt as shorthandLonghands, Z as BUILDER_NAMES, Zi as closest, Zn as removeState, Zr as carouselTrack, Zt as cssProperties, _ as shortcutKey, _a as t$2, _i as paragraph, _n as instanceSelectorFor, _r as closeModal, _t as assertSnippetValid, a as locateClasses, aa as elementCallbacks, ai as fontAwesome, an as notificationsCss, ar as BUILTIN_GLOBAL_CALLBACKS, at as SPACE_FIELDS, b as summariseRenders, ba as i$1, bi as svg, bn as selectorFor, br as on, bt as suggestSpace, c as validateSnippet, ca as elementLeafTypes, ci as heading, cn as i, cr as e, ct as specFromSpace, d as i$2, da as elementSourceTypes, di as list, dn as r, dr as carouselGoTo, dt as actionToSource, ea as AuthoringError, ei as custom, en as isCustomProperty, er as stepState, et as explain, f as o$1, fa as elementTriggers, fi as listItem, fn as t$1, fr as carouselNext, ft as withNamedIds, g as pressShortcut, ga as e$1, gi as pagination, gn as buildHandles, gr as closeDialog, gt as transformerCatalog, h as withElement, ha as typeTriggerDefinitions, hi as nodeHtml, hn as slugify, hr as carouselPrevious, ht as suggestTransformer, i as lintSpace, ia as elementAttributeValues, ii as embed, in as pageFamily, ir as webHook, it as ELEMENT_FIELDS, j as inspectDocument, ji as defineElement, jn as whenSucceeded, jr as onSubmit, jt as classNames, k as loadImages, ki as defaultAttributes, kn as when, kr as onPointerDown, kt as row, l as validateSpace, la as elementPartTypes, li as image, ln as FIXABLE_CODES, lr as announceOn, lt as compareSpaces, m as singlePageSpace, ma as typeCallbackDefinitions, mi as modalContainer, mn as digest, mr as carouselPlay, mt as getTransformer, n as authorSpace, na as isSuggestionCode, ni as dropdown, nn as SpaceRefusedError, nr as toggleState, nt as explainList, o as locateElements, oa as elementCatalog, oi as form, on as withNotificationsCss, or as applyBuiltinCallback, ot as specToSource, p as compactSvg, pa as elementTypeNames, pi as markdown, pr as carouselPause, pt as BUILTIN_TRANSFORMERS, q as darkScheme, qi as withVisibility, qn as hostAction, qr as blockHtml, qt as expandShorthandPatch, r as fixSpace, ra as elementAncestorTypes, ri as dropdownPopup, rn as refusalOf, rr as twigTemplate, rt as explanationText, s as planFixes, sa as elementDefaultAttributes, si as formControl, sn as d, sr as getGlobalCallback, st as SCHEMA_SETTINGS, t as authorSnippet, ta as authoringCodeEntry, ti as dialogContainer, tn as suggestCssProperty, tr as toggleInState, tt as explainKindOf, u as a$1, ua as elementSlots, ui as link, un as n, ur as cancelApi, ut as actionSpecFromEntry, v as openPage, va as elementAttributeNames, vi as reference, vn as locate, vr as declaredCallback, vt as PAGE_SPEC_FIELDS, w as alignPictures, wa as n$1, wi as tabContainerItem, wn as defineAction, wr as onFlowProgress, wt as tokens, x as PAGE_TEXT_LIMIT, xa as o, xi as tabContainer, xn as flagGateOf, xr as onClick, xt as withoutQuieted, y as inspectRenders, ya as a, yi as richText, yn as pathForSlug, yr as declaredTrigger, yt as assertSpaceValid, z as CATALOG_TEMPLATE_IDENTITY, zi as bindTemplate, zn as authLogin, zr as scrollTo, zt as STYLE_STATES } from "./index-src.js";
|
|
2
|
+
export { AUTHORING_CODES, AuthoringError, BREAKPOINTS, BUILDER_NAMES, a as BUILTIN_ELEMENT_CALLBACKS, BUILTIN_GLOBAL_CALLBACKS, t as BUILTIN_PARAM_TYPES, BUILTIN_TRANSFORMERS, BUILTIN_UTILITIES, CATALOG_TEMPLATE_IDENTITY, COMPONENT_SOURCES, ELEMENT_FIELDS, EXPLAIN_KINDS, FIXABLE_CODES, GLOBAL_CALLBACK_BUILDERS, GLOBAL_SOURCES, t$1 as MOTION_ENTERS, r as MOTION_LOOPS, n as MOTION_TRIGGERS, i as NOTIFICATIONS_FIELDS, PAGE_SPEC_FIELDS, PAGE_TEXT_LIMIT, SCHEMA_SETTINGS, i$1 as SCROLL_CALLBACKS, SET_STATE_TYPES, SPACE_FIELDS, STYLE_STATES, SpaceRefusedError, actionSource, actionSpecFromEntry, actionToSource, activeOn, activeWhen, addNotification, alignPictures, announceOn, answerAction, apiContainer, appendState, applyBuiltinCallback, s as applyElementCallback, applyUtility, assertSnippetValid, assertSpaceValid, authLogin, authLogout, authRefreshDetails, authorBinding, authorFlow, authorFlows, authorSnippet, authorSpace, authoringCodeEntry, authoringCodesTable, bindTemplate, blankSpace, space as blankSpaceSpec, blankTemplateFiles, blockHtml, blockJsx, buildHandles, button, cancelApi, cancelServerAction, carousel, carouselGoTo, carouselNext, carouselPause, carouselPlay, carouselPrevious, carouselTrack, catalogTemplateFiles, channel, className, classNames, classRefs, clearState, closeDialog, closeModal, closest, column, compactSvg, comparePictures, compareSpaces, compareTexts, component, container, copyToClipboard, createTw, css, cssNumberValue, cssProperties, cssPropertyName, cssShorthands, custom, cycleState, darkScheme, dataIssues, declaredCallback, declaredTrigger, defaultAttributes, defaultLabel, defineAction, defineElement, delay, dialogContainer, diffPictures, digest, dropdown, dropdownPopup, element, elementAncestorTypes, elementAttributeNames, elementAttributeValues, elementCallbacks, elementCatalog, t$2 as elementDeclaration, elementDefaultAttributes, elementLeafTypes, elementPartTypes, elementSlots, elementSourceTypes, elementTriggers, elementTypeNames, elementsFromManifest, embed, space$1 as emptySpaceSpec, emptyTemplateFiles, expandShorthand, expandShorthandPatch, expandShorthandTraced, explain, explainKindOf, explainList, explanationText, failedFlowText, fixSpace, flagGateOf, flagSpecOf, flowStepIds, fontAwesome, form, formControl, o as getElementCallback, getGlobalCallback, getTransformer, getUtility, grid, groupBindings, hasVisibilityBinding, heading, n$1 as hiddenParams, hiddenWhen, hostAction, image, importProbe, importSlug, importedFiles, inferredLinkMode, inspectDocument, inspectPage, inspectRenders, instanceSelectorFor, s$1 as invalidParams, invalidateQueries, isClassModifier, isCssProperty, isCustomProperty, isRuleSetSpec, isStyleDeclaration, isSuggestionCode, link, lintSpace, list, listItem, loadImages, locate, locateClasses, locateElements, markdown, r$1 as missingRequiredParams, modalContainer, modifierClassName, moveState, named, navigate, nodeHtml, notificationsCss, on, onClick, onFlowEnd, onFlowError, onFlowProgress, onInterval, onKey, onLoad, onPageLoad, onPointerDown, onScreen, onScroll, onSubmit, openDialog, openModal, openPage, pageFamily, pageRegions, pageTexts, pagination, paragraph, pathForSlug, planFixes, pressShortcut, profilePictures, publishOn, readDevTools, readDevToolsInPage, c as reconcileParams, reference, refusalOf, reloadApi, removeState, resetForm, resolveSource, richText, row, runServerAction, sameBlocks, scope, scrollBy, scrollIntoView, scrollTo, selectorFor, setFieldValue, setState, shortcutKey, shorthandLonghands, singlePageSpace, slugify, source, e as spaceCallbacks, specFromSpace, specToSource, splitClassList, d as splitNotificationsCss, stepState, styles, suggestClassOverrides, suggestCssProperty, suggestSpace, suggestTransformer, summariseRenders, svg, tabContainer, tabContainerBody, tabContainerHeader, tabContainerItem, text, themeToggle, toBindingSpecs, toBlocks, i$2 as toBuilderParams, a$1 as toInteractionCallback, o$1 as toInteractionCallbacks, toPortableSource, toResponsive, toggleElement, toggleInState, toggleState, tokens, transformerCatalog, tw, twig, twigTemplate, typeCallbackDefinitions, typeTriggerDefinitions, unrollPage, unusedDeclarations, updateElement, validateSnippet, validateSpace, e$1 as valuesOf, variantFrom, video, visibleWhen, webHook, when, whenFailed, whenSucceeded, whileRunning, withElement, withNamedIds, withNotificationsCss, withPluginCatalogs, withVisibility, withoutQuieted };
|
package/dist/node.d.ts
CHANGED
|
@@ -545,6 +545,16 @@ declare const AUTHORING_CODES: {
|
|
|
545
545
|
readonly means: "a `runtime: 'server'` element inside a component: the page server resolves a page's and its layouts', never a component's";
|
|
546
546
|
readonly fix: "put the provider on the page, around the instance, and hand the component its rows as a prop";
|
|
547
547
|
};
|
|
548
|
+
readonly 'not-found-in-browser': {
|
|
549
|
+
readonly kind: "refused";
|
|
550
|
+
readonly means: "`notFound` on a provider asked from the browser — its answer arrives after the page was sent with its status";
|
|
551
|
+
readonly fix: "`runtime: 'server'` on the provider, or `visible` on the page's \"not found\" part instead";
|
|
552
|
+
};
|
|
553
|
+
readonly 'not-found-not-a-template': {
|
|
554
|
+
readonly kind: "refused";
|
|
555
|
+
readonly means: "`notFound` that is not one `{{ expression }}` against the answer — never `true`, so never a 404";
|
|
556
|
+
readonly fix: "`notFound: '{{ source.found == false }}'`";
|
|
557
|
+
};
|
|
548
558
|
readonly 'server-data-in-browser': {
|
|
549
559
|
readonly kind: "refused";
|
|
550
560
|
readonly means: "a provider asking for the project's own data (`/data/…`, read by its server from `src/data/` and never served) from the browser";
|
|
@@ -720,6 +730,11 @@ declare const AUTHORING_CODES: {
|
|
|
720
730
|
readonly means: "a prop whose name a template cannot read as `props.x`";
|
|
721
731
|
readonly fix: "letters, digits and `_`";
|
|
722
732
|
};
|
|
733
|
+
readonly 'prop-type-unknown': {
|
|
734
|
+
readonly kind: "refused";
|
|
735
|
+
readonly means: "a prop declared with a type no editor offers and nothing checks a value against";
|
|
736
|
+
readonly fix: "one of text, textarea, select, boolean, number, scalar, json, elementIds — words are `text`";
|
|
737
|
+
};
|
|
723
738
|
readonly 'prop-unknown': {
|
|
724
739
|
readonly kind: "refused";
|
|
725
740
|
readonly means: "a prop the component does not declare, handed in or read";
|
|
@@ -1025,6 +1040,11 @@ declare const AUTHORING_CODES: {
|
|
|
1025
1040
|
readonly means: "a colour written out in a class where the space has a token of that value — it stays put in the dark scheme";
|
|
1026
1041
|
readonly fix: "`var(--token)` when it should follow the scheme; a token of one value of its own when it must stay the same in both";
|
|
1027
1042
|
};
|
|
1043
|
+
readonly 'not-found-page': {
|
|
1044
|
+
readonly kind: "suggested";
|
|
1045
|
+
readonly means: "a space with no page of its own for an address no other page answers — a plain one was added, in the home page’s layout, sent with status 404";
|
|
1046
|
+
readonly fix: "a page whose slug is `'*'`: `{ id: 'not-found', name: 'Not found', slug: '*', layout: …, body: [...] }`";
|
|
1047
|
+
};
|
|
1028
1048
|
readonly 'unused-component': {
|
|
1029
1049
|
readonly kind: "suggested";
|
|
1030
1050
|
readonly means: "a component no page, layout or other component places";
|
|
@@ -1083,6 +1103,8 @@ declare type BindingTransformer = {
|
|
|
1083
1103
|
enabled?: boolean;
|
|
1084
1104
|
};
|
|
1085
1105
|
|
|
1106
|
+
declare const BUILTIN_PARAM_TYPES: readonly ["text", "textarea", "select", "boolean", "number", "scalar", "json", "elementIds"];
|
|
1107
|
+
|
|
1086
1108
|
declare interface BuiltinParam {
|
|
1087
1109
|
type: BuiltinParamType;
|
|
1088
1110
|
description: string;
|
|
@@ -1105,7 +1127,7 @@ declare interface BuiltinParam {
|
|
|
1105
1127
|
elementType?: string;
|
|
1106
1128
|
}
|
|
1107
1129
|
|
|
1108
|
-
declare type BuiltinParamType =
|
|
1130
|
+
declare type BuiltinParamType = (typeof BUILTIN_PARAM_TYPES)[number];
|
|
1109
1131
|
|
|
1110
1132
|
/**
|
|
1111
1133
|
* One kind of channel a space offers, declared under a topic PATTERN — `board:{id}` is every board, each its own topic.
|
|
@@ -1711,6 +1733,9 @@ declare interface LayoutSpec {
|
|
|
1711
1733
|
body: ElementSpec[];
|
|
1712
1734
|
}
|
|
1713
1735
|
|
|
1736
|
+
/** Where in the project's own files an error points first, and what it says: a module that did not load, located. */
|
|
1737
|
+
export declare const moduleProblem: (error: unknown, root: string) => string;
|
|
1738
|
+
|
|
1714
1739
|
/**
|
|
1715
1740
|
* An element's declared motion — how it arrives, when, and whether it keeps moving — which the SDK's own stylesheet
|
|
1716
1741
|
* plays (`_motion.scss`). Every preset moves only `opacity` and `transform`, which the compositor animates without
|
|
@@ -1930,6 +1955,7 @@ export declare const pluginDeclarations: (folder: string | URL) => Promise<Plugi
|
|
|
1930
1955
|
export declare type ProjectAuthoring = {
|
|
1931
1956
|
plugins: PluginDeclarationData[];
|
|
1932
1957
|
pluginTypes: string[];
|
|
1958
|
+
stylesheets: string[];
|
|
1933
1959
|
serverData?: (query: string) => unknown;
|
|
1934
1960
|
data: (query: string) => unknown;
|
|
1935
1961
|
};
|
|
@@ -1940,6 +1966,7 @@ export declare type ProjectAuthoring = {
|
|
|
1940
1966
|
*
|
|
1941
1967
|
* - `plugins`: every plugin folder's declaration (`src/plugins/<Name>/declaration.ts`, `pluginDeclarations`);
|
|
1942
1968
|
* - `pluginTypes`: the element types of the plugins it runs as they were built (`vendor/plugins/`);
|
|
1969
|
+
* - `stylesheets`: its plugins' own CSS, every `.css` under `src/plugins/`, for the tokens they read;
|
|
1943
1970
|
* - `serverData`: the project's own data, which only its server reads (`src/data/`, `projectData`) — a server-mode
|
|
1944
1971
|
* project's; one with no server has no such folder, and its providers read `public/data/` from the browser;
|
|
1945
1972
|
* - `data`: the JSON files it serves (`public/`, `publicData`).
|
|
@@ -1969,6 +1996,15 @@ export declare const projectAuthoringAt: (root: string) => Promise<ProjectAuthor
|
|
|
1969
1996
|
*/
|
|
1970
1997
|
export declare const projectData: (folder: string | URL) => ((query: string) => unknown);
|
|
1971
1998
|
|
|
1999
|
+
/**
|
|
2000
|
+
* A module of the project that did not load — a file that does not parse, an import of nothing, a module that throws
|
|
2001
|
+
* as it runs — said at the first of the project's own files it points at: `src/space/hero.ts:139: Expected ','…`. The
|
|
2002
|
+
* server, `npm run author` and the CLI each say it in those words, never as a stack.
|
|
2003
|
+
*/
|
|
2004
|
+
export declare class ProjectModuleError extends Error {
|
|
2005
|
+
constructor(message: string);
|
|
2006
|
+
}
|
|
2007
|
+
|
|
1972
2008
|
/**
|
|
1973
2009
|
* The space of the project this process runs — `src/space/index.ts`'s `space` — with what it is checked against, once
|
|
1974
2010
|
* the project's root and layout are (`projectAuthoring`). Imported only then, so a factory that refuses what it is
|
|
@@ -2236,6 +2272,10 @@ declare type SchemaValidationError = {
|
|
|
2236
2272
|
elementId?: string;
|
|
2237
2273
|
/** The component whose tree the error is in; absent for the pages' tree. */
|
|
2238
2274
|
componentId?: string;
|
|
2275
|
+
/** The name an element points at that no element answers to — what a suggestion of the nearest one is made from. */
|
|
2276
|
+
missing?: string;
|
|
2277
|
+
/** The step the missing element was to answer (`openModal`): a suggestion is drawn from the elements that do. */
|
|
2278
|
+
wantedBy?: string;
|
|
2239
2279
|
details?: unknown;
|
|
2240
2280
|
};
|
|
2241
2281
|
|
|
@@ -2718,6 +2758,8 @@ declare const styleConstants: {
|
|
|
2718
2758
|
readonly TEXT_INDENT: "text-indent";
|
|
2719
2759
|
readonly TEXT_TRANSFORM: "text-transform";
|
|
2720
2760
|
readonly DIRECTION: "direction";
|
|
2761
|
+
readonly WRITING_MODE: "writing-mode";
|
|
2762
|
+
readonly TEXT_ORIENTATION: "text-orientation";
|
|
2721
2763
|
readonly WHITE_SPACE: "white-space";
|
|
2722
2764
|
readonly TEXT_WRAP: "text-wrap";
|
|
2723
2765
|
readonly WORD_BREAK: "word-break";
|