ab-nextjs-components 0.4.2 โ†’ 0.5.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +66 -17
  2. package/README.md +1 -0
  3. package/ab-app-bar/index.tsx +5 -5
  4. package/ab-app-bar/styles.module.css +5 -5
  5. package/ab-bottom-drawer/index.tsx +3 -3
  6. package/ab-bottom-drawer/styles.module.css +2 -2
  7. package/ab-bottom-drawer/use-ab-swipe-down.ts +1 -1
  8. package/ab-breadcrumbs/index.tsx +1 -1
  9. package/ab-breadcrumbs/styles.module.css +5 -5
  10. package/ab-button/index.tsx +1 -1
  11. package/ab-button/styles.module.css +5 -5
  12. package/ab-callout/index.tsx +1 -1
  13. package/ab-callout/styles.module.css +1 -1
  14. package/ab-carousel/helpers.ts +1 -1
  15. package/ab-carousel/index.tsx +4 -4
  16. package/ab-carousel/styles.module.css +2 -2
  17. package/ab-chip/styles.module.css +1 -1
  18. package/ab-code-block/index.tsx +2 -2
  19. package/ab-code-block/styles.module.css +1 -1
  20. package/ab-content-tabs/index.tsx +1 -1
  21. package/ab-doc-pager/index.tsx +1 -1
  22. package/ab-drawer/gestures.ts +1 -1
  23. package/ab-drawer/index.tsx +3 -3
  24. package/ab-drawer/kit.module.css +13 -13
  25. package/ab-drawer/styles.module.css +2 -2
  26. package/ab-drawer/use-ab-edge-swipe.ts +2 -2
  27. package/ab-flow-diagram/helpers.ts +2 -2
  28. package/ab-flow-diagram/index.tsx +2 -2
  29. package/ab-flow-diagram/styles.module.css +3 -3
  30. package/ab-icon/helpers.ts +1 -1
  31. package/ab-icon/index.tsx +3 -3
  32. package/ab-icon/registrar.tsx +1 -1
  33. package/ab-icon-button/index.tsx +1 -1
  34. package/ab-install-snippet/styles.module.css +1 -1
  35. package/ab-link/index.tsx +2 -2
  36. package/ab-link/locale.ts +1 -1
  37. package/ab-list/styles.module.css +1 -1
  38. package/ab-locale-switcher/index.tsx +6 -6
  39. package/ab-locale-switcher/styles.module.css +5 -5
  40. package/ab-mobile-header/index.tsx +6 -6
  41. package/ab-nav-drawer/index.tsx +11 -6
  42. package/ab-navbar/index.tsx +1 -1
  43. package/ab-navbar/styles.module.css +1 -1
  44. package/ab-navbar/view.tsx +1 -1
  45. package/ab-package-card/index.tsx +3 -3
  46. package/ab-package-card/previews.tsx +1 -1
  47. package/ab-package-card/styles.module.css +2 -2
  48. package/ab-playground-scene/i18n.module.css +1 -1
  49. package/ab-playground-scene/icons.tsx +1 -1
  50. package/ab-playground-scene/index.tsx +4 -4
  51. package/ab-playground-scene/labels.ts +3 -3
  52. package/ab-playground-scene/scenes.tsx +4 -4
  53. package/ab-playground-scene/styles.module.css +6 -6
  54. package/ab-playground-scene/upgraded.tsx +3 -3
  55. package/ab-playground-scene/welcome.tsx +1 -1
  56. package/ab-progress-chips/index.tsx +1 -1
  57. package/ab-search-drawer/index.tsx +4 -4
  58. package/ab-search-trigger/index.tsx +5 -5
  59. package/ab-search-trigger/styles.module.css +3 -3
  60. package/ab-settings-drawer/index.tsx +2 -2
  61. package/ab-sidebar/active.ts +105 -0
  62. package/ab-sidebar/index.tsx +10 -6
  63. package/ab-sidebar/profile-button.tsx +2 -2
  64. package/ab-sidebar/styles.module.css +4 -4
  65. package/ab-sidebar/view.tsx +16 -8
  66. package/ab-theme-mode/index.tsx +3 -3
  67. package/ab-theme-toggle/index.tsx +6 -6
  68. package/ab-theme-toggle/styles.module.css +2 -2
  69. package/ab-toc/index.tsx +3 -3
  70. package/ab-toc/promo.tsx +2 -2
  71. package/ab-toc/styles.module.css +1 -1
  72. package/ab-toc-drawer/index.tsx +1 -1
  73. package/ab-version-switcher/index.tsx +2 -2
  74. package/css/dialog.css +1 -1
  75. package/index.ts +17 -14
  76. package/package.json +1 -1
  77. package/server/ab-button/index.tsx +1 -1
  78. package/server/ab-icon/index.tsx +2 -2
  79. package/server/ab-sidebar/index.tsx +3 -2
  80. package/types/index.d.ts +7 -7
@@ -37,7 +37,7 @@
37
37
  */
38
38
 
39
39
 
40
- /* ๐Ÿงฐ drawers v2 (John's frames, God 01:22): the shared look of AbSettingsDrawer, AbNavDrawer, AbTocDrawer and
40
+ /* ๐Ÿงฐ drawers v2 (the frames): the shared look of AbSettingsDrawer, AbNavDrawer, AbTocDrawer and
41
41
  AbSearchDrawer. Values are the mock's (drawer.css), read through the theme tokens where theme 0.3.5+ has them.
42
42
  Doubled classes beat AbDrawer's own rules without !important. */
43
43
 
@@ -83,7 +83,7 @@
83
83
  .titleSm [data-ab-part='drawer-header'] > :first-child { font-size: 20px; }
84
84
  /* โœ• close: 44px, 8px radius, --muted, 24px glyph */
