@skirbi/pinta 0.0.10 → 0.0.12

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/Changes CHANGED
@@ -1,5 +1,32 @@
1
1
  Revision history for @skirbi/pinta
2
2
 
3
+ 0.0.12 2026-05-28 20:27:06Z
4
+
5
+ * BREAKING CHANGES
6
+
7
+ After playing a bit more with Pinta and trying out the concepts the abstract
8
+ way of primary-base, etc became a fight. You should be able to work with
9
+ colors much easier than pinta allowed you to. So the trick was to simplify
10
+ and go back to the color-family concept that triggered pinta.
11
+
12
+ This also meant that we broke away from the Bootstrap/Tailwind concepts of
13
+ utilities. These look great on paper, and might be awesome hatches for really
14
+ niche things, but one could also write `style="xyz"` inline if you wanted to.
15
+ So back to CSS for that. Wheter you pick classes or attributes is up to you,
16
+ but let us use CSS for things that CSS does best. Utilities hide the clever
17
+ bits CSS can do, minmax, clamp etc.
18
+
19
+ In addition semtic-* has been renamed to skirbi-*, this is because skirbi
20
+ owns everything.
21
+
22
+ And in addition, we remove unused themes. These will come back once
23
+ pinta/tatuahe/dibuho are mature enough. This was pre-mature adding features.
24
+ These breaking changes are the evidence :)
25
+
26
+ 0.0.11 2026-04-16 21:36:30Z
27
+
28
+ * Ok, it broke on mobile, but now it doesn't III
29
+
3
30
  0.0.10 2026-04-16 21:18:30Z
4
31
 
5
32
  * Ok, it broke on mobile, but now it doesn't
package/README.md CHANGED
@@ -2,349 +2,377 @@
2
2
 
3
3
  > Skirbi's theme song
4
4
 
5
- Pinta is the **token + primitive theme layer** for **semtic**.
5
+ Pinta is the **theme + token engine** for Skirbi.
6
6
 
7
- - **semtic** gives you structure (custom elements + layout primitives)
8
- - **pinta** gives you design tokens + universal attribute primitives (CSS only)
7
+ * **Semtic** provides semantic structure and components
8
+ * **Pinta** provides tokens, derivations, and component recipes
9
+ * **Dibuho** provides higher-level composition/layout patterns
10
+
11
+ Pinta is intentionally small.
12
+
13
+ It is **not**:
14
+
15
+ * a utility framework
16
+ * a Tailwind replacement
17
+ * a Bootstrap clone
18
+ * a layout engine
9
19
 
10
20
  Pinta follows the **80% rule**:
11
- - The README covers the common path and the primitives most people need.
12
- - The remaining 20% is intentionally not documented here — read `pinta.css`
13
- (and any generated docs site) if you need edge cases or internals.
21
+
22
+ * sensible defaults
23
+ * clean tokens
24
+ * predictable recipes
25
+ * easy overrides with normal CSS
14
26
 
15
27
  Everything is CSS. No runtime. No JS required.
16
28
 
17
- ---
18
29
 
19
- ## Contents
30
+ # Philosophy
20
31
 
