@plitzi/sdk-shared 0.38.15 → 0.38.16
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 +61 -0
- package/dist/activity/describe.d.ts +6 -0
- package/dist/activity/describe.mjs +22 -0
- package/dist/activity/guard.d.ts +6 -0
- package/dist/activity/guard.mjs +13 -0
- package/dist/activity/index.d.ts +3 -0
- package/dist/activity/index.mjs +4 -0
- package/dist/activity/types.d.ts +94 -0
- package/dist/activity/types.mjs +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +98 -95
- package/dist/store/index.d.ts +11 -11
- package/dist/types/BuilderTypes.d.ts +8 -0
- package/dist/types/ServerTypes.d.ts +10 -1
- package/package.json +21 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# @plitzi/sdk-shared
|
|
2
2
|
|
|
3
|
+
## 0.38.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9cfdccb: ## Security
|
|
8
|
+
|
|
9
|
+
- **A site's credential reads nothing of the space over MCP** (`@plitzi/sdk-mcp`): the `render` token every published
|
|
10
|
+
page embeds — and a self-hosting `host` key — resolved to a grant naming the space, and the MCP served every read
|
|
11
|
+
under it: the unpublished draft, the change history with who made each change and every value before and after, the
|
|
12
|
+
functions' source, the space's private data, its action documents and connectors. Only an `agent` grant attaches a
|
|
13
|
+
space now; any other is a connection with no space (`plitzi_render` and the public guides), told so in the words
|
|
14
|
+
`NO_SPACE_ATTACHED` already uses. A deployment whose `getGrant` answered other scopes for reading must issue agent
|
|
15
|
+
grants for them.
|
|
16
|
+
|
|
17
|
+
## Agents
|
|
18
|
+
- **`plitzi space watch`** (`@plitzi/cli`): the space read again on every save of `src/space/`, `src/plugins/`,
|
|
19
|
+
`src/data/` or `public/data/`, and only what changed said — what the save did to the space element by element, the
|
|
20
|
+
findings and warnings it brought and fixed (one that only moved down its file is the same one), a save that changed
|
|
21
|
+
nothing, or that the space stopped authoring and why. `--json` is one event a line (`ready`, `pass`, `refused`,
|
|
22
|
+
`error`), for an agent to run in the background instead of `author` and `space lint` after every edit. Each pass reads
|
|
23
|
+
the space in a process of its own (`space watch-pass`, hidden). `space lint`'s reading is `spaceFindings`, shared.
|
|
24
|
+
- **A space's activity, followed** (`@plitzi/sdk-shared`, `@plitzi/sdk-mcp`, `@plitzi/cli`): what happened on a space
|
|
25
|
+
after a cursor — its draft changed (a person in the builder, an agent, the autofix), a version went out, a server
|
|
26
|
+
action failed or was refused — and, with nothing yet, waited for, up to 50 s. One vocabulary,
|
|
27
|
+
`@plitzi/sdk-shared/activity` (`SpaceActivity`, `SpaceActivityPage`, `activityLine`, `isSpaceActivityPage`, the
|
|
28
|
+
limits); the reader's own writes left out and counted (`skippedMine`), `mine` keeps them.
|
|
29
|
+
- **`plitzi_activity { after, wait, limit, mine }`** (`@plitzi/sdk-mcp`), on the new `getActivity` adapter
|
|
30
|
+
(`SSRAdapters`). The listing budget is 78k (was 77k) for it.
|
|
31
|
+
- **`plitzi space activity [--follow] [--after <cursor>] [--mine] [--limit <n>] [--json]`** (`@plitzi/cli`), over
|
|
32
|
+
the platform's `GET /spaces/:spaceId/activity`; `--follow` stays, one page a line with `--json`, and asks again
|
|
33
|
+
when the platform does not answer.
|
|
34
|
+
- **The people in the builder see the agent work** (`@plitzi/sdk-server`, `@plitzi/sdk-shared`, `@plitzi/sdk-mcp`,
|
|
35
|
+
`@plitzi/plitzi-builder`): an agent grant carries the application the member connected (`Grant.client`,
|
|
36
|
+
`StoredSpaceToken.client`, `SSRGrant.client`), and every MCP write `SSRWriteContext.client` — the history's
|
|
37
|
+
`client` for an agent, which was never set. A collaborator may be an agent (`SubscriptionCollaborator.agent`): the
|
|
38
|
+
builder draws it as a robot, names it `Claude · for ana` (`collaboratorTitle`) in the header, on the canvas and in
|
|
39
|
+
its notices. The deployment announces it — Plitzi's joins it on a write, selects what it changed, and lets it go
|
|
40
|
+
after a minute of nothing. `activityLine` names it the same way (`Claude for ana over the MCP, …`), so
|
|
41
|
+
`plitzi space activity` says which application wrote.
|
|
42
|
+
- A tool may declare `documents: false` (`ToolSpec`): the host loads none of the space for it, and passes the call's
|
|
43
|
+
abort signal through `ToolContext.activity`.
|
|
44
|
+
|
|
45
|
+
## Authoring
|
|
46
|
+
- **A file that does not parse is said at its line under any loader** (`@plitzi/sdk-authoring`): `moduleProblem` read
|
|
47
|
+
the first line of the error, and an esbuild transform (tsx, vitest) puts only `Transform failed with 1 error:` there
|
|
48
|
+
— the file, line and what is wrong are on the next. A line of the message that points at a file of the project is
|
|
49
|
+
now the problem (`src/space/hero.ts:139: Expected "}" but found ";"`), the project's root matched as given and as it
|
|
50
|
+
is on disk (`/var/…` and `/private/var/…` on macOS).
|
|
51
|
+
|
|
52
|
+
## Testing
|
|
53
|
+
- **`unusedPort` is chosen where the system never hands one out** (`@plitzi/sdk-server`): it answered a port the system
|
|
54
|
+
had just handed out (`listen(0)`), from the ephemeral range every outgoing connection takes its local port from — so
|
|
55
|
+
another worker's request could take it before the test listened, and CI failed `runtime.test.ts` with `EADDRINUSE`
|
|
56
|
+
(the page server then ends the process). It is a free port below that range now, at random, checked first.
|
|
57
|
+
|
|
58
|
+
## Docs
|
|
59
|
+
- **A self-hosted runtime's endpoints go in `data`**, as 0.38.15 moved them: `docs/en/runtimes.md`, the
|
|
60
|
+
`10-runtime` example and the website still put `served.stage` in `preAuth`, before the cross-site guard.
|
|
61
|
+
- New: `docs/en/activity.md`; `space watch` in `docs/en/agent-tooling.md`'s loop; the CLI README, the CLI skill, the
|
|
62
|
+
generated project's `AGENTS.md`, the MCP guide and README.
|
|
63
|
+
|
|
3
64
|
## 0.38.15
|
|
4
65
|
|
|
5
66
|
### Patch Changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SpaceActivity } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* One activity, in a line a person scans: who did what, and where — the same words the builder's history and activity
|
|
4
|
+
* use. Its time is the reader's to add, in the zone it shows times in.
|
|
5
|
+
*/
|
|
6
|
+
export declare const activityLine: (activity: SpaceActivity) => string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/activity/describe.ts
|
|
2
|
+
var e = {
|
|
3
|
+
builder: "in the builder",
|
|
4
|
+
mcp: "over the MCP",
|
|
5
|
+
autofix: "by the autofix",
|
|
6
|
+
api: "through the API",
|
|
7
|
+
system: "by the platform"
|
|
8
|
+
}, t = (e) => e || "somebody", n = (e) => {
|
|
9
|
+
let t = e.split("\n").filter((e) => e.trim() !== "");
|
|
10
|
+
return t.length === 0 ? "changed it" : t.length === 1 ? t[0] : `${t[0]} (+${String(t.length - 1)} more)`;
|
|
11
|
+
}, r = (r) => {
|
|
12
|
+
switch (r.kind) {
|
|
13
|
+
case "change": return `${r.origin === "mcp" && r.client ? `${r.client} for ${t(r.author.name)}` : t(r.author.name)} ${e[r.origin] ?? r.origin}, ${r.document} #${String(r.seq)}: ${n(r.summary)}`;
|
|
14
|
+
case "publish": return r.message;
|
|
15
|
+
case "action": {
|
|
16
|
+
let e = r.reason ?? r.error;
|
|
17
|
+
return `action ${r.actionId} (${r.trigger}) ${r.status}${e ? `: ${e}` : ""}`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as activityLine };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SpaceActivityPage } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a reply is a page of activity — what a client checks the platform's answer against before reading it, an
|
|
4
|
+
* answer from a server of another version included.
|
|
5
|
+
*/
|
|
6
|
+
export declare const isSpaceActivityPage: (value: unknown) => value is SpaceActivityPage;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
|
+
//#region src/activity/guard.ts
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
if (!e(t) || typeof t.at != "number") return !1;
|
|
5
|
+
switch (t.kind) {
|
|
6
|
+
case "change": return typeof t.seq == "number" && typeof t.summary == "string" && typeof t.origin == "string" && e(t.author) && Array.isArray(t.touched);
|
|
7
|
+
case "publish": return typeof t.message == "string" && e(t.author);
|
|
8
|
+
case "action": return typeof t.actionId == "string" && typeof t.status == "string";
|
|
9
|
+
default: return !1;
|
|
10
|
+
}
|
|
11
|
+
}, n = (n) => e(n) && Array.isArray(n.activity) && n.activity.every(t) && typeof n.cursor == "string" && typeof n.more == "boolean" && typeof n.waitedMs == "number" && typeof n.skippedMine == "number";
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n as isSpaceActivityPage };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { activityLine as e } from "./describe.mjs";
|
|
2
|
+
import { isSpaceActivityPage as t } from "./guard.mjs";
|
|
3
|
+
import { ACTIVITY_LIMIT_DEFAULT as n, ACTIVITY_LIMIT_MAX as r, ACTIVITY_TOUCHED_MAX as i, ACTIVITY_WAIT_DEFAULT_SECONDS as a, ACTIVITY_WAIT_MAX_SECONDS as o } from "./types.mjs";
|
|
4
|
+
export { n as ACTIVITY_LIMIT_DEFAULT, r as ACTIVITY_LIMIT_MAX, i as ACTIVITY_TOUCHED_MAX, a as ACTIVITY_WAIT_DEFAULT_SECONDS, o as ACTIVITY_WAIT_MAX_SECONDS, e as activityLine, t as isSpaceActivityPage };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ChangeAuthor, ChangeDocument, ChangeOrigin } from '../history/types';
|
|
2
|
+
/**
|
|
3
|
+
* What happened on a space, as an agent or a person following it reads it: the draft changed, a version went out, an
|
|
4
|
+
* action failed. One vocabulary for the three surfaces that read it — the MCP's `plitzi_activity`, the CLI's
|
|
5
|
+
* `plitzi space activity` and the platform's `GET /spaces/:spaceId/activity` — so none of them describes it again.
|
|
6
|
+
*
|
|
7
|
+
* Each kind is read off a record the platform already keeps — the change history, the space's log, the action runs —
|
|
8
|
+
* so the activity is never a second copy that could disagree with them.
|
|
9
|
+
*/
|
|
10
|
+
/** The draft changed: one save, by whoever made it, through whichever channel. */
|
|
11
|
+
export type ChangeActivity = {
|
|
12
|
+
kind: 'change';
|
|
13
|
+
/** Milliseconds, UTC. */
|
|
14
|
+
at: number;
|
|
15
|
+
/** Its place in the draft's change history: what `plitzi://changes/main/{seq}` reads whole. */
|
|
16
|
+
seq: number;
|
|
17
|
+
document: ChangeDocument;
|
|
18
|
+
author: ChangeAuthor;
|
|
19
|
+
origin: ChangeOrigin;
|
|
20
|
+
/** The MCP client's name, or the builder tab's instance id. */
|
|
21
|
+
client?: string;
|
|
22
|
+
/** One line per thing it did, as the builder's history says it. */
|
|
23
|
+
summary: string;
|
|
24
|
+
/** What it touched, by id — elements, selectors, tokens, files — at most {@link ACTIVITY_TOUCHED_MAX}. */
|
|
25
|
+
touched: string[];
|
|
26
|
+
/** How many more it touched than `touched` lists. */
|
|
27
|
+
moreTouched?: number;
|
|
28
|
+
};
|
|
29
|
+
/** A version of the space went out: published to an environment, its flags published, or deployed. */
|
|
30
|
+
export type PublishActivity = {
|
|
31
|
+
kind: 'publish';
|
|
32
|
+
at: number;
|
|
33
|
+
author: ChangeAuthor;
|
|
34
|
+
/** `publish` — a version or its flags — or `deployment`, to a CDN. */
|
|
35
|
+
what: 'publish' | 'deployment';
|
|
36
|
+
environment?: string;
|
|
37
|
+
/** The space's log line, as the builder's activity shows it. */
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
/** A server action did not complete, or a call to one was refused. A run that completed is not news. */
|
|
41
|
+
export type ActionActivity = {
|
|
42
|
+
kind: 'action';
|
|
43
|
+
at: number;
|
|
44
|
+
actionId: string;
|
|
45
|
+
trigger: string;
|
|
46
|
+
/** `refused`, or how a run that did not complete ended. */
|
|
47
|
+
status: string;
|
|
48
|
+
environment?: string;
|
|
49
|
+
/** The run, for `GET /spaces/:spaceId/actions/runs/:runId`. Absent on a refusal. */
|
|
50
|
+
runId?: string;
|
|
51
|
+
/** Why it failed, or the refusal's detail — redacted before it was recorded. */
|
|
52
|
+
error?: string;
|
|
53
|
+
/** Why it was refused. */
|
|
54
|
+
reason?: string;
|
|
55
|
+
};
|
|
56
|
+
export type SpaceActivity = ChangeActivity | PublishActivity | ActionActivity;
|
|
57
|
+
export type SpaceActivityKind = SpaceActivity['kind'];
|
|
58
|
+
/** What to read: everything after a cursor, waiting for it when there is nothing yet. */
|
|
59
|
+
export type SpaceActivityQuery = {
|
|
60
|
+
/**
|
|
61
|
+
* The `cursor` of the last page read. Left out: the latest activity, and the cursor to follow it from — never a
|
|
62
|
+
* wait, since there is nothing yet to wait after.
|
|
63
|
+
*/
|
|
64
|
+
after?: string;
|
|
65
|
+
/** How long to wait for something when nothing is there yet, in seconds, up to {@link ACTIVITY_WAIT_MAX_SECONDS}. */
|
|
66
|
+
wait?: number;
|
|
67
|
+
/** At most this many, up to {@link ACTIVITY_LIMIT_MAX}. */
|
|
68
|
+
limit?: number;
|
|
69
|
+
/** Include the reader's own changes: those made by the same person through the channel it reads from. */
|
|
70
|
+
mine?: boolean;
|
|
71
|
+
};
|
|
72
|
+
/** Who reads, so their own writes can be told apart: the person, and the channel their writes are recorded under. */
|
|
73
|
+
export type ActivityReader = {
|
|
74
|
+
userId?: number;
|
|
75
|
+
origin: ChangeOrigin;
|
|
76
|
+
};
|
|
77
|
+
/** A page of activity, oldest first. */
|
|
78
|
+
export type SpaceActivityPage = {
|
|
79
|
+
activity: SpaceActivity[];
|
|
80
|
+
/** Pass as `after` to read what comes next. It moves past what was left out too. */
|
|
81
|
+
cursor: string;
|
|
82
|
+
/** More was there than one page holds: read again at once. */
|
|
83
|
+
more: boolean;
|
|
84
|
+
/** How long it waited before answering, in milliseconds: 0 when something was already there. */
|
|
85
|
+
waitedMs: number;
|
|
86
|
+
/** The reader's own changes it left out (`mine` includes them), so leaving them out is never silent. */
|
|
87
|
+
skippedMine: number;
|
|
88
|
+
};
|
|
89
|
+
/** Long enough to be worth a call, short enough for every client and gateway in between: most cut a request at 60 s. */
|
|
90
|
+
export declare const ACTIVITY_WAIT_MAX_SECONDS = 50;
|
|
91
|
+
export declare const ACTIVITY_WAIT_DEFAULT_SECONDS = 45;
|
|
92
|
+
export declare const ACTIVITY_LIMIT_DEFAULT = 20;
|
|
93
|
+
export declare const ACTIVITY_LIMIT_MAX = 100;
|
|
94
|
+
export declare const ACTIVITY_TOUCHED_MAX = 20;
|
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,96 +1,99 @@
|
|
|
1
1
|
import { isRecord as e } from "./helpers/isRecord.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import
|
|
32
|
-
import ve from "./
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import {
|
|
46
|
-
import
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import
|
|
50
|
-
import it from "./
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import
|
|
76
|
-
import Yn from "./
|
|
77
|
-
import {
|
|
78
|
-
import
|
|
79
|
-
import nr from "./network/
|
|
80
|
-
import rr from "./
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import {
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import
|
|
92
|
-
import Hr from "./
|
|
93
|
-
import Ur from "./server/
|
|
94
|
-
import
|
|
95
|
-
import
|
|
96
|
-
|
|
2
|
+
import { activityLine as t } from "./activity/describe.mjs";
|
|
3
|
+
import { isSpaceActivityPage as n } from "./activity/guard.mjs";
|
|
4
|
+
import { ACTIVITY_LIMIT_DEFAULT as r, ACTIVITY_LIMIT_MAX as i, ACTIVITY_TOUCHED_MAX as a, ACTIVITY_WAIT_DEFAULT_SECONDS as o, ACTIVITY_WAIT_MAX_SECONDS as s } from "./activity/types.mjs";
|
|
5
|
+
import { authFailureFromResponse as c, onAuthFailure as l, reportAuthFailure as u, sameRegistrableDomain as d } from "./auth/failureChannel.mjs";
|
|
6
|
+
import { VISITOR_NAME as f, checkVisitorRoles as p, visitorAccess as m } from "./auth/visitorRoles.mjs";
|
|
7
|
+
import { filters as h } from "./helpers/twigWrapper/filters/filters.mjs";
|
|
8
|
+
import { processTwig as g, processTwigParam as _, processTwigValue as v } from "./helpers/twigWrapper/processTwig/processTwig.mjs";
|
|
9
|
+
import { hasTemplateSyntax as y } from "./helpers/twigWrapper/tokens/hasTemplateSyntax.mjs";
|
|
10
|
+
import { hasValidToken as b } from "./helpers/twigWrapper/tokens/hasValidToken.mjs";
|
|
11
|
+
import { MAX_PARAM_PASSES as x, resolveStepParam as S } from "./helpers/twigWrapper/processTwig/resolveStepParam.mjs";
|
|
12
|
+
import { inspectTemplate as C } from "./helpers/twigWrapper/inspectTemplate.mjs";
|
|
13
|
+
import { templatePaths as w, templateRootNames as T } from "./helpers/twigWrapper/templateRoots.mjs";
|
|
14
|
+
import E from "./builder/contexts/BuilderContext.mjs";
|
|
15
|
+
import { contexts_exports as D } from "./builder/contexts/index.mjs";
|
|
16
|
+
import { BODYLESS_METHODS as O, CONNECTOR_HTTP_METHODS as k, DEFAULT_READ_ENDPOINT as A, EMPTY_RESPONSE_METHODS as j, READ_ENDPOINT_NAMES as M, WRITE_ENDPOINT_NAMES as N } from "./connectors/constants.mjs";
|
|
17
|
+
import { connectorTokens as P, getConnectorTokens as F } from "./connectors/manifestTokens.mjs";
|
|
18
|
+
import { connectorPresets as I, emptyManifest as L } from "./connectors/presets.mjs";
|
|
19
|
+
import { isConnectorManifestDraft as R, validateConnectorManifest as z } from "./connectors/validateManifest.mjs";
|
|
20
|
+
import { COMPUTED_GLOBALS as B, GLOBAL_SOURCES as V } from "./dataSource/globalSources.mjs";
|
|
21
|
+
import { evaluateComputed as H, liveSources as U } from "./dataSource/computed.mjs";
|
|
22
|
+
import W from "./helpers/fetchManifest.mjs";
|
|
23
|
+
import G from "./helpers/generateFacade.mjs";
|
|
24
|
+
import K from "./helpers/syntaxHighlight.mjs";
|
|
25
|
+
import { cookieFromHeader as q, documentCookies as J } from "./helpers/cookies.mjs";
|
|
26
|
+
import { elementOf as Y, isElementTarget as X, isNodeTarget as Z, nodeOf as Q } from "./helpers/eventTarget.mjs";
|
|
27
|
+
import { formatDate as $, formatDateUTC as ee, formatFromNow as te, formatUTCToLocal as ne, getDurationMs as re, isValidFormat as ie, parseDate as ae, toUnixSeconds as oe } from "./helpers/formatDate.mjs";
|
|
28
|
+
import { INTERVAL_TRIGGER as se, MIN_INTERVAL_MS as ce, intervalOf as le } from "./helpers/interval.mjs";
|
|
29
|
+
import { isDate as ue } from "./helpers/isDate.mjs";
|
|
30
|
+
import { isUserEdit as de } from "./helpers/reducerOrigin.mjs";
|
|
31
|
+
import { evaluateRuleGroup as fe } from "./helpers/ruleEvaluator.mjs";
|
|
32
|
+
import { ParamsFromURL as pe, delay as me, emptyObject as he, getDisplayName as ge, getKeyDecoded as _e, getPathsFromObject as ve, hexToRGB as ye, isInViewport as be, makeId as xe } from "./helpers/utils.mjs";
|
|
33
|
+
import { disableReactDevTools as Se } from "./helpers/security.mjs";
|
|
34
|
+
import Ce, { utilityOptions as we } from "./dataSource/utility/index.mjs";
|
|
35
|
+
import Te from "./dataSource/getBindingsDetails.mjs";
|
|
36
|
+
import Ee from "./dataSource/helpers/getSourceName.mjs";
|
|
37
|
+
import De from "./dataSource/hooks/useRegisterSource.mjs";
|
|
38
|
+
import Oe from "./hooks/useStableValue.mjs";
|
|
39
|
+
import ke from "./dataSource/resolveVariables.mjs";
|
|
40
|
+
import Ae from "./dataSource/hooks/useResolvedVariables.mjs";
|
|
41
|
+
import je from "./devTools/DevToolsContext.mjs";
|
|
42
|
+
import { DEV_TOOLS_ATTRIBUTE as Me, HIDE_DEV_TOOLS_CSS as Ne } from "./devTools/chrome.mjs";
|
|
43
|
+
import { debugCookieName as Pe } from "./devTools/debugCookie.mjs";
|
|
44
|
+
import Fe from "./devTools/interactionLog.mjs";
|
|
45
|
+
import Ie, { createStoreDevToolsLogger as Le, pConsole as Re } from "./devTools/utils/PlitziConsole.mjs";
|
|
46
|
+
import ze from "./elements/ComponentContext.mjs";
|
|
47
|
+
import { FLAG_GATE_PATTERN as Be, FLAG_NAME_PATTERN as Ve, isFlagName as He, isSchemaFlag as Ue } from "./flags/schemaFlag.mjs";
|
|
48
|
+
import { flagsCookieName as We, forcedFlagsFromCookies as Ge, parseFlagList as Ke, serializeFlagList as qe, withForcedFlag as Je, writeForcedFlags as Ye } from "./flags/flagsCookie.mjs";
|
|
49
|
+
import { FLAG_LAYERS as Xe, flagUserFromSSR as Ze, flagValues as Qe, hasConditions as $e, passesFlagGate as et, resolveFlags as tt, undeclaredFlagOverrides as nt } from "./flags/resolveFlags.mjs";
|
|
50
|
+
import { describeChange as rt, fieldChanges as it, uniqueLines as at } from "./history/describe.mjs";
|
|
51
|
+
import { diffSchema as ot, diffStyle as st, jsonCopy as ct, sameValue as lt } from "./history/diff.mjs";
|
|
52
|
+
import ut from "./hooks/useFontHead.mjs";
|
|
53
|
+
import dt from "./hooks/useNetwork.mjs";
|
|
54
|
+
import ft, { PlitziContext as pt, PlitziProvider as mt } from "./hooks/usePlitzi.mjs";
|
|
55
|
+
import { WHILE_RUNNING_MODES as ht } from "./types/SchemaTypes.mjs";
|
|
56
|
+
import { StyleVariableCategory as gt, isStyleVariableCategory as _t } from "./types/StyleTypes.mjs";
|
|
57
|
+
import vt, { EMPTY_STYLE_SCHEMA as yt, StyleBindingsAllowed as bt, baseDefaultValue as xt, inheritableAttributesBase as St } from "./style/styleConstants.mjs";
|
|
58
|
+
import { DISPLAY_MODE_MIN_WIDTH as Ct, displayModeAt as wt, displayModeWidthRem as Tt } from "./style/breakpoints.mjs";
|
|
59
|
+
import { PLUGIN_CSS_LAYER as Et, RUNTIME_CSS_LAYER as Dt, inPluginLayer as Ot } from "./style/cssLayers.mjs";
|
|
60
|
+
import { DISPLAY_MODES as kt, isDisplayMode as At } from "./style/displayModes.mjs";
|
|
61
|
+
import { fontLinkAssets as jt } from "./style/fontAssets.mjs";
|
|
62
|
+
import { SYSTEM_FONTS as Mt, availableFonts as Nt, familiesInCss as Pt, fontFamilyStack as Ft, fontUrlResolver as It, fontsToHead as Lt, googleCss2Url as Rt, googleTextSubsetUrl as zt, isSafeFontUrl as Bt, primaryFamily as Vt } from "./style/fonts.mjs";
|
|
63
|
+
import { FontValidationError as Ht, parseSpaceFont as Ut } from "./style/fontValidation.mjs";
|
|
64
|
+
import { fallbackForFamily as Wt, fontsFromCss as Gt } from "./style/fontsFromCss.mjs";
|
|
65
|
+
import { LAYOUT_GRIDS as Kt, layoutGridCss as qt, layoutGridLook as Jt } from "./style/layoutGrid.mjs";
|
|
66
|
+
import { RUNTIME_STYLE_ID as Yt, markStyleCache as Xt, styleCacheFromDocument as Zt, styleCacheTravelsInDocument as Qt } from "./style/runtimeStyle.mjs";
|
|
67
|
+
import { mergeSnippetStyle as $t, sameSelector as en, selectorsOf as tn } from "./style/snippetStyle.mjs";
|
|
68
|
+
import { MOTION_CONDITIONS as nn, STYLE_CONDITION_LABELS as rn, STYLE_MOTION_CONDITIONS as an, canonicalCondition as on, conditionAtRule as sn, conditionLabel as cn, conditionOfAtRule as ln, isStyleCondition as un, parseContainerCondition as dn } from "./style/styleConditions.mjs";
|
|
69
|
+
import { CONTENT_PSEUDOS as fn, GENERATED_PSEUDOS as pn, PSEUDO_PROPERTIES as mn, STYLE_PSEUDOS as hn, STYLE_PSEUDO_LABELS as gn, isContentValue as _n, isStylePseudo as vn, pseudoHonours as yn, pseudoSuffix as bn } from "./style/stylePseudos.mjs";
|
|
70
|
+
import { CURRENT_SELECTOR as xn, EXPANDED_SELECTOR as Sn, HIDDEN_CLASS as Cn, PARENT_ANCESTOR as wn, STYLE_STATES as Tn, STYLE_STATE_LABELS as En, inCascadeOrder as Dn, isKnownState as On, isParentAncestor as kn, isStartingState as An, stateSuffix as jn } from "./style/styleStates.mjs";
|
|
71
|
+
import { isStyleRules as Mn, setAtKeys as Nn, styleTargetKeys as Pn, styleTargetProblem as Fn, styleTargetRules as In, valueAtKeys as Ln } from "./style/styleTarget.mjs";
|
|
72
|
+
import Rn from "./schema/SchemaContext.mjs";
|
|
73
|
+
import { ANCHOR_PATTERN as zn, anchorOf as Bn, isAnchor as Vn, uniqueAnchor as Hn } from "./schema/anchor.mjs";
|
|
74
|
+
import { COMPONENT_PROPS_SOURCE as Un, EMPTY_SCHEMA as Wn, VARIABLE_REGEX as Gn } from "./schema/schemaConstants.mjs";
|
|
75
|
+
import { findLayoutCycle as Kn, resolveLayoutChain as qn } from "./schema/layoutChain.mjs";
|
|
76
|
+
import { collectServerElements as Jn, hasServerElements as Yn, notFoundProvider as Xn, pageNotFound as Zn, pageSeoText as Qn, pageServerContext as $n } from "./schema/serverElements.mjs";
|
|
77
|
+
import { isSnippet as er } from "./schema/snippet.mjs";
|
|
78
|
+
import tr from "./network/NetworkContext.mjs";
|
|
79
|
+
import nr from "./network/NetworkInternalContext.mjs";
|
|
80
|
+
import { elementFromWire as rr, schemaFromWire as ir, schemaToWire as ar } from "./schema/wire.mjs";
|
|
81
|
+
import { SpaceEvents as or, spaceEventSchemas as sr, validateSpaceEvent as cr } from "./network/spaceEvents.mjs";
|
|
82
|
+
import lr from "./network/graphql/builder/Mutations/index.mjs";
|
|
83
|
+
import ur from "./network/graphql/builder/Queries/index.mjs";
|
|
84
|
+
import dr from "./network/graphql/builder/Subscriptions/index.mjs";
|
|
85
|
+
import fr from "./network/graphql/sdk/Mutations/index.mjs";
|
|
86
|
+
import pr from "./network/graphql/sdk/Queries/index.mjs";
|
|
87
|
+
import mr, { RTEvent as hr, RTEventCloseCode as gr, getInstance as _r, isRTEvent as vr, isRTEventCloseCode as yr, setInstance as br } from "./websockets/RTCodec.mjs";
|
|
88
|
+
import { THEME_CLASSES as xr, THEME_COOKIE_NAME as Sr, applyThemeClass as Cr, isTheme as wr, readThemeCookie as Tr, themeFromCookies as Er, writeThemeCookie as Dr } from "./theme/themeCookie.mjs";
|
|
89
|
+
import Or, { createThemeState as kr, createThemeStore as Ar, resolveScheme as jr, setAreaTheme as Mr, setMachineScheme as Nr, setThemeMode as Pr, startingThemeState as Fr, themeFor as Ir } from "./theme/themeStore.mjs";
|
|
90
|
+
import { ThemeStartContext as Lr, useThemeState as Rr, useThemeStore as zr } from "./theme/ThemeScope.mjs";
|
|
91
|
+
import Br from "./theme/ThemeProvider.mjs";
|
|
92
|
+
import Vr, { SPACE_THEME_AREA as Hr } from "./theme/useTheme.mjs";
|
|
93
|
+
import Ur from "./server/actions/useActionsSync.mjs";
|
|
94
|
+
import Wr, { cancelRsc as Gr, currentRscLocation as Kr, releaseRscRequests as qr, rscDataPath as Jr } from "./server/rsc/refreshRsc.mjs";
|
|
95
|
+
import Yr from "./server/rsc/useRscRefresh.mjs";
|
|
96
|
+
import Xr from "./server/rsc/useRscSync.mjs";
|
|
97
|
+
import { PAINTED_STATE_BUDGET as Zr, clearPaintedEntry as Qr, paintedEntryFromCookies as $r, paintedKeys as ei, paintedStateCookieName as ti, paintedStateFor as ni, pickPainted as ri, readPaintedEntry as ii, writePaintedEntry as ai } from "./state/paintedState.mjs";
|
|
98
|
+
import { runtimeStatePersist as oi, stateOwner as si } from "./state/runtimeStatePersist.mjs";
|
|
99
|
+
export { r as ACTIVITY_LIMIT_DEFAULT, i as ACTIVITY_LIMIT_MAX, a as ACTIVITY_TOUCHED_MAX, o as ACTIVITY_WAIT_DEFAULT_SECONDS, s as ACTIVITY_WAIT_MAX_SECONDS, zn as ANCHOR_PATTERN, O as BODYLESS_METHODS, E as BuilderContext, lr as BuilderMutations, ur as BuilderQueries, Un as COMPONENT_PROPS_SOURCE, B as COMPUTED_GLOBALS, k as CONNECTOR_HTTP_METHODS, fn as CONTENT_PSEUDOS, xn as CURRENT_SELECTOR, ze as ComponentContext, A as DEFAULT_READ_ENDPOINT, Me as DEV_TOOLS_ATTRIBUTE, kt as DISPLAY_MODES, Ct as DISPLAY_MODE_MIN_WIDTH, je as DevToolsContext, j as EMPTY_RESPONSE_METHODS, Wn as EMPTY_SCHEMA, yt as EMPTY_STYLE_SCHEMA, Sn as EXPANDED_SELECTOR, Be as FLAG_GATE_PATTERN, Xe as FLAG_LAYERS, Ve as FLAG_NAME_PATTERN, Ht as FontValidationError, pn as GENERATED_PSEUDOS, V as GLOBAL_SOURCES, Cn as HIDDEN_CLASS, Ne as HIDE_DEV_TOOLS_CSS, se as INTERVAL_TRIGGER, Kt as LAYOUT_GRIDS, x as MAX_PARAM_PASSES, ce as MIN_INTERVAL_MS, nn as MOTION_CONDITIONS, tr as NetworkContext, nr as NetworkInternalContext, Zr as PAINTED_STATE_BUDGET, wn as PARENT_ANCESTOR, Et as PLUGIN_CSS_LAYER, mn as PSEUDO_PROPERTIES, pe as ParamsFromURL, Ie as PlitziConsole, pt as PlitziContext, mt as PlitziProvider, M as READ_ENDPOINT_NAMES, mr as RTCodec, hr as RTEvent, gr as RTEventCloseCode, Dt as RUNTIME_CSS_LAYER, Yt as RUNTIME_STYLE_ID, Hr as SPACE_THEME_AREA, rn as STYLE_CONDITION_LABELS, an as STYLE_MOTION_CONDITIONS, hn as STYLE_PSEUDOS, gn as STYLE_PSEUDO_LABELS, Tn as STYLE_STATES, En as STYLE_STATE_LABELS, Mt as SYSTEM_FONTS, Rn as SchemaContext, fr as SdkMutations, pr as SdkQueries, dr as SpaceEventSubscription, or as SpaceEvents, bt as StyleBindingsAllowed, gt as StyleVariableCategory, xr as THEME_CLASSES, Sr as THEME_COOKIE_NAME, Br as ThemeProvider, Lr as ThemeStartContext, Gn as VARIABLE_REGEX, f as VISITOR_NAME, ht as WHILE_RUNNING_MODES, N as WRITE_ENDPOINT_NAMES, t as activityLine, Bn as anchorOf, Cr as applyThemeClass, c as authFailureFromResponse, Nt as availableFonts, xt as baseDefaultValue, Gr as cancelRsc, on as canonicalCondition, p as checkVisitorRoles, Qr as clearPaintedEntry, Jn as collectServerElements, sn as conditionAtRule, cn as conditionLabel, ln as conditionOfAtRule, I as connectorPresets, P as connectorTokens, D as contexts, q as cookieFromHeader, Le as createStoreDevToolsLogger, kr as createThemeState, Ar as createThemeStore, Kr as currentRscLocation, Pe as debugCookieName, me as delay, rt as describeChange, ot as diffSchema, st as diffStyle, Se as disableReactDevTools, wt as displayModeAt, Tt as displayModeWidthRem, J as documentCookies, rr as elementFromWire, Y as elementOf, L as emptyManifest, he as emptyObject, H as evaluateComputed, fe as evaluateRuleGroup, Wt as fallbackForFamily, Pt as familiesInCss, W as fetchManifest, it as fieldChanges, h as filters, Kn as findLayoutCycle, Ze as flagUserFromSSR, Qe as flagValues, We as flagsCookieName, Ft as fontFamilyStack, jt as fontLinkAssets, It as fontUrlResolver, Gt as fontsFromCss, Lt as fontsToHead, Ge as forcedFlagsFromCookies, $ as formatDate, ee as formatDateUTC, te as formatFromNow, ne as formatUTCToLocal, G as generateFacade, Te as getBindingsDetails, F as getConnectorTokens, ge as getDisplayName, re as getDurationMs, _r as getInstance, _e as getKeyDecoded, ve as getPathsFromObject, Ee as getSourceName, Rt as googleCss2Url, zt as googleTextSubsetUrl, $e as hasConditions, Yn as hasServerElements, y as hasTemplateSyntax, b as hasValidToken, ye as hexToRGB, Dn as inCascadeOrder, Ot as inPluginLayer, St as inheritableAttributesBase, C as inspectTemplate, le as intervalOf, Vn as isAnchor, R as isConnectorManifestDraft, _n as isContentValue, ue as isDate, At as isDisplayMode, X as isElementTarget, He as isFlagName, be as isInViewport, Fe as isInteractionFlow, On as isKnownState, Z as isNodeTarget, kn as isParentAncestor, vr as isRTEvent, yr as isRTEventCloseCode, e as isRecord, Bt as isSafeFontUrl, Ue as isSchemaFlag, er as isSnippet, n as isSpaceActivityPage, An as isStartingState, un as isStyleCondition, vn as isStylePseudo, Mn as isStyleRules, _t as isStyleVariableCategory, wr as isTheme, de as isUserEdit, ie as isValidFormat, ct as jsonCopy, qt as layoutGridCss, Jt as layoutGridLook, U as liveSources, xe as makeId, Xt as markStyleCache, $t as mergeSnippetStyle, Q as nodeOf, Xn as notFoundProvider, l as onAuthFailure, Re as pConsole, Zn as pageNotFound, Qn as pageSeoText, $n as pageServerContext, $r as paintedEntryFromCookies, ei as paintedKeys, ti as paintedStateCookieName, ni as paintedStateFor, dn as parseContainerCondition, ae as parseDate, Ke as parseFlagList, Ut as parseSpaceFont, et as passesFlagGate, ri as pickPainted, Vt as primaryFamily, g as processTwig, _ as processTwigParam, v as processTwigValue, yn as pseudoHonours, bn as pseudoSuffix, ii as readPaintedEntry, Tr as readThemeCookie, Wr as refreshRsc, qr as releaseRscRequests, u as reportAuthFailure, tt as resolveFlags, qn as resolveLayoutChain, jr as resolveScheme, S as resolveStepParam, ke as resolveVariables, Jr as rscDataPath, oi as runtimeStatePersist, d as sameRegistrableDomain, en as sameSelector, lt as sameValue, ir as schemaFromWire, ar as schemaToWire, tn as selectorsOf, qe as serializeFlagList, Mr as setAreaTheme, Nn as setAtKeys, br as setInstance, Nr as setMachineScheme, Pr as setThemeMode, sr as spaceEventSchemas, Fr as startingThemeState, si as stateOwner, jn as stateSuffix, Zt as styleCacheFromDocument, Qt as styleCacheTravelsInDocument, vt as styleConstants, Pn as styleTargetKeys, Fn as styleTargetProblem, In as styleTargetRules, K as syntaxHighlight, w as templatePaths, T as templateRootNames, Ir as themeFor, Er as themeFromCookies, Or as themeStore, oe as toUnixSeconds, nt as undeclaredFlagOverrides, Hn as uniqueAnchor, at as uniqueLines, Ur as useActionsSync, ut as useFontHead, dt as useNetwork, ft as usePlitzi, De as useRegisterSource, Ae as useResolvedVariables, Yr as useRscRefresh, Xr as useRscSync, Oe as useStableValue, Vr as useTheme, Rr as useThemeState, zr as useThemeStore, Ce as utility, we as utilityOptions, z as validateConnectorManifest, cr as validateSpaceEvent, Ln as valueAtKeys, m as visitorAccess, Je as withForcedFlag, Ye as writeForcedFlags, ai as writePaintedEntry, Dr as writeThemeCookie };
|