ab-nextjs-components 0.3.0 โ†’ 0.3.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.
package/README.md CHANGED
@@ -96,6 +96,20 @@ New subpaths for the docs / PWA shell. All links go through **`AbLinkProvider`**
96
96
  registerAbIcons({ code })
97
97
  ```
98
98
 
99
+ ### 404 gaps (unreleased) ๐Ÿšง
100
+
101
+ * **`<AbErrorHero>`** (`ab-nextjs-components/ab-error-hero`, also in the barrel): the 404 / error hero from the 404 mocks. A big gradient `code` (default `"404"`) over a faded dot grid, a tilted `badge` tile (default `<AbIcon name="link_off" />`, needs ab-nextjs-icons ^0.2.6 and `registerAbIcons({ link_off })`; pass `badge={null}` to hide it), the `title` (h1, the code is read once), `message`, an optional `hint` row and an `actions` slot. Server-safe, no motion.
102
+ ```tsx
103
+ <AbErrorHero badge={<AbIcon name="link_off" />} title="Page not found" message="This page moved or never existed."
104
+ hint={<AbChip mono>/docs/packages/button</AbChip>}
105
+ actions={<><AbSearchTrigger size="lg" onOpen={open} /><AbButton type="filled" label="Back to home" href="/" /></>} />
106
+ ```
107
+ * **`<AbButton href>`** now renders through `AbLinkProvider`'s link (client and server twins), so links get the locale prefix.
108
+ * **`<AbCard>`**: `iconTile` (a leading icon in a tinted square), `arrow` (a decorative trailing arrow) and `boldTitle`.
109
+ * **`<AbSearchTrigger size="lg">`**: the 44px, up-to-440px search field of the 404 page.
110
+ * **`<AbToc variant="links">`**: a plain link list ("Popular pages"); items take `href`, `description` and `icon`, and links go through `AbLinkProvider`.
111
+ * **`<AbChip overflow>`**: `'ellipsis'` (default, adds the full text as `title`) or `'wrap'`.
112
+
99
113
  ### Home fidelity (0.1.14, unreleased) ๐Ÿ 
100
114
 
101
115
  These match the approved Home mocks (`home-fidelity-spec.md` ยง4/ยง5). Colours come from the `ab-nextjs-theme` โ‰ฅ 0.3.5 Home tokens, with the light mock values as fallbacks. Each component also has its own `--ab-list-*` / `--ab-crumbs-*` / `--ab-version-*` / `--ab-bottom-drawer-*` knobs.
@@ -43,7 +43,9 @@
43
43
 
44
44
  // โš›๏ธ React types + forwardRef
45
45
  import type { CSSProperties, KeyboardEvent, MouseEvent, ReactNode, Ref } from 'react';
46
- import { forwardRef } from 'react';
46
+ import { createElement, forwardRef } from 'react';
47
+ // ๐Ÿ”Œ 404 gaps: the link in effect (AbLinkProvider's, e.g. the i18n Link, or next/link) โ†’ locale prefix โœ…
48
+ import { useAbLink } from '../ab-link';
47
49
  // ๐Ÿงต class joiner
48
50
  import clsx from 'clsx';
49
51
  // ๐ŸŽจ styles
@@ -148,6 +150,8 @@ const AbButton = forwardRef<HTMLButtonElement | HTMLAnchorElement, AbButtonProps
148
150
  const srReason = getAbButtonSrReason({ disabled, isLoading, disabledReason });
149
151
  // ๐Ÿšซ any kind of blocked?
150
152
  const blocked = mode !== 'none';
153
+ // ๐Ÿ”Œ 404 gaps: link mode goes through AbLinkProvider (hooks run unconditionally, rules-of-hooks โœ…)
154
+ const Link = useAbLink();
151
155
 
152
156
  // ๐Ÿท๏ธ classes: pointer-events:none only for native mode (aria mode must stay focusable/hoverable)
153
157
  const classNames = clsx(
@@ -230,9 +234,12 @@ const AbButton = forwardRef<HTMLButtonElement | HTMLAnchorElement, AbButtonProps
230
234
  }
231
235
  // โœ… live link (no role=button: it navigates, so it is a link)
232
236
  return (
233
- <a ref={ref as Ref<HTMLAnchorElement>} id={id} href={href} className={classNames} style={style} hidden={hidden} onClick={guardClick} {...dataAttrs}>
234
- {content}
235
- </a>
237
+ // ๐Ÿ”Œ 404 gaps: the provided Link (locale-aware) instead of a bare <a>, so `/docs` โ†’ `/fr/docs` ๐ŸŒ
238
+ createElement(
239
+ Link, // ๐Ÿ”— AbLinkProvider's component (default next/link)
240
+ { ref: ref as Ref<HTMLAnchorElement>, id, href, className: classNames, style, hidden, onClick: guardClick, ...dataAttrs }, // ๐Ÿงพ same attrs as before
241
+ content, // ๐Ÿงฑ label, icons, badge
242
+ )
236
243
  );
237
244
  }
238
245
 
package/ab-card/index.tsx CHANGED
@@ -45,6 +45,8 @@ import type { ComponentType, ReactElement, ReactNode } from 'react';
45
45
  import clsx from 'clsx';
46
46
  // ๐Ÿ”— G42 link
47
47
  import Link from '../ab-link';
48
+ // ๐Ÿ”ฃ 404 gaps: the trailing arrow glyph
49
+ import AbIcon from '../ab-icon';
48
50
  // ๐ŸŽฌ hover colours + transform timing from the package (reduced motion โ†’ no transition)
49
51
  import 'ab-nextjs-animations/motion/styles.css';
50
52
  // ๐ŸŽจ styles
@@ -62,20 +64,26 @@ export interface AbCardProps {
62
64
  className?: string; // ๐Ÿท๏ธ
63
65
  as?: 'article' | 'div' | 'li'; // ๐Ÿงฑ default article
64
66
  id?: string; // ๐Ÿ†” 0.1.13: e.g. an in-page anchor target
67
+ // ===== 404 gaps (additive) =====
68
+ iconTile?: ReactNode; // ๐ŸŸซ NEW: a leading icon in a tinted square (e.g. <AbIcon name="rocket_launch" />)
69
+ arrow?: boolean; // โžก๏ธ NEW: a decorative trailing arrow, top-right (the 404 "Suggested" cards)
70
+ boldTitle?: boolean; // ๐Ÿ…ฑ๏ธ NEW: a bolder (700) title
65
71
  }
66
72
 
67
73
  /**
68
74
  * ๐Ÿƒ AbCard (G45): ONE link (the title) stretched over the card, so screen readers hear one link, not a
69
75
  * nested block of them. Hover lift is 2px, laptop and up only, and none under prefers-reduced-motion.
70
76
  */
71
- const AbCard = ({ title, href, description, eyebrow, media, footer, headingLevel = 3, className, as = 'article', id }: AbCardProps): ReactElement => {
77
+ const AbCard = ({ title, href, description, eyebrow, media, footer, headingLevel = 3, className, as = 'article', id, iconTile, arrow = false, boldTitle = false }: AbCardProps): ReactElement => {
72
78
  const H = `h${headingLevel}` as unknown as ComponentType<{ className?: string; children?: ReactNode }>; // โ™ฟ
73
79
  const Root = as as unknown as ComponentType<Record<string, unknown>>; // ๐Ÿงฑ
74
80
  return (
75
- <Root id={id} className={clsx('AbCard', styles.abCard, 'ab-motion-interactive', className)} data-ab-part="card" data-linked={href ? 'true' : 'false'}>
81
+ <Root id={id} className={clsx('AbCard', styles.abCard, 'ab-motion-interactive', className)} data-ab-part="card" data-linked={href ? 'true' : 'false'} data-arrow={arrow ? 'true' : undefined /* โžก๏ธ room for the arrow */}>
82
+ {iconTile && <span className={styles.abCardIconTile} data-ab-part="icon-tile" aria-hidden="true">{iconTile}</span> /* ๐ŸŸซ decorative tile */}
83
+ {arrow && <AbIcon name="arrow_forward" size={17} className={styles.abCardArrow} /> /* โžก๏ธ decorative (AbIcon is aria-hidden) */}
76
84
  {media && <div className={styles.abCardMedia} aria-hidden="true">{media}</div>}
77
85
  {eyebrow && <p className={styles.abCardEyebrow}>{eyebrow}</p>}
78
- <H className={styles.abCardTitle}>
86
+ <H className={clsx(styles.abCardTitle, boldTitle && styles.abCardTitleBold /* ๐Ÿ…ฑ๏ธ */)}>
79
87
  {href ? <Link href={href} className={styles.abCardLink}>{title}</Link> : title}
80
88
  </H>
81
89
  {description && <p className={styles.abCardDescription}>{description}</p>}
@@ -66,3 +66,23 @@
66
66
  @media (min-width: 1024px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
67
67
  .abCard[data-linked='true']:hover { transform: translateY(-2px); } /* ๐ŸŽˆ */
68
68
  }
69
+
70
+ /* ===== 404 gaps (additive) ===== */
71
+ /* ๐ŸŸซ leading icon tile: icon in a tinted square (mock .pkg-ic) */
72
+ .abCardIconTile {
73
+ display: inline-flex; /* ๐Ÿ“ */
74
+ align-items: center; /* โ†•๏ธ */
75
+ justify-content: center; /* โ†”๏ธ */
76
+ width: 34px; /* ๐Ÿ“ */
77
+ height: 34px; /* ๐Ÿ“ */
78
+ border-radius: 9px; /* ๐Ÿ”ท */
79
+ background: var(--ab-color-tint, rgb(166 124 82 / 0.14)); /* ๐ŸŽจ tint (mock .pkg-ic) */
80
+ color: var(--ab-color-accent-text, var(--ab-color-primary, inherit)); /* ๐Ÿ–‹๏ธ accent glyph */
81
+ flex: none; /* ๐Ÿšซ no shrink */
82
+ }
83
+ /* โžก๏ธ trailing arrow, top-right (mock .sg-go) */
84
+ .abCardArrow { position: absolute; top: 14px; right: 12px; color: var(--ab-color-on-surface-variant, inherit); opacity: 0.7; } /* โžก๏ธ */
85
+ .abCard[data-arrow='true'] .abCardTitle, .abCard[data-arrow='true'] .abCardDescription { padding-right: 22px; } /* ๐Ÿงฑ keep text off the arrow */
86
+ /* ๐Ÿ…ฑ๏ธ bold title */
87
+ .abCardTitleBold { font-weight: 700; } /* ๐Ÿ…ฑ๏ธ */
88
+
package/ab-chip/index.tsx CHANGED
@@ -63,11 +63,16 @@ export interface AbChipProps {
63
63
  shape?: 'pill' | 'rounded'; // ๐Ÿ”ท 0.1.14: 'rounded' = 6px radius (default pill)
64
64
  mono?: boolean; // โŒจ๏ธ 0.1.14: Roboto Mono 11/600 (versions, package names)
65
65
  tone?: AbChipTone; // ๐ŸŽจ 0.1.14 (default 'neutral' = the legacy outline chip)
66
+ // ===== 404 gaps: long text =====
67
+ overflow?: 'ellipsis' | 'wrap'; // โœ‚๏ธ NEW: 'ellipsis' (default) clips to the parent width with "โ€ฆ"; 'wrap' breaks onto lines
68
+ title?: string; // ๐Ÿ’ฌ NEW: tooltip; defaults to the text itself when `children` is a string (so clipped text stays readable)
66
69
  }
67
70
 
68
71
  /** ๐Ÿท๏ธ Static chip: plain text, never interactive (use AbButton for actions). */
69
- export function AbChip({ children, dot, icon, as: Tag = 'span', className, style, size = 'md', shape = 'pill', mono = false, tone = 'neutral' }: AbChipProps): ReactElement {
72
+ export function AbChip({ children, dot, icon, as: Tag = 'span', className, style, size = 'md', shape = 'pill', mono = false, tone = 'neutral', overflow = 'ellipsis', title }: AbChipProps): ReactElement {
70
73
  const dotTone = dot === true ? 'bronze' : dot || undefined; // ๐ŸŽจ resolve dot colour
74
+ // ๐Ÿ’ฌ 404 gaps: full text as a tooltip while ellipsing (only when we know it: a plain string/number child)
75
+ const tip = title ?? (overflow === 'ellipsis' && (typeof children === 'string' || typeof children === 'number') ? String(children) : undefined);
71
76
  return (
72
77
  <Tag
73
78
  className={clsx('AbChip', styles.chip, mono && styles.mono, className)} style={style} data-ab-part="chip"
@@ -75,10 +80,12 @@ export function AbChip({ children, dot, icon, as: Tag = 'span', className, style
75
80
  data-shape={shape === 'rounded' ? 'rounded' : undefined} // ๐Ÿ”ท
76
81
  data-tone={tone === 'neutral' ? undefined : tone} // ๐ŸŽจ
77
82
  data-mono={mono ? 'true' : undefined} // โŒจ๏ธ
83
+ data-overflow={overflow} // โœ‚๏ธ 404 gaps: ellipsis | wrap
84
+ title={tip} // ๐Ÿ’ฌ 404 gaps: the full text on hover
78
85
  >
79
86
  {dotTone ? <span className={styles.dot} data-tone={dotTone} aria-hidden="true" /> : null /* ๐ŸŸข decorative */}
80
87
  {icon ? <span className={styles.icon} aria-hidden="true">{icon}</span> : null /* ๐Ÿ–ผ๏ธ decorative */}
81
- <span>{children}</span>
88
+ <span className={styles.text}>{children}</span>{/* โœ‚๏ธ 404 gaps: the part that ellipses / wraps */}
82
89
  </Tag>
83
90
  );
84
91
  }
@@ -96,3 +96,12 @@
96
96
  .chip[data-mono='true'] { font-family: var(--ab-font-code, 'Roboto Mono', ui-monospace, monospace); } /* โŒจ๏ธ */
97
97
  .chip[data-tone='accent'] { background: var(--ab-color-tint, #f4e7db); color: var(--ab-color-accent-text, #88603d); border-color: transparent; } /* ๐Ÿฅ‰ */
98
98
  .chip[data-tone='sage'] { background: rgb(119 141 121 / 0.12); color: var(--ab-color-sage-accent, #566a58); border-color: transparent; } /* ๐ŸŒฟ beta โ™ฟ AA (John): fallback = theme 0.3.5 light value */
99
+
100
+ /* ===== โœ‚๏ธ 404 gaps: long text (overflow="ellipsis" default ยท "wrap") ===== */
101
+ .chip { max-width: 100%; box-sizing: border-box; } /* ๐Ÿ“ never wider than the parent */
102
+ .text { min-width: 0; } /* ๐Ÿ“ lets the flex child shrink */
103
+ .chip[data-overflow='ellipsis'] .text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* โœ‚๏ธ "โ€ฆ" */
104
+ .chip[data-overflow='wrap'] { white-space: normal; } /* โ†ฉ๏ธ */
105
+ .chip[data-overflow='wrap'] .text { overflow-wrap: anywhere; } /* โ†ฉ๏ธ long paths like /docs/packages/button break too */
106
+ .chip[data-overflow='wrap'][data-size='sm'] { height: auto; min-height: var(--ab-chip-height, 20px); padding-block: 3px; line-height: 1.3; } /* ๐Ÿ“ grow with lines */
107
+
@@ -0,0 +1,99 @@
1
+ /*
2
+ * @license MIT
3
+ * ~~~~~~~~~~~~
4
+ * ab-nextjs-components
5
+ * ~~~~~~~~~~~~
6
+ * Copyright (c) 2026 Abraham Ukachi. The abElements Project.
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the 'Software'), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ *
26
+ * @project: ab-nextjs-components
27
+ * @name: AbErrorHero - Server-safe (404 gaps)
28
+ * @file: ab-error-hero/index.tsx
29
+ * @type: Component (server-safe, no hooks) โ€” the 404 / error hero: big code + badge tile, title, message, hint, actions
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ *
32
+ * Example usage:
33
+ * 1+|> <AbErrorHero code="404" badge={<AbIcon name="link_off" />} title="Page not found" message="This page moved or never existed." actions={<AbButton label="Back to home" href="/" />} />
34
+ */
35
+
36
+ /*
37
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
38
+ * MOTTO: We'll always do more ๐Ÿ˜œ!!!
39
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
40
+ */
41
+
42
+ // โš›๏ธ React types
43
+ import type { ComponentType, ReactElement, ReactNode } from 'react';
44
+ // ๐Ÿงต classes
45
+ import clsx from 'clsx';
46
+ // ๐Ÿ”ฃ the default badge glyph (link_off, ab-nextjs-icons ^0.2.6, as in the mock)
47
+ import AbIcon from '../ab-icon';
48
+ // ๐ŸŽจ styles (static only: NO motion here, all motion lives in ab-nextjs-animations)
49
+ import styles from './styles.module.css';
50
+
51
+ /** โš™๏ธ props */
52
+ export interface AbErrorHeroProps {
53
+ code?: ReactNode; // ๐Ÿ”ข the big number / word, e.g. "404" (default), "500", "Oops"
54
+ badge?: ReactNode; // ๐ŸŸซ a small tilted tile pinned to the code, default <AbIcon name="link_off" /> (the mock); pass null to hide (decorative)
55
+ title: ReactNode; // ๐Ÿท๏ธ the h1, e.g. "Page not found"
56
+ message?: ReactNode; // ๐Ÿ“ the lede under the title
57
+ hint?: ReactNode; // ๐Ÿ’ก an optional row under the message, e.g. the bad path + "Did you mean โ€ฆ" (an AbChip)
58
+ actions?: ReactNode; // ๐Ÿ”˜ the actions slot: search trigger, buttons, โ€ฆ (rendered as-is, in order)
59
+ children?: ReactNode; // ๐Ÿงฉ anything below the actions (e.g. "Suggested" cards)
60
+ headingLevel?: 1 | 2; // โ™ฟ default 1 (it IS the page title on a 404); 2 when nested in a page
61
+ grid?: boolean; // โ ฟ the dotted backdrop behind the code (default true)
62
+ id?: string; // ๐Ÿ†” root id
63
+ className?: string; // ๐Ÿท๏ธ
64
+ }
65
+
66
+ /**
67
+ * ๐Ÿšง AbErrorHero: the hero of a 404 / error page (mock ai-mocks/404): a huge gradient code ("404") over a
68
+ * faded dot grid, a tilted badge tile (e.g. link_off), a title, a message, an optional hint and an actions slot.
69
+ * The code is decorative (aria-hidden) and announced once via a visually hidden prefix on the title.
70
+ * No hooks, no state, no motion: renders on the server.
71
+ */
72
+ const AbErrorHero = ({ code = '404', badge = <AbIcon name="link_off" /> /* ๐Ÿ”—๐Ÿšซ mock default */, title, message, hint, actions, children, headingLevel = 1, grid = true, id, className }: AbErrorHeroProps): ReactElement => {
73
+ const H = `h${headingLevel}` as unknown as ComponentType<{ className?: string; children?: ReactNode }>; // โ™ฟ h1 / h2
74
+ return (
75
+ <section id={id} className={clsx('AbErrorHero', styles.abErrorHero, className)} data-ab-part="error-hero">
76
+ {/* ๐ŸŽจ the art: dot grid + big code + badge tile (all decorative) */}
77
+ <div className={styles.abErrorHeroArt} aria-hidden="true">
78
+ {grid && <span className={styles.abErrorHeroGrid} data-ab-part="error-grid" /> /* โ ฟ faded dots */}
79
+ <span className={styles.abErrorHeroCode} data-ab-part="error-code">
80
+ {code /* ๐Ÿ”ข gradient text */}
81
+ {badge != null && <span className={styles.abErrorHeroBadge} data-ab-part="error-badge">{badge}</span> /* ๐ŸŸซ tilted tile */}
82
+ </span>
83
+ </div>
84
+ {/* ๐Ÿท๏ธ title: the code is read once here (visually hidden), then the words */}
85
+ <H className={styles.abErrorHeroTitle}>
86
+ {typeof code === 'string' || typeof code === 'number' ? <span className={styles.abErrorHeroSrOnly}>{code}: </span> : null /* ๐Ÿ—ฃ๏ธ "404: Page not found" */}
87
+ {title}
88
+ </H>
89
+ {message != null && <p className={styles.abErrorHeroMessage}>{message}</p> /* ๐Ÿ“ lede */}
90
+ {hint != null && <div className={styles.abErrorHeroHint} data-ab-part="error-hint">{hint}</div> /* ๐Ÿ’ก */}
91
+ {actions != null && <div className={styles.abErrorHeroActions} data-ab-part="error-actions">{actions}</div> /* ๐Ÿ”˜ */}
92
+ {children /* ๐Ÿงฉ */}
93
+ </section>
94
+ );
95
+ };
96
+
97
+ // ๐Ÿ“ฆ exports
98
+ export default AbErrorHero;
99
+ export { AbErrorHero };
@@ -0,0 +1,86 @@
1
+ /*
2
+ * @license MIT
3
+ * ~~~~~~~~~~~~
4
+ * ab-nextjs-components
5
+ * ~~~~~~~~~~~~
6
+ * Copyright (c) 2026 Abraham Ukachi. The abElements Project.
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the 'Software'), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ *
26
+ * @project: ab-nextjs-components
27
+ * @name: AbErrorHero - Styles (404 gaps)
28
+ * @file: ab-error-hero/styles.module.css
29
+ * @type: CSS Module
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ */
32
+
33
+ /*
34
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
+ * MOTTO: We'll always do more ๐Ÿ˜œ!!!
36
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
+ */
38
+
39
+ /* ๐Ÿšง hero column (mock .e404) โ€” static layout only, no transitions/animations (motion = ab-nextjs-animations) */
40
+ .abErrorHero { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; } /* ๐Ÿ“ */
41
+ /* ๐ŸŽจ the art box (mock .e-art: 520ร—190, mobile 100%ร—132) */
42
+ .abErrorHeroArt { position: relative; width: min(520px, 100%); height: 190px; display: flex; align-items: center; justify-content: center; } /* ๐Ÿ“ฆ */
43
+ /* โ ฟ dot grid, faded at the edges (mock .e-grid) */
44
+ .abErrorHeroGrid {
45
+ position: absolute; inset: -10px -40px; pointer-events: none; /* ๐Ÿ“ behind the code */
46
+ background-image: radial-gradient(circle, color-mix(in srgb, var(--ab-color-accent, #a67c52) 32%, transparent) 1.1px, transparent 1.4px); /* โ ฟ */
47
+ background-size: 18px 18px; /* ๐Ÿ“ grid step */
48
+ mask-image: radial-gradient(ellipse at center, #000 18%, transparent 68%); /* ๐ŸŒซ๏ธ fade out */
49
+ }
50
+ /* ๐Ÿ”ข the big gradient code (mock .e-num) */
51
+ .abErrorHeroCode {
52
+ position: relative; display: inline-flex; /* ๐Ÿ“ badge anchor */
53
+ font-size: 176px; line-height: 1; font-weight: 820; letter-spacing: -0.06em; /* ๐Ÿ”ค */
54
+ font-family: var(--ab-font-sans, Geist, ui-sans-serif, system-ui, sans-serif); /* ๐Ÿ”ค */
55
+ background: linear-gradient(180deg, var(--ab-color-error-code-top, #b88c60) 0%, var(--ab-color-accent, #a67c52) 55%, var(--ab-color-error-code-bottom, #8b6340) 100%); /* ๐Ÿฅ‰ bronze */
56
+ background-clip: text; color: transparent; /* ๐Ÿ–Œ๏ธ gradient text */
57
+ }
58
+ /* ๐ŸŸซ tilted badge tile (mock .e-badge: 46px, radius 14, rotate 8deg โ€” a static pose, not motion) */
59
+ .abErrorHeroBadge {
60
+ position: absolute; right: 8%; top: 12%; /* ๐Ÿ“ on the last digit */
61
+ width: 46px; height: 46px; border-radius: 14px; box-sizing: border-box; /* ๐Ÿ“ */
62
+ display: flex; align-items: center; justify-content: center; /* ๐Ÿ“ */
63
+ background: var(--ab-color-card, #fff); border: 1px solid var(--ab-color-border, rgb(92 64 48 / 0.13)); /* ๐ŸŽจ */
64
+ color: var(--ab-color-accent-text, #88603d); box-shadow: 0 8px 22px rgb(92 64 48 / 0.16); /* ๐ŸŽจ ๐ŸŒ— */
65
+ transform: rotate(8deg); /* ๐Ÿ“ static tilt */
66
+ }
67
+ .abErrorHeroBadge svg { width: 24px; height: 24px; } /* ๐Ÿ”ฃ */
68
+ /* ๐Ÿท๏ธ title ยท ๐Ÿ“ message (mock h1 34px / lede 15.5px) */
69
+ .abErrorHeroTitle { margin: 10px 0 0; font-size: 34px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; color: var(--ab-color-text, inherit); } /* ๐Ÿท๏ธ */
70
+ .abErrorHeroMessage { margin: 10px 0 0; max-width: 460px; font-size: 15.5px; line-height: 1.55; color: var(--ab-color-muted, inherit); } /* ๐Ÿ“ */
71
+ .abErrorHeroHint { margin-top: 14px; max-width: 100%; display: flex; justify-content: center; } /* ๐Ÿ’ก */
72
+ /* ๐Ÿ”˜ actions: search on its own row, buttons side by side (mock .e-search + .e-ctas) */
73
+ .abErrorHeroActions { margin-top: 22px; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 10px; } /* ๐Ÿ”˜ */
74
+ .abErrorHeroActions > .AbSearchTrigger, .abErrorHeroActions > [data-ab-part='search-trigger'] { flex-basis: 100%; max-width: 440px; margin-inline: calc((100% - min(440px, 100%)) / 2); } /* ๐Ÿ” full row */
75
+ /* ๐Ÿ™ˆ visually hidden */
76
+ .abErrorHeroSrOnly { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } /* ๐Ÿ™ˆ */
77
+ /* ๐Ÿ“ฑ mobile (mock .M: code 120px, art 132px, badge 38px) */
78
+ @media (max-width: 767px) {
79
+ .abErrorHeroArt { height: 132px; } /* ๐Ÿ“ */
80
+ .abErrorHeroCode { font-size: 120px; } /* ๐Ÿ”ข */
81
+ .abErrorHeroBadge { width: 38px; height: 38px; border-radius: 12px; } /* ๐ŸŸซ */
82
+ .abErrorHeroBadge svg { width: 20px; height: 20px; } /* ๐Ÿ”ฃ */
83
+ .abErrorHeroTitle { margin-top: 4px; font-size: 27px; } /* ๐Ÿท๏ธ */
84
+ .abErrorHeroMessage { margin-top: 6px; font-size: 14.5px; } /* ๐Ÿ“ */
85
+ .abErrorHeroActions { margin-top: 16px; } /* ๐Ÿ”˜ */
86
+ }
@@ -67,7 +67,8 @@ export interface AbSearchTriggerProps {
67
67
  /** ๐Ÿ“ฑ 0.1.15 (God 00:08): a shorter label (e.g. "Search") that a compact AbAppBar shows below 768px instead of `label`
68
68
  * (CSS picks; only one is ever displayed, so the accessible name stays single). Home field only. */
69
69
  compactLabel?: string;
70
- size?: 'md' | 'sm'; // ๐Ÿ“ฑ 0.1.14 (P6): 'sm' = the mobile 34px "Search โŒ˜K" pill (label + key cap stay visible)
70
+ size?: 'md' | 'sm' | 'lg'; // ๐Ÿ“ฑ 0.1.14 (P6): 'sm' = the mobile 34px "Search โŒ˜K" pill (label + key cap stay visible)
71
+ // ๐Ÿ” 404 gaps: 'lg' = the 404 page's big 44px field (440px wide, full width on mobile; Home field look)
71
72
  className?: string; // ๐Ÿท๏ธ
72
73
  }
73
74
 
@@ -107,13 +108,13 @@ const AbSearchTrigger = ({ label = 'Search', onOpen, href, hotkey, shortcut, com
107
108
  }, [listen, onOpen]);
108
109
 
109
110
  // ๐Ÿ  P6: the Home looks (field / sm pill) show ONE key cap ("โŒ˜ K" / "โŒ˜K") and keep "coming soon" out of the field
110
- const home = variant === 'field' || size === 'sm';
111
+ const home = variant === 'field' || size === 'sm' || size === 'lg'; // ๐Ÿ” 404 gaps: lg is a (bigger) Home field
111
112
  // โŒจ๏ธ mock: "โŒ˜ K" (field) ยท "โŒ˜K" (sm). The gap is its own span so a compact app bar can drop it (0.1.15)
112
113
  const keyCap = <>{apple ? 'โŒ˜' : 'Ctrl'}{size === 'sm' ? null : <span data-ab-part="key-gap"> </span>}K</>;
113
114
  // ๐Ÿงฉ inner content
114
115
  const inner = home ? (
115
116
  <>
116
- <AbIcon name="search" size={size === 'sm' ? 17 : 18} className={styles.abSearchTriggerIcon} />
117
+ <AbIcon name="search" size={size === 'sm' ? 17 : size === 'lg' ? 20 : 18 /* ๐Ÿ” lg: 20px glyph (mock) */} className={styles.abSearchTriggerIcon} />
117
118
  <span className={styles.abSearchTriggerLabel} data-ab-part="search-label">{label}</span>
118
119
  {compactLabel != null && <span className={clsx(styles.abSearchTriggerLabel, styles.abSearchTriggerShort)} data-ab-part="search-label-compact">{compactLabel}</span> /* ๐Ÿ“ฑ 0.1.15 */}
119
120
  {/* ๐Ÿšง coming soon: tooltip + announced, never painted inside the field (spec ยง4) */}
@@ -135,7 +136,7 @@ const AbSearchTrigger = ({ label = 'Search', onOpen, href, hotkey, shortcut, com
135
136
  'aria-keyshortcuts': listen ? 'Meta+K Control+K' : undefined, // โ™ฟ only announced when bound (James #3)
136
137
  'data-compact': compact ? 'true' : undefined, // ๐Ÿ“ฑ
137
138
  'data-variant': variant === 'field' ? 'field' : undefined, // ๐Ÿ”Ž P6
138
- 'data-size': size === 'sm' ? 'sm' : undefined, // ๐Ÿ“ฑ P6
139
+ 'data-size': size === 'sm' || size === 'lg' ? size : undefined, // ๐Ÿ“ฑ P6 ยท ๐Ÿ” 404 gaps: lg
139
140
  title: home && comingSoon ? comingSoonLabel : undefined, // ๐Ÿ’ฌ P6: "coming soon" lives in the tooltip
140
141
  };
141
142
 
@@ -97,3 +97,18 @@
97
97
 
98
98
  /* ๐Ÿ“ฑ 0.1.15: the short label is hidden unless a compact AbAppBar (< 768px) swaps it in */
99
99
  .abSearchTriggerShort { display: none; }
100
+
101
+ /* ===== ๐Ÿ” 404 gaps: size="lg" (mock .e-search: 440ร—44, radius 12, 14.5px) ===== */
102
+ .abSearchTrigger[data-size='lg'] {
103
+ display: inline-flex; align-items: center; gap: 8px; /* ๐Ÿ“ */
104
+ width: min(440px, 100%); height: 44px; padding: 0 8px 0 14px; /* ๐Ÿ“ full width on narrow screens */
105
+ border: 1px solid var(--ab-color-border, #e8dcd2); border-radius: 12px; /* ๐Ÿ”ท */
106
+ background: var(--ab-color-card, #fff); color: var(--ab-color-faint, #807062); /* ๐ŸŽจ */
107
+ font-size: 14.5px; line-height: 1; box-shadow: var(--ab-shadow-card, 0 1px 2px rgb(33 26 22 / 0.05)); /* ๐Ÿ”ค ๐ŸŒ— */
108
+ text-decoration: none; box-sizing: border-box; /* ๐Ÿ”— ๐Ÿ“ฆ */
109
+ }
110
+ .abSearchTrigger[data-size='lg']:hover { border-color: color-mix(in srgb, var(--ab-color-accent, #a67c52) 40%, transparent); } /* ๐Ÿ–ฑ๏ธ */
111
+ .abSearchTrigger[data-size='lg']:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: 2px; } /* โ™ฟ */
112
+ .abSearchTrigger[data-size='lg'] .abSearchTriggerCap { margin-left: auto; } /* โŒจ๏ธ key cap pinned right */
113
+ .abSearchTrigger[data-size='lg'][aria-disabled='true'] { opacity: 1; } /* ๐Ÿšง same look while coming soon */
114
+
package/ab-toc/index.tsx CHANGED
@@ -48,6 +48,8 @@
48
48
  import type { ReactElement, ReactNode } from 'react';
49
49
  // ๐Ÿงต classes
50
50
  import clsx from 'clsx';
51
+ // ๐Ÿ”— 404 gaps: provider-aware link for the `links` variant (locale prefix via AbLinkProvider)
52
+ import AbLink from '../ab-link';
51
53
  // ๐ŸŽจ styles
52
54
  import styles from './styles.module.css';
53
55
 
@@ -73,6 +75,10 @@ export interface AbTocItem {
73
75
  id: string; // ๐Ÿ†” the heading id (link target)
74
76
  label: string; // ๐Ÿท๏ธ
75
77
  level?: 2 | 3 | 4; // ๐Ÿ“ indent (default 2)
78
+ // ===== 404 gaps: variant="links" =====
79
+ href?: string; // ๐Ÿ”— NEW: a page link (links variant); falls back to `#id`
80
+ description?: ReactNode; // ๐Ÿ“ NEW: a small second line, e.g. "Getting started" (links variant)
81
+ icon?: ReactNode; // ๐Ÿ”ฃ NEW: a leading icon (links variant, decorative)
76
82
  }
