@plitzi/sdk-authoring 0.38.24 → 0.39.0
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 +146 -1
- package/dist/index-src.js +27619 -16681
- package/dist/index.d.ts +2750 -694
- package/dist/index.js +2 -2
- package/dist/node.d.ts +1283 -559
- package/dist/node.js +511 -289
- package/dist/plugin.d.ts +57 -1
- package/package.json +8 -8
- package/skills/plitzi-authoring/CHEATSHEET.md +6 -6
- package/skills/plitzi-authoring/SKILL.md +4 -2
- package/skills/plitzi-authoring/recipes/accordion.ts +2 -1
- package/skills/plitzi-authoring/recipes/carousel.ts +24 -3
- package/skills/plitzi-authoring/recipes/detail-page.ts +0 -1
- package/skills/plitzi-authoring/recipes/embed-and-svg.ts +3 -1
- package/skills/plitzi-authoring/recipes/filter-a-list.ts +0 -1
- package/skills/plitzi-authoring/recipes/show-data.ts +0 -1
- package/skills/plitzi-authoring/recipes/typed-data.ts +0 -1
- package/skills/plitzi-authoring/reference/accessibility.md +7 -2
- package/skills/plitzi-authoring/reference/auth.md +15 -4
- package/skills/plitzi-authoring/reference/authoring-errors.md +51 -10
- package/skills/plitzi-authoring/reference/colours-and-motion.md +7 -1
- package/skills/plitzi-authoring/reference/components.md +4 -1
- package/skills/plitzi-authoring/reference/data-and-visibility.md +31 -22
- package/skills/plitzi-authoring/reference/efficiency.md +2 -1
- package/skills/plitzi-authoring/reference/elements-and-styles.md +16 -15
- package/skills/plitzi-authoring/reference/flows.md +20 -8
- package/skills/plitzi-authoring/reference/kept-state.md +8 -0
- package/skills/plitzi-authoring/reference/layouts.md +18 -2
- package/skills/plitzi-authoring/reference/lists.md +20 -4
- package/skills/plitzi-authoring/reference/plugin-reach.md +12 -0
- package/skills/plitzi-authoring/reference/plugins.md +13 -2
- package/skills/plitzi-authoring/reference/realtime.md +8 -5
- package/skills/plitzi-authoring/reference/structure.md +17 -1
- package/skills/plitzi-authoring/reference/templates.md +11 -3
- package/skills/plitzi-authoring/reference/testing.md +82 -5
- package/skills/plitzi-authoring/reference/typed-sources.md +6 -0
- package/skills/plitzi-authoring/reference/validation.md +1 -1
package/dist/node.d.ts
CHANGED
|
@@ -23,6 +23,115 @@ declare type ActionAccess =
|
|
|
23
23
|
permissions: string[];
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* A server action: a declarative flow, stored per space, executed by the server.
|
|
28
|
+
*
|
|
29
|
+
* It is the SAME document an element's interactions are — a map of steps, each naming a task, chained by
|
|
30
|
+
* `afterNode` — and it is deliberately nothing more. Everything that used to be declared beside the flow now lives
|
|
31
|
+
* on the step that starts it, so there is one place to read and one place to author, and the editor is the one
|
|
32
|
+
* already in the product.
|
|
33
|
+
*
|
|
34
|
+
* It lives in shared types because the builder authors the very document the server executes — the same reason
|
|
35
|
+
* `ConnectorManifest` does. It is server-side state: it goes to the BUILDER, which is authorized to edit it, and
|
|
36
|
+
* never into a page. What a visitor's page holds is the action's identifier, and what it gets back is whatever the
|
|
37
|
+
* output step named.
|
|
38
|
+
*
|
|
39
|
+
* There is no `enabled` here. Whether an action can run is whether any way INTO it is switched on, and that switch
|
|
40
|
+
* is the trigger step's own — one per way in, which is finer than one per action and is the control an author
|
|
41
|
+
* actually reaches for. A field beside the flow was the same fact written twice, with no rule for which won.
|
|
42
|
+
* Read it with `isActionEnabled` from `@plitzi/sdk-shared/actions`.
|
|
43
|
+
*/
|
|
44
|
+
declare type ActionDocument = {
|
|
45
|
+
name: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The flows. One or more `trigger` steps, each heading a chain of `task` steps — the same node map an element's
|
|
49
|
+
* `interactions` holds, so one editor authors both.
|
|
50
|
+
*/
|
|
51
|
+
nodes: Record<string, ElementInteraction>;
|
|
52
|
+
/**
|
|
53
|
+
* The keys the `flow.output` step names, DERIVED from it — never authored beside it.
|
|
54
|
+
*
|
|
55
|
+
* It exists so the builder can offer typed bindings on a call's result without opening the flow. Declaring it by
|
|
56
|
+
* hand was the original design and it was wrong: it asks an author to know what a flow returns before the steps
|
|
57
|
+
* that produce it exist, and it leaves two places to keep in step. The runner ignores this entirely and answers
|
|
58
|
+
* exactly what the output step named.
|
|
59
|
+
*/
|
|
60
|
+
output?: Record<string, ActionField>;
|
|
61
|
+
limits?: ActionLimits;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* An action as a server-side reader hands it over.
|
|
66
|
+
*
|
|
67
|
+
* `id` is stamped by the store rather than carried by the document, for the same reason `ConnectorManifestDraft`
|
|
68
|
+
* drops it: a document holding its own id can disagree with the one it was fetched by.
|
|
69
|
+
*/
|
|
70
|
+
declare type ActionEntry = {
|
|
71
|
+
id: string;
|
|
72
|
+
document: ActionDocument;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
declare type ActionField = {
|
|
76
|
+
type: ActionFieldType;
|
|
77
|
+
required?: boolean;
|
|
78
|
+
defaultValue?: string | number | boolean;
|
|
79
|
+
/** Shown in the builder, and read by the MCP agent when it wires a call. */
|
|
80
|
+
label?: string;
|
|
81
|
+
/** A `text` field's longest value: a longer one is refused before the action runs. */
|
|
82
|
+
maxLength?: number;
|
|
83
|
+
/** A `number` field's least value: a smaller one is refused before the action runs. */
|
|
84
|
+
min?: number;
|
|
85
|
+
/** A `number` field's greatest value: a larger one is refused before the action runs. */
|
|
86
|
+
max?: number;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* What an action's inputs and outputs may be.
|
|
91
|
+
*
|
|
92
|
+
* Deliberately NOT `CollectionField['type']`: that vocabulary describes CMS content (`richText`, `multiImage`,
|
|
93
|
+
* `video`) and an action takes arguments, not entries. `json` is the escape hatch for a nested payload, and it is
|
|
94
|
+
* the only one whose contents are not validated beyond being parseable.
|
|
95
|
+
*/
|
|
96
|
+
declare type ActionFieldType = 'text' | 'number' | 'boolean' | 'date' | 'json' | 'file';
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Ceilings for one run. A per-action value may only tighten the deployment's own. Left out, the deployment's — on
|
|
100
|
+
* Plitzi's the defaults below.
|
|
101
|
+
*/
|
|
102
|
+
declare type ActionLimits = {
|
|
103
|
+
/**
|
|
104
|
+
* How long a run may take: 10 000 ms by default. A render action that feeds a page — an `apiContainer` with
|
|
105
|
+
* `runtime: 'server'` — has the page's own ceiling too, and the page's wins: each section is cut at 5 000 ms by
|
|
106
|
+
* default (`rsc.elementTimeoutMs` of the deployment), and arrives empty. Budget a render under the smaller: a run's
|
|
107
|
+
* developer budgeted 8.5 s against the 10 s, and the section came out empty.
|
|
108
|
+
*/
|
|
109
|
+
timeoutMs?: number;
|
|
110
|
+
/** Ceiling for a streaming run, which is allowed to be longer-lived than a request/response one: 120 000 ms by default. */
|
|
111
|
+
streamTimeoutMs?: number;
|
|
112
|
+
/** How many steps one run may take: 50 by default. */
|
|
113
|
+
maxNodes?: number;
|
|
114
|
+
/** How many requests one run may make: 20 by default. */
|
|
115
|
+
maxRequests?: number;
|
|
116
|
+
/**
|
|
117
|
+
* Bytes one outbound response may carry back into a flow.
|
|
118
|
+
*
|
|
119
|
+
* A timeout does not cover this: a backend answering a gigabyte quickly is a fast way to take a process down,
|
|
120
|
+
* and every other ceiling here is about how LONG a run may take rather than how much it may hold. Counted per
|
|
121
|
+
* response rather than per run, because it exists to stop one answer from being unbounded. 5 000 000 by default.
|
|
122
|
+
*/
|
|
123
|
+
maxResponseBytes?: number;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Every server action of a folder — a project's `src/actions/` — a domain a file, read by what each exports: an action
|
|
128
|
+
* (`defineAction`, `taskAction`) or a list of them, by any name. Nothing lists them: a run's agents all appended to one
|
|
129
|
+
* `actions/index.ts`, and its conflicts and integration tasks were that list. The folder's `index` is where this is
|
|
130
|
+
* called from, and is not read. One action exported twice (on its own and in its file's list) counts once; two of one id
|
|
131
|
+
* are refused, naming both files.
|
|
132
|
+
*/
|
|
133
|
+
export declare const actionsIn: (folder: string | URL) => Promise<ActionEntry[]>;
|
|
134
|
+
|
|
26
135
|
/** What one ancestor condition changes: inside it always, in its states, or in its variants (and their states). */
|
|
27
136
|
declare interface AncestorSpec {
|
|
28
137
|
css?: CssSpec;
|
|
@@ -54,356 +163,542 @@ declare interface AuthoredSpace {
|
|
|
54
163
|
suggestions: Suggestion[];
|
|
55
164
|
}
|
|
56
165
|
|
|
166
|
+
/** Every code authoring and its lint answer with — what each means and what to write instead: `plitzi explain <code>`. */
|
|
57
167
|
declare const AUTHORING_CODES: {
|
|
58
|
-
readonly '
|
|
168
|
+
readonly 'repeated-on-pages': {
|
|
169
|
+
readonly kind: "suggested";
|
|
170
|
+
readonly means: "the same block — a header, a footer, a side panel — written into several pages";
|
|
171
|
+
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, written in its area’s folder and listed in the space’s `components`; a link marks its own page with the `current` state";
|
|
172
|
+
};
|
|
173
|
+
readonly 'repeated-shape': {
|
|
174
|
+
readonly kind: "suggested";
|
|
175
|
+
readonly means: "the same structure written again and again with different words — cards, rows, tiles; copies that bind different data, read their own template or render on the server are controls, not repeats";
|
|
176
|
+
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";
|
|
177
|
+
};
|
|
178
|
+
readonly 'element-color-inherited': {
|
|
179
|
+
readonly kind: "suggested";
|
|
180
|
+
readonly means: "`elements` giving a type — a heading, a text, a link — `color: inherit` or the page's own colour, which it takes by itself";
|
|
181
|
+
readonly fix: "remove it, and name the colour once on `elements.page`: every element reads in the page’s colour, a link’s words included";
|
|
182
|
+
};
|
|
183
|
+
readonly 'plugin-custom-host': {
|
|
184
|
+
readonly kind: "suggested";
|
|
185
|
+
readonly means: "a `custom` element naming, by `renderType`, a plugin whose declaration the space was handed";
|
|
186
|
+
readonly fix: "place it from its declaration — `const seatPicker = defineElement(declaration)`, then `seatPicker({ id, … })`: typed by what it declares (a `definePlugin` declaration carries its attributes), the element the builder adds too";
|
|
187
|
+
};
|
|
188
|
+
readonly 'content-attribute': {
|
|
189
|
+
readonly kind: "suggested";
|
|
190
|
+
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";
|
|
191
|
+
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";
|
|
192
|
+
};
|
|
193
|
+
readonly 'custom-css-class': {
|
|
194
|
+
readonly kind: "suggested";
|
|
195
|
+
readonly means: "a `customCss` rule a class can hold — `.card:hover`, `.panel .icon`";
|
|
196
|
+
readonly fix: "the class's own `states` or `ancestors`, where the style editor reads it back and a breakpoint can change it";
|
|
197
|
+
};
|
|
198
|
+
readonly 'custom-css-sdk-default': {
|
|
199
|
+
readonly kind: "suggested";
|
|
200
|
+
readonly means: "`customCss` repeating what the SDK already does for every space — less motion when asked, the theme toggle showing one icon";
|
|
201
|
+
readonly fix: "nothing: remove it";
|
|
202
|
+
};
|
|
203
|
+
readonly 'custom-css-slot': {
|
|
204
|
+
readonly kind: "suggested";
|
|
205
|
+
readonly means: "a part of a built-in element dressed in `customCss` by the SDK's markup — a form control's `<input>`, a pager's buttons, a heading inside a markdown";
|
|
206
|
+
readonly fix: "a class on the slot of that part — `slots: { field: input }`, `elements.<type>.slots` — with its states";
|
|
207
|
+
};
|
|
208
|
+
readonly 'custom-css-notifications': {
|
|
209
|
+
readonly kind: "suggested";
|
|
210
|
+
readonly means: "the toasts or their icon, close button or progress bar dressed with `.Toastify__*` rules in `customCss`";
|
|
211
|
+
readonly fix: "`notifications: { font, fontSize, fontWeight, minHeight, iconSize, closeColor, progressHeight, … }`";
|
|
212
|
+
};
|
|
213
|
+
readonly 'heavy-animation': {
|
|
214
|
+
readonly kind: "suggested";
|
|
215
|
+
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";
|
|
216
|
+
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]`";
|
|
217
|
+
};
|
|
218
|
+
readonly 'unused-class': {
|
|
219
|
+
readonly kind: "suggested";
|
|
220
|
+
readonly means: "a class declared in `classes` that no element, binding, flow or other class names";
|
|
221
|
+
readonly fix: "remove it from `classes` — or wear it where it was meant to go";
|
|
222
|
+
};
|
|
223
|
+
readonly 'unused-token': {
|
|
224
|
+
readonly kind: "suggested";
|
|
225
|
+
readonly means: "a token of `variables` no `var(--…)` reads — not a class, an element, `customCss` nor another token";
|
|
226
|
+
readonly fix: "remove it, or write it where its colour is written out";
|
|
227
|
+
};
|
|
228
|
+
readonly 'literal-colour': {
|
|
229
|
+
readonly kind: "suggested";
|
|
230
|
+
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";
|
|
231
|
+
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";
|
|
232
|
+
};
|
|
233
|
+
readonly 'not-found-page': {
|
|
234
|
+
readonly kind: "suggested";
|
|
235
|
+
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";
|
|
236
|
+
readonly fix: "a page whose slug is `'*'`: `{ id: 'not-found', name: 'Not found', slug: '*', layout: …, body: [...] }`";
|
|
237
|
+
};
|
|
238
|
+
readonly 'unused-plugin': {
|
|
239
|
+
readonly kind: "suggested";
|
|
240
|
+
readonly means: "a plugin the project declares that no page, layout or component places — built and shipped, drawn nowhere";
|
|
241
|
+
readonly fix: "place it where it was meant to go, or remove its folder from `src/plugins/`";
|
|
242
|
+
};
|
|
243
|
+
readonly 'unused-component': {
|
|
244
|
+
readonly kind: "suggested";
|
|
245
|
+
readonly means: "a component no page, layout or other component places";
|
|
246
|
+
readonly fix: "remove it from `components`, or place it where it was meant to go";
|
|
247
|
+
};
|
|
248
|
+
readonly 'class-overrides-class': {
|
|
249
|
+
readonly kind: "suggested";
|
|
250
|
+
readonly means: "one class's shorthand erasing the longhand another class on the same element writes out — `padding` over `padding-top` — or the same property set over the class listed after it — `gap` over `gap` — because the stylesheet writes it later: classes in the order they are first met, a breakpoint's rules after the base, never the order of a class list";
|
|
251
|
+
readonly fix: "the longhands the shorthand means instead of it (`padding-left`, `padding-right`), so it leaves the other class's alone; the same property, left to one of the two or written on the element itself — or `quiet: ['class-overrides-class']` when the winner is meant to win";
|
|
252
|
+
};
|
|
253
|
+
readonly 'test-unreadable': {
|
|
254
|
+
readonly kind: "warned";
|
|
255
|
+
readonly means: "a test of the space — an element check or a flow — that cannot be read as it is written: a page no page of the space answers, an element it no longer has, a relation that is none. A snapshot and a publish wait for it";
|
|
256
|
+
readonly fix: "the test as the message says — or the space back to what the test expects";
|
|
257
|
+
};
|
|
258
|
+
readonly 'journey-start-access': {
|
|
259
|
+
readonly kind: "warned";
|
|
260
|
+
readonly means: "a journey starts on a page its visitor may not be on: one for signed-in visitors played as a guest (sent to sign in there), or one asking permissions its test account’s roles do not give (withheld from it)";
|
|
261
|
+
readonly fix: "the journey played as an account that may open the page — or started on a page its visitor opens; kept as it is when the door is what it checks";
|
|
262
|
+
};
|
|
263
|
+
readonly 'test-account-role-gone': {
|
|
264
|
+
readonly kind: "warned";
|
|
265
|
+
readonly means: "a test account holds a visitor role the space does not declare in `settings.visitorRoles` — removed since, or never there: a journey plays it without that role, and one that needed what it gave fails";
|
|
266
|
+
readonly fix: "one of the space’s roles for the account — or the role declared again";
|
|
267
|
+
};
|
|
268
|
+
readonly 'control-without-name': {
|
|
269
|
+
readonly kind: "warned";
|
|
270
|
+
readonly means: "a button or a link with no words, or a field nothing names";
|
|
271
|
+
readonly fix: "`title` on the button, `label` on the link, `label` (with `hideLabel: true`) on the field";
|
|
272
|
+
};
|
|
273
|
+
readonly 'embed-without-title': {
|
|
274
|
+
readonly kind: "warned";
|
|
275
|
+
readonly means: "an `embed` with no `title` — a frame a screen reader cannot describe";
|
|
276
|
+
readonly fix: "say what it shows in `title`";
|
|
277
|
+
};
|
|
278
|
+
readonly 'image-without-alt': {
|
|
279
|
+
readonly kind: "warned";
|
|
280
|
+
readonly means: "an image that is not `decorative` and has no `alt`";
|
|
281
|
+
readonly fix: "say what it shows, or `decorative: true`";
|
|
282
|
+
};
|
|
283
|
+
readonly 'click-on-static-element': {
|
|
284
|
+
readonly kind: "warned";
|
|
285
|
+
readonly means: "a click flow on a container, text, heading, image or list item — no keyboard reaches it";
|
|
286
|
+
readonly fix: "the flow on a `button` (it holds children) or a `link`";
|
|
287
|
+
};
|
|
288
|
+
readonly 'heading-level-skipped': {
|
|
289
|
+
readonly kind: "warned";
|
|
290
|
+
readonly means: "an `h4` right after an `h2` — the outline misses a level";
|
|
291
|
+
readonly fix: "the next level down; size it with its class";
|
|
292
|
+
};
|
|
293
|
+
readonly 'label-ignored': {
|
|
294
|
+
readonly kind: "warned";
|
|
295
|
+
readonly means: "a `label` on a container whose tag is named by what it holds (`li`, a heading)";
|
|
296
|
+
readonly fix: "the words inside, or a landmark tag (`nav`, `section`…)";
|
|
297
|
+
};
|
|
298
|
+
readonly 'dropdown-without-control': {
|
|
299
|
+
readonly kind: "warned";
|
|
300
|
+
readonly means: "a dropdown opened from a box or an icon — no keyboard opens it";
|
|
301
|
+
readonly fix: "a `button` as what opens it (`title` if it is only an icon)";
|
|
302
|
+
};
|
|
303
|
+
readonly 'control-in-decorative': {
|
|
304
|
+
readonly kind: "warned";
|
|
305
|
+
readonly means: "a control inside a `decorative` container — Tab lands on something nothing announces";
|
|
306
|
+
readonly fix: "move it out of the illustration";
|
|
307
|
+
};
|
|
308
|
+
readonly 'action-without-entry': {
|
|
59
309
|
readonly kind: "refused";
|
|
60
|
-
readonly means: "
|
|
61
|
-
readonly fix: "`
|
|
310
|
+
readonly means: "an action with no way in, so nothing can start it";
|
|
311
|
+
readonly fix: "a `trigger` — `{ type: 'call', access }`, or `render`, `webhook`, `custom`, `schedule`";
|
|
62
312
|
};
|
|
63
|
-
readonly '
|
|
313
|
+
readonly 'action-without-steps': {
|
|
64
314
|
readonly kind: "refused";
|
|
65
|
-
readonly means: "
|
|
66
|
-
readonly fix: "
|
|
315
|
+
readonly means: "an action with no steps";
|
|
316
|
+
readonly fix: "the steps it runs";
|
|
67
317
|
};
|
|
68
|
-
readonly '
|
|
318
|
+
readonly 'action-step-params': {
|
|
69
319
|
readonly kind: "refused";
|
|
70
|
-
readonly means: "
|
|
71
|
-
readonly fix: "
|
|
320
|
+
readonly means: "a step with no params in an action whose ways in declare different inputs";
|
|
321
|
+
readonly fix: "the step's params";
|
|
72
322
|
};
|
|
73
|
-
readonly '
|
|
323
|
+
readonly 'channel-declaration': {
|
|
74
324
|
readonly kind: "refused";
|
|
75
|
-
readonly means: "a
|
|
76
|
-
readonly fix: "
|
|
325
|
+
readonly means: "a channel whose pattern or access the server cannot read";
|
|
326
|
+
readonly fix: "what the message says: `{ access: { mode: 'public' } }`, a pattern like `room:{id}`";
|
|
77
327
|
};
|
|
78
|
-
readonly '
|
|
79
|
-
readonly kind: "
|
|
80
|
-
readonly means: "
|
|
81
|
-
readonly fix: "
|
|
328
|
+
readonly 'channel-topic': {
|
|
329
|
+
readonly kind: "refused";
|
|
330
|
+
readonly means: "a `channel` element with no topic";
|
|
331
|
+
readonly fix: "a topic a channel of the space covers";
|
|
82
332
|
};
|
|
83
|
-
readonly '
|
|
84
|
-
readonly kind: "
|
|
85
|
-
readonly means: "
|
|
86
|
-
readonly fix: "
|
|
333
|
+
readonly 'channel-grant': {
|
|
334
|
+
readonly kind: "refused";
|
|
335
|
+
readonly means: "a topic of a private channel opened with no grant to it";
|
|
336
|
+
readonly fix: "the grant the message names, or a public channel";
|
|
87
337
|
};
|
|
88
|
-
readonly '
|
|
338
|
+
readonly 'condition-short-source': {
|
|
89
339
|
readonly kind: "refused";
|
|
90
|
-
readonly means: "
|
|
91
|
-
readonly fix: "the
|
|
340
|
+
readonly means: "a step's condition reading an element's source by the element's id alone — `roomStats.locked` — which reads nothing";
|
|
341
|
+
readonly fix: "the source named in full, as a template names it: `apiContainer_roomStats.locked`";
|
|
92
342
|
};
|
|
93
|
-
readonly '
|
|
343
|
+
readonly 'flow-empty': {
|
|
94
344
|
readonly kind: "refused";
|
|
95
|
-
readonly means: "a
|
|
96
|
-
readonly fix: "
|
|
345
|
+
readonly means: "a flow with no steps";
|
|
346
|
+
readonly fix: "`[onClick(), setState({ … })]`";
|
|
97
347
|
};
|
|
98
|
-
readonly '
|
|
348
|
+
readonly 'flow-without-trigger': {
|
|
99
349
|
readonly kind: "refused";
|
|
100
|
-
readonly means: "
|
|
101
|
-
readonly fix: "
|
|
350
|
+
readonly means: "a flow whose first step is not the event that runs it";
|
|
351
|
+
readonly fix: "`[onClick(), setState(…)]`";
|
|
102
352
|
};
|
|
103
|
-
readonly '
|
|
353
|
+
readonly 'step-name': {
|
|
104
354
|
readonly kind: "refused";
|
|
105
|
-
readonly means: "a
|
|
106
|
-
readonly fix: "
|
|
355
|
+
readonly means: "a step name a later step cannot read as `{{ name.field }}`";
|
|
356
|
+
readonly fix: "a letter first, then letters, digits, `-` and `_`";
|
|
107
357
|
};
|
|
108
|
-
readonly '
|
|
358
|
+
readonly 'step-duplicate': {
|
|
109
359
|
readonly kind: "refused";
|
|
110
|
-
readonly means: "
|
|
111
|
-
readonly fix: "
|
|
360
|
+
readonly means: "two steps with one name in a flow, in two flows of one element, or in an action";
|
|
361
|
+
readonly fix: "a name each";
|
|
112
362
|
};
|
|
113
|
-
readonly '
|
|
363
|
+
readonly 'step-type': {
|
|
114
364
|
readonly kind: "refused";
|
|
115
|
-
readonly means: "
|
|
116
|
-
readonly fix: "
|
|
365
|
+
readonly means: "a step `type` that does not exist";
|
|
366
|
+
readonly fix: "the step builders — `setState(…)`, `navigate(…)` — write it";
|
|
117
367
|
};
|
|
118
|
-
readonly '
|
|
368
|
+
readonly 'step-params': {
|
|
119
369
|
readonly kind: "refused";
|
|
120
|
-
readonly means: "a
|
|
121
|
-
readonly fix: "
|
|
370
|
+
readonly means: "a step param that does not exist, or a value outside its options";
|
|
371
|
+
readonly fix: "the params and values it lists";
|
|
122
372
|
};
|
|
123
|
-
readonly '
|
|
373
|
+
readonly 'element-ids-target': {
|
|
124
374
|
readonly kind: "refused";
|
|
125
|
-
readonly means: "
|
|
126
|
-
readonly fix: "
|
|
375
|
+
readonly means: "a step refreshing containers by id (`invalidateElements`, `invalidateQueries({ elements })`) naming one the space does not have, or one that is not an `apiContainer`";
|
|
376
|
+
readonly fix: "the id of the `apiContainer` whose data the step changes: `invalidateElements: ['posts']`";
|
|
127
377
|
};
|
|
128
|
-
readonly '
|
|
378
|
+
readonly 'trigger-never-fired': {
|
|
129
379
|
readonly kind: "refused";
|
|
130
|
-
readonly means: "a
|
|
131
|
-
readonly fix: "
|
|
380
|
+
readonly means: "a flow on an event the element never fires";
|
|
381
|
+
readonly fix: "the element that fires it; for a plugin, `declaredTrigger(declaration, 'onPick')`";
|
|
132
382
|
};
|
|
133
|
-
readonly '
|
|
383
|
+
readonly 'trigger-keys': {
|
|
134
384
|
readonly kind: "refused";
|
|
135
|
-
readonly means: "
|
|
136
|
-
readonly fix: "
|
|
385
|
+
readonly means: "an `onKey` shortcut that cannot fire: two keys at once, only modifiers, or a name that is not a key";
|
|
386
|
+
readonly fix: "`onKey('f')`, `onKey('shift+f')`, `onKey('mod+k, escape')`";
|
|
137
387
|
};
|
|
138
|
-
readonly '
|
|
388
|
+
readonly 'trigger-interval': {
|
|
139
389
|
readonly kind: "refused";
|
|
140
|
-
readonly means: "
|
|
141
|
-
readonly fix: "`
|
|
390
|
+
readonly means: "an `onInterval` that never ticks: not a whole number of milliseconds, or below 250";
|
|
391
|
+
readonly fix: "`onInterval(5000)`";
|
|
142
392
|
};
|
|
143
|
-
readonly '
|
|
393
|
+
readonly 'while-running': {
|
|
144
394
|
readonly kind: "refused";
|
|
145
|
-
readonly means: "a
|
|
146
|
-
readonly fix: "
|
|
395
|
+
readonly means: "`whileRunning` on a step that is not the trigger, or a mode other than `skip`, `parallel`, `queue`, `latest`";
|
|
396
|
+
readonly fix: "`[whileRunning('queue', onClick()), …]`";
|
|
147
397
|
};
|
|
148
|
-
readonly '
|
|
398
|
+
readonly 'callback-not-answered': {
|
|
149
399
|
readonly kind: "refused";
|
|
150
|
-
readonly means: "a
|
|
151
|
-
readonly fix: "
|
|
400
|
+
readonly means: "a step sending an action the target element never answers to";
|
|
401
|
+
readonly fix: "the element that answers it; for a plugin, `declaredCallback(declaration, 'reset', { on })`";
|
|
152
402
|
};
|
|
153
|
-
readonly '
|
|
403
|
+
readonly 'callback-key-unknown': {
|
|
154
404
|
readonly kind: "refused";
|
|
155
|
-
readonly means: "a `
|
|
156
|
-
readonly fix: "
|
|
405
|
+
readonly means: "a `setState` / `toggleState` on an element writing a field it does not have";
|
|
406
|
+
readonly fix: "an attribute it lists, or for `category: 'state'` `visibility` / `styleSelectors.<selector>`";
|
|
157
407
|
};
|
|
158
|
-
readonly '
|
|
408
|
+
readonly 'global-callback-undeclared': {
|
|
159
409
|
readonly kind: "refused";
|
|
160
|
-
readonly means: "a
|
|
161
|
-
readonly fix: "
|
|
410
|
+
readonly means: "a global-callback step builder naming an action no source declares";
|
|
411
|
+
readonly fix: "one of the actions it lists";
|
|
162
412
|
};
|
|
163
|
-
readonly '
|
|
413
|
+
readonly 'global-callback-module': {
|
|
164
414
|
readonly kind: "refused";
|
|
165
|
-
readonly means: "a
|
|
166
|
-
readonly fix: "
|
|
415
|
+
readonly means: "a global callback sent to a module other than the one that registers it";
|
|
416
|
+
readonly fix: "the step builder, which knows the module";
|
|
167
417
|
};
|
|
168
|
-
readonly '
|
|
418
|
+
readonly 'message-while-running': {
|
|
419
|
+
readonly kind: "warned";
|
|
420
|
+
readonly means: "a channel's `onMessage` flow with no `whileRunning`: a message that arrives while it runs is dropped (`skip`, the default)";
|
|
421
|
+
readonly fix: "`[whileRunning('queue', onMessage()), …]` to hear each one, `'latest'` for the last; `whileRunning('skip', …)` when dropping is meant";
|
|
422
|
+
};
|
|
423
|
+
readonly 'login-then-leaves': {
|
|
424
|
+
readonly kind: "warned";
|
|
425
|
+
readonly means: "steps after `auth.login` on a page for signed-out visitors: the page sends whoever signs in on, to `?redirect=` or its `unauthorizedRedirect`, as the login succeeds — the steps race it";
|
|
426
|
+
readonly fix: "end the flow at the login: the page sends the visitor where `?redirect=` says; a page for everybody (no `accessLevel`) navigates itself";
|
|
427
|
+
};
|
|
428
|
+
readonly 'unknown-global-callback': {
|
|
429
|
+
readonly kind: "warned";
|
|
430
|
+
readonly means: "a global callback no built-in source declares — it runs only if something registers it";
|
|
431
|
+
readonly fix: "the built-in it suggests, or make sure a plugin or module of the space registers it";
|
|
432
|
+
};
|
|
433
|
+
readonly 'utility-module': {
|
|
169
434
|
readonly kind: "refused";
|
|
170
|
-
readonly means: "a
|
|
171
|
-
readonly fix: "the
|
|
435
|
+
readonly means: "a utility sent to a module — a utility takes none";
|
|
436
|
+
readonly fix: "drop the `on`";
|
|
172
437
|
};
|
|
173
|
-
readonly '
|
|
438
|
+
readonly 'unknown-utility': {
|
|
439
|
+
readonly kind: "warned";
|
|
440
|
+
readonly means: "a utility that is not one of the built-in ones";
|
|
441
|
+
readonly fix: "one of the built-in utilities";
|
|
442
|
+
};
|
|
443
|
+
readonly 'state-key-has-runtime-prefix': {
|
|
444
|
+
readonly kind: "warned";
|
|
445
|
+
readonly means: "a state key written with `runtime.state.` in front — the state callbacks already write below it";
|
|
446
|
+
readonly fix: "`key: 'cart'`, not `'runtime.state.cart'`";
|
|
447
|
+
};
|
|
448
|
+
readonly 'state-toggled-in-branches': {
|
|
449
|
+
readonly kind: "warned";
|
|
450
|
+
readonly means: "two `setState` of one key, each under a `when` on that key — the second flips back what the first wrote";
|
|
451
|
+
readonly fix: "`toggleState({ key })`; for something shown by default, a key named for hiding it";
|
|
452
|
+
};
|
|
453
|
+
readonly 'form-value-compared-to-blank': {
|
|
454
|
+
readonly kind: "warned";
|
|
455
|
+
readonly means: "a `when` comparing a submitted field to `\"\"` — a field nobody typed in is not sent";
|
|
456
|
+
readonly fix: "`operator: 'empty'` / `'notEmpty'`";
|
|
457
|
+
};
|
|
458
|
+
readonly 'condition-template': {
|
|
174
459
|
readonly kind: "refused";
|
|
175
|
-
readonly means: "a
|
|
176
|
-
readonly fix: "
|
|
460
|
+
readonly means: "a `when` rule with a template in its field or value — `value: '{{ list_genres.item.id }}'` — compared as that text, so it never holds";
|
|
461
|
+
readonly fix: "a path: `field: 'state.picks'`; another path as the value, `value: 'list_genres.item.id', isBinding: true`; an expression, a computed value";
|
|
177
462
|
};
|
|
178
|
-
readonly '
|
|
463
|
+
readonly 'condition-field-unpublished': {
|
|
179
464
|
readonly kind: "refused";
|
|
180
|
-
readonly means: "a `
|
|
181
|
-
readonly fix: "`
|
|
465
|
+
readonly means: "a `when` asking a step of its flow for a key it never publishes — `whenSucceeded` / `whenFailed` on anything but `runServerAction`";
|
|
466
|
+
readonly fix: "a key the step publishes (`explain <step>`): after `authLogin`, `when({ field: 'signedIn.ok', operator: '=', value: true }, …)`";
|
|
182
467
|
};
|
|
183
|
-
readonly '
|
|
468
|
+
readonly 'flag-gate': {
|
|
184
469
|
readonly kind: "refused";
|
|
185
|
-
readonly means: "
|
|
186
|
-
readonly fix: "
|
|
470
|
+
readonly means: "an element's or a page's `flag` that is not a flag name";
|
|
471
|
+
readonly fix: "`flag: 'newCheckout'`, or `flag: '!newCheckout'` for \"only while off\"";
|
|
187
472
|
};
|
|
188
|
-
readonly '
|
|
473
|
+
readonly 'flag-undeclared': {
|
|
189
474
|
readonly kind: "refused";
|
|
190
|
-
readonly means: "
|
|
191
|
-
readonly fix: "
|
|
475
|
+
readonly means: "a gate on a flag the space does not declare — it reads as off, so the element never (or always) renders";
|
|
476
|
+
readonly fix: "declare it in `flags`, or remove the gate";
|
|
192
477
|
};
|
|
193
|
-
readonly '
|
|
478
|
+
readonly 'flag-unknown': {
|
|
194
479
|
readonly kind: "refused";
|
|
195
|
-
readonly means: "
|
|
196
|
-
readonly fix: "the
|
|
480
|
+
readonly means: "a template, a binding or a `when` reading a flag the space does not declare";
|
|
481
|
+
readonly fix: "the declared name it suggests, or declare it";
|
|
197
482
|
};
|
|
198
|
-
readonly '
|
|
483
|
+
readonly 'flag-name': {
|
|
199
484
|
readonly kind: "refused";
|
|
200
|
-
readonly means: "
|
|
201
|
-
readonly fix: "
|
|
485
|
+
readonly means: "a flag whose name a template cannot read as `flags.x`";
|
|
486
|
+
readonly fix: "letters, digits and `_`";
|
|
202
487
|
};
|
|
203
|
-
readonly '
|
|
488
|
+
readonly 'flag-shape': {
|
|
204
489
|
readonly kind: "refused";
|
|
205
|
-
readonly means: "
|
|
206
|
-
readonly fix: "
|
|
490
|
+
readonly means: "a flag whose `value` is not `true` or `false`";
|
|
491
|
+
readonly fix: "`{ value: false, rules: [] }`";
|
|
207
492
|
};
|
|
208
|
-
readonly '
|
|
493
|
+
readonly 'flag-rule-shape': {
|
|
209
494
|
readonly kind: "refused";
|
|
210
|
-
readonly means: "a
|
|
211
|
-
readonly fix: "
|
|
495
|
+
readonly means: "a flag rule that is not `{ when, value }`, or whose `value` is not `true` or `false`";
|
|
496
|
+
readonly fix: "`{ when: { … }, value: true }`";
|
|
212
497
|
};
|
|
213
|
-
readonly '
|
|
498
|
+
readonly 'flag-rule-empty': {
|
|
214
499
|
readonly kind: "warned";
|
|
215
|
-
readonly means: "
|
|
216
|
-
readonly fix: "
|
|
500
|
+
readonly means: "a flag rule with no conditions — skipped, never read as \"always\"";
|
|
501
|
+
readonly fix: "give it a condition, or set the flag's `value` instead";
|
|
217
502
|
};
|
|
218
|
-
readonly '
|
|
503
|
+
readonly 'flag-unused': {
|
|
504
|
+
readonly kind: "warned";
|
|
505
|
+
readonly means: "a declared flag nothing gates on and no template reads";
|
|
506
|
+
readonly fix: "gate what it switches (`flag: 'x'`), or remove it once the feature has shipped";
|
|
507
|
+
};
|
|
508
|
+
readonly 'component-id': {
|
|
219
509
|
readonly kind: "refused";
|
|
220
|
-
readonly means: "
|
|
221
|
-
readonly fix: "a letter first, then letters, digits, `-` and `_
|
|
510
|
+
readonly means: "a component whose `id` is not a name it can be placed by";
|
|
511
|
+
readonly fix: "a letter first, then letters, digits, `-` and `_`";
|
|
222
512
|
};
|
|
223
|
-
readonly '
|
|
224
|
-
readonly kind: "
|
|
225
|
-
readonly means: "
|
|
226
|
-
readonly fix: "
|
|
513
|
+
readonly 'component-duplicate': {
|
|
514
|
+
readonly kind: "refused";
|
|
515
|
+
readonly means: "two components with one id";
|
|
516
|
+
readonly fix: "a name each";
|
|
227
517
|
};
|
|
228
|
-
readonly '
|
|
518
|
+
readonly 'component-undeclared': {
|
|
229
519
|
readonly kind: "refused";
|
|
230
|
-
readonly means: "an
|
|
231
|
-
readonly fix: "the
|
|
520
|
+
readonly means: "an instance of a component the space does not declare";
|
|
521
|
+
readonly fix: "the id it suggests, or declare it in `components`";
|
|
232
522
|
};
|
|
233
|
-
readonly '
|
|
523
|
+
readonly 'prop-name': {
|
|
234
524
|
readonly kind: "refused";
|
|
235
|
-
readonly means: "a
|
|
236
|
-
readonly fix: "
|
|
525
|
+
readonly means: "a prop whose name a template cannot read as `props.x`";
|
|
526
|
+
readonly fix: "letters, digits and `_`";
|
|
237
527
|
};
|
|
238
|
-
readonly '
|
|
528
|
+
readonly 'prop-type-unknown': {
|
|
239
529
|
readonly kind: "refused";
|
|
240
|
-
readonly means: "
|
|
241
|
-
readonly fix: "
|
|
530
|
+
readonly means: "a prop declared with a type no editor offers and nothing checks a value against";
|
|
531
|
+
readonly fix: "one of text, textarea, select, boolean, number, scalar, json, elementIds — words are `text`";
|
|
242
532
|
};
|
|
243
|
-
readonly '
|
|
533
|
+
readonly 'prop-unknown': {
|
|
244
534
|
readonly kind: "refused";
|
|
245
|
-
readonly means: "
|
|
246
|
-
readonly fix: "
|
|
535
|
+
readonly means: "a prop the component does not declare, handed in or read";
|
|
536
|
+
readonly fix: "the prop it suggests, or declare it: `props: { name: { type: 'text' } }`";
|
|
247
537
|
};
|
|
248
|
-
readonly '
|
|
538
|
+
readonly 'prop-missing': {
|
|
249
539
|
readonly kind: "refused";
|
|
250
|
-
readonly means: "
|
|
251
|
-
readonly fix: "
|
|
540
|
+
readonly means: "an instance without a prop its component requires";
|
|
541
|
+
readonly fix: "`component('card', { props: { name: … } })`, or bind it";
|
|
252
542
|
};
|
|
253
|
-
readonly '
|
|
543
|
+
readonly 'prop-value': {
|
|
254
544
|
readonly kind: "refused";
|
|
255
|
-
readonly means: "a
|
|
256
|
-
readonly fix: "
|
|
545
|
+
readonly means: "a prop handed in with a value its declaration does not take";
|
|
546
|
+
readonly fix: "a value of the declared type, or one of its options";
|
|
257
547
|
};
|
|
258
|
-
readonly '
|
|
548
|
+
readonly 'props-outside-component': {
|
|
259
549
|
readonly kind: "refused";
|
|
260
|
-
readonly means: "
|
|
261
|
-
readonly fix: "the
|
|
550
|
+
readonly means: "`props.x` read outside a component";
|
|
551
|
+
readonly fix: "read the source it would have come from";
|
|
262
552
|
};
|
|
263
|
-
readonly '
|
|
553
|
+
readonly 'slot-unknown': {
|
|
264
554
|
readonly kind: "refused";
|
|
265
|
-
readonly means: "
|
|
266
|
-
readonly fix: "
|
|
555
|
+
readonly means: "a component slot that is not an element of its tree";
|
|
556
|
+
readonly fix: "the id of an element inside the component — usually an empty container";
|
|
267
557
|
};
|
|
268
|
-
readonly '
|
|
558
|
+
readonly 'slot-children': {
|
|
269
559
|
readonly kind: "refused";
|
|
270
|
-
readonly means: "
|
|
271
|
-
readonly fix: "
|
|
560
|
+
readonly means: "children handed to an instance outside its slots";
|
|
561
|
+
readonly fix: "`children: { slotName: [ … ] }`; a component with no slots takes no children";
|
|
272
562
|
};
|
|
273
|
-
readonly '
|
|
563
|
+
readonly 'visible-expression': {
|
|
274
564
|
readonly kind: "refused";
|
|
275
|
-
readonly means: "an
|
|
276
|
-
readonly fix: "
|
|
565
|
+
readonly means: "`visible` written as an expression (`\"state.plan == 'pro'\"`, `\"a && !b\"`) — it takes a source, read as one, which resolves to nothing";
|
|
566
|
+
readonly fix: "`visible: { source: 'state.plan', template: \"{{ state.plan == 'pro' }}\" }` — or a source alone, `'state.open'`, `'!state.open'`";
|
|
277
567
|
};
|
|
278
|
-
readonly '
|
|
568
|
+
readonly 'from-without-attribute': {
|
|
279
569
|
readonly kind: "refused";
|
|
280
|
-
readonly means: "
|
|
281
|
-
readonly fix: "
|
|
570
|
+
readonly means: "`from` on a type with no one attribute that shows its data (a container, a form)";
|
|
571
|
+
readonly fix: "bind the attribute you mean: `bind: { attribute: 'source' }`";
|
|
282
572
|
};
|
|
283
|
-
readonly '
|
|
573
|
+
readonly 'from-and-bind': {
|
|
284
574
|
readonly kind: "refused";
|
|
285
|
-
readonly means: "
|
|
286
|
-
readonly fix: "
|
|
575
|
+
readonly means: "the main attribute bound twice, with `from` and in `bind`";
|
|
576
|
+
readonly fix: "keep `from`, and give `bind` the other attributes";
|
|
287
577
|
};
|
|
288
|
-
readonly '
|
|
578
|
+
readonly 'as-without-from': {
|
|
289
579
|
readonly kind: "refused";
|
|
290
|
-
readonly means: "
|
|
291
|
-
readonly fix: "
|
|
580
|
+
readonly means: "`as` with no `from` — `as` is how the source `from` names is shown";
|
|
581
|
+
readonly fix: "`from: 'products.item.price', as: 'price'`";
|
|
292
582
|
};
|
|
293
|
-
readonly '
|
|
583
|
+
readonly 'format-unknown': {
|
|
294
584
|
readonly kind: "refused";
|
|
295
|
-
readonly means: "
|
|
296
|
-
readonly fix: "`
|
|
585
|
+
readonly means: "an `as` that names no format of the space's `formats`";
|
|
586
|
+
readonly fix: "declare it once — `formats: { price: \"{{ source|currency('USD') }}\" }` — or write the template in its place; words the element always shows are its `content`, with no `from`";
|
|
297
587
|
};
|
|
298
|
-
readonly '
|
|
588
|
+
readonly 'binding-shape': {
|
|
299
589
|
readonly kind: "refused";
|
|
300
|
-
readonly means: "
|
|
301
|
-
readonly fix: "
|
|
590
|
+
readonly means: "a binding with no `to` or no `source`";
|
|
591
|
+
readonly fix: "`bind: { content: 'posts.item.title' }`, or `bindTemplate(to, source, template)`";
|
|
302
592
|
};
|
|
303
|
-
readonly '
|
|
593
|
+
readonly 'binding-category': {
|
|
304
594
|
readonly kind: "refused";
|
|
305
|
-
readonly means: "
|
|
306
|
-
readonly fix: "
|
|
595
|
+
readonly means: "a binding `category` that does not exist";
|
|
596
|
+
readonly fix: "one of the categories it lists";
|
|
307
597
|
};
|
|
308
|
-
readonly '
|
|
598
|
+
readonly 'binding-source-unknown': {
|
|
309
599
|
readonly kind: "refused";
|
|
310
|
-
readonly means: "a
|
|
311
|
-
readonly fix: "the
|
|
600
|
+
readonly means: "a binding whose source names an element that does not exist, or with its prefix written wrong";
|
|
601
|
+
readonly fix: "the id of the element that publishes it, written alone — the prefix is filled in";
|
|
312
602
|
};
|
|
313
|
-
readonly
|
|
603
|
+
readonly 'binding-source-out-of-scope': {
|
|
314
604
|
readonly kind: "refused";
|
|
315
|
-
readonly means: "a
|
|
316
|
-
readonly fix: "the
|
|
605
|
+
readonly means: "a source read by an element that is not inside the element publishing it";
|
|
606
|
+
readonly fix: "move the element inside it, or share the value through `state`";
|
|
317
607
|
};
|
|
318
|
-
readonly '
|
|
608
|
+
readonly 'binding-target-unknown': {
|
|
319
609
|
readonly kind: "refused";
|
|
320
|
-
readonly means: "a
|
|
321
|
-
readonly fix: "
|
|
610
|
+
readonly means: "a binding onto an attribute the element does not have — the value arrives and nothing shows it";
|
|
611
|
+
readonly fix: "one it lists (`content`); to follow data with a class, `variantFrom`";
|
|
322
612
|
};
|
|
323
|
-
readonly '
|
|
613
|
+
readonly 'active-when-constant': {
|
|
324
614
|
readonly kind: "refused";
|
|
325
|
-
readonly means: "
|
|
326
|
-
readonly fix: "
|
|
615
|
+
readonly means: "an `activeWhen` condition that reads nothing — always or never true";
|
|
616
|
+
readonly fix: "name what it depends on: `'{{ list_dots.index == state.slide }}'`";
|
|
327
617
|
};
|
|
328
|
-
readonly '
|
|
618
|
+
readonly 'variant-bound-twice': {
|
|
329
619
|
readonly kind: "refused";
|
|
330
|
-
readonly means: "
|
|
331
|
-
readonly fix: "`
|
|
620
|
+
readonly means: "two bindings (`variantFrom`, `activeOn`, `activeWhen`) setting the variant of one class on one element — the second always wins";
|
|
621
|
+
readonly fix: "one `variantFrom` whose template answers every case: `{{ wide ? 'roomy' : current ? 'active' : 'idle' }}`; two things that change apart (a size, a lit state) are two classes, each with its own `variantFrom`";
|
|
332
622
|
};
|
|
333
|
-
readonly '
|
|
334
|
-
readonly kind: "
|
|
335
|
-
readonly means: "
|
|
336
|
-
readonly fix: "`
|
|
623
|
+
readonly 'visibility-as-attribute': {
|
|
624
|
+
readonly kind: "refused";
|
|
625
|
+
readonly means: "`visibility` bound as an attribute, which no element reads";
|
|
626
|
+
readonly fix: "`visible: { source, template }`";
|
|
337
627
|
};
|
|
338
|
-
readonly '
|
|
339
|
-
readonly kind: "
|
|
340
|
-
readonly means: "a
|
|
341
|
-
readonly fix: "
|
|
628
|
+
readonly 'unknown-transformer': {
|
|
629
|
+
readonly kind: "refused";
|
|
630
|
+
readonly means: "a transformer that does not exist";
|
|
631
|
+
readonly fix: "one of the transformers it lists";
|
|
342
632
|
};
|
|
343
|
-
readonly '
|
|
633
|
+
readonly 'transformer-params': {
|
|
344
634
|
readonly kind: "refused";
|
|
345
|
-
readonly means: "a
|
|
346
|
-
readonly fix: "
|
|
635
|
+
readonly means: "a transformer param that does not exist, or a value outside its options";
|
|
636
|
+
readonly fix: "the params and values it lists";
|
|
347
637
|
};
|
|
348
|
-
readonly '
|
|
638
|
+
readonly 'template-text-into-value': {
|
|
349
639
|
readonly kind: "refused";
|
|
350
|
-
readonly means: "a
|
|
351
|
-
readonly fix: "
|
|
640
|
+
readonly means: "a template, which renders text, feeding an attribute that holds a list or an object";
|
|
641
|
+
readonly fix: "`bindTemplate('items', source, '{{ … }}', { returns: 'value' })`";
|
|
352
642
|
};
|
|
353
|
-
readonly '
|
|
643
|
+
readonly 'template-or-value': {
|
|
644
|
+
readonly kind: "warned";
|
|
645
|
+
readonly means: "a template's `or` (or `and`) beside a text or a number — `sort or 'listeners'` — which answers true or false, never the value";
|
|
646
|
+
readonly fix: "a fallback value with `??`: `sort ?? 'listeners'`; a test with `or` between two conditions";
|
|
647
|
+
};
|
|
648
|
+
readonly 'template-unreadable': {
|
|
354
649
|
readonly kind: "refused";
|
|
355
|
-
readonly means: "a
|
|
356
|
-
readonly fix: "
|
|
650
|
+
readonly means: "a template with an operator, a filter or a function that does not exist, or broken syntax";
|
|
651
|
+
readonly fix: "an operator, a filter or a function the interpreter has — the message names the one it could not read; `matches` never exists";
|
|
357
652
|
};
|
|
358
|
-
readonly '
|
|
653
|
+
readonly 'template-unknown-name': {
|
|
359
654
|
readonly kind: "refused";
|
|
360
|
-
readonly means: "a
|
|
361
|
-
readonly fix: "`
|
|
655
|
+
readonly means: "a name in a template that is not a source, a variable or a route param";
|
|
656
|
+
readonly fix: "the full source name (`list_rows.item`), `navigation.queryParams.x`, or `source` for the bound value";
|
|
362
657
|
};
|
|
363
|
-
readonly '
|
|
658
|
+
readonly 'template-short-source': {
|
|
364
659
|
readonly kind: "refused";
|
|
365
|
-
readonly means: "
|
|
366
|
-
readonly fix: "
|
|
660
|
+
readonly means: "a source named without its prefix inside a template or a step";
|
|
661
|
+
readonly fix: "the full name: `apiContainer_stats`, `list_rows` — a list's row, `r.inTemplate.item`";
|
|
367
662
|
};
|
|
368
|
-
readonly '
|
|
369
|
-
readonly kind: "
|
|
370
|
-
readonly means: "
|
|
371
|
-
readonly fix: "
|
|
663
|
+
readonly 'template-source-out-of-scope': {
|
|
664
|
+
readonly kind: "refused";
|
|
665
|
+
readonly means: "a template reading the source of an element it is not inside";
|
|
666
|
+
readonly fix: "move the element inside it, or share the value through `state`";
|
|
372
667
|
};
|
|
373
|
-
readonly '
|
|
668
|
+
readonly 'template-never-resolved': {
|
|
374
669
|
readonly kind: "warned";
|
|
375
|
-
readonly means: "a
|
|
376
|
-
readonly fix: "
|
|
670
|
+
readonly means: "a condition in an attribute, which only resolves `{{ name|filter }}` — used as written";
|
|
671
|
+
readonly fix: "move it into `bindTemplate`";
|
|
377
672
|
};
|
|
378
|
-
readonly '
|
|
379
|
-
readonly kind: "
|
|
380
|
-
readonly means: "a
|
|
381
|
-
readonly fix: "
|
|
673
|
+
readonly 'condition-starts-visible': {
|
|
674
|
+
readonly kind: "warned";
|
|
675
|
+
readonly means: "a computed visibility that shows until its data answers";
|
|
676
|
+
readonly fix: "`visible: { source, template }`";
|
|
382
677
|
};
|
|
383
|
-
readonly '
|
|
678
|
+
readonly 'computed-name': {
|
|
384
679
|
readonly kind: "refused";
|
|
385
|
-
readonly means: "a
|
|
386
|
-
readonly fix: "
|
|
680
|
+
readonly means: "a computed value whose name a template cannot read as `computed.x`";
|
|
681
|
+
readonly fix: "letters, digits and `_`";
|
|
387
682
|
};
|
|
388
|
-
readonly '
|
|
683
|
+
readonly 'computed-not-template': {
|
|
389
684
|
readonly kind: "refused";
|
|
390
|
-
readonly means: "
|
|
391
|
-
readonly fix: "
|
|
685
|
+
readonly means: "a computed value that is not a template";
|
|
686
|
+
readonly fix: "`'{{ state.x * 2 }}'`";
|
|
392
687
|
};
|
|
393
|
-
readonly '
|
|
394
|
-
readonly kind: "
|
|
395
|
-
readonly means: "a
|
|
396
|
-
readonly fix: "
|
|
688
|
+
readonly 'computed-reads-element': {
|
|
689
|
+
readonly kind: "refused";
|
|
690
|
+
readonly means: "a computed value reading an element's source — no element is around the whole space";
|
|
691
|
+
readonly fix: "compute it from the globals and the variables, or bind it on the element";
|
|
397
692
|
};
|
|
398
|
-
readonly '
|
|
399
|
-
readonly kind: "
|
|
400
|
-
readonly means: "a
|
|
401
|
-
readonly fix: "`
|
|
693
|
+
readonly 'computed-unknown': {
|
|
694
|
+
readonly kind: "refused";
|
|
695
|
+
readonly means: "a computed value read before it is declared, or never declared";
|
|
696
|
+
readonly fix: "declare it in `computed`, above the one that reads it";
|
|
402
697
|
};
|
|
403
|
-
readonly
|
|
404
|
-
readonly kind: "
|
|
405
|
-
readonly means: "
|
|
406
|
-
readonly fix: "
|
|
698
|
+
readonly 'global-field-unknown': {
|
|
699
|
+
readonly kind: "refused";
|
|
700
|
+
readonly means: "a binding, a template or a `when` reading a field `navigation`, `auth` or `theme` never has — `auth.authenticated`";
|
|
701
|
+
readonly fix: "the field it suggests: `auth.isAuthenticated`, `auth.details.username`, `navigation.queryParams.next`, `theme.resolved`";
|
|
407
702
|
};
|
|
408
703
|
readonly 'element-shape': {
|
|
409
704
|
readonly kind: "refused";
|
|
@@ -423,7 +718,7 @@ declare const AUTHORING_CODES: {
|
|
|
423
718
|
readonly 'plugin-attribute-reserved': {
|
|
424
719
|
readonly kind: "warned";
|
|
425
720
|
readonly means: "a plugin attribute named as one of the element’s own fields — a factory never hands it to the plugin";
|
|
426
|
-
readonly fix: "rename it in the plugin (`variant` → `kind`)";
|
|
721
|
+
readonly fix: "rename it in the plugin, as the warning names it (`variant` → `kind`, `from` → `start`)";
|
|
427
722
|
};
|
|
428
723
|
readonly 'unknown-variant': {
|
|
429
724
|
readonly kind: "warned";
|
|
@@ -462,8 +757,8 @@ declare const AUTHORING_CODES: {
|
|
|
462
757
|
};
|
|
463
758
|
readonly 'span-holds-block': {
|
|
464
759
|
readonly kind: "warned";
|
|
465
|
-
readonly means: "a `container` with `subType: 'span'` or `'p'` holding
|
|
466
|
-
readonly fix: "a `div` (leave `subType` out), or words and inline elements: a `
|
|
760
|
+
readonly means: "a `container` with `subType: 'span'` holding a block, or with `'p'` holding anything that renders a `<div>` (a `text`, a plain `container`) — which the browser closes the paragraph before";
|
|
761
|
+
readonly fix: "a `div` (leave `subType` out), or words and inline elements: `paragraph(…)`, a `span` container, a `link`";
|
|
467
762
|
};
|
|
468
763
|
readonly 'part-missing': {
|
|
469
764
|
readonly kind: "refused";
|
|
@@ -500,6 +795,11 @@ declare const AUTHORING_CODES: {
|
|
|
500
795
|
readonly means: "`row` on an element that is not a list";
|
|
501
796
|
readonly fix: "a `list` around it";
|
|
502
797
|
};
|
|
798
|
+
readonly 'source-name-missing': {
|
|
799
|
+
readonly kind: "refused";
|
|
800
|
+
readonly means: "a source named by nothing — most often a field read off a list row that has no types";
|
|
801
|
+
readonly fix: "write the row's field as text (`${r.item}.field`), or give the list `items` a typed source's path";
|
|
802
|
+
};
|
|
503
803
|
readonly 'source-field-unknown': {
|
|
504
804
|
readonly kind: "refused";
|
|
505
805
|
readonly means: "a path into a typed source that its sample does not have";
|
|
@@ -530,6 +830,11 @@ declare const AUTHORING_CODES: {
|
|
|
530
830
|
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";
|
|
531
831
|
readonly fix: "a field every item has, once each";
|
|
532
832
|
};
|
|
833
|
+
readonly 'list-items-outside-answer': {
|
|
834
|
+
readonly kind: "warned";
|
|
835
|
+
readonly means: "a list's `items` bound to a query provider outside its answer — the provider itself, or a field read at its root, where its state is: no list, so the rows render NaN or a placeholder";
|
|
836
|
+
readonly fix: "the list inside the answer: `catalog.data.games`, or `catalog.records` (paginated)";
|
|
837
|
+
};
|
|
533
838
|
readonly 'list-items-ignored': {
|
|
534
839
|
readonly kind: "refused";
|
|
535
840
|
readonly means: "a list whose items nothing reads — `source: 'none'` renders its children once";
|
|
@@ -570,6 +875,26 @@ declare const AUTHORING_CODES: {
|
|
|
570
875
|
readonly means: "a `{{ }}` inside an attribute that is an object or a list — a provider's `input`, a list's `items`, a plugin's settings: only an attribute that is text is evaluated";
|
|
571
876
|
readonly fix: "a binding on the attribute (`bindTemplate(name, source, template, { returns: 'value' })`); for a provider's `input`, nothing for a route or query param — the action is already handed them as `input.<name>`";
|
|
572
877
|
};
|
|
878
|
+
readonly 'provider-when-not-rules': {
|
|
879
|
+
readonly kind: "refused";
|
|
880
|
+
readonly means: "a provider's `when` that is no rule group — a string, a single rule — never read, so it never waits";
|
|
881
|
+
readonly fix: "`when: { combinator: 'and', rules: [{ field, operator, value }] }`, each field a source by its name";
|
|
882
|
+
};
|
|
883
|
+
readonly 'server-source-in-browser': {
|
|
884
|
+
readonly kind: "refused";
|
|
885
|
+
readonly means: "a provider with an `action` or a `connector` asked from the browser — only the page server resolves those, so it never asks";
|
|
886
|
+
readonly fix: "`runtime: 'server'` on the provider";
|
|
887
|
+
};
|
|
888
|
+
readonly 'server-query-unresolved': {
|
|
889
|
+
readonly kind: "refused";
|
|
890
|
+
readonly means: "a `runtime: 'server'` provider whose `query` the page server cannot read — bound, a template reading what the browser alone holds (anything but the space's variables and `navigation`), the visitor's cookies (`credentials: 'include'`), another method than GET, or neither an address (`https://…`) nor a path (`/…`) — so it draws empty";
|
|
891
|
+
readonly fix: "write it over the space's variables and `navigation` (`'{{ apiUrl }}/posts/{{ navigation.routeParams.id }}'`); an `action` for what the browser holds; or no `runtime: 'server'`, and the browser asks it";
|
|
892
|
+
};
|
|
893
|
+
readonly 'server-when-unknown': {
|
|
894
|
+
readonly kind: "warned";
|
|
895
|
+
readonly means: "a server provider's `when` that reads what the browser alone holds — a `state`, a variable, a browser provider — so the page server resolves it whatever it says";
|
|
896
|
+
readonly fix: "wait on what the server knows (`navigation`, `auth`, a server provider’s answer), or ask it from the browser with a `query`";
|
|
897
|
+
};
|
|
573
898
|
readonly 'not-found-in-browser': {
|
|
574
899
|
readonly kind: "refused";
|
|
575
900
|
readonly means: "`notFound` on a provider asked from the browser — its answer arrives after the page was sent with its status";
|
|
@@ -615,485 +940,475 @@ declare const AUTHORING_CODES: {
|
|
|
615
940
|
readonly means: "a form the browser would submit itself, reloading the page";
|
|
616
941
|
readonly fix: "`managedByInteractions: true`";
|
|
617
942
|
};
|
|
618
|
-
readonly '
|
|
619
|
-
readonly kind: "refused";
|
|
620
|
-
readonly means: "`from` on a type with no one attribute that shows its data (a container, a form)";
|
|
621
|
-
readonly fix: "bind the attribute you mean: `bind: { attribute: 'source' }`";
|
|
622
|
-
};
|
|
623
|
-
readonly 'from-and-bind': {
|
|
624
|
-
readonly kind: "refused";
|
|
625
|
-
readonly means: "the main attribute bound twice, with `from` and in `bind`";
|
|
626
|
-
readonly fix: "keep `from`, and give `bind` the other attributes";
|
|
627
|
-
};
|
|
628
|
-
readonly 'as-without-from': {
|
|
629
|
-
readonly kind: "refused";
|
|
630
|
-
readonly means: "`as` with no `from` — `as` is how the source `from` names is shown";
|
|
631
|
-
readonly fix: "`from: 'products.item.price', as: 'price'`";
|
|
632
|
-
};
|
|
633
|
-
readonly 'format-unknown': {
|
|
634
|
-
readonly kind: "refused";
|
|
635
|
-
readonly means: "an `as` that names no format of the space's `formats`";
|
|
636
|
-
readonly fix: "declare it once — `formats: { price: \"{{ source|currency('USD') }}\" }` — or write the template in its place";
|
|
637
|
-
};
|
|
638
|
-
readonly 'binding-shape': {
|
|
943
|
+
readonly 'css-value': {
|
|
639
944
|
readonly kind: "refused";
|
|
640
|
-
readonly means: "
|
|
641
|
-
readonly fix: "
|
|
945
|
+
readonly means: "an empty CSS value, or one with `;` or `{}`";
|
|
946
|
+
readonly fix: "one value per property; leave a property out instead of writing it empty";
|
|
642
947
|
};
|
|
643
|
-
readonly '
|
|
948
|
+
readonly 'css-property-twice': {
|
|
644
949
|
readonly kind: "refused";
|
|
645
|
-
readonly means: "a
|
|
646
|
-
readonly fix: "one
|
|
950
|
+
readonly means: "one property written twice in a rule set — `paddingTop` beside `'padding-top'` — so one would silently win";
|
|
951
|
+
readonly fix: "keep one";
|
|
647
952
|
};
|
|
648
|
-
readonly '
|
|
953
|
+
readonly 'css-property-unknown': {
|
|
649
954
|
readonly kind: "refused";
|
|
650
|
-
readonly means: "a
|
|
651
|
-
readonly fix: "the
|
|
955
|
+
readonly means: "a CSS property that does not exist";
|
|
956
|
+
readonly fix: "the property it suggests; a custom property starts with `--`";
|
|
652
957
|
};
|
|
653
|
-
readonly
|
|
958
|
+
readonly UNKNOWN_CSS_PROPERTY: {
|
|
654
959
|
readonly kind: "refused";
|
|
655
|
-
readonly means: "a
|
|
656
|
-
readonly fix: "
|
|
960
|
+
readonly means: "a property in the style document the style editor cannot read back";
|
|
961
|
+
readonly fix: "the property it suggests";
|
|
657
962
|
};
|
|
658
|
-
readonly '
|
|
963
|
+
readonly 'shorthand-ambiguous': {
|
|
659
964
|
readonly kind: "refused";
|
|
660
|
-
readonly means: "a
|
|
661
|
-
readonly fix: "
|
|
965
|
+
readonly means: "a shorthand one of whose parts is a bare `var(--x)` — `background: var(--surface)` — which longhand it is depends on what the variable holds";
|
|
966
|
+
readonly fix: "the longhand it is: `'background-color': 'var(--x)'` for a colour, `'background-image'` for a gradient or a picture";
|
|
662
967
|
};
|
|
663
|
-
readonly '
|
|
968
|
+
readonly 'shorthand-unread': {
|
|
664
969
|
readonly kind: "refused";
|
|
665
|
-
readonly means: "
|
|
666
|
-
readonly fix: "
|
|
970
|
+
readonly means: "a `font` shorthand with a part the expansion reads as none of its longhands — a `var()` size, a system font — or without the size and family CSS requires";
|
|
971
|
+
readonly fix: "the longhands it means: `'font-size': 'var(--size)'`, `'font-family': …`; a CSS-wide keyword (`font: inherit`) is read whole";
|
|
667
972
|
};
|
|
668
|
-
readonly '
|
|
973
|
+
readonly 'style-key-unknown': {
|
|
669
974
|
readonly kind: "refused";
|
|
670
|
-
readonly means: "`
|
|
671
|
-
readonly fix: "`
|
|
975
|
+
readonly means: "a style holding a key that is no part of one — `slots` written inside `styles()` — beside its `css` or states";
|
|
976
|
+
readonly fix: "the element's `slots` beside its `class`, each a `styles()` of its own; a style takes `css`, `states`, `variants`, `ancestors`, `pseudos`, `conditions`";
|
|
672
977
|
};
|
|
673
|
-
readonly '
|
|
978
|
+
readonly 'rule-set-mixed': {
|
|
674
979
|
readonly kind: "refused";
|
|
675
|
-
readonly means: "a
|
|
676
|
-
readonly fix: "
|
|
980
|
+
readonly means: "a style that writes its rules beside `states`, `variants` or `ancestors` instead of under `css`";
|
|
981
|
+
readonly fix: "`{ css: { desktop: { … } }, states: { hover: { … } } }` — the rules under `css`, each of the others beside it";
|
|
677
982
|
};
|
|
678
|
-
readonly '
|
|
983
|
+
readonly 'style-state-unknown': {
|
|
679
984
|
readonly kind: "refused";
|
|
680
|
-
readonly means: "a
|
|
681
|
-
readonly fix: "
|
|
985
|
+
readonly means: "a state a selector does not react to";
|
|
986
|
+
readonly fix: "one of the states it lists (`hover`, `focus`, `active`…)";
|
|
682
987
|
};
|
|
683
|
-
readonly '
|
|
988
|
+
readonly 'ancestor-not-class': {
|
|
684
989
|
readonly kind: "refused";
|
|
685
|
-
readonly means: "
|
|
686
|
-
readonly fix: "`
|
|
990
|
+
readonly means: "an ancestor condition keyed by something that is neither a class name nor `'>'` (the parent)";
|
|
991
|
+
readonly fix: "`[card.name]` for a `styles()` declaration, or `'>'` for the parent whatever it wears";
|
|
687
992
|
};
|
|
688
|
-
readonly '
|
|
993
|
+
readonly 'ancestor-shape': {
|
|
689
994
|
readonly kind: "refused";
|
|
690
|
-
readonly means: "
|
|
691
|
-
readonly fix: "
|
|
995
|
+
readonly means: "an ancestor condition given keys other than `css`, `states` and `variants` — `pseudos` (an ancestor's rules reach the element, never its `::before`/`::after`) or `conditions` — which were dropped without a word";
|
|
996
|
+
readonly fix: "for `pseudos`, a custom property the ancestor's state sets — `ancestors: { [card.name]: { states: { hover: { '--fill-opacity': '1' } } } }` — read by the class's own pseudo-element: `pseudos: { before: { css: { opacity: 'var(--fill-opacity, 0.6)' } } }`; for `conditions`, the condition on the class's own `css` — `conditions: { 'motion-reduce': { css: { transition: 'none' } } }`";
|
|
692
997
|
};
|
|
693
|
-
readonly '
|
|
998
|
+
readonly 'state-shape': {
|
|
694
999
|
readonly kind: "refused";
|
|
695
|
-
readonly means: "a
|
|
696
|
-
readonly fix: "
|
|
1000
|
+
readonly means: "a state given a rule set's keys (`pseudos`, `variants`, `ancestors`…): a state holds plain CSS";
|
|
1001
|
+
readonly fix: "a pseudo-element's state goes under the pseudo-element — `pseudos: { before: { states: { hover: { opacity: '1' } } } }`; an ancestor's, under `ancestors`";
|
|
697
1002
|
};
|
|
698
|
-
readonly '
|
|
699
|
-
readonly kind: "
|
|
700
|
-
readonly means: "a
|
|
701
|
-
readonly fix: "the
|
|
1003
|
+
readonly 'popup-position-set': {
|
|
1004
|
+
readonly kind: "warned";
|
|
1005
|
+
readonly means: "a class on a `dropdownPopup` setting where it is drawn — `position`, `top`, `left`, `right`, `bottom`, `inset` or `transform` — over the place its dropdown puts it at, at the space's root";
|
|
1006
|
+
readonly fix: "its look on the class, its place on the dropdown: `popupPlacement`, `containerTopOffset`, `containerLeftOffset`, and `popupWidth: \"trigger\"` for its width";
|
|
702
1007
|
};
|
|
703
|
-
readonly '
|
|
704
|
-
readonly kind: "
|
|
705
|
-
readonly means: "a
|
|
706
|
-
readonly fix: "
|
|
1008
|
+
readonly 'icon-font-replaced': {
|
|
1009
|
+
readonly kind: "warned";
|
|
1010
|
+
readonly means: "a class on a `fontAwesome` icon setting `font-family` — the icon's glyphs are Font Awesome's font, and another draws a fallback character in their place";
|
|
1011
|
+
readonly fix: "the class's `font-family` on the text around the icon, never on the icon; its size and colour on the icon are fine";
|
|
707
1012
|
};
|
|
708
|
-
readonly '
|
|
1013
|
+
readonly 'focus-on-field-box': {
|
|
709
1014
|
readonly kind: "warned";
|
|
710
|
-
readonly means: "a
|
|
711
|
-
readonly fix: "
|
|
1015
|
+
readonly means: "a `focus` or `focus-visible` state on a text field's or a select's `input` slot — the box the field is drawn in, which never takes focus, so no ring is ever shown";
|
|
1016
|
+
readonly fix: "`'focus-within'` on the same class, or the state on the `field` slot";
|
|
712
1017
|
};
|
|
713
|
-
readonly '
|
|
1018
|
+
readonly 'heading-level-overridden': {
|
|
714
1019
|
readonly kind: "warned";
|
|
715
|
-
readonly means: "a
|
|
716
|
-
readonly fix: "
|
|
1020
|
+
readonly means: "a markdown's or richText's `heading` slot and a level's (`heading3`) both setting one property, the general class written later in the stylesheet — the level's value is lost";
|
|
1021
|
+
readonly fix: "set the property on one of the two: the level slot for that level alone, `heading` for every heading";
|
|
717
1022
|
};
|
|
718
|
-
readonly '
|
|
1023
|
+
readonly 'style-pseudo-unknown': {
|
|
719
1024
|
readonly kind: "refused";
|
|
720
|
-
readonly means: "a
|
|
721
|
-
readonly fix: "
|
|
1025
|
+
readonly means: "a pseudo-element a class cannot dress";
|
|
1026
|
+
readonly fix: "one of `before`, `after`, `marker`, `placeholder`, `first-letter`, `first-line`, `selection` — without the `::`";
|
|
722
1027
|
};
|
|
723
|
-
readonly '
|
|
1028
|
+
readonly 'style-pseudo-property': {
|
|
724
1029
|
readonly kind: "refused";
|
|
725
|
-
readonly means: "a
|
|
726
|
-
readonly fix: "`
|
|
1030
|
+
readonly means: "a property the pseudo-element ignores — the browser drops it without a word";
|
|
1031
|
+
readonly fix: "one it honours (`::selection` paints, `::marker` and `::placeholder` take text and font), or style the element";
|
|
727
1032
|
};
|
|
728
|
-
readonly '
|
|
1033
|
+
readonly 'style-pseudo-content': {
|
|
729
1034
|
readonly kind: "refused";
|
|
730
|
-
readonly means: "a
|
|
731
|
-
readonly fix: "
|
|
1035
|
+
readonly means: "a `content` CSS cannot read — text without its quotes draws nothing — or a `before`/`after` with no `content`, which is not there at all";
|
|
1036
|
+
readonly fix: "the text in quotes inside the string — `content: '\"→\"'`, `'\"\"'` for an empty box — or a function such as `counter(step)`";
|
|
732
1037
|
};
|
|
733
|
-
readonly '
|
|
1038
|
+
readonly 'style-condition-unknown': {
|
|
734
1039
|
readonly kind: "refused";
|
|
735
|
-
readonly means: "a
|
|
736
|
-
readonly fix: "
|
|
1040
|
+
readonly means: "a condition a class's rules cannot hold under";
|
|
1041
|
+
readonly fix: "`motion-reduce`, `motion-safe`, or a container width — `container (max-width: 30rem)`, `container card (min-width: 480px)`";
|
|
737
1042
|
};
|
|
738
|
-
readonly '
|
|
1043
|
+
readonly 'style-part-shape': {
|
|
739
1044
|
readonly kind: "refused";
|
|
740
|
-
readonly means: "a
|
|
741
|
-
readonly fix: "the
|
|
1045
|
+
readonly means: "a condition or a pseudo-element given `variants`, `ancestors` or `conditions` — it holds its selector's own `css`, its `states` and (a condition) its `pseudos`";
|
|
1046
|
+
readonly fix: "the class's own `css` under the condition — `{ 'motion-reduce': { css: { transition: 'none' } } }` drops what an ancestor's or a variant's rule would animate — or the rule under `ancestors`/`variants` at the top of the class";
|
|
742
1047
|
};
|
|
743
|
-
readonly '
|
|
1048
|
+
readonly 'keyframes-shape': {
|
|
744
1049
|
readonly kind: "refused";
|
|
745
|
-
readonly means: "a
|
|
746
|
-
readonly fix: "a
|
|
1050
|
+
readonly means: "keyframes with a name CSS does not accept or the SDK keeps for itself, or a frame that is not an offset";
|
|
1051
|
+
readonly fix: "a plain name (`slide-in`), frames keyed `from`, `to` or a percentage (`'50%'`, `'0%, 100%'`)";
|
|
747
1052
|
};
|
|
748
|
-
readonly '
|
|
749
|
-
readonly kind: "
|
|
750
|
-
readonly means: "
|
|
751
|
-
readonly fix: "
|
|
1053
|
+
readonly 'animation-name-unknown': {
|
|
1054
|
+
readonly kind: "warned";
|
|
1055
|
+
readonly means: "`animation-name` naming keyframes the space does not declare — nothing plays";
|
|
1056
|
+
readonly fix: "declare them in the space's `keyframes`, or name one it has";
|
|
752
1057
|
};
|
|
753
|
-
readonly '
|
|
754
|
-
readonly kind: "
|
|
755
|
-
readonly means: "
|
|
756
|
-
readonly fix: "
|
|
1058
|
+
readonly 'tablet-rule-skips-mobile': {
|
|
1059
|
+
readonly kind: "warned";
|
|
1060
|
+
readonly means: "a tablet rule phones never get — mobile inherits desktop, not tablet";
|
|
1061
|
+
readonly fix: "write it under `compact` (tablet and mobile together)";
|
|
757
1062
|
};
|
|
758
|
-
readonly '
|
|
1063
|
+
readonly 'tw-unknown-class': {
|
|
759
1064
|
readonly kind: "refused";
|
|
760
|
-
readonly means: "a
|
|
761
|
-
readonly fix: "
|
|
1065
|
+
readonly means: "a class `tw()` does not know as Tailwind";
|
|
1066
|
+
readonly fix: "the class it suggests; a colour of the space through `createTw({ colors })`; any CSS as `[property:value]`";
|
|
762
1067
|
};
|
|
763
|
-
readonly '
|
|
1068
|
+
readonly 'tw-no-equivalent': {
|
|
764
1069
|
readonly kind: "refused";
|
|
765
|
-
readonly means: "a
|
|
766
|
-
readonly fix: "
|
|
1070
|
+
readonly means: "a Tailwind class or variant with no exact equivalent in a Plitzi style (`sm:`, `dark:`, `space-x-4`)";
|
|
1071
|
+
readonly fix: "what the message names: `md:`/`lg:`/`max-md:`/`max-lg:`, a token with both themes, `gap`";
|
|
767
1072
|
};
|
|
768
|
-
readonly '
|
|
1073
|
+
readonly 'tw-class-conflict': {
|
|
769
1074
|
readonly kind: "refused";
|
|
770
|
-
readonly means: "
|
|
771
|
-
readonly fix: "
|
|
1075
|
+
readonly means: "two classes set the same property and neither is the narrower one (`p-2 p-4`)";
|
|
1076
|
+
readonly fix: "keep one";
|
|
772
1077
|
};
|
|
773
|
-
readonly '
|
|
774
|
-
readonly kind: "
|
|
775
|
-
readonly means: "
|
|
776
|
-
readonly fix: "`
|
|
1078
|
+
readonly 'unknown-variable': {
|
|
1079
|
+
readonly kind: "warned";
|
|
1080
|
+
readonly means: "a `var(--x)` nothing in the space declares — the property it is in is dropped";
|
|
1081
|
+
readonly fix: "declare it under `variables`, fix the name, or give it a fallback: `var(--x, …)`";
|
|
777
1082
|
};
|
|
778
|
-
readonly '
|
|
779
|
-
readonly kind: "
|
|
780
|
-
readonly means: "a
|
|
781
|
-
readonly fix: "
|
|
1083
|
+
readonly 'font-weight-not-loaded': {
|
|
1084
|
+
readonly kind: "warned";
|
|
1085
|
+
readonly means: "a `font-weight` no face the space loads has — the browser draws the nearest one, or fakes a bolder one";
|
|
1086
|
+
readonly fix: "the weight in the font’s `weights`, or a weight it loads";
|
|
782
1087
|
};
|
|
783
|
-
readonly '
|
|
784
|
-
readonly kind: "
|
|
785
|
-
readonly means: "
|
|
786
|
-
readonly fix: "
|
|
1088
|
+
readonly 'colour-without-dark': {
|
|
1089
|
+
readonly kind: "warned";
|
|
1090
|
+
readonly means: "a colour token with no dark value";
|
|
1091
|
+
readonly fix: "`{ light, dark, default }`";
|
|
787
1092
|
};
|
|
788
|
-
readonly
|
|
789
|
-
readonly kind: "
|
|
790
|
-
readonly means: "a
|
|
791
|
-
readonly fix: "
|
|
1093
|
+
readonly STYLE_WITHOUT_TAG: {
|
|
1094
|
+
readonly kind: "warned";
|
|
1095
|
+
readonly means: "style on a provider that renders no element of its own";
|
|
1096
|
+
readonly fix: "`subType: 'div'` on the provider, or style its parent";
|
|
792
1097
|
};
|
|
793
|
-
readonly '
|
|
1098
|
+
readonly 'id-invalid': {
|
|
794
1099
|
readonly kind: "refused";
|
|
795
|
-
readonly means: "
|
|
796
|
-
readonly fix: "
|
|
1100
|
+
readonly means: "an id a binding, a template or a test cannot name";
|
|
1101
|
+
readonly fix: "a letter first, then letters, digits, `-` and `_`: `'hero-title'`";
|
|
797
1102
|
};
|
|
798
|
-
readonly '
|
|
1103
|
+
readonly 'controls-no-anchor': {
|
|
1104
|
+
readonly kind: "warned";
|
|
1105
|
+
readonly means: "a button's `controls` naming no anchor — `aria-controls` points at nothing";
|
|
1106
|
+
readonly fix: "an `anchor` on the element it shows and hides, and `controls` naming it";
|
|
1107
|
+
};
|
|
1108
|
+
readonly 'quiet-unknown': {
|
|
799
1109
|
readonly kind: "refused";
|
|
800
|
-
readonly means: "an element's
|
|
801
|
-
readonly fix: "
|
|
1110
|
+
readonly means: "an element's `quiet` naming something that is not a suggestion's code — a problem is never quieted";
|
|
1111
|
+
readonly fix: "the code of the suggestion it was offered: `quiet: ['repeated-shape']`";
|
|
802
1112
|
};
|
|
803
|
-
readonly '
|
|
1113
|
+
readonly 'controls-unknown': {
|
|
804
1114
|
readonly kind: "refused";
|
|
805
|
-
readonly means: "a
|
|
806
|
-
readonly fix: "
|
|
1115
|
+
readonly means: "a button's `controls` naming no element of the space";
|
|
1116
|
+
readonly fix: "the id of the element it shows and hides: `controls: 'faq-answer'`";
|
|
807
1117
|
};
|
|
808
|
-
readonly '
|
|
1118
|
+
readonly 'controls-other-row': {
|
|
809
1119
|
readonly kind: "refused";
|
|
810
|
-
readonly means: "a
|
|
811
|
-
readonly fix: "the
|
|
1120
|
+
readonly means: "a button's `controls` naming an element a list draws in its rows, from outside that row";
|
|
1121
|
+
readonly fix: "the button in the same row as what it shows and hides, or `controls` naming an element outside the list";
|
|
812
1122
|
};
|
|
813
|
-
readonly '
|
|
1123
|
+
readonly 'id-taken': {
|
|
814
1124
|
readonly kind: "refused";
|
|
815
|
-
readonly means: "
|
|
816
|
-
readonly fix: "
|
|
1125
|
+
readonly means: "two elements with one id — ids are one namespace for the whole space";
|
|
1126
|
+
readonly fix: "a name taken by a page or a layout: a name of its own; a helper called twice: `scope('promos', ref => …)`, every id inside prefixed";
|
|
817
1127
|
};
|
|
818
|
-
readonly '
|
|
1128
|
+
readonly 'id-shadows-global': {
|
|
819
1129
|
readonly kind: "refused";
|
|
820
|
-
readonly means: "
|
|
821
|
-
readonly fix: "
|
|
1130
|
+
readonly means: "an element named like a global data source (`state`, `navigation`, `auth`…)";
|
|
1131
|
+
readonly fix: "another id";
|
|
822
1132
|
};
|
|
823
|
-
readonly '
|
|
1133
|
+
readonly 'class-undeclared': {
|
|
824
1134
|
readonly kind: "refused";
|
|
825
|
-
readonly means: "a
|
|
826
|
-
readonly fix: "`
|
|
1135
|
+
readonly means: "a class name the space does not declare";
|
|
1136
|
+
readonly fix: "declare it in `classes`, hand the `styles()` declaration itself, or write the rules with `css`";
|
|
827
1137
|
};
|
|
828
|
-
readonly '
|
|
829
|
-
readonly kind: "
|
|
830
|
-
readonly means: "a
|
|
831
|
-
readonly fix: "
|
|
1138
|
+
readonly 'element-slot-unknown': {
|
|
1139
|
+
readonly kind: "refused";
|
|
1140
|
+
readonly means: "a `slots` key the element type does not have — its class would dress nothing";
|
|
1141
|
+
readonly fix: "one of the slots `plitzi explain <type>` lists; the element itself takes `class`";
|
|
832
1142
|
};
|
|
833
|
-
readonly '
|
|
834
|
-
readonly kind: "
|
|
835
|
-
readonly means: "a
|
|
836
|
-
readonly fix: "
|
|
1143
|
+
readonly 'slot-not-class': {
|
|
1144
|
+
readonly kind: "refused";
|
|
1145
|
+
readonly means: "a `slots` entry that is not a class — rules written in place, or nothing — which a slot cannot wear";
|
|
1146
|
+
readonly fix: "the rules as a `styles()` declaration, handed to the slot beside its other classes";
|
|
837
1147
|
};
|
|
838
|
-
readonly '
|
|
1148
|
+
readonly 'class-conflict': {
|
|
839
1149
|
readonly kind: "refused";
|
|
840
|
-
readonly means: "
|
|
841
|
-
readonly fix: "
|
|
1150
|
+
readonly means: "two different declarations for one class name";
|
|
1151
|
+
readonly fix: "rename one, or make them agree";
|
|
842
1152
|
};
|
|
843
|
-
readonly '
|
|
1153
|
+
readonly 'class-listed-under-other-name': {
|
|
844
1154
|
readonly kind: "refused";
|
|
845
|
-
readonly means: "a
|
|
846
|
-
readonly fix: "
|
|
1155
|
+
readonly means: "a `styles()` declaration listed in `classes` under another name";
|
|
1156
|
+
readonly fix: "list it under its own name";
|
|
847
1157
|
};
|
|
848
|
-
readonly '
|
|
1158
|
+
readonly 'class-and-css': {
|
|
849
1159
|
readonly kind: "refused";
|
|
850
|
-
readonly means: "
|
|
851
|
-
readonly fix: "
|
|
1160
|
+
readonly means: "an element wearing a shared class AND `css` or `states` of its own — it has one base selector";
|
|
1161
|
+
readonly fix: "the rules on top of the class: `class: [card, { opacity: '0.5' }]` — or into the class";
|
|
852
1162
|
};
|
|
853
|
-
readonly '
|
|
1163
|
+
readonly 'class-and-selector': {
|
|
854
1164
|
readonly kind: "refused";
|
|
855
|
-
readonly means: "
|
|
856
|
-
readonly fix: "a
|
|
1165
|
+
readonly means: "an element with a shared class and a `selector` of its own";
|
|
1166
|
+
readonly fix: "drop one: a shared class IS its selector";
|
|
857
1167
|
};
|
|
858
|
-
readonly '
|
|
1168
|
+
readonly 'modifier-count': {
|
|
859
1169
|
readonly kind: "refused";
|
|
860
|
-
readonly means: "
|
|
861
|
-
readonly fix: "
|
|
1170
|
+
readonly means: "more than one set of rules in a class list";
|
|
1171
|
+
readonly fix: "one set, after the classes: `class: [card, { opacity: '0.5', 'margin-top': '8px' }]`";
|
|
862
1172
|
};
|
|
863
|
-
readonly '
|
|
1173
|
+
readonly 'selector-invalid': {
|
|
864
1174
|
readonly kind: "refused";
|
|
865
|
-
readonly means: "a
|
|
866
|
-
readonly fix: "
|
|
1175
|
+
readonly means: "a `selector` that is not a CSS class name";
|
|
1176
|
+
readonly fix: "letters, digits, `-` and `_`";
|
|
867
1177
|
};
|
|
868
|
-
readonly '
|
|
1178
|
+
readonly 'selector-taken': {
|
|
869
1179
|
readonly kind: "refused";
|
|
870
|
-
readonly means: "a
|
|
871
|
-
readonly fix: "
|
|
1180
|
+
readonly means: "a `selector` that is a declared class, or another element's";
|
|
1181
|
+
readonly fix: "`class` to share rules; a selector of an element's own is its alone";
|
|
872
1182
|
};
|
|
873
|
-
readonly '
|
|
1183
|
+
readonly 'motion-invalid': {
|
|
874
1184
|
readonly kind: "refused";
|
|
875
|
-
readonly means: "a
|
|
876
|
-
readonly fix: "
|
|
1185
|
+
readonly means: "a `motion` with a preset, a trigger or a timing the page cannot play";
|
|
1186
|
+
readonly fix: "`motion: { enter: 'fade-up', on: 'view' }` — the message lists the presets";
|
|
877
1187
|
};
|
|
878
|
-
readonly '
|
|
1188
|
+
readonly 'motion-no-tag': {
|
|
879
1189
|
readonly kind: "refused";
|
|
880
|
-
readonly means: "
|
|
881
|
-
readonly fix: "
|
|
1190
|
+
readonly means: "a `motion` on an element with no tag of its own — nothing to move";
|
|
1191
|
+
readonly fix: "the motion on what it wraps, or a `subType` on it";
|
|
882
1192
|
};
|
|
883
|
-
readonly '
|
|
1193
|
+
readonly 'anchor-invalid': {
|
|
884
1194
|
readonly kind: "refused";
|
|
885
|
-
readonly means: "an `
|
|
886
|
-
readonly fix: "`
|
|
1195
|
+
readonly means: "an `anchor` or a link's `hash` that is not lowercase letters, digits and `-`";
|
|
1196
|
+
readonly fix: "`anchor: 'plans'`, `hash: 'plans'` — no `#`";
|
|
887
1197
|
};
|
|
888
|
-
readonly '
|
|
1198
|
+
readonly 'anchor-no-tag': {
|
|
889
1199
|
readonly kind: "refused";
|
|
890
|
-
readonly means: "
|
|
891
|
-
readonly fix: "`
|
|
1200
|
+
readonly means: "an anchor on an element that renders no element of its own";
|
|
1201
|
+
readonly fix: "the anchor on the element around it, or `subType: 'div'` on the provider";
|
|
892
1202
|
};
|
|
893
|
-
readonly '
|
|
1203
|
+
readonly 'anchor-repeated': {
|
|
894
1204
|
readonly kind: "refused";
|
|
895
|
-
readonly means: "a
|
|
896
|
-
readonly fix: "the element
|
|
1205
|
+
readonly means: "an anchor inside a component — it would be in the page once per instance";
|
|
1206
|
+
readonly fix: "the anchor on the element around the instance (in a list row, an anchor is the row’s own: that one is fine)";
|
|
897
1207
|
};
|
|
898
|
-
readonly '
|
|
1208
|
+
readonly 'anchor-in-row': {
|
|
899
1209
|
readonly kind: "refused";
|
|
900
|
-
readonly means: "a
|
|
901
|
-
readonly fix: "
|
|
1210
|
+
readonly means: "a link to an anchor drawn in a list’s rows — each row’s is named after its row, so the link lands at the top";
|
|
1211
|
+
readonly fix: "link to one row’s (`hash: 'answer-<row key>'`), the list’s own anchor, or one outside it";
|
|
902
1212
|
};
|
|
903
|
-
readonly '
|
|
1213
|
+
readonly 'anchor-duplicate': {
|
|
904
1214
|
readonly kind: "refused";
|
|
905
|
-
readonly means: "
|
|
906
|
-
readonly fix: "
|
|
1215
|
+
readonly means: "one anchor on two elements of the same page (layouts included)";
|
|
1216
|
+
readonly fix: "rename all but one";
|
|
907
1217
|
};
|
|
908
|
-
readonly '
|
|
1218
|
+
readonly 'anchor-missing': {
|
|
909
1219
|
readonly kind: "refused";
|
|
910
|
-
readonly means: "a
|
|
911
|
-
readonly fix: "the
|
|
1220
|
+
readonly means: "a link whose `hash` no element on the page it goes to carries — it would land at the top";
|
|
1221
|
+
readonly fix: "the anchor the message lists, or give the section that `anchor`";
|
|
912
1222
|
};
|
|
913
|
-
readonly '
|
|
1223
|
+
readonly 'link-current-section': {
|
|
914
1224
|
readonly kind: "warned";
|
|
915
|
-
readonly means: "a
|
|
916
|
-
readonly fix: "
|
|
1225
|
+
readonly means: "`current: 'section'` on a link that is never current (an external one) or current everywhere (to `/`)";
|
|
1226
|
+
readonly fix: "leave `current` out — `'section'` is for a link to a section's own page, `/automations/runs`";
|
|
917
1227
|
};
|
|
918
|
-
readonly '
|
|
1228
|
+
readonly 'page-without-slug': {
|
|
919
1229
|
readonly kind: "refused";
|
|
920
|
-
readonly means: "a
|
|
921
|
-
readonly fix: "
|
|
1230
|
+
readonly means: "a page with no `slug`";
|
|
1231
|
+
readonly fix: "`slug: ''` for the home page, its path for any other: `'about'`, `'blog/:slug'`";
|
|
922
1232
|
};
|
|
923
|
-
readonly '
|
|
924
|
-
readonly kind: "
|
|
925
|
-
readonly means: "
|
|
926
|
-
readonly fix: "one
|
|
1233
|
+
readonly 'page-route-taken': {
|
|
1234
|
+
readonly kind: "refused";
|
|
1235
|
+
readonly means: "two pages at one address for the same visitors";
|
|
1236
|
+
readonly fix: "another slug — or `accessLevel` `'public'` on one and `'authenticated'` on the other";
|
|
927
1237
|
};
|
|
928
|
-
readonly '
|
|
929
|
-
readonly kind: "
|
|
930
|
-
readonly means: "
|
|
931
|
-
readonly fix: "`
|
|
1238
|
+
readonly 'page-catch-all-default': {
|
|
1239
|
+
readonly kind: "refused";
|
|
1240
|
+
readonly means: "the page of every address no other answers (`slug: '*'`) marked the home";
|
|
1241
|
+
readonly fix: "`isDefault` on the page at `''`, or left out: the page at `''` is the home";
|
|
932
1242
|
};
|
|
933
|
-
readonly '
|
|
934
|
-
readonly kind: "
|
|
935
|
-
readonly means: "
|
|
936
|
-
readonly fix: "
|
|
1243
|
+
readonly 'page-route-reserved': {
|
|
1244
|
+
readonly kind: "refused";
|
|
1245
|
+
readonly means: "a page under `/fn`, where the space's functions answer";
|
|
1246
|
+
readonly fix: "another slug";
|
|
937
1247
|
};
|
|
938
|
-
readonly '
|
|
939
|
-
readonly kind: "
|
|
940
|
-
readonly means: "
|
|
941
|
-
readonly fix: "
|
|
1248
|
+
readonly 'page-access-level': {
|
|
1249
|
+
readonly kind: "refused";
|
|
1250
|
+
readonly means: "an `accessLevel` that is not one the router reads";
|
|
1251
|
+
readonly fix: "one of the values the message lists";
|
|
942
1252
|
};
|
|
943
|
-
readonly '
|
|
1253
|
+
readonly 'page-access': {
|
|
944
1254
|
readonly kind: "refused";
|
|
945
|
-
readonly means: "a `
|
|
946
|
-
readonly fix: "
|
|
1255
|
+
readonly means: "a page `access` the server cannot keep: no permissions, or one that is not a name";
|
|
1256
|
+
readonly fix: "`access: { permissions: ['…'] }` with at least one permission name, or no `access` for a page anybody may see";
|
|
947
1257
|
};
|
|
948
|
-
readonly '
|
|
1258
|
+
readonly 'page-target-unknown': {
|
|
949
1259
|
readonly kind: "refused";
|
|
950
|
-
readonly means: "
|
|
951
|
-
readonly fix: "
|
|
1260
|
+
readonly means: "a link or `navigate` to a page id that does not exist";
|
|
1261
|
+
readonly fix: "an existing page id, or a path with its slash (`'/about'`)";
|
|
952
1262
|
};
|
|
953
|
-
readonly '
|
|
1263
|
+
readonly 'page-path-unknown': {
|
|
1264
|
+
readonly kind: "warned";
|
|
1265
|
+
readonly means: "a link or `navigate` to a path no page of the space answers — a page not made yet, or a typo";
|
|
1266
|
+
readonly fix: "a path a page answers (its folder and slug), the page's id, or `mode: 'external'` for one the server answers itself";
|
|
1267
|
+
};
|
|
1268
|
+
readonly 'page-target-url': {
|
|
954
1269
|
readonly kind: "refused";
|
|
955
|
-
readonly means: "
|
|
956
|
-
readonly fix: "
|
|
1270
|
+
readonly means: "a URL, `mailto:` or `tel:` in a link left in page mode";
|
|
1271
|
+
readonly fix: "`mode: 'external'`";
|
|
957
1272
|
};
|
|
958
|
-
readonly '
|
|
1273
|
+
readonly 'redirect-target-unknown': {
|
|
959
1274
|
readonly kind: "refused";
|
|
960
|
-
readonly means: "a
|
|
961
|
-
readonly fix: "
|
|
1275
|
+
readonly means: "a page that sends visitors it is not for to a page the space does not have";
|
|
1276
|
+
readonly fix: "a page's id or slug (`''` is the home page), or a full URL";
|
|
962
1277
|
};
|
|
963
|
-
readonly '
|
|
1278
|
+
readonly 'robots-unknown': {
|
|
964
1279
|
readonly kind: "refused";
|
|
965
|
-
readonly means: "a
|
|
966
|
-
readonly fix: "
|
|
1280
|
+
readonly means: "a page's `robots` with a directive no search engine reads, or none";
|
|
1281
|
+
readonly fix: "`robots: 'noindex'`, `'noindex, nofollow'` — or leave it out, and the page is indexed";
|
|
967
1282
|
};
|
|
968
|
-
readonly '
|
|
1283
|
+
readonly 'robots-txt-line': {
|
|
969
1284
|
readonly kind: "refused";
|
|
970
|
-
readonly means: "a `
|
|
971
|
-
readonly fix: "
|
|
1285
|
+
readonly means: "a line of the space's `settings.robotsTxt` that no crawler reads, or one with no `User-agent`";
|
|
1286
|
+
readonly fix: "`User-agent: *` then `Allow: /`, `Disallow: /overlay` — each line `Field: value`, or a comment";
|
|
972
1287
|
};
|
|
973
|
-
readonly '
|
|
1288
|
+
readonly 'share-image-invalid': {
|
|
974
1289
|
readonly kind: "refused";
|
|
975
|
-
readonly means: "a
|
|
976
|
-
readonly fix: "
|
|
1290
|
+
readonly means: "a page's `seoImage` that is neither a file of the site, an address nor a template — or a `seoImageAlt` with no picture";
|
|
1291
|
+
readonly fix: "`seoImage: '/og/home.png'` (in public/), `'https://…'` or `'{{ apiContainer_room.cover }}'`, with `seoImageAlt` saying what it shows";
|
|
977
1292
|
};
|
|
978
|
-
readonly '
|
|
979
|
-
readonly kind: "
|
|
980
|
-
readonly means: "a
|
|
981
|
-
readonly fix: "`
|
|
1293
|
+
readonly 'og-type-unknown': {
|
|
1294
|
+
readonly kind: "refused";
|
|
1295
|
+
readonly means: "a page's `seoType` that Open Graph does not name";
|
|
1296
|
+
readonly fix: "`seoType: 'article'`, `'profile'`, `'music.playlist'` — or leave it out, and the page is a `website`";
|
|
982
1297
|
};
|
|
983
|
-
readonly '
|
|
984
|
-
readonly kind: "
|
|
985
|
-
readonly means: "
|
|
986
|
-
readonly fix: "
|
|
1298
|
+
readonly 'space-identity-invalid': {
|
|
1299
|
+
readonly kind: "refused";
|
|
1300
|
+
readonly means: "the space's `siteName`, `language`, `favicon`, `shareImage` or `themeColor` written as nothing a head reads";
|
|
1301
|
+
readonly fix: "`siteName: 'My site'`, `language: 'en'`, `favicon: '/favicon.svg'`, `shareImage: '/og.png'`, `themeColor: { light: '#fbf7f0', dark: '#0b0a10' }`";
|
|
987
1302
|
};
|
|
988
|
-
readonly '
|
|
989
|
-
readonly kind: "
|
|
990
|
-
readonly means: "
|
|
991
|
-
readonly fix: "
|
|
1303
|
+
readonly 'structured-data-shape': {
|
|
1304
|
+
readonly kind: "refused";
|
|
1305
|
+
readonly means: "a page's `structuredData` item with no `@context` or `@type`, or a value JSON cannot carry";
|
|
1306
|
+
readonly fix: "`structuredData: { '@context': 'https://schema.org', '@type': 'SportsEvent', name: '…' }`";
|
|
992
1307
|
};
|
|
993
|
-
readonly '
|
|
994
|
-
readonly kind: "
|
|
995
|
-
readonly means: "a
|
|
996
|
-
readonly fix: "the
|
|
1308
|
+
readonly 'page-template': {
|
|
1309
|
+
readonly kind: "refused";
|
|
1310
|
+
readonly means: "a template in a page's `seoTitle`, `seoDescription`, `notFound` or a text of its `structuredData` that reads what is not there when the server answers — anything but the page's `runtime: 'server'` providers and `navigation` — or cannot be read";
|
|
1311
|
+
readonly fix: "read the record from a provider with `runtime: 'server'` on the page or its layout — `'{{ apiContainer_post.title }} — Blog'` — or words of its own";
|
|
997
1312
|
};
|
|
998
|
-
readonly '
|
|
999
|
-
readonly kind: "
|
|
1000
|
-
readonly means: "
|
|
1001
|
-
readonly fix: "the
|
|
1313
|
+
readonly 'declared-callback-target': {
|
|
1314
|
+
readonly kind: "refused";
|
|
1315
|
+
readonly means: "a `declaredCallback` target with a key beside `on` and `params` — read nowhere, so the step runs without it";
|
|
1316
|
+
readonly fix: "the value in `params`: `{ on: 'calendar', params: { date } }`";
|
|
1002
1317
|
};
|
|
1003
|
-
readonly '
|
|
1004
|
-
readonly kind: "
|
|
1005
|
-
readonly means: "a
|
|
1006
|
-
readonly fix: "the
|
|
1318
|
+
readonly 'folder-undeclared': {
|
|
1319
|
+
readonly kind: "refused";
|
|
1320
|
+
readonly means: "a page, a layout or a folder filed in a folder the space does not declare";
|
|
1321
|
+
readonly fix: "declare it on the space — `pageFolders: [{ id: 'docs', name: 'Docs' }]`, its slug starting its pages' addresses — or use the name it suggests";
|
|
1007
1322
|
};
|
|
1008
|
-
readonly '
|
|
1009
|
-
readonly kind: "
|
|
1010
|
-
readonly means: "a
|
|
1011
|
-
readonly fix: "
|
|
1323
|
+
readonly 'page-nav-invalid': {
|
|
1324
|
+
readonly kind: "refused";
|
|
1325
|
+
readonly means: "a page's `nav` without a label, with an order that is no number, or on a page with no one address to list";
|
|
1326
|
+
readonly fix: "`nav: { label: 'Pets', order: 3 }` on a page whose path takes no param — a page per record is reached from its list";
|
|
1012
1327
|
};
|
|
1013
|
-
readonly '
|
|
1014
|
-
readonly kind: "
|
|
1015
|
-
readonly means: "a
|
|
1016
|
-
readonly fix: "
|
|
1328
|
+
readonly 'folder-cycle': {
|
|
1329
|
+
readonly kind: "refused";
|
|
1330
|
+
readonly means: "a page folder inside itself";
|
|
1331
|
+
readonly fix: "a `parent` that leads to the top";
|
|
1017
1332
|
};
|
|
1018
|
-
readonly '
|
|
1019
|
-
readonly kind: "
|
|
1020
|
-
readonly means: "
|
|
1021
|
-
readonly fix: "
|
|
1333
|
+
readonly 'layout-undeclared': {
|
|
1334
|
+
readonly kind: "refused";
|
|
1335
|
+
readonly means: "a page or a layout inside a layout the space does not declare";
|
|
1336
|
+
readonly fix: "the layout's id, or declare it in `layouts`";
|
|
1022
1337
|
};
|
|
1023
|
-
readonly '
|
|
1024
|
-
readonly kind: "
|
|
1025
|
-
readonly means: "
|
|
1026
|
-
readonly fix: "
|
|
1338
|
+
readonly 'layout-slot-unknown': {
|
|
1339
|
+
readonly kind: "refused";
|
|
1340
|
+
readonly means: "a layout `slot` that is not an element inside that layout";
|
|
1341
|
+
readonly fix: "the id of the element in the shell where the body goes";
|
|
1027
1342
|
};
|
|
1028
|
-
readonly '
|
|
1029
|
-
readonly kind: "
|
|
1030
|
-
readonly means: "
|
|
1031
|
-
readonly fix: "
|
|
1343
|
+
readonly 'no-pages': {
|
|
1344
|
+
readonly kind: "refused";
|
|
1345
|
+
readonly means: "a space with no pages";
|
|
1346
|
+
readonly fix: "`pages: [{ id: 'home', name: 'Home', slug: '', body: [] }]`";
|
|
1032
1347
|
};
|
|
1033
|
-
readonly '
|
|
1034
|
-
readonly kind: "
|
|
1035
|
-
readonly means: "
|
|
1036
|
-
readonly fix: "
|
|
1348
|
+
readonly 'withheld-page-invalid': {
|
|
1349
|
+
readonly kind: "refused";
|
|
1350
|
+
readonly means: "`settings.withheldPage` naming no page of the space, or one with an `access` of its own";
|
|
1351
|
+
readonly fix: "the id or slug of a page every visitor may see: `withheldPage: 'no-access'`";
|
|
1037
1352
|
};
|
|
1038
|
-
readonly '
|
|
1039
|
-
readonly kind: "
|
|
1040
|
-
readonly means: "
|
|
1041
|
-
readonly fix: "
|
|
1353
|
+
readonly 'setting-misplaced': {
|
|
1354
|
+
readonly kind: "refused";
|
|
1355
|
+
readonly means: "`settings.computed` or `settings.channels` written inside `settings`";
|
|
1356
|
+
readonly fix: "`computed` and `channels` at the top of the space";
|
|
1042
1357
|
};
|
|
1043
|
-
readonly '
|
|
1044
|
-
readonly kind: "
|
|
1045
|
-
readonly means: "
|
|
1046
|
-
readonly fix: "
|
|
1358
|
+
readonly 'state-key-list': {
|
|
1359
|
+
readonly kind: "refused";
|
|
1360
|
+
readonly means: "`settings.transientState` / `paintedState` that is not a list of top-level state keys";
|
|
1361
|
+
readonly fix: "`transientState: ['demoStep']` — a dotted path names its top key";
|
|
1047
1362
|
};
|
|
1048
|
-
readonly '
|
|
1049
|
-
readonly kind: "
|
|
1050
|
-
readonly means: "
|
|
1051
|
-
readonly fix: "
|
|
1363
|
+
readonly 'state-painted-and-transient': {
|
|
1364
|
+
readonly kind: "refused";
|
|
1365
|
+
readonly means: "a state key both painted (kept for the server) and transient (never kept)";
|
|
1366
|
+
readonly fix: "remove it from one of the two";
|
|
1052
1367
|
};
|
|
1053
|
-
readonly '
|
|
1054
|
-
readonly kind: "
|
|
1055
|
-
readonly means: "
|
|
1056
|
-
readonly fix: "
|
|
1368
|
+
readonly 'state-kept-and-transient': {
|
|
1369
|
+
readonly kind: "refused";
|
|
1370
|
+
readonly means: "`keptState` (the only keys kept) and `transientState` (the keys left out) both said";
|
|
1371
|
+
readonly fix: "one of the two: `keptState` when few keys are kept, `transientState` when few are not";
|
|
1057
1372
|
};
|
|
1058
|
-
readonly '
|
|
1059
|
-
readonly kind: "
|
|
1060
|
-
readonly means: "
|
|
1061
|
-
readonly fix: "
|
|
1373
|
+
readonly 'state-painted-not-kept': {
|
|
1374
|
+
readonly kind: "refused";
|
|
1375
|
+
readonly means: "a `paintedState` key that `keptState` does not keep — the server draws with what is kept";
|
|
1376
|
+
readonly fix: "add it to `keptState`, or leave it out of `paintedState`";
|
|
1062
1377
|
};
|
|
1063
|
-
readonly '
|
|
1064
|
-
readonly kind: "
|
|
1065
|
-
readonly means: "
|
|
1066
|
-
readonly fix: "`
|
|
1378
|
+
readonly 'kept-state-without-keep-state': {
|
|
1379
|
+
readonly kind: "warned";
|
|
1380
|
+
readonly means: "`keptState` without `keepState` — nothing is kept in the first place";
|
|
1381
|
+
readonly fix: "`settings.keepState: true`, or remove `keptState`";
|
|
1067
1382
|
};
|
|
1068
|
-
readonly '
|
|
1069
|
-
readonly kind: "
|
|
1070
|
-
readonly means: "
|
|
1071
|
-
readonly fix: "
|
|
1383
|
+
readonly 'transient-state-without-keep-state': {
|
|
1384
|
+
readonly kind: "warned";
|
|
1385
|
+
readonly means: "`transientState` without `keepState` — nothing is kept in the first place";
|
|
1386
|
+
readonly fix: "`settings.keepState: true`, or remove `transientState`";
|
|
1072
1387
|
};
|
|
1073
|
-
readonly '
|
|
1074
|
-
readonly kind: "
|
|
1075
|
-
readonly means: "
|
|
1076
|
-
readonly fix: "
|
|
1388
|
+
readonly 'painted-state-without-keep-state': {
|
|
1389
|
+
readonly kind: "warned";
|
|
1390
|
+
readonly means: "`paintedState` without `keepState` — nothing is kept for the server to draw with";
|
|
1391
|
+
readonly fix: "`settings.keepState: true`, or remove `paintedState`";
|
|
1077
1392
|
};
|
|
1078
|
-
readonly '
|
|
1079
|
-
readonly kind: "
|
|
1080
|
-
readonly means: "
|
|
1081
|
-
readonly fix: "
|
|
1393
|
+
readonly 'visitor-roles': {
|
|
1394
|
+
readonly kind: "refused";
|
|
1395
|
+
readonly means: "`settings.visitorRoles` written in a shape the runtime does not read";
|
|
1396
|
+
readonly fix: "the shape the message gives";
|
|
1082
1397
|
};
|
|
1083
|
-
readonly '
|
|
1084
|
-
readonly kind: "
|
|
1085
|
-
readonly means: "a
|
|
1086
|
-
readonly fix: "
|
|
1398
|
+
readonly 'font-invalid': {
|
|
1399
|
+
readonly kind: "refused";
|
|
1400
|
+
readonly means: "a font the space cannot load as declared";
|
|
1401
|
+
readonly fix: "the field the message names";
|
|
1087
1402
|
};
|
|
1088
|
-
readonly '
|
|
1089
|
-
readonly kind: "
|
|
1090
|
-
readonly means: "a
|
|
1091
|
-
readonly fix: "
|
|
1403
|
+
readonly 'notifications-shape': {
|
|
1404
|
+
readonly kind: "refused";
|
|
1405
|
+
readonly means: "`notifications` with a field it does not have, or a value that is not one CSS value";
|
|
1406
|
+
readonly fix: "the field it suggests, or one it lists; one CSS value, like 'var(--card)', '12px' or '500'";
|
|
1092
1407
|
};
|
|
1093
|
-
readonly '
|
|
1094
|
-
readonly kind: "
|
|
1095
|
-
readonly means: "
|
|
1096
|
-
readonly fix: "the
|
|
1408
|
+
readonly 'unknown-field': {
|
|
1409
|
+
readonly kind: "refused";
|
|
1410
|
+
readonly means: "a field the space, a page, an element, a binding or a step does not have";
|
|
1411
|
+
readonly fix: "the field it suggests; an element's attribute goes inside the factory's props (`button({ content })`)";
|
|
1097
1412
|
};
|
|
1098
1413
|
};
|
|
1099
1414
|
|
|
@@ -1109,6 +1424,10 @@ export declare const authorProjectSpace: () => Promise<AuthoredSpace>;
|
|
|
1109
1424
|
|
|
1110
1425
|
declare type BindingCategory = 'attributes' | 'style' | 'initialState';
|
|
1111
1426
|
|
|
1427
|
+
/**
|
|
1428
|
+
* One binding of an element, in its long form: where a value comes from (`source`), what receives it (`to`), and how it
|
|
1429
|
+
* is turned on the way (`template`, `transformers`) — what `bind: [...]` and `bindTemplate` write.
|
|
1430
|
+
*/
|
|
1112
1431
|
declare interface BindingSpec {
|
|
1113
1432
|
/** Attribute, style property or state key that receives the value. */
|
|
1114
1433
|
to: string;
|
|
@@ -1145,6 +1464,7 @@ declare type BindingTransformer = {
|
|
|
1145
1464
|
enabled?: boolean;
|
|
1146
1465
|
};
|
|
1147
1466
|
|
|
1467
|
+
/** The types a step's, an action's or a task's param takes: what its value is checked as, and the builder's widget for it. */
|
|
1148
1468
|
declare const BUILTIN_PARAM_TYPES: readonly ["text", "textarea", "select", "boolean", "number", "scalar", "json", "elementIds"];
|
|
1149
1469
|
|
|
1150
1470
|
declare interface BuiltinParam {
|
|
@@ -1336,6 +1656,192 @@ declare const DOCUMENT_SCROLLS: readonly ["locked", "noBounce"];
|
|
|
1336
1656
|
|
|
1337
1657
|
declare type DocumentScroll = (typeof DOCUMENT_SCROLLS)[number];
|
|
1338
1658
|
|
|
1659
|
+
/**
|
|
1660
|
+
* Somebody signed in, as the space's journeys play them: declared in the tests alone — no account of the platform's,
|
|
1661
|
+
* no password. A journey that plays `as` one shows its pages that visitor: the auth source holds these details and a
|
|
1662
|
+
* token no server takes (`test:<id>`), `can()` answers by what its roles give, a page for signed-in visitors opens. The
|
|
1663
|
+
* server's API does not know it: what a page asks the API it asks as a guest — a journey with an account reads and
|
|
1664
|
+
* moves, it never writes.
|
|
1665
|
+
*/
|
|
1666
|
+
declare interface E2eAccount {
|
|
1667
|
+
/** What the journeys name it by, and its username on the page: letters, digits, `-` and `_`. */
|
|
1668
|
+
id: string;
|
|
1669
|
+
email?: string;
|
|
1670
|
+
/**
|
|
1671
|
+
* The space's visitor roles it holds (`settings.visitorRoles`): what it may is what they give, as for a visitor. One
|
|
1672
|
+
* the space no longer declares is warned of, and gives nothing.
|
|
1673
|
+
*/
|
|
1674
|
+
roles?: string[];
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
/** What a visitor does, one step of an e2e test. */
|
|
1678
|
+
declare type E2eAction =
|
|
1679
|
+
/** A press on its centre, or on a point of its box. */
|
|
1680
|
+
{
|
|
1681
|
+
kind: 'click';
|
|
1682
|
+
element: E2eTarget;
|
|
1683
|
+
point?: E2ePoint;
|
|
1684
|
+
}
|
|
1685
|
+
/** The pointer put over it, and left there. */
|
|
1686
|
+
| {
|
|
1687
|
+
kind: 'hover';
|
|
1688
|
+
element: E2eTarget;
|
|
1689
|
+
point?: E2ePoint;
|
|
1690
|
+
}
|
|
1691
|
+
/** Typed into the field it is or holds, in place of what the field held — a select chosen, a date set. */
|
|
1692
|
+
| {
|
|
1693
|
+
kind: 'type';
|
|
1694
|
+
element: E2eTarget;
|
|
1695
|
+
text: string;
|
|
1696
|
+
}
|
|
1697
|
+
/** A key or a combination, as a keyboard names it: `Enter`, `Meta+k`. */
|
|
1698
|
+
| {
|
|
1699
|
+
kind: 'press';
|
|
1700
|
+
key: string;
|
|
1701
|
+
}
|
|
1702
|
+
/** Brought into view, as a reader scrolling to it; with `dx`/`dy`, its own content scrolled by so many pixels. */
|
|
1703
|
+
| {
|
|
1704
|
+
kind: 'scroll';
|
|
1705
|
+
element: E2eTarget;
|
|
1706
|
+
dx?: number;
|
|
1707
|
+
dy?: number;
|
|
1708
|
+
}
|
|
1709
|
+
/** Pressed, moved by so many pixels (negative: left, up) and let go — a slider's handle. */
|
|
1710
|
+
| {
|
|
1711
|
+
kind: 'drag';
|
|
1712
|
+
element: E2eTarget;
|
|
1713
|
+
dx: number;
|
|
1714
|
+
dy: number;
|
|
1715
|
+
}
|
|
1716
|
+
/** Until the element shows — at most `ms` (10 s), up to 60 s. */
|
|
1717
|
+
| {
|
|
1718
|
+
kind: 'waitFor';
|
|
1719
|
+
element: E2eTarget;
|
|
1720
|
+
ms?: number;
|
|
1721
|
+
}
|
|
1722
|
+
/** A path of the space's own: `/menu`. */
|
|
1723
|
+
| {
|
|
1724
|
+
kind: 'goto';
|
|
1725
|
+
path: string;
|
|
1726
|
+
} | {
|
|
1727
|
+
kind: 'back';
|
|
1728
|
+
} | {
|
|
1729
|
+
kind: 'reload';
|
|
1730
|
+
}
|
|
1731
|
+
/** The page's state set as a flow would set it: a case reached without its steps. */
|
|
1732
|
+
| {
|
|
1733
|
+
kind: 'setState';
|
|
1734
|
+
key: string;
|
|
1735
|
+
value: unknown;
|
|
1736
|
+
}
|
|
1737
|
+
/** A source's value put on the page: `apiContainer_feed.items`. */
|
|
1738
|
+
| {
|
|
1739
|
+
kind: 'setSource';
|
|
1740
|
+
path: string;
|
|
1741
|
+
value: unknown;
|
|
1742
|
+
}
|
|
1743
|
+
/** The page's held clock moved on, in ms. */
|
|
1744
|
+
| {
|
|
1745
|
+
kind: 'tick';
|
|
1746
|
+
ms: number;
|
|
1747
|
+
};
|
|
1748
|
+
|
|
1749
|
+
/** What must hold of the page, checked where it stands among the steps. */
|
|
1750
|
+
declare type E2eExpectation = {
|
|
1751
|
+
kind: 'expectShown';
|
|
1752
|
+
element: E2eTarget;
|
|
1753
|
+
} | {
|
|
1754
|
+
kind: 'expectHidden';
|
|
1755
|
+
element: E2eTarget;
|
|
1756
|
+
}
|
|
1757
|
+
/** Its words hold the text — or are it, `exact`. */
|
|
1758
|
+
| {
|
|
1759
|
+
kind: 'expectText';
|
|
1760
|
+
element: E2eTarget;
|
|
1761
|
+
text: string;
|
|
1762
|
+
exact?: boolean;
|
|
1763
|
+
} | {
|
|
1764
|
+
kind: 'expectState';
|
|
1765
|
+
key: string;
|
|
1766
|
+
value: unknown;
|
|
1767
|
+
} | {
|
|
1768
|
+
kind: 'expectAttribute';
|
|
1769
|
+
element: E2eTarget;
|
|
1770
|
+
name: string;
|
|
1771
|
+
value: string;
|
|
1772
|
+
}
|
|
1773
|
+
/** A computed property, as CSS names it — or at least (`>=`) or at most (`<=`) a number of it. */
|
|
1774
|
+
| {
|
|
1775
|
+
kind: 'expectStyle';
|
|
1776
|
+
element: E2eTarget;
|
|
1777
|
+
property: string;
|
|
1778
|
+
value: string;
|
|
1779
|
+
at?: '>=' | '<=';
|
|
1780
|
+
}
|
|
1781
|
+
/** Where two elements stand: `activity.bottom + 8 <= legend.top`. */
|
|
1782
|
+
| {
|
|
1783
|
+
kind: 'expectPosition';
|
|
1784
|
+
relation: string;
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* An element check of the space (`tests.unit`, by id) holds for the page as the journey left it: its element resolved
|
|
1788
|
+
* for the page's state and sources now — not the check's own `given.state` — with the sources the check names itself
|
|
1789
|
+
* (a list's row) laid over them. One check of the logic, held at the moment a whole flow reaches it.
|
|
1790
|
+
*/
|
|
1791
|
+
| {
|
|
1792
|
+
kind: 'expectCheck';
|
|
1793
|
+
check: string;
|
|
1794
|
+
};
|
|
1795
|
+
|
|
1796
|
+
/**
|
|
1797
|
+
* A point of an element's box, in percent from its top left — `{ x: 30, y: 60 }`: what a canvas draws (a quake on a map)
|
|
1798
|
+
* has no element of its own to press.
|
|
1799
|
+
*/
|
|
1800
|
+
declare interface E2ePoint {
|
|
1801
|
+
x: number;
|
|
1802
|
+
y: number;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
declare type E2eStep = E2eAction | E2eExpectation;
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* An element a step or an expectation names: its id, and for one a list draws more than once, which copy — `bin-bar:3`
|
|
1809
|
+
* (the third, from one), `bin-bar:last`.
|
|
1810
|
+
*/
|
|
1811
|
+
declare type E2eTarget = string;
|
|
1812
|
+
|
|
1813
|
+
declare interface E2eTest {
|
|
1814
|
+
id: string;
|
|
1815
|
+
title: string;
|
|
1816
|
+
/**
|
|
1817
|
+
* What it is about, in a word or two each — `sign-in`, `onboarding`, `phone`: how a list of many is sorted and filtered
|
|
1818
|
+
* (the builder's chips, `plitzi_test run`'s `tags`). Letters, digits, `-` and `_`, lower case; none twice.
|
|
1819
|
+
*/
|
|
1820
|
+
tags?: string[];
|
|
1821
|
+
/** The path it opens: `/menu`, `/r/night-drive`. */
|
|
1822
|
+
page: string;
|
|
1823
|
+
/** The window's width, in px: 1440 when left out. */
|
|
1824
|
+
width?: number;
|
|
1825
|
+
scheme?: 'light' | 'dark';
|
|
1826
|
+
/** The account it plays as, signed in (`accounts`, by id): a guest when left out. */
|
|
1827
|
+
as?: string;
|
|
1828
|
+
/**
|
|
1829
|
+
* Server actions answered by the test, by id: what they return, so the test reads the same data every time. An
|
|
1830
|
+
* action it does not name is answered by the space as for a visitor.
|
|
1831
|
+
*/
|
|
1832
|
+
answers?: Record<string, Record<string, unknown>>;
|
|
1833
|
+
/** The page's clock, held from this instant (ISO, UTC): a page that writes the time reads the same every run. */
|
|
1834
|
+
clock?: string;
|
|
1835
|
+
/**
|
|
1836
|
+
* Where it starts: the page's state set as it opens, before the first step — a case reached without the steps that
|
|
1837
|
+
* lead to it (a basket already full, a visitor already past the first screen).
|
|
1838
|
+
*/
|
|
1839
|
+
given?: {
|
|
1840
|
+
state: Record<string, unknown>;
|
|
1841
|
+
};
|
|
1842
|
+
steps: E2eStep[];
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1339
1845
|
/**
|
|
1340
1846
|
* An element, keyed by the one name it answers to.
|
|
1341
1847
|
*
|
|
@@ -1542,6 +2048,16 @@ declare interface ElementMotion {
|
|
|
1542
2048
|
stagger?: number;
|
|
1543
2049
|
/** Keeps moving after it arrived. */
|
|
1544
2050
|
loop?: MotionLoop;
|
|
2051
|
+
/**
|
|
2052
|
+
* The curve it arrives along, as CSS says one — `ease-in-out`, `cubic-bezier(0.4, 0, 0.2, 1)`, `steps(4)` — for a
|
|
2053
|
+
* copy whose arrivals must be the original's (`MOTION_ENTER_EASING` when left out).
|
|
2054
|
+
*/
|
|
2055
|
+
easing?: string;
|
|
2056
|
+
/**
|
|
2057
|
+
* How far it travels to arrive, in px, for an arrival that travels (`MOTION_ENTER_TRAVEL`): `fade-up` rises 24 px
|
|
2058
|
+
* unless this says 20.
|
|
2059
|
+
*/
|
|
2060
|
+
distance?: number;
|
|
1545
2061
|
}
|
|
1546
2062
|
|
|
1547
2063
|
declare type ElementRuntime = 'server' | 'client' | 'shared';
|
|
@@ -1733,7 +2249,7 @@ declare type InteractionCallbackParamValues<T extends Record<string, unknown> =
|
|
|
1733
2249
|
|
|
1734
2250
|
declare type InteractionCallbackType = 'trigger' | 'globalCallback' | 'callback' | 'utility' | 'task';
|
|
1735
2251
|
|
|
1736
|
-
declare type InteractionParamType = 'boolean' | 'select' | 'text' | 'number' | 'textarea' | 'codemirror-text' | 'codemirror-json' | 'elements';
|
|
2252
|
+
declare type InteractionParamType = 'boolean' | 'select' | 'text' | 'number' | 'textarea' | 'codemirror-text' | 'codemirror-json' | 'elements' | 'list';
|
|
1737
2253
|
|
|
1738
2254
|
export declare type IsolatedAuthoring = {
|
|
1739
2255
|
ok: true;
|
|
@@ -1924,6 +2440,11 @@ declare interface NotificationsSpec {
|
|
|
1924
2440
|
progressHeight?: string;
|
|
1925
2441
|
}
|
|
1926
2442
|
|
|
2443
|
+
/** The kinds of page Open Graph names (`og:type`), as ogp.me lists them. */
|
|
2444
|
+
declare const OG_TYPES: readonly ["website", "article", "profile", "book", "music.song", "music.album", "music.playlist", "music.radio_station", "video.movie", "video.episode", "video.tv_show", "video.other"];
|
|
2445
|
+
|
|
2446
|
+
declare type OgType = (typeof OG_TYPES)[number];
|
|
2447
|
+
|
|
1927
2448
|
declare type Operator = '' | '=' | '!=' | '<' | '>' | '<=' | '>=' | 'contains' | 'doesNotContain' | 'beginsWith' | 'doesNotBeginWith' | 'endsWith' | 'doesNotEndWith' | 'empty' | 'notEmpty' | 'in' | 'notIn' | 'between' | 'notBetween';
|
|
1928
2449
|
|
|
1929
2450
|
declare type PageFolder = {
|
|
@@ -1973,6 +2494,34 @@ declare interface PageHandle extends ElementHandle {
|
|
|
1973
2494
|
elements: Record<string, ElementHandle>;
|
|
1974
2495
|
}
|
|
1975
2496
|
|
|
2497
|
+
/**
|
|
2498
|
+
* How a page is listed in the space's navigation, said by the page itself: `navOf(pages)` reads it into the links a
|
|
2499
|
+
* layout draws, so a new page joins the menu without the layout or the entry being edited. Authoring only — never
|
|
2500
|
+
* written into the document, where the layout's links are what is kept.
|
|
2501
|
+
*/
|
|
2502
|
+
declare interface PageNav {
|
|
2503
|
+
label: string;
|
|
2504
|
+
/** Where it goes among the others, lowest first; those without one after them, by label. */
|
|
2505
|
+
order?: number;
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* Every page under `folder` — each module in it (`pets.ts`) and each folder's `index.ts` (`home/index.ts`), by its
|
|
2510
|
+
* default export: a page, or the list of a page family (`pageFamily`, a page per record). Found by folder, as the
|
|
2511
|
+
* plugins are, so a page is part of the space by being there: no list in the entry to forget one, nor one line that
|
|
2512
|
+
* every new page writes. The CLI follows its imports through the same folder (`plitzi space overview`, the lint's
|
|
2513
|
+
* unused files), so a page there is never taken for a stray file.
|
|
2514
|
+
*
|
|
2515
|
+
* In path order, but the home page first — the first page is the space's default unless one says `isDefault`. A module
|
|
2516
|
+
* there that exports no page by default is refused, naming it: a helper belongs in a page's own folder, or beside it.
|
|
2517
|
+
*
|
|
2518
|
+
* ```ts
|
|
2519
|
+
* const pages = await pagesIn(new URL('./pages/', import.meta.url));
|
|
2520
|
+
* export const space: SpaceSpec = { …, pages: [...pages, notFound] };
|
|
2521
|
+
* ```
|
|
2522
|
+
*/
|
|
2523
|
+
export declare const pagesIn: (folder: string | URL) => Promise<PageSpec[]>;
|
|
2524
|
+
|
|
1976
2525
|
declare interface PageSpec {
|
|
1977
2526
|
name: string;
|
|
1978
2527
|
/** As {@link ElementSpec.id} — a page is an element, and its flows are targeted the same way. */
|
|
@@ -1987,6 +2536,27 @@ declare interface PageSpec {
|
|
|
1987
2536
|
*/
|
|
1988
2537
|
seoTitle?: string;
|
|
1989
2538
|
seoDescription?: string;
|
|
2539
|
+
/**
|
|
2540
|
+
* Whether search engines index this page and follow its links — `'noindex'`, `'noindex, nofollow'` — written into the
|
|
2541
|
+
* head as `<meta name="robots">`. Left out, they index it, as any page.
|
|
2542
|
+
*/
|
|
2543
|
+
robots?: string;
|
|
2544
|
+
/**
|
|
2545
|
+
* What this page is about in schema.org's words, as JSON-LD — an event, an organization, a person — written into the
|
|
2546
|
+
* head as `<script type="application/ld+json">`, which a search engine reads for its rich results. One object or
|
|
2547
|
+
* several, each with `'@context'` and `'@type'`.
|
|
2548
|
+
*/
|
|
2549
|
+
structuredData?: StructuredData | StructuredData[];
|
|
2550
|
+
/**
|
|
2551
|
+
* The picture a link to this page shows where it is pasted — a chat's preview card, a post (`og:image`): a file of
|
|
2552
|
+
* the site (`'/og/home.png'`, in `public/`) or an address, about 1200×630. A template over the page's server providers
|
|
2553
|
+
* too — `'{{ apiContainer_room.cover }}'` — as `seoTitle` is. Left out, the space's `settings.shareImage`.
|
|
2554
|
+
*/
|
|
2555
|
+
seoImage?: string;
|
|
2556
|
+
/** What that picture shows, for whoever cannot see it (`og:image:alt`). */
|
|
2557
|
+
seoImageAlt?: string;
|
|
2558
|
+
/** What the page is, in Open Graph's words (`og:type`): `'website'` when left out, `'article'`, `'music.playlist'`… */
|
|
2559
|
+
seoType?: OgType;
|
|
1990
2560
|
/**
|
|
1991
2561
|
* One expression over the same answers that says this address shows nothing — a record that is not there: the page is
|
|
1992
2562
|
* sent with status 404, rendered as written. For a record read by a provider the page shares with others, in its
|
|
@@ -2046,6 +2616,8 @@ declare interface PageSpec {
|
|
|
2046
2616
|
flows?: StepSpec[][];
|
|
2047
2617
|
/** As {@link ElementSpec.flag}: a page whose flag says no is not found. */
|
|
2048
2618
|
flag?: string;
|
|
2619
|
+
/** How the space's navigation lists it: see {@link PageNav}. */
|
|
2620
|
+
nav?: PageNav;
|
|
2049
2621
|
body: ElementSpec[];
|
|
2050
2622
|
}
|
|
2051
2623
|
|
|
@@ -2111,6 +2683,12 @@ export declare interface PluginFolder {
|
|
|
2111
2683
|
*/
|
|
2112
2684
|
export declare const pluginFolders: (folder: string | URL) => Promise<PluginFolder[]>;
|
|
2113
2685
|
|
|
2686
|
+
/**
|
|
2687
|
+
* The stylesheets of the plugins under `folder` — every `.css` in a plugin's folder, at any depth — as their text, for
|
|
2688
|
+
* `authorSpace`'s `stylesheets`: the tokens a plugin's own CSS reads are tokens the space uses.
|
|
2689
|
+
*/
|
|
2690
|
+
export declare const pluginStylesheets: (folder: string) => string[];
|
|
2691
|
+
|
|
2114
2692
|
/** What a project `@plitzi/cli` writes checks its space against: the part of `authorSpace`'s options its files say. */
|
|
2115
2693
|
export declare type ProjectAuthoring = {
|
|
2116
2694
|
plugins: PluginDeclarationData[];
|
|
@@ -2298,6 +2876,8 @@ declare type Schema = {
|
|
|
2298
2876
|
permanentUrl: string;
|
|
2299
2877
|
};
|
|
2300
2878
|
variables: SchemaVariable[];
|
|
2879
|
+
/** The space's tests, kept with it and run against it: a snapshot and a publish need them passing. */
|
|
2880
|
+
tests?: SpaceTests;
|
|
2301
2881
|
/** Keyed by the name each is read by. A space that declares none has none — documents written before flags too. */
|
|
2302
2882
|
flags?: Record<string, SchemaFlag>;
|
|
2303
2883
|
settings: {
|
|
@@ -2310,6 +2890,12 @@ declare type Schema = {
|
|
|
2310
2890
|
* writes them.
|
|
2311
2891
|
*/
|
|
2312
2892
|
transientState?: string[];
|
|
2893
|
+
/**
|
|
2894
|
+
* The only keys of `runtime.state` kept, with `keepState` on — the rest start fresh on every visit: a dismissed notice
|
|
2895
|
+
* kept, a page's every other key left alone. The other way round from `transientState`, which names the keys to
|
|
2896
|
+
* leave out; a space says one of the two. Top-level keys, as `setState` writes them.
|
|
2897
|
+
*/
|
|
2898
|
+
keptState?: string[];
|
|
2313
2899
|
/**
|
|
2314
2900
|
* Keys of `runtime.state` the first paint depends on — the tool a toolbar shows, a name in an avatar — kept in a
|
|
2315
2901
|
* cookie as well as in `stateStorage`, so the server renders with them and the page does not swap them in after
|
|
@@ -2317,6 +2903,51 @@ declare type Schema = {
|
|
|
2317
2903
|
* `keepState`; a key cannot be both painted and transient. Top-level keys, as `setState` writes them.
|
|
2318
2904
|
*/
|
|
2319
2905
|
paintedState?: string[];
|
|
2906
|
+
/**
|
|
2907
|
+
* The space's `/robots.txt`, as search engines read it: what they may crawl, and where its sitemap is. Left out, the
|
|
2908
|
+
* server answers that everything may be — `User-agent: *` then `Allow: /`. A page kept out of search says it on the
|
|
2909
|
+
* page (`robots: 'noindex'`): a crawler barred from a page by this file never reads that page's own word.
|
|
2910
|
+
*/
|
|
2911
|
+
robotsTxt?: string;
|
|
2912
|
+
/**
|
|
2913
|
+
* Keeps the crawlers that gather pages to train AI models (`AI_CRAWLERS`: GPTBot, ClaudeBot, Google-Extended…) out of
|
|
2914
|
+
* the whole site: `/robots.txt` says `Disallow: /` to each, after whatever `robotsTxt` says. Search engines keep
|
|
2915
|
+
* reading it. Left out, nobody is kept out.
|
|
2916
|
+
*/
|
|
2917
|
+
blockAiCrawlers?: boolean;
|
|
2918
|
+
/**
|
|
2919
|
+
* A move from page to page drawn as one view becoming the next (the browser's view transitions): the pages cross-fade,
|
|
2920
|
+
* and an element named the same on both by CSS — `view-transition-name: fighter-portrait` — moves from where it was
|
|
2921
|
+
* to where it lands. Where the browser has none, or the visitor asks for less motion, the page changes at once.
|
|
2922
|
+
*/
|
|
2923
|
+
viewTransitions?: boolean;
|
|
2924
|
+
/**
|
|
2925
|
+
* The site's name where a link to it is shown — a chat's preview, a search result — beside each page's own title
|
|
2926
|
+
* (`og:site_name`).
|
|
2927
|
+
*/
|
|
2928
|
+
siteName?: string;
|
|
2929
|
+
/**
|
|
2930
|
+
* The page of the space a page withheld from its visitor shows instead of the platform's refusal — by its id: drawn
|
|
2931
|
+
* inside the withheld page's own layout and sent with the same 401 or 403; `auth.isAuthenticated` tells "sign in" from "not
|
|
2932
|
+
* yours" there, as on any page. Left out, the platform's few words. A page with an `access` of its own cannot be it.
|
|
2933
|
+
*/
|
|
2934
|
+
withheldPage?: string;
|
|
2935
|
+
/** The language its pages are written in, as a language tag (`en`, `es-MX`): `<html lang>` and `og:locale`. */
|
|
2936
|
+
language?: string;
|
|
2937
|
+
/** The tab's icon: a file of the site (`/favicon.svg`) or an address (`https://…`). Left out, Plitzi's. */
|
|
2938
|
+
favicon?: string;
|
|
2939
|
+
/**
|
|
2940
|
+
* The picture a link to a page shows when the page names none of its own — a chat's preview card, a post. A file of
|
|
2941
|
+
* the site or an address, about 1200×630; each page's `seoImage` wins over it.
|
|
2942
|
+
*/
|
|
2943
|
+
shareImage?: string;
|
|
2944
|
+
/**
|
|
2945
|
+
* The colour a phone's browser paints around the page (`<meta name="theme-color">`): one colour, or one a scheme.
|
|
2946
|
+
*/
|
|
2947
|
+
themeColor?: string | {
|
|
2948
|
+
light?: string;
|
|
2949
|
+
dark?: string;
|
|
2950
|
+
};
|
|
2320
2951
|
customCss: string;
|
|
2321
2952
|
/**
|
|
2322
2953
|
* The roles a signed-in visitor may hold in this space, each with the permissions it gives:
|
|
@@ -2334,6 +2965,8 @@ declare type Schema = {
|
|
|
2334
2965
|
userUrl?: string;
|
|
2335
2966
|
refreshUrl?: string;
|
|
2336
2967
|
logoutUrl?: string;
|
|
2968
|
+
/** Where the person's sessions end on every device (`{ scope }` posted): `authLogoutEverywhere`'s, for `basic`. */
|
|
2969
|
+
revokeUrl?: string;
|
|
2337
2970
|
detailsPath?: string;
|
|
2338
2971
|
tokenPath?: string;
|
|
2339
2972
|
refreshTokenPath?: string;
|
|
@@ -2553,6 +3186,12 @@ declare interface SpaceSpec {
|
|
|
2553
3186
|
* element's source (a list row, a provider) is not readable here: bind that on the element.
|
|
2554
3187
|
*/
|
|
2555
3188
|
computed?: Record<string, string>;
|
|
3189
|
+
/**
|
|
3190
|
+
* The space's own tests, kept in its document: `unit` — an element resolved for a state, no browser — and
|
|
3191
|
+
* `e2e` — a visitor's steps on a page. Written with `unit.test(…)` and `e2e.test(…)`; run by `plitzi test`, and a
|
|
3192
|
+
* snapshot and a publish wait for them.
|
|
3193
|
+
*/
|
|
3194
|
+
tests?: SpaceTests;
|
|
2556
3195
|
/**
|
|
2557
3196
|
* Templates by name, for what an element shows of its data: `formats: { price: "{{ source|currency('USD') }}" }`
|
|
2558
3197
|
* once, then `text({ from: 'products.item.price', as: 'price' })` anywhere. `source` is the value `from` reads.
|
|
@@ -2601,7 +3240,7 @@ declare interface SpaceSpec {
|
|
|
2601
3240
|
* state is kept. `customCss` above is the one field of that same object every space sets, and it stays named on
|
|
2602
3241
|
* its own for that reason; these are the rest, spread over it.
|
|
2603
3242
|
*/
|
|
2604
|
-
settings?: Partial<Omit<Schema['settings'], 'customCss'>>;
|
|
3243
|
+
settings?: Partial<Omit<Schema['settings'], 'customCss' | 'computed' | 'channels'>>;
|
|
2605
3244
|
/**
|
|
2606
3245
|
* Server-resolved data for this space's `runtime: 'server'` elements: on unless a space turns it off. Left out,
|
|
2607
3246
|
* authoring writes `{ enabled: true }` for a space that has a server element; `{ enabled: false }` with one is warned
|
|
@@ -2627,6 +3266,23 @@ declare interface SpaceSpec {
|
|
|
2627
3266
|
pages: PageSpec[];
|
|
2628
3267
|
}
|
|
2629
3268
|
|
|
3269
|
+
/**
|
|
3270
|
+
* A space's tests, kept in its document beside its pages — written in the builder, by code or by an agent —
|
|
3271
|
+
* and run against the document they are kept in: a snapshot and a publish need them passing.
|
|
3272
|
+
*
|
|
3273
|
+
* Two kinds, apart on purpose:
|
|
3274
|
+
*
|
|
3275
|
+
* - **unit**: one element of the document resolved for a state and data, with no browser — what its bindings, templates
|
|
3276
|
+
* and rules make of it. Milliseconds.
|
|
3277
|
+
* - **e2e**: a page opened in a browser, a visitor's steps, and what must hold as they go — the flows.
|
|
3278
|
+
*/
|
|
3279
|
+
declare interface SpaceTests {
|
|
3280
|
+
unit?: UnitTest[];
|
|
3281
|
+
e2e?: E2eTest[];
|
|
3282
|
+
/** Who the journeys may play as, signed in: declared here alone — see `E2eAccount`. */
|
|
3283
|
+
accounts?: E2eAccount[];
|
|
3284
|
+
}
|
|
3285
|
+
|
|
2630
3286
|
/** Fields the builder shows but the runtime does not read. */
|
|
2631
3287
|
declare interface SpecMeta {
|
|
2632
3288
|
/**
|
|
@@ -2673,6 +3329,9 @@ declare interface StepSpec {
|
|
|
2673
3329
|
whileRunning?: ElementInteraction['whileRunning'];
|
|
2674
3330
|
}
|
|
2675
3331
|
|
|
3332
|
+
/** One JSON-LD object: `{ '@context': 'https://schema.org', '@type': 'SportsEvent', … }`. */
|
|
3333
|
+
declare type StructuredData = Record<string, unknown>;
|
|
3334
|
+
|
|
2676
3335
|
declare type Style = {
|
|
2677
3336
|
platform: Record<DisplayMode, Record<string, StyleItem>>;
|
|
2678
3337
|
mode?: StyleMode;
|
|
@@ -2814,6 +3473,7 @@ declare const styleConstants: {
|
|
|
2814
3473
|
readonly BORDER_TOP_RIGHT_RADIUS: "border-top-right-radius";
|
|
2815
3474
|
readonly BORDER_BOTTOM_LEFT_RADIUS: "border-bottom-left-radius";
|
|
2816
3475
|
readonly BORDER_BOTTOM_RIGHT_RADIUS: "border-bottom-right-radius";
|
|
3476
|
+
readonly BORDER_IMAGE: "border-image";
|
|
2817
3477
|
readonly BORDER_COLLAPSE: "border-collapse";
|
|
2818
3478
|
readonly BORDER_SPACING: "border-spacing";
|
|
2819
3479
|
readonly TABLE_LAYOUT: "table-layout";
|
|
@@ -2853,6 +3513,7 @@ declare const styleConstants: {
|
|
|
2853
3513
|
readonly PERSPECTIVE_ORIGIN: "perspective-origin";
|
|
2854
3514
|
readonly BACKFACE_VISIBILITY: "backface-visibility";
|
|
2855
3515
|
readonly WILL_CHANGE: "will-change";
|
|
3516
|
+
readonly VIEW_TRANSITION_NAME: "view-transition-name";
|
|
2856
3517
|
readonly OUTLINE_WIDTH: "outline-width";
|
|
2857
3518
|
readonly OUTLINE_STYLE: "outline-style";
|
|
2858
3519
|
readonly OUTLINE_COLOR: "outline-color";
|
|
@@ -2864,11 +3525,19 @@ declare const styleConstants: {
|
|
|
2864
3525
|
readonly APPEARANCE: "appearance";
|
|
2865
3526
|
readonly SCROLL_BEHAVIOR: "scroll-behavior";
|
|
2866
3527
|
readonly OVERSCROLL_BEHAVIOR: "overscroll-behavior";
|
|
3528
|
+
readonly OVERSCROLL_BEHAVIOR_X: "overscroll-behavior-x";
|
|
3529
|
+
readonly OVERSCROLL_BEHAVIOR_Y: "overscroll-behavior-y";
|
|
2867
3530
|
readonly SCROLL_SNAP_TYPE: "scroll-snap-type";
|
|
2868
3531
|
readonly SCROLL_SNAP_ALIGN: "scroll-snap-align";
|
|
2869
3532
|
readonly SCROLL_SNAP_STOP: "scroll-snap-stop";
|
|
2870
3533
|
readonly SCROLL_PADDING_TOP: "scroll-padding-top";
|
|
3534
|
+
readonly SCROLL_PADDING_RIGHT: "scroll-padding-right";
|
|
3535
|
+
readonly SCROLL_PADDING_BOTTOM: "scroll-padding-bottom";
|
|
3536
|
+
readonly SCROLL_PADDING_LEFT: "scroll-padding-left";
|
|
2871
3537
|
readonly SCROLL_MARGIN_TOP: "scroll-margin-top";
|
|
3538
|
+
readonly SCROLL_MARGIN_RIGHT: "scroll-margin-right";
|
|
3539
|
+
readonly SCROLL_MARGIN_BOTTOM: "scroll-margin-bottom";
|
|
3540
|
+
readonly SCROLL_MARGIN_LEFT: "scroll-margin-left";
|
|
2872
3541
|
readonly ACCENT_COLOR: "accent-color";
|
|
2873
3542
|
readonly CARET_COLOR: "caret-color";
|
|
2874
3543
|
readonly COLOR_SCHEME: "color-scheme";
|
|
@@ -3031,6 +3700,8 @@ declare interface Suggestion {
|
|
|
3031
3700
|
saves: number;
|
|
3032
3701
|
/** Where the first of them was written: `src/space/pages/home.ts:42`. Absent when no factory wrote it. */
|
|
3033
3702
|
at?: string;
|
|
3703
|
+
/** Where the others were written, each place once and none of them `at`: lint names them beside it. */
|
|
3704
|
+
elsewhere?: string[];
|
|
3034
3705
|
/**
|
|
3035
3706
|
* The declarations a suggestion about the stylesheet or the components is about — the classes, tokens or components
|
|
3036
3707
|
* it names — so whoever reports only what is new (the MCP, after a batch) can tell a new one from those said before.
|
|
@@ -3060,6 +3731,59 @@ declare type TagType = 'class' | 'element' | 'id';
|
|
|
3060
3731
|
|
|
3061
3732
|
declare type Theme = 'dark' | 'light' | 'system';
|
|
3062
3733
|
|
|
3734
|
+
/** What must hold of the element a unit test resolves. */
|
|
3735
|
+
declare type UnitExpectation =
|
|
3736
|
+
/** It shows: neither it nor an element around it hidden. */
|
|
3737
|
+
{
|
|
3738
|
+
kind: 'visible';
|
|
3739
|
+
value: boolean;
|
|
3740
|
+
}
|
|
3741
|
+
/** An attribute, bindings and templates applied: `content`, `href`, `items`. */
|
|
3742
|
+
| {
|
|
3743
|
+
kind: 'attribute';
|
|
3744
|
+
name: string;
|
|
3745
|
+
value: unknown;
|
|
3746
|
+
}
|
|
3747
|
+
/** A property its style bindings write, as CSS names it: `height`, `background-color`. */
|
|
3748
|
+
| {
|
|
3749
|
+
kind: 'style';
|
|
3750
|
+
property: string;
|
|
3751
|
+
value: string;
|
|
3752
|
+
}
|
|
3753
|
+
/** The variant of one of its classes: `pr-rung` is `current`. An empty value is its base. */
|
|
3754
|
+
| {
|
|
3755
|
+
kind: 'variant';
|
|
3756
|
+
className: string;
|
|
3757
|
+
value: string;
|
|
3758
|
+
}
|
|
3759
|
+
/** A key of its initial state, bindings applied: `visibility`, `checked`. */
|
|
3760
|
+
| {
|
|
3761
|
+
kind: 'state';
|
|
3762
|
+
key: string;
|
|
3763
|
+
value: unknown;
|
|
3764
|
+
};
|
|
3765
|
+
|
|
3766
|
+
/** What a unit test resolves its element for. */
|
|
3767
|
+
declare interface UnitGiven {
|
|
3768
|
+
/** The space's state — what `state.<key>` reads. */
|
|
3769
|
+
state?: Record<string, unknown>;
|
|
3770
|
+
/**
|
|
3771
|
+
* Every other source, by its name: an element's (`list_bins` — a list's row is `{ item, index }` —,
|
|
3772
|
+
* `apiContainer_feed`) or a global's (`navigation`, `auth`, `theme`, `flags`, `variables`, `host`). The space's
|
|
3773
|
+
* `computed` values are worked out from them and the state.
|
|
3774
|
+
*/
|
|
3775
|
+
sources?: Record<string, unknown>;
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3778
|
+
declare interface UnitTest {
|
|
3779
|
+
id: string;
|
|
3780
|
+
title: string;
|
|
3781
|
+
/** The element of a page it resolves, by id. */
|
|
3782
|
+
element: string;
|
|
3783
|
+
given?: UnitGiven;
|
|
3784
|
+
expect: UnitExpectation[];
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3063
3787
|
/** One variant of a selector: what it changes, and how it reacts on its own. A variant cannot carry variants. */
|
|
3064
3788
|
declare interface VariantSpec {
|
|
3065
3789
|
css?: CssSpec;
|