nk_jtb 0.27.3 → 0.28.1

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.
@@ -51,6 +51,8 @@ and typography helpers.
51
51
  - `preview-class="..."` → class applied to the preview container only, keeps copied code clean
52
52
  - `+demo` / `+demo-folded` → render preview and code together
53
53
 
54
+ Use raw HTML (no demo attribute) when the block is purely visual demonstration and the markup is scaffold — showing the code would add noise rather than value.
55
+
54
56
  For layout/responsive docs, use:
55
57
 
56
58
  ```md
@@ -59,7 +61,9 @@ For layout/responsive docs, use:
59
61
 
60
62
  ## Examples Files
61
63
 
62
- Quick visual references — not comprehensive docs. Two files:
64
+ Quick visual references — not comprehensive docs.
65
+
66
+ **Default files:**
63
67
 
64
68
  - `docs/examples/showcase-typography.md` — font sizes, weights, families, text utilities
65
69
  - `docs/examples/showcase-ui.md` — components and UI elements: buttons, badges, checklist, box etc.
@@ -76,8 +80,6 @@ Format depends on content type:
76
80
 
77
81
  Group by component family under `##` headings. Variants sit under `###` within that group.
78
82
 
79
- Do not create a new examples file for a single component. If it does not fit the two above, discuss with the user.
80
-
81
83
  When a section of a component or utility doc is complete, ask:
82
84
 
83
85
  > Do you want this added to an examples file?
package/AGENTS.md CHANGED
@@ -198,16 +198,26 @@ follow the direction.
198
198
  - When a skill system is available and a skill applies, invoke it before
199
199
  proceeding unless it conflicts with the user's explicit request.
200
200
  - Do not treat reading a `SKILL.md` file as a substitute for invoking the skill.
201
- - When updating prompts, guidelines, or skills, first identify the project's
202
- source-of-truth file before editing.
203
201
  - Skills and guidelines are always edited via `.ai/` — never agent-managed
204
- directories (`.claude/`, `.cursor/`, `.windsurf/`, etc.) directly.
205
- - Check whether the `.ai/` entry is a local file or a symlink before editing.
206
- If it is a symlink, follow it to the target and edit there.
202
+ directories (`.claude/`, `.cursor/`, `.windsurf/`, etc.) directly. The path
203
+ you read from when a skill is invoked is never the path you edit.
204
+ - Before editing any skill or guideline, run `ls -la .ai/skills/` or
205
+ `ls -la .ai/guidelines/` to confirm the correct source path. Do this every
206
+ time — do not skip it, do not rely on Glob, do not edit the path you read from.
207
+ - Glob does not follow or reveal symlinks and will return misleading results.
208
+ Always use `ls -la` to locate files in `.ai/`.
209
+ - If the file cannot be found after checking with `ls -la`, stop and ask.
210
+ Do not assume it does not exist, do not fall back to agent-managed
211
+ directories, and do not proceed without knowing the correct location.
212
+ - Check whether the `.ai/` entry is a local file or a symlink. If it is a
213
+ symlink, follow it to the target and edit there.
207
214
  - Do not update matching copies in parallel or alternate locations unless they
208
215
  are the confirmed source of truth or the user explicitly asks.
209
- - After changing project guidelines or adding/updating skills, run
210
- `php artisan boost:update` in the project so the changes take effect.
216
+ - After changing project guidelines or adding/updating skills, run the
217
+ project's sync command to propagate changes to agent-managed directories.
218
+ Check `package.json` for an `ai:sync` script or equivalent. If no sync
219
+ command is available, note that the change will not propagate until the next
220
+ sync.
211
221
  - When a skill or prompt references a file that cannot be read, first try
212
222
  resolving it from the repository root.
213
223
  - If the file still cannot be found, stop and ask before proceeding.
package/CLAUDE.md CHANGED
@@ -198,16 +198,26 @@ follow the direction.
198
198
  - When a skill system is available and a skill applies, invoke it before
199
199
  proceeding unless it conflicts with the user's explicit request.
200
200
  - Do not treat reading a `SKILL.md` file as a substitute for invoking the skill.
201
- - When updating prompts, guidelines, or skills, first identify the project's
202
- source-of-truth file before editing.
203
201
  - Skills and guidelines are always edited via `.ai/` — never agent-managed
