@plitzi/sdk-variables 0.36.2 → 0.37.1

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