21
- - [Opt-in](#opt-in)
22
- - [Cascade layers](#cascade-layers)
23
- - [Theme mode](#theme-mode)
24
- - [Tokens](#tokens)
25
- - [Typography](#typography)
26
- - [Primitives](#primitives)
27
- - [Layout tags](#layout-tags)
28
- - [Navigation components](#navigation-components)
29
- - [Additional components](#additional-components)
30
- - [Tables](#tables)
32
+ Pinta is built around:
31
33
 
32
- ---
34
+ ```txt
35
+ color families
36
+ -> derivations
37
+ -> component recipes
38
+ ```
33
39
 
34
- ## Opt-in
40
+ Instead of:
35
41
 
36
- Pinta is **explicit opt-in**. If `[semtic-theme]` is not present,
37
- `pinta.css` does nothing.
42
+ ```txt
43
+ utility attributes
44
+ -> inline composition
45
+ ```
38
46
 
39
- Apply to the whole page:
47
+ You are encouraged to use:
40
48
 
41
- <html semtic-theme>
42
- ...
43
- </html>
49
+ * semantic HTML
50
+ * Semtic components
51
+ * normal CSS classes
44
52
 
45
- Or scope it to a subtree:
53
+ Example:
46
54
 
47
- <div semtic-theme>
48
- ...
49
- </div>
55
+ ```html
56
+ <semtic-panel login-card>
57
+ ```
50
58
 
51
- Named themes are allowed:
59
+ ```css
60
+ semtic-panel[login-card] {
61
+ max-width: 28rem;
62
+ }
63
+ ```
52
64
 
53
- <div semtic-theme="foo">
54
- ...
55
- </div>
65
+ Or if you prefer classes:
56
66
 
57
- Contract:
58
- - `[semtic-theme]` enables the engine and applies the default theme (pinta).
59
- - `[semtic-theme="name"]` is the same engine + theme overrides (in
60
- `@layer pinta-theme`).
67
+ ```html
68
+ <semtic-panel class="login-card">
69
+ ```
61
70
 
62
- ## Cascade layers
71
+ ```css
72
+ .login-card {
73
+ max-width: 28rem;
74
+ }
75
+ ```
63
76
 
64
- Pinta fixes layer order so theme authors and downstream consumers can
65
- override safely:
77
+ Pinta intentionally embraces native CSS instead of competing with it.
66
78
 
67
- @layer pinta-base, pinta-theme, pinta-components;
68
79
 
69
- Meaning:
80
+ # Opt-in
70
81
 
71
- - **base**: engine (tokens + primitives + interactions), opt-in gated
72
- - **theme**: pinta defaults + theme author overrides (palette, pointers,
73
- knobs)
74
- - **components**: light defaults for semtic elements (`semtic-panel`,
75
- `semtic-tile`, layout tags)
82
+ Pinta is explicit opt-in.
76
83
 
77
- Theme authors override knobs in `@layer pinta-theme`.
84
+ Nothing happens unless `[skirbi-theme]` exists.
78
85
 
79
- ## Theme mode
86
+ Whole page:
80
87
 
81
- Pinta supports:
88
+ ```html
89
+ <html skirbi-theme>
90
+ ```
82
91
 
83
- - `semtic-theme-mode="light"` (default)
84
- - `semtic-theme-mode="dark"`
92
+ Subtree:
85
93
 
86
- Example:
94
+ ```html
95
+ <section skirbi-theme>
96
+ ```
87
97
 
88
- <html semtic-theme semtic-theme-mode="dark">
89
- ...
90
- </html>
98
+ Named theme:
91
99
 
92
- Mode selects environment defaults (page wash, surface lift, shadows).
93
- Palette colors may also be theme-dependent.
100
+ ```html
101
+ <html skirbi-theme="voodoo">
102
+ ```
94
103
 
95
- ---
96
104
 
97
- ## Tokens
105
+ # Why Skirbi and not Pinta?
98
106
 
99
- ### Brand palette (BASE slots)
107
+ The namespace `skirbi-` is chosen over `pinta-` because `@skibri/dibuho` also
108
+ paints the canvas and is part of the skirbi-universe. Having one namespace
109
+ makes things easier.
100
110
 
101
- Override these freely:
102
111
 
103
- - `--semtic-primary-base`
104
- - `--semtic-secondary-base`
105
- - `--semtic-tertiary-base`
106
- - `--semtic-quaternary-base`
112
+ # Cascade layers
107
113
 
108
- Pinta derives light/dark variants from these base colors internally.
114
+ Pinta defines stable layer order:
109
115
 
110
- ### Pointers (what drives what)
116
+ ```css
117
+ @layer skirbi-base, skirbi-theme, skirbi-components;
118
+ ```
111
119
 
112
- Pointers decide how the palette influences the overall look:
120
+ Meaning:
113
121
 
114
- - `--semtic-page-tone-base` (drives the page wash)
115
- - `--semtic-surface-tone-base` (drives surfaces and borders)
122
+ * `skirbi-base`
116
123
 
117
- Example: make the page follow your primary color:
124
+ * derivation engine
125
+ * environment logic
126
+ * typography
127
+ * accessibility defaults
118
128
 
119
- @layer pinta-theme {
120
- [semtic-theme] {
121
- --semtic-page-tone-base: var(--semtic-primary-base);
122
- }
123
- }
129
+ * `skirbi-theme`
124
130
 
125
- ### Status colors (important)
131
+ * palette
132
+ * tokens
133
+ * theme overrides
126
134
 
127
- Status colors are semantic defaults:
135
+ * `skirbi-components`
128
136
 
129
- - `--semtic-info-base`
130
- - `--semtic-success-base` (teal, avoids neon green)
131
- - `--semtic-warn-base` (orange, avoids pale yellow)
132
- - `--semtic-error-base` (deep red)
137
+ * light component recipes for Semtic elements
133
138
 
134
- They are chosen for clarity and colorblind resilience.
139
+ Theme authors should override in:
135
140
 
136
- You *can* override them, but don't do it casually.
137
- If you change them: test contrast and colorblind simulations.
141
+ ```css
142
+ @layer skirbi-theme {
143
+ [skirbi-theme="foo"] {
144
+ }
145
+ }
146
+ ```
138
147
 
139
- ---
140
148
 
141
- ## Typography
149
+ # Theme modes
142
150
 
143
- Typography is opt-in and driven by knobs:
151
+ Pinta supports:
144
152
 
145
- - `--semtic-font-scale`
146
- - `--semtic-line-height`
147
- - heading scales (`--semtic-h1-scale`, `--semtic-h2-scale`, …)
148
- - `--semtic-prose-gap`
153
+ ```html
154
+ <html skirbi-theme skirbi-mode="light">
155
+ <html skirbi-theme skirbi-mode="dark">
156
+ ```
157
+
158
+ Dark mode changes:
159
+
160
+ * environment base
161
+ * surface derivation
162
+ * page wash
163
+ * default foregrounds
149
164
 
150
- Optional presets exist:
165
+ Mode can be applied to any subtree.
151
166
 
152
- <div semtic-theme semtic-font-profile="editorial">
153
- ...
154
- </div>
155
167
 
156
- Presets are sugar; the variables are the real API.
168
+ # Color families
157
169
 
158
- ---
170
+ Pinta uses color families instead of loose palette slots.
159
171
 
160
- ## Primitives (attributes)
172
+ ## Primary
161
173
 
162
- Primitives work on **any element** inside a themed subtree.
174
+ ```css
175
+ --skirbi-primary-main
176
+ --skirbi-primary-light
177
+ --skirbi-primary-dark
178
+ --skirbi-primary-contrast
179
+ ```
163
180
 
164
- Common ones:
181
+ ## Secondary
165
182
 
166
- - `semtic-pad="0..6"`
167
- - `semtic-gap="0..6"`
168
- - `semtic-border="0..5"`
169
- - `semtic-radius="0..6"`
170
- - `semtic-shadow="1..5"`
171
- - `semtic-shadow-border="1..5"`
172
- - `semtic-bg` (surface background that can tint on hover/selected)
173
- - `semtic-hover`, `semtic-selected`, `semtic-press`, `semtic-disabled`
183
+ ```css
184
+ --skirbi-secondary-main
185
+ --skirbi-secondary-light
186
+ --skirbi-secondary-dark
187
+ --skirbi-secondary-contrast
188
+ ```
174
189
 
175
- Example card:
190
+ Usually only `*-main` needs to be set.
176
191
 
177
- <article semtic-bg semtic-pad="3" semtic-radius="4" semtic-shadow="2"
178
- semtic-hover semtic-press>
179
- ...
180
- </article>
192
+ Pinta derives:
181
193
 
182
- ### Interaction knobs
194
+ * light
195
+ * dark
196
+ * contrast
183
197
 
184
- Override these in `@layer pinta-theme`:
198
+ unless explicitly overridden.
185
199
 
186
- - `--semtic-hover-ring-size`
187
- - `--semtic-selected-ring-size`
188
- - `--semtic-press-ring-size`
189
- - `--semtic-focus-ring-size`
190
- - `--semtic-transition-duration`
191
- - `--semtic-transform-duration`
192
- - `--semtic-hover-shadow`
193
- - `--semtic-press-shadow`
200
+ ## Helper colors
194
201
 
195
- ### Tone and variants
202
+ Helper colors exist for supporting accents.
196
203
 
197
- Use:
204
+ ```css
205
+ --skirbi-tertiary-main
206
+ --skirbi-quaternary-main
207
+ ```
198
208
 
199
- - `semtic-theme-tone="primary|secondary|tertiary|quaternary|info|success|warn|error"`
200
- - `semtic-theme-variant="solid|outline|gradient"`
209
+ These intentionally do not expose full family contracts. They are currently
210
+ included, but unused. Component authors may be able to use them if needed.
201
211
 
202
- Example:
203
212
 
204
- <button semtic-theme-tone="info" semtic-theme-variant="solid">Info</button>
213
+ # Background transforms
205
214
 
206
- ---
215
+ Pinta derives atmospheric backgrounds from brand colors.
207
216
 
208
- ## Layout tags
217
+ ## Transform modes
209
218
 
210
- Pinta ships simple layout tags:
219
+ ```css
220
+ --skirbi-bg-transform: none;
221
+ --skirbi-bg-transform: wash;
222
+ --skirbi-bg-transform: reverse-wash;
223
+ ```
211
224
 
212
- - `<semtic-grid semtic-columns="1..10" semtic-columns-md="..."
213
- semtic-gap="...">`
214
- - `<semtic-flex ...>`
215
- - `<semtic-stack ...>`
225
+ ## Wash controls
216
226
 
217
- They're meant to be boring, predictable, and easy to override.
227
+ ```css
228
+ --skirbi-wash-perc: 8%;
229
+ --skirbi-reverse-wash-perc: 85%;
230
+ ```
218
231
 
219
- ---
232
+ Default page backgrounds use a wash transform.
220
233
 
221
- ## Navigation components
234
+ This keeps themes calm and readable by default.
222
235
 
223
- Pinta ships base styles for the semtic navigation primitives.
224
236
 
225
- ### semtic-nav
237
+ # Status colors
226
238
 
227
- Flat top/bottom bar wrapper. Renders as `<nav>` with flex layout.
239
+ Status colors are semantic, not branding.
228
240
 
229
- ```html
230
- <semtic-nav>
231
- <semtic-nav-item href="/">Home</semtic-nav-item>
232
- <semtic-nav-item href="/about">About</semtic-nav-item>
233
- </semtic-nav>
241
+ ```css
242
+ --skirbi-info-base
243
+ --skirbi-success-base
244
+ --skirbi-warn-base
245
+ --skirbi-error-base
234
246
  ```
235
247
 
236
- ### semtic-nav-item
248
+ They are intentionally opinionated for:
237
249
 
238
- Single navigation link or button. Renders as `<a>` when `href` is
239
- provided, `<button>` otherwise. Active state via `active` attribute sets
240
- `aria-current="page"`. Nested items are indented and prefixed with `›`.
250
+ * readability
251
+ * contrast
252
+ * colorblind resilience
241
253
 
242
- ```html
243
- <semtic-nav-item href="/posts" active>Posts</semtic-nav-item>
244
- <semtic-nav-item href="/series">
245
- Series
246
- <semtic-nav-item href="/series/one">One</semtic-nav-item>
247
- </semtic-nav-item>
248
- ```
254
+ It is strongly advised not to override them without proper testing and
255
+ validating assumptions.
249
256
 
250
- ### semtic-nav-section
251
257
 
252
- Groups nav items with an optional label. Sections are separated by a
253
- border when adjacent.
258
+ # Typography
254
259
 
255
- ```html
256
- <semtic-nav-section label="Main">
257
- <semtic-nav-item href="/dashboard">Dashboard</semtic-nav-item>
258
- </semtic-nav-section>
259
- ```
260
+ Typography is opt-in and token-driven.
260
261
 
261
- ### semtic-sidenav
262
+ ## Core knobs
262
263
 
263
- Sidebar navigation wrapper with optional app label. Hidden on mobile,
264
- always visible on desktop (`>= 64rem`). Toggle mobile state via the
265
- `toggle()`, `open()`, `close()` API or by setting `semtic-sidenav-open`.
264
+ ```css
265
+ --skirbi-font-scale
266
+ --skirbi-line-height
266
267
 
267
- Width knob: `--semtic-sidenav-width` (default `16rem`).
268
+ --skirbi-h1-scale
269
+ --skirbi-h2-scale
270
+ --skirbi-h3-scale
271
+ --skirbi-h4-scale
268
272
 
269
- ```html
270
- <semtic-sidenav label="MyApp">
271
- <semtic-nav-section label="Main">
272
- <semtic-nav-item href="/dashboard">Dashboard</semtic-nav-item>
273
- </semtic-nav-section>
274
- </semtic-sidenav>
273
+ --skirbi-prose-gap
275
274
  ```
276
275
 
277
- ---
276
+ ## Font families
278
277
 
279
- ## Additional components
278
+ ```css
279
+ --skirbi-font-sans
280
+ --skirbi-font-mono
281
+ ```
280
282
 
281
- ### semtic-terminal
282
283
 
283
- The default style is `linux`. To change the default for your theme, target
284
- unstyled terminals with `:not([semtic-terminal-style])` in your theme CSS. To
285
- override per element, set `semtic-terminal-style="macos|linux|windows|none"` on
286
- the element.
284
+ # Component recipes
287
285
 
288
- Terminal-style code block with macOS-style dots, optional title, and
289
- copy button. Styled via `--semtic-terminal-dot-close`,
290
- `--semtic-terminal-dot-minimize`, `--semtic-terminal-dot-maximize`.
286
+ Pinta ships light recipes for Semtic elements.
291
287
 
292
- ### semtic-aside
288
+ Examples:
293
289
 
294
- Callout block with left border accent. Variants: `note`, `info`,
295
- `warning`, `tip`. Each uses the corresponding status color.
290
+ * `semtic-panel`
291
+ * `semtic-tile`
292
+ * `semtic-terminal`
293
+ * `semtic-nav`
294
+ * `semtic-sidenav`
295
+ * `semtic-table`
296
+ * `semtic-aside`
297
+ * `semtic-article-card`
298
+
299
+ These recipes are intentionally conservative and easy to override.
300
+
301
+
302
+ # Layout primitives
303
+
304
+ Semtic ships minimal layout primitives:
296
305
 
297
306
  ```html
298
- <semtic-aside variant="tip">Use this for pro tips.</semtic-aside>
307
+ <semtic-grid>
308
+ <semtic-flex>
309
+ <semtic-stack>
299
310
  ```
300
311
 
301
- ---
312
+ These are structural primitives, not utility APIs.
302
313
 
303
- ## Tables
314
+ Pinta provides light defaults only.
304
315
 
305
- ### semtic-table
306
-
307
- Dynamic data table. Two modes: static (`columns` + `data`) and remote
308
- (`endpoint` + `jpath` + `jpath-columns`). Supports search, JSON:API
309
- sorting and pagination, and actions via slot.
316
+ Example:
310
317
 
311
318
  ```html
312
- <semtic-table
313
- caption="Users"
314
- columns='["Name","Email"]'
315
- data='[{"Name":"Alice","Email":"alice@example.com"}]'
316
- semtic-table-variant="default"
317
- searchable
318
- ></semtic-table>
319
+ <semtic-grid semtic-columns="3">
319
320
  ```
320
321
 
321
- Variants:
322
+ Use normal CSS for:
322
323
 
323
- - _(none)_ — pinta tokens applied, no structural opinions
324
- - `default` — borders, padding, hover rows
325
- - `zebra` — same as default + striped rows
324
+ * spacing
325
+ * layout tuning
326
+ * responsiveness
327
+ * composition
326
328
 
327
- Remote with JSON:API:
328
329
 
329
- ```html
330
- <semtic-table
331
- endpoint="/api/users"
332
- jpath="data"
333
- jpath-columns='[
334
- {"label":"Name","jpath":"name","sortable":true},
335
- {"label":"Email","jpath":"email"}
336
- ]'
337
- searchable
338
- semtic-table-variant="default"
339
- ></semtic-table>
330
+ # Accessibility defaults
331
+
332
+ Pinta ships default focus handling:
333
+
334
+ ```css
335
+ --skirbi-focus-ring-size
336
+ --skirbi-focus-ring-color
340
337
  ```
341
338
 
342
- Actions slot:
339
+ Focus styling is theme-level because it affects accessibility.
340
+
341
+
342
+ # Native CSS is the escape hatch
343
+
344
+ Pinta intentionally prefers normal CSS over utility APIs.
345
+
346
+ Example:
343
347
 
344
348
  ```html
345
- <semtic-table columns='["Name"]' data='[...]'>
346
- <template slot="actions">
347
- <button data-action="delete" data-id="{id}">Delete</button>
348
- </template>
349
- </semtic-table>
349
+ <semtic-panel class="featured">
350
+ ```
351
+
352
+ ```css
353
+ .featured {
354
+ border-color: var(--skirbi-primary-main);
355
+ }
350
356
  ```
357
+
358
+ This is the preferred extension model. Whether you pick class based vs
359
+ attribute based is up to you as the author.
360
+
361
+
362
+ # Optional utilities
363
+
364
+ Pinta v0.0.12 removed built-in utility attributes from the core package.
365
+
366
+ An optional utility package may exist later for:
367
+
368
+ * prototypes
369
+ * demos
370
+ * quick experiments
371
+
372
+ Core Pinta intentionally stays focused on:
373
+
374
+ * tokens
375
+ * derivations
376
+ * recipes
377
+ * theming
378
+
package/lib/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
- // SPDX-FileCopyrightText: 2023-2026 Wesley Schwengle <wesley@opndev.io>
2
1
  // SPDX-FileCopyrightText: 2026 Wesley Schwengle <wesleys@opperschaap.net>
3
2
  //
4
3
  // SPDX-License-Identifier: MIT
5
4
 
6
- const VERSION = "0.0.10";
5
+ const VERSION = "0.0.12";