204
- directories (`.claude/`, `.cursor/`, `.windsurf/`, etc.) directly.
205
- - Check whether the `.ai/` entry is a local file or a symlink before editing.
206
- If it is a symlink, follow it to the target and edit there.
202
+ directories (`.claude/`, `.cursor/`, `.windsurf/`, etc.) directly. The path
203
+ you read from when a skill is invoked is never the path you edit.
204
+ - Before editing any skill or guideline, run `ls -la .ai/skills/` or
205
+ `ls -la .ai/guidelines/` to confirm the correct source path. Do this every
206
+ time — do not skip it, do not rely on Glob, do not edit the path you read from.
207
+ - Glob does not follow or reveal symlinks and will return misleading results.
208
+ Always use `ls -la` to locate files in `.ai/`.
209
+ - If the file cannot be found after checking with `ls -la`, stop and ask.
210
+ Do not assume it does not exist, do not fall back to agent-managed
211
+ directories, and do not proceed without knowing the correct location.
212
+ - Check whether the `.ai/` entry is a local file or a symlink. If it is a
213
+ symlink, follow it to the target and edit there.
207
214
  - Do not update matching copies in parallel or alternate locations unless they
208
215
  are the confirmed source of truth or the user explicitly asks.
209
- - After changing project guidelines or adding/updating skills, run
210
- `php artisan boost:update` in the project so the changes take effect.
216
+ - After changing project guidelines or adding/updating skills, run the
217
+ project's sync command to propagate changes to agent-managed directories.
218
+ Check `package.json` for an `ai:sync` script or equivalent. If no sync
219
+ command is available, note that the change will not propagate until the next
220
+ sync.
211
221
  - When a skill or prompt references a file that cannot be read, first try
212
222
  resolving it from the repository root.
213
223
  - If the file still cannot be found, stop and ask before proceeding.
@@ -1,47 +1,14 @@
1
- # Auto Spacing System (review)
1
+ # Auto Spacing
2
2
 
3
3
  <p class="lead">Automatic vertical spacing between block elements without
4
- requiring margin utilities on every element. Content flows naturally with
5
- consistent gaps.</p>
4
+ requiring margin utilities on every element.</p>
6
5
 
7
- - **Relationship-Based** - Spacing determined by what elements follow each other
8
- - **Semantic-Aware** - Distinguishes between content and layout wrappers
9
6
  - **Flex/Grid Safe** - Automatically opts out when using gap-based layouts
10
7
  - **Low Specificity** - Uses `:where()` for easy overrides
11
8
 
12
- ## How It Works (review)
9
+ ## Examples
13
10
 
14
- Two rules apply `margin-top: $base-gap` based on element relationships. Spacing
15
- targets (`p`, `h1-h6`, `table`, `ul`, etc.) add spacing when followed by other
16
- elements. Layout wrappers (`div`, `section`, `article`) only add spacing when
17
- followed by content—not other wrappers.
18
-
19
- ## The Rules (review)
20
-
21
- ### Rule 1: Spacing Targets (review)
22
-
23
- Content elements followed by any block element.
24
-
25
- ```scss +code
26
- :where(#{$spacing-targets}, #{$common-classes}) + :where(*:not(#{$inline-exclusions})) {
27
- margin-block-start: $base-gap;
28
- }
29
- ```
30
-
31
- ### Rule 2: Layout to Content (review)
32
-
33
- Layout wrappers followed by content elements. This prevents `div + div` spacing
34
- while catching `div + p`.
35
-
36
- ```scss +code
37
- :where(div, section, article) + :where(#{$spacing-targets}) {
38
- margin-block-start: $base-gap;
39
- }
40
- ```
41
-
42
- ## Visual Tests (review)
43
-
44
- ### Should Space (review)
11
+ ### Should Space
45
12
 
46
13
  <div class="bx bg-stripes-pink">
47
14
  <h2 class="pxy-075 warning-light rounded-05">Heading 2</h2>
@@ -55,7 +22,7 @@ while catching `div + p`.
55
22
  <pre class="pxy-075 warning-light rounded-05">Pre</pre>
56
23
  </div>
57
24
 
58
- ### Should NOT Space (review)
25
+ ### Should NOT Space
59
26
 
60
27
  <div class="bx bg-stripes-blue">
61
28
  <div class="pxy-075 info-light rounded-05">Div</div>
@@ -66,16 +33,10 @@ while catching `div + p`.
66
33
  <footer class="pxy-075 info-light rounded-05">Footer</footer>
67
34
  </div>
68
35
 
69
- ## Flex and Grid (review)
36
+ ### Flex and Grid
70
37
 
71
38
  Elements inside flex or grid containers have margins reset—these layouts use `gap` instead.
72
39
 
73
- ```scss +code
74
- :where([class*='flex'], [class*='grid']) > * {
75
- margin: 0;
76
- }
77
- ```
78
-
79
40
  <div class="grid cols-2 gap-1">
80
41
  <div>
