@xenosystem/elements 0.0.5 → 0.0.7

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 (75) hide show
  1. package/README.md +65 -65
  2. package/dist/elements/align-bottom.d.ts +10 -0
  3. package/dist/elements/align-bottom.js +23 -0
  4. package/dist/elements/align-horizontal-centers.d.ts +11 -0
  5. package/dist/elements/align-horizontal-centers.js +27 -0
  6. package/dist/elements/align-left.d.ts +12 -0
  7. package/dist/elements/align-left.js +25 -0
  8. package/dist/elements/align-right.d.ts +9 -0
  9. package/dist/elements/align-right.js +22 -0
  10. package/dist/elements/align-top.d.ts +9 -0
  11. package/dist/elements/align-top.js +22 -0
  12. package/dist/elements/align-vertical-centers.d.ts +10 -0
  13. package/dist/elements/align-vertical-centers.js +26 -0
  14. package/dist/elements/archive.js +11 -0
  15. package/dist/elements/book-up.d.ts +10 -0
  16. package/dist/elements/book-up.js +22 -0
  17. package/dist/elements/bookmark.js +7 -0
  18. package/dist/elements/bring-to-front.d.ts +10 -0
  19. package/dist/elements/bring-to-front.js +25 -0
  20. package/dist/elements/broadcast.d.ts +12 -0
  21. package/dist/elements/broadcast.js +27 -0
  22. package/dist/elements/clipboard-check.d.ts +10 -0
  23. package/dist/elements/clipboard-check.js +23 -0
  24. package/dist/elements/cloud.d.ts +11 -0
  25. package/dist/elements/cloud.js +22 -0
  26. package/dist/elements/command.d.ts +11 -0
  27. package/dist/elements/command.js +26 -0
  28. package/dist/elements/distribute-horizontal.d.ts +12 -0
  29. package/dist/elements/distribute-horizontal.js +29 -0
  30. package/dist/elements/distribute-vertical.d.ts +10 -0
  31. package/dist/elements/distribute-vertical.js +27 -0
  32. package/dist/elements/ellipse.d.ts +15 -0
  33. package/dist/elements/ellipse.js +26 -0
  34. package/dist/elements/frame.d.ts +14 -0
  35. package/dist/elements/frame.js +28 -0
  36. package/dist/elements/group.d.ts +11 -0
  37. package/dist/elements/group.js +27 -0
  38. package/dist/elements/keyboard.d.ts +9 -0
  39. package/dist/elements/keyboard.js +28 -0
  40. package/dist/elements/next-dismiss.js +4 -0
  41. package/dist/elements/pen.d.ts +12 -0
  42. package/dist/elements/pen.js +27 -0
  43. package/dist/elements/pointer.d.ts +10 -0
  44. package/dist/elements/pointer.js +21 -0
  45. package/dist/elements/polygon.d.ts +10 -0
  46. package/dist/elements/polygon.js +21 -0
  47. package/dist/elements/send-to-back.d.ts +10 -0
  48. package/dist/elements/send-to-back.js +25 -0
  49. package/dist/elements/star.js +5 -0
  50. package/dist/elements/template.d.ts +11 -0
  51. package/dist/elements/template.js +25 -0
  52. package/dist/elements/ungroup.d.ts +9 -0
  53. package/dist/elements/ungroup.js +21 -0
  54. package/dist/elements/zoom-in.d.ts +10 -0
  55. package/dist/elements/zoom-in.js +23 -0
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.js +3 -0
  58. package/dist/schema.d.ts +15 -0
  59. package/dist/states.d.ts +75 -0
  60. package/dist/states.js +114 -0
  61. package/dist/tokens/border.d.ts +23 -0
  62. package/dist/tokens/border.js +22 -0
  63. package/dist/tokens/chart.d.ts +13 -0
  64. package/dist/tokens/chart.js +15 -0
  65. package/dist/tokens/index.d.ts +11 -0
  66. package/dist/tokens/index.js +11 -0
  67. package/dist/tokens/reading.d.ts +29 -0
  68. package/dist/tokens/reading.js +28 -0
  69. package/dist/tokens/scrollbar.d.ts +19 -0
  70. package/dist/tokens/scrollbar.js +18 -0
  71. package/dist/tokens/surfaces.d.ts +7 -0
  72. package/dist/tokens/surfaces.js +7 -0
  73. package/dist/tokens/terminal.d.ts +36 -0
  74. package/dist/tokens/terminal.js +37 -0
  75. package/package.json +9 -2
