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