@spark-line/web-framework 0.1.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/LICENSE +21 -0
- package/README.md +171 -0
- package/dist/astro/index.js +13 -0
- package/dist/react/Carousel.d.ts +13 -0
- package/dist/react/Carousel.d.ts.map +1 -0
- package/dist/react/Carousel.js +14 -0
- package/dist/react/Carousel.js.map +1 -0
- package/dist/react/Dialog.d.ts +8 -0
- package/dist/react/Dialog.d.ts.map +1 -0
- package/dist/react/Dialog.js +23 -0
- package/dist/react/Dialog.js.map +1 -0
- package/dist/react/Menu.d.ts +11 -0
- package/dist/react/Menu.d.ts.map +1 -0
- package/dist/react/Menu.js +46 -0
- package/dist/react/Menu.js.map +1 -0
- package/dist/react/Tabs.d.ts +12 -0
- package/dist/react/Tabs.d.ts.map +1 -0
- package/dist/react/Tabs.js +43 -0
- package/dist/react/Tabs.js.map +1 -0
- package/dist/react/index.d.ts +9 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +5 -0
- package/dist/react/index.js.map +1 -0
- package/dist/registry/index.d.ts +197 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +170 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/sanity/index.d.ts +57 -0
- package/dist/sanity/index.d.ts.map +1 -0
- package/dist/sanity/index.js +117 -0
- package/dist/sanity/index.js.map +1 -0
- package/package.json +96 -0
- package/skills/spark-line-web-framework/SKILL.md +84 -0
- package/skills/spark-line-web-framework/agents/openai.yaml +4 -0
- package/skills/spark-line-web-framework/references/contracts.md +75 -0
- package/skills/spark-line-web-framework/references/qa-checklist.md +56 -0
- package/skills/spark-line-web-framework/references/stack-boundaries.md +53 -0
- package/skills/spark-line-web-framework/scripts/audit_layout.mjs +66 -0
- package/src/astro/Action.astro +34 -0
- package/src/astro/CardShell.astro +19 -0
- package/src/astro/Cluster.astro +30 -0
- package/src/astro/Container.astro +15 -0
- package/src/astro/Disclosure.astro +16 -0
- package/src/astro/Grid.astro +38 -0
- package/src/astro/Heading.astro +17 -0
- package/src/astro/PageFlow.astro +13 -0
- package/src/astro/Section.astro +44 -0
- package/src/astro/SectionGroup.astro +14 -0
- package/src/astro/Stack.astro +16 -0
- package/src/astro/Text.astro +21 -0
- package/src/astro/VisualFrame.astro +32 -0
- package/src/astro/index.d.ts +17 -0
- package/starter/astro/astro.config.mjs +5 -0
- package/starter/astro/package.json +13 -0
- package/starter/astro/src/pages/index.astro +48 -0
- package/starter/astro/src/pages/style-guide.astro +76 -0
- package/starter/astro/src/styles/project.css +27 -0
- package/styles/foundation.css +267 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--project-surface-default: Canvas;
|
|
3
|
+
--project-text-default: CanvasText;
|
|
4
|
+
--project-surface-quiet: Canvas;
|
|
5
|
+
--project-text-quiet: CanvasText;
|
|
6
|
+
--project-card-border: 1px solid currentColor;
|
|
7
|
+
--project-action-border: 1px solid currentColor;
|
|
8
|
+
--project-action-background: CanvasText;
|
|
9
|
+
--project-action-foreground: Canvas;
|
|
10
|
+
--project-action-secondary-background: Canvas;
|
|
11
|
+
--project-action-secondary-foreground: CanvasText;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
html {
|
|
15
|
+
color-scheme: light dark;
|
|
16
|
+
font-family: system-ui, sans-serif;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
body {
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.starter-frame {
|
|
24
|
+
display: grid;
|
|
25
|
+
place-items: center;
|
|
26
|
+
border: 1px solid currentColor;
|
|
27
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
@layer slf.reset, slf.tokens, slf.layout, slf.components, slf.utilities;
|
|
2
|
+
|
|
3
|
+
@layer slf.reset {
|
|
4
|
+
:where(.slf-page-flow, .slf-section, .slf-section-group, .slf-container, .slf-stack, .slf-cluster, .slf-grid, .slf-visual-frame, .slf-card-shell) {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
min-inline-size: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where(.slf-page-flow, .slf-section-group, .slf-stack, .slf-cluster, .slf-grid) {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@layer slf.tokens {
|
|
15
|
+
:root {
|
|
16
|
+
--slf-site-min: 20rem;
|
|
17
|
+
--slf-site-max: 90rem;
|
|
18
|
+
--slf-container-narrow: 42rem;
|
|
19
|
+
--slf-container-content: 64rem;
|
|
20
|
+
--slf-container-wide: 80rem;
|
|
21
|
+
--slf-gutter: clamp(1rem, 0.5rem + 2vw, 3rem);
|
|
22
|
+
--slf-space-xs: clamp(0.5rem, 0.4rem + 0.35vw, 0.75rem);
|
|
23
|
+
--slf-space-sm: clamp(0.75rem, 0.55rem + 0.75vw, 1.25rem);
|
|
24
|
+
--slf-space-md: clamp(1.25rem, 0.9rem + 1.4vw, 2.25rem);
|
|
25
|
+
--slf-space-lg: clamp(2.25rem, 1.3rem + 3vw, 4.5rem);
|
|
26
|
+
--slf-space-xl: clamp(3.5rem, 1.6rem + 6vw, 8rem);
|
|
27
|
+
--slf-radius-sm: var(--project-radius-sm, 0.25rem);
|
|
28
|
+
--slf-radius-md: var(--project-radius-md, 0.5rem);
|
|
29
|
+
--slf-radius-round: 999rem;
|
|
30
|
+
--slf-focus-width: 0.125rem;
|
|
31
|
+
--slf-focus-offset: 0.2rem;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@layer slf.layout {
|
|
36
|
+
.slf-page-flow {
|
|
37
|
+
display: flow-root;
|
|
38
|
+
inline-size: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.slf-section {
|
|
42
|
+
position: relative;
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding-block-start: var(--slf-section-space-top);
|
|
45
|
+
padding-block-end: var(--slf-section-space-bottom);
|
|
46
|
+
color: var(--slf-theme-foreground, inherit);
|
|
47
|
+
background: var(--slf-theme-background, transparent);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.slf-section[data-space-top="none"] { --slf-section-space-top: 0; }
|
|
51
|
+
.slf-section[data-space-top="xs"] { --slf-section-space-top: var(--slf-space-xs); }
|
|
52
|
+
.slf-section[data-space-top="sm"] { --slf-section-space-top: var(--slf-space-sm); }
|
|
53
|
+
.slf-section[data-space-top="md"] { --slf-section-space-top: var(--slf-space-md); }
|
|
54
|
+
.slf-section[data-space-top="lg"] { --slf-section-space-top: var(--slf-space-lg); }
|
|
55
|
+
.slf-section[data-space-top="xl"] { --slf-section-space-top: var(--slf-space-xl); }
|
|
56
|
+
.slf-section[data-space-bottom="none"] { --slf-section-space-bottom: 0; }
|
|
57
|
+
.slf-section[data-space-bottom="xs"] { --slf-section-space-bottom: var(--slf-space-xs); }
|
|
58
|
+
.slf-section[data-space-bottom="sm"] { --slf-section-space-bottom: var(--slf-space-sm); }
|
|
59
|
+
.slf-section[data-space-bottom="md"] { --slf-section-space-bottom: var(--slf-space-md); }
|
|
60
|
+
.slf-section[data-space-bottom="lg"] { --slf-section-space-bottom: var(--slf-space-lg); }
|
|
61
|
+
.slf-section[data-space-bottom="xl"] { --slf-section-space-bottom: var(--slf-space-xl); }
|
|
62
|
+
|
|
63
|
+
.slf-section[data-theme="default"] {
|
|
64
|
+
--slf-theme-background: var(--project-surface-default, transparent);
|
|
65
|
+
--slf-theme-foreground: var(--project-text-default, inherit);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.slf-section[data-theme="inverse"] {
|
|
69
|
+
--slf-theme-background: var(--project-surface-inverse, transparent);
|
|
70
|
+
--slf-theme-foreground: var(--project-text-inverse, inherit);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.slf-section[data-theme="accent"] {
|
|
74
|
+
--slf-theme-background: var(--project-surface-accent, transparent);
|
|
75
|
+
--slf-theme-foreground: var(--project-text-accent, inherit);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.slf-section[data-theme="quiet"] {
|
|
79
|
+
--slf-theme-background: var(--project-surface-quiet, transparent);
|
|
80
|
+
--slf-theme-foreground: var(--project-text-quiet, inherit);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.slf-section-group {
|
|
84
|
+
position: relative;
|
|
85
|
+
isolation: isolate;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.slf-section-group[data-mode="overlap"] {
|
|
89
|
+
display: grid;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.slf-section-group[data-mode="overlap"] > * {
|
|
93
|
+
grid-area: 1 / 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.slf-container {
|
|
97
|
+
inline-size: min(
|
|
98
|
+
calc(100% - (2 * var(--slf-gutter))),
|
|
99
|
+
var(--slf-container-max, var(--slf-container-wide))
|
|
100
|
+
);
|
|
101
|
+
margin-inline: auto;
|
|
102
|
+
container-type: inline-size;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.slf-container[data-container="narrow"] { --slf-container-max: var(--slf-container-narrow); }
|
|
106
|
+
.slf-container[data-container="content"] { --slf-container-max: var(--slf-container-content); }
|
|
107
|
+
.slf-container[data-container="wide"] { --slf-container-max: var(--slf-container-wide); }
|
|
108
|
+
.slf-container[data-container="full"] {
|
|
109
|
+
--slf-container-max: none;
|
|
110
|
+
inline-size: 100%;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.slf-stack {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: var(--slf-layout-gap);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.slf-cluster {
|
|
120
|
+
display: flex;
|
|
121
|
+
flex-wrap: wrap;
|
|
122
|
+
gap: var(--slf-layout-gap);
|
|
123
|
+
align-items: var(--slf-cluster-align);
|
|
124
|
+
justify-content: var(--slf-cluster-justify);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.slf-cluster[data-align="start"] { --slf-cluster-align: flex-start; }
|
|
128
|
+
.slf-cluster[data-align="center"] { --slf-cluster-align: center; }
|
|
129
|
+
.slf-cluster[data-align="end"] { --slf-cluster-align: flex-end; }
|
|
130
|
+
.slf-cluster[data-align="stretch"] { --slf-cluster-align: stretch; }
|
|
131
|
+
.slf-cluster[data-justify="start"] { --slf-cluster-justify: flex-start; }
|
|
132
|
+
.slf-cluster[data-justify="center"] { --slf-cluster-justify: center; }
|
|
133
|
+
.slf-cluster[data-justify="end"] { --slf-cluster-justify: flex-end; }
|
|
134
|
+
.slf-cluster[data-justify="between"] { --slf-cluster-justify: space-between; }
|
|
135
|
+
|
|
136
|
+
:where(.slf-stack, .slf-cluster, .slf-grid)[data-gap="none"] { --slf-layout-gap: 0; }
|
|
137
|
+
:where(.slf-stack, .slf-cluster, .slf-grid)[data-gap="xs"] { --slf-layout-gap: var(--slf-space-xs); }
|
|
138
|
+
:where(.slf-stack, .slf-cluster, .slf-grid)[data-gap="sm"] { --slf-layout-gap: var(--slf-space-sm); }
|
|
139
|
+
:where(.slf-stack, .slf-cluster, .slf-grid)[data-gap="md"] { --slf-layout-gap: var(--slf-space-md); }
|
|
140
|
+
:where(.slf-stack, .slf-cluster, .slf-grid)[data-gap="lg"] { --slf-layout-gap: var(--slf-space-lg); }
|
|
141
|
+
:where(.slf-stack, .slf-cluster, .slf-grid)[data-gap="xl"] { --slf-layout-gap: var(--slf-space-xl); }
|
|
142
|
+
|
|
143
|
+
.slf-grid {
|
|
144
|
+
display: grid;
|
|
145
|
+
gap: var(--slf-layout-gap);
|
|
146
|
+
grid-template-columns: repeat(var(--slf-grid-columns, 1), minmax(0, 1fr));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.slf-grid[data-columns="auto-fit"] {
|
|
150
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--slf-grid-min)), 1fr));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.slf-grid[data-columns="auto-fill"] {
|
|
154
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--slf-grid-min)), 1fr));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.slf-visual-frame {
|
|
158
|
+
position: relative;
|
|
159
|
+
min-block-size: var(--slf-visual-min-block, 0);
|
|
160
|
+
overflow: var(--slf-visual-overflow, clip);
|
|
161
|
+
aspect-ratio: var(--slf-visual-aspect, auto);
|
|
162
|
+
container-type: inline-size;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@layer slf.components {
|
|
167
|
+
.slf-heading,
|
|
168
|
+
.slf-text {
|
|
169
|
+
margin: 0;
|
|
170
|
+
color: inherit;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.slf-heading[data-size="display"] { font-size: var(--project-type-display, clamp(2.5rem, 7vw, 7rem)); }
|
|
174
|
+
.slf-heading[data-size="h1"] { font-size: var(--project-type-h1, clamp(2.25rem, 5vw, 5rem)); }
|
|
175
|
+
.slf-heading[data-size="h2"] { font-size: var(--project-type-h2, clamp(1.9rem, 4vw, 3.75rem)); }
|
|
176
|
+
.slf-heading[data-size="h3"] { font-size: var(--project-type-h3, clamp(1.6rem, 3vw, 2.75rem)); }
|
|
177
|
+
.slf-heading[data-size="h4"] { font-size: var(--project-type-h4, clamp(1.35rem, 2vw, 2rem)); }
|
|
178
|
+
.slf-heading[data-size="h5"] { font-size: var(--project-type-h5, 1.125rem); }
|
|
179
|
+
.slf-heading[data-size="h6"] { font-size: var(--project-type-h6, 1rem); }
|
|
180
|
+
|
|
181
|
+
.slf-text[data-size="small"] { font-size: var(--project-type-small, 0.875rem); }
|
|
182
|
+
.slf-text[data-size="body"] { font-size: var(--project-type-body, 1rem); }
|
|
183
|
+
.slf-text[data-size="lead"] { font-size: var(--project-type-lead, clamp(1.125rem, 1.4vw, 1.375rem)); }
|
|
184
|
+
.slf-text[data-tone="muted"] { color: var(--project-text-muted, inherit); }
|
|
185
|
+
|
|
186
|
+
.slf-action {
|
|
187
|
+
display: inline-flex;
|
|
188
|
+
min-block-size: 2.75rem;
|
|
189
|
+
align-items: center;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
border: var(--project-action-border, 0);
|
|
192
|
+
border-radius: var(--project-action-radius, var(--slf-radius-md));
|
|
193
|
+
padding-inline: var(--project-action-inline-padding, 1rem);
|
|
194
|
+
color: var(--project-action-foreground, inherit);
|
|
195
|
+
background: var(--project-action-background, transparent);
|
|
196
|
+
font: inherit;
|
|
197
|
+
text-decoration: none;
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.slf-action[data-size="sm"] { min-block-size: 2.5rem; }
|
|
202
|
+
.slf-action[data-size="lg"] { min-block-size: 3rem; }
|
|
203
|
+
.slf-action[data-variant="secondary"] {
|
|
204
|
+
color: var(--project-action-secondary-foreground, inherit);
|
|
205
|
+
background: var(--project-action-secondary-background, transparent);
|
|
206
|
+
}
|
|
207
|
+
.slf-action[data-variant="quiet"] {
|
|
208
|
+
color: var(--project-action-quiet-foreground, inherit);
|
|
209
|
+
background: var(--project-action-quiet-background, transparent);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.slf-card-shell {
|
|
213
|
+
border: var(--project-card-border, 0);
|
|
214
|
+
border-radius: var(--project-card-radius, var(--slf-radius-md));
|
|
215
|
+
padding: var(--project-card-padding, var(--slf-space-md));
|
|
216
|
+
color: var(--project-card-foreground, inherit);
|
|
217
|
+
background: var(--project-card-background, transparent);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.slf-card-shell[data-surface="quiet"] {
|
|
221
|
+
color: var(--project-card-quiet-foreground, inherit);
|
|
222
|
+
background: var(--project-card-quiet-background, transparent);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.slf-card-shell[data-surface="accent"] {
|
|
226
|
+
color: var(--project-card-accent-foreground, inherit);
|
|
227
|
+
background: var(--project-card-accent-background, transparent);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.slf-disclosure {
|
|
231
|
+
border-block-end: var(--project-rule, 1px solid currentColor);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.slf-disclosure > summary {
|
|
235
|
+
min-block-size: 2.75rem;
|
|
236
|
+
cursor: pointer;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.slf-disclosure__content {
|
|
240
|
+
padding-block: var(--slf-space-sm);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
:where(.slf-action, .slf-disclosure > summary):focus-visible {
|
|
244
|
+
outline: var(--slf-focus-width) solid currentColor;
|
|
245
|
+
outline-offset: var(--slf-focus-offset);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@layer slf.utilities {
|
|
250
|
+
.slf-visually-hidden:not(:focus):not(:active) {
|
|
251
|
+
position: absolute;
|
|
252
|
+
inline-size: 1px;
|
|
253
|
+
block-size: 1px;
|
|
254
|
+
overflow: hidden;
|
|
255
|
+
clip-path: inset(50%);
|
|
256
|
+
white-space: nowrap;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@media (prefers-reduced-motion: reduce) {
|
|
260
|
+
:where(.slf-page-flow, .slf-page-flow *) {
|
|
261
|
+
scroll-behavior: auto !important;
|
|
262
|
+
animation-duration: 0.001ms !important;
|
|
263
|
+
animation-iteration-count: 1 !important;
|
|
264
|
+
transition-duration: 0.001ms !important;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|