@syncropel/projections 0.3.1 → 0.6.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 +68 -0
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +440 -15
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +30 -7
- package/dist/schema.js.map +1 -1
- package/dist/validators.d.ts +1 -1
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +301 -5
- package/dist/validators.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@syncropel/projections` are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this project uses [SemVer](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [0.6.0] — 2026-05-18
|
|
6
|
+
|
|
7
|
+
SRP v0.6 — two configuration-control node types: `facet-grid` (a faceted filter) and `column-config` (a grid column picker). Additive and backwards-compatible: every v0.1–v0.5 document remains valid; the `srp` field now accepts `"0.1"`–`"0.6"`. Completes the declarative bodies of a library workspace's Filters + Columns popovers. See ADR-106.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **Two new node types** (`NODE_TYPES` 37 → 39):
|
|
12
|
+
- **`facet-grid`** — a faceted filter: a row of category tabs, and beneath the active tab a wrapped grid of selectable, count-bearing chips. Host owns `bind.active` + `bind.selected`; a tab pick dispatches `onFacetChange`, a chip toggle dispatches `onToggle`. The tag section of a library Filters panel.
|
|
13
|
+
- **`column-config`** — a grid column picker: preset buttons plus a drag-to-reorder list of visibility checkboxes. Host owns `bind.visible` (visible column ids, in order); any change dispatches `onChange`. Pairs with `data-table` — `bind.visible` selects + orders the table's columns.
|
|
14
|
+
|
|
15
|
+
- **New supporting types** — `FacetOption`, `FacetCategory`, `ColumnConfigColumn`, `ColumnConfigPreset`; exported interfaces `FacetGridNode`, `ColumnConfigNode`.
|
|
16
|
+
|
|
17
|
+
### Validators
|
|
18
|
+
|
|
19
|
+
- `validateSRP` / `validateNode` accept `srp: "0.6"` and validate both new nodes — `facet-grid` requires a non-empty `facets` array (each `{id, label, options}`) + `bind.active`; `column-config` requires a non-empty `columns` array (each `{id, label}`) + `bind.visible`.
|
|
20
|
+
|
|
21
|
+
## [0.5.0] — 2026-05-18
|
|
22
|
+
|
|
23
|
+
SRP v0.5 — four library-workspace node types plus `data-table` sticky columns and three visual cell kinds. Additive and backwards-compatible: every v0.1–v0.4 document remains valid; the `srp` field now accepts `"0.1"`–`"0.5"`. Part of the library-workspace foundation arc (the CatchMyVibe Library, the task surface, and future file/contact browsers all instantiate the same archetype). See ADR-105.
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
- **Four new node types** (`NODE_TYPES` 33 → 37):
|
|
28
|
+
- **`popover`** — a trigger button paired with an anchored panel; owns its own open/close state (no `bind`). The toolbar Columns + Filters controls of a library view are `popover` nodes.
|
|
29
|
+
- **`slider`** — a draggable numeric input; the continuous sibling of `select`. Host owns `bind.value`; a change dispatches `onChange`.
|
|
30
|
+
- **`rating`** — a row of stars; a display (`readOnly`) or an input. Host owns `bind.value`.
|
|
31
|
+
- **`thumbnail`** — a rectangular content-image token (album art, file preview) with a configurable aspect ratio + corner radius. Distinct from `avatar` (a square identity token).
|
|
32
|
+
|
|
33
|
+
- **`data-table` `props.stickyColumns`** — pin the first N columns (and the leading checkbox / action cells) so they stay visible while the rest scroll horizontally.
|
|
34
|
+
|
|
35
|
+
- **`data-table` `meter` / `rating` / `thumbnail` cell kinds** — `meter` renders a numeric `0..1` cell as an inline bar (recoloured by the column's new `thresholds`); `rating` renders a numeric cell as stars (count from the column's new `max`); `thumbnail` renders a URL-valued cell as a small image.
|
|
36
|
+
|
|
37
|
+
- **New token unions + supporting types** — `PopoverAlign`, `ThumbnailRadius`, `ThumbnailAspect`; exported interfaces `PopoverNode`, `SliderNode`, `RatingNode`, `ThumbnailNode`. `TableCellKind` gains `"meter"`, `"rating"`, `"thumbnail"`; `DataTableColumnDef` gains `thresholds` + `max`.
|
|
38
|
+
|
|
39
|
+
### Validators
|
|
40
|
+
|
|
41
|
+
- `validateSRP` / `validateNode` accept `srp: "0.5"` and validate all four new nodes — `popover` requires a non-empty `label`; `slider` requires numeric `min`/`max` + `bind.value`; `rating` requires `bind.value`; `thumbnail` requires a non-empty `alt`. The `data-table` `kind` enum gains the three visual cell kinds; `stickyColumns`, column `thresholds`, and column `max` are type-checked.
|
|
42
|
+
|
|
43
|
+
## [0.4.0] — 2026-05-18
|
|
44
|
+
|
|
45
|
+
SRP v0.4 — eight visualization + hierarchy node types plus `data-table` row selection and a two-line cell kind. Additive and backwards-compatible: every v0.1/v0.2/v0.3 document remains valid; the `srp` field now accepts `"0.1"`, `"0.2"`, `"0.3"`, or `"0.4"`. See ADR-104.
|
|
46
|
+
|
|
47
|
+
### Features
|
|
48
|
+
|
|
49
|
+
- **Eight new node types** (`NODE_TYPES` 25 → 33):
|
|
50
|
+
- **`meter`** — a horizontal bar gauge for a `0..1` reading; `continuous` or `segmented` variant, optional value→tone `thresholds`. For energy bands, trust scores, match confidence, cost-vs-budget.
|
|
51
|
+
- **`gauge`** — a 270° radial arc gauge for a `0..1` reading; optional coloured `zones`. Doubles as the Syncropel Dial (the `d ∈ [0,1]` control surface, F3).
|
|
52
|
+
- **`avatar`** — a compact identity token: image `src`, initials from `name`, or a `glyph` fallback.
|
|
53
|
+
- **`progress`** — a determinate or `indeterminate` progress bar.
|
|
54
|
+
- **`sparkline`** — a tiny axis-less inline chart (`line` or `bar`) for trend-at-a-glance.
|
|
55
|
+
- **`chart`** — a labelled `line` / `area` / `bar` / `pie` chart with axes + an optional legend.
|
|
56
|
+
- **`tree`** — a hierarchical, collapsible list (playlist folders, namespace trees, thread forks); host owns `bind.selected` / `bind.expanded`.
|
|
57
|
+
- **`tag-input`** — an editable tag set with optional autocomplete `suggestions`; the fourth stateful input, host owns `bind.tags`.
|
|
58
|
+
|
|
59
|
+
- **`data-table` `props.selectable`** — render a leading checkbox column with a select-all header; the table dispatches `onSelectionChange` with the selected rows.
|
|
60
|
+
|
|
61
|
+
- **`data-table` `kind: "lines"` cell** — a two-line cell rendering the `key` value as the primary line and the column's new `subKey` value as a muted subtitle.
|
|
62
|
+
|
|
63
|
+
- **New token unions + supporting types** — `VizTone`, `VizSize`, `MeterVariant`, `SparklineVariant`, `ChartKind`; exported interfaces `MeterNode`, `GaugeNode`, `AvatarNode`, `ProgressNode`, `SparklineNode`, `ChartNode`, `TreeNode`, `TagInputNode`, `VizThreshold`, `GaugeZone`, `ChartPoint`, `ChartSeries`, `TreeItem`. `TableCellKind` gains `"lines"`.
|
|
64
|
+
|
|
65
|
+
### Validators
|
|
66
|
+
|
|
67
|
+
- `validateSRP` / `validateNode` accept `srp: "0.4"` and validate all eight new nodes — `meter`/`gauge` require a numeric `value`; `avatar` requires a non-empty `name`; `sparkline` requires a `values` number array; `chart` requires a known `kind` + non-empty `series`; `tree` requires an `items` array (recursively validating each `{id, label}`); `tag-input` requires `bind.tags`. The `data-table` `kind` enum gains `"lines"` and `subKey` is type-checked.
|
|
68
|
+
|
|
69
|
+
### Compatibility
|
|
70
|
+
|
|
71
|
+
- Additive minor release (SemVer-minor). Every v0.1/v0.2/v0.3 type export is unchanged; every prior document validates unchanged. The v0.4 additions are new node types validated by `NODE_TYPES` membership plus optional `data-table` props — the `srp` version is a capability advertisement, not an enforcement boundary.
|
|
72
|
+
|
|
5
73
|
## [0.3.1] — 2026-05-18
|
|
6
74
|
|
|
7
75
|
Additive, backwards-compatible — a `segmented` presentation hint.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @syncropel/projections — Syncropel Rendering Protocol (SRP) v0.
|
|
2
|
+
* @syncropel/projections — Syncropel Rendering Protocol (SRP) v0.6.
|
|
3
3
|
*
|
|
4
4
|
* TypeScript schema + runtime validators for declarative UI documents
|
|
5
5
|
* rendered by @syncropel/react (and other renderers). Zero runtime
|
|
@@ -7,12 +7,18 @@
|
|
|
7
7
|
*
|
|
8
8
|
* v0.2 adds five interactive container + input node types (tabs,
|
|
9
9
|
* data-table, board, text-input, form). v0.3 adds the `segmented` node
|
|
10
|
-
* plus a polished-data-grid increment to `data-table`.
|
|
11
|
-
*
|
|
10
|
+
* plus a polished-data-grid increment to `data-table`. v0.4 adds eight
|
|
11
|
+
* visualization + hierarchy nodes (meter, gauge, avatar, progress,
|
|
12
|
+
* sparkline, chart, tree, tag-input) plus `data-table` row selection.
|
|
13
|
+
* v0.5 adds four library-workspace nodes (popover, slider, rating,
|
|
14
|
+
* thumbnail) plus `data-table` sticky columns and meter / rating /
|
|
15
|
+
* thumbnail cell kinds. v0.6 adds two configuration-control nodes
|
|
16
|
+
* (facet-grid, column-config). Every increment is additive +
|
|
17
|
+
* backwards-compatible.
|
|
12
18
|
*
|
|
13
19
|
* Docs: https://syncropel.com
|
|
14
20
|
*/
|
|
15
|
-
export type { SRPDocument, SRPMeta, SRPNode, NodeType, ColumnNode, RowNode, GridNode, CardNode, DividerNode, RecordLineNode, RecordLineListNode, ChipNode, HeadingNode, TextNode, StatNode, KeyValueNode, ButtonNode, IconButtonNode, CopyButtonNode, SelectNode, EmptyStateNode, ErrorStateNode, SkeletonNode, TabsNode, DataTableNode, BoardNode, TextInputNode, FormNode, SegmentedNode, SegmentedOption, DataTableColumnDef, TableSort, TableRowAction, TableRowTone, Gap, Padding, DividerSpacing, Cols, ColumnAlign, RowAlign, Justify, RecordLineVariant, ChipTone, TextSize, TextWeight, TextTone, ButtonVariant, ButtonSize, SkeletonShape, TableColumnAlign, TableCellKind, DataTableVariant, TextInputKind, RowTone, SortDirection, RowActionPosition, SegmentedVariant, GlyphKind, ActionDesc, VQLQuery, } from "./schema.js";
|
|
21
|
+
export type { SRPDocument, SRPMeta, SRPNode, NodeType, ColumnNode, RowNode, GridNode, CardNode, DividerNode, RecordLineNode, RecordLineListNode, ChipNode, HeadingNode, TextNode, StatNode, KeyValueNode, ButtonNode, IconButtonNode, CopyButtonNode, SelectNode, EmptyStateNode, ErrorStateNode, SkeletonNode, TabsNode, DataTableNode, BoardNode, TextInputNode, FormNode, SegmentedNode, SegmentedOption, DataTableColumnDef, TableSort, TableRowAction, TableRowTone, MeterNode, GaugeNode, AvatarNode, ProgressNode, SparklineNode, ChartNode, TreeNode, TagInputNode, VizThreshold, GaugeZone, ChartPoint, ChartSeries, TreeItem, PopoverNode, SliderNode, RatingNode, ThumbnailNode, FacetGridNode, ColumnConfigNode, FacetOption, FacetCategory, ColumnConfigColumn, ColumnConfigPreset, Gap, Padding, DividerSpacing, Cols, ColumnAlign, RowAlign, Justify, RecordLineVariant, ChipTone, TextSize, TextWeight, TextTone, ButtonVariant, ButtonSize, SkeletonShape, TableColumnAlign, TableCellKind, DataTableVariant, TextInputKind, RowTone, SortDirection, RowActionPosition, SegmentedVariant, VizTone, VizSize, MeterVariant, SparklineVariant, ChartKind, GlyphKind, PopoverAlign, ThumbnailRadius, ThumbnailAspect, ActionDesc, VQLQuery, } from "./schema.js";
|
|
16
22
|
export { NODE_TYPES } from "./schema.js";
|
|
17
23
|
export { validateSRP, validateNode, isSRPDocument, isSRPNode, } from "./validators.js";
|
|
18
24
|
export type { ValidationResult, ValidationError, ValidationErrorCode, } from "./validators.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,YAAY,EACV,WAAW,EACX,OAAO,EACP,OAAO,EACP,QAAQ,EAER,UAAU,E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B,CAAC;AAGzB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @syncropel/projections — Syncropel Rendering Protocol (SRP) v0.
|
|
2
|
+
* @syncropel/projections — Syncropel Rendering Protocol (SRP) v0.6.
|
|
3
3
|
*
|
|
4
4
|
* TypeScript schema + runtime validators for declarative UI documents
|
|
5
5
|
* rendered by @syncropel/react (and other renderers). Zero runtime
|
|
@@ -7,8 +7,14 @@
|
|
|
7
7
|
*
|
|
8
8
|
* v0.2 adds five interactive container + input node types (tabs,
|
|
9
9
|
* data-table, board, text-input, form). v0.3 adds the `segmented` node
|
|
10
|
-
* plus a polished-data-grid increment to `data-table`.
|
|
11
|
-
*
|
|
10
|
+
* plus a polished-data-grid increment to `data-table`. v0.4 adds eight
|
|
11
|
+
* visualization + hierarchy nodes (meter, gauge, avatar, progress,
|
|
12
|
+
* sparkline, chart, tree, tag-input) plus `data-table` row selection.
|
|
13
|
+
* v0.5 adds four library-workspace nodes (popover, slider, rating,
|
|
14
|
+
* thumbnail) plus `data-table` sticky columns and meter / rating /
|
|
15
|
+
* thumbnail cell kinds. v0.6 adds two configuration-control nodes
|
|
16
|
+
* (facet-grid, column-config). Every increment is additive +
|
|
17
|
+
* backwards-compatible.
|
|
12
18
|
*
|
|
13
19
|
* Docs: https://syncropel.com
|
|
14
20
|
*/
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAgHH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,aAAa;AACb,OAAO,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,iBAAiB,CAAC;AAQzB,yBAAyB;AACzB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC","sourcesContent":["/**\n * @syncropel/projections — Syncropel Rendering Protocol (SRP) v0.6.\n *\n * TypeScript schema + runtime validators for declarative UI documents\n * rendered by @syncropel/react (and other renderers). Zero runtime\n * dependencies; universal runtime (Node, Deno, Bun, Workers, browsers).\n *\n * v0.2 adds five interactive container + input node types (tabs,\n * data-table, board, text-input, form). v0.3 adds the `segmented` node\n * plus a polished-data-grid increment to `data-table`. v0.4 adds eight\n * visualization + hierarchy nodes (meter, gauge, avatar, progress,\n * sparkline, chart, tree, tag-input) plus `data-table` row selection.\n * v0.5 adds four library-workspace nodes (popover, slider, rating,\n * thumbnail) plus `data-table` sticky columns and meter / rating /\n * thumbnail cell kinds. v0.6 adds two configuration-control nodes\n * (facet-grid, column-config). Every increment is additive +\n * backwards-compatible.\n *\n * Docs: https://syncropel.com\n */\n\n// Schema types\nexport type {\n SRPDocument,\n SRPMeta,\n SRPNode,\n NodeType,\n // Container nodes\n ColumnNode,\n RowNode,\n GridNode,\n CardNode,\n DividerNode,\n // Record-rendering nodes\n RecordLineNode,\n RecordLineListNode,\n ChipNode,\n // Data-display nodes\n HeadingNode,\n TextNode,\n StatNode,\n KeyValueNode,\n // Interactive nodes\n ButtonNode,\n IconButtonNode,\n CopyButtonNode,\n SelectNode,\n // Feedback nodes\n EmptyStateNode,\n ErrorStateNode,\n SkeletonNode,\n // Interactive containers + inputs (SRP v0.2)\n TabsNode,\n DataTableNode,\n BoardNode,\n TextInputNode,\n FormNode,\n // Choice control (SRP v0.3)\n SegmentedNode,\n SegmentedOption,\n // Data-grid supporting types (SRP v0.3)\n DataTableColumnDef,\n TableSort,\n TableRowAction,\n TableRowTone,\n // Visualization + hierarchy nodes (SRP v0.4)\n MeterNode,\n GaugeNode,\n AvatarNode,\n ProgressNode,\n SparklineNode,\n ChartNode,\n TreeNode,\n TagInputNode,\n // Visualization + hierarchy supporting types (SRP v0.4)\n VizThreshold,\n GaugeZone,\n ChartPoint,\n ChartSeries,\n TreeItem,\n // Library-workspace nodes (SRP v0.5)\n PopoverNode,\n SliderNode,\n RatingNode,\n ThumbnailNode,\n // Configuration-control nodes (SRP v0.6)\n FacetGridNode,\n ColumnConfigNode,\n FacetOption,\n FacetCategory,\n ColumnConfigColumn,\n ColumnConfigPreset,\n // Token unions\n Gap,\n Padding,\n DividerSpacing,\n Cols,\n ColumnAlign,\n RowAlign,\n Justify,\n RecordLineVariant,\n ChipTone,\n TextSize,\n TextWeight,\n TextTone,\n ButtonVariant,\n ButtonSize,\n SkeletonShape,\n TableColumnAlign,\n TableCellKind,\n DataTableVariant,\n TextInputKind,\n RowTone,\n SortDirection,\n RowActionPosition,\n SegmentedVariant,\n VizTone,\n VizSize,\n MeterVariant,\n SparklineVariant,\n ChartKind,\n GlyphKind,\n // Library-workspace tokens (SRP v0.5)\n PopoverAlign,\n ThumbnailRadius,\n ThumbnailAspect,\n // Actions + queries\n ActionDesc,\n VQLQuery,\n} from \"./schema.js\";\n\nexport { NODE_TYPES } from \"./schema.js\";\n\n// Validators\nexport {\n validateSRP,\n validateNode,\n isSRPDocument,\n isSRPNode,\n} from \"./validators.js\";\n\nexport type {\n ValidationResult,\n ValidationError,\n ValidationErrorCode,\n} from \"./validators.js\";\n\n// Markdown subset parser\nexport { parseInline, stripFormatting } from \"./markdown.js\";\nexport type { InlineNode } from \"./markdown.js\";\n"]}
|