@plitzi/sdk-shared 0.38.5 → 0.38.7

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +210 -0
  2. package/dist/dataSource/globalSources.d.ts +34 -1
  3. package/dist/dataSource/globalSources.mjs +22 -2
  4. package/dist/dataSource/hooks/index.d.ts +2 -1
  5. package/dist/dataSource/hooks/index.mjs +2 -1
  6. package/dist/dataSource/hooks/useResolvedVariables.d.ts +12 -0
  7. package/dist/dataSource/hooks/useResolvedVariables.mjs +28 -0
  8. package/dist/dataSource/index.mjs +2 -1
  9. package/dist/dataSource/resolveVariables.d.ts +2 -2
  10. package/dist/flags/useFlagResolution.mjs +6 -6
  11. package/dist/index.mjs +62 -58
  12. package/dist/network/spaceEvents.d.ts +30 -0
  13. package/dist/network/spaceEvents.mjs +150 -147
  14. package/dist/project/layout.d.ts +197 -0
  15. package/dist/project/layout.mjs +394 -0
  16. package/dist/project/paths.d.ts +84 -0
  17. package/dist/project/paths.mjs +4 -0
  18. package/dist/project/root.d.ts +24 -0
  19. package/dist/project/root.mjs +26 -0
  20. package/dist/queries/index.d.ts +12 -2
  21. package/dist/queries/index.mjs +27 -17
  22. package/dist/queries/serverQueries.d.ts +22 -0
  23. package/dist/queries/serverQueries.mjs +9 -0
  24. package/dist/queries/useServerQuery.d.ts +19 -0
  25. package/dist/queries/useServerQuery.mjs +21 -0
  26. package/dist/server/rsc/refreshRsc.d.ts +22 -10
  27. package/dist/server/rsc/refreshRsc.mjs +65 -53
  28. package/dist/server/rsc/useRscRefresh.d.ts +2 -1
  29. package/dist/server/rsc/useRscRefresh.mjs +1 -1
  30. package/dist/store/index.d.ts +45 -45
  31. package/dist/style/index.d.ts +3 -0
  32. package/dist/style/index.mjs +5 -2
  33. package/dist/style/keyframes.d.ts +39 -0
  34. package/dist/style/keyframes.mjs +41 -0
  35. package/dist/style/notifications.d.ts +34 -12
  36. package/dist/style/notifications.mjs +69 -32
  37. package/dist/style/styleConditions.d.ts +43 -0
  38. package/dist/style/styleConditions.mjs +29 -0
  39. package/dist/style/styleConstants.d.ts +3 -2
  40. package/dist/style/styleConstants.mjs +2 -0
  41. package/dist/style/stylePseudos.d.ts +40 -0
  42. package/dist/style/stylePseudos.mjs +109 -0
  43. package/dist/style/styleStates.d.ts +35 -8
  44. package/dist/style/styleStates.mjs +38 -15
  45. package/dist/style/styleTarget.d.ts +23 -0
  46. package/dist/style/styleTarget.mjs +35 -0
  47. package/dist/types/AuthTypes.d.ts +5 -0
  48. package/dist/types/CommonTypes.d.ts +12 -0
  49. package/dist/types/SchemaTypes.d.ts +2 -0
  50. package/dist/types/ServerTypes.d.ts +11 -4
  51. package/dist/types/StoreTypes.d.ts +5 -1
  52. package/dist/types/StyleTypes.d.ts +20 -2
  53. package/package.json +42 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,215 @@
1
1
  # @plitzi/sdk-shared
2
2
 
