@plitzi/sdk-authoring 0.38.3 → 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 +193 -0
- package/dist/index.d.ts +310 -31
- package/dist/index.js +1604 -436
- package/dist/node.d.ts +8 -0
- package/dist/node.js +28 -1
- package/package.json +6 -6
- package/skills/plitzi-authoring/CHEATSHEET.md +5 -3
- package/skills/plitzi-authoring/SKILL.md +5 -2
- package/skills/plitzi-authoring/recipes/accordion.ts +58 -0
- package/skills/plitzi-authoring/recipes/link-to-a-section.ts +1 -1
- package/skills/plitzi-authoring/recipes/server-data.ts +65 -0
- package/skills/plitzi-authoring/recipes/style-a-page.ts +1 -1
- package/skills/plitzi-authoring/reference/accessibility.md +6 -2
- package/skills/plitzi-authoring/reference/authoring-errors.md +8 -3
- package/skills/plitzi-authoring/reference/colours-and-motion.md +5 -1
- package/skills/plitzi-authoring/reference/data-and-visibility.md +26 -16
- package/skills/plitzi-authoring/reference/efficiency.md +10 -1
- package/skills/plitzi-authoring/reference/elements-and-styles.md +5 -9
- package/skills/plitzi-authoring/reference/lists.md +1 -1
- package/skills/plitzi-authoring/reference/review-checklist.md +14 -2
- package/skills/plitzi-authoring/reference/snippets-and-export.md +2 -2
- package/skills/plitzi-authoring/reference/templates.md +1 -1
- package/skills/plitzi-authoring/reference/testing.md +1 -1
|
@@ -31,8 +31,8 @@ Never rewrite an exported space by hand. `specFromSpace({ schema, style })` read
|
|
|
31
31
|
A server action reads back the same way: `actionSpecFromEntry({ id, document })` gives the `defineAction` spec that writes
|
|
32
32
|
it — only when that spec writes the very same document, otherwise `reason` says why and it stays JSON — and
|
|
33
33
|
`actionToSource(spec)` writes the module. For the whole space as a project — pages, actions, functions, the source of
|
|
34
|
-
its plugins and runtime, its files — use `plitzi create --from <space>` (
|
|
35
|
-
the parts by hand.
|
|
34
|
+
its plugins and runtime, its files — use `plitzi create --from <space>` (then `plitzi pull` to bring the space's changes in, and
|
|
35
|
+
`plitzi push` to put the project's back) rather than exporting the parts by hand.
|
|
36
36
|
|
|
37
37
|
For a document you did not author — an export, a JSON edited by hand — run the gate before serving it:
|
|
38
38
|
`validateSpace({ schema, style })`.
|
|
@@ -6,7 +6,7 @@ Plitzi's templates are Twig, run by Plitzi's own interpreter. What a `{{ … }}`
|
|
|
6
6
|
|
|
7
7
|
| Written in | What is evaluated | What it can read |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| a binding's `twigTemplate` transformer | the whole template: conditions, filters, `{% set %}`, loops, tests | `source` (the bound value), `sourceTo
|
|
9
|
+
| a binding's `twigTemplate` transformer | the whole template: conditions, filters, `{% set %}`, loops, tests | `source` (the bound value — undefined until it has one: `{{ source|default('…') }}`), `sourceTo` (the attribute's value before it), the globals, the variables by bare name, and every source around the element |
|
|
10
10
|
| a flow step's params | the whole template | the trigger's payload and earlier steps by name, the globals, sources around the element |
|
|
11
11
|
| an ATTRIBUTE (`href`, `src`, `content`…) | only `{{ name }}` tokens (a filter after the name is allowed) | the globals, the variables and the page's route params by bare name (`{{ apiUrl }}`, `{{ slug }}`), and every source around the element (`{{ list_games.item.slug }}`) |
|
|
12
12
|
|
|
@@ -87,7 +87,7 @@ One code on one element; it comes back in `warnings` with the reason, and an ent
|
|
|
87
87
|
|
|
88
88
|
## What to check
|
|
89
89
|
|
|
90
|
-
- **Every viewport and both themes.** Desktop, tablet (48–64rem) and mobile (
|
|
90
|
+
- **Every viewport and both themes.** Desktop, tablet (48–64rem) and mobile (up to 48rem); `colorScheme: 'dark'` as well
|
|
91
91
|
as light.
|
|
92
92
|
- **No horizontal scroll on a phone.** A column child grows to its content unless its parent stretches it; a code
|
|
93
93
|
block or a wide table is what finds out.
|