81
42
  <p class="txt-sm">Flex (uses gap)</p>
@@ -95,3 +56,17 @@ Elements inside flex or grid containers have margins reset—these layouts use `
95
56
  </div>
96
57
  </div>
97
58
  </div>
59
+
60
+ ## How It Works
61
+
62
+ Spacing is applied by element relationship, not position. Two categories determine behaviour:
63
+
64
+ **Spacing targets** — `p`, headings, `ul`, `table`, `form`, `blockquote`, `pre` — add
65
+ `margin-block-start` to whatever follows them.
66
+
67
+ **Layout wrappers** — `div`, `section`, `article` — only add spacing when followed by
68
+ content, not other wrappers. This prevents `div + div` from being spaced while
69
+ still catching `div + p`.
70
+
71
+ Elements inside flex or grid containers are exempt — margins reset to zero and
72
+ `gap` handles spacing instead.
@@ -4,9 +4,9 @@ Page loaders and spinners to communicate in-progress and waiting states.
4
4
 
5
5
  ## Spinners
6
6
 
7
- ### SVG Arc
7
+ ### SVG Border
8
8
 
9
- Apply `animate-spin` to an SVG with a dashed stroke to create a spinner.
9
+ A static arc on a faint circular track. Apply `animate-spin` to the SVG.
10
10
 
11
11
  Use `wh-*` utilities to control size.
12
12
 
@@ -28,21 +28,82 @@ Use `wh-*` utilities to control size.
28
28
  Use `txt-*` utilities to control colour.
29
29
 
30
30
  ```html +demo-folded class="bx example-utils" preview-class="flex-centered gap"
31
- <svg class="animate-spin wh-2 txt-blue" viewBox="0 0 36 36">
31
+ <svg class="animate-spin wh-3 txt-blue" viewBox="0 0 36 36">
32
32
  <circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-opacity="0.25" />
33
33
  <circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="butt" stroke-dasharray="22 66" />
34
34
  </svg>
35
- <svg class="animate-spin wh-2 txt-blue-900" viewBox="0 0 36 36">
35
+ <svg class="animate-spin wh-3 txt-blue-900" viewBox="0 0 36 36">
36
36
  <circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-opacity="0.25" />
37
37
  <circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="butt" stroke-dasharray="22 66" />
38
38
  </svg>
39
- <svg class="animate-spin wh-2 txt-orange-400" viewBox="0 0 36 36">
39
+ <svg class="animate-spin wh-3 txt-orange-400" viewBox="0 0 36 36">
40
40
  <circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-opacity="0.25" />
41
41
  <circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="butt" stroke-dasharray="22 66" />
42
42
  </svg>
