@plitzi/sdk-elements 0.38.18 → 0.38.20
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
CHANGED
|
@@ -1,5 +1,102 @@
|
|
|
1
1
|
# @plitzi/sdk-elements
|
|
2
2
|
|
|
3
|
+
## 0.38.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c7c241a: ## Security
|
|
8
|
+
|
|
9
|
+
- **The `Origin` fallback reads the request's own authority before a forwarded one** (`@plitzi/sdk-server`): 0.38.19
|
|
10
|
+
took `X-Forwarded-Host` first, and with no proxy in front a client could send one naming this host on another port,
|
|
11
|
+
making that port's `Origin` this server's own. Now `:authority` or `Host` decide whenever they name the host the
|
|
12
|
+
request is answered as; `X-Forwarded-Host` only when they do not — a host that took its hostname from the header
|
|
13
|
+
(Express's `trust proxy`) trusts the proxy that wrote it. No option to set: what the host resolved says which one it
|
|
14
|
+
believes. The write guard (`crossSiteWrites`), the sign-in's login-CSRF check and `createOriginGuardMiddleware`
|
|
15
|
+
share it.
|
|
16
|
+
|
|
17
|
+
## Server
|
|
18
|
+
- **`ctx.oauth`: OAuth 2.0 for a space's code, any provider** (`@plitzi/sdk-server`, `@plitzi/sdk-shared`): a
|
|
19
|
+
connection is data in `defineFunctions({ oauth: { calendar: { issuer | authorizeUrl + tokenUrl, credential, scopes,
|
|
20
|
+
authorizeParams, clientAuth } } })` — an OpenID provider by its `issuer` (endpoints discovered), any other by its
|
|
21
|
+
endpoints; none is known to the platform by name. `ctx.oauth.connect(name, { returnTo, owner? })` answers the
|
|
22
|
+
consent URL (authorization code with PKCE); the platform answers `/fn/oauth/callback` — the one address to register
|
|
23
|
+
with every provider — exchanges the code with the app's id and secret from the named credential, and sends the
|
|
24
|
+
visitor back to `returnTo` with `?oauth=<name>&oauth_result=connected` (or `&oauth_error=`). `ctx.oauth.fetch(name,
|
|
25
|
+
url)` writes the token in, renewed before it lapses and once more on a 401, only to `allow.hosts`; `status` and
|
|
26
|
+
`disconnect` (revoked where the provider says). A token is a signed-in visitor's own by default, `{ owner: 'space' }`
|
|
27
|
+
the space's, or a key of the code's own; it is kept in the space's `kv` sealed with a key of the space's that no
|
|
28
|
+
`ctx.sign` reaches, so the code never holds one. In the sandbox, natively and in a space's runtime alike; a plugin's
|
|
29
|
+
functions declare and reach none. Needs `signingSecret`. Runs also carry the `origin` of the request that started
|
|
30
|
+
them (`ctx.origin` of a task context), what the callback address is made of.
|
|
31
|
+
|
|
32
|
+
## Packages
|
|
33
|
+
- **No path a package does not export is written anywhere in the packages** (`@plitzi/plitzi-sdk`,
|
|
34
|
+
`@plitzi/sdk-shared`): two JSDoc comments sent readers to `@plitzi/sdk-authoring/testing`, which is not an entry —
|
|
35
|
+
`inspectRenders` is exported by `@plitzi/sdk-authoring`. `yarn check:specifiers` (in CI after the build) reads every
|
|
36
|
+
`@plitzi/<package>/<path>` the workspace writes — the code, its built declarations, JSDoc, skills and docs — against
|
|
37
|
+
what that package exports, so an import somebody would copy into a project and get `ERR_MODULE_NOT_FOUND` from cannot
|
|
38
|
+
be published again.
|
|
39
|
+
|
|
40
|
+
- **The packages that run in Node say which Node** (`@plitzi/sdk-server`, `@plitzi/cli`, `@plitzi/sdk-mcp`,
|
|
41
|
+
`@plitzi/sdk-authoring`): `"engines": { "node": ">=22.18" }`, the floor every project the CLI makes already declares —
|
|
42
|
+
installed on an older Node they now say so, instead of failing on the first API it lacks (`--env-file-if-exists`,
|
|
43
|
+
`--permission`, `Set#union`). The browser's packages declare none: a bundler reads them.
|
|
44
|
+
|
|
45
|
+
- **A short render guide, and each part of it alone** (`@plitzi/sdk-mcp`): `renderGuideText` stays the whole guide
|
|
46
|
+
(~30k characters); `renderGuideCore` is a third of it for an agent that counts its tokens — a voice assistant, a small
|
|
47
|
+
model — with the model of a render, the element types, the host's theme and what to do on a refusal, and the address
|
|
48
|
+
of every other section; `renderGuideTopics[topic]` and `renderGuideTopicUri(topic)` (`plitzi://render/guide/repeat`,
|
|
49
|
+
`…/data`…) serve each one, cut from the one text. The MCP server answers them as resources and through `plitzi_read`.
|
|
50
|
+
|
|
51
|
+
## CLI
|
|
52
|
+
- **What Plitzi decided reaches the agent writing a report** (`@plitzi/cli`): `plitzi feedback`'s brief lists what was
|
|
53
|
+
reported and kept as it is — with why, and what to do instead — so a report files it under `changed` as `decided`
|
|
54
|
+
rather than carrying it as open, and the page has that status.
|
|
55
|
+
|
|
56
|
+
- **The CLI skill says what `ERR_MODULE_NOT_FOUND` into a `@plitzi` package's `dist` is** (`@plitzi/cli`): an import of
|
|
57
|
+
a path the package does not export — a file rather than its folder — with `plitzi doctor` to name each one and
|
|
58
|
+
`plitzi upgrade migrations --write` to rewrite it.
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [c7c241a]
|
|
61
|
+
- @plitzi/sdk-auth@0.38.20
|
|
62
|
+
- @plitzi/sdk-event-bridge@0.38.20
|
|
63
|
+
- @plitzi/sdk-interactions@0.38.20
|
|
64
|
+
- @plitzi/sdk-navigation@0.38.20
|
|
65
|
+
- @plitzi/sdk-schema@0.38.20
|
|
66
|
+
- @plitzi/sdk-shared@0.38.20
|
|
67
|
+
|
|
68
|
+
## 0.38.19
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- 92a9f1b: ## Security
|
|
73
|
+
|
|
74
|
+
- **The `Origin` fallback tells the ports apart over HTTP/2 too** (`@plitzi/sdk-server`): a browser that sends no
|
|
75
|
+
`Sec-Fetch-Site` (Safari before 16.4, older webviews) is judged by its `Origin`, compared with the authority the
|
|
76
|
+
request was addressed to. HTTP/2 carries no `Host` header — the authority is `:authority` — and the comparison then
|
|
77
|
+
fell back to the host's NAME, so every port and scheme of it counted as this server's own: what 0.38.18 closed for
|
|
78
|
+
`same-site` stayed open there, over TLS, where a Plitzi server speaks HTTP/2. The authority is now `:authority`,
|
|
79
|
+
`Host`, or the `X-Forwarded-Host` a proxy in front wrote — whichever names the host the request is answered as — port
|
|
80
|
+
included; when none does, the origin is not taken as its own. The write guard (`crossSiteWrites`), the sign-in's
|
|
81
|
+
login-CSRF check and `createOriginGuardMiddleware` share it.
|
|
82
|
+
|
|
83
|
+
## Packages
|
|
84
|
+
- **The server evaluates rules without the query editor** (`@plitzi/sdk-shared`, `@plitzi/sdk-auth`,
|
|
85
|
+
`@plitzi/sdk-elements`, `@plitzi/sdk-interactions`, `@plitzi/plitzi-builder`): every evaluation of a `when` rule
|
|
86
|
+
group imports `QueryBuilderEvaluator` from `@plitzi/plitzi-ui/QueryBuilder/evaluator` — the evaluator alone — instead
|
|
87
|
+
of the `QueryBuilder` barrel, which brings the editor's React components, or `QueryBuilder/helpers`, which brings the
|
|
88
|
+
SQL and MongoDB formatters. `@plitzi/sdk-shared/helpers` reads `get` and `omit` from `@plitzi/plitzi-ui/helpers/lodash`.
|
|
89
|
+
Importing `@plitzi/sdk-server` loads 19 modules of `@plitzi/plitzi-ui` (26 before) and neither
|
|
90
|
+
`class-variance-authority` nor `clsx`, and starts in ~125 ms (~150 before). Needs `@plitzi/plitzi-ui` 1.6.34.
|
|
91
|
+
|
|
92
|
+
- Updated dependencies [92a9f1b]
|
|
93
|
+
- @plitzi/sdk-auth@0.38.19
|
|
94
|
+
- @plitzi/sdk-event-bridge@0.38.19
|
|
95
|
+
- @plitzi/sdk-interactions@0.38.19
|
|
96
|
+
- @plitzi/sdk-navigation@0.38.19
|
|
97
|
+
- @plitzi/sdk-schema@0.38.19
|
|
98
|
+
- @plitzi/sdk-shared@0.38.19
|
|
99
|
+
|
|
3
100
|
## 0.38.18
|
|
4
101
|
|
|
5
102
|
### Patch Changes
|
|
@@ -26,7 +26,7 @@ import Se from "clsx";
|
|
|
26
26
|
import { currentRscLocation as Ce } from "@plitzi/sdk-shared/server";
|
|
27
27
|
import { InteractionsContext as we } from "@plitzi/sdk-interactions";
|
|
28
28
|
import { getSourceName as Te } from "@plitzi/sdk-shared/dataSource/helpers";
|
|
29
|
-
import { QueryBuilderEvaluator as Ee } from "@plitzi/plitzi-ui/QueryBuilder";
|
|
29
|
+
import { QueryBuilderEvaluator as Ee } from "@plitzi/plitzi-ui/QueryBuilder/evaluator";
|
|
30
30
|
import { useServerQuery as De } from "@plitzi/sdk-shared/queries";
|
|
31
31
|
//#region src/elements/provider/ApiContainer/ApiContainer.tsx
|
|
32
32
|
var s = ({ ref: t, className: s = "", children: c, query: l = "", method: u = "get", accessToken: d = "", when: f = a, headers: p = a, mockData: m = "{}", subType: Oe = "", credentials: ke = "same-origin", singleRecord: Ae = !1, pagination: je = "none", pageParam: Me = "page", renderWhileLoading: Ne = !1, loadingSlot: h = "", cache: Pe = !1, staleTime: Fe = 30, gcTime: Ie = 300, refreshSeconds: Le = 0, connector: Re = "", action: ze = "", input: Be }) => {
|
|
@@ -3,24 +3,24 @@ import t from "./components/FiltersInput/index.mjs";
|
|
|
3
3
|
import { useCallback as n, useMemo as r, useState as i } from "react";
|
|
4
4
|
import { useBuilderStore as a, useCommonStore as o, useSdkStore as s } from "@plitzi/sdk-shared/store";
|
|
5
5
|
import { emptyObject as ee } from "@plitzi/sdk-shared/helpers";
|
|
6
|
-
import { get as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import { useTheme as
|
|
9
|
-
import
|
|
10
|
-
import f from "@plitzi/plitzi-ui/
|
|
11
|
-
import p from "@plitzi/plitzi-ui/
|
|
12
|
-
import m from "@plitzi/plitzi-ui/
|
|
13
|
-
import h from "@plitzi/plitzi-ui/
|
|
6
|
+
import { get as te } from "@plitzi/plitzi-ui/helpers";
|
|
7
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import { useTheme as ne } from "@plitzi/sdk-shared/theme";
|
|
9
|
+
import d from "@plitzi/plitzi-ui/CodeMirror";
|
|
10
|
+
import f from "@plitzi/plitzi-ui/Input";
|
|
11
|
+
import p from "@plitzi/plitzi-ui/Select";
|
|
12
|
+
import m from "@plitzi/plitzi-ui/KVInput";
|
|
13
|
+
import h from "@plitzi/plitzi-ui/QueryBuilder";
|
|
14
14
|
import g from "@plitzi/plitzi-ui/Switch";
|
|
15
15
|
//#region src/elements/provider/ApiContainer/Settings.tsx
|
|
16
16
|
var _ = [], v = ({ query: v = "", method: y = "get", accessToken: b = "", headers: x = ee, when: S, subType: C = "", mockData: re = "{}", credentials: ie = "same-origin", runtime: ae = "client", connector: w = "", action: T = "", endpoint: oe = "", resource: se = "", limit: ce = "10", singleRecord: E = !1, filters: D = _, pagination: O = "none", pageParam: k = "page", renderWhileLoading: A = !1, loadingSlot: j = "", cache: M = !1, staleTime: N = 30, gcTime: P = 300, refreshSeconds: F = 0, onUpdate: I }) => {
|
|
17
|
-
let { resolvedTheme: L } =
|
|
17
|
+
let { resolvedTheme: L } = ne(), [R] = a("pageDefinitions"), [z] = a("connectors"), [B] = o("actions.catalog"), [V] = a("hasServerRendering"), [H, U] = i(!1), W = ae === "server", G = W ? T && !w ? "action" : "connector" : "client", [[K, q, J]] = s([
|
|
18
18
|
"navigation.routeParams",
|
|
19
19
|
"navigation.queryParams",
|
|
20
20
|
"navigation.currentPageId"
|
|
21
21
|
]), Y = e(I), le = n((e) => I?.("query", e), [I]), ue = n((e) => I?.("when", e), [I]), de = n((e) => I?.("subType", e), [I]), fe = n((e) => I?.("mockData", e), [I]), pe = n((e) => U(e.target.checked), []), me = n((e, t) => I?.("headers", t), [I]), he = n((e) => {
|
|
22
22
|
e === "client" ? I?.("runtime", "client", !0) : (I?.("runtime", "server", !0), I?.(e === "action" ? "connector" : "action", ""));
|
|
23
|
-
}, [I]), ge = n((e) => I?.("singleRecord", e.target.checked), [I]), _e = n((e) => I?.("loadingSlot", e), [I]), ve = n((e) => I?.("renderWhileLoading", e.target.checked), [I]), ye = n((e) => I?.("cache", e.target.checked), [I]), be = n((e) => I?.("filters", e), [I]), X = r(() => Object.values(z), [z]), Z = r(() => X.find((e) => e.identifier === w)?.manifest, [X, w]), xe = r(() => Object.keys(Z?.operators ?? {}), [Z]), Q = r(() => Object.keys(Z?.endpoints.read ?? {}), [Z]), $ = r(() => [...
|
|
23
|
+
}, [I]), ge = n((e) => I?.("singleRecord", e.target.checked), [I]), _e = n((e) => I?.("loadingSlot", e), [I]), ve = n((e) => I?.("renderWhileLoading", e.target.checked), [I]), ye = n((e) => I?.("cache", e.target.checked), [I]), be = n((e) => I?.("filters", e), [I]), X = r(() => Object.values(z), [z]), Z = r(() => X.find((e) => e.identifier === w)?.manifest, [X, w]), xe = r(() => Object.keys(Z?.operators ?? {}), [Z]), Q = r(() => Object.keys(Z?.endpoints.read ?? {}), [Z]), $ = r(() => [...te(R, `${J}.attributes.slug`, "").matchAll(/:[a-z0-9_-]+/gim)].map((e) => e[0].slice(1)), [R, J]), Se = r(() => [
|
|
24
24
|
...Object.keys(K),
|
|
25
25
|
...Object.keys(q),
|
|
26
26
|
...$
|
|
@@ -32,30 +32,30 @@ var _ = [], v = ({ query: v = "", method: y = "get", accessToken: b = "", header
|
|
|
32
32
|
q,
|
|
33
33
|
$
|
|
34
34
|
]);
|
|
35
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ u("div", {
|
|
36
36
|
className: "flex grow flex-col gap-4 py-2",
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ u(p, {
|
|
39
39
|
value: G,
|
|
40
40
|
label: "Data Source",
|
|
41
41
|
onChange: he,
|
|
42
42
|
size: "xs",
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ l("option", {
|
|
45
45
|
value: "client",
|
|
46
46
|
children: "Browser request"
|
|
47
47
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ l("option", {
|
|
49
49
|
value: "connector",
|
|
50
50
|
children: "Connector (server-side)"
|
|
51
51
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ l("option", {
|
|
53
53
|
value: "action",
|
|
54
54
|
children: "Server action (server-side)"
|
|
55
55
|
})
|
|
56
56
|
]
|
|
57
57
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ u("span", {
|
|
59
59
|
className: "text-xs text-gray-500 dark:text-zinc-400",
|
|
60
60
|
children: [
|
|
61
61
|
G === "connector" && "The server calls the API and hands the page its records. The endpoint and the credential never reach the browser, and the content is in the HTML search engines see.",
|
|
@@ -63,55 +63,55 @@ var _ = [], v = ({ query: v = "", method: y = "get", accessToken: b = "", header
|
|
|
63
63
|
G === "client" && "The browser calls the URL directly. Anything it needs to authenticate with is visible to the visitor, and the content is not in the initial HTML."
|
|
64
64
|
]
|
|
65
65
|
}),
|
|
66
|
-
G === "action" && /* @__PURE__ */
|
|
66
|
+
G === "action" && /* @__PURE__ */ u(c, { children: [B?.length === 0 && /* @__PURE__ */ l("div", {
|
|
67
67
|
className: "rounded-sm border border-gray-300 p-2 text-xs text-gray-500 dark:border-zinc-600 dark:text-zinc-400",
|
|
68
68
|
children: "No actions yet. Add one in the Actions panel and give it a “While a page renders” trigger — that is the way in this element uses."
|
|
69
|
-
}), /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ u(p, {
|
|
70
70
|
value: T,
|
|
71
71
|
label: "Action",
|
|
72
72
|
onChange: Y.text("action"),
|
|
73
73
|
size: "xs",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ l("option", {
|
|
75
75
|
value: "",
|
|
76
76
|
children: "Select an action…"
|
|
77
|
-
}), (B ?? []).map((e) => /* @__PURE__ */
|
|
77
|
+
}), (B ?? []).map((e) => /* @__PURE__ */ l("option", {
|
|
78
78
|
value: e.identifier,
|
|
79
79
|
children: e.name
|
|
80
80
|
}, e.identifier))]
|
|
81
81
|
})] }),
|
|
82
|
-
W && !V && /* @__PURE__ */
|
|
82
|
+
W && !V && /* @__PURE__ */ l("div", {
|
|
83
83
|
className: "rounded-sm border border-yellow-300 bg-yellow-50 p-2 text-xs text-yellow-800 dark:border-yellow-700 dark:bg-yellow-950 dark:text-yellow-200",
|
|
84
84
|
children: "This space has no server-rendered deployment. It resolves here in the builder, but a published page would have no server to resolve it — publish with a Plitzi SSR credential, or read the API from the browser instead."
|
|
85
85
|
}),
|
|
86
|
-
G === "connector" && /* @__PURE__ */
|
|
87
|
-
X.length === 0 && /* @__PURE__ */
|
|
86
|
+
G === "connector" && /* @__PURE__ */ u(c, { children: [
|
|
87
|
+
X.length === 0 && /* @__PURE__ */ l("div", {
|
|
88
88
|
className: "rounded-sm border border-gray-300 p-2 text-xs text-gray-500 dark:border-zinc-600 dark:text-zinc-400",
|
|
89
89
|
children: "No connectors yet. Add one in the Connectors panel — it holds the API endpoints, and the credential stays on the server."
|
|
90
90
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ u(p, {
|
|
92
92
|
value: w,
|
|
93
93
|
label: "Connector",
|
|
94
94
|
onChange: Y.text("connector"),
|
|
95
95
|
size: "xs",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ l("option", {
|
|
97
97
|
value: "",
|
|
98
98
|
children: "Select a connector…"
|
|
99
|
-
}), X.map((e) => /* @__PURE__ */
|
|
99
|
+
}), X.map((e) => /* @__PURE__ */ l("option", {
|
|
100
100
|
value: e.identifier,
|
|
101
101
|
children: e.name
|
|
102
102
|
}, e.identifier))]
|
|
103
103
|
}),
|
|
104
|
-
Q.length > 1 && /* @__PURE__ */
|
|
104
|
+
Q.length > 1 && /* @__PURE__ */ l(p, {
|
|
105
105
|
value: oe,
|
|
106
106
|
label: "Endpoint",
|
|
107
107
|
onChange: Y.text("endpoint"),
|
|
108
108
|
size: "xs",
|
|
109
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
109
|
+
children: Q.map((e) => /* @__PURE__ */ l("option", {
|
|
110
110
|
value: e,
|
|
111
111
|
children: e
|
|
112
112
|
}, e))
|
|
113
113
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ l(f, {
|
|
115
115
|
value: se,
|
|
116
116
|
label: "Resource",
|
|
117
117
|
placeholder: "posts",
|
|
@@ -119,45 +119,45 @@ var _ = [], v = ({ query: v = "", method: y = "get", accessToken: b = "", header
|
|
|
119
119
|
onChange: Y.text("resource"),
|
|
120
120
|
size: "xs"
|
|
121
121
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ l(t, {
|
|
123
123
|
value: D,
|
|
124
124
|
operators: xe,
|
|
125
125
|
onChange: be
|
|
126
126
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ l(g, {
|
|
128
128
|
checked: E,
|
|
129
129
|
size: "sm",
|
|
130
130
|
label: "Single record (detail page)",
|
|
131
131
|
onChange: ge
|
|
132
132
|
}),
|
|
133
|
-
!E && /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
133
|
+
!E && /* @__PURE__ */ u(c, { children: [
|
|
134
|
+
/* @__PURE__ */ l(f, {
|
|
135
135
|
value: ce,
|
|
136
136
|
label: "Records per page",
|
|
137
137
|
onChange: Y.text("limit"),
|
|
138
138
|
size: "xs"
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ u(p, {
|
|
141
141
|
value: O,
|
|
142
142
|
label: "Pagination",
|
|
143
143
|
onChange: Y.text("pagination"),
|
|
144
144
|
size: "xs",
|
|
145
145
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ l("option", {
|
|
147
147
|
value: "none",
|
|
148
148
|
children: "None"
|
|
149
149
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ l("option", {
|
|
151
151
|
value: "url",
|
|
152
152
|
children: "URL (indexable)"
|
|
153
153
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ l("option", {
|
|
155
155
|
value: "append",
|
|
156
156
|
children: "Load more"
|
|
157
157
|
})
|
|
158
158
|
]
|
|
159
159
|
}),
|
|
160
|
-
O !== "none" && /* @__PURE__ */
|
|
160
|
+
O !== "none" && /* @__PURE__ */ l(f, {
|
|
161
161
|
value: k,
|
|
162
162
|
label: "Page parameter",
|
|
163
163
|
title: "Query-string key this list pages on. Give each list its own so they page independently.",
|
|
@@ -166,10 +166,10 @@ var _ = [], v = ({ query: v = "", method: y = "get", accessToken: b = "", header
|
|
|
166
166
|
})
|
|
167
167
|
] })
|
|
168
168
|
] }),
|
|
169
|
-
!W && /* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
169
|
+
!W && /* @__PURE__ */ u(c, { children: [
|
|
170
|
+
/* @__PURE__ */ u("div", {
|
|
171
171
|
className: "flex flex-col",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ l("label", { children: "Query" }), /* @__PURE__ */ l(d, {
|
|
173
173
|
className: "min-h-6.5 basis-auto rounded-sm border border-gray-300 px-1 text-xs",
|
|
174
174
|
value: v,
|
|
175
175
|
theme: L,
|
|
@@ -180,79 +180,79 @@ var _ = [], v = ({ query: v = "", method: y = "get", accessToken: b = "", header
|
|
|
180
180
|
onChange: le
|
|
181
181
|
})]
|
|
182
182
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ u(p, {
|
|
184
184
|
value: y,
|
|
185
185
|
label: "Method",
|
|
186
186
|
onChange: Y.text("method"),
|
|
187
187
|
size: "xs",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ l("option", {
|
|
189
189
|
value: "get",
|
|
190
190
|
children: "Get"
|
|
191
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ l("option", {
|
|
192
192
|
value: "post",
|
|
193
193
|
children: "Post"
|
|
194
194
|
})]
|
|
195
195
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ l(f, {
|
|
197
197
|
value: b,
|
|
198
198
|
label: "Access Token",
|
|
199
199
|
title: "Bind this to the signed-in visitor's token. A value typed here is saved in the page and served to\n every visitor — put anything secret behind a connector instead.",
|
|
200
200
|
onChange: Y.text("accessToken"),
|
|
201
201
|
size: "xs"
|
|
202
202
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ u(p, {
|
|
204
204
|
value: ie,
|
|
205
205
|
label: "Include Credentials",
|
|
206
206
|
onChange: Y.text("credentials"),
|
|
207
207
|
size: "xs",
|
|
208
208
|
children: [
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ l("option", {
|
|
210
210
|
value: "include",
|
|
211
211
|
children: "Include"
|
|
212
212
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ l("option", {
|
|
214
214
|
value: "omit",
|
|
215
215
|
children: "Omit"
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ l("option", {
|
|
218
218
|
value: "same-origin",
|
|
219
219
|
children: "Same Origin"
|
|
220
220
|
})
|
|
221
221
|
]
|
|
222
222
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ l(g, {
|
|
224
224
|
checked: M,
|
|
225
225
|
size: "sm",
|
|
226
226
|
label: "Cache responses",
|
|
227
227
|
onChange: ye
|
|
228
228
|
}),
|
|
229
|
-
M && /* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
229
|
+
M && /* @__PURE__ */ u(c, { children: [
|
|
230
|
+
/* @__PURE__ */ l(f, {
|
|
231
231
|
value: String(N),
|
|
232
232
|
label: "Fresh for (s)",
|
|
233
233
|
title: "How long an answer is reused without asking again — here and by every provider requesting the\n same thing. Past it, the answer stays on screen while a fresh one is fetched. 0 asks on every mount.",
|
|
234
234
|
onChange: Y.text("staleTime"),
|
|
235
235
|
size: "xs"
|
|
236
236
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ l(f, {
|
|
238
238
|
value: String(P),
|
|
239
239
|
label: "Keep unused for (s)",
|
|
240
240
|
title: "How long an answer nobody is showing is kept, so coming back to it within that time paints at once.",
|
|
241
241
|
onChange: Y.text("gcTime"),
|
|
242
242
|
size: "xs"
|
|
243
243
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ l("div", {
|
|
245
245
|
className: "rounded-sm border border-gray-300 p-2 text-xs text-gray-500 dark:border-zinc-600 dark:text-zinc-400",
|
|
246
246
|
children: "A completed server action refreshes every cached request, in case it changed what they read. On its step, “Refresh cached requests” can name only the containers it affects, or none for an action that only reads. A webhook step can do the same."
|
|
247
247
|
})
|
|
248
248
|
] }),
|
|
249
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ l(g, {
|
|
250
250
|
checked: A,
|
|
251
251
|
size: "sm",
|
|
252
252
|
label: "Render children while loading",
|
|
253
253
|
onChange: ve
|
|
254
254
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ l(f, {
|
|
256
256
|
value: j,
|
|
257
257
|
label: "Loading slot",
|
|
258
258
|
placeholder: "catalog-skeleton",
|
|
@@ -261,29 +261,29 @@ var _ = [], v = ({ query: v = "", method: y = "get", accessToken: b = "", header
|
|
|
261
261
|
onChange: _e
|
|
262
262
|
})
|
|
263
263
|
] }),
|
|
264
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ l(f, {
|
|
265
265
|
value: String(F),
|
|
266
266
|
label: "Refresh every (s)",
|
|
267
267
|
title: "Asks again on its own this often, for a page showing something that keeps moving. Paused while the tab\n is hidden. 0 never does.",
|
|
268
268
|
onChange: Y.text("refreshSeconds"),
|
|
269
269
|
size: "xs"
|
|
270
270
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ l(g, {
|
|
272
272
|
checked: H,
|
|
273
273
|
size: "sm",
|
|
274
274
|
label: "Advanced Settings",
|
|
275
275
|
onChange: pe
|
|
276
276
|
}),
|
|
277
|
-
H && /* @__PURE__ */
|
|
278
|
-
/* @__PURE__ */
|
|
277
|
+
H && /* @__PURE__ */ u(c, { children: [
|
|
278
|
+
/* @__PURE__ */ l(m, {
|
|
279
279
|
value: Object.entries(x),
|
|
280
280
|
label: "Headers",
|
|
281
281
|
onChange: me,
|
|
282
282
|
size: "xs"
|
|
283
283
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ u("div", {
|
|
285
285
|
className: "flex flex-col",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ l("label", { children: "When to perform query request" }), /* @__PURE__ */ l(h, {
|
|
287
287
|
direction: "vertical",
|
|
288
288
|
className: "w-full",
|
|
289
289
|
size: "xs",
|
|
@@ -292,62 +292,62 @@ var _ = [], v = ({ query: v = "", method: y = "get", accessToken: b = "", header
|
|
|
292
292
|
showBranches: !0
|
|
293
293
|
})]
|
|
294
294
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ u(p, {
|
|
296
296
|
value: C,
|
|
297
297
|
label: "Container Tag",
|
|
298
298
|
onChange: de,
|
|
299
299
|
size: "xs",
|
|
300
300
|
children: [
|
|
301
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ l("option", {
|
|
302
302
|
value: "",
|
|
303
303
|
children: "None"
|
|
304
304
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ l("option", {
|
|
306
306
|
value: "div",
|
|
307
307
|
children: "Div"
|
|
308
308
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ l("option", {
|
|
310
310
|
value: "header",
|
|
311
311
|
children: "Header"
|
|
312
312
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ l("option", {
|
|
314
314
|
value: "footer",
|
|
315
315
|
children: "Footer"
|
|
316
316
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ l("option", {
|
|
318
318
|
value: "nav",
|
|
319
319
|
children: "Nav"
|
|
320
320
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ l("option", {
|
|
322
322
|
value: "main",
|
|
323
323
|
children: "Main"
|
|
324
324
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ l("option", {
|
|
326
326
|
value: "section",
|
|
327
327
|
children: "Section"
|
|
328
328
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ l("option", {
|
|
330
330
|
value: "article",
|
|
331
331
|
children: "Article"
|
|
332
332
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ l("option", {
|
|
334
334
|
value: "aside",
|
|
335
335
|
children: "Aside"
|
|
336
336
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ l("option", {
|
|
338
338
|
value: "address",
|
|
339
339
|
children: "Address"
|
|
340
340
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ l("option", {
|
|
342
342
|
value: "figure",
|
|
343
343
|
children: "Figure"
|
|
344
344
|
})
|
|
345
345
|
]
|
|
346
346
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ l("div", { className: "my-2 h-px w-full border border-gray-300 bg-gray-300" }),
|
|
348
|
+
/* @__PURE__ */ u("div", {
|
|
349
349
|
className: "flex min-h-50 grow flex-col",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ l("label", { children: "Mock Data (Build Mode)" }), /* @__PURE__ */ l(d, {
|
|
351
351
|
value: re,
|
|
352
352
|
theme: L,
|
|
353
353
|
mode: "json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-elements",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.20",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@dr.pogodin/react-helmet": "^3.3.2",
|
|
34
34
|
"@plitzi/nexus": "^1.4.0",
|
|
35
|
-
"@plitzi/plitzi-ui": "^1.6.
|
|
36
|
-
"@plitzi/sdk-auth": "0.38.
|
|
37
|
-
"@plitzi/sdk-event-bridge": "0.38.
|
|
38
|
-
"@plitzi/sdk-interactions": "0.38.
|
|
39
|
-
"@plitzi/sdk-navigation": "0.38.
|
|
40
|
-
"@plitzi/sdk-schema": "0.38.
|
|
41
|
-
"@plitzi/sdk-shared": "0.38.
|
|
35
|
+
"@plitzi/plitzi-ui": "^1.6.34",
|
|
36
|
+
"@plitzi/sdk-auth": "0.38.20",
|
|
37
|
+
"@plitzi/sdk-event-bridge": "0.38.20",
|
|
38
|
+
"@plitzi/sdk-interactions": "0.38.20",
|
|
39
|
+
"@plitzi/sdk-navigation": "0.38.20",
|
|
40
|
+
"@plitzi/sdk-schema": "0.38.20",
|
|
41
|
+
"@plitzi/sdk-shared": "0.38.20",
|
|
42
42
|
"clsx": "^2.1.1",
|
|
43
43
|
"immer": "^11.1.21",
|
|
44
44
|
"react-markdown": "^10.1.0",
|