3
+ ## 0.38.7
4
+
5
+ ### Patch Changes
6
+
7
+ - c7bbc2b: ## A server project's `src/main.ts` is a few lines
8
+
9
+ - **`serveProject` from `@plitzi/sdk-server/project`**: the generated `src/main.ts` hands the space, its actions and
10
+ its options to the server, and the rest comes with the package — the port, the plugins of `src/plugins` and
11
+ `vendor/plugins`, the functions and runtime, `public/`, `src/data/`, the `kv` in `state/kv.json`, `/health`,
12
+ `tmp/dev-server.json` and the reloads while developing. A fix there arrives with `npm update`, not `plitzi upgrade`.
13
+ - **No more `tmp/space.json` while developing**: a saved space is authored again in its own process and handed to the
14
+ server over IPC (`plitzi/author.ts --ipc`, in place of `--out`); the server swaps it in memory and the open pages
15
+ reload, and a refused space keeps the last one that authored. `plitzi doctor` reports a leftover `tmp/space.json`.
16
+ - **`projectAuthoring()` in `@plitzi/sdk-authoring/node`**: what a project's space is checked against — its plugins'
17
+ declarations, its built plugins, its data files — once, for the server and `npm run author` alike. Neither it nor
18
+ `serveProject` takes a root: it is the working directory, where every script runs (`projectAuthoringAt(root)` for a
19
+ tool working on another folder).
20
+ - **`authorProjectSpace` and `projectSpace()` in `@plitzi/sdk-authoring/node`**: the project's space read from
21
+ `src/space/index.ts` — `dist/space/index.js` when the server runs built — once its root and layout are checked, and
22
+ authored. `src/main.ts` is `serveProject({ space: authorProjectSpace, actions, connectors, serverOptions })`, with no
23
+ import of the space; `plitzi/author.ts`, the visual tests and the CLI's checks read it the same way. A module that
24
+ exports no `space` is refused saying what to export (`ProjectSpaceError`).
25
+ - **`.env` lives at the root and Node reads it** as each script starts (`--env-file-if-exists=.env`; `start:dev`
26
+ preloads `@plitzi/sdk-server/env`, since a watched process would restart on every change beside the file). Settings
27
+ read at the top level of `src/config/serverOptions.ts` or the actions are set. Every project gets `.env` and
28
+ `.env.example`; `plitzi upgrade` removes the old `src/env.ts`.
29
+ - **One check of a project's layout** (`@plitzi/sdk-shared/project/layout`): a plugin folder with no entry, a
30
+ JavaScript entry, `src/plugin/` for `src/plugins/`, a `.env` inside `src/`, a space exported by default, a broken
31
+ `vendor/` plugin… The server refuses to boot listing every error with its fix, `npm run author` and the CLI's checks
32
+ refuse with the same words, `plitzi doctor` lists them under `layout` and `--fix` makes the ones with a single fix,
33
+ and `plitzi lint` points at doctor. A plugin folder added broken while developing is reported in the terminal
34
+ instead of failing in esbuild. Plugins may start at `index.tsx`.
35
+ - **`createJsonAdapters` serves documents held in memory**: `offlineData` may be a function returning them, not only a
36
+ path.
37
+ - **One source for a project's layout**, `@plitzi/sdk-shared/project/paths`; `src/config/serverOptions.ts` is typed
38
+ `ProjectServerOptions`. `plitzi upgrade files --write` brings an existing project's `main.ts` and `author.ts` up.
39
+ - **`npm run build` no longer fails on a plugin's stylesheet**: `tsconfig.build.json` includes `plitzi/assets.d.ts`,
40
+ which a space importing a plugin's declaration reaches through its component.
41
+
42
+ ## A write refreshes what shows it
43
+ - **Writes now refresh server-driven providers.** `runServerAction`, `webHook`, `writeRecord` and the
44
+ `invalidateQueries` step reach `runtime: 'server'` api containers by id, by `query` URL, or all of them, just as
45
+ they reach cached browser requests. Before, they reached only the browser's query cache, so a saved write left the
46
+ page showing the old value until a reload. Hidden providers refresh when they are shown.
47
+ - **A refresh because something changed asks around every cache.** `performQuery`, writes and invalidations send
48
+ `Cache-Control: no-cache`; `/_rsc` resolves such a request again instead of serving its cached slice, and keeps the
49
+ new answer. A `refreshSeconds` timer and a "load more" page still go through the caches.
50
+ - **`refreshRsc`'s fourth argument is an options object**, `{ location?, fresh? }`.
51
+
52
+ ## A space's functions read its data
53
+ - **`ctx.data('products.json')`** reads one file of the space's data (a project's `src/data/`), parsed and read-only,
54
+ as of the run's version. Plugins' functions are refused it.
55
+ - **Self-hosted servers read `dataDir` through the same lookup as the platform**, so `/data/<file>` providers and
56
+ `ctx.data` read the same files; `plitzi functions dev` reads `src/data`. `/data/../x.json` is now the provider's
57
+ error state instead of falling through to `publicDir`.
58
+ - **Importing a file outside `functions/` names the boundary and the fix**: read the space's data with
59
+ `ctx.data('<file>')`.
60
+
61
+ ## Signing in on a self-hosted server
62
+ - **`createServer({ auth })` tells the pages it renders where to sign in** (`server.auth`: provider, endpoints and
63
+ the session hint cookie), so a space signs in with no auth settings declared. Settings a space does declare still
64
+ win, and a space that names another provider ignores the server's description. New `pageAuth` server option, for a
65
+ deployment whose `/auth` flows are served by another host.
66
+ - **A page with no auth provider no longer offers `auth.login` / `auth.logout`**, and a sign-in that cannot work says
67
+ why in the console (`[plitzi] auth.login: …`) instead of failing silently. What a visitor keeps there
68
+ (`keepState`, `paintedState`) is the browser's, as on any space without accounts: what was kept as a guest's on such
69
+ a page before is let go once, on the first visit after the upgrade.
70
+ - **Renewal verifies the refresh token itself.** `findByRefreshToken` no longer has to report `refreshExpiresAt`; when
71
+ it does, it overrides the token's own expiry.
72
+ - **New authoring reference `auth.md`**: providers, `authLogin` and its result, `authLogout`, `{{ auth.* }}`,
73
+ `accessLevel`, visitor roles, action `access` and `ctx.user`.
74
+
75
+ ## Flows
76
+ - **Authoring refuses a `when` that asks a step for a key it never publishes** (`condition-field-unpublished`).
77
+ `whenSucceeded` / `whenFailed` after `authLogin` always ran the failure branch: they read a server action's
78
+ `status`. The message names what the step publishes and suggests testing `signedIn.ok` with `when`.
79
+ - **`explain` lists what a step publishes** (`Reads:`) and finds the auth steps by their builders (`authLogin`,
80
+ `authLogout`, `authRefreshDetails`). `authLogin({ username, password })` no longer needs `mode`.
81
+
82
+ ## Elements
83
+ - **Images no longer default to a 140×140 square**: they are 140px wide and as tall as their ratio, so `width` or
84
+ `aspect-ratio` on a class just works. `object-fit` shows in the builder too.
85
+ - **`formControl` with `subType: 'switch'` renders an on/off switch** (`role="switch"`) — it rendered only its label.
86
+ Checkboxes and switches show a `true` default or binding as ticked.
87
+ - **The theme toggle drops the native button look**, and the **`current` style state covers the chosen item of any
88
+ set**: the link to the page shown, a pressed toggle, a selected tab. The exported `CURRENT_PAGE_SELECTOR` is now
89
+ `CURRENT_SELECTOR`.
90
+ - **Element defaults in the style inspector and the MCP catalogue match what the SDK renders**, held by a test. The
91
+ dialog's `bodyContainer` and `headerCloseButton` slots now reach the page; pagination lays out as declared.
92
+ - **Markdown takes a class for each part of the document** through its own slot (`heading`, `paragraph`, `link`,
93
+ `list`, `listItem`, `quote`, `code`, `codeBlock`, `image`, `table`, `anchor`), and `headingLinks: false` drops the
94
+ link each heading offers to itself while keeping its id, so `/page#anchor` links still work. Its description spells
95
+ out the HTML it outputs.
96
+ - **Tabs show every trigger.** The SDK hid every inactive tab item, the header's included, so a set of tabs showed
97
+ one tab and no way to the others; only the body's panels take turns now.
98
+ - **A link that names a query is current only on that query**: of `/?window=6h` and `/?window=24h`, the one shown
99
+ carries `aria-current` — with the path alone, every one of them did. A link with no query is still current on its
100
+ page whatever the query.
101
+
102
+ ## The style language says what `customCss` used to
103
+ - **Pseudo-elements on a class**: `pseudos: { after: { css: { content: '"→"' }, states: { hover: { … } } } }` —
104
+ `before`, `after`, `marker`, `placeholder`, `first-letter`, `first-line`, `selection`, each in the class's states and
105
+ variants. Authoring refuses what draws nothing: a `before`/`after` with no `content`, a `content` without its quotes,
106
+ a property the browser drops on that pseudo-element.
107
+ - **Conditions on a class**: `conditions: { 'motion-reduce': { … }, 'container card (max-width: 30rem)': { … } }` —
108
+ reduced or allowed motion, and container widths, each with its states and pseudo-elements.
109
+ - **The space's `keyframes`**, validated and written at the top of `customCss`; an `animation-name` no keyframes declare
110
+ is warned (`animation-name-unknown`).
111
+ - **New states**: `expanded` (`aria-expanded`), `first`, `last`, `odd`, `even`; the tab panel on show is `current`, and
112
+ the theme toggle's icon of the scheme in use is `current` on its `icon` slot.
113
+ - **`ancestors['>']`** is the parent, whatever it wears — a closed component's part reacting to the element around it.
114
+ - The builder's style inspector, the MCP's definition ops (`pseudos`, `conditions`, and variants with their states) and
115
+ the export to code read and write all of it; an MCP `patchDefinition` no longer drops what it did not name. Rules in
116
+ `customCss` a class can hold now — `.link::after`, one under `@media (prefers-reduced-motion: reduce)`, `.row:first-child`,
117
+ `.row:nth-child(even)`, `.toggle[aria-expanded='true']` — are folded into the class on export and suggested by
118
+ `custom-css-class`.
119
+
120
+ ## Elements take a class for each part
121
+ - **`formControl`**: `field` (the `<input>` itself), `icon` (the show-password button) and `requiredMark` slots; a switch's
122
+ knob reads in dark mode and takes `--plitzi-switch-thumb`, `--plitzi-switch-thumb-checked`, `--plitzi-switch-thumb-shadow`.
123
+ - **`pagination`**: `previous`, `page` (the one shown is its `current` state), `next`, `loadMore`.
124
+ - **`richText`** and **`markdown`**: a slot per part — `heading` and `heading1`…`heading6`, `strong`, `emphasis`,
125
+ `divider`, `tableHead`, `tableRow`, `tableHeaderCell`, `tableCell`, and the code block's frame, header, language and
126
+ copy button. Both heading slots dress one `<h3>`, so `heading-level-overridden` warns when they set the same property
127
+ and the stylesheet's order makes the general one win. A document is drawn by the SDK's own renderer
128
+ (`MarkdownDocument` in `@plitzi/sdk-elements`) — plitzi-ui's `Markdown` keeps GitHub's stylesheet for a library's
129
+ consumers — and reads as a document unstyled: headings, lists, code, tables and quotes get their type from the SDK's
130
+ base layer, at no weight (`:where()`), so a class on a part's slot replaces what it sets property by property. A
131
+ `richText` body reads the same.
132
+ - `custom-css-slot` suggests the slot for a `customCss` rule on a part's SDK class — only where a class on the slot can
133
+ say the rest of the selector (a state, a pseudo-element); `element-slot-unknown` warns of a slot an element does not
134
+ have.
135
+
136
+ ## Links, refreshes and toasts
137
+ - **`current: 'section'` on a link** keeps it current on its page and every page under its path (`aria-current="true"`
138
+ there), styled by the `current` state — no `activeOn` binding for a section.
139
+ - **A refresh asks only about elements the page shown holds**: a provider on the page being left no longer sends a
140
+ `/_rsc` about the new address.
141
+ - **The toasts' parts are `notifications` fields**: `minHeight`, `fontWeight`, `lineHeight`, `iconSize`, `iconGap`,
142
+ `closeColor`, `closeOpacity`, `progressHeight`.
143
+ - **A page asked for with its space's token hydrates its own space.** On a host serving many spaces
144
+ (`?access-token=`), the space document fetched beside the page went without the token, so the host's own space
145
+ answered it and the browser hydrated another space's document over the page — a hydration error, and its tree
146
+ rebuilt. The document's address now carries the token the page was asked for with.
147
+ - **The SDK's stylesheet carries the space's variables from the server's HTML.** It read them from what a provider
148
+ below it publishes while the page renders, which the server had not done yet when it wrote the sheet; it now
149
+ resolves them from the document itself (`useResolvedVariables` of `@plitzi/sdk-shared/dataSource/hooks`), the same
150
+ on both sides.
151
+ - **A realtime message the pub/sub cannot deliver is answered, not fatal.** A publish that Redis refuses — a timeout under
152
+ load — is answered `503` with `reason: 'unavailable'`, by the `POST` and in the WebSocket's `ack` alike; a connect,
153
+ a disconnect or a revoke that fails is logged, on either transport. Each used to reject with nobody waiting, and the server's `unhandledRejection` handler
154
+ shut the whole process down.
155
+
156
+ ## Reporting to Plitzi
157
+ - **`plitzi feedback`** starts a report of what broke, misled or cost time: it writes the page the report is laid out
158
+ in (`tmp/feedback/`) with the installed versions, the project and what `doctor` finds already in it, and tells the
159
+ agent how to fill it — each finding reproduced first, with evidence, impact, workaround and fix, no secrets — and to
160
+ publish it as an artifact whose link the developer sends. `--previous <url>` continues an earlier report.
161
+
162
+ ## Pages that load on every browser
163
+ - **The import map comes before anything that loads a module**, in the page server's HTML, a published site's
164
+ (`index.hbs` on the platform), the SDK's and the builder's. React's `modulepreload` links came first, and a browser
165
+ that had fetched a module already — Chrome before 133 — ignored the map: every bare `import "react"` failed
166
+ ("Failed to resolve module specifier") and the page never hydrated.
167
+
168
+ ## The dev tools
169
+ - **A page loads the React its dev tools need.** The development build only while the visitor has the dev tools on
170
+ (shift+F12, within what the deployment allows); turned off, the next load is a production page, React included. It
171
+ followed the authorization alone, so a space that allowed debugging always shipped development React.
172
+
173
+ ## check and lint
174
+ - **`plitzi check`, `push`, `lint` and `fix` hold the space to what `npm run author` and the server do**: its data
175
+ files too, so `push` no longer sends a space whose browser provider reads `src/data/` (`server-data-in-browser`).
176
+ - **`plitzi check` lists each list's rows as drawn and as held in its source** (`feed 4 of 8 rows`,
177
+ `hits not rendered (16 in its source)`). In `--json`, `lists` is now `{ id: { rendered, source } }`.
178
+ - **`plitzi check` no longer reports bindings inside a container the page isn't showing**, nor text "in the colour
179
+ behind it" because of a bar painted over it or a pane that clips it.
180
+ - **`window.__plitzi.sources()` no longer turns a shared array into `'[…]'`**, and a list row no longer replaces its
181
+ list's `items`.
182
+ - **`plitzi lint` says authoring suggestions are quieted with `quiet` on the element**, and reports a
183
+ `plitzi-lint-disable` comment that names one (`disable-names-suggestion`).
184
+ - **`plitzi check` says when a page sent the browser elsewhere** (a page for signed-in visitors, to the sign-in) instead
185
+ of reporting every element missing, and `--as <username>` signs in first through the server's `/auth` routes, the
186
+ password from `PLITZI_CHECK_PASSWORD`.
187
+ - **`plitzi upgrade` never replaces @plitzi packages installed locally** — a tarball, a link, a portal, an override: it
188
+ leaves them and the install, and says which and the command that would install the registry's.
189
+ - **`plitzi explain` covers every code**: authoring's, `plitzi lint`'s and the project layout's.
190
+ - **Authoring reads the global sources' fields**: `auth.authenticated` in a condition is refused with "did you mean
191
+ `isAuthenticated`?" (`global-field-unknown`), and `invalidateElements` must name providers that exist
192
+ (`element-ids-target`). A template's reads of `computed`, `flags` and the global sources come off the parsed
193
+ template: a string inside it (`'https://auth.acme.com'`) is no longer read as `auth.acme`.
194
+ - **`custom-css-notifications` no longer reads the rules `notifications` itself writes** as toasts dressed by hand.
195
+ - **A refused space or layout is a report, not a stack**: the server's entry point imports the space once the layout is
196
+ checked, and `npm start` and `npm run author` print every problem and exit with 1.
197
+ - **New authoring suggestion `class-overrides-class`**: one class's shorthand (`padding`) silently erases a longhand
198
+ (`padding-top`) another class on the same element writes out.
199
+
200
+ ## 0.38.6
201
+
202
+ ### Patch Changes
203
+
204
+ - 3bce653: ## Fixes
205
+
206
+ - **The dev tools draw their icons again.** The panel lives in a shadow root of its own, which the page's stylesheets
207
+ never reach, and Font Awesome moved to a sheet of its own in 0.38.5 (`plitzi-sdk-icons.css`): the badge and every tab
208
+ lost their icons. The panel now links that sheet inside its root, beside its own. Where it is served is the SDK's
209
+ new `sdkIconsStylePath` — the page server sends `/sdk-assets/plitzi-sdk-icons.css`, the same sheet the document
210
+ links — which the `iframe` and `shadow` render modes read too: they had `/plitzi-sdk-icons.css` hard-coded, a path a
211
+ page server does not serve.
212
+
3
213
  ## 0.38.5
