@plitzi/sdk-schema 0.36.2 → 0.37.0
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 +61 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# @plitzi/sdk-schema
|
|
2
2
|
|
|
3
|
+
## 0.37.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- - A `button` takes a `title`: shown as a tooltip, and its accessible name when it has no text of its own — an
|
|
8
|
+
icon-only button without one was announced as nothing. The builder's settings offer it as "Tooltip". The JSON export
|
|
9
|
+
is two files, `schema.json` and `style.json`, shown as tabs; each group of changes in the export folds away.
|
|
10
|
+
|
|
11
|
+
- `BindingTransformer.params` is `Record<string, string | number | boolean>`: a param the builder draws as a checkbox
|
|
12
|
+
(`styleVariant`'s `append`) is stored as the boolean it is and read as one, so the type now says so. The MCP compares
|
|
13
|
+
such a param with its catalog options as text. A `container` may be an `li`, for the rows of a list. The export
|
|
14
|
+
keeps every element id with `keepIds`, and the header's Publish dialog opens wider.
|
|
15
|
+
|
|
16
|
+
- **The builder exports the space on screen — on paid plans.** **Export** in the header opens a wide dialog: the
|
|
17
|
+
format as tabs (TypeScript in one file, TypeScript with a file per page as a `.zip`, or JSON), generated as soon as
|
|
18
|
+
it is picked, shown read-only in CodeMirror — beside a file list when there are several — with one row of actions,
|
|
19
|
+
**Copy** and **Download**. What the export tidied is a one-line note that unfolds into readable groups. On the free
|
|
20
|
+
plan the dialog explains what export is instead; the server refuses the code with a 402 (`limit: 'spaceExport'`)
|
|
21
|
+
whatever the builder shows. `useSpaceExport` is the one way into it, for anything else that needs the space as files.
|
|
22
|
+
|
|
23
|
+
- **A space document can be read back into code.** `specFromSpace(documents)` turns a `{ schema, style }` pair — a
|
|
24
|
+
builder export, a seed checked in as JSON — into the `SpaceSpec` that authors it, and `specToSource(spec, { exportName })`
|
|
25
|
+
writes that spec out as the TypeScript a person would write: one factory call per element, the attributes a type
|
|
26
|
+
already defaults to left out, the longhands the document stores written back as `padding: 10px 20px`, and every class
|
|
27
|
+
something names as a `styles()` declaration held in a variable. `split: true` writes one file per page and per layout.
|
|
28
|
+
`compareSpaces(expected, actual)` proves the round trip: it lists every way two pairs render differently — the tree,
|
|
29
|
+
the attributes, the rules that apply to each element whatever its selector is called, bindings, flows, pages, layouts
|
|
30
|
+
and settings — and nothing else. A selector used by one element becomes that element's own `css`; one shared, or
|
|
31
|
+
spelled out anywhere in the document (a `customCss` rule, a template), stays a class under its own name; an element id
|
|
32
|
+
nothing refers to is left out and derived again.
|
|
33
|
+
|
|
34
|
+
What an older builder left behind is repaired on the way, and every repair is reported in `corrections` rather than
|
|
35
|
+
made silently: element types that no longer exist (`navbar` → a `list` laid out in a row, `navbarItem` → `listItem`),
|
|
36
|
+
a hover stored as a class of its own (`card:hover`) folded into the class, fields and attributes no component reads,
|
|
37
|
+
a setting nothing reads, a link `target` of `_blank` (the component adds the underscore, so it rendered as `__blank`),
|
|
38
|
+
`null` or an empty list where an attribute is unset, a binding to a source nothing publishes, a flow with a step that
|
|
39
|
+
runs nothing, and a global callback registered on the wrong module. A CSS property the style editor cannot hold is
|
|
40
|
+
kept in `customCss` under the same selector, so the page still renders it.
|
|
41
|
+
|
|
42
|
+
- **What a spec can say grew to what a document holds.** A selector carries its states and variants beside its rules —
|
|
43
|
+
`styles('card', { css, states: { hover }, variants: { active } })`, and `states` on an element's own `css` — and the
|
|
44
|
+
selector cache is now written by `processSelector`, the function the style editor writes it with. An element type's
|
|
45
|
+
defaults (`elements`) take states, variants, per-breakpoint rules and `slots` for its other selectors (a modal's
|
|
46
|
+
`rootContainer`). A space declares `layouts` — shells that pages render inside, named by `layout: { id, slot }` on a
|
|
47
|
+
page or on another layout, with the slot checked to be inside the shell — and a page takes `keepState` and
|
|
48
|
+
`stateStorage`. `visible: false` starts an element hidden for a flow to reveal, and `loadStrategy` is carried through.
|
|
49
|
+
An element's own selector never takes the name of a declared class any more, however that class happens to be called.
|
|
50
|
+
|
|
51
|
+
- `elementAttributeNames` lists, as data, the attributes each built-in element can be authored with — `null` for one
|
|
52
|
+
that takes any. It is generated from the elements' attribute types (`yarn generate:attribute-names`) and a type test
|
|
53
|
+
fails when the two disagree. `defaultAttributes(type)` and `defaultLabel(type)` expose what a factory fills in.
|
|
54
|
+
|
|
55
|
+
- `CustomAttributes` accepts any attribute, because the component a custom element's `renderType` names reads its own
|
|
56
|
+
attributes off it; and `FormControlAttributes` declares `previewError`, which `withFieldValue` reads.
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies
|
|
61
|
+
- @plitzi/sdk-shared@0.37.0
|
|
62
|
+
- @plitzi/sdk-style@0.37.0
|
|
63
|
+
|
|
3
64
|
## 0.36.2
|
|
4
65
|
|
|
5
66
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@plitzi/plitzi-ui": "^1.6.21",
|
|
52
|
-
"@plitzi/sdk-shared": "0.
|
|
53
|
-
"@plitzi/sdk-style": "0.
|
|
52
|
+
"@plitzi/sdk-shared": "0.37.0",
|
|
53
|
+
"@plitzi/sdk-style": "0.37.0",
|
|
54
54
|
"prop-types": "^15.8.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|