43
43
  ```
44
44
 
45
- ## Loader Container (review)
45
+ ### SVG Arc
46
+
47
+ Apply `animate-dash` to an SVG element. A single class handles both rotation and
48
+ stroke morphing. Use `wh-*` to control size and `txt-*` to control colour.
49
+
50
+ ```html +demo-folded class="bx example-utils" preview-class="flex-centered vac gap-2"
51
+ <svg class="animate-dash wh-2 txt-primary" viewBox="0 0 44 44">
52
+ <circle cx="22" cy="22" r="16" stroke="currentColor" />
53
+ </svg>
54
+ <svg class="animate-dash wh-3 txt-primary" viewBox="0 0 44 44">
55
+ <circle cx="22" cy="22" r="16" stroke="currentColor" />
56
+ </svg>
57
+ <svg class="animate-dash wh-4 txt-primary" viewBox="0 0 44 44">
58
+ <circle cx="22" cy="22" r="16" stroke="currentColor" />
59
+ </svg>
60
+ ```
61
+
62
+ Use `txt-*` utilities to control colour.
63
+
64
+ ```html +demo-folded class="bx example-utils" preview-class="flex-centered gap"
65
+ <svg class="animate-dash wh-3 txt-blue" viewBox="0 0 44 44">
66
+ <circle cx="22" cy="22" r="16" stroke="currentColor" />
67
+ </svg>
68
+ <svg class="animate-dash wh-3 txt-blue-900" viewBox="0 0 44 44">
69
+ <circle cx="22" cy="22" r="16" stroke="currentColor" />
70
+ </svg>
71
+ <svg class="animate-dash wh-3 txt-orange-400" viewBox="0 0 44 44">
72
+ <circle cx="22" cy="22" r="16" stroke="currentColor" />
73
+ </svg>
74
+ ```
75
+
76
+ ### Dots (review)
46
77
 
47
- `.loader-container` centers a spinner and loading text as a column. For a
48
- composed example see [UI Examples](/docs/jtb/examples/showcase-ui).
78
+ Eight dots arranged in a circle, fading in sequence. Use `wh-*` to control size
79
+ and `txt-*` to control colour.
80
+
81
+ ```html +demo-folded class="bx example-jtb" preview-class="flex-centered vac gap-2"
82
+ <div class="spinner-dots wh-2 txt-primary">
83
+ <div></div><div></div><div></div><div></div>
84
+ <div></div><div></div><div></div><div></div>
85
+ </div>
86
+ <div class="spinner-dots wh-3 txt-primary">
87
+ <div></div><div></div><div></div><div></div>
88
+ <div></div><div></div><div></div><div></div>
89
+ </div>
90
+ <div class="spinner-dots wh-4 txt-primary">
91
+ <div></div><div></div><div></div><div></div>
92
+ <div></div><div></div><div></div><div></div>
93
+ </div>
94
+ ```
95
+
96
+ ## Page Loader
97
+
98
+ Compose a page loader with utilities. Use `flex flex-col flex-centered` to
99
+ centre the spinner and text as a column. Add `animate-dots` for an animated
100
+ ellipsis alongside the loading label.
101
+
102
+ ```html +demo-folded class="bx example-utils" preview-class="flex-centered"
103
+ <div class="flex flex-col flex-centered gap-1">
104
+ <svg class="animate-dash wh-4 txt-primary" viewBox="0 0 44 44">
105
+ <circle cx="22" cy="22" r="16" stroke="currentColor" />
106
+ </svg>
107
+ <span>Loading<span class="animate-dots"></span></span>
108
+ </div>
109
+ ```
@@ -52,7 +52,7 @@ a doc is confirmed accurate or a utility is completed.
52
52
 
53
53
  | Utility | Framework | Docs | Notes |
54
54
  | ----------- | --------- | ------ | --------------------- |
55
- | `animation` | review | Review | `animate-*` utilities |
55
+ | `animation` | | | `animate-*` utilities |
56
56
 
57
57
  ### Backgrounds (review)
58
58
 
@@ -242,7 +242,7 @@ a doc is confirmed accurate or a utility is completed.
242
242
  | `layouts-and-structures.md` | ✅ | |
243
243
  | `responsive-design-patterns.md` | review | |
244
244
  | `responsive-design.md` | review | |
245
- | `automatic-spacing.md` | review | |
245
+ | `automatic-spacing.md` | | |
246
246
  | `conventions-and-architecture-rules.md` | review | |
247
247
  | `magic-classes.md` | ✅ | |
248
248
  | `themes.md` | review | |
@@ -295,7 +295,7 @@ Files parked in `docs/review/` — purpose or audience unclear.
295
295
  | `components/menu.md` | review | |
296
296
  | `components/navbar.md` | review | |
297
297
  | `components/table.md` | review | |
298
- | `components/loaders-and-spinners.md` | partial | Spinners section confirmed (SVG Arc utility approach). Loader Container still pending. |
298
+ | `components/loaders-and-spinners.md` | partial | SVG Border, SVG Arc, Page Loader confirmed. Dots section still under review. |
299
299
  | `components/example-navigations.md` | stub | Bare HTML, no explanation |
300
300
 
301
301
  ### Utilities
@@ -304,7 +304,7 @@ Files parked in `docs/review/` — purpose or audience unclear.
304
304
  | ------------------------------------- | ------ | --------------------------------------------------- |
305
305
  | `utilities/border.md` | review | Border, outline, and divider utilities |
306
306
  | `utilities/typography.md` | review | New — needs review pass |
307
- | `utilities/animation.md` | review | Rewritten — loader/spinner content moved to components/loaders-and-spinners.md |
307
+ | `utilities/animation.md` | | |
308
308
  | `utilities/display-and-visibility.md` | review | |
309
309
  | `utilities/effects.md` | review | |
310
310
  | `utilities/position.md` | review | |
@@ -2,26 +2,28 @@
2
2
 
3
3
  Utility classes for applying CSS animations.
4
4
 
5
- | Class | Animation |
6
- | --------------------- | ------------------- |
7
- | `animate-spin` | Continuous rotation |
8
- | `animate-bounce` | Vertical bounce |
9
- | `animate-pulse` | Opacity fade |
10
- | `animate-pulse-ring` | Expanding ring |
11
- | `animate-ping` | Scale and fade out |
12
- | `animate-checkmark` | SVG stroke draw-in |
13
- | `animate-circle` | SVG stroke draw-in |
14
- | `animate-none` | Removes animation |
15
-
16
- ## Spin (review)
17
-
18
- Rotates an element continuously. Commonly used for loading indicators.
19
-
20
- ```html +demo-folded class="bx"
21
- <div class="animate-spin wh-3 bdr-4 bdr-gray-200 bdr-t-blue-500 rounded-full"></div>
5
+ | Class | Animation |
6
+ | -------------------- | ----------------------- |
7
+ | `animate-spin` | Continuous rotation |
8
+ | `animate-bounce` | Vertical bounce |
9
+ | `animate-pulse` | Opacity fade |
10
+ | `animate-pulse-ring` | Expanding ring |
11
+ | `animate-ping` | Scale and fade out |
12
+ | `animate-dash` | SVG stroke arc morphing |
13
+ | `animate-dots` | Animated ellipsis |
14
+ | `animate-checkmark` | SVG stroke draw-in |
15
+ | `animate-circle` | SVG stroke draw-in |
16
+ | `animate-none` | Removes animation |
17
+
18
+ ## Spin
19
+
20
+ Rotates an element continuously.
21
+
22
+ ```html +demo-folded class="bx" preview-class="flex-centered"
23
+ <div class="animate-spin wh-3 bdr-4 bdr-blue-500 rounded-full"></div>
22
24
  ```