4
214
 
5
215
  ### Patch Changes
@@ -12,4 +12,37 @@ export type GlobalSource = (typeof GLOBAL_SOURCES)[number];
12
12
  * What a computed value is evaluated over: every global but `state`, which a flow hands it live, and `computed`, which
13
13
  * is what is being evaluated.
14
14
  */
15
- export declare const COMPUTED_GLOBALS: ("auth" | "navigation" | "flags" | "variables" | "theme" | "host")[];
15
+ export declare const COMPUTED_GLOBALS: ("auth" | "navigation" | "flags" | "host" | "variables" | "theme")[];
16
+ /**
17
+ * The fields of the globals whose shape the platform decides, as `GlobalSources` publishes them: a read of any other
18
+ * — `auth.authenticated` for `auth.isAuthenticated` — resolves to nothing, and the authoring linter says so. An `open`
19
+ * field holds whatever the page puts in it (the route's params, the signed-in account's details), so nothing below it
20
+ * is a mistake. The rest of the globals are the space's own (`variables`, `flags`, `computed`, held to what it
21
+ * declares) or anybody's (`state`, `host`).
22
+ */
23
+ export declare const GLOBAL_SOURCE_FIELDS: {
24
+ readonly navigation: {
25
+ readonly routeParams: "open";
26
+ readonly queryParams: "open";
27
+ readonly origin: "value";
28
+ readonly href: "value";
29
+ readonly currentPageId: "value";
30
+ readonly pending: "value";
31
+ readonly pendingLocation: "value";
32
+ };
33
+ readonly auth: {
34
+ readonly isAuthenticated: "value";
35
+ readonly status: "value";
36
+ readonly accessToken: "value";
37
+ readonly details: "open";
38
+ };
39
+ readonly theme: {
40
+ readonly mode: "value";
41
+ readonly resolved: "value";
42
+ };
43
+ };
44
+ export type ShapedGlobalSource = keyof typeof GLOBAL_SOURCE_FIELDS;
45
+ /** What one of those globals publishes: its declared fields and no others, each one a page may leave out. */
46
+ export type ShapedGlobalValue<Source extends ShapedGlobalSource> = {
47
+ [Field in keyof (typeof GLOBAL_SOURCE_FIELDS)[Source]]?: unknown;
48
+ };
@@ -8,6 +8,26 @@ var e = [
8
8
  "theme",
9
9
  "flags",
10
10
  "computed"
11
- ], t = e.filter((e) => e !== "state" && e !== "computed");
11
+ ], t = e.filter((e) => e !== "state" && e !== "computed"), n = {
12
+ navigation: {
13
+ routeParams: "open",
14
+ queryParams: "open",
15
+ origin: "value",
16
+ href: "value",
17
+ currentPageId: "value",
18
+ pending: "value",
19
+ pendingLocation: "value"
20
+ },
21
+ auth: {
22
+ isAuthenticated: "value",
23
+ status: "value",
24
+ accessToken: "value",
25
+ details: "open"
26
+ },
27
+ theme: {
28
+ mode: "value",
29
+ resolved: "value"
30
+ }
31
+ };
12
32
  //#endregion
