@radicool/throughline 0.25.0 → 0.27.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/README.md +8 -4
- package/adapters/codex/AGENTS.md +2 -0
- package/adapters/codex/prompts/component-builder.md +5 -3
- package/adapters/codex/prompts/compose-code.md +78 -0
- package/adapters/codex/prompts/compose-figma.md +59 -0
- package/adapters/codex/prompts/document-component.md +3 -2
- package/adapters/cursor/.cursor/commands/compose-code.md +78 -0
- package/adapters/cursor/.cursor/commands/compose-figma.md +59 -0
- package/adapters/cursor/.cursor/commands/document-component.md +3 -2
- package/adapters/cursor/.cursor/rules/component-builder.mdc +5 -3
- package/adapters/generic/AGENTS.md +2 -0
- package/adapters/generic/commands/compose-code.md +78 -0
- package/adapters/generic/commands/compose-figma.md +59 -0
- package/adapters/generic/commands/document-component.md +3 -2
- package/adapters/generic/skills/component-builder/SKILL.md +5 -3
- package/package.json +1 -1
- package/references/doc-card-builder.md +62 -15
- package/references/figma-adherence.md +21 -0
- package/references/figma-compose.md +896 -0
- package/scripts/README.md +8 -4
- package/scripts/build-doc-card-builder.mjs +16 -0
- package/scripts/build-figma-checks.mjs +89 -2
- package/scripts/compose-code.mjs +271 -0
- package/scripts/doc-card-payload.mjs +115 -0
- package/scripts/install.mjs +5 -3
- package/scripts/lib/doc-card-plan.mjs +37 -0
- package/scripts/lib/doc-card-render.figma.js +9 -15
- package/scripts/lib/figma-adherence-read.figma.js +21 -0
- package/scripts/lib/figma-compose.figma.js +326 -0
- package/scripts/lib/figma-compose.mjs +317 -0
- package/scripts/lib/fixtures/figma-compose/casing-and-suffix.json +8 -0
- package/scripts/lib/fixtures/figma-compose/fill-in-unlaid-slot.json +7 -0
- package/scripts/lib/fixtures/figma-compose/hug-on-fixed-component.json +34 -0
- package/scripts/lib/fixtures/figma-compose/inventory.json +295 -0
- package/scripts/lib/fixtures/figma-compose/many-errors.json +8 -0
- package/scripts/lib/fixtures/figma-compose/missing-component.json +7 -0
- package/scripts/lib/fixtures/figma-compose/name-taken.json +6 -0
- package/scripts/lib/fixtures/figma-compose/padding-sides.json +23 -0
- package/scripts/lib/fixtures/figma-compose/radius-kind.json +27 -0
- package/scripts/lib/fixtures/figma-compose/raw-number.json +5 -0
- package/scripts/lib/fixtures/figma-compose/sign-in-ok.json +16 -0
- package/scripts/lib/fixtures/figma-compose/slot-ok.json +9 -0
- package/scripts/lib/fixtures/figma-compose/unknown-prop-and-option.json +7 -0
- package/scripts/lib/fixtures/figma-compose/wrong-kind.json +5 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"covers": "an unmarked frame already named like the screen stops the build",
|
|
3
|
+
"description": { "screen": "Sign up", "page": "Screens", "width": 390, "root": { "layout": "vertical" } },
|
|
4
|
+
"target": { "screen": "unmarked", "wip": null },
|
|
5
|
+
"expected": { "ok": false, "errors": ["name-taken"] }
|
|
6
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"covers": "per-side padding: a side that doesn't exist and a side bound to a colour",
|
|
3
|
+
"description": {
|
|
4
|
+
"screen": "X",
|
|
5
|
+
"page": "Screens",
|
|
6
|
+
"width": 390,
|
|
7
|
+
"root": {
|
|
8
|
+
"layout": "vertical",
|
|
9
|
+
"padding": {
|
|
10
|
+
"top": "space/4",
|
|
11
|
+
"middle": "space/4",
|
|
12
|
+
"left": "color/bg/canvas"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"expected": {
|
|
17
|
+
"ok": false,
|
|
18
|
+
"errors": [
|
|
19
|
+
"invalid",
|
|
20
|
+
"variable-kind"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"covers": "a radius bound to a spacing variable is the wrong kind; a radius variable is fine",
|
|
3
|
+
"description": {
|
|
4
|
+
"screen": "X",
|
|
5
|
+
"page": "Screens",
|
|
6
|
+
"width": 390,
|
|
7
|
+
"root": {
|
|
8
|
+
"layout": "vertical",
|
|
9
|
+
"children": [
|
|
10
|
+
{
|
|
11
|
+
"layout": "vertical",
|
|
12
|
+
"radius": "space/4"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"layout": "vertical",
|
|
16
|
+
"radius": "radius/md"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"expected": {
|
|
22
|
+
"ok": false,
|
|
23
|
+
"errors": [
|
|
24
|
+
"variable-kind"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"covers": "frames, styled text, Button with a variant, text, boolean and icon swap, Input, Checkbox and a mode resolve",
|
|
3
|
+
"description": {
|
|
4
|
+
"screen": "Sign in", "page": "Screens", "width": 390, "modes": { "Color / Semantic": "Light" },
|
|
5
|
+
"root": { "layout": "vertical", "gap": "space/gap/md", "padding": "space/inset/lg", "fill": "color/bg/canvas", "children": [
|
|
6
|
+
{ "text": "Sign in", "style": "Heading/L", "color": "color/text/primary" },
|
|
7
|
+
{ "component": "Input", "props": { "placeholder": "Email" }, "sizing": { "horizontal": "fill" } },
|
|
8
|
+
{ "component": "Input", "props": { "placeholder": "Password" }, "sizing": { "horizontal": "fill" } },
|
|
9
|
+
{ "layout": "horizontal", "gap": "space/4", "align": { "main": "space-between", "cross": "center" }, "sizing": { "horizontal": "fill" }, "children": [
|
|
10
|
+
{ "component": "Checkbox", "props": { "checked": "true" } },
|
|
11
|
+
{ "component": "Button", "props": { "variant": "secondary", "size": "lg", "label": "Sign in", "hasTrailing": true, "trailingIcon": "icon/arrow-right" } }
|
|
12
|
+
] }
|
|
13
|
+
] }
|
|
14
|
+
},
|
|
15
|
+
"expected": { "ok": true, "errors": [] }
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"covers": "content in a slot with auto layout resolves, fill included",
|
|
3
|
+
"description": { "screen": "Panel", "page": "Screens", "width": 390, "root": { "layout": "vertical", "children": [
|
|
4
|
+
{ "component": "Panel", "props": { "title": "Account" }, "slots": { "Body": [
|
|
5
|
+
{ "text": "Hello", "style": "Body/Default", "color": "color/text/primary", "sizing": { "horizontal": "fill" } }
|
|
6
|
+
] } }
|
|
7
|
+
] } },
|
|
8
|
+
"expected": { "ok": true, "errors": [] }
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"covers": "a prop the set lacks and an option the variant lacks",
|
|
3
|
+
"description": { "screen": "X", "page": "Screens", "width": 390, "root": { "layout": "vertical", "children": [
|
|
4
|
+
{ "component": "Button", "props": { "colour": "red", "size": "xl" } }
|
|
5
|
+
] } },
|
|
6
|
+
"expected": { "ok": false, "errors": ["unknown-prop", "unknown-option"] }
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"covers": "a gap bound to a font size and a fill bound to a spacing variable",
|
|
3
|
+
"description": { "screen": "X", "page": "Screens", "width": 390, "root": { "layout": "vertical", "gap": "font/size/400", "fill": "space/4" } },
|
|
4
|
+
"expected": { "ok": false, "errors": ["variable-kind", "variable-kind"] }
|
|
5
|
+
}
|