@plitzi/sdk-authoring 0.39.1 → 0.39.3
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 +11 -0
- package/dist/index-declare.js +1 -2
- package/dist/index-src.js +2838 -3613
- package/dist/index.d.ts +100 -29
- package/dist/node.d.ts +44 -6
- package/dist/node.js +161 -145
- package/dist/plugin.d.ts +5 -0
- package/package.json +12 -12
- package/skills/plitzi-authoring/recipes/server-data.ts +4 -0
- package/skills/plitzi-authoring/reference/accessibility.md +6 -2
- package/skills/plitzi-authoring/reference/auth.md +6 -1
- package/skills/plitzi-authoring/reference/authoring-errors.md +3 -2
- package/skills/plitzi-authoring/reference/lists.md +7 -1
package/dist/index.d.ts
CHANGED
|
@@ -168,6 +168,14 @@ export declare type ActionLimits = {
|
|
|
168
168
|
* response rather than per run, because it exists to stop one answer from being unbounded. 5 000 000 by default.
|
|
169
169
|
*/
|
|
170
170
|
maxResponseBytes?: number;
|
|
171
|
+
/**
|
|
172
|
+
* Bytes all of one run's outbound responses may carry back together: 10 000 000 by default.
|
|
173
|
+
*
|
|
174
|
+
* `maxResponseBytes` bounds one answer; a flow that reads twenty answers just under it holds twenty of them, and a
|
|
175
|
+
* parsed answer holds several times its size in memory. Counted as the answers stream in, across every request the
|
|
176
|
+
* run makes, and refused the moment they go over — the run fails as `over_capacity`, naming this ceiling.
|
|
177
|
+
*/
|
|
178
|
+
maxRunBytes?: number;
|
|
171
179
|
};
|
|
172
180
|
|
|
173
181
|
/** What an `apiContainer` fed by a server action publishes: the action's output at its root, beside its state. */
|
|
@@ -275,7 +283,7 @@ export declare interface ActionStepSpec {
|
|
|
275
283
|
}
|
|
276
284
|
|
|
277
285
|
/**
|
|
278
|
-
* A task of the space's own as `taskAction` reads it — what a `FunctionTask` of `@plitzi/sdk-
|
|
286
|
+
* A task of the space's own as `taskAction` reads it — what a `FunctionTask` of `@plitzi/sdk-runtime` is, and
|
|
279
287
|
* only what a way into it needs: its address, its words and its params. Structural, so any task is one.
|
|
280
288
|
*/
|
|
281
289
|
export declare interface ActionTask {
|
|
@@ -486,10 +494,10 @@ export declare interface AnsweredRoute {
|
|
|
486
494
|
export declare const apiContainer: {
|
|
487
495
|
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
488
496
|
when?: RuleGroup | undefined;
|
|
489
|
-
action?: string | undefined;
|
|
490
497
|
cache?: boolean | undefined;
|
|
491
498
|
endpoint?: string | undefined;
|
|
492
499
|
input?: (Record<string, unknown> | string) | undefined;
|
|
500
|
+
action?: string | undefined;
|
|
493
501
|
method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
|
|
494
502
|
resource?: string | undefined;
|
|
495
503
|
headers?: Record<string, string> | undefined;
|
|
@@ -517,10 +525,10 @@ export declare const apiContainer: {
|
|
|
517
525
|
}>> | undefined): ElementSpec;
|
|
518
526
|
(props?: ElementProps<Partial<{
|
|
519
527
|
when?: RuleGroup | undefined;
|
|
520
|
-
action?: string | undefined;
|
|
521
528
|
cache?: boolean | undefined;
|
|
522
529
|
endpoint?: string | undefined;
|
|
523
530
|
input?: (Record<string, unknown> | string) | undefined;
|
|
531
|
+
action?: string | undefined;
|
|
524
532
|
method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
|
|
525
533
|
resource?: string | undefined;
|
|
526
534
|
headers?: Record<string, string> | undefined;
|
|
@@ -768,6 +776,11 @@ export declare const authorFlows: (flows: StepSpec[][], host?: string) => Record
|
|
|
768
776
|
|
|
769
777
|
/** Every code authoring and its lint answer with — what each means and what to write instead: `plitzi explain <code>`. */
|
|
770
778
|
export declare const AUTHORING_CODES: {
|
|
779
|
+
readonly 'heading-level-skipped': {
|
|
780
|
+
readonly kind: "suggested";
|
|
781
|
+
readonly means: "an `h4` right after an `h2` on a page as it is drawn — inside its layouts, with the headings a `markdown` writes, and without those that start hidden (`visible: false`): the outline misses a level (Lighthouse: \"not in a sequentially-descending order\")";
|
|
782
|
+
readonly fix: "the next level down; size it with its class";
|
|
783
|
+
};
|
|
771
784
|
readonly 'repeated-on-pages': {
|
|
772
785
|
readonly kind: "suggested";
|
|
773
786
|
readonly means: "the same block — a header, a footer, a side panel — written into several pages";
|
|
@@ -888,11 +901,6 @@ export declare const AUTHORING_CODES: {
|
|
|
888
901
|
readonly means: "a click flow on a container, text, heading, image or list item — no keyboard reaches it";
|
|
889
902
|
readonly fix: "the flow on a `button` (it holds children) or a `link`";
|
|
890
903
|
};
|
|
891
|
-
readonly 'heading-level-skipped': {
|
|
892
|
-
readonly kind: "warned";
|
|
893
|
-
readonly means: "an `h4` right after an `h2` — the outline misses a level";
|
|
894
|
-
readonly fix: "the next level down; size it with its class";
|
|
895
|
-
};
|
|
896
904
|
readonly 'label-ignored': {
|
|
897
905
|
readonly kind: "warned";
|
|
898
906
|
readonly means: "a `label` on a container whose tag is named by what it holds (`li`, a heading)";
|
|
@@ -1490,7 +1498,7 @@ export declare const AUTHORING_CODES: {
|
|
|
1490
1498
|
};
|
|
1491
1499
|
readonly 'server-query-unresolved': {
|
|
1492
1500
|
readonly kind: "refused";
|
|
1493
|
-
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
|
|
1501
|
+
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, `navigation` and the state the space paints, `state.<key>`), another method than GET, or neither an address (`https://…`) nor a path (`/…`) — so it draws empty";
|
|
1494
1502
|
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";
|
|
1495
1503
|
};
|
|
1496
1504
|
readonly 'server-when-unknown': {
|
|
@@ -1878,6 +1886,11 @@ export declare const AUTHORING_CODES: {
|
|
|
1878
1886
|
readonly means: "a page that sends visitors it is not for to a page the space does not have";
|
|
1879
1887
|
readonly fix: "a page's id or slug (`''` is the home page), or a full URL";
|
|
1880
1888
|
};
|
|
1889
|
+
readonly 'when-refused-conflict': {
|
|
1890
|
+
readonly kind: "refused";
|
|
1891
|
+
readonly means: "a page's `whenRefused: 'notFound'` beside `unauthorizedRedirect`, or on a page nobody is refused";
|
|
1892
|
+
readonly fix: "keep the redirect or the not found; give the page `access` or `accessLevel: 'authenticated'`";
|
|
1893
|
+
};
|
|
1881
1894
|
readonly 'robots-unknown': {
|
|
1882
1895
|
readonly kind: "refused";
|
|
1883
1896
|
readonly means: "a page's `robots` with a directive no search engine reads, or none";
|
|
@@ -2725,26 +2738,32 @@ export declare type ChannelDeclarations = Record<string, ChannelDeclaration>;
|
|
|
2725
2738
|
|
|
2726
2739
|
export declare const chart: {
|
|
2727
2740
|
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
2728
|
-
format?: "number" | "percent" | "compact" | undefined;
|
|
2729
2741
|
kind?: "bar" | "line" | "area" | "donut" | undefined;
|
|
2742
|
+
format?: "number" | "percent" | "compact" | undefined;
|
|
2743
|
+
sync?: string | undefined;
|
|
2730
2744
|
label?: string | undefined;
|
|
2731
2745
|
max?: number | undefined;
|
|
2732
2746
|
items?: unknown;
|
|
2733
2747
|
height?: number | undefined;
|
|
2734
2748
|
labelField?: string | undefined;
|
|
2735
2749
|
valueField?: string | undefined;
|
|
2750
|
+
titleField?: string | undefined;
|
|
2751
|
+
series?: unknown;
|
|
2736
2752
|
showValues?: boolean | undefined;
|
|
2737
2753
|
emptyText?: string | undefined;
|
|
2738
2754
|
}>> | undefined): ElementSpec;
|
|
2739
2755
|
(props?: ElementProps<Partial<{
|
|
2740
|
-
format?: "number" | "percent" | "compact" | undefined;
|
|
2741
2756
|
kind?: "bar" | "line" | "area" | "donut" | undefined;
|
|
2757
|
+
format?: "number" | "percent" | "compact" | undefined;
|
|
2758
|
+
sync?: string | undefined;
|
|
2742
2759
|
label?: string | undefined;
|
|
2743
2760
|
max?: number | undefined;
|
|
2744
2761
|
items?: unknown;
|
|
2745
2762
|
height?: number | undefined;
|
|
2746
2763
|
labelField?: string | undefined;
|
|
2747
2764
|
valueField?: string | undefined;
|
|
2765
|
+
titleField?: string | undefined;
|
|
2766
|
+
series?: unknown;
|
|
2748
2767
|
showValues?: boolean | undefined;
|
|
2749
2768
|
emptyText?: string | undefined;
|
|
2750
2769
|
}>> | undefined): ElementSpec;
|
|
@@ -2809,6 +2828,8 @@ export declare const column: (gap: string, extra?: CssProps) => StyleRules;
|
|
|
2809
2828
|
|
|
2810
2829
|
declare type Combinator = 'and' | 'or';
|
|
2811
2830
|
|
|
2831
|
+
declare type Combinator_2 = 'and' | 'or';
|
|
2832
|
+
|
|
2812
2833
|
/**
|
|
2813
2834
|
* An SVG as it is worth carrying in a space: what a design tool wrote for itself taken out — the XML prolog and doctype,
|
|
2814
2835
|
* comments, `<metadata>`, an editor's own elements and attributes (Inkscape, Sodipodi, Sketch, Figma's `data-name`) —
|
|
@@ -3895,7 +3916,7 @@ export declare const elementAttributeNames: {
|
|
|
3895
3916
|
readonly carousel: readonly ["autoplay", "itemKey", "items", "label", "loop", "mode", "pauseOnHover", "speed", "transition"];
|
|
3896
3917
|
readonly carouselTrack: readonly [];
|
|
3897
3918
|
readonly channel: readonly ["grant", "keep", "presence", "subType", "topic"];
|
|
3898
|
-
readonly chart: readonly ["emptyText", "format", "height", "items", "kind", "label", "labelField", "max", "showValues", "valueField"];
|
|
3919
|
+
readonly chart: readonly ["emptyText", "format", "height", "items", "kind", "label", "labelField", "max", "series", "showValues", "sync", "titleField", "valueField"];
|
|
3899
3920
|
readonly container: readonly ["decorative", "label", "live", "open", "subType", "title"];
|
|
3900
3921
|
readonly custom: null;
|
|
3901
3922
|
readonly dialogContainer: readonly ["acceptButtonLabel", "acceptButtonLabelLoading", "autoHideAfterClick", "headerLabel", "rejectButtonLabel"];
|
|
@@ -3957,7 +3978,7 @@ export declare type ElementBinding = {
|
|
|
3957
3978
|
id: string;
|
|
3958
3979
|
source: string;
|
|
3959
3980
|
transformers?: BindingTransformer[];
|
|
3960
|
-
when?:
|
|
3981
|
+
when?: RuleGroup_2;
|
|
3961
3982
|
enabled?: boolean;
|
|
3962
3983
|
to: string;
|
|
3963
3984
|
};
|
|
@@ -4304,10 +4325,10 @@ declare const elementDeclarations: {
|
|
|
4304
4325
|
};
|
|
4305
4326
|
}, Partial<{
|
|
4306
4327
|
when?: RuleGroup | undefined;
|
|
4307
|
-
action?: string | undefined;
|
|
4308
4328
|
cache?: boolean | undefined;
|
|
4309
4329
|
endpoint?: string | undefined;
|
|
4310
4330
|
input?: (Record<string, unknown> | string) | undefined;
|
|
4331
|
+
action?: string | undefined;
|
|
4311
4332
|
method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
|
|
4312
4333
|
resource?: string | undefined;
|
|
4313
4334
|
headers?: Record<string, string> | undefined;
|
|
@@ -5360,10 +5381,10 @@ declare const elementDeclarations: {
|
|
|
5360
5381
|
};
|
|
5361
5382
|
}, Partial<{
|
|
5362
5383
|
title?: string | undefined;
|
|
5363
|
-
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
5364
5384
|
src?: string | undefined;
|
|
5365
5385
|
allow?: string | undefined;
|
|
5366
5386
|
loading?: "lazy" | "eager" | undefined;
|
|
5387
|
+
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
5367
5388
|
sandbox?: string | undefined;
|
|
5368
5389
|
}>>;
|
|
5369
5390
|
readonly FontAwesome: DeclaredElement< {
|
|
@@ -6468,10 +6489,10 @@ declare const elementDeclarations: {
|
|
|
6468
6489
|
width?: number | undefined;
|
|
6469
6490
|
resize?: boolean | undefined;
|
|
6470
6491
|
height?: number | undefined;
|
|
6471
|
-
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
6472
6492
|
sizes?: string | undefined;
|
|
6473
6493
|
src?: string | undefined;
|
|
6474
6494
|
alt?: string | undefined;
|
|
6495
|
+
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
6475
6496
|
decorative?: boolean | undefined;
|
|
6476
6497
|
loadMode?: "auto" | "eager" | "lazy" | undefined;
|
|
6477
6498
|
}>>;
|
|
@@ -7595,6 +7616,9 @@ declare const elementDeclarations: {
|
|
|
7595
7616
|
readonly kind: "bar";
|
|
7596
7617
|
readonly labelField: "label";
|
|
7597
7618
|
readonly valueField: "value";
|
|
7619
|
+
readonly series: "";
|
|
7620
|
+
readonly titleField: "";
|
|
7621
|
+
readonly sync: "";
|
|
7598
7622
|
readonly label: "";
|
|
7599
7623
|
readonly format: "number";
|
|
7600
7624
|
readonly showValues: false;
|
|
@@ -7616,6 +7640,7 @@ declare const elementDeclarations: {
|
|
|
7616
7640
|
readonly axisLabel: "";
|
|
7617
7641
|
readonly valueLabel: "";
|
|
7618
7642
|
readonly legend: "";
|
|
7643
|
+
readonly tooltip: "";
|
|
7619
7644
|
readonly empty: "";
|
|
7620
7645
|
};
|
|
7621
7646
|
};
|
|
@@ -7697,8 +7722,8 @@ declare const elementDeclarations: {
|
|
|
7697
7722
|
readonly 'row-gap': "4px";
|
|
7698
7723
|
readonly 'list-style-type': "none";
|
|
7699
7724
|
readonly 'padding-left': "0px";
|
|
7700
|
-
readonly 'margin-top': "
|
|
7701
|
-
readonly 'font-size': "
|
|
7725
|
+
readonly 'margin-top': "8px";
|
|
7726
|
+
readonly 'font-size': "12px";
|
|
7702
7727
|
};
|
|
7703
7728
|
};
|
|
7704
7729
|
readonly empty: {
|
|
@@ -7711,14 +7736,17 @@ declare const elementDeclarations: {
|
|
|
7711
7736
|
};
|
|
7712
7737
|
};
|
|
7713
7738
|
}, Partial<{
|
|
7714
|
-
format?: "number" | "percent" | "compact" | undefined;
|
|
7715
7739
|
kind?: "bar" | "line" | "area" | "donut" | undefined;
|
|
7740
|
+
format?: "number" | "percent" | "compact" | undefined;
|
|
7741
|
+
sync?: string | undefined;
|
|
7716
7742
|
label?: string | undefined;
|
|
7717
7743
|
max?: number | undefined;
|
|
7718
7744
|
items?: unknown;
|
|
7719
7745
|
height?: number | undefined;
|
|
7720
7746
|
labelField?: string | undefined;
|
|
7721
7747
|
valueField?: string | undefined;
|
|
7748
|
+
titleField?: string | undefined;
|
|
7749
|
+
series?: unknown;
|
|
7722
7750
|
showValues?: boolean | undefined;
|
|
7723
7751
|
emptyText?: string | undefined;
|
|
7724
7752
|
}>>;
|
|
@@ -8203,7 +8231,7 @@ export declare type ElementInteraction<T extends Record<string, unknown> = Recor
|
|
|
8203
8231
|
afterNode: string;
|
|
8204
8232
|
flowId: string;
|
|
8205
8233
|
enabled: boolean;
|
|
8206
|
-
when?:
|
|
8234
|
+
when?: RuleGroup_2;
|
|
8207
8235
|
/** On a trigger only: what a firing does while this flow is still running. `skip` when absent. */
|
|
8208
8236
|
whileRunning?: WhileRunning;
|
|
8209
8237
|
};
|
|
@@ -8528,18 +8556,18 @@ export declare const elementTypeNames: string[];
|
|
|
8528
8556
|
export declare const embed: {
|
|
8529
8557
|
(children: ElementSpec[], props?: ElementProps<Partial<{
|
|
8530
8558
|
title?: string | undefined;
|
|
8531
|
-
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
8532
8559
|
src?: string | undefined;
|
|
8533
8560
|
allow?: string | undefined;
|
|
8534
8561
|
loading?: "lazy" | "eager" | undefined;
|
|
8562
|
+
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
8535
8563
|
sandbox?: string | undefined;
|
|
8536
8564
|
}>> | undefined): ElementSpec;
|
|
8537
8565
|
(props?: ElementProps<Partial<{
|
|
8538
8566
|
title?: string | undefined;
|
|
8539
|
-
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
8540
8567
|
src?: string | undefined;
|
|
8541
8568
|
allow?: string | undefined;
|
|
8542
8569
|
loading?: "lazy" | "eager" | undefined;
|
|
8570
|
+
referrerPolicy?: "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "no-referrer-when-downgrade" | undefined;
|
|
8543
8571
|
sandbox?: string | undefined;
|
|
8544
8572
|
}>> | undefined): ElementSpec;
|
|
8545
8573
|
};
|
|
@@ -8898,7 +8926,8 @@ export declare const formControl: {
|
|
|
8898
8926
|
|
|
8899
8927
|
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
8900
8928
|
declare type FormControlAttributes = AuthorableAttributes<FormControlProps, 'value' | 'error' | 'handleChange' | 'handleValidate'> & {
|
|
8901
|
-
|
|
8929
|
+
/** Text, or a number bound to it, which the field shows as its digits. */
|
|
8930
|
+
defaultValue?: string | number;
|
|
8902
8931
|
/** Read by `withFieldValue`, not by the component: shows the control in its error state while editing. */
|
|
8903
8932
|
previewError?: boolean;
|
|
8904
8933
|
};
|
|
@@ -9091,10 +9120,10 @@ export declare const image: {
|
|
|
9091
9120
|
width?: number | undefined;
|
|
9092
9121
|
resize?: boolean | undefined;
|
|
9093
9122
|
height?: number | undefined;
|
|
9094
|
-
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
9095
9123
|
sizes?: string | undefined;
|
|
9096
9124
|
src?: string | undefined;
|
|
9097
9125
|
alt?: string | undefined;
|
|
9126
|
+
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
9098
9127
|
decorative?: boolean | undefined;
|
|
9099
9128
|
loadMode?: "auto" | "eager" | "lazy" | undefined;
|
|
9100
9129
|
}>> | undefined): ElementSpec;
|
|
@@ -9102,10 +9131,10 @@ export declare const image: {
|
|
|
9102
9131
|
width?: number | undefined;
|
|
9103
9132
|
resize?: boolean | undefined;
|
|
9104
9133
|
height?: number | undefined;
|
|
9105
|
-
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
9106
9134
|
sizes?: string | undefined;
|
|
9107
9135
|
src?: string | undefined;
|
|
9108
9136
|
alt?: string | undefined;
|
|
9137
|
+
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
9109
9138
|
decorative?: boolean | undefined;
|
|
9110
9139
|
loadMode?: "auto" | "eager" | "lazy" | undefined;
|
|
9111
9140
|
}>> | undefined): ElementSpec;
|
|
@@ -10479,6 +10508,8 @@ export declare interface OpenPageOptions {
|
|
|
10479
10508
|
|
|
10480
10509
|
declare type Operator = '' | '=' | '!=' | '<' | '>' | '<=' | '>=' | 'contains' | 'doesNotContain' | 'beginsWith' | 'doesNotBeginWith' | 'endsWith' | 'doesNotEndWith' | 'empty' | 'notEmpty' | 'in' | 'notIn' | 'between' | 'notBetween';
|
|
10481
10510
|
|
|
10511
|
+
declare type Operator_2 = '' | '=' | '!=' | '<' | '>' | '<=' | '>=' | 'contains' | 'doesNotContain' | 'beginsWith' | 'doesNotBeginWith' | 'endsWith' | 'doesNotEndWith' | 'empty' | 'notEmpty' | 'in' | 'notIn' | 'between' | 'notBetween';
|
|
10512
|
+
|
|
10482
10513
|
/** How many layers a page is read for: enough for a long, dressed page, few enough to stay quick. */
|
|
10483
10514
|
export declare const PAGE_DECORATION_LIMIT = 3000;
|
|
10484
10515
|
|
|
@@ -10781,6 +10812,13 @@ export declare interface PageSpec {
|
|
|
10781
10812
|
access?: {
|
|
10782
10813
|
permissions: string[];
|
|
10783
10814
|
};
|
|
10815
|
+
/**
|
|
10816
|
+
* What a visitor this page is not for is answered — by `accessLevel` or `access` — when it is not sent elsewhere
|
|
10817
|
+
* (`unauthorizedRedirect`). Unsaid, its refusal: 401 or 403 and `settings.withheldPage`. `'notFound'` answers as if
|
|
10818
|
+
* it did not exist — the space's 404 — and sends nothing of it, not its name nor its path: a back-office, whose
|
|
10819
|
+
* refusal would tell whoever probes the path that something is there. The builder's "Unauthorized Behaviour".
|
|
10820
|
+
*/
|
|
10821
|
+
whenRefused?: 'refusal' | 'notFound';
|
|
10784
10822
|
/**
|
|
10785
10823
|
* Where a visitor this page is not for is sent — a page's id or slug (`login`; `''` is the home page), its path, or a
|
|
10786
10824
|
* full URL for somewhere off this space. Resolved to the page's id, and refused when it names no page.
|
|
@@ -11707,6 +11745,19 @@ export declare interface RowProfile {
|
|
|
11707
11745
|
export declare type RowWriter<Row> = (row: Row) => ElementSpec | ElementSpec[];
|
|
11708
11746
|
|
|
11709
11747
|
export declare type Rule = {
|
|
11748
|
+
id?: string;
|
|
11749
|
+
field: string;
|
|
11750
|
+
operator: Operator_2;
|
|
11751
|
+
enabled?: boolean;
|
|
11752
|
+
} & ({
|
|
11753
|
+
isBinding: true;
|
|
11754
|
+
value: string;
|
|
11755
|
+
} | {
|
|
11756
|
+
isBinding?: false;
|
|
11757
|
+
value: RuleValue_2;
|
|
11758
|
+
});
|
|
11759
|
+
|
|
11760
|
+
declare type Rule_2 = {
|
|
11710
11761
|
id?: string;
|
|
11711
11762
|
field: string;
|
|
11712
11763
|
operator: Operator;
|
|
@@ -11721,11 +11772,18 @@ export declare type Rule = {
|
|
|
11721
11772
|
|
|
11722
11773
|
export declare type RuleGroup = {
|
|
11723
11774
|
id?: string;
|
|
11724
|
-
combinator:
|
|
11775
|
+
combinator: Combinator_2;
|
|
11725
11776
|
rules: (Rule | RuleGroup)[];
|
|
11726
11777
|
enabled?: boolean;
|
|
11727
11778
|
};
|
|
11728
11779
|
|
|
11780
|
+
declare type RuleGroup_2 = {
|
|
11781
|
+
id?: string;
|
|
11782
|
+
combinator: Combinator;
|
|
11783
|
+
rules: (Rule_2 | RuleGroup_2)[];
|
|
11784
|
+
enabled?: boolean;
|
|
11785
|
+
};
|
|
11786
|
+
|
|
11729
11787
|
/** The keys of a rule set's object form: none is a CSS property. */
|
|
11730
11788
|
declare type RuleSetKey = keyof RuleSetSpec;
|
|
11731
11789
|
|
|
@@ -11755,8 +11813,15 @@ export declare interface RuleSetSpec extends VariantSpec {
|
|
|
11755
11813
|
conditions?: Record<string, ConditionSpec>;
|
|
11756
11814
|
}
|
|
11757
11815
|
|
|
11816
|
+
/**
|
|
11817
|
+
* A condition as Plitzi stores it — a flag's rules, an interaction's `when`, a binding's condition: the schema's own
|
|
11818
|
+
* format, so sdk-shared defines it (RFC 0032, D13). plitzi-ui's QueryBuilder edits the same shape with prop types of its
|
|
11819
|
+
* own, and a type test in the builder, where the two meet, holds them assignable both ways.
|
|
11820
|
+
*/
|
|
11758
11821
|
declare type RuleValue = Date | string | number | boolean | undefined | null | object;
|
|
11759
11822
|
|
|
11823
|
+
declare type RuleValue_2 = Date | string | number | boolean | undefined | null | object;
|
|
11824
|
+
|
|
11760
11825
|
/** One e2e test run on a page: opened, its steps played and held in turn, the first that fails the last played. */
|
|
11761
11826
|
export declare const runE2eTest: (page: E2ePage, test: E2eTest, options: E2eRunOptions) => Promise<E2eResult>;
|
|
11762
11827
|
|
|
@@ -12000,7 +12065,7 @@ export declare type SchemaFlag = {
|
|
|
12000
12065
|
|
|
12001
12066
|
/** A value a flag takes where its `when` matches. The first rule that matches decides. */
|
|
12002
12067
|
export declare type SchemaFlagRule = {
|
|
12003
|
-
when:
|
|
12068
|
+
when: RuleGroup_2;
|
|
12004
12069
|
value: boolean;
|
|
12005
12070
|
};
|
|
12006
12071
|
|
|
@@ -12050,7 +12115,7 @@ declare type SchemaVariableBase<TType extends string, TValue> = {
|
|
|
12050
12115
|
type: TType;
|
|
12051
12116
|
value: TValue;
|
|
12052
12117
|
subValues: {
|
|
12053
|
-
when:
|
|
12118
|
+
when: RuleGroup_2;
|
|
12054
12119
|
value: TValue;
|
|
12055
12120
|
}[];
|
|
12056
12121
|
};
|
|
@@ -12967,7 +13032,13 @@ export declare type Style = {
|
|
|
12967
13032
|
* because nothing else in the system loads a face. Optional because a document written before the manifest
|
|
12968
13033
|
* existed has none, and that is a real state every reader has to survive rather than a bug. */
|
|
12969
13034
|
fonts?: SpaceFont[];
|
|
13035
|
+
/** The compiled stylesheet. Empty on a server-rendered page that links it as `cacheHref` instead. */
|
|
12970
13036
|
cache: string;
|
|
13037
|
+
/**
|
|
13038
|
+
* Where a server-rendered page's stylesheet is served (`/_plitzi/style/<hash>.css`), when it links the compiled
|
|
13039
|
+
* stylesheet rather than carrying it: `cache` is then empty, and the page draws a `<link>` to this.
|
|
13040
|
+
*/
|
|
13041
|
+
cacheHref?: string;
|
|
12971
13042
|
};
|
|
12972
13043
|
|
|
12973
13044
|
/**
|
|
@@ -13376,7 +13447,7 @@ export declare type SuggestionCode = {
|
|
|
13376
13447
|
|
|
13377
13448
|
/**
|
|
13378
13449
|
* A shorter way to the same page: what a space's documents could say with fewer elements or less CSS — or, for its
|
|
13379
|
-
* animations, a lighter one.
|
|
13450
|
+
* animations, a lighter one, and for its headings, an outline a screen reader reads whole.
|
|
13380
13451
|
*
|
|
13381
13452
|
* Not the linter. `lintSpace` reports what renders something other than what was written, and a space is refused or
|
|
13382
13453
|
* warned for it; nothing here is wrong — the page renders exactly as written. These are the platform's own ways to say
|
package/dist/node.d.ts
CHANGED
|
@@ -121,6 +121,14 @@ declare type ActionLimits = {
|
|
|
121
121
|
* response rather than per run, because it exists to stop one answer from being unbounded. 5 000 000 by default.
|
|
122
122
|
*/
|
|
123
123
|
maxResponseBytes?: number;
|
|
124
|
+
/**
|
|
125
|
+
* Bytes all of one run's outbound responses may carry back together: 10 000 000 by default.
|
|
126
|
+
*
|
|
127
|
+
* `maxResponseBytes` bounds one answer; a flow that reads twenty answers just under it holds twenty of them, and a
|
|
128
|
+
* parsed answer holds several times its size in memory. Counted as the answers stream in, across every request the
|
|
129
|
+
* run makes, and refused the moment they go over — the run fails as `over_capacity`, naming this ceiling.
|
|
130
|
+
*/
|
|
131
|
+
maxRunBytes?: number;
|
|
124
132
|
};
|
|
125
133
|
|
|
126
134
|
/**
|
|
@@ -165,6 +173,11 @@ declare interface AuthoredSpace {
|
|
|
165
173
|
|
|
166
174
|
/** Every code authoring and its lint answer with — what each means and what to write instead: `plitzi explain <code>`. */
|
|
167
175
|
declare const AUTHORING_CODES: {
|
|
176
|
+
readonly 'heading-level-skipped': {
|
|
177
|
+
readonly kind: "suggested";
|
|
178
|
+
readonly means: "an `h4` right after an `h2` on a page as it is drawn — inside its layouts, with the headings a `markdown` writes, and without those that start hidden (`visible: false`): the outline misses a level (Lighthouse: \"not in a sequentially-descending order\")";
|
|
179
|
+
readonly fix: "the next level down; size it with its class";
|
|
180
|
+
};
|
|
168
181
|
readonly 'repeated-on-pages': {
|
|
169
182
|
readonly kind: "suggested";
|
|
170
183
|
readonly means: "the same block — a header, a footer, a side panel — written into several pages";
|
|
@@ -285,11 +298,6 @@ declare const AUTHORING_CODES: {
|
|
|
285
298
|
readonly means: "a click flow on a container, text, heading, image or list item — no keyboard reaches it";
|
|
286
299
|
readonly fix: "the flow on a `button` (it holds children) or a `link`";
|
|
287
300
|
};
|
|
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
301
|
readonly 'label-ignored': {
|
|
294
302
|
readonly kind: "warned";
|
|
295
303
|
readonly means: "a `label` on a container whose tag is named by what it holds (`li`, a heading)";
|
|
@@ -887,7 +895,7 @@ declare const AUTHORING_CODES: {
|
|
|
887
895
|
};
|
|
888
896
|
readonly 'server-query-unresolved': {
|
|
889
897
|
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
|
|
898
|
+
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, `navigation` and the state the space paints, `state.<key>`), another method than GET, or neither an address (`https://…`) nor a path (`/…`) — so it draws empty";
|
|
891
899
|
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
900
|
};
|
|
893
901
|
readonly 'server-when-unknown': {
|
|
@@ -1275,6 +1283,11 @@ declare const AUTHORING_CODES: {
|
|
|
1275
1283
|
readonly means: "a page that sends visitors it is not for to a page the space does not have";
|
|
1276
1284
|
readonly fix: "a page's id or slug (`''` is the home page), or a full URL";
|
|
1277
1285
|
};
|
|
1286
|
+
readonly 'when-refused-conflict': {
|
|
1287
|
+
readonly kind: "refused";
|
|
1288
|
+
readonly means: "a page's `whenRefused: 'notFound'` beside `unauthorizedRedirect`, or on a page nobody is refused";
|
|
1289
|
+
readonly fix: "keep the redirect or the not found; give the page `access` or `accessLevel: 'authenticated'`";
|
|
1290
|
+
};
|
|
1278
1291
|
readonly 'robots-unknown': {
|
|
1279
1292
|
readonly kind: "refused";
|
|
1280
1293
|
readonly means: "a page's `robots` with a directive no search engine reads, or none";
|
|
@@ -2600,6 +2613,13 @@ declare interface PageSpec {
|
|
|
2600
2613
|
access?: {
|
|
2601
2614
|
permissions: string[];
|
|
2602
2615
|
};
|
|
2616
|
+
/**
|
|
2617
|
+
* What a visitor this page is not for is answered — by `accessLevel` or `access` — when it is not sent elsewhere
|
|
2618
|
+
* (`unauthorizedRedirect`). Unsaid, its refusal: 401 or 403 and `settings.withheldPage`. `'notFound'` answers as if
|
|
2619
|
+
* it did not exist — the space's 404 — and sends nothing of it, not its name nor its path: a back-office, whose
|
|
2620
|
+
* refusal would tell whoever probes the path that something is there. The builder's "Unauthorized Behaviour".
|
|
2621
|
+
*/
|
|
2622
|
+
whenRefused?: 'refusal' | 'notFound';
|
|
2603
2623
|
/**
|
|
2604
2624
|
* Where a visitor this page is not for is sent — a page's id or slug (`login`; `''` is the home page), its path, or a
|
|
2605
2625
|
* full URL for somewhere off this space. Resolved to the page's id, and refused when it names no page.
|
|
@@ -2744,6 +2764,13 @@ export declare const projectAuthoringAt: (root: string) => Promise<ProjectAuthor
|
|
|
2744
2764
|
*/
|
|
2745
2765
|
export declare const projectData: (folder: string | URL) => ((query: string) => unknown);
|
|
2746
2766
|
|
|
2767
|
+
/**
|
|
2768
|
+
* The icon a project keeps, by its name, for a space that names none (`settings.favicon`): in `public/assets/` first —
|
|
2769
|
+
* served by a project's own server, and put on the space's CDN by `plitzi space push` — else in `public/`, which only a
|
|
2770
|
+
* project's own server serves (push says so). As the page names it: `/assets/favicon.svg`, `/favicon.svg`.
|
|
2771
|
+
*/
|
|
2772
|
+
export declare const projectIcon: (root: string) => string | undefined;
|
|
2773
|
+
|
|
2747
2774
|
/**
|
|
2748
2775
|
* A module of the project that did not load — a file that does not parse, an import of nothing, a module that throws
|
|
2749
2776
|
* as it runs — said at the first of the project's own files it points at: `src/space/hero.ts:139: Expected ','…`. The
|
|
@@ -2877,6 +2904,11 @@ declare interface RuleSetSpec extends VariantSpec {
|
|
|
2877
2904
|
conditions?: Record<string, ConditionSpec>;
|
|
2878
2905
|
}
|
|
2879
2906
|
|
|
2907
|
+
/**
|
|
2908
|
+
* A condition as Plitzi stores it — a flag's rules, an interaction's `when`, a binding's condition: the schema's own
|
|
2909
|
+
* format, so sdk-shared defines it (RFC 0032, D13). plitzi-ui's QueryBuilder edits the same shape with prop types of its
|
|
2910
|
+
* own, and a type test in the builder, where the two meet, holds them assignable both ways.
|
|
2911
|
+
*/
|
|
2880
2912
|
declare type RuleValue = Date | string | number | boolean | undefined | null | object;
|
|
2881
2913
|
|
|
2882
2914
|
declare type Schema = {
|
|
@@ -3361,7 +3393,13 @@ declare type Style = {
|
|
|
3361
3393
|
* because nothing else in the system loads a face. Optional because a document written before the manifest
|
|
3362
3394
|
* existed has none, and that is a real state every reader has to survive rather than a bug. */
|
|
3363
3395
|
fonts?: SpaceFont[];
|
|
3396
|
+
/** The compiled stylesheet. Empty on a server-rendered page that links it as `cacheHref` instead. */
|
|
3364
3397
|
cache: string;
|
|
3398
|
+
/**
|
|
3399
|
+
* Where a server-rendered page's stylesheet is served (`/_plitzi/style/<hash>.css`), when it links the compiled
|
|
3400
|
+
* stylesheet rather than carrying it: `cache` is then empty, and the page draws a `<link>` to this.
|
|
3401
|
+
*/
|
|
3402
|
+
cacheHref?: string;
|
|
3365
3403
|
};
|
|
3366
3404
|
|
|
3367
3405
|
/**
|