13
- export { t as COMPUTED_GLOBALS, e as GLOBAL_SOURCES };
33
+ export { t as COMPUTED_GLOBALS, e as GLOBAL_SOURCES, n as GLOBAL_SOURCE_FIELDS };
@@ -1,3 +1,4 @@
1
1
  import { default as useRegisterSource } from './useRegisterSource';
2
+ import { default as useResolvedVariables } from './useResolvedVariables';
2
3
  export * from './useRegisterSource';
3
- export { useRegisterSource };
4
+ export { useRegisterSource, useResolvedVariables };
@@ -1,2 +1,3 @@
1
1
  import e from "./useRegisterSource.mjs";
2
- export { e as useRegisterSource };
2
+ import t from "./useResolvedVariables.mjs";
3
+ export { e as useRegisterSource, t as useResolvedVariables };
@@ -0,0 +1,12 @@
1
+ import { SchemaVariableValue } from '../../types';
2
+ /**
3
+ * The space's variables, resolved for where the visitor is — from `schema.variables` and the route, never from the
4
+ * published `runtime.sources.variables`.
5
+ *
6
+ * `GlobalSources` publishes that map while it renders, which is below the SDK's own stylesheet: on the server the sheet
7
+ * is already written by then, without them, and in the browser the store has changed in the middle of hydration, so
8
+ * React drew the sheet again with them — a hydration error on every space that declares a variable. Everything that
9
+ * renders above the provider, or must render the same on both sides, resolves them here instead.
10
+ */
11
+ declare const useResolvedVariables: () => Record<string, SchemaVariableValue>;
12
+ export default useResolvedVariables;
@@ -0,0 +1,28 @@
1
+ import e from "../../hooks/useStableValue.mjs";
2
+ import t from "../../store/renderSettings.mjs";
3
+ import { useCommonStore as n } from "../../store/index.mjs";
4
+ import r from "../resolveVariables.mjs";
5
+ import { useMemo as i } from "react";
6
+ //#region src/dataSource/hooks/useResolvedVariables.ts
7
+ var a = () => {
8
+ let { environment: a } = t(), [[o, s, c, l]] = n([
9
+ "schema.variables",
10
+ "navigation.routeParams",
11
+ "navigation.queryParams",
12
+ "navigation.hostname"
13
+ ]);
14
+ return e(i(() => r(o, {
15
+ routeParams: s,
16
+ queryParams: c,
17
+ hostname: l,
18
+ environment: a
19
+ }), [
20
+ a,
21
+ l,
22
+ c,
23
+ s,
24
+ o
25
+ ]));
26
+ };
27
+ //#endregion
28
+ export { a as default };
@@ -5,4 +5,5 @@ import o from "./getBindingsDetails.mjs";
5
5
  import s from "./helpers/getSourceName.mjs";
6
6
  import c from "./hooks/useRegisterSource.mjs";
7
7
  import l from "./resolveVariables.mjs";
8
- export { e as COMPUTED_GLOBALS, t as GLOBAL_SOURCES, n as evaluateComputed, o as getBindingsDetails, s as getSourceName, r as liveSources, l as resolveVariables, c as useRegisterSource, i as utility, a as utilityOptions };
8
+ import u from "./hooks/useResolvedVariables.mjs";
9
+ export { e as COMPUTED_GLOBALS, t as GLOBAL_SOURCES, n as evaluateComputed, o as getBindingsDetails, s as getSourceName, r as liveSources, l as resolveVariables, c as useRegisterSource, u as useResolvedVariables, i as utility, a as utilityOptions };
@@ -1,4 +1,4 @@
1
- import { SchemaVariable } from '../types';
1
+ import { SchemaVariable, SchemaVariableValue } from '../types';
2
2
  /** What a variable's `subValues` are matched against — everything a `when` rule may name. */
