@plitzi/sdk-shared 0.38.2 → 0.38.4
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 +317 -0
- package/dist/authoring/declare.d.ts +6 -0
- package/dist/dataSource/getBindingsDetails.mjs +1 -1
- package/dist/devTools/chrome.d.ts +8 -0
- package/dist/devTools/chrome.mjs +4 -0
- package/dist/devTools/index.d.ts +1 -0
- package/dist/devTools/index.mjs +5 -4
- package/dist/helpers/images.d.ts +5 -0
- package/dist/helpers/images.mjs +2 -2
- package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +11 -1
- package/dist/index.mjs +55 -54
- package/dist/network/graphql/builder/Queries/InitQuery.d.ts +1 -1
- package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -1
- package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +1 -1
- package/dist/network/graphql/sdk/Queries/InitQuery.mjs +1 -1
- package/dist/schema/motion.d.ts +109 -0
- package/dist/schema/motion.mjs +271 -0
- package/dist/schema/motionReveal.d.ts +10 -0
- package/dist/schema/motionReveal.mjs +23 -0
- package/dist/schema/wire.mjs +25 -16
- package/dist/source/export.d.ts +5 -0
- package/dist/source/import.d.ts +55 -0
- package/dist/source/import.mjs +4 -0
- package/dist/source/index.d.ts +2 -0
- package/dist/source/index.mjs +3 -2
- package/dist/style/styleConstants.d.ts +18 -2
- package/dist/style/styleConstants.mjs +32 -0
- package/dist/types/SchemaTypes.d.ts +16 -2
- package/dist/types/ServerTypes.d.ts +15 -1
- package/package.json +17 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,322 @@
|
|
|
1
1
|
# @plitzi/sdk-shared
|
|
2
2
|
|
|
3
|
+
## 0.38.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6ae4161: ## `plitzi push`: a self-hosted project back on its space
|
|
8
|
+
|
|
9
|
+
`plitzi create --from` and `plitzi pull` took a space out as a project and kept it in step; nothing put the project's
|
|
10
|
+
own changes back but a command per part, and no command at all for its pages. `plitzi push` is the way back
|
|
11
|
+
(`docs/en/projects-from-spaces.md`):
|
|
12
|
+
|
|
13
|
+
- **What changed, or what is named.** `plitzi push` sends what changed since the project last had the space — at a
|
|
14
|
+
terminal, offered as a ticked list to choose from (`↑/↓`, space, Enter); `plitzi push space functions` sends only
|
|
15
|
+
those parts: `space`, `functions`, `runtime`, `plugins`.
|
|
16
|
+
- **In order:** each changed plugin packed and uploaded (`pack plugin` + `upload plugin`, `--cdn`/`--bucket`), the
|
|
17
|
+
functions, the runtime, then the space — `src/space.ts` authored, the actions `src/actions.ts` serves and the manifests
|
|
18
|
+
in `src/connectors/` — as the space's draft. Never a published environment.
|
|
19
|
+
- **Never over the builder's work unseen.** The export now carries which state the draft is in (`SpaceExport.draft`),
|
|
20
|
+
recorded in `.plitzi/space.json` by `create --from` and `pull`; a push names it, and a draft edited since is refused
|
|
21
|
+
until `--force`. A project that never had the space may take one nobody has worked on; one holding work takes
|
|
22
|
+
`--force`.
|
|
23
|
+
- **Then `pull` follows it.** `.plitzi/space.json` records what was sent — only that, so a builder's change to a part
|
|
24
|
+
not pushed is still the next pull's — and a project that started on its own works with `pull` from then on.
|
|
25
|
+
- `@plitzi/sdk-shared/source`: `SpaceImport` / `SpaceImportResult` (`SPACE_IMPORT_FORMAT`), the push's one shape for
|
|
26
|
+
both ends, beside `SpaceExport`, which gains `draft`.
|
|
27
|
+
- `functions push`, `runtime push` and `upload plugin` keep their behaviour; their cores are what `push` runs.
|
|
28
|
+
|
|
29
|
+
## A project's folders: `tmp/` for what it writes, `.plitzi/` committed, `public/` said to be public
|
|
30
|
+
- **`tmp/` is what a project writes for itself.** `@plitzi/sdk-server` keeps the plugins it builds in `tmp/.sdk-plugins`
|
|
31
|
+
and resized pictures in `tmp/images` by default (were `.sdk-plugins` and `.plitzi/images`). A project the CLI writes
|
|
32
|
+
puts the port it took (`tmp/dev-server.json`), the space as last authored while developing (`tmp/space.json`) and
|
|
33
|
+
Playwright's output (`tmp/visual`) there too, and its `.gitignore` ignores `tmp` — one line for all of it.
|
|
34
|
+
- **`.plitzi/` is committed.** The scaffold ignored it whole, so a clone lost `space.json`, `functions.json` and
|
|
35
|
+
`scaffold.json` — what `pull`, `push`, `functions push` and `upgrade` stand on. Now it holds only what the CLI records.
|
|
36
|
+
`npx plitzi upgrade --write` brings an existing project's `.gitignore` up.
|
|
37
|
+
- **No `space/offline-data.json`.** `npm run author` checks the space and writes nothing; the server asks it for the
|
|
38
|
+
documents with `--out tmp/space.json` while developing. The space is `src/space.ts`, and nothing beside it says
|
|
39
|
+
otherwise.
|
|
40
|
+
- **`public/` is on the internet.** The generated `README.md` and `AGENTS.md`, the CLI and authoring skills, the MCP
|
|
41
|
+
guide, `@plitzi/sdk-server`'s README and the docs now say so where data goes: never a secret, a key or data only
|
|
42
|
+
some visitors may read — in `public/`, or in a space's documents, which reach every visitor too.
|
|
43
|
+
|
|
44
|
+
## An agent leaves the project clean
|
|
45
|
+
|
|
46
|
+
`AGENTS.md` gains **Keep the project clean** — nothing unused left behind, scratch work in `tmp/`, one of everything,
|
|
47
|
+
files a reader can find, and `author`, `typecheck`, `lint`, `format` and `check` passing — and the authoring skill's
|
|
48
|
+
review checklist a **Nothing left behind** section.
|
|
49
|
+
|
|
50
|
+
## The dev tools' X-ray is the outlines too
|
|
51
|
+
|
|
52
|
+
The QA tab had **Outlines** (every element's box, its type and id when pointed at) and **X-ray** (the same boxes,
|
|
53
|
+
fainter, with what is wired to each). They are one tool now: the X-ray draws every box with its type and id, and marks
|
|
54
|
+
the wiring picked — all of it, one kind, or **Boxes only**.
|
|
55
|
+
|
|
56
|
+
## A new space that says where to go
|
|
57
|
+
|
|
58
|
+
The space a new account and `plitzi create` start from keeps its welcome, and gains the three ways to change it — the
|
|
59
|
+
builder, code (with the command to run) and an agent — before the guides, which are shorter. Header, navigation, main
|
|
60
|
+
and footer are landmarks; the grid behind the top fades out instead of ending at an edge; the footer's line spans the
|
|
61
|
+
content; the links say their words and icon themselves, with no suggestion left.
|
|
62
|
+
|
|
63
|
+
## Server data reads the same everywhere
|
|
64
|
+
- **One shape for a provider with a `query`.** A `runtime: 'server'` provider that only reads a JSON file the server
|
|
65
|
+
serves answered the body itself, while the same provider in the browser publishes `{ status, data }` — so moving it
|
|
66
|
+
to the server broke every binding. `publicFileResolver` and the builder's mock now answer `{ status, data }` too:
|
|
67
|
+
`<source>.data.<field>` whichever runtime.
|
|
68
|
+
- **Server data is on unless a space turns it off.** The page render read a missing `rsc` as on and the connector
|
|
69
|
+
resolver as off, so a server provider in a space the builder or the MCP made (neither writes `rsc`) resolved to
|
|
70
|
+
nothing, silently. Both read it as on now; only `rsc: { enabled: false }` turns it off (and is warned with a server
|
|
71
|
+
element). `authorSpace` writes `enabled: true` for a space that has one.
|
|
72
|
+
- **Never inside a component.** The page server resolves a page's tree and its layouts only, so a server provider in a
|
|
73
|
+
component rendered nothing, silently. Refused now (`server-provider-in-component`), with the fix: the provider on
|
|
74
|
+
the page, the rows handed in as a prop.
|
|
75
|
+
- **Bindings held to the data.** `authorSpace` takes `data` — what a provider's `query` answers — and
|
|
76
|
+
`publicData(folder)` (`@plitzi/sdk-authoring/node`) reads it from `public/`. A binding onto a path the file does not
|
|
77
|
+
have is warned (`path-not-in-data`) with the keys it does have. Generated projects pass it.
|
|
78
|
+
- **`plitzi check` reads the data too.** A binding that reads a path its provider's answer lacks, a provider that
|
|
79
|
+
failed (once, not as every element it left empty) and the rows each list rendered (`dataIssues`). `--ssr` names what
|
|
80
|
+
the server's HTML lacks that the hydrated page has. The dev tools' badge and panel (`data-plitzi-devtools`) are hidden
|
|
81
|
+
while `check` and `shot` look.
|
|
82
|
+
|
|
83
|
+
## Authoring, clearer where agents tripped
|
|
84
|
+
- **`controls` on a button** (`aria-controls`): named by the element's id; authoring gives that element the anchor and
|
|
85
|
+
refuses an id the space lacks (`controls-unknown`); a saved document naming no anchor is warned
|
|
86
|
+
(`controls-no-anchor`). The accordion recipe uses it.
|
|
87
|
+
- **`live` on a container** (`aria-live`, `polite` or `assertive`) for words that change while a visitor reads them.
|
|
88
|
+
- **`subType: 'p'`** for a paragraph made of parts; `span-holds-block` covers it.
|
|
89
|
+
- **`formControl` types `search`, `url` and `tel`.**
|
|
90
|
+
- **Images:** no `src` draws the SDK's own placeholder (the CDN one answered 404); `resize: false` keeps a picture as
|
|
91
|
+
written; an SVG is never resized — `/_plitzi/img` redirects to it (`307`) instead of refusing it.
|
|
92
|
+
- **Messages:** an id taken by another page or layout names it and the id to write; a hyphenated source in a template
|
|
93
|
+
(`list_study-plans`) is explained as valid; an unknown CSS property says to write it in `customCss`; an unknown
|
|
94
|
+
variant on `custom` says it is never a prop of the component it hosts.
|
|
95
|
+
- **`plitzi explain` knows the helpers** — `bindTemplate`, `visibleWhen`, `variantFrom`, `activeOn`, `activeWhen`,
|
|
96
|
+
`when`, `named`, `scope`, `source`, `twig` — and `motion`, from the presets the SDK plays (`MOTION_ENTERS`,
|
|
97
|
+
`MOTION_TRIGGERS`, `MOTION_LOOPS`, now exported). `--list helpers` lists them.
|
|
98
|
+
- **`plitzi shot`** writes to `tmp/shots/` by default, and a full page shows the arrivals tied to the scroll as they
|
|
99
|
+
end. `inspectPage` no longer reports an image a hidden ancestor hides.
|
|
100
|
+
- **Style inspector:** `container-type` in Size.
|
|
101
|
+
- **New recipes:** `server-data.ts`, `accordion.ts`.
|
|
102
|
+
|
|
103
|
+
## Matching a page to another, measured
|
|
104
|
+
- **A whole page is the whole page.** The SDK scrolls a pane of its own, so `shot`'s full-page picture was one
|
|
105
|
+
screen; the pane is unrolled now (`unrollPage`) — the viewport untouched, so a `100vh` hero stays one screen.
|
|
106
|
+
- **`plitzi shot --compare` says why, not only how much.** Every lazy picture on both pages is loaded before they are
|
|
107
|
+
taken (`loadImages`), so a section no longer swings between 23 % and 40 % on how many covers had arrived. Each section
|
|
108
|
+
is compared where it is on the other page (`alignPictures` over row profiles): a page 400 px longer is said once, with
|
|
109
|
+
the section the drift starts at, instead of a footer with the same styles reading 100 %. And the texts both pages
|
|
110
|
+
have are paired (`pageTexts`, `compareTexts`), each with what it does differently there —
|
|
111
|
+
`h1 "Learn CSS" — font-size 68px → 60px · y +19px` — position less the drift of its section. `comparePictures` takes
|
|
112
|
+
its options as an object now (`{ regions, tolerance, align }`).
|
|
113
|
+
- **`--scheme` is the space's theme.** A space whose default is dark painted dark under `--scheme light`, and the file
|
|
114
|
+
said light. `check` and `shot` now set the `theme` cookie a visitor's toggle writes; left out, the space's default is
|
|
115
|
+
pictured and the file is named by the theme actually painted.
|
|
116
|
+
|
|
117
|
+
## `motion: { on: 'view' }` arrives once
|
|
118
|
+
|
|
119
|
+
`view` was tied to the scroll both ways: cards faded out again as the reader scrolled back up. Now it plays once, the
|
|
120
|
+
first time the element comes into view, with its `duration`, and stays — `revealOnView` (`@plitzi/sdk-shared/schema/
|
|
121
|
+
motionReveal`), one observer under the SDK's root, marks it `data-motion-seen`. The scroll-driven arrival is
|
|
122
|
+
`on: 'scroll'`. A page read without scripts shows them as they end (`@media (scripting: none)`); the builder's previews
|
|
123
|
+
and the MCP's local screenshots hold motion at its end. The builder's Motion tab has the three.
|
|
124
|
+
|
|
125
|
+
The builder's preview plays motion as the published page does. It held everything at its end, and nothing marked
|
|
126
|
+
the canvas `data-hydrated`, so neither the loops nor a space's own `[data-hydrated]` animations ever started there.
|
|
127
|
+
Now an arrival plays as it comes into view, and the loops and keyframes run; **▶** on the canvas being edited runs the
|
|
128
|
+
space's own `[data-hydrated]` loops too. The motion guide adds the rule this needs from a space: `[data-hydrated]` is for
|
|
129
|
+
loops; an entrance of its own that plays once (`transform`/`opacity` only) plays from the first paint with
|
|
130
|
+
`backwards`, as the presets do — gated on hydration it jumps when the page goes live, and a canvas that never goes
|
|
131
|
+
live holds it on its first frame.
|
|
132
|
+
|
|
133
|
+
## Thirteen ways in, nine loops
|
|
134
|
+
|
|
135
|
+
`motion` grows from six arrivals and four loops to thirteen and nine, all still `opacity` and the transforms:
|
|
136
|
+
|
|
137
|
+
- **Bold arrivals:** `slide-up` (from well below), `zoom-in` (from 60%), `zoom-out` (settling from 125%), `tilt`
|
|
138
|
+
(rising as it turns straight), `spin-in` (half a turn as it grows).
|
|
139
|
+
- **Springy arrivals:** `pop` overshoots and settles; `bounce-in` falls into place and bounces.
|
|
140
|
+
- **Loops:** `bounce`, `wobble`, `orbit` (a slow circle round where it is), `heartbeat`, `drift`.
|
|
141
|
+
|
|
142
|
+
An arrival is now a list of frames (`MOTION_ENTER_FRAMES` in `@plitzi/sdk-shared/schema/motion`; `MOTION_ENTER_FROM`
|
|
143
|
+
is its first), and so is a loop (`MOTION_LOOP_FRAMES[name].frames`, replacing `transform`/`at`). Arrivals move the
|
|
144
|
+
individual `translate`, `scale` and `rotate`, so they still compose with an element's own `transform` and with a loop.
|
|
145
|
+
The builder's Motion tab previews every frame; authoring, the MCP, `explain motion` and GraphQL read the same lists.
|
|
146
|
+
|
|
147
|
+
An arrival from the side no longer scrolls the page sideways. `slide-left` starts 32px to the right of where it lands,
|
|
148
|
+
past a phone's 16px gutter, and until it had played the page could be dragged sideways. The SDK's root clips that way
|
|
149
|
+
now (`overflow-x: clip`, which keeps the window the scroller: sticky bars and scroll timelines are untouched), and the
|
|
150
|
+
builder's preview does the same. Content wider than the page is cut rather than scrolling the page — give it a box of
|
|
151
|
+
its own with `overflow-x: auto`.
|
|
152
|
+
|
|
153
|
+
**3D and the transform parts are style properties.** `transform-style`, `perspective-origin`, `backface-visibility`,
|
|
154
|
+
`translate`, `rotate` and `scale` join the vocabulary (they were refused as `css-property-unknown` and had to go in
|
|
155
|
+
`customCss`); `scale: 0.94` is a factor, not pixels.
|
|
156
|
+
|
|
157
|
+
**The builder's placeholder for an empty element is 24px** (was 50px), one size for every element that has one. It
|
|
158
|
+
is a minimum, so it also grew empty shapes with a size of their own — a dot, a planet — while editing; 24px is still
|
|
159
|
+
a box to see, pick and drop into.
|
|
160
|
+
|
|
161
|
+
The desktop app's window was blank: authoring, run in the renderer to build the rail, asked Vite's `process` shim for
|
|
162
|
+
a working directory it does not have. It reads one only where there is one now — and only when a class conflict is
|
|
163
|
+
reported, rather than for every element of every space it writes.
|
|
164
|
+
|
|
165
|
+
## Authoring advice that knows where and when
|
|
166
|
+
- **`class-conflict` says where both declarations are:** `styles('md-menu-button') at src/components/dropdown.ts:12,
|
|
167
|
+
used by button at …, and styles('md-menu-button') at src/site/layout.ts:8, used by …` — `styles()` records its line as
|
|
168
|
+
an element factory does.
|
|
169
|
+
- **`repeated-shape` leaves controls alone.** Siblings that read different sources or write different state keys — a
|
|
170
|
+
menu for the language, one for the level — are not offered as a list.
|
|
171
|
+
- **`quiet: ['repeated-shape']`** on an element says a suggestion was left on purpose, and it is not offered again.
|
|
172
|
+
Only suggestions' codes (`quiet-unknown`). It is saved on the element (`definition.quiet`), so the builder's problems
|
|
173
|
+
panel, the MCP's `upsertElement`/`patchElement` and a project pulled back with `plitzi pull` all leave it alone.
|
|
174
|
+
|
|
175
|
+
## What the docs say is what the code does
|
|
176
|
+
|
|
177
|
+
A pass across authoring's own messages, the skills, the MCP guide, `docs/en`, the CLI's README and the website, so an
|
|
178
|
+
agent reading two of them is never told two things:
|
|
179
|
+
|
|
180
|
+
- **A binding's `source` is the bound value, and only that.** With no value yet it fell back to the attribute's
|
|
181
|
+
current one — `sourceTo` — so `{{ source|default('…') }}` never took its default and `{{ source ? … }}` read an
|
|
182
|
+
element's placeholder ("Text") as an answer. It is `undefined` until the source has a value now; `sourceTo` is still
|
|
183
|
+
the value before.
|
|
184
|
+
- **`explain` writes a step the way its builder is called:** `delay(ms)`, `openModal('modal-id', data?)`,
|
|
185
|
+
`scrollBy('row-id', { x: '80%' })` — not `delay(…)` above the document's param names, which read as `delay({ time })`.
|
|
186
|
+
- **A page field nobody takes is told what it was probably for** — `seo` → `seoTitle` and `seoDescription` — instead of a
|
|
187
|
+
hint about keeping state appended to every one.
|
|
188
|
+
- Docs set straight: an element's id is `data-plitzi-el` in the page (`data-id` is the builder's, with debugging on);
|
|
189
|
+
a visibility condition writes nothing while its source has no value and is a yes or a no once it has one; `mobile`
|
|
190
|
+
is up to and including 48rem; `loadStrategy` defaults by type (`lazy` for a modal); the accessibility codes listed
|
|
191
|
+
in full everywhere (`embed-without-title`, `dropdown-without-control`, `controls-no-anchor`); the generated
|
|
192
|
+
`AGENTS.md` says a repeated block is a component and rows of data a list, as the skill does; `plitzi runtime` is
|
|
193
|
+
documented in the CLI's README, its skill and the website, which no longer says state across requests needs a
|
|
194
|
+
server of your own.
|
|
195
|
+
|
|
196
|
+
## 0.38.3
|
|
197
|
+
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- e047e1d: ## `plitzi upgrade`: a project brought up to its CLI
|
|
201
|
+
|
|
202
|
+
A project written by an older CLI had no way up but `plitzi create` in a scratch folder and a file-by-file comparison:
|
|
203
|
+
`skills update` brought the skills and nothing else, so the `check` and `shot` scripts they teach did not exist.
|
|
204
|
+
`plitzi upgrade` (also `update`) shows what this CLI writes today for what is the CLI's in the project, and `--write`
|
|
205
|
+
makes it. One part or several: `plitzi upgrade skills`, `plitzi upgrade files packages`.
|
|
206
|
+
|
|
207
|
+
- **`files`:** the CLI's machinery — `author.ts`, `main.ts`, the Playwright, TypeScript and lint configs, AGENTS.md. One
|
|
208
|
+
nobody changed since the CLI wrote it is replaced, a missing one added; one the project made its own is shown as a
|
|
209
|
+
diff and left, until `--take <file>` (or `all`). `plitzi create` now records what it wrote, by digest, in
|
|
210
|
+
`.plitzi/scaffold.json`; a project made before that sees every file that differs as its own.
|
|
211
|
+
- **`packages`:** `package.json` merged, never replaced — the scripts and dependencies it lacks added, `@plitzi/*`
|
|
212
|
+
raised to this version, then the install (`--no-install` to leave it). A script of the project's own stays.
|
|
213
|
+
- **`skills`:** `.claude/skills/plitzi-*` from the packages installed, each replaced whole, and the ones a newer CLI
|
|
214
|
+
writes added. `plitzi skills update` is `plitzi upgrade skills --write`.
|
|
215
|
+
- **`renames`:** a name a version renamed with no alias, at its file and line — `canTemplate` → `canSnippet`,
|
|
216
|
+
`authorTemplate` → `authorSnippet` and its kin (renamed only where imported from `@plitzi/sdk-authoring`) — renamed
|
|
217
|
+
with `--write`.
|
|
218
|
+
|
|
219
|
+
`npm run author` says when the skills or the CLI's files are older than the SDK installed, and `plitzi --version`
|
|
220
|
+
prints the CLI's.
|
|
221
|
+
|
|
222
|
+
## Page checks that can be the definition of done
|
|
223
|
+
|
|
224
|
+
`inspectPage`, `plitzi check` and the scaffold's visual test failed pages that were whole, so an agent learnt to ignore
|
|
225
|
+
them:
|
|
226
|
+
|
|
227
|
+
- **A breakpoint hiding an element on purpose** — the desktop navigation on a phone, a bottom bar only a phone shows —
|
|
228
|
+
is no longer "not visible": an element whose `display` or `visibility` a breakpoint rule sets is checked at the width
|
|
229
|
+
it shows at.
|
|
230
|
+
- **A lazy image out of sight** waits whichever side it is out of: below the fold, as before, or beside the screen in a
|
|
231
|
+
carousel's track — cut off by any ancestor that clips, as the browser decides when to fetch it.
|
|
232
|
+
- **A plugin that draws nothing** says so: `drawsNothing: true` in its declaration (a clock that fires a flow), and its
|
|
233
|
+
handle is `boxless`, so no check waits for it on screen.
|
|
234
|
+
|
|
235
|
+
`plitzi check --json` and `PageReport` carry `issues` beside `problems`: each with its `code` (`element-hidden`,
|
|
236
|
+
`image-not-loaded`, `sideways-scroll`…), the `elementId` it is about and, in `check`, the `width`.
|
|
237
|
+
|
|
238
|
+
## Authoring
|
|
239
|
+
- **A link's `content` names it.** `control-without-name` read only a link's `label`, so applying the
|
|
240
|
+
`content-attribute` suggestion as written turned every link into a warning.
|
|
241
|
+
- **`plitzi fix` writes `content-attribute`** where it has one reading: a button's or link's children that are only
|
|
242
|
+
`text(…)` and `fontAwesome({ icon })` become its own `content` and `icon` — the words kept as written, an import left
|
|
243
|
+
unused taken out. A child with an id, options or a class of the space's own stays, and is said. `npm run author`'s
|
|
244
|
+
`[fix]` line counts these too.
|
|
245
|
+
- **The recipes, the skill's examples and the catalog template** hold to the suggestions as well as the warnings, and
|
|
246
|
+
their tests say so: six recipes and the template wrote a link's or a button's words as a child.
|
|
247
|
+
|
|
248
|
+
## Declared motion — in code, in the builder and over MCP
|
|
249
|
+
|
|
250
|
+
An element says how it arrives and whether it keeps moving with `motion`, and the SDK's stylesheet plays it — no
|
|
251
|
+
keyframes to write: `{ enter: 'fade-up', on: 'view' }` arrives as it scrolls into view, `{ enter: 'scale', stagger:
|
|
252
|
+
60 }` brings its children one by one (a grid, a list's rows), `{ loop: 'float' }` keeps it moving. Enters: `fade`,
|
|
253
|
+
`fade-up`, `fade-down`, `slide-left`, `slide-right`, `scale`; loops: `float`, `pulse`, `spin`, `sway`; `duration`,
|
|
254
|
+
`delay`, `stagger` in ms. Opacity and the transforms only — an arrival on `translate`/`scale`, so it composes with an
|
|
255
|
+
element's own `transform` — a loop held until the page is live (`data-hydrated`), and none of it for a visitor who asked
|
|
256
|
+
for less motion. `view` follows the scroll where the browser has scroll timelines and plays on load where not.
|
|
257
|
+
|
|
258
|
+
- **Authoring:** `motion` on any factory; refused where it cannot play (`motion-invalid`, `motion-no-tag`), and carried
|
|
259
|
+
by `specFromSpace` and `compareSpaces`.
|
|
260
|
+
- **Builder:** a **Motion** tab in an element's tools: the presets as chips, a stage that plays the one pointed at (a
|
|
261
|
+
loop shown stronger than the page plays it, and saying so), when and how long, children one by one, and the choices
|
|
262
|
+
read back as a sentence — laid out side by side once the sidebar is wide enough. The canvas holds motion still while
|
|
263
|
+
editing; **▶** in the header (or **Play on the canvas** in the tab) plays it from the start, restarting what already
|
|
264
|
+
played, and an arrival tied to the scroll plays by the clock there, where it is usually in view already.
|
|
265
|
+
- **MCP:** `motion` on `upsertElement` and `patchElement`, checked the same way; the guide names the presets.
|
|
266
|
+
- **Schema:** `definition.motion` (`ElementMotion`, `@plitzi/sdk-shared/schema/motion` — the presets, `motionProblems`,
|
|
267
|
+
`motionAttributes`, `isMotionAnimation`, and each preset's frames, which the stylesheet is tested against), in both
|
|
268
|
+
init queries. **The platform's GraphQL schema has to declare `SpaceElementMotion`
|
|
269
|
+
before this version's builder or SDK queries it.**
|
|
270
|
+
|
|
271
|
+
## Dev tools QA: x-ray and motion
|
|
272
|
+
|
|
273
|
+
The **QA** tab gains an **X-ray**: every element the document wires something to — bound to data, shown on a condition,
|
|
274
|
+
running a flow, moving, behind a flag — outlined in its colour and named on the page, read from the space's document by
|
|
275
|
+
the element's name; its legend counts each kind on the page and picks one to show alone. Beside **Pause**, **Slow**
|
|
276
|
+
plays every animation at a quarter of its speed and **Replay** plays the declared motion again from the start, without
|
|
277
|
+
reloading the page.
|
|
278
|
+
|
|
279
|
+
## Plugins that draw
|
|
280
|
+
|
|
281
|
+
`useCanvas2d`, `useWebGL`, `useWebGL2` and `useAnimationFrame` (`@plitzi/plitzi-sdk`): a canvas sized to the device (at
|
|
282
|
+
most 2×), followed as it resizes, animating only while somebody can see it move — a live page, no reduced motion, the
|
|
283
|
+
tab in front, the canvas on screen — and one still frame otherwise (the builder included). `createShaderProgram`
|
|
284
|
+
compiles and links, and a shader that fails throws a `ShaderError` with the driver's log, printed as
|
|
285
|
+
`[plugin <type> "<id>"] fragment shader failed: …` instead of an empty canvas; `error` and `ready` say where it is.
|
|
286
|
+
`useReducedMotion` for the rest.
|
|
287
|
+
|
|
288
|
+
## A space re-authored without a restart
|
|
289
|
+
|
|
290
|
+
A project's `npm run start:dev` restarts for its server code and its plugins only: a save to the space is re-authored
|
|
291
|
+
in a process of its own and every open page loads again (`server.reloadPages()` over an SSE endpoint, on with
|
|
292
|
+
`createServer({ devReload: true })` — never by `devMode` alone, since every open page holds a connection for it); an
|
|
293
|
+
edit authoring refuses is printed and the page keeps the last space that authored. A shutdown also ends WebSockets at
|
|
294
|
+
once (`1001`, going away) rather than waiting out the grace — the ten seconds a restart used to wait on an open page.
|
|
295
|
+
|
|
296
|
+
## Checks and authoring, from the stripe.com experiment
|
|
297
|
+
- **A component's instance** is found by its own name: its root carries `data-plitzi-instance`, and the instance's
|
|
298
|
+
handle selects it — `inspectPage` no longer reports every named instance as missing.
|
|
299
|
+
- **Hidden at this width on purpose** — the burger on a desktop, the desktop menu on a phone — is listed apart
|
|
300
|
+
(`hiddenAtWidth`, and a dim line under `plitzi check`'s ✓) rather than as a problem.
|
|
301
|
+
- **An element whose every child is conditional** — four flyouts in one list, each opening on the state that names
|
|
302
|
+
it — is conditional too: at rest it shows nothing, and that is it working.
|
|
303
|
+
- **A carousel that scrolls by itself** (`overflow-x: auto`) is not the page scrolling sideways; the page's own pane
|
|
304
|
+
still is.
|
|
305
|
+
- **Templates:** `{{ state.faq ?? -1 }}` — a sign on the right of `??` — reads.
|
|
306
|
+
- **A plugin attribute named as an element field** (`variant`, `class`, `id`…) is warned about
|
|
307
|
+
(`plugin-attribute-reserved`): a factory never hands it to the plugin. A `variant` no class or type style declares is
|
|
308
|
+
`unknown-variant`.
|
|
309
|
+
- **Lists:** a list with `items` renders as the `<ul>` (or `<ol>`) its `subType` says — it was a `<div>` — with no
|
|
310
|
+
markers and the same spacing, so a page looks as it did; the builder offers the list type for it too. Its rows are
|
|
311
|
+
`<li>`s: `list-row-not-li` warns of one that is not — a plain container is made one by `fixSpace`, a link or a button
|
|
312
|
+
is wrapped — and the recipes, the catalog template and the docs write rows as `listItem`.
|
|
313
|
+
- **CSS:** `mask-size`, `mask-position`, `mask-repeat`, `mask-composite`, `-webkit-mask-image`,
|
|
314
|
+
`-webkit-background-clip`, `box-decoration-break` and `-webkit-box-decoration-break`.
|
|
315
|
+
- **`plitzi shot`:** `--clip <element>`, `--scroll-to <element>` and `--viewport`; `--frames` takes the same framing.
|
|
316
|
+
- **SVG from files:** `svgFile` and `svgFiles` (`@plitzi/sdk-authoring/node`) read a logo or a folder of them,
|
|
317
|
+
compacted (`compactSvg`, also on the main entry), instead of strings in the space's source.
|
|
318
|
+
- The plugin scaffolds say that an inline `style` on `RootElement` outranks the element's classes.
|
|
319
|
+
|
|
3
320
|
## 0.38.2
|
|
4
321
|
|
|
5
322
|
### Patch Changes
|
|
@@ -61,6 +61,12 @@ export interface ElementDeclarationData {
|
|
|
61
61
|
* surface to refuse a value outside it.
|
|
62
62
|
*/
|
|
63
63
|
attributeValues?: Record<string, readonly string[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the element is behaviour rather than content — a clock that fires a flow, a listener — and draws nothing on
|
|
66
|
+
* a page (at most a tag in the builder, to have something to select). Read by the page checks (`inspectPage`,
|
|
67
|
+
* `plitzi check`), which would otherwise wait for it to be on screen and report it hidden.
|
|
68
|
+
*/
|
|
69
|
+
drawsNothing?: boolean;
|
|
64
70
|
content?: {
|
|
65
71
|
attributes?: Record<string, unknown>;
|
|
66
72
|
definition?: {
|
|
@@ -8,7 +8,7 @@ import { produce as s } from "immer";
|
|
|
8
8
|
var c = (e, t, n, r, a) => {
|
|
9
9
|
let o = r === "initialState" ? `definition.${r}.${a}` : `${r}.${a}`;
|
|
10
10
|
return {
|
|
11
|
-
fromValue: t ? i(e, t
|
|
11
|
+
fromValue: t ? i(e, t) : void 0,
|
|
12
12
|
toValue: i(n, o, t ? i(e, t) : void 0)
|
|
13
13
|
};
|
|
14
14
|
}, l = (l, u, d = {}) => {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The attribute every piece of the dev tools' own chrome carries — the badge, the panel — so whatever looks at the
|
|
3
|
+
* page rather than at the tools can leave it out: `plitzi shot` and `plitzi check` hide it, and a picture of a page is
|
|
4
|
+
* a picture of the page.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEV_TOOLS_ATTRIBUTE = "data-plitzi-devtools";
|
|
7
|
+
/** The rule that hides the dev tools' chrome, for a capture of the page alone. */
|
|
8
|
+
export declare const HIDE_DEV_TOOLS_CSS = "[data-plitzi-devtools] { display: none !important; }";
|
package/dist/devTools/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { default as debugCookieName } from './debugCookie';
|
|
|
2
2
|
import { default as DevToolsContext } from './DevToolsContext';
|
|
3
3
|
import { default as isInteractionFlow } from './interactionLog';
|
|
4
4
|
import { default as PlitziConsole } from './utils/PlitziConsole';
|
|
5
|
+
export * from './chrome';
|
|
5
6
|
export * from './debugCookie';
|
|
6
7
|
export * from './DevToolsContext';
|
|
7
8
|
export * from './interactionLog';
|
package/dist/devTools/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import e from "./DevToolsContext.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
2
|
+
import { DEV_TOOLS_ATTRIBUTE as t, HIDE_DEV_TOOLS_CSS as n } from "./chrome.mjs";
|
|
3
|
+
import { debugCookieName as r } from "./debugCookie.mjs";
|
|
4
|
+
import i from "./interactionLog.mjs";
|
|
5
|
+
import a, { createStoreDevToolsLogger as o, pConsole as s } from "./utils/PlitziConsole.mjs";
|
|
6
|
+
export { t as DEV_TOOLS_ATTRIBUTE, e as DevToolsContext, n as HIDE_DEV_TOOLS_CSS, a as PlitziConsole, o as createStoreDevToolsLogger, r as debugCookieName, i as isInteractionFlow, s as pConsole };
|
package/dist/helpers/images.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export type ImageWidth = (typeof IMAGE_WIDTHS)[number];
|
|
|
12
12
|
export declare const isImageWidth: (width: number) => width is ImageWidth;
|
|
13
13
|
/** A picture another site serves — the only kind there is anything to resize; a path of this site is served as it is. */
|
|
14
14
|
export declare const isRemoteImage: (src: string) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the page server makes sizes of a picture: another site's, and not a vector — an SVG is the same at any width,
|
|
17
|
+
* and the endpoint sends one back to where it is.
|
|
18
|
+
*/
|
|
19
|
+
export declare const isResizableImage: (src: string) => boolean;
|
|
15
20
|
/** The address of `src` at `width` on the endpoint. */
|
|
16
21
|
export declare const imageUrl: (endpoint: string, src: string, width: ImageWidth) => string;
|
|
17
22
|
/** Every width as a `srcset`, for the browser to pick the one its layout needs. */
|
package/dist/helpers/images.mjs
CHANGED
|
@@ -8,6 +8,6 @@ var e = "/_plitzi/img", t = [
|
|
|
8
8
|
1280,
|
|
9
9
|
1600,
|
|
10
10
|
1920
|
|
11
|
-
], n = (e) => t.some((t) => t === e), r = (e) => /^https?:\/\//i.test(e), i = (e, t, n) => `${e}?url=${encodeURIComponent(t)}&w=${String(n)}`,
|
|
11
|
+
], n = (e) => t.some((t) => t === e), r = (e) => /^https?:\/\//i.test(e), i = (e) => r(e) && !/\.svgz?(?:[?#]|$)/i.test(e), a = (e, t, n) => `${e}?url=${encodeURIComponent(t)}&w=${String(n)}`, o = (e, n) => t.map((t) => `${a(e, n, t)} ${String(t)}w`).join(", ");
|
|
12
12
|
//#endregion
|
|
13
|
-
export { e as IMAGE_PATH, t as IMAGE_WIDTHS,
|
|
13
|
+
export { e as IMAGE_PATH, t as IMAGE_WIDTHS, o as imageSrcSet, a as imageUrl, n as isImageWidth, r as isRemoteImage, i as isResizableImage };
|
|
@@ -234,6 +234,16 @@ var r = (e, t) => {
|
|
|
234
234
|
right: this.parsePower()
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
|
+
parseSignedAtom() {
|
|
238
|
+
return this.peek() === e.Minus && t(this.at(1)) ? this.maybeTrailingFilters({
|
|
239
|
+
type: "literal",
|
|
240
|
+
value: this.scanNumber()
|
|
241
|
+
}) : this.peek() === e.Minus ? (this.pos++, this.skipWs(), {
|
|
242
|
+
type: "unary",
|
|
243
|
+
operator: "-",
|
|
244
|
+
operand: this.parseSignedAtom()
|
|
245
|
+
}) : this.parseAtom();
|
|
246
|
+
}
|
|
237
247
|
parseDefault() {
|
|
238
248
|
if (this.skipWs(), this.peek() === e.Minus && t(this.at(1))) return this.maybeTrailingFilters({
|
|
239
249
|
type: "literal",
|
|
@@ -248,7 +258,7 @@ var r = (e, t) => {
|
|
|
248
258
|
for (this.skipWs(); this.peek() === e.Question && this.at(1) === e.Question;) this.pos += 2, this.skipWs(), n = {
|
|
249
259
|
type: "default",
|
|
250
260
|
value: n,
|
|
251
|
-
defaultExpr: this.
|
|
261
|
+
defaultExpr: this.parseSignedAtom()
|
|
252
262
|
}, this.skipWs();
|
|
253
263
|
return n;
|
|
254
264
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -34,57 +34,58 @@ import ye from "./dataSource/helpers/getSourceName.mjs";
|
|
|
34
34
|
import be from "./dataSource/hooks/useRegisterSource.mjs";
|
|
35
35
|
import xe from "./dataSource/resolveVariables.mjs";
|
|
36
36
|
import Se from "./devTools/DevToolsContext.mjs";
|
|
37
|
-
import {
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import Oe from "./
|
|
41
|
-
import
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import Ke from "./
|
|
45
|
-
import
|
|
46
|
-
import {
|
|
47
|
-
import et from "./
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import {
|
|
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 Zt from "./
|
|
64
|
-
import
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import {
|
|
73
|
-
import _n from "./network/
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import {
|
|
80
|
-
import
|
|
81
|
-
import {
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import Jn from "./
|
|
85
|
-
import
|
|
86
|
-
import Qn from "./server/rsc/
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import {
|
|
90
|
-
|
|
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 { DISPLAY_MODES as vt, isDisplayMode as yt } from "./style/displayModes.mjs";
|
|
56
|
+
import { fontLinkAssets as bt } from "./style/fontAssets.mjs";
|
|
57
|
+
import { SYSTEM_FONTS as xt, availableFonts as St, familiesInCss as Ct, fontFamilyStack as wt, fontUrlResolver as Tt, fontsToHead as Et, googleCss2Url as Dt, googleTextSubsetUrl as Ot, isSafeFontUrl as kt, primaryFamily as At } from "./style/fonts.mjs";
|
|
58
|
+
import { FontValidationError as jt, parseSpaceFont as Mt } from "./style/fontValidation.mjs";
|
|
59
|
+
import { fallbackForFamily as Nt, fontsFromCss as Pt } from "./style/fontsFromCss.mjs";
|
|
60
|
+
import { LAYOUT_GRIDS as Ft, layoutGridCss as It, layoutGridLook as Lt } from "./style/layoutGrid.mjs";
|
|
61
|
+
import { RUNTIME_STYLE_ID as Rt, markStyleCache as zt, styleCacheFromDocument as Bt, styleCacheTravelsInDocument as Vt } from "./style/runtimeStyle.mjs";
|
|
62
|
+
import { mergeSnippetStyle as Ht, sameSelector as Ut, selectorsOf as Wt } from "./style/snippetStyle.mjs";
|
|
63
|
+
import { CURRENT_PAGE_SELECTOR as Gt, HIDDEN_CLASS as Kt, STYLE_STATES as qt, STYLE_STATE_LABELS as Jt, inCascadeOrder as Yt, isKnownState as Xt, isStartingState as Zt, stateSuffix as Qt } from "./style/styleStates.mjs";
|
|
64
|
+
import $t from "./schema/SchemaContext.mjs";
|
|
65
|
+
import { ANCHOR_PATTERN as en, isAnchor as tn } from "./schema/anchor.mjs";
|
|
66
|
+
import { COMPONENT_PROPS_SOURCE as nn, EMPTY_SCHEMA as rn, VARIABLE_REGEX as an } from "./schema/schemaConstants.mjs";
|
|
67
|
+
import { findLayoutCycle as on, resolveLayoutChain as sn } from "./schema/layoutChain.mjs";
|
|
68
|
+
import { collectServerElements as cn, hasServerElements as ln } from "./schema/serverElements.mjs";
|
|
69
|
+
import { isSnippet as un } from "./schema/snippet.mjs";
|
|
70
|
+
import dn from "./network/NetworkContext.mjs";
|
|
71
|
+
import fn from "./network/NetworkInternalContext.mjs";
|
|
72
|
+
import { elementFromWire as pn, schemaFromWire as mn, schemaToWire as hn } from "./schema/wire.mjs";
|
|
73
|
+
import { SpaceEvents as gn, spaceEventSchemas as _n, validateSpaceEvent as vn } from "./network/spaceEvents.mjs";
|
|
74
|
+
import yn from "./network/graphql/builder/Mutations/index.mjs";
|
|
75
|
+
import bn from "./network/graphql/builder/Queries/index.mjs";
|
|
76
|
+
import xn from "./network/graphql/builder/Subscriptions/index.mjs";
|
|
77
|
+
import Sn from "./network/graphql/sdk/Mutations/index.mjs";
|
|
78
|
+
import Cn from "./network/graphql/sdk/Queries/index.mjs";
|
|
79
|
+
import wn, { RTEvent as Tn, RTEventCloseCode as En, getInstance as Dn, isRTEvent as On, isRTEventCloseCode as kn, setInstance as An } from "./websockets/RTCodec.mjs";
|
|
80
|
+
import { THEME_CLASSES as jn, THEME_COOKIE_NAME as Mn, applyThemeClass as Nn, isTheme as Pn, readThemeCookie as Fn, themeFromCookies as In, writeThemeCookie as Ln } from "./theme/themeCookie.mjs";
|
|
81
|
+
import Rn, { createThemeState as zn, createThemeStore as Bn, resolveScheme as Vn, setAreaTheme as Hn, setMachineScheme as Un, setThemeMode as Wn, themeFor as Gn } from "./theme/themeStore.mjs";
|
|
82
|
+
import { useThemeStore as Kn } from "./theme/ThemeScope.mjs";
|
|
83
|
+
import qn from "./theme/ThemeProvider.mjs";
|
|
84
|
+
import Jn, { SPACE_THEME_AREA as Yn } from "./theme/useTheme.mjs";
|
|
85
|
+
import Xn from "./server/actions/useActionsSync.mjs";
|
|
86
|
+
import Zn, { currentRscLocation as Qn, rscDataPath as $n } from "./server/rsc/refreshRsc.mjs";
|
|
87
|
+
import er from "./server/rsc/useRscRefresh.mjs";
|
|
88
|
+
import tr from "./server/rsc/useRscSync.mjs";
|
|
89
|
+
import { PAINTED_STATE_BUDGET as nr, clearPaintedEntry as rr, paintedEntryFromCookies as ir, paintedKeys as ar, paintedStateCookieName as or, paintedStateFor as sr, pickPainted as cr, readPaintedEntry as lr, writePaintedEntry as ur } from "./state/paintedState.mjs";
|
|
90
|
+
import { runtimeStatePersist as dr, stateOwner as fr } from "./state/runtimeStatePersist.mjs";
|
|
91
|
+
export { en as ANCHOR_PATTERN, x as BODYLESS_METHODS, y as BuilderContext, yn as BuilderMutations, bn as BuilderQueries, nn as COMPONENT_PROPS_SOURCE, N as COMPUTED_GLOBALS, S as CONNECTOR_HTTP_METHODS, Gt as CURRENT_PAGE_SELECTOR, Ae as ComponentContext, C as DEFAULT_READ_ENDPOINT, Ce as DEV_TOOLS_ATTRIBUTE, vt as DISPLAY_MODES, ht as DISPLAY_MODE_MIN_WIDTH, Se as DevToolsContext, w as EMPTY_RESPONSE_METHODS, rn as EMPTY_SCHEMA, dt as EMPTY_STYLE_SCHEMA, je as FLAG_GATE_PATTERN, Ve as FLAG_LAYERS, Me as FLAG_NAME_PATTERN, jt as FontValidationError, P as GLOBAL_SOURCES, Kt as HIDDEN_CLASS, we as HIDE_DEV_TOOLS_CSS, ee as INTERVAL_TRIGGER, Ft as LAYOUT_GRIDS, m as MAX_PARAM_PASSES, te as MIN_INTERVAL_MS, dn as NetworkContext, fn as NetworkInternalContext, nr as PAINTED_STATE_BUDGET, oe as ParamsFromURL, De as PlitziConsole, at as PlitziServiceContext, ot as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, wn as RTCodec, Tn as RTEvent, En as RTEventCloseCode, Rt as RUNTIME_STYLE_ID, Yn as SPACE_THEME_AREA, qt as STYLE_STATES, Jt as STYLE_STATE_LABELS, xt as SYSTEM_FONTS, $t as SchemaContext, Sn as SdkMutations, Cn as SdkQueries, xn as SpaceEventSubscription, gn as SpaceEvents, ft as StyleBindingsAllowed, ct as StyleVariableCategory, jn as THEME_CLASSES, Mn as THEME_COOKIE_NAME, qn as ThemeProvider, an as VARIABLE_REGEX, a as VISITOR_NAME, st as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, Nn as applyThemeClass, t as authFailureFromResponse, St as availableFonts, pt as baseDefaultValue, o as checkVisitorRoles, rr as clearPaintedEntry, cn as collectServerElements, k as connectorPresets, D as connectorTokens, b as contexts, B as cookieFromHeader, Oe as createStoreDevToolsLogger, zn as createThemeState, Bn as createThemeStore, Qn 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, pn as elementFromWire, H as elementOf, A as emptyManifest, ce as emptyObject, F as evaluateComputed, ae as evaluateRuleGroup, Nt as fallbackForFamily, Ct as familiesInCss, L as fetchManifest, Xe as fieldChanges, c as filters, on as findLayoutCycle, He as flagUserFromSSR, Ue as flagValues, Fe as flagsCookieName, wt as fontFamilyStack, bt as fontLinkAssets, Tt as fontUrlResolver, Pt as fontsFromCss, Et 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, Dn as getInstance, ue as getKeyDecoded, de as getPathsFromObeject, ye as getSourceName, Dt as googleCss2Url, Ot as googleTextSubsetUrl, We as hasConditions, ln as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, fe as hexToRGB, Yt as inCascadeOrder, mt as inheritableAttributesBase, g as inspectTemplate, ne as intervalOf, tn as isAnchor, j as isConnectorManifestDraft, re as isDate, yt as isDisplayMode, U as isElementTarget, Ne as isFlagName, pe as isInViewport, Ee as isInteractionFlow, Xt as isKnownState, W as isNodeTarget, On as isRTEvent, kn as isRTEventCloseCode, e as isRecord, kt as isSafeFontUrl, Pe as isSchemaFlag, un as isSnippet, Zt as isStartingState, lt as isStyleVariableCategory, Pn as isTheme, ie as isUserEdit, Z as isValidFormat, et as jsonCopy, It as layoutGridCss, Lt as layoutGridLook, I as liveSources, me as makeId, zt as markStyleCache, Ht as mergeSnippetStyle, G as nodeOf, n as onAuthFailure, ke as pConsole, ir as paintedEntryFromCookies, ar as paintedKeys, or as paintedStateCookieName, sr as paintedStateFor, Q as parseDate, Le as parseFlagList, Mt as parseSpaceFont, Ge as passesFlagGate, cr as pickPainted, At as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, lr as readPaintedEntry, Fn as readThemeCookie, Zn as refreshRsc, r as reportAuthFailure, Ke as resolveFlags, sn as resolveLayoutChain, Vn as resolveScheme, h as resolveStepParam, xe as resolveVariables, $n as rscDataPath, dr as runtimeStatePersist, i as sameRegistrableDomain, Ut as sameSelector, tt as sameValue, mn as schemaFromWire, hn as schemaToWire, Wt as selectorsOf, Re as serializeFlagList, Hn as setAreaTheme, An as setInstance, Un as setMachineScheme, Wn as setThemeMode, _n as spaceEventSchemas, fr as stateOwner, Qt as stateSuffix, Bt as styleCacheFromDocument, Vt as styleCacheTravelsInDocument, ut as styleConstants, z as syntaxHighlight, _ as templatePaths, v as templateRootNames, Gn as themeFor, In as themeFromCookies, Rn as themeStore, $ as toUnixSeconds, qe as undeclaredFlagOverrides, Ze as uniqueLines, Xn as useActionsSync, nt as useFontHead, rt as useNetwork, it as usePlitziServiceContext, be as useRegisterSource, er as useRscRefresh, tr as useRscSync, Je as useStableValue, Jn as useTheme, Kn as useThemeStore, ge as utility, _e as utilityOptions, M as validateConnectorManifest, vn as validateSpaceEvent, s as visitorAccess, ze as withForcedFlag, Be as writeForcedFlags, ur as writePaintedEntry, Ln as writeThemeCookie };
|
|
@@ -9,5 +9,5 @@ export type TInitQuery = {
|
|
|
9
9
|
style: Style;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
declare const InitQuery = "\n query InitQuery($environment: String!, $revision: Int) {\n PlatformFlags\n Space(environment: $environment, revision: $revision) {\n definition {\n name\n permanentUrl\n }\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n id\n platform\n variables\n mode\n fonts\n cache\n }\n }\n }\n";
|
|
12
|
+
declare const InitQuery = "\n query InitQuery($environment: String!, $revision: Int) {\n PlatformFlags\n Space(environment: $environment, revision: $revision) {\n definition {\n name\n permanentUrl\n }\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n motion {\n enter\n on\n duration\n delay\n stagger\n loop\n }\n quiet\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n id\n platform\n variables\n mode\n fonts\n cache\n }\n }\n }\n";
|
|
13
13
|
export default InitQuery;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/network/graphql/builder/Queries/InitQuery.ts
|
|
2
|
-
var e = "\n query InitQuery($environment: String!, $revision: Int) {\n PlatformFlags\n Space(environment: $environment, revision: $revision) {\n definition {\n name\n permanentUrl\n }\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n id\n platform\n variables\n mode\n fonts\n cache\n }\n }\n }\n";
|
|
2
|
+
var e = "\n query InitQuery($environment: String!, $revision: Int) {\n PlatformFlags\n Space(environment: $environment, revision: $revision) {\n definition {\n name\n permanentUrl\n }\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n motion {\n enter\n on\n duration\n delay\n stagger\n loop\n }\n quiet\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n id\n platform\n variables\n mode\n fonts\n cache\n }\n }\n }\n";
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as default };
|