85
85
  .sheet [data-ab-part='drawer-close'] { inline-size: 44px; block-size: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--ab-color-muted, #6b5b50); }
86
- @media (hover: hover) { .sheet [data-ab-part='drawer-close']:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1 (Joseph): no sticky tap-hover on touch */
86
+ @media (hover: hover) { .sheet [data-ab-part='drawer-close']:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1: no sticky tap-hover on touch */
87
87
  .sheet [data-ab-part='drawer-close']:focus { outline: none; }
88
88
  .sheet [data-ab-part='drawer-close']:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: 2px; }
89
89
  /* ๐Ÿ“œ body: 16px sides */
@@ -99,7 +99,7 @@
99
99
  text-align: start; text-decoration: none; cursor: pointer; /* ๐Ÿ–ฑ๏ธ */
100
100
  }
101
101
  .row > svg, .row > .ic { flex: none; inline-size: 24px; block-size: 24px; color: var(--ab-color-muted, #6b5b50); }
102
- @media (hover: hover) { .row:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1 (Joseph): no sticky tap-hover on touch */
102
+ @media (hover: hover) { .row:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1: no sticky tap-hover on touch */
103
103
  .row:focus { outline: none; }
104
104
  .row:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: -2px; }
105
105
  .row[aria-checked='true'], .row[aria-current='page'] { background: var(--ab-dr-on); box-shadow: var(--ab-dr-on-ring); color: var(--ab-color-accent-text, #8b6340); font-weight: 700; } /* ๐ŸŽฏ */
@@ -118,7 +118,7 @@
118
118
 
119
119
  /* โฌ…๏ธ the nav drawer: logo header, the version chip, a scrolling nav (44px rows, 15px) with a 72px fade, a pinned footer */
120
120
  .logoRow { display: flex; align-items: center; min-inline-size: 0; }
121
- .logoRow a { display: flex; align-items: center; color: inherit; min-block-size: 44px; } /* ๐Ÿ‘† 0.3.2 (God, 0.2.23 gaps): the logo link is a 44px-tall tap target (was 25px); the glyph keeps its size */
121
+ .logoRow a { display: flex; align-items: center; color: inherit; min-block-size: 44px; } /* ๐Ÿ‘† 0.3.2 (0.2.23 gaps): the logo link is a 44px-tall tap target (was 25px); the glyph keeps its size */
122
122
  .ver { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; block-size: 32px; padding: 0 8px 0 10px; margin: 0 0 8px 8px; box-sizing: border-box; border-radius: 8px; border: 1px solid var(--ab-color-border, rgb(92 64 48 / 0.13)); background: var(--ab-dr-card); color: var(--ab-color-muted, #6b5b50); font: 500 13px/1 var(--ab-font-body, 'Inter', inherit); }
123
123
  .ver b { font-family: var(--ab-font-mono, 'Roboto Mono', monospace); color: var(--ab-color-accent-text, #8b6340); font-weight: 600; }
124
124
  .ver > svg { inline-size: 18px; block-size: 18px; }
@@ -129,7 +129,7 @@
129
129
  .list { list-style: none; margin: 0; padding: 0; }
130
130
  .nv { box-sizing: border-box; display: flex; align-items: center; gap: 12px; block-size: 44px; padding: 0 12px; border-radius: 8px; color: var(--ab-color-text, #211a16); font: 500 15px/1.2 var(--ab-font-body, 'Inter', inherit); text-decoration: none; }
131
131
  .nv > svg { flex: none; inline-size: 22px; block-size: 22px; color: var(--ab-color-muted, #6b5b50); }
132
- @media (hover: hover) { .nv:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1 (Joseph): no sticky tap-hover on touch */
132
+ @media (hover: hover) { .nv:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1: no sticky tap-hover on touch */
133
133
  .nv:focus { outline: none; }
134
134
  .nv:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: -2px; }
135
135
  .nv[aria-current='page'] { background: var(--ab-dr-on); box-shadow: var(--ab-dr-on-ring); color: var(--ab-color-accent-text, #8b6340); font-weight: 700; }
@@ -157,11 +157,11 @@
157
157
  .input::-webkit-search-cancel-button { display: none; }
158
158
  .iconSm { flex: none; inline-size: 40px; block-size: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--ab-color-muted, #6b5b50); cursor: pointer; padding: 0; }
159
159
  .iconSm > svg { inline-size: 20px; block-size: 20px; }
160
- @media (hover: hover) { .iconSm:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1 (Joseph): no sticky tap-hover on touch */
160
+ @media (hover: hover) { .iconSm:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1: no sticky tap-hover on touch */
161
161
  .iconSm:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: -2px; }
162
162
  .results { flex: 1 1 auto; min-block-size: 0; overflow: hidden auto; overscroll-behavior: contain; }
163
163
  .recent { gap: 12px; padding-inline-end: 0; font-size: 15px; cursor: default; }
164
- @media (hover: hover) { .recent:hover { background: transparent; } } /* ๐Ÿ–ฑ๏ธ 0.2.1 (Joseph): no sticky tap-hover on touch */
164
+ @media (hover: hover) { .recent:hover { background: transparent; } } /* ๐Ÿ–ฑ๏ธ 0.2.1: no sticky tap-hover on touch */
165
165
  .recentGo { flex: 1 1 auto; min-inline-size: 0; border: 0; background: none; padding: 0; text-align: start; color: inherit; font: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
166
166
  .recentGo:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: 2px; }
167
167
  .grp2 { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px 4px; margin: 0; }
@@ -169,8 +169,8 @@
169
169
  .grp2 > code { font: 400 12px/16px var(--ab-font-mono, 'Roboto Mono', monospace); color: var(--ab-color-muted, #6b5b50); }
170
170
  .sr { box-sizing: border-box; display: flex; align-items: center; gap: 12px; min-block-size: 56px; padding: 4px 12px; border-radius: 8px; color: inherit; text-decoration: none; }
171
171
  .sr[aria-selected='true'] { background: var(--ab-dr-on); box-shadow: var(--ab-dr-on-ring); }
172
- @media (hover: hover) { .sr:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1 (Joseph): no sticky tap-hover on touch */
173
- @media (hover: hover) { .sr[aria-selected='true']:hover { background: var(--ab-dr-on); } } /* ๐Ÿ–ฑ๏ธ 0.2.1 (Joseph): no sticky tap-hover on touch */
172
+ @media (hover: hover) { .sr:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1: no sticky tap-hover on touch */
173
+ @media (hover: hover) { .sr[aria-selected='true']:hover { background: var(--ab-dr-on); } } /* ๐Ÿ–ฑ๏ธ 0.2.1: no sticky tap-hover on touch */
174
174
  .pkgIc { flex: none; inline-size: 32px; block-size: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--ab-dr-card2); color: var(--ab-color-accent-text, #8b6340); }
175
175
  .pkgIc > svg { inline-size: 20px; block-size: 20px; }
176
176
  .srText { flex: 1 1 auto; min-inline-size: 0; }
@@ -188,7 +188,7 @@
188
188
  /* ๐Ÿ“ฑ the mobile main header: 56px row, logo left, 44px globe + theme buttons right */
189
189
  .mh { box-sizing: border-box; display: flex; align-items: center; block-size: 100%; min-block-size: 56px; padding: 0 4px 0 16px; gap: 0; background: transparent; }
190
190
  .mh > .logoRow { flex: 1 1 auto; }
191
- /* โž• 0.2.3 (Joseph, Welcome 0.2.21): with a `row`, the header is a column: the 56px bar, then the extra row */
191
+ /* โž• 0.2.3 (Welcome 0.2.21): with a `row`, the header is a column: the 56px bar, then the extra row */
192
192
  .mhStack { flex-direction: column; align-items: stretch; padding: 0; block-size: auto; } /* ๐Ÿงฑ */
193
193
  .mhBar { box-sizing: border-box; display: flex; align-items: center; min-block-size: 56px; padding: 0 4px 0 16px; } /* ๐Ÿ“ the same bar */
194
194
  .mhBar > .logoRow { flex: 1 1 auto; } /* โ†”๏ธ */
@@ -197,7 +197,7 @@
197
197
  buttons keep their hit area and the end inset stays 4px so the last one lines up with the 44px grid */
198
198
  /* ๐Ÿงฉ 0.2.3 no-JS language list: <details> around the globe; the list drops below it, end-aligned */
199
199
  .langDetails { position: relative; flex: none; } /* ๐Ÿ“Œ anchor */
200
- /* ๐Ÿ”Ž 0.3.2 (Joseph): AbMobileHeader `search` slot, before the theme button; never shrinks, 4px from its neighbours */
200
+ /* ๐Ÿ”Ž 0.3.2: AbMobileHeader `search` slot, before the theme button; never shrinks, 4px from its neighbours */
201
201
  .mhSearch { flex: none; display: inline-flex; align-items: center; margin-inline: 4px; } /* ๐Ÿ“ */
202
202
  .langDetails > summary { list-style: none; } /* ๐Ÿ™ˆ no disclosure triangle */
203
203
  .langDetails > summary::-webkit-details-marker { display: none; } /* ๐Ÿ™ˆ Safari */
@@ -205,7 +205,7 @@
205
205
  .langList a { display: flex; align-items: center; min-block-size: 44px; padding: 0 12px; border-radius: 8px; color: var(--ab-color-text, #211a16); text-decoration: none; } /* ๐Ÿ‘† 44px targets */
206
206
  .langList a[aria-current='true'] { font-weight: 700; color: var(--ab-color-accent, #a67c52); } /* โœ… */
207
207
  .langList a:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: -2px; } /* โ™ฟ */
208
- /* ๐Ÿ“ฑ 0.2.3 barAt (Joseph, Welcome 0.2.21): from 768px up the app header carries logo ยท globe ยท theme, so the bar would
208
+ /* ๐Ÿ“ฑ 0.2.3 barAt (Welcome 0.2.21): from 768px up the app header carries logo ยท globe ยท theme, so the bar would
209
209
  repeat it. 'mobile' hides the bar there; 'auto' does so only inside core's mainHeaderAt="all" layout (the only
210
210
  place the main header shows at that width next to the app header). The row stays. Pure CSS: no-JS + SSR safe. */
211
211
  @media (min-width: 768px) {
@@ -219,7 +219,7 @@
219
219
  .mhCompact > .mhBar { min-block-size: 48px; padding-inline-start: 18px; } /* ๐Ÿ“ with a row */
220
220
  .ibtn { flex: none; inline-size: 44px; block-size: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--ab-color-text, #211a16); cursor: pointer; padding: 0; }
221
221
  .ibtn > svg { inline-size: 24px; block-size: 24px; }
222
- @media (hover: hover) { .ibtn:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1 (Joseph): no sticky tap-hover on touch */
222
+ @media (hover: hover) { .ibtn:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } } /* ๐Ÿ–ฑ๏ธ 0.2.1: no sticky tap-hover on touch */
223
223
  .ibtn:focus { outline: none; }
224
224
  .ibtn:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: -2px; }
225
225
  .verRow { display: flex; flex: none; } /* ๐Ÿท๏ธ keeps the chip its own size */
@@ -59,7 +59,7 @@
59
59
  .abDrawerScrim {
60
60
  position: absolute; /* ๐Ÿ“Œ */
61
61
  inset: 0; /* ๐Ÿ“ */
62
- background: var(--ab-scrim-color, rgb(25 18 12 / 0.4)); /* ๐ŸŒซ๏ธ theme 0.3.5: 40% light / 60% dark (John) */
62
+ background: var(--ab-scrim-color, rgb(25 18 12 / 0.4)); /* ๐ŸŒซ๏ธ theme 0.3.5: 40% light / 60% dark */
63
63
  opacity: 0; /* ๐Ÿซฅ */
64
64
  --ab-motion-duration: var(--ab-drawer-duration, 240ms); /* ๐ŸŽž๏ธ fade = .ab-motion-colors (ab-nextjs-animations) */
65
65
  }
@@ -114,7 +114,7 @@
114
114
 
115
115
  /* โ™ฟ reduced motion: no slide, no fade (handled by ab-nextjs-animations .ab-motion-*) */
116
116
 
117
- /* ===== ๐Ÿ†• 0.2.0 drawers v2 (John's frames, God 01:22) ===== */
117
+ /* ===== ๐Ÿ†• 0.2.0 drawers v2 (the frames) ===== */
118
118
  /* ๐Ÿฅž stacking tiers (spec z-order): right drawer < left drawer < bottom sheet. The layers are siblings in the host,
119
119
  so the tier sits on the layer (z 60 / 61 / 62 keeps all three above the panes and bars, like before) */
120
120
  .abDrawerLayer:has(> .abDrawerFrame[data-tier='nav']) { z-index: 61; } /* โฌ…๏ธ the left drawer is in front of the right one */
@@ -52,7 +52,7 @@ export interface UseAbEdgeSwipeOptions {
52
52
  enabled?: boolean; // ๐ŸŽš๏ธ e.g. false while that drawer is open, or when the page has no aside (default true)
53
53
  width?: number; // ๐Ÿ“ the drawer width the 30% rule uses (default 320)
54
54
  pointerTypes?: readonly string[]; // ๐Ÿ–๏ธ default touch + pen (a mouse never edge-swipes)
55
- // ๐Ÿ“ 0.2.1 (God 02:47): only swipe while the viewport is at most this wide, e.g. AB_ASIDE_DRAWER_MAX_WIDTH (1179) for
55
+ // ๐Ÿ“ 0.2.1: only swipe while the viewport is at most this wide, e.g. AB_ASIDE_DRAWER_MAX_WIDTH (1179) for
56
56
  // the right drawer: mobile AND tablet hide the aside and open it as the right drawer; from 1180px it's a column
57
57
  maxWidth?: number;
58
58
  }
@@ -112,7 +112,7 @@ export function useAbEdgeSwipe({ edge, onOpen, enabled = true, width = 320, poin
112
112
  const cur = d; d = null;
113
113
  if (!cur || cur.axis !== 1) return;
114
114
  if (resolveAbSideRelease({ distance: (x - cur.x) * sign, velocity: cur.v.velocity() * sign, width })) {
115
- (document.activeElement as HTMLElement | null)?.blur?.(); // โ†ฉ๏ธ 0.2.1 (Joseph): a swipe has no opener, so the drawer returns focus to the logo, not a stale element
115
+ (document.activeElement as HTMLElement | null)?.blur?.(); // โ†ฉ๏ธ 0.2.1: a swipe has no opener, so the drawer returns focus to the logo, not a stale element
116
116
  latest.current(); // โœ…
117
117
  }
118
118
  };
@@ -59,7 +59,7 @@ export interface AbFlowNode {
59
59
  captionAt?: 'start' | 'beside-centre';
60
60
  }
61
61
 
62
- // ๐Ÿ–ผ๏ธ 0.2.3: a fixed design frame (John's v6 scene = 760ร—600 with a 56px header); scales to the card width
62
+ // ๐Ÿ–ผ๏ธ 0.2.3: a fixed design frame (the v6 scene = 760ร—600 with a 56px header); scales to the card width
63
63
  export interface AbFlowFrame {
64
64
  w: number; // โ†”๏ธ px
65
65
  h: number; // โ†•๏ธ px
@@ -103,7 +103,7 @@ const H = (n: Rect): number => n.h ?? 0; // โ†•๏ธ
103
103
 
104
104
  /**
105
105
  * @name routeAbFlowWires
106
- * @description ใ€ฐ๏ธ 0.2.3: John's v6 `route(nodes, hub)` (scenes.py), ported 1:1. Nodes above the hub wire down into
106
+ * @description ใ€ฐ๏ธ 0.2.3: the v6 `route(nodes, hub)` (scenes.py), ported 1:1. Nodes above the hub wire down into
107
107
  * its top edge, nodes below wire up into its bottom edge (anchors spread evenly along the edge, sorted by x), side
108
108
  * nodes wire into the left / right edge. Orthogonal elbows (one horizontal run at mid-height / mid-width).
109
109
  * Every wire starts at the node and ends at the hub, so pulses travel node โ†’ hub.
@@ -62,7 +62,7 @@ export interface AbFlowDiagramProps {
62
62
  nodes: readonly AbFlowNode[]; // ๐Ÿ”ต nodes in 0โ€“100 coordinates
63
63
  edges?: readonly AbFlowEdge[] | 'auto'; // ใ€ฐ๏ธ wires between node ids; `'auto'` (default with `frame`) = v6 route() every node โ†’ the hub
64
64
  /** ๐Ÿ–ผ๏ธ 0.2.3 (Welcome v6): a fixed design frame, e.g. `{ w: 760, h: 600, header: 56 }`. Node x/y/w/h are then frame px
65
- * (John's rects 1:1) and the whole stage scales with the card width. */
65
+ * (the rects 1:1) and the whole stage scales with the card width. */
66
66
  frame?: AbFlowFrame;
67
67
  /** ใ€ฐ๏ธ 0.2.3: extra wires as frame-px polylines (v6 `extras`), drawn with rounded corners. */
68
68
  wires?: readonly (readonly AbFlowPoint[])[];
@@ -174,7 +174,7 @@ export function AbFlowDiagram(props: AbFlowDiagramProps): ReactElement {
174
174
  type FrameProps = AbFlowDiagramProps & { frame: AbFlowFrame };
175
175
 
176
176
  /** ๐Ÿ–ผ๏ธ 0.2.3 (Welcome v6): the pixel-frame scene. A fixed wร—h stage (v6 px), scaled to the card width by CSS
177
- * (`100cqw / w`) and the AbFlowFrameScale island; wires auto-route node โ†’ hub like John's route(). */
177
+ * (`100cqw / w`) and the AbFlowFrameScale island; wires auto-route node โ†’ hub like the route(). */
178
178
  function AbFlowFrameDiagram(props: FrameProps): ReactElement {
179
179
  // ๐Ÿงฉ props
180
180
  const { nodes, edges = 'auto', frame, wires = [], alt, title, caption, live = false, active = true, loops = 'infinite', variant = 'full', posterAt = 0.45, duration = 2400, className, style, children, dotted = true, logo, anchors = true, reducedMotion = 'auto' } = props;
@@ -44,7 +44,7 @@
44
44
  aspect-ratio: 760 / 600; /* ๐Ÿ“ mock card */
45
45
  border-radius: 1.25rem; /* ๐Ÿ”ฒ */
46
46
  border: 1px solid var(--ab-color-border, var(--ab-color-outline-variant, rgb(0 0 0 / 0.12))); /* ๐Ÿ–Š๏ธ */
47
- background: var(--ab-flow-card, var(--ab-color-card, var(--ab-color-surface-container, transparent))); /* ๐Ÿƒ 0.2.3 (God, Welcome v5): the theme card (#fff ยท #fffcfa โ‰ฅ1920 ยท #241a12 dark); `--ab-flow-card` overrides it (e.g. the Welcome card) */
47
+ background: var(--ab-flow-card, var(--ab-color-card, var(--ab-color-surface-container, transparent))); /* ๐Ÿƒ 0.2.3 (Welcome v5): the theme card (#fff ยท #fffcfa โ‰ฅ1920 ยท #241a12 dark); `--ab-flow-card` overrides it (e.g. the Welcome card) */
48
48
  --ab-flow-dot: var(--ab-dot-color, rgb(107 79 53 / 0.16)); /* ๐ŸŸค v6 grid (theme โ‰ฅ 0.3.7, else the mock value) */
49
49
  overflow: hidden; /* โœ‚๏ธ */
50
50
  color: var(--ab-color-on-surface, currentColor); /* ๐ŸŽจ */
@@ -159,7 +159,7 @@
159
159
  /* ๐Ÿง˜ reduced motion: handled by ab-nextjs-animations (wires drawn, pulses frozen at --ab-wire-poster) */
160
160
 
161
161
  /* ===================================================================================================== */
162
- /* ๐ŸŸค 0.2.3 dotted surface (Welcome v6 `.dots`): theme โ‰ฅ 0.3.7 --ab-dot-*, else John's values (light + dark) */
162
+ /* ๐ŸŸค 0.2.3 dotted surface (Welcome v6 `.dots`): theme โ‰ฅ 0.3.7 --ab-dot-*, else the values (light + dark) */
163
163
  :global(:is(.dark, [data-theme="dark"])) .root { --ab-flow-dot: var(--ab-dot-color, rgb(245 235 225 / 0.1)); } /* ๐ŸŒ™ */
164
164
  .root[data-ab-dotted='true']:not([data-ab-frame='true'])::before {
165
165
  content: "";
@@ -174,7 +174,7 @@
174
174
  .logo :is(img, svg) { height: 100%; width: auto; } /* ๐Ÿ…ฐ๏ธ */
175
175
 
176
176
  /* ===================================================================================================== */
177
- /* ๐Ÿ–ผ๏ธ 0.2.3 frame mode (Welcome v6): a fixed wร—h px stage (John's rects 1:1), scaled to the card width. */
177
+ /* ๐Ÿ–ผ๏ธ 0.2.3 frame mode (Welcome v6): a fixed wร—h px stage (the rects 1:1), scaled to the card width. */
178
178
  .framed {
179
179
  aspect-ratio: var(--ab-flow-ratio); /* ๐Ÿ“ e.g. 760 / 600 */
180
180
  flex: none; min-width: 0; /* ๐Ÿ“ a flex column (e.g. the aside scroller) must not squash the ratio */
@@ -118,7 +118,7 @@ export function warnAbIconMissing(name: string): void {
118
118
  }
119
119
 
120
120
  /**
121
- * ๐Ÿ†” 0.1.13 (Joseph): scopeAbIconIds โ€” suffix every `id` in the markup, plus the `url(#โ€ฆ)` / `href="#โ€ฆ"`
121
+ * ๐Ÿ†” 0.1.13: scopeAbIconIds โ€” suffix every `id` in the markup, plus the `url(#โ€ฆ)` / `href="#โ€ฆ"`
122
122
  * refs that point at it, so two filled Homes on one page (bottom bar + sidebar) never share a mask.
123
123
  * Same rules as ab-nextjs-icons 0.2.4 `scopeAbIconSvgIds` (copied: importing it is fine, but the client
124
124
  * bundle rule above says no icon-package imports here). `AbIcon` calls it with React `useId()`.
package/ab-icon/index.tsx CHANGED
@@ -56,7 +56,7 @@ import styles from './styles.module.css';
56
56
  // ๐Ÿ“ฆ helpers for consumers (registerAbIcons, types)
57
57
  export * from './helpers';
58
58
  export { AB_ICON_BUILTINS } from './builtin';
59
- export { AbIconRegistrar, type AbIconRegistrarProps } from './registrar'; // ๐Ÿ—‚๏ธ server-safe registration (Joseph #11)
59
+ export { AbIconRegistrar, type AbIconRegistrarProps } from './registrar'; // ๐Ÿ—‚๏ธ server-safe registration (#11)
60
60
 
61
61
  // ๐Ÿ—‚๏ธ register built-ins at module scope (same on server render + hydration โ†’ no mismatch)
62
62
  registerAbIcons(AB_ICON_BUILTINS);
@@ -79,7 +79,7 @@ export interface AbIconProps {
79
79
  const AbIcon = ({ name, variant, filled = false, weight, size, label, title, svg, className, style }: AbIconProps): ReactElement => {
80
80
  // ๐Ÿ” resolve markup without the full map
81
81
  const markup = pickAbIconMarkup(svg ?? getRegisteredAbIcon(name), variant ?? (filled ? 'filled' : 'outlined'));
82
- // ๐Ÿ†” one id per rendered instance (Joseph: a hidden twin's mask broke the active Home)
82
+ // ๐Ÿ†” one id per rendered instance (a hidden twin's mask broke the active Home)
83
83
  const uid = useId();
84
84
  // ๐ŸŽš๏ธ legacy `filled` โ†’ variant
85
85
  const v: AbIconVariant = variant ?? (filled ? 'filled' : 'outlined');
@@ -106,7 +106,7 @@ const AbIcon = ({ name, variant, filled = false, weight, size, label, title, svg
106
106
  );
107
107
  }
108
108
 
109
- // ๐Ÿ•ฐ๏ธ 0.1.13 (James review): NON-breaking fallback for unregistered names. A patch must not blank icons,
109
+ // ๐Ÿ•ฐ๏ธ 0.1.13 (review): NON-breaking fallback for unregistered names. A patch must not blank icons,
110
110
  // so an unknown name still renders the pre-G2 Material Symbols ligature (needs the app's font), and
111
111
  // warns once in development so the missing registration gets fixed before the app drops the font.
112
112
  warnAbIconMissing(name);
@@ -51,7 +51,7 @@ export interface AbIconRegistrarProps {
51
51
  }
52
52
 
53
53
  /**
54
- * ๐Ÿ—‚๏ธ AbIconRegistrar (0.1.13, Joseph #11): the SERVER-SAFE way to register icons.
54
+ * ๐Ÿ—‚๏ธ AbIconRegistrar (0.1.13, QA #11): the SERVER-SAFE way to register icons.
55
55
  * `registerAbIcons` is client-only state, so a Server Component (e.g. app/[locale]/layout.tsx) can't call it.
56
56
  * Render this once, ABOVE the icons, and pass the svg data as a prop (it is serializable):
57
57
  * import home from 'ab-nextjs-icons/ab-icons/icons/home';
@@ -49,7 +49,7 @@ import { forwardRef } from 'react';
49
49
  import clsx from 'clsx';
50
50
  // ๐ŸŽจ package-shipped CSS module
51
51
  import styles from './styles.module.css';
52
- // ๐Ÿ”ฃ 0.1.13 (G2, Joseph #6): the glyph is an AbIcon SVG, not the Material Symbols font
52
+ // ๐Ÿ”ฃ 0.1.13 (G2, QA #6): the glyph is an AbIcon SVG, not the Material Symbols font
53
53
  import AbIcon from '../ab-icon';
54
54
  import { AB_MOTION } from 'ab-nextjs-animations/motion'; // ๐ŸŽฌ transition class names (ab-nextjs-animations >= 0.2.4)
55
55
  import 'ab-nextjs-animations/motion/styles.css'; // ๐ŸŽจ .ab-motion-*
@@ -94,7 +94,7 @@
94
94
  align-items: center; /* โ†•๏ธ */
95
95
  gap: 0.5rem; /* ๐Ÿงฑ */
96
96
  min-width: 0; /* ๐Ÿšซ overflow */
97
- /* ๐Ÿ’ป 0.1.13 (Joseph #13): the command sits on the theme 0.3.4 code surface (dark in both themes) */
97
+ /* ๐Ÿ’ป 0.1.13 (#13): the command sits on the theme 0.3.4 code surface (dark in both themes) */
98
98
  padding: 0.375rem 0.375rem 0.375rem 0.75rem; /* ๐Ÿงฑ */
99
99
  border-radius: 0.625rem; /* ๐Ÿ”ฒ */
100
100
  background: var(--ab-color-code-surface, rgb(35 28 23)); /* ๐Ÿ’ป */
package/ab-link/index.tsx CHANGED
@@ -57,7 +57,7 @@ export type AbLinkProps = ComponentProps<typeof NextLink>;
57
57
 
58
58
  // ๐Ÿง  context: null = use next/link
59
59
  const AbLinkContext = createContext<AbLinkComponent | null>(null);
60
- // ๐ŸŒ 0.1.13 (Joseph #10): the app's locale codes, so active states can ignore the `/fr` prefix
60
+ // ๐ŸŒ 0.1.13 (#10): the app's locale codes, so active states can ignore the `/fr` prefix
61
61
  const AbLocalesContext = createContext<readonly string[]>([]);
62
62
 
63
63
 
@@ -66,7 +66,7 @@ export function useAbLocales(): readonly string[] {
66
66
  return useContext(AbLocalesContext); // ๐ŸŒ
67
67
  }
68
68
 
69
- /** ๐Ÿงฉ 0.1.13 (Joseph #9): the STRUCTURAL shape a provided link needs: an `href` (any type, e.g. next-intl's
69
+ /** ๐Ÿงฉ 0.1.13 (#9): the STRUCTURAL shape a provided link needs: an `href` (any type, e.g. next-intl's
70
70
  * `string | { pathname, query }`) and children. next/link, next-intl's Link, ab-nextjs-i18n's Link all fit. */
71
71
  export interface AbLinkLikeProps {
72
72
  href?: unknown; // ๐Ÿ”—
package/ab-link/locale.ts CHANGED
@@ -39,7 +39,7 @@
39
39
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
40
40
  */
41
41
 
42
- // ๐ŸŒ 0.1.13 (Joseph #10): no 'use client', so server twins can import it too
42
+ // ๐ŸŒ 0.1.13 (#10): no 'use client', so server twins can import it too
43
43
 
44
44
  /**
45
45
  * ๐ŸŒ stripAbLocalePrefix โ€” `/fr/docs/core` โ†’ `/docs/core` when `fr` is one of `locales`; `/fr` โ†’ `/`.
@@ -48,7 +48,7 @@
48
48
  --ab-list-ring: var(--ab-color-accent, #a67c52); /* โ™ฟ --accent */
49
49
  --ab-list-text: var(--ab-color-text, #211a16); /* ๐Ÿ–‹๏ธ */
50
50
  --ab-list-muted: var(--ab-color-muted, #6b5b50); /* ๐Ÿ–‹๏ธ */
51
- --ab-list-faint: var(--ab-color-faint, #807062); /* ๐Ÿ–‹๏ธ --faint โ™ฟ AA fallback (James) */
51
+ --ab-list-faint: var(--ab-color-faint, #807062); /* ๐Ÿ–‹๏ธ --faint โ™ฟ AA fallback */
52
52
  --ab-list-tile: var(--ab-color-card2, #fbf3ec); /* ๐Ÿ–ผ๏ธ --card2 */
53
53
  --ab-list-accent-text: var(--ab-color-accent-text, #8b6340); /* ๐Ÿ–‹๏ธ --accent-t */
54
54
  --ab-list-tint: var(--ab-color-tint, #f4e7db); /* ๐ŸŽจ --tint */
@@ -33,7 +33,7 @@
33
33
  * 1+|> const { switchLocale } = useAbLocaleSwitch() // ๐ŸŒ from ab-nextjs-i18n/navigation
34
34
  * -|> <AbLocaleSwitcher label={t('language')} current={locale} locales={[{ code: 'en', label: 'English' }, { code: 'fr', label: 'Franรงais' }]} onSelect={switchLocale} />
35
35
  *
36
- * ๐Ÿงฉ 0.1.15 inline, inside the mobile app drawer (John):
36
+ * ๐Ÿงฉ 0.1.15 inline, inside the mobile app drawer:
37
37
  * 2+|> // a) mixed drawer: nav + theme first, LANGUAGE last under a 1px rule
38
38
  * -|> <AbBottomDrawer open={open} onClose={close} title={t('menu')}>
39
39
  * -|> <AbDrawerList โ€ฆ />{themeRow}
@@ -94,15 +94,15 @@ export interface AbLocaleSwitcherProps {
94
94
  className?: string; // ๐Ÿท๏ธ
95
95
  style?: CSSProperties; // ๐ŸŽจ
96
96
  /** ๐Ÿ—„๏ธ 0.1.14 (G56, D40): `menu` (default) = popover menu; `drawer` = AbDrawerList; `auto` = drawer below 768px, menu above.
97
- * ๐Ÿงฉ 0.1.15 (God 00:08): `inline` = no trigger; a labelled list of rows rendered in place, e.g. inside the app drawer on mobile */
97
+ * ๐Ÿงฉ 0.1.15: `inline` = no trigger; a labelled list of rows rendered in place, e.g. inside the app drawer on mobile */
98
98
  presentation?: AbPresentation | 'inline';
99
- /** ๐Ÿท๏ธ 0.1.15 (John): inline only. Show the small uppercase group label (default true). Set false when the language
99
+ /** ๐Ÿท๏ธ 0.1.15: inline only. Show the small uppercase group label (default true). Set false when the language
100
100
  * list is the drawer's only content and the drawer title already says "Language" (the label stays the group's name) */
101
101
  showLabel?: boolean;
102
- /** โ™ฟ 0.1.15 (God 00:37): inline only. The group's accessible name. Default: `label` (e.g. "Language"), so a visible
102
+ /** โ™ฟ 0.1.15: inline only. The group's accessible name. Default: `label` (e.g. "Language"), so a visible
103
103
  * label and the name always agree; set it when the drawer needs a fuller name (e.g. "Choose a language") */
104
104
  ariaLabel?: string;
105
- /** โž– 0.1.15 (John): inline only. A 1px --div rule above the block, for when it follows nav / theme items (default false) */
105
+ /** โž– 0.1.15: inline only. A 1px --div rule above the block, for when it follows nav / theme items (default false) */
106
106
  divider?: boolean;
107
107
  drawerScope?: AbDrawerScope; // ๐Ÿ—บ๏ธ default 'app'
108
108
  drawerSide?: 'top' | 'bottom' | 'start' | 'end'; // ๐Ÿงญ default 'bottom'
@@ -123,7 +123,7 @@ export function getAbTypeaheadIndex(labels: readonly string[], from: number, cha
123
123
 
124
124
  /**
125
125
  * ๐Ÿงฉ 0.1.15: the inline list (no trigger, no popover), e.g. inside the mobile app drawer.
126
- * Its own component (James): AbLocaleSwitcher picks this OR the popover by type, so switching `presentation`
126
+ * Its own component: AbLocaleSwitcher picks this OR the popover by type, so switching `presentation`
127
127
  * at runtime remounts instead of changing the hook order. Links mark the active row with aria-current, buttons aria-pressed.
128
128
  */
129
129
  export function AbLocaleSwitcherInline(props: AbLocaleSwitcherProps) {
@@ -137,14 +137,14 @@
137
137
  .noJs { display: block; } /* ๐Ÿ‘๏ธ */
138
138
  }
139
139
 
140
- /* ===== ๐Ÿงฉ 0.1.15 (God 00:08): presentation="inline", the language list inside the mobile app drawer =====
140
+ /* ===== ๐Ÿงฉ 0.1.15: presentation="inline", the language list inside the mobile app drawer =====
141
141
  * Rows match AbDrawerList / the Home drawer: 48px, 12px padding, radius 8, --tint + --accent-text + 650 when active. */
142
142
  .inline { display: grid; gap: 4px; } /* ๐Ÿ“ */
143
143
  .inlineLabel { padding: 14px 12px 6px; font-size: 11px; font-weight: 700; line-height: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ab-color-faint, #807062); } /* ๐Ÿท๏ธ = sidebar group label */
144
- .inlineList { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; } /* ๐Ÿ“œ John: 8px between rows */
144
+ .inlineList { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; } /* ๐Ÿ“œ 8px between rows */
145
145
  .inlineList > li { display: block; margin: 0; padding: 0; line-height: 0; } /* ๐Ÿงน no inherited li spacing / line box: the row is the box */
146
146
  .inlineItem {
147
- display: flex; align-items: center; gap: 12px; box-sizing: border-box; inline-size: 100%; block-size: 48px; min-block-size: 44px; /* ๐Ÿ‘† John: exactly 48px (โ‰ฅ 44px hit area) */
147
+ display: flex; align-items: center; gap: 12px; box-sizing: border-box; inline-size: 100%; block-size: 48px; min-block-size: 44px; /* ๐Ÿ‘† exactly 48px (โ‰ฅ 44px hit area) */
148
148
  padding: 8px 12px; border: 0; border-radius: var(--ab-radius-row, 8px); background: none; /* ๐Ÿงน */
149
149
  font: inherit; font-size: 16px; line-height: 20px; text-align: start; color: var(--ab-color-text, #211a16); text-decoration: none; cursor: pointer; /* ๐Ÿ”ค */
150
150
  }
@@ -152,7 +152,7 @@
152
152
  .inlineItem[data-active='true'] { background: var(--ab-color-tint, #f4e7db); color: var(--ab-color-accent-text, #88603d); font-weight: 650; } /* ๐ŸŽฏ */
153
153
  .inlineItem:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: -2px; } /* โ™ฟ */
154
154
  .inlineText { flex: 1 1 auto; min-width: 0; } /* ๐Ÿท๏ธ */
155
- .inlineCheck { flex: none; display: inline-flex; inline-size: 18px; block-size: 18px; color: var(--ab-locale-check-color, var(--ab-color-btn, #8b6340)); } /* โœ“ John: bronze 2px stroke, 18px (James P2: the --ab-color-btn token) */
155
+ .inlineCheck { flex: none; display: inline-flex; inline-size: 18px; block-size: 18px; color: var(--ab-locale-check-color, var(--ab-color-btn, #8b6340)); } /* โœ“ bronze 2px stroke, 18px (P2: the --ab-color-btn token) */
156
156
  :global(.dark) .inlineCheck, :global([data-theme='dark']) .inlineCheck { color: var(--ab-locale-check-color, var(--ab-color-accent, #c29a6f)); } /* ๐ŸŒ™ the warm accent */
157
- /* โž– 0.1.15 (John): language goes LAST in a drawer with nav / theme items, under a 1px --div rule */
157
+ /* โž– 0.1.15: language goes LAST in a drawer with nav / theme items, under a 1px --div rule */
158
158
  .inline[data-divider='true'] { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ab-color-div, rgb(92 64 48 / 0.11)); }
@@ -33,7 +33,7 @@
33
33
  * 1+|> <AbAppLayout variant="panes" mobileHeader="main" content={<AbMainLayout
34
34
  * -|> mainHeader={<AbMobileHeader logo={<a href="/" id="home-logo">โ€ฆ</a>} onLanguage={openLanguage}
35
35
  * -|> theme={mode} onThemeChange={setMode} />} โ€ฆ />} />
36
- * 0.2.3 (Joseph, Welcome 0.2.21): a counter row under the bar + the 3-state theme cycle
36
+ * 0.2.3 (Welcome 0.2.21): a counter row under the bar + the 3-state theme cycle
37
37
  * 2+|> <AbMobileHeader logo={logo} themeMode={mode} onThemeModeChange={setMode}
38
38
  * -|> row={<AbCarouselCounter />} />
39
39
  *
@@ -86,8 +86,8 @@ export interface AbMobileHeaderProps {
86
86
  onLanguage?: () => void; // ๐ŸŒ the globe: open the Settings sheet with the language list in view
87
87
  theme?: 'light' | 'dark'; // ๐ŸŒ— the resolved theme now
88
88
  onThemeChange?: (next: 'light' | 'dark') => void; // ๐ŸŒ— the toggle (it shows the mode it switches TO: a moon in light)
89
- actions?: ReactNode; // โž• more 44px buttons after the two (none in John's frame)
90
- // ๐Ÿ”Ž 0.3.2 (Joseph, 0.2.23 gaps): a search pill (e.g. <AbSearchTrigger size="sm" />) placed after the globe and
89
+ actions?: ReactNode; // โž• more 44px buttons after the two (none in the frame)
90
+ // ๐Ÿ”Ž 0.3.2 (0.2.23 gaps): a search pill (e.g. <AbSearchTrigger size="sm" />) placed after the globe and
91
91
  // BEFORE the theme button
92
92
  search?: ReactNode;
93
93
  labels?: { language?: string; toDark?: string; toLight?: string; toSystem?: string; header?: string }; // ๐ŸŒ "Change language", "Switch to dark theme", "Switch to light theme", (0.2.3) "Use the system theme", "Main header"
@@ -112,9 +112,9 @@ export interface AbMobileHeaderProps {
112
112
  // is set, the summary opens the sheet instead (aria-controls / aria-expanded kept). Wins over `languageHref`
113
113
  languages?: readonly AbMobileHeaderLanguage[];
114
114
  // ๐Ÿ“ 0.2.3: 'compact' = a 48px bar with 18px start inset (the Welcome v6 mock: 48 + the counter row = 96px).
115
- // Default 'default' (56px, John's drawers v2 frame)
115
+ // Default 'default' (56px, the drawers v2 frame)
116
116
  size?: 'default' | 'compact';
117
- // ๐Ÿ“ฑ 0.2.3 (Joseph, Welcome 0.2.21): where the bar (logo ยท globe ยท theme) shows, from CSS only (no JS, SSR-safe):
117
+ // ๐Ÿ“ฑ 0.2.3 (Welcome 0.2.21): where the bar (logo ยท globe ยท theme) shows, from CSS only (no JS, SSR-safe):
118
118
  // 'auto' (default) = hidden from 768px up ONLY inside a core mainHeaderAt="all" layout (there the app header
119
119
  // already has the logo, so just the `row` stays), else everywhere; 'all' = always; 'mobile' = below 768px only
120
120
  barAt?: 'auto' | 'all' | 'mobile';
@@ -122,7 +122,7 @@ export interface AbMobileHeaderProps {
122
122
  }
123
123
 
124
124
  /**
125
- * ๐Ÿ“ฑ AbMobileHeader โ€” John's mobile main header (drawers v2): logo left; a globe ("Change language",
125
+ * ๐Ÿ“ฑ AbMobileHeader โ€” the mobile main header (drawers v2): logo left; a globe ("Change language",
126
126
  * `aria-haspopup="dialog"`) and a theme toggle right, each 44ร—44. No search (the bottom nav has a Search tab) and
127
127
  * no menu button (the left drawer opens with an edge swipe). Put it in AbMainLayout's `mainHeader` with core
128
128
  * โ‰ฅ 0.2.1 `mobileHeader="main"`: the 56px row, its divider and the hidden app header come from core.
@@ -55,8 +55,8 @@ import AbDrawer from '../ab-drawer';
55
55
  import AbIcon from '../ab-icon';
56
56
  // ๐Ÿ”— the app's link (AbLinkProvider: next/link, or a locale-aware one)
57
57
  import Link from '../ab-link';
58
- // ๐ŸŽฏ the same active rule as the laptop sidebar
59
- import { isAbSidebarActive } from '../ab-sidebar/view';
58
+ // ๐ŸŽฏ the same active rule as the laptop sidebar (0.5.0: shared helper, deepest match by default)
59
+ import { getAbActiveHrefs, normalizeAbHref, type AbActiveMatch } from '../ab-sidebar/active';
60
60
  // ๐ŸŽจ the drawers v2 kit
61
61
  import kit from '../ab-drawer/kit.module.css';
62
62
 
@@ -66,6 +66,7 @@ export interface AbNavDrawerItem {
66
66
  label: string; // ๐Ÿท๏ธ
67
67
  icon?: string; // ๐Ÿ”ฃ an AbIcons name
68
68
  meta?: string; // ๐Ÿท๏ธ trailing mono text, e.g. a version
69
+ exact?: boolean; // ๐ŸŽฏ 0.5.0: true = active on its own href only; false = allow parent matching under activeMatch="exact"
69
70
  }
70
71
  /** ๐Ÿ—‚๏ธ one group: an optional uppercase label (a heading for its list) + rows */
71
72
  export interface AbNavDrawerSection { id: string; label?: string; items: readonly AbNavDrawerItem[] }
@@ -78,7 +79,9 @@ export interface AbNavDrawerProps {
78
79
  version?: ReactNode; // ๐Ÿท๏ธ a string = the mono version chip ("v0.2.x โŒ„"); or your own picker node
79
80
  onVersionClick?: () => void; // ๐Ÿ”ฝ the chip as a button (e.g. open a version menu)
80
81
  sections: readonly AbNavDrawerSection[]; // ๐Ÿ—‚๏ธ same content as the laptop sidebar
81
- activeHref?: string; // ๐ŸŽฏ exact match or parent prefix ("/" only matches itself)
82
+ activeHref?: string; // ๐ŸŽฏ the current route (query, hash and a trailing slash are ignored; "/" only matches itself)
83
+ activeMatch?: AbActiveMatch; // ๐ŸŽฏ 0.5.0: 'best' (default, deepest match only), 'prefix' (every parent too) or 'exact'
84
+ locales?: readonly string[]; // ๐ŸŒ 0.5.0: stripped from `activeHref` first (`/fr/docs` โ†’ `/docs`)
82
85
  footer?: readonly AbNavDrawerItem[]; // ๐Ÿ“Œ pinned 48px rows (e.g. Changelog)
83
86
  onSettings?: () => void; // โš™๏ธ adds a "Settings โ€บ" row; close this drawer, then open the Settings sheet
84
87
  onNavigate?: (href: string) => void; // ๐Ÿ”” after a link is chosen (the drawer closes either way)
@@ -89,7 +92,7 @@ export interface AbNavDrawerProps {
89
92
  }
90
93
 
91
94
  /**
92
- * โฌ…๏ธ AbNavDrawer โ€” John's left drawer (drawers v2 ยง2): the mobile sidebar.
95
+ * โฌ…๏ธ AbNavDrawer โ€” the left drawer (drawers v2 ยง2): the mobile sidebar.
93
96
  *
94
97
  * - ๐Ÿ“ 320px, full height, 0 16 16 0 radius; header = logo + 44px โœ•; the version chip; a scrolling nav
95
98
  * (44px rows, uppercase group headings, a 72px fade); a pinned footer of 48px rows
@@ -99,11 +102,13 @@ export interface AbNavDrawerProps {
99
102
  * group label is a heading that labels its list
100
103
  * - ๐Ÿฅž tier 'nav': in front of the right drawer, under the bottom sheet
101
104
  */
102
- const AbNavDrawer = ({ open, onClose, logo, version, onVersionClick, sections, activeHref, footer = [], onSettings, onNavigate, labels = {}, returnFocus, id = 'ab-nav-drawer', className }: AbNavDrawerProps): ReactElement => {
105
+ const AbNavDrawer = ({ open, onClose, logo, version, onVersionClick, sections, activeHref, activeMatch, locales, footer = [], onSettings, onNavigate, labels = {}, returnFocus, id = 'ab-nav-drawer', className }: AbNavDrawerProps): ReactElement => {
103
106
  const L = { title: 'Site navigation', close: 'Close navigation', settings: 'Settings', version: 'Version', ...labels }; // ๐ŸŒ
104
107
  const choose = (href: string) => (e: MouseEvent) => { if (e.defaultPrevented) return; onNavigate?.(href); onClose(); }; // ๐Ÿ”— then close
108
+ // ๐Ÿฅ‡ 0.5.0: resolve the active href once, across sections + footer, so a parent never lights with its child
109
+ const activeSet = getAbActiveHrefs([...sections.flatMap((s) => s.items), ...footer], activeHref, { match: activeMatch, locales });
105
110
  const row = (it: AbNavDrawerItem, cls: string) => {
106
- const on = isAbSidebarActive(it.href, activeHref); // ๐ŸŽฏ
111
+ const on = activeSet.has(normalizeAbHref(it.href)); // ๐ŸŽฏ
107
112
  return (
108
113
  <Link href={it.href} className={cls} aria-current={on ? 'page' : undefined} onClick={choose(it.href)}>
109
114
  {it.icon && <AbIcon name={it.icon} filled={on} size={cls === kit.row ? 24 : 22} />}
@@ -48,7 +48,7 @@
48
48
  import type { ReactElement } from 'react';
49
49
  // ๐Ÿงญ route fallback
50
50
  import { usePathname } from 'next/navigation';
51
- // ๐ŸŒ 0.1.13 (Joseph #10): locale-stripped pathname
51
+ // ๐ŸŒ 0.1.13 (#10): locale-stripped pathname
52
52
  import { stripAbLocalePrefix, useAbLocales } from '../ab-link';
53
53
  // ๐Ÿ”ฃ client AbIcon
54
54
  import AbIcon from '../ab-icon';
@@ -59,7 +59,7 @@
59
59
  align-items: center; /* โ†”๏ธ */
60
60
  gap: 4px; /* โ†•๏ธ */
61
61
  min-width: 64px; /* ๐Ÿ‘† */
62
- min-height: 44px; /* ๐Ÿ‘† 0.3.2 (God, 0.2.23 gaps): a 44px tap target (WCAG 2.5.5), was ~42px with indicator="none" */
62
+ min-height: 44px; /* ๐Ÿ‘† 0.3.2 (0.2.23 gaps): a 44px tap target (WCAG 2.5.5), was ~42px with indicator="none" */
63
63
  justify-content: center; /* ๐ŸŽฏ 0.3.2: the pill + label stay centred in the taller target */
64
64
  box-sizing: border-box; /* ๐Ÿ“ฆ 0.3.2: the 44px counts the padding */
65
65
  border: 0; /* ๐Ÿšซ (buttons) */
@@ -62,7 +62,7 @@ export interface AbNavbarButtonItem {
62
62
  onSelect?: () => void; // ๐Ÿ””
63
63
  expanded?: boolean; // โ™ฟ aria-expanded for sheet toggles
64
64
  controls?: string; // โ™ฟ aria-controls
65
- disabled?: boolean; // ๐Ÿšซ 0.1.13 (Joseph #8, D24/D25): focusable, announced, inert (aria-disabled)
65
+ disabled?: boolean; // ๐Ÿšซ 0.1.13 (#8, D24/D25): focusable, announced, inert (aria-disabled)
66
66
  comingSoon?: boolean | string; // ๐Ÿšง 0.1.13: inert + a "Coming soon" tag (string = your translated label)
67
67
  }
68
68
 
@@ -64,7 +64,7 @@ export interface AbPackageCardProps {
64
64
  description?: ReactNode; // ๐Ÿ“
65
65
  version?: string; // ๐Ÿท๏ธ e.g. "0.1.7"
66
66
  icon?: ReactNode; // ๐Ÿ”ฃ e.g. <AbIcon name="webhook" />
67
- media?: ReactNode; // ๐Ÿ–ผ๏ธ 0.1.13 (Joseph #14): any media (logo, image); wins over `icon`
67
+ media?: ReactNode; // ๐Ÿ–ผ๏ธ 0.1.13 (#14): any media (logo, image); wins over `icon`
68
68
  id?: string; // ๐Ÿ†” 0.1.13: anchor target
69
69
  badge?: ReactNode; // ๐Ÿ”ด e.g. "New"
70
70
  tags?: string[]; // ๐Ÿท๏ธ e.g. ['client', 'server']
@@ -78,7 +78,7 @@ export interface AbPackageCardProps {
78
78
  }
79
79
 
80
80
  /**
81
- * ๐Ÿงฉ 0.1.13 (Joseph): `ab-nextjs-components` โ†’ `ab-` `nextjs-` `components` with a `<wbr>` after each
81
+ * ๐Ÿงฉ 0.1.13: `ab-nextjs-components` โ†’ `ab-` `nextjs-` `components` with a `<wbr>` after each
82
82
  * hyphen, so a narrow card wraps at a hyphen (never mid-word) instead of cutting the name off.
83
83
  */
84
84
  export function toAbPackageNameParts(name: string): ReactNode[] {
@@ -139,5 +139,5 @@ const AbPackageCardLegacy = ({ name, href, description, version, icon, media, id
139
139
  // ๐Ÿ“ฆ exports
140
140
  export default AbPackageCard;
141
141
  export { AbPackageCard };
142
- // ๐Ÿ–ผ๏ธ 0.2.1 (God 02:44): the Home preview tiles (mock .pv-anim / .pv-code / .pv-comp)
142
+ // ๐Ÿ–ผ๏ธ 0.2.1: the Home preview tiles (mock .pv-anim / .pv-code / .pv-comp)
143
143
  export { AbPackagePreviewCurve, AbPackagePreviewCode, AbPackagePreviewComponents, type AbPackagePreviewComponentsLabels, type AbPackagePreviewComponentsProps } from './previews';
@@ -24,7 +24,7 @@
24
24
  * SOFTWARE.
25
25
  *
26
26
  * @project: ab-nextjs-components
27
- * @name: AbPackageCard Home previews (0.2.1, God 02:44, mock .pv-*)
27
+ * @name: AbPackageCard Home previews (0.2.1, approved, mock .pv-*)
28
28
  * @file: ab-package-card/previews.tsx
29
29
  * @type: React Component (no hooks: client + server)
30
30
  * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
@@ -36,7 +36,7 @@
36
36
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
37
  */
38
38
 
39
- .abPackageCardName { font-family: var(--ab-font-code, var(--ab-font-mono, ui-monospace, monospace)); font-size: 16px; overflow-wrap: anywhere; word-break: normal; hyphens: none; display: block; min-width: 0; max-width: 100%; } /* ๐Ÿ“ฆ 0.1.13 (Joseph): wraps at the <wbr> after a hyphen first (ab-nextjs-/components); `anywhere` only splits a part that alone is wider than a very narrow card (animations at ~70px), so it never overflows */
39
+ .abPackageCardName { font-family: var(--ab-font-code, var(--ab-font-mono, ui-monospace, monospace)); font-size: 16px; overflow-wrap: anywhere; word-break: normal; hyphens: none; display: block; min-width: 0; max-width: 100%; } /* ๐Ÿ“ฆ 0.1.13: wraps at the <wbr> after a hyphen first (ab-nextjs-/components); `anywhere` only splits a part that alone is wider than a very narrow card (animations at ~70px), so it never overflows */
40
40
  .abPackageCardVersion { font-family: var(--ab-font-code, var(--ab-font-mono, ui-monospace, monospace)); opacity: 0.8; } /* ๐Ÿท๏ธ */
41
41
  .abPackageCardTag { padding: 0 8px; border-radius: 999px; line-height: 20px; background: var(--ab-color-surface-container-high, rgb(0 0 0 / 0.06)); } /* ๐Ÿท๏ธ */
42
42
 
@@ -80,7 +80,7 @@
80
80
  }
81
81
  @media (prefers-reduced-motion: reduce) { .home:hover { transform: none; } } /* โ™ฟ no lift */
82
82
 
83
- /* ===== ๐Ÿ–ผ๏ธ 0.2.1 (God 02:44): Home preview tiles, John's mock `.pv-*` (theme tokens, fallbacks = the mock) ===== */
83
+ /* ===== ๐Ÿ–ผ๏ธ 0.2.1: Home preview tiles, the mock `.pv-*` (theme tokens, fallbacks = the mock) ===== */
84
84
  .homePreview > * { flex: none; } /* ๐Ÿšซ no child stretches; the tile centres them both ways */
85
85
  /* ใ€ฐ๏ธ Animations */
86
86
  .pvAnim { position: relative; display: block; box-sizing: border-box; width: 100%; height: 100%; padding: 6px 10px; } /* ๐Ÿ“ */
@@ -37,7 +37,7 @@
37
37
  */
38
38
 
39
39
  /* ===== AB PLAYGROUND SCENE ยท I18N (illustration 8) ===== */
40
- /* ๐ŸŽฌ 0.2.3 (God 02:26): NO motion here any more. The EN โ†’ FR โ†’ ES โ†’ RU cycle (keyframes, ease-out-cubic rise,
40
+ /* ๐ŸŽฌ 0.2.3: NO motion here any more. The EN โ†’ FR โ†’ ES โ†’ RU cycle (keyframes, ease-out-cubic rise,
41
41
  instant chip jumps, the [data-ab-still] frame, pause + reduced motion) ships from ab-nextjs-animations โ‰ฅ 0.2.5
42
42
  (`ab-nextjs-animations/locale-cycle`). This module only lays the pieces out. */
43
43
 
@@ -39,7 +39,7 @@
39
39
  // โš›๏ธ types
40
40
  import type { ReactElement } from 'react';
41
41
 
42
- // ๐Ÿ–ผ๏ธ John's tiny line icons (welcome-v6 scenes.py `MS` + v5 common.py package icons), decorative only
42
+ // ๐Ÿ–ผ๏ธ the tiny line icons (welcome-v6 scenes.py `MS` + v5 common.py package icons), decorative only
43
43
  const MS: Record<string, ReactElement> = {
44
44
  home: <path d="M4 11 12 4l8 7v9h-5v-6H9v6H4z" />,
45
45
  search: <><circle cx="11" cy="11" r="6" /><path d="m20 20-4.5-4.5" /></>,