3
3
  export type VariableScope = {
4
4
  routeParams?: Record<string, unknown>;
@@ -18,5 +18,5 @@ export type VariableScope = {
18
18
  * a page that sends an unauthenticated visitor to `{{authUrl}}/` is deciding not to render at all, so the
19
19
  * provider that would have resolved the token never runs.
20
20
  */
21
- export declare const resolveVariables: (variables: SchemaVariable[] | undefined, scope?: VariableScope) => Record<string, unknown>;
21
+ export declare const resolveVariables: (variables: SchemaVariable[] | undefined, scope?: VariableScope) => Record<string, SchemaVariableValue>;
22
22
  export default resolveVariables;
@@ -1,7 +1,7 @@
1
- import { resolveFlags as e } from "./resolveFlags.mjs";
2
- import t from "../hooks/useStableValue.mjs";
3
- import n from "../store/renderSettings.mjs";
4
- import { useCommonStore as r } from "../store/index.mjs";
1
+ import e from "../hooks/useStableValue.mjs";
2
+ import t from "../store/renderSettings.mjs";
3
+ import { useCommonStore as n } from "../store/index.mjs";
4
+ import { resolveFlags as r } from "./resolveFlags.mjs";
5
5
  import { useMemo as i } from "react";
6
6
  //#region src/flags/useFlagResolution.ts
7
7
  var a = ({ authenticated: e, user: t }) => {
@@ -13,7 +13,7 @@ var a = ({ authenticated: e, user: t }) => {
13
13
  roles: n.roles
14
14
  } : r;
15
15
  }, o = (o) => {
16
- let { environment: s } = n(), [[c, l, u, d, f]] = r([
16
+ let { environment: s } = t(), [[c, l, u, d, f]] = n([
17
17
  "schema.flags",
18
18
  "navigation.routeParams",
19
19
  "navigation.queryParams",
@@ -23,7 +23,7 @@ var a = ({ authenticated: e, user: t }) => {
23
23
  authenticated: p,
24
24
  user: m
25
25
  }), [p, m]);
26
- return t(i(() => e(c, {
26
+ return e(i(() => r(c, {
27
27
  environment: s,
28
28
  hostname: d,
29
29
  routeParams: l,
package/dist/index.mjs CHANGED
@@ -32,61 +32,65 @@ import ge, { utilityOptions as _e } from "./dataSource/utility/index.mjs";
32
32
  import ve from "./dataSource/getBindingsDetails.mjs";
33
33
  import ye from "./dataSource/helpers/getSourceName.mjs";
34
34
  import be from "./dataSource/hooks/useRegisterSource.mjs";
35
- import xe from "./dataSource/resolveVariables.mjs";
36
- import Se from "./devTools/DevToolsContext.mjs";
37
- import { DEV_TOOLS_ATTRIBUTE as Ce, HIDE_DEV_TOOLS_CSS as we } from "./devTools/chrome.mjs";
38
- import { debugCookieName as Te } from "./devTools/debugCookie.mjs";
39
- import Ee from "./devTools/interactionLog.mjs";
40
- import De, { createStoreDevToolsLogger as Oe, pConsole as ke } from "./devTools/utils/PlitziConsole.mjs";
41
- import Ae from "./elements/ComponentContext.mjs";
42
- import { FLAG_GATE_PATTERN as je, FLAG_NAME_PATTERN as Me, isFlagName as Ne, isSchemaFlag as Pe } from "./flags/schemaFlag.mjs";
43
- import { flagsCookieName as Fe, forcedFlagsFromCookies as Ie, parseFlagList as Le, serializeFlagList as Re, withForcedFlag as ze, writeForcedFlags as Be } from "./flags/flagsCookie.mjs";
44
- import { FLAG_LAYERS as Ve, flagUserFromSSR as He, flagValues as Ue, hasConditions as We, passesFlagGate as Ge, resolveFlags as Ke, undeclaredFlagOverrides as qe } from "./flags/resolveFlags.mjs";
45
- import Je from "./hooks/useStableValue.mjs";
46
- import { describeChange as Ye, fieldChanges as Xe, uniqueLines as Ze } from "./history/describe.mjs";
47
- import { diffSchema as Qe, diffStyle as $e, jsonCopy as et, sameValue as tt } from "./history/diff.mjs";
48
- import nt from "./hooks/useFontHead.mjs";
49
- import rt from "./hooks/useNetwork.mjs";
50
- import it, { PlitziServiceContext as at, PlitziServiceProvider as ot } from "./hooks/usePlitziServiceContext.mjs";
51
- import { WHILE_RUNNING_MODES as st } from "./types/SchemaTypes.mjs";
52
- import { StyleVariableCategory as ct, isStyleVariableCategory as lt } from "./types/StyleTypes.mjs";
53
- import ut, { EMPTY_STYLE_SCHEMA as dt, StyleBindingsAllowed as ft, baseDefaultValue as pt, inheritableAttributesBase as mt } from "./style/styleConstants.mjs";
54
- import { DISPLAY_MODE_MIN_WIDTH as ht, displayModeAt as gt, displayModeWidthRem as _t } from "./style/breakpoints.mjs";
55
- import { PLUGIN_CSS_LAYER as vt, RUNTIME_CSS_LAYER as yt, inPluginLayer as bt } from "./style/cssLayers.mjs";
56
- import { DISPLAY_MODES as xt, isDisplayMode as St } from "./style/displayModes.mjs";
57
- import { fontLinkAssets as Ct } from "./style/fontAssets.mjs";
58
- import { SYSTEM_FONTS as wt, availableFonts as Tt, familiesInCss as Et, fontFamilyStack as Dt, fontUrlResolver as Ot, fontsToHead as kt, googleCss2Url as At, googleTextSubsetUrl as jt, isSafeFontUrl as Mt, primaryFamily as Nt } from "./style/fonts.mjs";
59
- import { FontValidationError as Pt, parseSpaceFont as Ft } from "./style/fontValidation.mjs";
60
- import { fallbackForFamily as It, fontsFromCss as Lt } from "./style/fontsFromCss.mjs";
61
- import { LAYOUT_GRIDS as Rt, layoutGridCss as zt, layoutGridLook as Bt } from "./style/layoutGrid.mjs";
62
- import { RUNTIME_STYLE_ID as Vt, markStyleCache as Ht, styleCacheFromDocument as Ut, styleCacheTravelsInDocument as Wt } from "./style/runtimeStyle.mjs";
63
- import { mergeSnippetStyle as Gt, sameSelector as Kt, selectorsOf as qt } from "./style/snippetStyle.mjs";
64
- import { CURRENT_PAGE_SELECTOR as Jt, HIDDEN_CLASS as Yt, STYLE_STATES as Xt, STYLE_STATE_LABELS as Zt, inCascadeOrder as Qt, isKnownState as $t, isStartingState as en, stateSuffix as tn } from "./style/styleStates.mjs";
65
- import nn from "./schema/SchemaContext.mjs";
66
- import { ANCHOR_PATTERN as rn, anchorOf as an, isAnchor as on, uniqueAnchor as sn } from "./schema/anchor.mjs";
67
- import { COMPONENT_PROPS_SOURCE as cn, EMPTY_SCHEMA as ln, VARIABLE_REGEX as un } from "./schema/schemaConstants.mjs";
68
- import { findLayoutCycle as dn, resolveLayoutChain as fn } from "./schema/layoutChain.mjs";
69
- import { collectServerElements as pn, hasServerElements as mn } from "./schema/serverElements.mjs";
70
- import { isSnippet as hn } from "./schema/snippet.mjs";
71
- import gn from "./network/NetworkContext.mjs";
72
- import _n from "./network/NetworkInternalContext.mjs";
73
- import { elementFromWire as vn, schemaFromWire as yn, schemaToWire as bn } from "./schema/wire.mjs";
74
- import { SpaceEvents as xn, spaceEventSchemas as Sn, validateSpaceEvent as Cn } from "./network/spaceEvents.mjs";
75
- import wn from "./network/graphql/builder/Mutations/index.mjs";
76
- import Tn from "./network/graphql/builder/Queries/index.mjs";
77
- import En from "./network/graphql/builder/Subscriptions/index.mjs";
78
- import Dn from "./network/graphql/sdk/Mutations/index.mjs";
79
- import On from "./network/graphql/sdk/Queries/index.mjs";
80
- import kn, { RTEvent as An, RTEventCloseCode as jn, getInstance as Mn, isRTEvent as Nn, isRTEventCloseCode as Pn, setInstance as Fn } from "./websockets/RTCodec.mjs";
81
- import { THEME_CLASSES as In, THEME_COOKIE_NAME as Ln, applyThemeClass as Rn, isTheme as zn, readThemeCookie as Bn, themeFromCookies as Vn, writeThemeCookie as Hn } from "./theme/themeCookie.mjs";
82
- import Un, { createThemeState as Wn, createThemeStore as Gn, resolveScheme as Kn, setAreaTheme as qn, setMachineScheme as Jn, setThemeMode as Yn, themeFor as Xn } from "./theme/themeStore.mjs";
83
- import { useThemeStore as Zn } from "./theme/ThemeScope.mjs";
84
- import Qn from "./theme/ThemeProvider.mjs";
85
- import $n, { SPACE_THEME_AREA as er } from "./theme/useTheme.mjs";
86
- import tr from "./server/actions/useActionsSync.mjs";
87
- import nr, { cancelRsc as rr, currentRscLocation as ir, releaseRscRequests as ar, rscDataPath as or } from "./server/rsc/refreshRsc.mjs";
88
- import sr from "./server/rsc/useRscRefresh.mjs";
89
- import cr from "./server/rsc/useRscSync.mjs";
90
- import { PAINTED_STATE_BUDGET as lr, clearPaintedEntry as ur, paintedEntryFromCookies as dr, paintedKeys as fr, paintedStateCookieName as pr, paintedStateFor as mr, pickPainted as hr, readPaintedEntry as gr, writePaintedEntry as _r } from "./state/paintedState.mjs";
91
- import { runtimeStatePersist as vr, stateOwner as yr } from "./state/runtimeStatePersist.mjs";
92
- export { rn as ANCHOR_PATTERN, x as BODYLESS_METHODS, y as BuilderContext, wn as BuilderMutations, Tn as BuilderQueries, cn as COMPONENT_PROPS_SOURCE, N as COMPUTED_GLOBALS, S as CONNECTOR_HTTP_METHODS, Jt as CURRENT_PAGE_SELECTOR, Ae as ComponentContext, C as DEFAULT_READ_ENDPOINT, Ce as DEV_TOOLS_ATTRIBUTE, xt as DISPLAY_MODES, ht as DISPLAY_MODE_MIN_WIDTH, Se as DevToolsContext, w as EMPTY_RESPONSE_METHODS, ln as EMPTY_SCHEMA, dt as EMPTY_STYLE_SCHEMA, je as FLAG_GATE_PATTERN, Ve as FLAG_LAYERS, Me as FLAG_NAME_PATTERN, Pt as FontValidationError, P as GLOBAL_SOURCES, Yt as HIDDEN_CLASS, we as HIDE_DEV_TOOLS_CSS, ee as INTERVAL_TRIGGER, Rt as LAYOUT_GRIDS, m as MAX_PARAM_PASSES, te as MIN_INTERVAL_MS, gn as NetworkContext, _n as NetworkInternalContext, lr as PAINTED_STATE_BUDGET, vt as PLUGIN_CSS_LAYER, oe as ParamsFromURL, De as PlitziConsole, at as PlitziServiceContext, ot as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, kn as RTCodec, An as RTEvent, jn as RTEventCloseCode, yt as RUNTIME_CSS_LAYER, Vt as RUNTIME_STYLE_ID, er as SPACE_THEME_AREA, Xt as STYLE_STATES, Zt as STYLE_STATE_LABELS, wt as SYSTEM_FONTS, nn as SchemaContext, Dn as SdkMutations, On as SdkQueries, En as SpaceEventSubscription, xn as SpaceEvents, ft as StyleBindingsAllowed, ct as StyleVariableCategory, In as THEME_CLASSES, Ln as THEME_COOKIE_NAME, Qn as ThemeProvider, un as VARIABLE_REGEX, a as VISITOR_NAME, st as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, an as anchorOf, Rn as applyThemeClass, t as authFailureFromResponse, Tt as availableFonts, pt as baseDefaultValue, rr as cancelRsc, o as checkVisitorRoles, ur as clearPaintedEntry, pn as collectServerElements, k as connectorPresets, D as connectorTokens, b as contexts, B as cookieFromHeader, Oe as createStoreDevToolsLogger, Wn as createThemeState, Gn as createThemeStore, ir as currentRscLocation, Te as debugCookieName, se as delay, Ye as describeChange, Qe as diffSchema, $e as diffStyle, he as disableReactDevTools, gt as displayModeAt, _t as displayModeWidthRem, V as documentCookies, vn as elementFromWire, H as elementOf, A as emptyManifest, ce as emptyObject, F as evaluateComputed, ae as evaluateRuleGroup, It as fallbackForFamily, Et as familiesInCss, L as fetchManifest, Xe as fieldChanges, c as filters, dn as findLayoutCycle, He as flagUserFromSSR, Ue as flagValues, Fe as flagsCookieName, Dt as fontFamilyStack, Ct as fontLinkAssets, Ot as fontUrlResolver, Lt as fontsFromCss, kt as fontsToHead, Ie as forcedFlagsFromCookies, K as formatDate, q as formatDateUTC, J as formatFromNow, Y as formatUTCToLocal, R as generateFacade, ve as getBindingsDetails, O as getConnectorTokens, le as getDisplayName, X as getDurationMs, Mn as getInstance, ue as getKeyDecoded, de as getPathsFromObeject, ye as getSourceName, At as googleCss2Url, jt as googleTextSubsetUrl, We as hasConditions, mn as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, fe as hexToRGB, Qt as inCascadeOrder, bt as inPluginLayer, mt as inheritableAttributesBase, g as inspectTemplate, ne as intervalOf, on as isAnchor, j as isConnectorManifestDraft, re as isDate, St as isDisplayMode, U as isElementTarget, Ne as isFlagName, pe as isInViewport, Ee as isInteractionFlow, $t as isKnownState, W as isNodeTarget, Nn as isRTEvent, Pn as isRTEventCloseCode, e as isRecord, Mt as isSafeFontUrl, Pe as isSchemaFlag, hn as isSnippet, en as isStartingState, lt as isStyleVariableCategory, zn as isTheme, ie as isUserEdit, Z as isValidFormat, et as jsonCopy, zt as layoutGridCss, Bt as layoutGridLook, I as liveSources, me as makeId, Ht as markStyleCache, Gt as mergeSnippetStyle, G as nodeOf, n as onAuthFailure, ke as pConsole, dr as paintedEntryFromCookies, fr as paintedKeys, pr as paintedStateCookieName, mr as paintedStateFor, Q as parseDate, Le as parseFlagList, Ft as parseSpaceFont, Ge as passesFlagGate, hr as pickPainted, Nt as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, gr as readPaintedEntry, Bn as readThemeCookie, nr as refreshRsc, ar as releaseRscRequests, r as reportAuthFailure, Ke as resolveFlags, fn as resolveLayoutChain, Kn as resolveScheme, h as resolveStepParam, xe as resolveVariables, or as rscDataPath, vr as runtimeStatePersist, i as sameRegistrableDomain, Kt as sameSelector, tt as sameValue, yn as schemaFromWire, bn as schemaToWire, qt as selectorsOf, Re as serializeFlagList, qn as setAreaTheme, Fn as setInstance, Jn as setMachineScheme, Yn as setThemeMode, Sn as spaceEventSchemas, yr as stateOwner, tn as stateSuffix, Ut as styleCacheFromDocument, Wt as styleCacheTravelsInDocument, ut as styleConstants, z as syntaxHighlight, _ as templatePaths, v as templateRootNames, Xn as themeFor, Vn as themeFromCookies, Un as themeStore, $ as toUnixSeconds, qe as undeclaredFlagOverrides, sn as uniqueAnchor, Ze as uniqueLines, tr as useActionsSync, nt as useFontHead, rt as useNetwork, it as usePlitziServiceContext, be as useRegisterSource, sr as useRscRefresh, cr as useRscSync, Je as useStableValue, $n as useTheme, Zn as useThemeStore, ge as utility, _e as utilityOptions, M as validateConnectorManifest, Cn as validateSpaceEvent, s as visitorAccess, ze as withForcedFlag, Be as writeForcedFlags, _r as writePaintedEntry, Hn as writeThemeCookie };
35
+ import xe from "./hooks/useStableValue.mjs";
36
+ import Se from "./dataSource/resolveVariables.mjs";
37
+ import Ce from "./dataSource/hooks/useResolvedVariables.mjs";
38
+ import we from "./devTools/DevToolsContext.mjs";
39
+ import { DEV_TOOLS_ATTRIBUTE as Te, HIDE_DEV_TOOLS_CSS as Ee } from "./devTools/chrome.mjs";
40
+ import { debugCookieName as De } from "./devTools/debugCookie.mjs";
41
+ import Oe from "./devTools/interactionLog.mjs";
42
+ import ke, { createStoreDevToolsLogger as Ae, pConsole as je } from "./devTools/utils/PlitziConsole.mjs";
43
+ import Me from "./elements/ComponentContext.mjs";
44
+ import { FLAG_GATE_PATTERN as Ne, FLAG_NAME_PATTERN as Pe, isFlagName as Fe, isSchemaFlag as Ie } from "./flags/schemaFlag.mjs";
45
+ import { flagsCookieName as Le, forcedFlagsFromCookies as Re, parseFlagList as ze, serializeFlagList as Be, withForcedFlag as Ve, writeForcedFlags as He } from "./flags/flagsCookie.mjs";
46
+ import { FLAG_LAYERS as Ue, flagUserFromSSR as We, flagValues as Ge, hasConditions as Ke, passesFlagGate as qe, resolveFlags as Je, undeclaredFlagOverrides as Ye } from "./flags/resolveFlags.mjs";
47
+ import { describeChange as Xe, fieldChanges as Ze, uniqueLines as Qe } from "./history/describe.mjs";
48
+ import { diffSchema as $e, diffStyle as et, jsonCopy as tt, sameValue as nt } from "./history/diff.mjs";
49
+ import rt from "./hooks/useFontHead.mjs";
50
+ import it from "./hooks/useNetwork.mjs";
51
+ import at, { PlitziServiceContext as ot, PlitziServiceProvider as st } from "./hooks/usePlitziServiceContext.mjs";
52
+ import { WHILE_RUNNING_MODES as ct } from "./types/SchemaTypes.mjs";
53
+ import { StyleVariableCategory as lt, isStyleVariableCategory as ut } from "./types/StyleTypes.mjs";
54
+ import dt, { EMPTY_STYLE_SCHEMA as ft, StyleBindingsAllowed as pt, baseDefaultValue as mt, inheritableAttributesBase as ht } from "./style/styleConstants.mjs";
55
+ import { DISPLAY_MODE_MIN_WIDTH as gt, displayModeAt as _t, displayModeWidthRem as vt } from "./style/breakpoints.mjs";
56
+ import { PLUGIN_CSS_LAYER as yt, RUNTIME_CSS_LAYER as bt, inPluginLayer as xt } from "./style/cssLayers.mjs";
57
+ import { DISPLAY_MODES as St, isDisplayMode as Ct } from "./style/displayModes.mjs";
58
+ import { fontLinkAssets as wt } from "./style/fontAssets.mjs";
59
+ import { SYSTEM_FONTS as Tt, availableFonts as Et, familiesInCss as Dt, fontFamilyStack as Ot, fontUrlResolver as kt, fontsToHead as At, googleCss2Url as jt, googleTextSubsetUrl as Mt, isSafeFontUrl as Nt, primaryFamily as Pt } from "./style/fonts.mjs";
60
+ import { FontValidationError as Ft, parseSpaceFont as It } from "./style/fontValidation.mjs";
61
+ import { fallbackForFamily as Lt, fontsFromCss as Rt } from "./style/fontsFromCss.mjs";
62
+ import { LAYOUT_GRIDS as zt, layoutGridCss as Bt, layoutGridLook as Vt } from "./style/layoutGrid.mjs";
63
+ import { RUNTIME_STYLE_ID as Ht, markStyleCache as Ut, styleCacheFromDocument as Wt, styleCacheTravelsInDocument as Gt } from "./style/runtimeStyle.mjs";
64
+ import { mergeSnippetStyle as Kt, sameSelector as qt, selectorsOf as Jt } from "./style/snippetStyle.mjs";
65
+ import { MOTION_CONDITIONS as Yt, STYLE_CONDITION_LABELS as Xt, STYLE_MOTION_CONDITIONS as Zt, canonicalCondition as Qt, conditionAtRule as $t, conditionLabel as en, conditionOfAtRule as tn, isStyleCondition as nn, parseContainerCondition as rn } from "./style/styleConditions.mjs";
66
+ import { CONTENT_PSEUDOS as an, GENERATED_PSEUDOS as on, PSEUDO_PROPERTIES as sn, STYLE_PSEUDOS as cn, STYLE_PSEUDO_LABELS as ln, isContentValue as un, isStylePseudo as dn, pseudoHonours as fn, pseudoSuffix as pn } from "./style/stylePseudos.mjs";
67
+ import { CURRENT_SELECTOR as mn, EXPANDED_SELECTOR as hn, HIDDEN_CLASS as gn, PARENT_ANCESTOR as _n, STYLE_STATES as vn, STYLE_STATE_LABELS as yn, inCascadeOrder as bn, isKnownState as xn, isParentAncestor as Sn, isStartingState as Cn, stateSuffix as wn } from "./style/styleStates.mjs";
68
+ import { isStyleRules as Tn, setAtKeys as En, styleTargetKeys as Dn, styleTargetProblem as On, styleTargetRules as kn, valueAtKeys as An } from "./style/styleTarget.mjs";
69
+ import jn from "./schema/SchemaContext.mjs";
70
+ import { ANCHOR_PATTERN as Mn, anchorOf as Nn, isAnchor as Pn, uniqueAnchor as Fn } from "./schema/anchor.mjs";
71
+ import { COMPONENT_PROPS_SOURCE as In, EMPTY_SCHEMA as Ln, VARIABLE_REGEX as Rn } from "./schema/schemaConstants.mjs";
72
+ import { findLayoutCycle as zn, resolveLayoutChain as Bn } from "./schema/layoutChain.mjs";
73
+ import { collectServerElements as Vn, hasServerElements as Hn } from "./schema/serverElements.mjs";
74
+ import { isSnippet as Un } from "./schema/snippet.mjs";
75
+ import Wn from "./network/NetworkContext.mjs";
76
+ import Gn from "./network/NetworkInternalContext.mjs";
77
+ import { elementFromWire as Kn, schemaFromWire as qn, schemaToWire as Jn } from "./schema/wire.mjs";
78
+ import { SpaceEvents as Yn, spaceEventSchemas as Xn, validateSpaceEvent as Zn } from "./network/spaceEvents.mjs";
79
+ import Qn from "./network/graphql/builder/Mutations/index.mjs";
80
+ import $n from "./network/graphql/builder/Queries/index.mjs";
81
+ import er from "./network/graphql/builder/Subscriptions/index.mjs";
82
+ import tr from "./network/graphql/sdk/Mutations/index.mjs";
83
+ import nr from "./network/graphql/sdk/Queries/index.mjs";
84
+ import rr, { RTEvent as ir, RTEventCloseCode as ar, getInstance as or, isRTEvent as sr, isRTEventCloseCode as cr, setInstance as lr } from "./websockets/RTCodec.mjs";
85
+ import { THEME_CLASSES as ur, THEME_COOKIE_NAME as dr, applyThemeClass as fr, isTheme as pr, readThemeCookie as mr, themeFromCookies as hr, writeThemeCookie as gr } from "./theme/themeCookie.mjs";
86
+ import _r, { createThemeState as vr, createThemeStore as yr, resolveScheme as br, setAreaTheme as xr, setMachineScheme as Sr, setThemeMode as Cr, themeFor as wr } from "./theme/themeStore.mjs";
87
+ import { useThemeStore as Tr } from "./theme/ThemeScope.mjs";
88
+ import Er from "./theme/ThemeProvider.mjs";
89
+ import Dr, { SPACE_THEME_AREA as Or } from "./theme/useTheme.mjs";
90
+ import kr from "./server/actions/useActionsSync.mjs";
91
+ import Ar, { cancelRsc as jr, currentRscLocation as Mr, releaseRscRequests as Nr, rscDataPath as Pr } from "./server/rsc/refreshRsc.mjs";
92
+ import Fr from "./server/rsc/useRscRefresh.mjs";
93
+ import Ir from "./server/rsc/useRscSync.mjs";
94
+ import { PAINTED_STATE_BUDGET as Lr, clearPaintedEntry as Rr, paintedEntryFromCookies as zr, paintedKeys as Br, paintedStateCookieName as Vr, paintedStateFor as Hr, pickPainted as Ur, readPaintedEntry as Wr, writePaintedEntry as Gr } from "./state/paintedState.mjs";
95
+ import { runtimeStatePersist as Kr, stateOwner as qr } from "./state/runtimeStatePersist.mjs";
96
+ export { Mn as ANCHOR_PATTERN, x as BODYLESS_METHODS, y as BuilderContext, Qn as BuilderMutations, $n as BuilderQueries, In as COMPONENT_PROPS_SOURCE, N as COMPUTED_GLOBALS, S as CONNECTOR_HTTP_METHODS, an as CONTENT_PSEUDOS, mn as CURRENT_SELECTOR, Me as ComponentContext, C as DEFAULT_READ_ENDPOINT, Te as DEV_TOOLS_ATTRIBUTE, St as DISPLAY_MODES, gt as DISPLAY_MODE_MIN_WIDTH, we as DevToolsContext, w as EMPTY_RESPONSE_METHODS, Ln as EMPTY_SCHEMA, ft as EMPTY_STYLE_SCHEMA, hn as EXPANDED_SELECTOR, Ne as FLAG_GATE_PATTERN, Ue as FLAG_LAYERS, Pe as FLAG_NAME_PATTERN, Ft as FontValidationError, on as GENERATED_PSEUDOS, P as GLOBAL_SOURCES, gn as HIDDEN_CLASS, Ee as HIDE_DEV_TOOLS_CSS, ee as INTERVAL_TRIGGER, zt as LAYOUT_GRIDS, m as MAX_PARAM_PASSES, te as MIN_INTERVAL_MS, Yt as MOTION_CONDITIONS, Wn as NetworkContext, Gn as NetworkInternalContext, Lr as PAINTED_STATE_BUDGET, _n as PARENT_ANCESTOR, yt as PLUGIN_CSS_LAYER, sn as PSEUDO_PROPERTIES, oe as ParamsFromURL, ke as PlitziConsole, ot as PlitziServiceContext, st as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, rr as RTCodec, ir as RTEvent, ar as RTEventCloseCode, bt as RUNTIME_CSS_LAYER, Ht as RUNTIME_STYLE_ID, Or as SPACE_THEME_AREA, Xt as STYLE_CONDITION_LABELS, Zt as STYLE_MOTION_CONDITIONS, cn as STYLE_PSEUDOS, ln as STYLE_PSEUDO_LABELS, vn as STYLE_STATES, yn as STYLE_STATE_LABELS, Tt as SYSTEM_FONTS, jn as SchemaContext, tr as SdkMutations, nr as SdkQueries, er as SpaceEventSubscription, Yn as SpaceEvents, pt as StyleBindingsAllowed, lt as StyleVariableCategory, ur as THEME_CLASSES, dr as THEME_COOKIE_NAME, Er as ThemeProvider, Rn as VARIABLE_REGEX, a as VISITOR_NAME, ct as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, Nn as anchorOf, fr as applyThemeClass, t as authFailureFromResponse, Et as availableFonts, mt as baseDefaultValue, jr as cancelRsc, Qt as canonicalCondition, o as checkVisitorRoles, Rr as clearPaintedEntry, Vn as collectServerElements, $t as conditionAtRule, en as conditionLabel, tn as conditionOfAtRule, k as connectorPresets, D as connectorTokens, b as contexts, B as cookieFromHeader, Ae as createStoreDevToolsLogger, vr as createThemeState, yr as createThemeStore, Mr as currentRscLocation, De as debugCookieName, se as delay, Xe as describeChange, $e as diffSchema, et as diffStyle, he as disableReactDevTools, _t as displayModeAt, vt as displayModeWidthRem, V as documentCookies, Kn as elementFromWire, H as elementOf, A as emptyManifest, ce as emptyObject, F as evaluateComputed, ae as evaluateRuleGroup, Lt as fallbackForFamily, Dt as familiesInCss, L as fetchManifest, Ze as fieldChanges, c as filters, zn as findLayoutCycle, We as flagUserFromSSR, Ge as flagValues, Le as flagsCookieName, Ot as fontFamilyStack, wt as fontLinkAssets, kt as fontUrlResolver, Rt as fontsFromCss, At as fontsToHead, Re as forcedFlagsFromCookies, K as formatDate, q as formatDateUTC, J as formatFromNow, Y as formatUTCToLocal, R as generateFacade, ve as getBindingsDetails, O as getConnectorTokens, le as getDisplayName, X as getDurationMs, or as getInstance, ue as getKeyDecoded, de as getPathsFromObeject, ye as getSourceName, jt as googleCss2Url, Mt as googleTextSubsetUrl, Ke as hasConditions, Hn as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, fe as hexToRGB, bn as inCascadeOrder, xt as inPluginLayer, ht as inheritableAttributesBase, g as inspectTemplate, ne as intervalOf, Pn as isAnchor, j as isConnectorManifestDraft, un as isContentValue, re as isDate, Ct as isDisplayMode, U as isElementTarget, Fe as isFlagName, pe as isInViewport, Oe as isInteractionFlow, xn as isKnownState, W as isNodeTarget, Sn as isParentAncestor, sr as isRTEvent, cr as isRTEventCloseCode, e as isRecord, Nt as isSafeFontUrl, Ie as isSchemaFlag, Un as isSnippet, Cn as isStartingState, nn as isStyleCondition, dn as isStylePseudo, Tn as isStyleRules, ut as isStyleVariableCategory, pr as isTheme, ie as isUserEdit, Z as isValidFormat, tt as jsonCopy, Bt as layoutGridCss, Vt as layoutGridLook, I as liveSources, me as makeId, Ut as markStyleCache, Kt as mergeSnippetStyle, G as nodeOf, n as onAuthFailure, je as pConsole, zr as paintedEntryFromCookies, Br as paintedKeys, Vr as paintedStateCookieName, Hr as paintedStateFor, rn as parseContainerCondition, Q as parseDate, ze as parseFlagList, It as parseSpaceFont, qe as passesFlagGate, Ur as pickPainted, Pt as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, fn as pseudoHonours, pn as pseudoSuffix, Wr as readPaintedEntry, mr as readThemeCookie, Ar as refreshRsc, Nr as releaseRscRequests, r as reportAuthFailure, Je as resolveFlags, Bn as resolveLayoutChain, br as resolveScheme, h as resolveStepParam, Se as resolveVariables, Pr as rscDataPath, Kr as runtimeStatePersist, i as sameRegistrableDomain, qt as sameSelector, nt as sameValue, qn as schemaFromWire, Jn as schemaToWire, Jt as selectorsOf, Be as serializeFlagList, xr as setAreaTheme, En as setAtKeys, lr as setInstance, Sr as setMachineScheme, Cr as setThemeMode, Xn as spaceEventSchemas, qr as stateOwner, wn as stateSuffix, Wt as styleCacheFromDocument, Gt as styleCacheTravelsInDocument, dt as styleConstants, Dn as styleTargetKeys, On as styleTargetProblem, kn as styleTargetRules, z as syntaxHighlight, _ as templatePaths, v as templateRootNames, wr as themeFor, hr as themeFromCookies, _r as themeStore, $ as toUnixSeconds, Ye as undeclaredFlagOverrides, Fn as uniqueAnchor, Qe as uniqueLines, kr as useActionsSync, rt as useFontHead, it as useNetwork, at as usePlitziServiceContext, be as useRegisterSource, Ce as useResolvedVariables, Fr as useRscRefresh, Ir as useRscSync, xe as useStableValue, Dr as useTheme, Tr as useThemeStore, ge as utility, _e as utilityOptions, M as validateConnectorManifest, Zn as validateSpaceEvent, An as valueAtKeys, s as visitorAccess, Ve as withForcedFlag, He as writeForcedFlags, Gr as writePaintedEntry, gr as writeThemeCookie };
@@ -141,10 +141,25 @@ export declare const spaceEventSchemas: {
141
141
  checked: "checked";
142
142
  visited: "visited";
143
143
  current: "current";
144
+ expanded: "expanded";
144
145
  hidden: "hidden";
146
+ first: "first";
147
+ last: "last";
148
+ odd: "odd";
149
+ even: "even";
145
150
  }>>;
146
151
  styleVariant: z.ZodOptional<z.ZodString>;
147
152
  styleAncestor: z.ZodOptional<z.ZodString>;
153
+ stylePseudo: z.ZodOptional<z.ZodEnum<{
154
+ before: "before";
155
+ after: "after";
156
+ marker: "marker";
157
+ placeholder: "placeholder";
158
+ "first-letter": "first-letter";
159
+ "first-line": "first-line";
160
+ selection: "selection";
161
+ }>>;
162
+ styleCondition: z.ZodOptional<z.ZodString>;
148
163
  }, z.core.$strip>;
149
164
  }, z.core.$strip>;
150
165
  readonly STYLE_UPDATE_SELECTOR: z.ZodObject<{
@@ -168,10 +183,25 @@ export declare const spaceEventSchemas: {
168
183
  checked: "checked";
169
184
  visited: "visited";
170
185
  current: "current";
186
+ expanded: "expanded";
171
187
  hidden: "hidden";
188
+ first: "first";
189
+ last: "last";
190
+ odd: "odd";
191
+ even: "even";
172
192
  }>>;
173
193
  styleVariant: z.ZodOptional<z.ZodString>;
174
194
  styleAncestor: z.ZodOptional<z.ZodString>;
195
+ stylePseudo: z.ZodOptional<z.ZodEnum<{
196
+ before: "before";
197
+ after: "after";
198
+ marker: "marker";
199
+ placeholder: "placeholder";
200
+ "first-letter": "first-letter";
201
+ "first-line": "first-line";
202
+ selection: "selection";
203
+ }>>;
204
+ styleCondition: z.ZodOptional<z.ZodString>;
175
205
  styleSelector: z.ZodString;
176
206
  }, z.core.$strip>;
177
207
  }, z.core.$strip>;