23
25
 
24
- ## Bounce (review)
26
+ ## Bounce
25
27
 
26
28
  Applies a vertical bounce. Stagger `animation-delay` across sibling elements for
27
29
  a sequential effect.
@@ -32,16 +34,15 @@ a sequential effect.
32
34
  <div class="wh-1 bg-blue-600 rounded-full animate-bounce" style="animation-delay: 0.2s;"></div>
33
35
  ```
34
36
 
35
- ## Pulse (review)
37
+ ## Pulse
36
38
 
37
- Fades an element's opacity in and out. Use for skeleton loaders or ambient
38
- status indicators.
39
+ Fades an element's opacity in and out.
39
40
 
40
41
  ```html +demo-folded class="bx"
41
42
  <div class="wh-4 bg-teal-500 rounded-full animate-pulse"></div>
42
43
  ```
43
44
 
44
- ## Pulse Ring (review)
45
+ ## Pulse Ring
45
46
 
46
47
  Scales and fades an element outward to create an expanding ring effect. Use
47
48
  `relative` positioning with overlapping siblings for layered rings.
@@ -54,7 +55,7 @@ Scales and fades an element outward to create an expanding ring effect. Use
54
55
  </div>
55
56
  ```
56
57
 
57
- ## Ping (review)
58
+ ## Ping
58
59
 
59
60
  Scales an element to twice its size while fading it out — a one-shot burst
60
61
  effect. Commonly used as a notification indicator layered over a badge or dot.
@@ -66,14 +67,35 @@ effect. Commonly used as a notification indicator layered over a badge or dot.
66
67
  </div>
67
68
  ```
68
69
 
69
- ## SVG Animations (review)
70
+ ## Dots
71
+
72
+ Animates a `::after` pseudo-element to cycle through an ellipsis sequence.
73
+
74
+ ```html +demo-folded class="bx" preview-class="flex-centered"
75
+ <span>Loading<span class="animate-dots"></span></span>
76
+ ```
77
+
78
+ ## SVG Animations
79
+
80
+ ### Dash
81
+
82
+ Rotates an SVG while morphing its child circle's `stroke-dasharray`. A single
83
+ class handles both the rotation and the stroke animation.
84
+
85
+ ```html +demo-folded class="bx" preview-class="flex-centered"
86
+ <svg class="animate-dash wh-4 txt-blue-500" viewBox="0 0 44 44">
87
+ <circle cx="22" cy="22" r="16" stroke="currentColor" />
88
+ </svg>
89
+ ```
90
+
91
+ ### Draw-in
70
92
 
71
93
  `animate-circle` draws a circular stroke in from nothing to full.
72
- `animate-checkmark` does the same for a path. Both classes set `stroke-dasharray`
94
+ `animate-checkmark` does the same for a path. Both set `stroke-dasharray`
73
95
  and animate `stroke-dashoffset`. The SVG path or circle length must be no greater
74
96
  than the class's `stroke-dasharray` value (166 for circle, 100 for checkmark).
75
97
 
76
- ```html +demo-folded class="bx"
98
+ ```html +demo-folded class="bx" preview-class="flex-centered"
77
99
  <svg viewBox="0 0 52 52" class="wh-4 txt-green-600" fill="none">
78
100
  <circle cx="26" cy="26" r="25" stroke="currentColor" stroke-width="2" class="animate-circle" />
79
101
  <path d="M14 27l8 8 16-16" stroke="currentColor" stroke-width="2" class="animate-checkmark" />