@plitzi/sdk-authoring 0.39.11 → 0.39.13
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 +14 -0
- package/dist/index-src.js +5187 -4039
- package/dist/index.d.ts +1007 -55
- package/dist/index.js +2 -2
- package/dist/node.d.ts +117 -1
- package/dist/node.js +2 -2
- package/dist/plugin.d.ts +5 -0
- package/package.json +7 -7
- package/skills/plitzi-authoring/recipes/accordion.ts +39 -42
- package/skills/plitzi-authoring/reference/accessibility.md +7 -4
- package/skills/plitzi-authoring/reference/auth.md +15 -0
- package/skills/plitzi-authoring/reference/authoring-errors.md +21 -0
- package/skills/plitzi-authoring/reference/feature-flags.md +67 -0
- package/skills/plitzi-authoring/reference/flows.md +4 -1
- package/skills/plitzi-authoring/reference/index.md +1 -1
- package/skills/plitzi-authoring/reference/templates.md +5 -3
|
@@ -15,7 +15,7 @@ Read one only when the task names its subject.
|
|
|
15
15
|
| [data-and-visibility.md](data-and-visibility.md) | Bindings, providers, offline data, loading/empty/error states, live data, caching, showing and hiding, kept state |
|
|
16
16
|
| [kept-state.md](kept-state.md) | State that outlives a reload: `keepState`, transient and painted keys |
|
|
17
17
|
| [auth.md](auth.md) | Signing people in: providers, `authLogin`, `auth.*`, visitor roles |
|
|
18
|
-
| [feature-flags.md](feature-flags.md) | Switching a part of the space on or off — a beta, a rollout, the old version kept until the new one ships |
|
|
18
|
+
| [feature-flags.md](feature-flags.md) | Switching a part of the space on or off — a beta, a rollout, the old version kept until the new one ships; an A/B test; an audience; a time window |
|
|
19
19
|
| [lists.md](lists.md) | Rendering rows, filtering and sorting them, a detail page for one record, carousels |
|
|
20
20
|
| [typed-sources.md](typed-sources.md) | Data typed by a sample of it: `source()`, typed rows, `twig` for templates |
|
|
21
21
|
| [validation.md](validation.md) | How `authorSpace` checks, the loop that wastes no attempts, and what it cannot see |
|
|
@@ -39,7 +39,7 @@ A text template feeding `items` is refused: the list would receive the array wri
|
|
|
39
39
|
## Naming sources inside a template
|
|
40
40
|
|
|
41
41
|
Always the full name — the element's kind, an underscore, its id: `apiContainer_stats`, `list_rows`,
|
|
42
|
-
`modalContainer_credits`. The globals (`state`, `auth`, `navigation`, `variables`, `host`, `theme`, `flags`, `computed`) are
|
|
42
|
+
`modalContainer_credits`. The globals (`state`, `auth`, `navigation`, `variables`, `host`, `theme`, `flags`, `experiments`, `time`, `computed`) are
|
|
43
43
|
named as themselves — `{{ flags.newCheckout }}` is `true` or `false`, see [feature flags](feature-flags.md). In a flow, an earlier step is read by the name given with `named('quote', …)`: `{{ quote.output.total }}`.
|
|
44
44
|
|
|
45
45
|
An id with a hyphen is one name inside a template — `{{ apiContainer_tn-data.data.total }}` reads that provider. So
|
|
@@ -116,6 +116,8 @@ A lookup across two sources — a row joined to the stats around it:
|
|
|
116
116
|
- **Now** is `'now'`: `{{ 'now'|date('F Y', 'UTC') }}` is the month the page is rendered in — on the server, then again
|
|
117
117
|
in the browser, so keep it to the day or coarser (a minute can pass between the two). An age, a "this month", a
|
|
118
118
|
countdown reads it instead of a date written into the page.
|
|
119
|
-
- For "3 minutes ago" or "in 2 hours", `|ago` (`|ago('es')` in another language) —
|
|
120
|
-
|
|
119
|
+
- For "3 minutes ago" or "in 2 hours", `|ago` (`|ago('es')` in another language) — told by the page's clock, so it
|
|
120
|
+
moves on each minute while the page is open, and the server and the browser say the same thing (within the minute it
|
|
121
|
+
is "now"). The clock itself is `time`: `{{ time.now }}` (the start of the minute, ms) and `{{ time.today }}` (the day,
|
|
122
|
+
UTC) — "open now", today's entries — and nothing reading it renders more than once a minute. A transformer of a binding does the same: `dateConverter` with
|
|
121
123
|
`{ asAge: true }` (`isUnix: false` for an ISO string).
|