@plitzi/sdk-shared 0.38.6 → 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.
- package/CHANGELOG.md +197 -0
- package/dist/dataSource/globalSources.d.ts +34 -1
- package/dist/dataSource/globalSources.mjs +22 -2
- package/dist/dataSource/hooks/index.d.ts +2 -1
- package/dist/dataSource/hooks/index.mjs +2 -1
- package/dist/dataSource/hooks/useResolvedVariables.d.ts +12 -0
- package/dist/dataSource/hooks/useResolvedVariables.mjs +28 -0
- package/dist/dataSource/index.mjs +2 -1
- package/dist/dataSource/resolveVariables.d.ts +2 -2
- package/dist/flags/useFlagResolution.mjs +6 -6
- package/dist/index.mjs +62 -58
- package/dist/network/spaceEvents.d.ts +30 -0
- package/dist/network/spaceEvents.mjs +150 -147
- package/dist/project/layout.d.ts +197 -0
- package/dist/project/layout.mjs +394 -0
- package/dist/project/paths.d.ts +84 -0
- package/dist/project/paths.mjs +4 -0
- package/dist/project/root.d.ts +24 -0
- package/dist/project/root.mjs +26 -0
- package/dist/queries/index.d.ts +12 -2
- package/dist/queries/index.mjs +27 -17
- package/dist/queries/serverQueries.d.ts +22 -0
- package/dist/queries/serverQueries.mjs +9 -0
- package/dist/queries/useServerQuery.d.ts +19 -0
- package/dist/queries/useServerQuery.mjs +21 -0
- package/dist/server/rsc/refreshRsc.d.ts +22 -10
- package/dist/server/rsc/refreshRsc.mjs +65 -53
- package/dist/server/rsc/useRscRefresh.d.ts +2 -1
- package/dist/server/rsc/useRscRefresh.mjs +1 -1
- package/dist/store/index.d.ts +45 -45
- package/dist/style/index.d.ts +3 -0
- package/dist/style/index.mjs +5 -2
- package/dist/style/keyframes.d.ts +39 -0
- package/dist/style/keyframes.mjs +41 -0
- package/dist/style/notifications.d.ts +34 -12
- package/dist/style/notifications.mjs +69 -32
- package/dist/style/styleConditions.d.ts +43 -0
- package/dist/style/styleConditions.mjs +29 -0
- package/dist/style/styleConstants.d.ts +3 -2
- package/dist/style/styleConstants.mjs +2 -0
- package/dist/style/stylePseudos.d.ts +40 -0
- package/dist/style/stylePseudos.mjs +109 -0
- package/dist/style/styleStates.d.ts +35 -8
- package/dist/style/styleStates.mjs +38 -15
- package/dist/style/styleTarget.d.ts +23 -0
- package/dist/style/styleTarget.mjs +35 -0
- package/dist/types/AuthTypes.d.ts +5 -0
- package/dist/types/CommonTypes.d.ts +12 -0
- package/dist/types/SchemaTypes.d.ts +2 -0
- package/dist/types/ServerTypes.d.ts +11 -4
- package/dist/types/StoreTypes.d.ts +5 -1
- package/dist/types/StyleTypes.d.ts +20 -2
- package/package.json +42 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,202 @@
|
|
|
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
|
+
|
|
3
200
|
## 0.38.6
|
|
4
201
|
|
|
5
202
|
### 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" | "
|
|
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 };
|
|
@@ -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
|
-
|
|
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,
|
|
21
|
+
export declare const resolveVariables: (variables: SchemaVariable[] | undefined, scope?: VariableScope) => Record<string, SchemaVariableValue>;
|
|
22
22
|
export default resolveVariables;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "../
|
|
3
|
-
import n from "../store/
|
|
4
|
-
import {
|
|
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 } =
|
|
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
|
|
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 "./
|
|
36
|
-
import Se from "./
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import Ee from "./devTools/
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import {
|
|
45
|
-
import
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import nt from "./
|
|
49
|
-
import rt from "./hooks/
|
|
50
|
-
import it
|
|
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 nn from "./
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import
|
|
70
|
-
import {
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import {
|
|
92
|
-
|
|
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>;
|