@@ -0,0 +1,29 @@
1
+ /**
2
+ * `xeno.distribute-horizontal` — Distribute horizontally. A degenerate element.
3
+ *
4
+ * TWO vertical guide rails, at the left and right extents, with two equal objects between them
5
+ * spaced so the three horizontal gaps are equal (3.2 units each). The PAIR of
6
+ * rails is the whole distinction from the align glyphs, which have one: alignment collapses
7
+ * objects onto a single edge, distribution spreads them BETWEEN two. lucide's name for this shape
8
+ * is `align-horizontal-space-around`; see `meta.tags`.
9
+ */
10
+ export const DistributeHorizontal = {
11
+ id: 'xeno.distribute-horizontal',
12
+ kind: 'icon',
13
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
14
+ geometry: {
15
+ base: [
16
+ { kind: 'rect', x: 2.2, y: 4, w: 1.8, h: 16, rx: 0.4, fill: 'foreground' },
17
+ { kind: 'rect', x: 20, y: 4, w: 1.8, h: 16, rx: 0.4, fill: 'foreground' },
18
+ { kind: 'rect', x: 7.2, y: 7, w: 3.2, h: 10, rx: 1 },
19
+ { kind: 'rect', x: 13.6, y: 7, w: 3.2, h: 10, rx: 1 },
20
+ ],
21
+ },
22
+ bindings: [],
23
+ a11y: { role: 'img', label: 'Distribute horizontally' },
24
+ meta: {
25
+ tags: ['distribute', 'horizontal', 'space', 'align-horizontal-space-around', 'arrange'],
26
+ since: '0.0.6',
27
+ },
28
+ };
29
+ export default DistributeHorizontal;
@@ -0,0 +1,10 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.distribute-vertical` — Distribute vertically. A degenerate element.
4
+ *
5
+ * TWO horizontal guide rails, at the top and bottom extents, with two equal objects between them
6
+ * spaced so the three vertical gaps are equal. The transpose of `xeno.distribute-horizontal`.
7
+ * lucide's name for this shape is `align-vertical-space-around`; see `meta.tags`.
8
+ */
9
+ export declare const DistributeVertical: ElementDeclaration;
10
+ export default DistributeVertical;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * `xeno.distribute-vertical` — Distribute vertically. A degenerate element.
3
+ *
4
+ * TWO horizontal guide rails, at the top and bottom extents, with two equal objects between them
5
+ * spaced so the three vertical gaps are equal. The transpose of `xeno.distribute-horizontal`.
6
+ * lucide's name for this shape is `align-vertical-space-around`; see `meta.tags`.
7
+ */
8
+ export const DistributeVertical = {
9
+ id: 'xeno.distribute-vertical',
10
+ kind: 'icon',
11
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
12
+ geometry: {
13
+ base: [
14
+ { kind: 'rect', x: 4, y: 2.2, w: 16, h: 1.8, rx: 0.4, fill: 'foreground' },
15
+ { kind: 'rect', x: 4, y: 20, w: 16, h: 1.8, rx: 0.4, fill: 'foreground' },
16
+ { kind: 'rect', x: 7, y: 7.2, w: 10, h: 3.2, rx: 1 },
17
+ { kind: 'rect', x: 7, y: 13.6, w: 10, h: 3.2, rx: 1 },
18
+ ],
19
+ },
20
+ bindings: [],
21
+ a11y: { role: 'img', label: 'Distribute vertically' },
22
+ meta: {
23
+ tags: ['distribute', 'vertical', 'space', 'align-vertical-space-around', 'arrange'],
24
+ since: '0.0.6',
25
+ },
26
+ };
27
+ export default DistributeVertical;
@@ -0,0 +1,15 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.ellipse` — Ellipse tool. A degenerate element (pure geometry, no children).
4
+ *
5
+ * 🔴 NOT a circle, and that is the design decision this glyph exists to record. `DESIGN_SYSTEM.md §3`
6
+ * forbids circles in the UI; the tool, however, DRAWS ellipses, and its button has to say so. The
7
+ * resolution is a SUPERELLIPSE (a squircle): a rounded square whose corners are continuous-curvature
8
+ * cubics, drawn rounder than any `rx` rectangle in the set so it reads as "the round shape" next to
9
+ * `xeno.square` — while still being a rectangle with corner radius, which is the only shape family the
10
+ * system permits. The four cubics are symmetric about both axes; no arc command is used. The handle
11
+ * length (5.5 of 8, from each edge midpoint) was set by eye at 16px: at 6.4 it read as a large-radius
12
+ * rounded square — too close to `xeno.square` for a tool palette that shows both.
13
+ */
14
+ export declare const Ellipse: ElementDeclaration;
15
+ export default Ellipse;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `xeno.ellipse` — Ellipse tool. A degenerate element (pure geometry, no children).
3
+ *
4
+ * 🔴 NOT a circle, and that is the design decision this glyph exists to record. `DESIGN_SYSTEM.md §3`
5
+ * forbids circles in the UI; the tool, however, DRAWS ellipses, and its button has to say so. The
6
+ * resolution is a SUPERELLIPSE (a squircle): a rounded square whose corners are continuous-curvature
7
+ * cubics, drawn rounder than any `rx` rectangle in the set so it reads as "the round shape" next to
8
+ * `xeno.square` — while still being a rectangle with corner radius, which is the only shape family the
9
+ * system permits. The four cubics are symmetric about both axes; no arc command is used. The handle
10
+ * length (5.5 of 8, from each edge midpoint) was set by eye at 16px: at 6.4 it read as a large-radius
11
+ * rounded square — too close to `xeno.square` for a tool palette that shows both.
12
+ */
13
+ export const Ellipse = {
14
+ id: 'xeno.ellipse',
15
+ kind: 'icon',
16
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
17
+ geometry: {
18
+ base: [
19
+ { kind: 'path', d: 'M12 4C17.5 4 20 6.5 20 12C20 17.5 17.5 20 12 20C6.5 20 4 17.5 4 12C4 6.5 6.5 4 12 4Z' },
20
+ ],
21
+ },
22
+ bindings: [],
23
+ a11y: { role: 'img', label: 'Ellipse' },
24
+ meta: { tags: ['ellipse', 'oval', 'circle', 'shape', 'tool', 'superellipse'], since: '0.0.7' },
25
+ };
26
+ export default Ellipse;
@@ -0,0 +1,14 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.frame` — Frame. A degenerate element (pure geometry, no children).
4
+ *
5
+ * Two pairs of crop lines that run PAST each other at the corners — the frame / artboard mark, the
6
+ * convention a Figma user already knows from that tool. The overrun is the meaning: it says "a region
7
+ * is being bounded", which a plain square does not, so `xeno.square` (the rectangle tool) cannot stand
8
+ * in for it. Coordinates are our own grid (3–21, rules at 7 and 17).
9
+ *
10
+ * ⚠️ Tried and rejected during review: four separate L/cross crop marks. At 16px they read as four
11
+ * PLUS signs — "add", four times — which is worse than a convention every designer recognises.
12
+ */
13
+ export declare const Frame: ElementDeclaration;
14
+ export default Frame;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * `xeno.frame` — Frame. A degenerate element (pure geometry, no children).
3
+ *
4
+ * Two pairs of crop lines that run PAST each other at the corners — the frame / artboard mark, the
5
+ * convention a Figma user already knows from that tool. The overrun is the meaning: it says "a region
6
+ * is being bounded", which a plain square does not, so `xeno.square` (the rectangle tool) cannot stand
7
+ * in for it. Coordinates are our own grid (3–21, rules at 7 and 17).
8
+ *
9
+ * ⚠️ Tried and rejected during review: four separate L/cross crop marks. At 16px they read as four
10
+ * PLUS signs — "add", four times — which is worse than a convention every designer recognises.
11
+ */
12
+ export const Frame = {
13
+ id: 'xeno.frame',
14
+ kind: 'icon',
15
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
16
+ geometry: {
17
+ base: [
18
+ { kind: 'path', d: 'M3 7H21' },
19
+ { kind: 'path', d: 'M3 17H21' },
20
+ { kind: 'path', d: 'M7 3V21' },
21
+ { kind: 'path', d: 'M17 3V21' },
22
+ ],
23
+ },
24
+ bindings: [],
25
+ a11y: { role: 'img', label: 'Frame' },
26
+ meta: { tags: ['frame', 'artboard', 'board', 'crop', 'tool'], since: '0.0.7' },
27
+ };
28
+ export default Frame;
@@ -0,0 +1,11 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.group` — Group. A degenerate element (pure geometry, no children).
4
+ *
5
+ * Two overlapping objects held by a SELECTION BOUNDARY drawn as four corner brackets. The brackets
6
+ * are the grouping: they are what `xeno.ungroup` removes, and the pair is distinguishable at 16px
7
+ * precisely because one has them and the other does not. Distinct from `xeno.blocks` (three parts in
8
+ * a library) and `xeno.layers` (a stack), which is why neither of those stands in for it.
9
+ */
10
+ export declare const Group: ElementDeclaration;
11
+ export default Group;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * `xeno.group` — Group. A degenerate element (pure geometry, no children).
3
+ *
4
+ * Two overlapping objects held by a SELECTION BOUNDARY drawn as four corner brackets. The brackets
5
+ * are the grouping: they are what `xeno.ungroup` removes, and the pair is distinguishable at 16px
6
+ * precisely because one has them and the other does not. Distinct from `xeno.blocks` (three parts in
7
+ * a library) and `xeno.layers` (a stack), which is why neither of those stands in for it.
8
+ */
9
+ export const Group = {
10
+ id: 'xeno.group',
11
+ kind: 'icon',
12
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
13
+ geometry: {
14
+ base: [
15
+ { kind: 'path', d: 'M3 8V4.2A1.2 1.2 0 0 1 4.2 3H8' },
16
+ { kind: 'path', d: 'M16 3h3.8A1.2 1.2 0 0 1 21 4.2V8' },
17
+ { kind: 'path', d: 'M21 16v3.8a1.2 1.2 0 0 1-1.2 1.2H16' },
18
+ { kind: 'path', d: 'M8 21H4.2A1.2 1.2 0 0 1 3 19.8V16' },
19
+ { kind: 'rect', x: 7, y: 7, w: 7, h: 6, rx: 1 },
20
+ { kind: 'rect', x: 10, y: 11, w: 7, h: 6, rx: 1 },
21
+ ],
22
+ },
23
+ bindings: [],
24
+ a11y: { role: 'img', label: 'Group' },
25
+ meta: { tags: ['group', 'combine', 'selection', 'arrange'], since: '0.0.7' },
26
+ };
27
+ export default Group;
@@ -0,0 +1,9 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.keyboard` — Keyboard. A degenerate element (pure geometry, no children).
4
+ *
5
+ * A keyboard body with two rows of square keys and a wide space bar. The keys are SOLID squares; the
6
+ * common rendering draws them as zero-length round-cap dots, which are circles by another name.
7
+ */
8
+ export declare const Keyboard: ElementDeclaration;
9
+ export default Keyboard;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * `xeno.keyboard` — Keyboard. A degenerate element (pure geometry, no children).
3
+ *
4
+ * A keyboard body with two rows of square keys and a wide space bar. The keys are SOLID squares; the
5
+ * common rendering draws them as zero-length round-cap dots, which are circles by another name.
6
+ */
7
+ export const Keyboard = {
8
+ id: 'xeno.keyboard',
9
+ kind: 'icon',
10
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
11
+ geometry: {
12
+ base: [
13
+ { kind: 'rect', x: 2.5, y: 5, w: 19, h: 14, rx: 2 },
14
+ { kind: 'rect', x: 5.5, y: 8, w: 2, h: 2, rx: 0.4, fill: 'foreground' },
15
+ { kind: 'rect', x: 9, y: 8, w: 2, h: 2, rx: 0.4, fill: 'foreground' },
16
+ { kind: 'rect', x: 12.5, y: 8, w: 2, h: 2, rx: 0.4, fill: 'foreground' },
17
+ { kind: 'rect', x: 16, y: 8, w: 2, h: 2, rx: 0.4, fill: 'foreground' },
18
+ { kind: 'rect', x: 7, y: 11.5, w: 2, h: 2, rx: 0.4, fill: 'foreground' },
19
+ { kind: 'rect', x: 10.5, y: 11.5, w: 2, h: 2, rx: 0.4, fill: 'foreground' },
20
+ { kind: 'rect', x: 14, y: 11.5, w: 2, h: 2, rx: 0.4, fill: 'foreground' },
21
+ { kind: 'rect', x: 7, y: 15, w: 10, h: 1.6, rx: 0.4, fill: 'foreground' },
22
+ ],
23
+ },
24
+ bindings: [],
25
+ a11y: { role: 'img', label: 'Keyboard' },
26
+ meta: { tags: ['keyboard', 'keys', 'shortcuts', 'typing'], since: '0.0.7' },
27
+ };
28
+ export default Keyboard;
@@ -33,6 +33,10 @@ export const NextDismiss = {
33
33
  weight: 'regular',
34
34
  strokeFamily: 'xeno-regular',
35
35
  axes: ['selection'],
36
+ // A two-state morph: arrow, then cross. `mixed` has no meaning here — there is no half-advanced
37
+ // card — so it is NARROWED AWAY rather than drawn. Leaving it enumerated rendered `base` under the
38
+ // name `mixed`, a state a product could drive that showed the arrow while claiming otherwise.
39
+ values: { selection: ['off', 'on'] },
36
40
  signals: [],
37
41
  },
38
42
  geometry: {
@@ -0,0 +1,12 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.pen` — Pen tool. A degenerate element (pure geometry, no children).
4
+ *
5
+ * The vector pen as the tool actually behaves: a Bézier SEGMENT between two square anchors, with one
6
+ * anchor's HANDLE pulled out to a square control point. The handle is the meaning — it is what makes
7
+ * this the pen tool rather than `xeno.spline` (a finished curve) or `xeno.edit` (a pencil). Anchors
8
+ * and control point are squares because DESIGN_SYSTEM §3 forbids circles, which is also how Canvas
9
+ * draws them on the canvas.
10
+ */
11
+ export declare const Pen: ElementDeclaration;
12
+ export default Pen;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * `xeno.pen` — Pen tool. A degenerate element (pure geometry, no children).
3
+ *
4
+ * The vector pen as the tool actually behaves: a Bézier SEGMENT between two square anchors, with one
5
+ * anchor's HANDLE pulled out to a square control point. The handle is the meaning — it is what makes
6
+ * this the pen tool rather than `xeno.spline` (a finished curve) or `xeno.edit` (a pencil). Anchors
7
+ * and control point are squares because DESIGN_SYSTEM §3 forbids circles, which is also how Canvas
8
+ * draws them on the canvas.
9
+ */
10
+ export const Pen = {
11
+ id: 'xeno.pen',
12
+ kind: 'icon',
13
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
14
+ geometry: {
15
+ base: [
16
+ { kind: 'path', d: 'M6 18C6 11 11 6 18 6' },
17
+ { kind: 'path', d: 'M6 18 13 18' },
18
+ { kind: 'rect', x: 4, y: 16, w: 4, h: 4, rx: 0.8, fill: 'foreground' },
19
+ { kind: 'rect', x: 16, y: 4, w: 4, h: 4, rx: 0.8 },
20
+ { kind: 'rect', x: 13, y: 16.5, w: 3, h: 3, rx: 0.6 },
21
+ ],
22
+ },
23
+ bindings: [],
24
+ a11y: { role: 'img', label: 'Pen' },
25
+ meta: { tags: ['pen', 'pen-tool', 'bezier', 'vector', 'path', 'tool'], since: '0.0.7' },
26
+ };
27
+ export default Pen;
@@ -0,0 +1,10 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.pointer` — Move / select tool. A degenerate element (pure geometry, no children).
4
+ *
5
+ * An arrow cursor: tip at the top-left, a straight left edge, a notch where the tail leaves. It is
6
+ * the cursor, not a direction, which is why `xeno.navigation` (a symmetric chevron-arrow meaning
7
+ * "go/route") cannot stand in for it.
8
+ */
9
+ export declare const Pointer: ElementDeclaration;
10
+ export default Pointer;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `xeno.pointer` — Move / select tool. A degenerate element (pure geometry, no children).
3
+ *
4
+ * An arrow cursor: tip at the top-left, a straight left edge, a notch where the tail leaves. It is
5
+ * the cursor, not a direction, which is why `xeno.navigation` (a symmetric chevron-arrow meaning
6
+ * "go/route") cannot stand in for it.
7
+ */
8
+ export const Pointer = {
9
+ id: 'xeno.pointer',
10
+ kind: 'icon',
11
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
12
+ geometry: {
13
+ base: [
14
+ { kind: 'path', d: 'M5 4 5 19 9.2 15 12.2 21 14.6 19.9 11.7 14 17.8 14Z' },
15
+ ],
16
+ },
17
+ bindings: [],
18
+ a11y: { role: 'img', label: 'Move' },
19
+ meta: { tags: ['pointer', 'cursor', 'select', 'move', 'mouse-pointer', 'tool'], since: '0.0.7' },
20
+ };
21
+ export default Pointer;
@@ -0,0 +1,10 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.polygon` — Polygon tool. A degenerate element (pure geometry, no children).
4
+ *
5
+ * A regular hexagon, pointy-top, vertices on a radius of 8 about the centre. Distinct from
6
+ * `xeno.shapes` (a triangle and a square — "shapes, plural") because the polygon tool draws ONE
7
+ * n-sided figure.
8
+ */
9
+ export declare const Polygon: ElementDeclaration;
10
+ export default Polygon;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `xeno.polygon` — Polygon tool. A degenerate element (pure geometry, no children).
3
+ *
4
+ * A regular hexagon, pointy-top, vertices on a radius of 8 about the centre. Distinct from
5
+ * `xeno.shapes` (a triangle and a square — "shapes, plural") because the polygon tool draws ONE
6
+ * n-sided figure.
7
+ */
8
+ export const Polygon = {
9
+ id: 'xeno.polygon',
10
+ kind: 'icon',
11
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
12
+ geometry: {
13
+ base: [
14
+ { kind: 'path', d: 'M12 4 18.93 8 18.93 16 12 20 5.07 16 5.07 8Z' },
15
+ ],
16
+ },
17
+ bindings: [],
18
+ a11y: { role: 'img', label: 'Polygon' },
19
+ meta: { tags: ['polygon', 'hexagon', 'shape', 'tool'], since: '0.0.7' },
20
+ };
21
+ export default Polygon;
@@ -0,0 +1,10 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.send-to-back` — Send to back. A degenerate element (pure geometry, no children).
4
+ *
5
+ * The `xeno.bring-to-front` pair with the stacking reversed: the SOLID square is now BEHIND, visible
6
+ * only where the outlined front square does not cover it. The front square is drawn whole and the
7
+ * solid one is clipped to the L that shows around it, so the outline reads as being on top.
8
+ */
9
+ export declare const SendToBack: ElementDeclaration;
10
+ export default SendToBack;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * `xeno.send-to-back` — Send to back. A degenerate element (pure geometry, no children).
3
+ *
4
+ * The `xeno.bring-to-front` pair with the stacking reversed: the SOLID square is now BEHIND, visible
5
+ * only where the outlined front square does not cover it. The front square is drawn whole and the
6
+ * solid one is clipped to the L that shows around it, so the outline reads as being on top.
7
+ */
8
+ export const SendToBack = {
9
+ id: 'xeno.send-to-back',
10
+ kind: 'icon',
11
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
12
+ geometry: {
13
+ base: [
14
+ // The square BEHIND (footprint 4..14): solid, cut back to the L that shows around the front one
15
+ // with the same 2-unit break `xeno.bring-to-front` uses — same two footprints, paint swapped.
16
+ { kind: 'path', d: 'M5.4 4H12.6A1.4 1.4 0 0 1 14 5.4V8H9.4A1.4 1.4 0 0 0 8 9.4V14H5.4A1.4 1.4 0 0 1 4 12.6V5.4A1.4 1.4 0 0 1 5.4 4Z', fill: 'foreground' },
17
+ // The square IN FRONT (footprint 10..20): outline, drawn whole.
18
+ { kind: 'rect', x: 10, y: 10, w: 10, h: 10, rx: 1.4 },
19
+ ],
20
+ },
21
+ bindings: [],
22
+ a11y: { role: 'img', label: 'Send to back' },
23
+ meta: { tags: ['send-to-back', 'z-order', 'lower', 'arrange', 'stack'], since: '0.0.7' },
24
+ };
25
+ export default SendToBack;
@@ -20,6 +20,11 @@ export const Star = {
20
20
  'selection:on': [
21
21
  { kind: 'path', d: 'M12 3.6l2.6 5.4 5.9.8-4.3 4.1 1 5.9-5.2-2.8-5.2 2.8 1-5.9L3.5 9.8l5.9-.8z', fill: 'foreground' },
22
22
  ],
23
+ // MIXED — the outline plus the system indeterminate bar (see `bookmark`), sat in the star's body.
24
+ 'selection:mixed': [
25
+ { kind: 'path', d: 'M12 3.6l2.6 5.4 5.9.8-4.3 4.1 1 5.9-5.2-2.8-5.2 2.8 1-5.9L3.5 9.8l5.9-.8z' },
26
+ { kind: 'rect', x: 9.5, y: 11.6, w: 5, h: 1.6, rx: 0.4, fill: 'foreground' },
27
+ ],
23
28
  },
24
29
  bindings: [],
25
30
  a11y: { role: 'img', label: 'Star' },
@@ -0,0 +1,11 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.template` — Template. A degenerate element (pure geometry, no children).
4
+ *
5
+ * A page ARRANGEMENT inside one page frame: a header band across the top, then a wide content block
6
+ * beside a narrow sidebar. It is a layout, not a collection — `xeno.library` (books on a shelf) and
7
+ * `xeno.grid` (four equal cells) both mean something else, which is why neither stands in for "start
8
+ * from a template". The outer frame is what makes it read as ONE page rather than three loose blocks.
9
+ */
10
+ export declare const Template: ElementDeclaration;
11
+ export default Template;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * `xeno.template` — Template. A degenerate element (pure geometry, no children).
3
+ *
4
+ * A page ARRANGEMENT inside one page frame: a header band across the top, then a wide content block
5
+ * beside a narrow sidebar. It is a layout, not a collection — `xeno.library` (books on a shelf) and
6
+ * `xeno.grid` (four equal cells) both mean something else, which is why neither stands in for "start
7
+ * from a template". The outer frame is what makes it read as ONE page rather than three loose blocks.
8
+ */
9
+ export const Template = {
10
+ id: 'xeno.template',
11
+ kind: 'icon',
12
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
13
+ geometry: {
14
+ base: [
15
+ { kind: 'rect', x: 3.5, y: 3.5, w: 17, h: 17, rx: 2 },
16
+ { kind: 'rect', x: 6.5, y: 6.5, w: 11, h: 3, rx: 0.8, fill: 'foreground' },
17
+ { kind: 'rect', x: 6.5, y: 11.5, w: 6.5, h: 6, rx: 0.8 },
18
+ { kind: 'rect', x: 15, y: 11.5, w: 2.5, h: 6, rx: 0.8 },
19
+ ],
20
+ },
21
+ bindings: [],
22
+ a11y: { role: 'img', label: 'Template' },
23
+ meta: { tags: ['template', 'layout', 'layout-template', 'arrangement', 'starter'], since: '0.0.7' },
24
+ };
25
+ export default Template;
@@ -0,0 +1,9 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.ungroup` — Ungroup. A degenerate element (pure geometry, no children).
4
+ *
5
+ * The two objects of `xeno.group` with the boundary removed and pulled APART so they no longer
6
+ * overlap — the separation, not a missing stroke, is what reads as "ungrouped" at 16px.
7
+ */
8
+ export declare const Ungroup: ElementDeclaration;
9
+ export default Ungroup;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `xeno.ungroup` — Ungroup. A degenerate element (pure geometry, no children).
3
+ *
4
+ * The two objects of `xeno.group` with the boundary removed and pulled APART so they no longer
5
+ * overlap — the separation, not a missing stroke, is what reads as "ungrouped" at 16px.
6
+ */
7
+ export const Ungroup = {
8
+ id: 'xeno.ungroup',
9
+ kind: 'icon',
10
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
11
+ geometry: {
12
+ base: [
13
+ { kind: 'rect', x: 4, y: 4, w: 8, h: 6, rx: 1 },
14
+ { kind: 'rect', x: 12, y: 14, w: 8, h: 6, rx: 1 },
15
+ ],
16
+ },
17
+ bindings: [],
18
+ a11y: { role: 'img', label: 'Ungroup' },
19
+ meta: { tags: ['ungroup', 'separate', 'split', 'arrange'], since: '0.0.7' },
20
+ };
21
+ export default Ungroup;
@@ -0,0 +1,10 @@
1
+ import type { ElementDeclaration } from '../schema';
2
+ /**
3
+ * `xeno.zoom-in` — Zoom lens tool. A degenerate element (pure geometry, no children).
4
+ *
5
+ * `xeno.search`'s square lens with a plus inside it. The plus is the whole distinction: search FINDS,
6
+ * the zoom lens MAGNIFIES, and a tool palette that shows both needs them apart. The lens frame and
7
+ * handle reuse search's proportions so the two read as one family.
8
+ */
9
+ export declare const ZoomIn: ElementDeclaration;
10
+ export default ZoomIn;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `xeno.zoom-in` — Zoom lens tool. A degenerate element (pure geometry, no children).
3
+ *
4
+ * `xeno.search`'s square lens with a plus inside it. The plus is the whole distinction: search FINDS,
5
+ * the zoom lens MAGNIFIES, and a tool palette that shows both needs them apart. The lens frame and
6
+ * handle reuse search's proportions so the two read as one family.
7
+ */
8
+ export const ZoomIn = {
9
+ id: 'xeno.zoom-in',
10
+ kind: 'icon',
11
+ contract: { viewBox: '0 0 24 24', weight: 'regular', strokeFamily: 'xeno-regular', axes: [], signals: [] },
12
+ geometry: {
13
+ base: [
14
+ { kind: 'rect', x: 3, y: 3, w: 13, h: 13, rx: 3.2 },
15
+ { kind: 'path', d: 'M15.2 15.2 20.8 20.8' },
16
+ { kind: 'path', d: 'M9.5 6.8V12.2M6.8 9.5H12.2' },
17
+ ],
18
+ },
19
+ bindings: [],
20
+ a11y: { role: 'img', label: 'Zoom in' },
21
+ meta: { tags: ['zoom', 'zoom-in', 'magnify', 'lens', 'tool'], since: '0.0.7' },
22
+ };
23
+ export default ZoomIn;
package/dist/index.d.ts CHANGED
@@ -12,3 +12,4 @@
12
12
  * @module
13
13
  */
14
14
  export * from './schema.js';
15
+ export * from './states.js';
package/dist/index.js CHANGED
@@ -12,3 +12,6 @@
12
12
  * @module
13
13
  */
14
14
  export * from './schema.js';
15
+ // Which states a declaration HAS, derived from the axes and signals it declares. A pure function
16
+ // over declarations — not something a declaration carries — so the "data, never code" line holds.
17
+ export * from './states.js';
package/dist/schema.d.ts CHANGED
@@ -181,6 +181,21 @@ export interface ElementContract {
181
181
  readonly strokeFamily: string;
182
182
  /** Which axes this element honours. A decorative glyph declares none. */
183
183
  readonly axes: readonly AxisName[];
184
+ /**
185
+ * OPTIONAL narrowing: which VALUES of a declared axis this element honours. Omitted = every value.
186
+ *
187
+ * An axis is declared whole, but not every element has a meaning for every value on it. `mixed`
188
+ * is real for a bookmark (a set of items some of which are saved) and has no meaning at all for
189
+ * `next-dismiss`, which is a two-state morph. Before this field existed the only honest options
190
+ * were to invent a glyph for a state that means nothing, or to leave it rendering `base` — and the
191
+ * second is a state a product can drive that shows something false. The workshop gate now fails
192
+ * on exactly that, so an element must either DRAW a value or NOT ENUMERATE it.
193
+ *
194
+ * Each listed axis must also appear in `axes`, and each listed value must belong to that axis.
195
+ */
196
+ readonly values?: {
197
+ readonly [K in AxisName]?: readonly ElementState[K][];
198
+ };
184
199
  /** Which continuous inputs it accepts. */
185
200
  readonly signals: readonly SignalName[];
186
201
  }
@@ -0,0 +1,75 @@
1
+ /**
2
+ * State ENUMERATION — what a declaration's axes and signals imply, computed once, here.
3
+ *
4
+ * ## Why this belongs in the contract package
5
+ *
6
+ * `schema.ts` says what a state IS. This says which states an element HAS. Every tool that shows an
7
+ * element in all its states needs that answer — the workshop, `xeno-apps`' Library, an agent asking
8
+ * "show me the bookmark selected", a future screenshot gate on another platform — and if each works
9
+ * it out for itself they drift, silently, because nothing compares two tools' idea of a list. That
10
+ * drift is the Storybook failure (state coverage is whatever someone remembered to write) arriving
11
+ * by a different road: not hand-written stories, but hand-rolled enumerations.
12
+ *
13
+ * So the derivation lives beside the contract it derives from, and a consumer imports it. This is
14
+ * the same rule the components rung already follows, where a family exports its own `STATES`.
15
+ *
16
+ * ## It is DATA about data — still no code in a declaration
17
+ *
18
+ * This is a pure function over declarations, not something a declaration carries. Absolute rule 4
19
+ * ("declarations are DATA, never code") is untouched: nothing here is stored in, referenced by, or
20
+ * executed on behalf of an element. It reads `contract.axes` and `contract.signals` and returns a
21
+ * list. Zero dependencies, zero framework, zero platform — like everything else in this package.
22
+ *
23
+ * ## The two decisions worth knowing
24
+ *
25
+ * **Axes cross-multiply.** They co-occur: a disabled toggle that is `on`, a selected row being
26
+ * pressed. That is the schema's own argument against a single enum, and it means an element's
27
+ * discrete states are the cartesian product of the axes it DECLARES — not a flat list of axis
28
+ * values, which would be the same mistake one level up.
29
+ *
30
+ * **Signals do not.** A signal is a continuous VALUE, not a member of a set. Crossing it with the
31
+ * axes is unbounded in principle and uninformative in practice, so each declared signal contributes
32
+ * one sampled cell over the default axis state — the one a reviewer means when they ask what
33
+ * mid-gesture looks like.
34
+ *
35
+ * **An element declaring neither has exactly one state, and it is real.** A static glyph still
36
+ * renders; `default` is the thing a gate screenshots. Returning nothing for it would make the
37
+ * overwhelming majority of the set invisible to every consumer of this function.
38
+ *
39
+ * @module
40
+ */
41
+ import type { ElementDeclaration, ElementState, SignalValues } from './schema.js';
42
+ /** One derived, addressable state of one element. */
43
+ export interface ElementStateEntry {
44
+ /** The declaration's permanent id, e.g. `xeno.bookmark`. */
45
+ readonly id: string;
46
+ /**
47
+ * A stable name for this state, safe in a URL segment and a filename: `default`, `selection-on`,
48
+ * `availability-busy_selection-on`, `signal-activity`. Unique within an element.
49
+ */
50
+ readonly state: string;
51
+ /** The discrete state to render. Axes the element does not declare are absent and take their default. */
52
+ readonly elementState: Partial<ElementState>;
53
+ /** The continuous inputs for this entry. Empty unless it is a signal sample. */
54
+ readonly signals: SignalValues;
55
+ }
56
+ /**
57
+ * The states of ONE declaration: every combination of the axes it declares, then one sample per
58
+ * signal it declares. Never empty — an element with neither yields a single `default` entry.
59
+ */
60
+ export declare function statesOf(decl: ElementDeclaration): ElementStateEntry[];
61
+ /**
62
+ * The states of many declarations, id-sorted so the list is stable whatever order they were read in.
63
+ *
64
+ * Without the sort a consumer that globs a directory would see its own enumeration reorder when the
65
+ * filesystem does, which reads as a change in the surface rather than in the elements.
66
+ */
67
+ export declare function elementStates(decls: readonly ElementDeclaration[]): ElementStateEntry[];
68
+ /**
69
+ * `xeno.chevron-down` → `xeno-chevron-down`.
70
+ *
71
+ * An element id is permanent and contains a dot; a URL segment and a filename are both happier
72
+ * without one. Consumers that address a state by path want the same spelling as each other, so the
73
+ * transform lives here rather than being reinvented per tool.
74
+ */
75
+ export declare const slugForId: (id: string) => string;