@plitzi/sdk-authoring 0.35.0 → 0.35.2
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 +38 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +4 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @plitzi/sdk-authoring
|
|
2
2
|
|
|
3
|
+
## 0.35.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 470aaf8: A booking form can ask for a date, and a toggle can say it is one.
|
|
8
|
+
|
|
9
|
+
- **`formControl` accepts `subType: 'date'`.** It renders the browser's own date picker and submits `YYYY-MM-DD`, so
|
|
10
|
+
a flow or a server action reads one format whatever the visitor's locale. Until now a date was a free text field
|
|
11
|
+
and every form that needed one parsed whatever somebody typed. Offered in the builder's Input Type list.
|
|
12
|
+
- **`button` accepts `ariaExpanded` and `ariaPressed`.** A button that opens a menu or an answer, or one that stays on
|
|
13
|
+
like a filter, can tell assistive technology so — statically, or bound to the state it flips
|
|
14
|
+
(`bind: { ariaExpanded: 'state.menuOpen' }`). Left out, neither attribute is rendered: an ordinary button does not
|
|
15
|
+
claim to control anything.
|
|
16
|
+
|
|
17
|
+
- 470aaf8: The theme is a data source, and a binding reads every source its template names.
|
|
18
|
+
|
|
19
|
+
- **`theme` global source.** `GlobalSources` publishes `runtime.sources.theme` as `{ mode, resolved }` for the area
|
|
20
|
+
the space paints in. `resolved` is always `light` or `dark`, so `{{ theme.resolved }}` is what a URL or a `when`
|
|
21
|
+
rule wants — a dashboard asking the API for a thumbnail in the visitor's scheme, for one. The comments that promised
|
|
22
|
+
`{{ theme.resolved }}` through the app store's `theme` mirror were wrong: nothing a binding reads lives there.
|
|
23
|
+
- **A binding subscribes to the roots of its `twigTemplate`.** It used to get only the head of its `source`, so a
|
|
24
|
+
binding on `list_spaces.item.id` whose template also said `{{ theme.resolved }}` or `{{ state.scope }}` resolved the
|
|
25
|
+
second name to nothing, silently. The names are read off the parsed template (`templateRootNames`, exported from
|
|
26
|
+
`@plitzi/sdk-shared/helpers/twigWrapper`). A name that is not a source is left out of the map rather than set to
|
|
27
|
+
`undefined`, so `{{ source }}` and the variables lifted to the template's root are never shadowed.
|
|
28
|
+
- **Authoring.** `theme` joins `GLOBAL_SOURCES`: `bind: { src: 'theme.resolved' }` is accepted, and an element can no
|
|
29
|
+
longer be named `theme`.
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- v0.35.2
|
|
34
|
+
|
|
35
|
+
## 0.35.1
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- v0.35.1
|
|
40
|
+
|
|
3
41
|
## 0.35.0
|
|
4
42
|
|
|
5
43
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -701,6 +701,8 @@ export declare const button: ElementFactory<Partial<{
|
|
|
701
701
|
disabled?: boolean | undefined;
|
|
702
702
|
subType?: "button" | "submit" | "reset" | undefined;
|
|
703
703
|
contentPlacement?: "before" | "after" | undefined;
|
|
704
|
+
ariaExpanded?: boolean | undefined;
|
|
705
|
+
ariaPressed?: boolean | undefined;
|
|
704
706
|
}>>;
|
|
705
707
|
|
|
706
708
|
export declare const cancelServerAction: (params: {
|
|
@@ -1270,6 +1272,8 @@ declare const elementDeclarations: {
|
|
|
1270
1272
|
disabled?: boolean | undefined;
|
|
1271
1273
|
subType?: "button" | "submit" | "reset" | undefined;
|
|
1272
1274
|
contentPlacement?: "before" | "after" | undefined;
|
|
1275
|
+
ariaExpanded?: boolean | undefined;
|
|
1276
|
+
ariaPressed?: boolean | undefined;
|
|
1273
1277
|
}>>;
|
|
1274
1278
|
readonly Container: {
|
|
1275
1279
|
readonly type: "container";
|
|
@@ -4369,7 +4373,7 @@ declare type FormControlAttributes = AuthorableAttributes<FormControlProps, 'val
|
|
|
4369
4373
|
declare type FormControlProps = {
|
|
4370
4374
|
ref: RefObject<HTMLElement>;
|
|
4371
4375
|
className: string;
|
|
4372
|
-
subType: 'text' | 'number' | 'email' | 'password' | 'time' | 'checkbox' | 'switch' | 'select' | 'textarea' | 'hidden';
|
|
4376
|
+
subType: 'text' | 'number' | 'email' | 'password' | 'date' | 'time' | 'checkbox' | 'switch' | 'select' | 'textarea' | 'hidden';
|
|
4373
4377
|
name: string;
|
|
4374
4378
|
label: string;
|
|
4375
4379
|
placeholder: string;
|
|
@@ -4428,6 +4432,8 @@ export declare const getUtility: (action: string) => BuiltinUtility | undefined;
|
|
|
4428
4432
|
* `host` is the odd one: it carries whatever the application EMBEDDING the space handed it, so it is empty for a
|
|
4429
4433
|
* space that IS the page. It is listed here because a space authored as an application SHELL binds to it, and a
|
|
4430
4434
|
* validator that refused the name would make that impossible to write.
|
|
4435
|
+
*
|
|
4436
|
+
* `theme` is `{ mode, resolved }` — `resolved` is always `light` or `dark`, which is what a URL or a rule wants.
|
|
4431
4437
|
*/
|
|
4432
4438
|
export declare const GLOBAL_SOURCES: string[];
|
|
4433
4439
|
|
package/dist/index.js
CHANGED
|
@@ -3583,13 +3583,16 @@ var didYouMean = (name, candidates) => {
|
|
|
3583
3583
|
* `host` is the odd one: it carries whatever the application EMBEDDING the space handed it, so it is empty for a
|
|
3584
3584
|
* space that IS the page. It is listed here because a space authored as an application SHELL binds to it, and a
|
|
3585
3585
|
* validator that refused the name would make that impossible to write.
|
|
3586
|
+
*
|
|
3587
|
+
* `theme` is `{ mode, resolved }` — `resolved` is always `light` or `dark`, which is what a URL or a rule wants.
|
|
3586
3588
|
*/
|
|
3587
3589
|
var GLOBAL_SOURCES = [
|
|
3588
3590
|
"variables",
|
|
3589
3591
|
"navigation",
|
|
3590
3592
|
"auth",
|
|
3591
3593
|
"state",
|
|
3592
|
-
"host"
|
|
3594
|
+
"host",
|
|
3595
|
+
"theme"
|
|
3593
3596
|
];
|
|
3594
3597
|
/**
|
|
3595
3598
|
* Turns what an author wrote into the name the runtime resolves.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-authoring",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.2",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/index.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@microsoft/api-extractor": "^7.59.1",
|
|
46
46
|
"@plitzi/plitzi-ui": "^1.6.21",
|
|
47
|
-
"@plitzi/sdk-elements": "0.
|
|
48
|
-
"@plitzi/sdk-interactions": "0.
|
|
49
|
-
"@plitzi/sdk-schema": "0.
|
|
50
|
-
"@plitzi/sdk-shared": "0.
|
|
51
|
-
"@plitzi/sdk-style": "0.
|
|
47
|
+
"@plitzi/sdk-elements": "0.35.2",
|
|
48
|
+
"@plitzi/sdk-interactions": "0.35.2",
|
|
49
|
+
"@plitzi/sdk-schema": "0.35.2",
|
|
50
|
+
"@plitzi/sdk-shared": "0.35.2",
|
|
51
|
+
"@plitzi/sdk-style": "0.35.2",
|
|
52
52
|
"@types/react": "^19.3.0",
|
|
53
53
|
"eslint": "^9.39.5",
|
|
54
54
|
"typescript": "^6.0.3",
|