77
83
 
78
84
  /** โš™๏ธ props */
@@ -84,6 +90,7 @@ export interface AbTocProps {
84
90
  onNavigate?: (id: string) => void; // ๐Ÿ”” e.g. scrollToAbSection(id, { container }) (hooks 0.1.7); without it a plain #id jump, which scrolls the nearest scroller (the main pane in core 0.1.6 panes)
85
91
  id?: string; // ๐Ÿ†” root id (default "ab-toc"); the title gets `${id}-title`
86
92
  className?: string; // ๐Ÿท๏ธ
93
+ variant?: 'toc' | 'links'; // ๐Ÿ”— 404 gaps: 'links' = a plain link list (e.g. "Popular pages"), no rail, no scroll spy (default 'toc')
87
94
  footer?: ReactNode; // ๐Ÿงฉ 0.1.14 (P14): below the list after a 1px rule (Edit this page ยท Changelog ยท a promo card); links get the 12.5px Home style
88
95
  }
89
96
 
@@ -92,12 +99,32 @@ export interface AbTocProps {
92
99
  * aria-current="location". Pair with `useAbScrollSpy` from ab-nextjs-hooks 0.1.7 for `activeId`.
93
100
  * No hooks here, so it also renders on the server.
94
101
  */
95
- const AbToc = ({ items, activeId, label, title = label ?? 'On this page', onNavigate, id = 'ab-toc', className, footer }: AbTocProps): ReactElement | null => {
102
+ const AbToc = ({ items, activeId, label, title = label ?? 'On this page', onNavigate, id = 'ab-toc', className, footer, variant = 'toc' }: AbTocProps): ReactElement | null => {
96
103
  if (!items.length) return null; // ๐Ÿ™ˆ nothing to list
97
104
  const headingId = `${id}-title`; // ๐Ÿ†”
98
105
  return (
99
- <nav id={id} className={clsx('AbToc', styles.abToc, className)} data-ab-part="toc" aria-labelledby={headingId}>
106
+ <nav id={id} className={clsx('AbToc', styles.abToc, className)} data-ab-part="toc" data-variant={variant === 'links' ? 'links' : undefined /* ๐Ÿ”— 404 gaps */} aria-labelledby={headingId}>
100
107
  <p id={headingId} className={styles.abTocTitle}>{title}</p>
108
+ {variant === 'links' ? (
109
+ // ๐Ÿ”— 404 gaps: plain link list (mock .pops / .pop): icon ยท bold label ยท small description
110
+ <ul className={styles.abTocLinks}>
111
+ {items.map((it) => (
112
+ <li key={it.id}>
113
+ <AbLink
114
+ href={it.href ?? `#${it.id}`} // ๐Ÿ”— page link (provider adds the locale) or in-page anchor
115
+ className={styles.abTocLinksItem} // ๐ŸŽจ
116
+ aria-current={it.id === activeId ? 'page' : undefined} // โ™ฟ the current page, if any
117
+ >
118
+ {it.icon != null && <span className={styles.abTocLinksIcon} aria-hidden="true">{it.icon}</span> /* ๐Ÿ”ฃ decorative */}
119
+ <span className={styles.abTocLinksText}>
120
+ <b className={styles.abTocLinksLabel}>{it.label}</b>{/* ๐Ÿท๏ธ */}
121
+ {it.description != null && <small className={styles.abTocLinksDesc}>{it.description}</small> /* ๐Ÿ“ */}
122
+ </span>
123
+ </AbLink>
124
+ </li>
125
+ ))}
126
+ </ul>
127
+ ) : (
101
128
  <ol className={styles.abTocList}>
102
129
  {items.map((it) => {
103
130
  const on = it.id === activeId; // ๐ŸŽฏ
@@ -116,6 +143,7 @@ const AbToc = ({ items, activeId, label, title = label ?? 'On this page', onNavi
116
143
  );
117
144
  })}
118
145
  </ol>
146
+ )}
119
147
  {footer != null && (
120
148
  <>
121
149
  <hr className={styles.abTocSep} />{/* โž– mock .toc-sep */}
@@ -80,3 +80,19 @@
80
80
  .abTocPromoLink { color: inherit; text-decoration: none; } /* ๐Ÿ”— */
81
81
  .abTocPromoLink::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* ๐Ÿ–ฑ๏ธ whole card */
82
82
  .abTocPromo:has(.abTocPromoLink:focus-visible) { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: 2px; } /* โ™ฟ */
83
+
84
+ /* ๐Ÿ”— 404 gaps: variant="links" (mock .pops / .pop), a plain link list without the rail */
85
+ .abTocLinks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; } /* ๐Ÿ“‹ */
86
+ .abTocLinksItem {
87
+ display: flex; align-items: center; gap: 10px; /* ๐Ÿ“ icon ยท text */
88
+ margin: 0 -8px; padding: 7px 8px; border-radius: 9px; /* ๐Ÿ“ฆ mock */
89
+ color: var(--ab-color-text, var(--ab-color-on-surface, inherit)); text-decoration: none; /* ๐Ÿ–‹๏ธ */
90
+ }
91
+ .abTocLinksItem:hover, .abTocLinksItem[aria-current='page'] { background: var(--ab-color-tint, rgb(166 124 82 / 0.1)); } /* ๐Ÿ–ฑ๏ธ ๐ŸŽฏ */
92
+ .abTocLinksItem:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: -2px; } /* โ™ฟ */
93
+ .abTocLinksIcon { display: inline-flex; flex: none; color: var(--ab-color-accent-text, var(--ab-color-primary, inherit)); } /* ๐Ÿ”ฃ */
94
+ .abTocLinksIcon svg { width: 17px; height: 17px; } /* ๐Ÿ“ */
95
+ .abTocLinksText { min-width: 0; } /* ๐Ÿ“ */
96
+ .abTocLinksLabel { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; } /* ๐Ÿท๏ธ */
97
+ .abTocLinksDesc { display: block; margin-top: 1px; font-size: 11.5px; color: var(--ab-color-faint, var(--ab-color-on-surface-variant, inherit)); } /* ๐Ÿ“ */
98
+
package/index.ts CHANGED
@@ -125,6 +125,8 @@ const supportedComponents: Array<ComponentCatalogEntry> = [
125
125
  // ๐Ÿ†• 0.1.13 docs shell (AbToc) โ€” server-safe, no hooks
126
126
  { name: 'AbToc', file: 'ab-toc/index.tsx', kind: 'server', status: 'Done' },
127
127
  { name: 'AbTocPromo', file: 'ab-toc/promo.tsx', kind: 'server', status: 'Done' }, // ๐Ÿ†• 0.2.1 the aside "New" card
128
+ // ๐Ÿšง 404 gaps: AbErrorHero (big code + badge tile, title, message, actions) โ€” server-safe, no hooks
129
+ { name: 'AbErrorHero', file: 'ab-error-hero/index.tsx', kind: 'server', status: 'Done' },
128
130
  // ๐Ÿ†• 0.1.14 (G53): AbDrawer + presets
129
131
  { name: 'AbDrawer', file: 'ab-drawer/index.tsx', kind: 'client', status: 'Done' },
130
132
  { name: 'AbDrawerList', file: 'ab-drawer-list/index.tsx', kind: 'client', status: 'Done' },
@@ -186,6 +188,9 @@ export { default as AbToc, getAbMainScroller, AB_MAIN_SCROLLER_SELECTOR } from '
186
188
  export { default as AbTocPromo } from './ab-toc/promo.tsx'
187
189
  export type { AbTocPromoProps } from './ab-toc/promo.tsx'
188
190
  export type { AbTocItem, AbTocProps } from './ab-toc/index.tsx'
191
+ // ๐Ÿšง 404 gaps: the 404 / error hero (also at `ab-nextjs-components/ab-error-hero`)
192
+ export { default as AbErrorHero } from './ab-error-hero/index.tsx'
193
+ export type { AbErrorHeroProps } from './ab-error-hero/index.tsx'
189
194
  // ๐Ÿ—„๏ธ 0.1.14 (G53): AbDrawer + useAbDrawer (also at `ab-nextjs-components/ab-drawer`)
190
195
  export { default as AbDrawer, useAbDrawer, getAbDrawerHost, AB_DRAWER_DURATION, AB_DRAWER_RETURN_FOCUS } from './ab-drawer/index.tsx'
191
196
  // ๐Ÿค 0.2.0 drawers v2: edge swipes + the swipe / snap rules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ab-nextjs-components",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "๐Ÿš€ A lightweight collection of server & client React components created by Abraham Ukachi, and optimized for Next.js applications ๐Ÿ˜Ž.",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -42,7 +42,7 @@
42
42
  "peerDependencies": {
43
43
  "ab-nextjs-animations": "^0.2.5",
44
44
  "ab-nextjs-hooks": "^0.1.7",
45
- "ab-nextjs-icons": "^0.2.4",
45
+ "ab-nextjs-icons": "^0.2.6",
46
46
  "ab-nextjs-theme": "^0.3.7",
47
47
  "clsx": "^2",
48
48
  "next": "^16.3.4",
@@ -55,7 +55,7 @@
55
55
  "@types/react": "^19",
56
56
  "ab-nextjs-animations": "^0.2.5",
57
57
  "ab-nextjs-hooks": "^0.1.7",
58
- "ab-nextjs-icons": "^0.2.4",
58
+ "ab-nextjs-icons": "^0.2.6",
59
59
  "ab-nextjs-theme": "^0.3.7",
60
60
  "clsx": "^2.1.1",
61
61
  "esbuild": "^0.28.2",
@@ -140,7 +140,8 @@
140
140
  "ab-app-bar",
141
141
  "ab-card",
142
142
  "ab-package-card",
143
- "ab-toc"
143
+ "ab-toc",
144
+ "ab-error-hero"
144
145
  ],
145
146
  "exports": {
146
147
  ".": {
@@ -238,6 +239,7 @@
238
239
  "./ab-card": "./ab-card/index.tsx",
239
240
  "./ab-package-card": "./ab-package-card/index.tsx",
240
241
  "./ab-toc": "./ab-toc/index.tsx",
242
+ "./ab-error-hero": "./ab-error-hero/index.tsx",
241
243
  "./ab-sidebar/view": "./ab-sidebar/view.tsx",
242
244
  "./ab-navbar/view": "./ab-navbar/view.tsx"
243
245
  },
@@ -40,6 +40,8 @@
40
40
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
41
41
  // ๐Ÿงต class joiner
42
42
  import clsx from 'clsx';
43
+ // ๐Ÿ”— 404 gaps: the provider-aware link (client component, fine to render from a server twin)
44
+ import AbLink from '../../ab-link';
43
45
  // ๐ŸŽจ styles (server copy)
44
46
  // ๐Ÿงฌ 0.2.3 (Joseph 03:41): ONE source for the button box โ€” the client module's CSS (no server copy to drift)
45
47
  import styles from '../../ab-button/styles.module.css';
@@ -141,7 +143,8 @@ const AbButton = ({
141
143
  return <span id={id} role="link" aria-disabled="true" tabIndex={mode === 'aria' ? 0 : -1} className={classNames} style={style} hidden={hidden} {...dataAttrs}>{content}</span>;
142
144
  }
143
145
  // โœ… a link is a link (no role=button)
144
- return <a id={id} href={href} className={classNames} style={style} hidden={hidden} {...dataAttrs}>{content}</a>;
146
+ // ๐Ÿ”Œ 404 gaps: AbLink (a client leaf) reads AbLinkProvider from the client tree โ†’ locale prefix ๐ŸŒ
147
+ return <AbLink id={id} href={href} className={classNames} style={style} hidden={hidden} {...dataAttrs}>{content}</AbLink>;
145
148
  }
146
149
 
147
150
  // ๐Ÿ”˜ button: aria mode is type="button" so a disabled CTA can never submit, even without JS
package/types/index.d.ts CHANGED
@@ -81,6 +81,9 @@ export { default as AbToc, getAbMainScroller, AB_MAIN_SCROLLER_SELECTOR } from '
81
81
  export { default as AbTocPromo } from '../ab-toc/promo.tsx';
82
82
  export type { AbTocPromoProps } from '../ab-toc/promo.tsx';
83
83
  export type { AbTocItem, AbTocProps } from '../ab-toc/index.tsx';
84
+ // ๐Ÿšง 404 gaps: AbErrorHero
85
+ export { default as AbErrorHero } from '../ab-error-hero/index.tsx';
86
+ export type { AbErrorHeroProps } from '../ab-error-hero/index.tsx';
84
87
  // ๐Ÿ—„๏ธ 0.1.14 (G53): AbDrawer + useAbDrawer (also at `ab-nextjs-components/ab-drawer`)
85
88
  export { default as AbDrawer, useAbDrawer, getAbDrawerHost, AB_DRAWER_DURATION, AB_DRAWER_RETURN_FOCUS } from '../ab-drawer/index.tsx';
86
89
  // ๐Ÿค 0.2.0 drawers v2: edge swipes + the swipe / snap rules