@peripheries/renderer 0.8.1 → 0.9.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/README.md +33 -2
- package/dist/catalog.js +2 -2
- package/dist/chunks/{projection-CDMo5g6t.js → projection-DNj8lq4J.js} +3 -3
- package/dist/chunks/projection-DNj8lq4J.js.map +1 -0
- package/dist/chunks/query-BsvcULsk.js +457 -0
- package/dist/chunks/query-BsvcULsk.js.map +1 -0
- package/dist/chunks/references-BawYmQMY.js +131 -0
- package/dist/chunks/references-BawYmQMY.js.map +1 -0
- package/dist/chunks/{structure-Bp7xbPck.js → structure-BdsfUYHS.js} +137 -110
- package/dist/chunks/structure-BdsfUYHS.js.map +1 -0
- package/dist/chunks/{validate-Cz2tUUdm.js → validate-Bji5gGV1.js} +163 -10
- package/dist/chunks/validate-Bji5gGV1.js.map +1 -0
- package/dist/core.js +306 -48
- package/dist/core.js.map +1 -1
- package/dist/react.js +26 -17
- package/dist/react.js.map +1 -1
- package/dist/testing.js +11 -0
- package/dist/testing.js.map +1 -1
- package/dist/types/core/actions.d.ts +33 -1
- package/dist/types/core/cell-props.d.ts +2 -2
- package/dist/types/core/data-context.d.ts +7 -5
- package/dist/types/core/diagnostics.d.ts +59 -3
- package/dist/types/core/graph.d.ts +6 -2
- package/dist/types/core/index.d.ts +7 -4
- package/dist/types/core/load-page.d.ts +31 -7
- package/dist/types/core/query.d.ts +93 -0
- package/dist/types/core/references.d.ts +27 -5
- package/dist/types/core/selected.d.ts +9 -0
- package/dist/types/react/cell-view.d.ts +5 -0
- package/dist/types/react/page-renderer.d.ts +10 -1
- package/dist/types/testing/golden.d.ts +5 -0
- package/package.json +4 -3
- package/dist/chunks/projection-CDMo5g6t.js.map +0 -1
- package/dist/chunks/structure-Bp7xbPck.js.map +0 -1
- package/dist/chunks/validate-Cz2tUUdm.js.map +0 -1
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","names":["_Fragment"],"sources":["../src/react/cell-states.tsx","../src/react/use-cell-store.ts","../src/react/use-container-size.ts","../src/react/cell-view.tsx","../src/react/structure-view.tsx","../src/react/page-renderer.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"react.js","names":["_Fragment"],"sources":["../src/react/cell-states.tsx","../src/react/use-cell-store.ts","../src/react/use-container-size.ts","../src/react/cell-view.tsx","../src/react/structure-view.tsx","../src/react/page-renderer.tsx"],"mappings":";;;;;;;AAGA,SAAgB,gBAAgB,EAAE,SAA2C;CAC3E,OAAO,IAAC,OAAD;EAAK,WAAU;EAAmB,mBAAiB;EAAO,aAAW,UAAU;CAAY,CAAA;AACpG;AAEA,SAAgB,WAAW,EAAE,OAAO,WAAW,YAAuF;CAGpI,OACE,IAAC,OAAD;EAAK,WAAU;EAAc,mBAAiB;EAAO,MAAK;EAAO,GAFnD,UAAU,eAAe,YAAY,EAAE,0BAA0B,UAAU,IAAI,CAAC;EAG3F;CACE,CAAA;AAET;AAGA,IAAa,oBAAb,cAAuC,UAA8H;CACnK,QAAiB,EAAE,OAAO,KAAqB;CAC/C,OAAO,yBAAyB,OAAc;EAC5C,OAAO,EAAE,MAAM;CACjB;CACA,kBAA2B,OAAc;EACvC,IAAI,KAAK,MAAM,SAAS,KAAK,MAAM,QAAQ,KAAK,MAAM,QAAQ,KAAK;OAC9D,QAAQ,MAAM,kBAAkB,KAAK,MAAM,OAAO,YAAY,KAAK;CAC1E;CACA,SAAkB;EAChB,OAAO,KAAK,MAAM,QAAQ,IAAC,YAAD;GAAY,OAAM;GAAQ,UAAA;EAAiD,CAAA,IAAI,KAAK,MAAM;CACtH;AACF;;;ACjBA,SAAgB,aAAa,MAAgB,OAAqB,KAAoB;CACpF,MAAM,aAAa,YAAY,IAAI,QAAQ,MAAM,kBAAkB,KAAK,YAAY,GAAG,KAAK,GAAG,EAAE,SAAS,mBAAmB,CAAC;CAC9H,MAAM,YAAY,YAAY,IAAI,QAAQ,MAAM,i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V,uBAAoB;EACpB,kBAAe;EACf,gBAAc,KAAK;EACnB,gBAAc,gBAAgB,KAAK,MAAM;EACzC,OAAO,mBAAmB,KAAK,MAAM;EAEpC,UAAA,OAAO,SAEN,KAAC,YAAD;GAAY,OAAM;GAAlB,UAAA,CAA0B,uCACY,OAAO,KAAK,IAAI,CAC1C;EACV,CAAA,IAAA,aACF,IAAC,eAAD;GAAe,OAAO;GAAgB;GAAY;EAAQ,CAAA,IAE1D,UAAU,KAAK,CAAC,CAAC,KAAK,SAAS,IAAC,UAAD;GAA8B;GAAW;EAAM,GAAhC,KAAK,EAA2B,CAAC;CAE9E,CAAA;AAET"}
|
package/dist/testing.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { o as prepareDocument } from "./chunks/query-BsvcULsk.js";
|
|
1
2
|
import { a as projectModule } from "./chunks/load-BMzwz_H6.js";
|
|
2
3
|
import { i as bundleScope } from "./chunks/refs-BLUokra5.js";
|
|
3
4
|
import { n as pageBundles, t as pageBundleRefs } from "./chunks/page-bundles-Bpea6ryV.js";
|
|
@@ -891,6 +892,16 @@ function goldenGraphSource(g) {
|
|
|
891
892
|
};
|
|
892
893
|
}
|
|
893
894
|
return out;
|
|
895
|
+
},
|
|
896
|
+
async query(descriptor, variables) {
|
|
897
|
+
calls.push({
|
|
898
|
+
method: "query",
|
|
899
|
+
args: [descriptor, variables]
|
|
900
|
+
});
|
|
901
|
+
const op = prepareDocument(descriptor.document).operationName ?? "(anonymous)";
|
|
902
|
+
if (!g.queries || !(op in g.queries)) throw new Error(`no fixture answers the query ${op}`);
|
|
903
|
+
const answer = g.queries[op];
|
|
904
|
+
return typeof answer === "function" ? answer(variables) : answer;
|
|
894
905
|
}
|
|
895
906
|
};
|
|
896
907
|
}
|
package/dist/testing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","names":[],"sources":["../src/testing/ids.ts","../src/testing/base-props.ts","../src/testing/components.tsx","../src/testing/golden.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AM,IAAI,EAAE,GAAG,KAAK,KAAK,MAAM,GAAG;CAC5E;CACA,MAAM,UAAiC,SAAS,KAAK,KAAK,QAAQ,cAAc,KAAK,IAAI,MAAM,MAAM,EAAE,IAAI,OAAO,IAAI,EAAE,CAAC,CAAE,OAAO,QAAQ,IAAI,MAAM,MAAM,EAAE,IAAI,OAAO,IAAI,EAAE,CAAC,CAAE,OAAO,SAAS,CAAC,IAAI;CACrM,OAAO,YAAY,OAAO,MAAM,SAAS,EAAE,KAAK,MAAM;AACxD"}
|
|
1
|
+
{"version":3,"file":"testing.js","names":[],"sources":["../src/testing/ids.ts","../src/testing/base-props.ts","../src/testing/components.tsx","../src/testing/golden.ts","../src/testing/sources.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAKA,IAAa,aAAa,MAAc,2BAA2B,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG;AAE7F,IAAa,aAAa;AAG1B,IAAa,oBAAoB,CAAC,kBAAkB,iBAAiB;AACrE,IAAa,uBAAuB;AAEpC,IAAa,aAAa;CAAE,IAAI,UAAU,CAAC;CAAG,MAAM;AAAiB;AACrE,IAAa,cAAc;CAAE,IAAI,UAAU,CAAC;CAAG,MAAM;AAAkB;;;ACTvE,IAAa,qBAAgC;CAC3C,MAAM;EAAE,IAAI,UAAU,CAAC;EAAG,OAAO,UAAU;EAAwB,UAAU;CAAiB;CAC9F,QAAQ;EAAE,IAAI,WAAW;EAAI,SAAS,WAAW;EAAM,MAAM;CAAiB;CAC9E,OAAO;EAAE,cAAc;EAAW,gBAAgB;CAAU;AAC9D;;;;;;;;;;;;;;;;;ACDA,SAAgB,SAAS,EAAE,OAAO,YAAmB;CACnD,OACE,KAAC,UAAD;EAAQ,eAAY;EAApB,UAAA,CACE,IAAC,MAAD,EAAA,UAAK,OAAO,SAAS,EAAE,EAAM,CAAA,GAC5B,aAAa,KAAA,KAAa,IAAC,KAAD,EAAA,UAAI,OAAO,QAAQ,EAAK,CAAA,CAC7C;;AAEZ;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AC,CAAC,QAAQ,OAAqB,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,GAAG,EAAE;CACtG,CAAC;AACH;AAEA,SAAS,QAAQ,KAAiB,KAAgB;CAChD,IAAI,IAAI,SAAS,UAAU,OAAO,IAAI,OAAO,IAAI;CACjD,IAAI,CAAC,IAAI,WAAW,IAAI,gBAAgB,IAAI,QAAQ,OAAO;CAC3D,OAAO,IAAI,SAAS,mBAAmB,IAAI,WAAW,IAAI,QAAQ,IAAI,aAAa,IAAI;AACzF;AAMA,SAAgB,cAAc,GAAe,OAAmB,EAAE,SAAS,SAAS,CAAC,GAAgB;CACnG,MAAM,QAAQ,YAAY,CAAC;CAC3B,MAAM,OAAO,eAAe,OAAO,OAAO,EAAE,KAAK,MAAM;CACvD,MAAM,MAAM,EAAE,QAAQ,KAAK,OAAO;EAAE,QAAQ;EAAG,KAAK,gBAAgB,CAAC;CAAE,EAAE;CACzE,MAAM,OAAoB,CAAC;CAC3B,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,QAAQ,IAAI,MAAM,MAAM,QAAQ,KAAK,EAAE,GAAG,CAAC;EACjD,IAAI,SAAS,CAAC,KAAK,MAAM,MAAM,EAAE,OAAO,MAAM,IAAI,EAAE,GAAG,KAAK,KAAK,MAAM,GAAG;CAC5E;CACA,MAAM,UAAiC,SAAS,KAAK,KAAK,QAAQ,cAAc,KAAK,IAAI,MAAM,MAAM,EAAE,IAAI,OAAO,IAAI,EAAE,CAAC,CAAE,OAAO,QAAQ,IAAI,MAAM,MAAM,EAAE,IAAI,OAAO,IAAI,EAAE,CAAC,CAAE,OAAO,SAAS,CAAC,IAAI;CACrM,OAAO,YAAY,OAAO,MAAM,SAAS,EAAE,KAAK,MAAM;AACxD"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CellAction, type GraphActionDeclaration, type ResolvedAction, type WriteResult } from '@peripheries/runtime';
|
|
2
|
+
import { type ResolutionContext } from './references.js';
|
|
3
|
+
import type { PageCell } from './types.js';
|
|
2
4
|
export type ActionDeclaration = string | {
|
|
3
5
|
registry: string;
|
|
4
6
|
entityKey?: string;
|
|
@@ -16,3 +18,33 @@ export declare function normalizeActionDeclaration(decl: unknown): {
|
|
|
16
18
|
* key, then its registry key, then the name the cell uses. Undefined when none match.
|
|
17
19
|
*/
|
|
18
20
|
export declare function projectCellActions(declarations: Record<string, unknown> | undefined, pageActions: Record<string, CellAction> | undefined): Record<string, CellAction> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* What is wrong with a declared action, as messages: an unknown action, a
|
|
23
|
+
* field it requires missing, a field it doesn't take, `append` without
|
|
24
|
+
* exactly one of `patch` and `data`, a malformed reference, or a projection.
|
|
25
|
+
*/
|
|
26
|
+
export declare function actionProblems(decl: GraphActionDeclaration): Array<{
|
|
27
|
+
field?: string;
|
|
28
|
+
message: string;
|
|
29
|
+
}>;
|
|
30
|
+
/** The references a declaration reads, by namespace or label (`input`, `period`…). */
|
|
31
|
+
export declare function actionReferences(decl: GraphActionDeclaration): string[];
|
|
32
|
+
/**
|
|
33
|
+
* A declaration resolved for one call: the props resolver, with `@input` the
|
|
34
|
+
* component's argument. A reference that resolves to nothing in a required
|
|
35
|
+
* field makes it `INVALID`, so no write runs with a hole in it.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolveAction(name: string, cellId: string, decl: GraphActionDeclaration, ctx: ResolutionContext, input: unknown): {
|
|
38
|
+
action: ResolvedAction;
|
|
39
|
+
} | {
|
|
40
|
+
result: WriteResult;
|
|
41
|
+
};
|
|
42
|
+
/** Runs a resolved action as the viewer: the host's write path, or a harness's mock. Never throws. */
|
|
43
|
+
export type RunAction = (action: ResolvedAction) => Promise<WriteResult>;
|
|
44
|
+
/**
|
|
45
|
+
* A cell's declared actions as the functions its component calls. Each
|
|
46
|
+
* resolves its declaration against the cell's context and the call's input,
|
|
47
|
+
* then hands it to `runAction`; a call never throws. Registry declarations
|
|
48
|
+
* are left to `projectCellActions`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function declaredActions(cell: Pick<PageCell, 'id' | 'actions'>, ctx: ResolutionContext, runAction: RunAction | undefined): Record<string, CellAction> | undefined;
|
|
@@ -6,8 +6,8 @@ export type CellStatus = {
|
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* A cell's own `data` prop (the PWA's projectDataBundle): its static values,
|
|
9
|
-
* then each declared key read from the page context
|
|
10
|
-
*
|
|
9
|
+
* then each declared key read from the page context. Every declared key is
|
|
10
|
+
* present, `undefined` while loading.
|
|
11
11
|
*/
|
|
12
12
|
export declare function projectCellData(cell: PageCell, ctx: DataContext): {
|
|
13
13
|
data: Record<string, unknown>;
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type NodeBinding, type NodeRecord, type QueryDescriptor, type StateName } from '@peripheries/runtime';
|
|
2
2
|
import { readField, type Diagnostic, type ProcessSystems } from './graph.js';
|
|
3
3
|
export { readField };
|
|
4
|
-
import type { DataContext,
|
|
4
|
+
import type { DataContext, ProjectPage } from './types.js';
|
|
5
5
|
/** A system a declaration reads: by name from the page's process, or named outright by id. */
|
|
6
6
|
export type StateRead = {
|
|
7
7
|
name?: StateName;
|
|
8
8
|
systemId: string;
|
|
9
9
|
};
|
|
10
10
|
/** A declaration with the systems it reads, in merge order. */
|
|
11
|
-
export type ResolvedDeclaration =
|
|
11
|
+
export type ResolvedDeclaration = NodeBinding & {
|
|
12
12
|
reads: StateRead[];
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* Declarations (`data.queries`) with the systems each reads: `system_id`
|
|
16
16
|
* outright, else its `state` names (default `eng_data`) through the page's
|
|
17
|
-
* systems. Only node bindings: a registry binding is left to
|
|
18
|
-
*
|
|
17
|
+
* systems. Only node bindings: a retired registry binding is left to
|
|
18
|
+
* validation. A declaration none of whose systems exist
|
|
19
19
|
* is dropped, with a diagnostic.
|
|
20
20
|
*/
|
|
21
21
|
export declare function resolveDeclarations(queries: Record<string, unknown> | undefined, systems: ProcessSystems, diagnostics?: Diagnostic[], cellId?: string): Record<string, ResolvedDeclaration>;
|
|
22
|
+
/** The inline descriptors among declarations (`{ descriptor }`), by label (design/data.md §3). */
|
|
23
|
+
export declare function collectDescriptors(queries: Record<string, unknown> | undefined): Record<string, QueryDescriptor>;
|
|
22
24
|
/** The page's own declarations (`content.data.queries`), which every cell sees. */
|
|
23
25
|
export declare const collectDeclarations: (page: ProjectPage, systems: ProcessSystems, diagnostics?: Diagnostic[]) => Record<string, ResolvedDeclaration>;
|
|
24
26
|
/** The page's static values (`content.data.static`), which every cell sees. */
|
|
@@ -75,11 +75,11 @@ export declare const DIAGNOSTICS: {
|
|
|
75
75
|
};
|
|
76
76
|
readonly BINDING_INVALID: {
|
|
77
77
|
readonly meaning: "A `data.queries` entry is not a binding.";
|
|
78
|
-
readonly fix: "Declare `{ graph_node_id, state?, as? }`, with `state` a system name and `as` value or record.";
|
|
78
|
+
readonly fix: "Declare `{ graph_node_id, state?, as? }`, with `state` a system name and `as` value or record, or `{ descriptor }` for a query.";
|
|
79
79
|
};
|
|
80
80
|
readonly UNSUPPORTED_REGISTRY_BINDING: {
|
|
81
|
-
readonly meaning: "A binding names a registry query the host
|
|
82
|
-
readonly fix: "
|
|
81
|
+
readonly meaning: "A binding names a registry query (`{ registry: \"x.y\" }`) from the retired host contract.";
|
|
82
|
+
readonly fix: "Copy the matching recipe’s descriptor into `{ descriptor }` (the component’s pattern pack has it), or bind the graph node that produces the data. docs/plan/host-contract-verdicts.md maps every id.";
|
|
83
83
|
};
|
|
84
84
|
readonly STATE_UNKNOWN_NAME: {
|
|
85
85
|
readonly meaning: "A state name is not one of the twelve systems.";
|
|
@@ -89,10 +89,66 @@ export declare const DIAGNOSTICS: {
|
|
|
89
89
|
readonly meaning: "The page’s process has no system of that name.";
|
|
90
90
|
readonly fix: "Read a system the process has, usually `eng_data`.";
|
|
91
91
|
};
|
|
92
|
+
readonly LABEL_RESERVED: {
|
|
93
|
+
readonly meaning: "A declaration takes a reserved label name.";
|
|
94
|
+
readonly fix: "Rename the label: `_traversal`, `params`, `baseProps`, `viewer`, `context`, `input` and `scope` are the host’s.";
|
|
95
|
+
};
|
|
96
|
+
readonly DESCRIPTOR_INVALID: {
|
|
97
|
+
readonly meaning: "A query descriptor isn’t version 1’s shape.";
|
|
98
|
+
readonly fix: "Write `{ kind: \"graphql\", version: 1, document, variables?, result?: { path?, flatten_connections? }, order_by?: [{ field, direction?, nulls? }] }`, with nothing else.";
|
|
99
|
+
};
|
|
100
|
+
readonly DESCRIPTOR_DOCUMENT_INVALID: {
|
|
101
|
+
readonly meaning: "The document isn’t one query operation that reads only tables, views and the render functions.";
|
|
102
|
+
readonly fix: "Write one `query`, whose root fields are `<table>Collection`, `<table>ByPk`, `node` or a render function such as `walk_graph`; no mutations, RPCs or introspection.";
|
|
103
|
+
};
|
|
104
|
+
readonly DESCRIPTOR_VARIABLE_MISSING: {
|
|
105
|
+
readonly meaning: "The document requires a variable that `variables` doesn’t give.";
|
|
106
|
+
readonly fix: "Give it in `variables`, as a literal or a reference (`@params.clientId`, `@viewer.userId`, `@budget.graph_node_id`); `$orderBy` comes from `order_by`.";
|
|
107
|
+
};
|
|
108
|
+
readonly DESCRIPTOR_VARIABLE_UNDECLARED: {
|
|
109
|
+
readonly meaning: "`variables` gives a value the document never declares, so it isn’t used.";
|
|
110
|
+
readonly fix: "Declare it in the operation (`query Q($name: Type)`), or remove it.";
|
|
111
|
+
};
|
|
112
|
+
readonly DESCRIPTOR_REFERENCE_INVALID: {
|
|
113
|
+
readonly meaning: "A variable’s reference is malformed, or reads something variables can’t.";
|
|
114
|
+
readonly fix: "Write a whole `@label.path`, `@params.*`, `@baseProps.*`, `@viewer.*` or `@context.*`; no `@input`, and no `@each` (select the list you need in the query).";
|
|
115
|
+
};
|
|
116
|
+
readonly DESCRIPTOR_ORDER_BY_UNUSED: {
|
|
117
|
+
readonly meaning: "`order_by` is set, but the document declares no `$orderBy`, so it is ignored.";
|
|
118
|
+
readonly fix: "Declare `$orderBy: [<table>OrderBy!]` and pass `orderBy: $orderBy`, or remove `order_by`.";
|
|
119
|
+
};
|
|
120
|
+
readonly DESCRIPTOR_RESULT_PATH: {
|
|
121
|
+
readonly meaning: "`result.path` names a part of the result the document doesn’t select.";
|
|
122
|
+
readonly fix: "Point it at a selected field (its alias, if it has one), e.g. `clientCollection`.";
|
|
123
|
+
};
|
|
124
|
+
readonly REF_NOT_SELECTED: {
|
|
125
|
+
readonly meaning: "A cell reads a path from a query’s label that the query doesn’t select.";
|
|
126
|
+
readonly fix: "Select the field in the query (an alias renames it), or read a path it selects. Connections are lists of their nodes unless `flatten_connections` is false.";
|
|
127
|
+
};
|
|
128
|
+
readonly QUERY_READS_QUERY: {
|
|
129
|
+
readonly meaning: "A query’s variables read another query’s label.";
|
|
130
|
+
readonly fix: "Read the id from a node binding, a walk or a static value, or select what you need in one query: a query reads labels one step deep.";
|
|
131
|
+
};
|
|
132
|
+
readonly QUERY_UNRESOLVED: {
|
|
133
|
+
readonly meaning: "A query didn’t run: a variable’s reference resolved to nothing.";
|
|
134
|
+
readonly fix: "Check the label or parameter the variable reads exists for this viewer; the rest of the page renders.";
|
|
135
|
+
};
|
|
136
|
+
readonly QUERY_FAILED: {
|
|
137
|
+
readonly meaning: "A query failed to run.";
|
|
138
|
+
readonly fix: "The message gives the database’s reason; check the document against the schema with a dry run as a real viewer.";
|
|
139
|
+
};
|
|
92
140
|
readonly BINDING_DUPLICATE_KEY: {
|
|
93
141
|
readonly meaning: "A walk reached several nodes with the same `binding_key`, so the label binds nothing.";
|
|
94
142
|
readonly fix: "Declare the label on the page or cell with the node you mean, or narrow the walk.";
|
|
95
143
|
};
|
|
144
|
+
readonly ACTION_INVALID: {
|
|
145
|
+
readonly meaning: "An action declaration is malformed: an unknown action, a field it needs missing, a field it doesn’t take, or a bad reference.";
|
|
146
|
+
readonly fix: "Declare `{ \"action\": \"create\" | \"edit\" | \"append\" | \"move\" | \"link\" | \"unlink\" | \"archive\", … }` with that action’s fields; read what the component passes as `@input.*`.";
|
|
147
|
+
};
|
|
148
|
+
readonly ACTION_REGISTRY: {
|
|
149
|
+
readonly meaning: "An action names a registry mutation (`\"node.create\"`, `{ registry, entityKey }`), the PWA’s form.";
|
|
150
|
+
readonly fix: "Declare it as `{ \"action\": …, … }`: `node.create` → `create`, `node.editContent` → `edit`, `state.recordPatch` → `append`, `node.reorder` → `move`.";
|
|
151
|
+
};
|
|
96
152
|
readonly WALK_EDGE_TYPES_REQUIRED: {
|
|
97
153
|
readonly meaning: "A traversal has no `edgeTypes`.";
|
|
98
154
|
readonly fix: "List the edge types the walk follows, e.g. `[\"data_flow\"]`.";
|
|
@@ -43,8 +43,12 @@ export type WalkStart = {
|
|
|
43
43
|
};
|
|
44
44
|
/** A cell's own node (a thin ref's, or an inline cell's `graph_node_id`), else the page node (agency doc 17). */
|
|
45
45
|
export declare function resolveWalkStart(cell: Pick<PageCell, 'graph_node_id' | 'metadata'>, pageGraphNodeId: string | null | undefined): WalkStart | null;
|
|
46
|
-
/**
|
|
47
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Labels no declaration or walk can take: the cell's walk, the route's
|
|
48
|
+
* parameters, the host's props, the viewer and the location (design/data.md
|
|
49
|
+
* §5); `input` (an action's argument) and `scope` (the apps release) are kept free.
|
|
50
|
+
*/
|
|
51
|
+
export declare const RESERVED_LABELS: readonly ["_traversal", "params", "baseProps", "viewer", "context", "input", "scope"];
|
|
48
52
|
/**
|
|
49
53
|
* Every data label a cell's props and conditions read with a whole-string
|
|
50
54
|
* `@label…` reference. Inside an `@each` projection's `map`, its element's
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
export { CONTENT_FIELDS, hasRef, HYDRATED_CELL_FIELDS, normalizeCell, resolveCell, rootCells, STORE_FIELDS, type CellSource, type ResolvedCell } from './cells.js';
|
|
2
|
-
export { buildDataContext, collectDeclarations, collectStatic, readField, resolveDeclarations, type ResolvedDeclaration, type StateRead } from './data-context.js';
|
|
2
|
+
export { buildDataContext, collectDeclarations, collectDescriptors, collectStatic, readField, resolveDeclarations, type ResolvedDeclaration, type StateRead } from './data-context.js';
|
|
3
3
|
export { mergeStates, needsWalk, readWalk, referencedLabels, RESERVED_LABELS, resolveWalkStart, stateNames, stateValue, systemsFromProcess, walkKey, walkRequest, type Diagnostic, type ProcessSystems, type RawWalk, type WalkBinding, type WalkRequest, type WalkStart, } from './graph.js';
|
|
4
|
-
export { loadPageData, resolveDataSystem, resolveSystems, type CellData, type CellWalk, type GraphSource, type NodeRecordRow, type PageRuntime } from './load-page.js';
|
|
5
|
-
export {
|
|
4
|
+
export { loadPageData, resolveDataSystem, resolveSystems, type CellData, type CellWalk, type GraphSource, type NodeRecordRow, type PageRuntime, type PageScope } from './load-page.js';
|
|
5
|
+
export { descriptorShape, orderByVariable, prepareDocument, queryKey, RENDER_FUNCTIONS, resolveDescriptorVariables, selectionShape, shapeAt, UnsafeDocumentError, validateDescriptor, VARIABLE_NAMESPACES, variableLabels, variableReferences, type PreparedDocument, type ResolvedVariables, type SelectionShape, } from './query.js';
|
|
6
|
+
export { selectionIssues } from './selected.js';
|
|
7
|
+
export { cellContext, cellResolutionContext, EACH, pageContext, EACH_DEFAULT_AS, isEach, passesConditions, resolveReferences, settled, type CellScope, type Each, type ResolutionContext } from './references.js';
|
|
6
8
|
export { eachFormProblems, nearestNames, RESPONSIVE_BUCKETS, STORE_SCOPES, validateCell, validatePage, WALK_DIRECTIONS, type Catalog, type ValidateOptions } from './validate.js';
|
|
7
9
|
export { DIAGNOSTICS, type DiagnosticCode, type DiagnosticEntry } from './diagnostics.js';
|
|
8
10
|
export { LAYOUT_TYPES, PAGE_RULES } from './rules.js';
|
|
9
11
|
export { pageRuntimeFromValues } from './values.js';
|
|
10
|
-
export { actionBindingKey, normalizeActionDeclaration, projectCellActions, type
|
|
12
|
+
export { actionBindingKey, actionProblems, actionReferences, declaredActions, normalizeActionDeclaration, projectCellActions, resolveAction, type RunAction } from './actions.js';
|
|
13
|
+
export type { ActionDeclaration } from '@peripheries/runtime';
|
|
11
14
|
export type * from './types.js';
|
|
12
15
|
export { assembleCellProps, projectCellData, type CellStatus } from './cell-props.js';
|
|
13
16
|
export { cellAttributes, cellPlacementStyle, pageContainerStyle } from './layout.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type NodeRecord, type QueryDescriptor, type StateRecord, type Traversal } from '@peripheries/runtime';
|
|
2
2
|
import { type ResolvedCell } from './cells.js';
|
|
3
3
|
import { type Diagnostic, type ProcessSystems, type RawWalk, type WalkRequest } from './graph.js';
|
|
4
4
|
import type { DataContext, ProjectPage } from './types.js';
|
|
@@ -20,7 +20,23 @@ export interface GraphSource {
|
|
|
20
20
|
latestStates(systemId: string, graphNodeIds: string[]): Promise<Record<string, unknown>>;
|
|
21
21
|
walk(request: WalkRequest): Promise<RawWalk>;
|
|
22
22
|
nodeRecords(graphNodeIds: string[], systemIds: string[]): Promise<Record<string, NodeRecordRow>>;
|
|
23
|
+
/**
|
|
24
|
+
* A query, as the viewer, its result shaped by the descriptor's `result`
|
|
25
|
+
* (design/data.md §6). Variables are resolved, `$orderBy` included. The
|
|
26
|
+
* host runs it through prepareDocument; a harness answers from fixtures
|
|
27
|
+
* keyed by the operation's name.
|
|
28
|
+
*/
|
|
29
|
+
query(descriptor: QueryDescriptor, variables: Record<string, unknown>): Promise<unknown>;
|
|
23
30
|
}
|
|
31
|
+
/** What a page's queries may read besides labels (design/data.md §5). */
|
|
32
|
+
export type PageScope = {
|
|
33
|
+
params?: Record<string, unknown>;
|
|
34
|
+
baseProps?: unknown;
|
|
35
|
+
/** The signed-in person: `userId`, `isAdvisor`, `isClient`… */
|
|
36
|
+
viewer?: unknown;
|
|
37
|
+
/** The host's location context (core.md §8); the page's own ids are added. */
|
|
38
|
+
context?: Record<string, unknown>;
|
|
39
|
+
};
|
|
24
40
|
/** A cell's own walk: `@_traversal`, and the labels its `binding_key` nodes provide. */
|
|
25
41
|
export type CellWalk = {
|
|
26
42
|
traversal: Traversal;
|
|
@@ -51,6 +67,12 @@ export type PageRuntime = {
|
|
|
51
67
|
cellData: Record<string, CellData>;
|
|
52
68
|
systems: ProcessSystems;
|
|
53
69
|
engDataSystemId: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* Every graph node the page reads: its own, its cells', its producers', its
|
|
72
|
+
* walks' starts. Their graphs are the Realtime topics the page joins
|
|
73
|
+
* (design/data.md §10).
|
|
74
|
+
*/
|
|
75
|
+
graphNodeIds: string[];
|
|
54
76
|
diagnostics: Diagnostic[];
|
|
55
77
|
};
|
|
56
78
|
/**
|
|
@@ -63,10 +85,12 @@ export declare function resolveSystems(source: Pick<GraphSource, 'processSystems
|
|
|
63
85
|
export declare function resolveDataSystem(source: Pick<GraphSource, 'processSystems'>, page: ProjectPage): Promise<string | null>;
|
|
64
86
|
/**
|
|
65
87
|
* Everything a page needs before it renders (design/core.md §3, stages 1–3;
|
|
66
|
-
* design/renderer.md §3, §5): read every ref's node config
|
|
67
|
-
* system), then every declaration's producer (one read per
|
|
68
|
-
* walk a cell needs
|
|
69
|
-
*
|
|
70
|
-
*
|
|
88
|
+
* design/renderer.md §3, §5; design/data.md §6): read every ref's node config
|
|
89
|
+
* (one read per system), then every declaration's producer (one read per
|
|
90
|
+
* system), every walk a cell needs, any NodeRecords, and the queries whose
|
|
91
|
+
* variables read no label, in parallel; then the queries whose variables read
|
|
92
|
+
* a label, and those found in live query nodes. Framework-free: the source
|
|
93
|
+
* decides how each read runs (the host's runs in its route loader, through
|
|
94
|
+
* TanStack Query, under the viewer's JWT).
|
|
71
95
|
*/
|
|
72
|
-
export declare function loadPageData(page: ProjectPage, source: GraphSource): Promise<PageRuntime>;
|
|
96
|
+
export declare function loadPageData(page: ProjectPage, source: GraphSource, scope?: PageScope): Promise<PageRuntime>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type QueryDescriptor, type QueryOrderBy } from '@peripheries/runtime';
|
|
2
|
+
import type { Diagnostic } from './graph.js';
|
|
3
|
+
import { type ResolutionContext } from './references.js';
|
|
4
|
+
/**
|
|
5
|
+
* Functions a render-time document may read, with the tables each reads (for
|
|
6
|
+
* invalidation). pg_graphql reflects every stable function the role can run
|
|
7
|
+
* as a Query field, and many are SECURITY DEFINER, so a function is allowed
|
|
8
|
+
* only by name, once a database test has pinned it as stable, SECURITY
|
|
9
|
+
* INVOKER, closed to anon and with a fixed search_path
|
|
10
|
+
* (tests/integration/graph-reads.test.ts).
|
|
11
|
+
*/
|
|
12
|
+
export declare const RENDER_FUNCTIONS: Readonly<Record<string, readonly string[]>>;
|
|
13
|
+
export type PreparedDocument = {
|
|
14
|
+
text: string;
|
|
15
|
+
operationName: string | undefined;
|
|
16
|
+
/** Root entity names, e.g. `project_page` for `project_pageCollection`; `*` for `node`; a render function's tables. */
|
|
17
|
+
entities: readonly string[];
|
|
18
|
+
/** Stable short hash of the prepared text; part of query keys. */
|
|
19
|
+
hash: string;
|
|
20
|
+
};
|
|
21
|
+
export declare class UnsafeDocumentError extends Error {
|
|
22
|
+
name: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A GraphQL document checked against the render-time rule (design/renderer.md
|
|
26
|
+
* §4.5) and ready to send: exactly one `query` operation whose root fields are
|
|
27
|
+
* table or view collections, `ByPk` reads, `node`, or a render function.
|
|
28
|
+
* `__typename` is added to every nested selection, so a host can find JSON
|
|
29
|
+
* columns in the result. Throws UnsafeDocumentError.
|
|
30
|
+
*/
|
|
31
|
+
export declare function prepareDocument(source: string): PreparedDocument;
|
|
32
|
+
/**
|
|
33
|
+
* The shape of a query's result, from its selection alone (design/data.md
|
|
34
|
+
* §2.1): a field without a selection set is a `leaf` (a scalar, a JSON column
|
|
35
|
+
* or an array column, so any path below it may exist); `edges { node }` is a
|
|
36
|
+
* list. With `flatten_connections`, a connection that selects edges is the
|
|
37
|
+
* list of its nodes, as the host shapes it.
|
|
38
|
+
*/
|
|
39
|
+
export type SelectionShape = {
|
|
40
|
+
kind: 'leaf';
|
|
41
|
+
} | {
|
|
42
|
+
kind: 'object';
|
|
43
|
+
fields: Record<string, SelectionShape>;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'list';
|
|
46
|
+
of: SelectionShape;
|
|
47
|
+
};
|
|
48
|
+
/** The shape a document's selection yields, before `result.path`. */
|
|
49
|
+
export declare function selectionShape(document: string, flatten?: boolean): SelectionShape;
|
|
50
|
+
/**
|
|
51
|
+
* The shape at a dot path, or null when the selection doesn't select it. A
|
|
52
|
+
* numeric segment indexes a list; anything below a leaf is accepted.
|
|
53
|
+
*/
|
|
54
|
+
export declare function shapeAt(shape: SelectionShape, path: readonly string[]): SelectionShape | null;
|
|
55
|
+
/** What a descriptor's label holds: its selection, flattened, at `result.path`. Null when the path isn't selected. */
|
|
56
|
+
export declare function descriptorShape(descriptor: QueryDescriptor): SelectionShape | null;
|
|
57
|
+
/** Namespaces a variable may read, besides labels (design/data.md §5). */
|
|
58
|
+
export declare const VARIABLE_NAMESPACES: readonly ["params", "baseProps", "viewer", "context"];
|
|
59
|
+
/** Every whole-string reference in a descriptor's variables, by the label or namespace it reads. */
|
|
60
|
+
export declare function variableReferences(variables: unknown): Array<{
|
|
61
|
+
ref: string;
|
|
62
|
+
label: string;
|
|
63
|
+
}>;
|
|
64
|
+
/** The labels (not namespaces) a descriptor's variables read: what decides its round (design/data.md §5, §6). */
|
|
65
|
+
export declare const variableLabels: (descriptor: Pick<QueryDescriptor, "variables">) => string[];
|
|
66
|
+
/**
|
|
67
|
+
* A descriptor's static checks (design/data.md §4): the version-1 shape, one
|
|
68
|
+
* query operation under the render-time rule, every required variable given
|
|
69
|
+
* (`$orderBy` by `order_by`), references well formed, and `result.path`
|
|
70
|
+
* selected. It doesn't run anything; a dry run under a real viewer checks the
|
|
71
|
+
* rest against the database. `path` prefixes each diagnostic's path.
|
|
72
|
+
*/
|
|
73
|
+
export declare function validateDescriptor(descriptor: unknown, path?: string): Diagnostic[];
|
|
74
|
+
/** `order_by` as pg_graphql's `orderBy` argument: `[{ updated_at: DescNullsLast }]`. */
|
|
75
|
+
export declare const orderByVariable: (orderBy: readonly QueryOrderBy[]) => {
|
|
76
|
+
[x: string]: string;
|
|
77
|
+
}[];
|
|
78
|
+
export type ResolvedVariables = {
|
|
79
|
+
variables: Record<string, unknown>;
|
|
80
|
+
/** References that resolved to nothing (null or undefined): the query doesn't run (QUERY_UNRESOLVED). */
|
|
81
|
+
unresolved: string[];
|
|
82
|
+
/** References whose data is still loading: the query waits. */
|
|
83
|
+
pending: string[];
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* A descriptor's variables, resolved with the one reference grammar (the same
|
|
87
|
+
* resolver as props), plus `$orderBy` from `order_by` when the document
|
|
88
|
+
* declares it. A whole-string reference that resolves to null or nothing is
|
|
89
|
+
* unresolved; interpolation (`${x}`) works as in props.
|
|
90
|
+
*/
|
|
91
|
+
export declare function resolveDescriptorVariables(descriptor: QueryDescriptor, ctx: ResolutionContext): ResolvedVariables;
|
|
92
|
+
/** One query per distinct question: the document and the resolved variables, and the result's shape. */
|
|
93
|
+
export declare const queryKey: (descriptor: QueryDescriptor, variables: Record<string, unknown>) => string;
|
|
@@ -4,6 +4,8 @@ export type ResolutionContext = {
|
|
|
4
4
|
params: Record<string, unknown>;
|
|
5
5
|
/** Told of each whole-string `@ref` that resolves to nothing (a missing label, path or leaf), except while its data loads. */
|
|
6
6
|
onUnresolved?: (ref: string) => void;
|
|
7
|
+
/** Told of each whole-string `@ref` whose data is still loading. */
|
|
8
|
+
onLoading?: (ref: string) => void;
|
|
7
9
|
};
|
|
8
10
|
/** The key that marks a projection: `{ "@each": "@label.path", "as": "item", "map": … }`. */
|
|
9
11
|
export declare const EACH = "@each";
|
|
@@ -39,15 +41,35 @@ export type CellScope = {
|
|
|
39
41
|
* The context one cell resolves against (design/renderer.md §5.2), lowest
|
|
40
42
|
* first: the page's static values, the cell's own static values, the labels
|
|
41
43
|
* the cell's walk found, the page's declarations, the cell's own
|
|
42
|
-
* declarations; then
|
|
43
|
-
* `_traversal`, `params` and `
|
|
44
|
-
* Explicit beats discovered: no walk label replaces a declared one.
|
|
44
|
+
* declarations; then the reserved
|
|
45
|
+
* `_traversal`, `params`, `baseProps`, `viewer` and `context`, which nothing
|
|
46
|
+
* can shadow. Explicit beats discovered: no walk label replaces a declared one.
|
|
45
47
|
*/
|
|
46
|
-
export declare function cellResolutionContext(
|
|
48
|
+
export declare function cellResolutionContext(_cell: {
|
|
47
49
|
data?: {
|
|
48
50
|
queries?: Record<string, unknown>;
|
|
49
51
|
};
|
|
50
|
-
}, page: ResolutionContext, own?: CellScope, baseProps?: unknown
|
|
52
|
+
}, page: ResolutionContext, own?: CellScope, baseProps?: unknown, who?: {
|
|
53
|
+
viewer?: unknown;
|
|
54
|
+
context?: unknown;
|
|
55
|
+
}): ResolutionContext;
|
|
56
|
+
/** The location context every cell on a page shares (core.md §8): the host's, with the page's own ids. */
|
|
57
|
+
export declare const pageContext: (context: Record<string, unknown> | undefined, page: {
|
|
58
|
+
id: string;
|
|
59
|
+
project_id: string | null;
|
|
60
|
+
process_id: string | null;
|
|
61
|
+
}) => {
|
|
62
|
+
pageId: string;
|
|
63
|
+
projectId: string | null;
|
|
64
|
+
processId: string | null;
|
|
65
|
+
};
|
|
66
|
+
/** One cell's location context: the page's, with the cell's own node. */
|
|
67
|
+
export declare const cellContext: (context: Record<string, unknown>, cell: {
|
|
68
|
+
graph_node_id?: string;
|
|
69
|
+
metadata?: Record<string, unknown>;
|
|
70
|
+
}) => {
|
|
71
|
+
nodeId: string | undefined;
|
|
72
|
+
};
|
|
51
73
|
/** showIf / hideIf: values (usually strict refs) tested for truthiness. An empty string skips the check. */
|
|
52
74
|
export declare function passesConditions(conditions: {
|
|
53
75
|
showIf?: unknown;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { QueryDescriptor } from '@peripheries/runtime';
|
|
2
|
+
import type { Diagnostic } from './graph.js';
|
|
3
|
+
import type { PageCell } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* The paths one cell's props and conditions read from the given query labels
|
|
6
|
+
* that the queries don't select. Inside an `@each` over a query's list, the
|
|
7
|
+
* element's paths are checked against the list's element. `at` prefixes paths.
|
|
8
|
+
*/
|
|
9
|
+
export declare function selectionIssues(cell: Pick<PageCell, 'id' | 'props' | 'conditions'>, queries: Record<string, QueryDescriptor>, at: string): Diagnostic[];
|
|
@@ -2,6 +2,7 @@ import type { CellAction, ComponentContract } from '@peripheries/runtime';
|
|
|
2
2
|
import { type CSSProperties } from 'react';
|
|
3
3
|
import type { LoadedBundle } from '../core/bundles/load.js';
|
|
4
4
|
import { type CoreRegistry } from '../core/bundles/resolve.js';
|
|
5
|
+
import { type RunAction } from '../core/actions.js';
|
|
5
6
|
import type { CellData } from '../core/load-page.js';
|
|
6
7
|
import { type ResolutionContext } from '../core/references.js';
|
|
7
8
|
import type { StackStoreApi } from '../core/store/create-store.js';
|
|
@@ -19,12 +20,16 @@ export type CellEnvironment = {
|
|
|
19
20
|
store: StackStoreApi;
|
|
20
21
|
scope: ScopeContext;
|
|
21
22
|
context: Record<string, unknown>;
|
|
23
|
+
/** The signed-in person, for `@viewer.*`. */
|
|
24
|
+
viewer?: unknown;
|
|
22
25
|
/** Each cell's own data, by cell id (loadPageData). */
|
|
23
26
|
cellData?: Record<string, CellData>;
|
|
24
27
|
/** Labels the page declares, which no walk's label replaces. */
|
|
25
28
|
declared?: ReadonlySet<string>;
|
|
26
29
|
/** The actions a cell gets (RendererEnvironment.actionsFor). */
|
|
27
30
|
actionsFor?: (cell: PageCell) => Record<string, CellAction> | undefined;
|
|
31
|
+
/** Runs a declared action (RendererEnvironment.runAction). */
|
|
32
|
+
runAction?: RunAction;
|
|
28
33
|
onCellError?: (cellId: string, error: Error) => void;
|
|
29
34
|
onUnresolvedReference?: (cellId: string, ref: string) => void;
|
|
30
35
|
/** Extra attributes and style for a cell's frame (RendererEnvironment.frameProps). */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CellAction, ComponentContract } from '@peripheries/runtime';
|
|
2
|
+
import type { RunAction } from '../core/actions.js';
|
|
2
3
|
import type { PageBundles } from '../core/bundles/page-bundles.js';
|
|
3
4
|
import type { CoreRegistry } from '../core/bundles/resolve.js';
|
|
4
5
|
import type { Diagnostic } from '../core/graph.js';
|
|
@@ -21,6 +22,12 @@ export type RendererEnvironment = {
|
|
|
21
22
|
* lookup rule to a page-level map).
|
|
22
23
|
*/
|
|
23
24
|
actionsFor?: (cell: PageCell) => Record<string, CellAction> | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Runs a cell's declared action (design/data.md §9.2), resolved against the
|
|
27
|
+
* cell's data and the component's `@input`: the host's write path, as the
|
|
28
|
+
* viewer, or a harness's mock. Without it a declared action reports `FAILED`.
|
|
29
|
+
*/
|
|
30
|
+
runAction?: RunAction;
|
|
24
31
|
/** A component threw. Default: a console error; the cell shows an error notice either way. */
|
|
25
32
|
onCellError?: (cellId: string, error: Error) => void;
|
|
26
33
|
/** A cell's prop reference resolved to nothing (a binding the page gets wrong). */
|
|
@@ -34,6 +41,8 @@ export type PageRendererProps = {
|
|
|
34
41
|
params: Record<string, unknown>;
|
|
35
42
|
baseProps: unknown;
|
|
36
43
|
context: Record<string, unknown>;
|
|
44
|
+
/** The signed-in person, for `@viewer.*` in props (design/data.md §5). */
|
|
45
|
+
viewer?: unknown;
|
|
37
46
|
environment: RendererEnvironment;
|
|
38
47
|
};
|
|
39
48
|
/**
|
|
@@ -42,4 +51,4 @@ export type PageRendererProps = {
|
|
|
42
51
|
* `bundles`. On the server the bundles haven't imported, so each cell renders
|
|
43
52
|
* as a placeholder sized by its layout.
|
|
44
53
|
*/
|
|
45
|
-
export declare function PageRenderer({ runtime, bundles, params, baseProps, context, environment }: PageRendererProps): import("react").JSX.Element;
|
|
54
|
+
export declare function PageRenderer({ runtime, bundles, params, baseProps, context, viewer, environment }: PageRendererProps): import("react").JSX.Element;
|