ab-nextjs-components 0.1.14 โ†’ 0.2.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +5 -0
  3. package/ab-app-bar/index.tsx +17 -6
  4. package/ab-app-bar/styles.module.css +27 -2
  5. package/ab-balloon/index.tsx +35 -3
  6. package/ab-balloon/styles.module.css +8 -0
  7. package/ab-bottom-drawer/styles.module.css +1 -1
  8. package/ab-breadcrumbs/index.tsx +1 -1
  9. package/ab-drawer/gestures.ts +134 -0
  10. package/ab-drawer/index.tsx +168 -12
  11. package/ab-drawer/kit.module.css +210 -0
  12. package/ab-drawer/styles.module.css +39 -0
  13. package/ab-drawer/use-ab-edge-swipe.ts +165 -0
  14. package/ab-icon-button/index.tsx +1 -1
  15. package/ab-locale-switcher/index.tsx +64 -3
  16. package/ab-locale-switcher/styles.module.css +20 -0
  17. package/ab-mobile-header/index.tsx +100 -0
  18. package/ab-nav-drawer/index.tsx +158 -0
  19. package/ab-navbar/index.tsx +1 -1
  20. package/ab-package-card/index.tsx +2 -0
  21. package/ab-package-card/previews.tsx +94 -0
  22. package/ab-package-card/styles.module.css +21 -0
  23. package/ab-profile-avatar/index.tsx +105 -0
  24. package/ab-profile-avatar/styles.module.css +53 -0
  25. package/ab-search-drawer/index.tsx +279 -0
  26. package/ab-search-trigger/index.tsx +8 -3
  27. package/ab-search-trigger/styles.module.css +3 -0
  28. package/ab-settings-drawer/index.tsx +203 -0
  29. package/ab-sidebar/index.tsx +10 -2
  30. package/ab-sidebar/profile-button.tsx +115 -0
  31. package/ab-sidebar/styles.module.css +43 -0
  32. package/ab-sidebar/view.tsx +9 -1
  33. package/ab-toc/index.tsx +3 -0
  34. package/ab-toc/promo.tsx +74 -0
  35. package/ab-toc/styles.module.css +16 -0
  36. package/ab-toc-drawer/index.tsx +129 -0
  37. package/ab-version-switcher/index.tsx +5 -5
  38. package/index.ts +36 -1
  39. package/package.json +15 -3
  40. package/types/index.d.ts +27 -1
@@ -0,0 +1,129 @@
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: AbTocDrawer
28
+ * @file: ab-toc-drawer/index.tsx
29
+ * @type: Client component
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ *
32
+ * Example usage:
33
+ * 1+|> useAbEdgeSwipe({ edge: 'right', onOpen: () => setToc(true), enabled: hasAside && !toc })
34
+ * -|> <AbTocDrawer open={toc} onClose={() => setToc(false)} items={outline} activeId={spy}
35
+ * -|> onNavigate={(id) => scrollToAbSection(id)} links={[{ href: editUrl, label: 'Edit this page', icon: 'github' }]} />
36
+ */
37
+
38
+ /*
39
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
40
+ * MOTTO: We'll always do more ๐Ÿ˜œ!!!
41
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
42
+ */
43
+
44
+
45
+ 'use client';
46
+
47
+ // โš›๏ธ React
48
+ import type { MouseEvent, ReactElement } from 'react';
49
+ // ๐Ÿงต classes
50
+ import clsx from 'clsx';
51
+ // ๐Ÿ—„๏ธ the drawer
52
+ import AbDrawer from '../ab-drawer';
53
+ // ๐Ÿ”ฃ icons
54
+ import AbIcon from '../ab-icon';
55
+ // ๐Ÿ”— the app's link
56
+ import Link from '../ab-link';
57
+ // ๐Ÿ“‘ the outline item type (shared with AbToc)
58
+ import type { AbTocItem } from '../ab-toc';
59
+ // ๐ŸŽจ the drawers v2 kit
60
+ import kit from '../ab-drawer/kit.module.css';
61
+
62
+ /** ๐Ÿ”— a row under the outline (Edit this page, Changelog) */
63
+ export interface AbTocDrawerLink { href: string; label: string; icon?: string; external?: boolean }
64
+
65
+ /** โš™๏ธ props */
66
+ export interface AbTocDrawerProps {
67
+ open: boolean; // ๐Ÿšช
68
+ onClose: () => void; // โŽ‹ scrim, Esc, โœ•, a left-to-right swipe, or choosing a heading
69
+ items: readonly AbTocItem[]; // ๐Ÿ“‘ the page outline (level 2 / 3 / 4)
70
+ activeId?: string | null; // ๐ŸŽฏ e.g. from useAbScrollSpy (hooks 0.1.7)
71
+ onNavigate?: (id: string) => void; // ๐Ÿ”” scroll there (e.g. scrollToAbSection); without it a plain #id jump. The drawer closes after
72
+ links?: readonly AbTocDrawerLink[]; // ๐Ÿ”— below a divider
73
+ labels?: { title?: string; close?: string }; // ๐ŸŒ "On this page", "Close outline"
74
+ returnFocus?: string; // โ†ฉ๏ธ after a swipe-open
75
+ id?: string; // ๐Ÿ†”
76
+ className?: string; // ๐Ÿท๏ธ
77
+ }
78
+
79
+ /**
80
+ * โžก๏ธ AbTocDrawer โ€” John's right drawer (drawers v2 ยง3): the page aside ("On this page") on mobile.
81
+ *
82
+ * - ๐Ÿงญ Only for routes whose layout has an aside: render it (and enable the right edge swipe) there, nowhere else
83
+ * - ๐Ÿ“ 296px, 16 0 0 16 radius, title Mulish 800 20px; 44px outline rows on a 2px rail, level 3 indented 16px,
84
+ * the active one bronze with `aria-current="location"`; then a divider and the links
85
+ * - ๐Ÿค opens with `useAbEdgeSwipe({ edge: 'right' })` or an "On this page" chip; closes with a left-to-right swipe
86
+ * - ๐Ÿฅž tier 'aside': one level below the left drawer
87
+ */
88
+ const AbTocDrawer = ({ open, onClose, items, activeId, onNavigate, links = [], labels = {}, returnFocus, id = 'ab-toc-drawer', className }: AbTocDrawerProps): ReactElement => {
89
+ const L = { title: 'On this page', close: 'Close outline', ...labels }; // ๐ŸŒ
90
+ const go = (target: string) => (e: MouseEvent) => {
91
+ if (onNavigate) { e.preventDefault(); onNavigate(target); } // ๐Ÿ“œ the app scrolls
92
+ onClose(); // ๐Ÿšช then close
93
+ };
94
+ return (
95
+ <AbDrawer
96
+ open={open} onClose={onClose} id={id} side="right" scope="app" tier="aside" swipe size="296px"
97
+ title={L.title} closeLabel={L.close} closeIcon={<AbIcon name="close" size={24} />}
98
+ initialFocus="panel" returnFocus={returnFocus} // ๐ŸŽฏ the sheet itself (WebKit drew a focus ring on the active row; Tab then enters)
99
+ className={clsx('AbTocDrawer', kit.sheet, kit.titleSm, className)}
100
+ >
101
+ <nav aria-labelledby={`${id}-title`} data-ab-part="toc-drawer-nav">
102
+ <ol className={kit.toc}>
103
+ {items.map((it) => {
104
+ const on = it.id === activeId; // ๐ŸŽฏ
105
+ return (
106
+ <li key={it.id}>
107
+ <a href={`#${it.id}`} className={kit.tocLink} data-level={it.level ?? 2} aria-current={on ? 'location' : undefined} onClick={go(it.id)}>{it.label}</a>
108
+ </li>
109
+ );
110
+ })}
111
+ </ol>
112
+ </nav>
113
+ {links.length > 0 && (
114
+ <>
115
+ <hr className={clsx(kit.hr, kit.tocHr)} />
116
+ {links.map((l) => (
117
+ <Link key={l.href} href={l.href} className={clsx(kit.row, kit.tocRow)} {...(l.external ? { target: '_blank', rel: 'noreferrer' } : {})} onClick={onClose}>
118
+ {l.icon && <AbIcon name={l.icon} size={24} />}<span>{l.label}</span>
119
+ </Link>
120
+ ))}
121
+ </>
122
+ )}
123
+ </AbDrawer>
124
+ );
125
+ };
126
+
127
+ // ๐Ÿ“ฆ exports
128
+ export default AbTocDrawer;
129
+ export { AbTocDrawer };
@@ -30,7 +30,7 @@
30
30
  * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
31
  *
32
32
  * Example usage:
33
- * 1+|> <AbVersionSwitcher label="Docs" version="v0.2.x" versions={[{ value: "v0.2.x", href: "/docs" }, { value: "v0.1.x", href: "/v0.1/docs" }]} />
33
+ * 1+|> <AbVersionSwitcher version="v0.2.x" versions={[{ value: "v0.2.x", href: "/" }, { value: "v0.1.x", href: "/v0.1" }]} />
34
34
  */
35
35
 
36
36
  /*
@@ -62,7 +62,7 @@ export interface AbVersionOption {
62
62
 
63
63
  /** โš™๏ธ props */
64
64
  export interface AbVersionSwitcherProps {
65
- label?: string; // ๐Ÿท๏ธ default "Docs"
65
+ label?: string; // ๐Ÿท๏ธ text before the version; default none (0.2.0, God 01:27: the app IS the docs, so no "Docs" prefix)
66
66
  version: string; // โœ… current version (shown bold), e.g. 'v0.2.x'
67
67
  versions?: readonly AbVersionOption[]; // ๐Ÿ“‹ the choices (none / one = a static label, no menu)
68
68
  onSelect?: (value: string) => void; // ๐Ÿ“ฃ button items
@@ -75,12 +75,12 @@ export interface AbVersionSwitcherProps {
75
75
  * card background, 16px `expand_more`; opens an AbMenu below it (Escape / outside click close, focus returns).
76
76
  * JS off: with `href`s it's a native `<details>` list of links.
77
77
  */
78
- const AbVersionSwitcher = ({ label = 'Docs', version, versions = [], onSelect, menuLabel, className }: AbVersionSwitcherProps): ReactElement => {
78
+ const AbVersionSwitcher = ({ label = '', version, versions = [], onSelect, menuLabel, className }: AbVersionSwitcherProps): ReactElement => {
79
79
  const [open, setOpen] = useState(false); // ๐Ÿšช
80
80
  const menuId = `ab-version-menu-${useId().replace(/:/g, '')}`; // ๐Ÿ†”
81
81
  const wrap = useRef<HTMLDivElement>(null); // ๐Ÿ“
82
82
  const btn = useRef<HTMLButtonElement>(null); // ๐Ÿ“
83
- const name = menuLabel ?? `${label} ${version}`; // โ™ฟ WCAG 2.5.3 label-in-name (James)
83
+ const name = menuLabel ?? (label ? `${label} ${version}` : `Version ${version}`); // โ™ฟ WCAG 2.5.3 label-in-name (James); no label โ†’ "Version v0.2.x" (James P2, still contains the visible text)
84
84
  const hasMenu = versions.length > 1; // ๐Ÿ“‹
85
85
 
86
86
  // โŽ‹ Escape + outside click close it
@@ -96,7 +96,7 @@ const AbVersionSwitcher = ({ label = 'Docs', version, versions = [], onSelect, m
96
96
  // ๐Ÿงฑ the visible face (same for button, static label and no-JS summary)
97
97
  const face = (
98
98
  <>
99
- <span>{label}</span> <b className={styles.abVersionValue}>{version}</b>
99
+ {label && <><span>{label}</span> </>}<b className={styles.abVersionValue}>{version}</b>
100
100
  {hasMenu && <AbIcon name="expand_more" size={16} className={styles.abVersionIcon} />}
101
101
  </>
102
102
  );
package/index.ts CHANGED
@@ -130,11 +130,19 @@ const supportedComponents: Array<ComponentCatalogEntry> = [
130
130
  { name: 'AbPackageCard', file: 'ab-package-card/index.tsx', kind: 'server', status: 'Done' },
131
131
  // ๐Ÿ†• 0.1.13 docs shell (AbToc) โ€” server-safe, no hooks
132
132
  { name: 'AbToc', file: 'ab-toc/index.tsx', kind: 'server', status: 'Done' },
133
+ { name: 'AbTocPromo', file: 'ab-toc/promo.tsx', kind: 'server', status: 'Done' }, // ๐Ÿ†• 0.2.1 the aside "New" card
133
134
  // ๐Ÿ†• 0.1.14 (G53): AbDrawer + presets
134
135
  { name: 'AbDrawer', file: 'ab-drawer/index.tsx', kind: 'client', status: 'Done' },
135
136
  { name: 'AbDrawerList', file: 'ab-drawer-list/index.tsx', kind: 'client', status: 'Done' },
136
137
  { name: 'AbConfirmDrawer', file: 'ab-confirm-drawer/index.tsx', kind: 'client', status: 'Done' },
137
138
  { name: 'AbBottomDrawer', file: 'ab-bottom-drawer/index.tsx', kind: 'client', status: 'Done' },
139
+ { name: 'AbMobileHeader', file: 'ab-mobile-header/index.tsx', kind: 'client', status: 'Done' }, // ๐Ÿ†• 0.2.0 drawers v2
140
+ { name: 'AbSearchDrawer', file: 'ab-search-drawer/index.tsx', kind: 'client', status: 'Done' }, // ๐Ÿ†• 0.2.0 drawers v2
141
+ { name: 'AbTocDrawer', file: 'ab-toc-drawer/index.tsx', kind: 'client', status: 'Done' }, // ๐Ÿ†• 0.2.0 drawers v2
142
+ { name: 'AbNavDrawer', file: 'ab-nav-drawer/index.tsx', kind: 'client', status: 'Done' }, // ๐Ÿ†• 0.2.0 drawers v2
143
+ { name: 'AbSettingsDrawer', file: 'ab-settings-drawer/index.tsx', kind: 'client', status: 'Done' }, // ๐Ÿ†• 0.2.0 drawers v2
144
+ { name: 'AbSidebarProfileButton', file: 'ab-sidebar/profile-button.tsx', kind: 'client', status: 'Done' }, // ๐Ÿ†• 0.2.1 bottom-left profile โ†’ settings (โ‰ฅ 1180px)
145
+ { name: 'AbProfileAvatar', file: 'ab-profile-avatar/index.tsx', kind: 'server', status: 'Done' }, // ๐Ÿ†• 0.2.1 initials / photo / glyph circle (no hooks: client + server)
138
146
  { name: 'AbVersionSwitcher', file: 'ab-version-switcher/index.tsx', kind: 'client', status: 'Done' },
139
147
  { name: 'AbBreadcrumbs', file: 'ab-breadcrumbs/index.tsx', kind: 'server', status: 'Done' },
140
148
  { name: 'AbList', file: 'ab-list/index.tsx', kind: 'server', status: 'Done' },
@@ -174,11 +182,20 @@ export { default as AbBrand } from './ab-brand/index.tsx'
174
182
  export { default as AbName } from './ab-name/index.tsx'
175
183
  export { default as AbNavbar } from './ab-navbar/index.tsx'
176
184
  export { default as AbSidebar } from './ab-sidebar/index.tsx'
185
+ // ๐Ÿ‘ค 0.2.1 (God 02:44): the bottom-left sidebar profile button โ†’ AbSettingsDrawer (laptop + wide)
186
+ export { default as AbSidebarProfileButton } from './ab-sidebar/profile-button.tsx'
187
+ export type { AbSidebarProfileButtonProps } from './ab-sidebar/profile-button.tsx'
177
188
  // ๐Ÿ“‘ 0.1.13 (Joseph): AbToc + the panes main-scroller helpers (also at `ab-nextjs-components/ab-toc`)
178
189
  export { default as AbToc, getAbMainScroller, AB_MAIN_SCROLLER_SELECTOR } from './ab-toc/index.tsx'
190
+ // ๐Ÿ†• 0.2.1 (God 02:44): the aside "New" card
191
+ export { default as AbTocPromo } from './ab-toc/promo.tsx'
192
+ export type { AbTocPromoProps } from './ab-toc/promo.tsx'
179
193
  export type { AbTocItem, AbTocProps } from './ab-toc/index.tsx'
180
194
  // ๐Ÿ—„๏ธ 0.1.14 (G53): AbDrawer + useAbDrawer (also at `ab-nextjs-components/ab-drawer`)
181
- export { default as AbDrawer, useAbDrawer, getAbDrawerHost, AB_DRAWER_DURATION } from './ab-drawer/index.tsx'
195
+ export { default as AbDrawer, useAbDrawer, getAbDrawerHost, AB_DRAWER_DURATION, AB_DRAWER_RETURN_FOCUS } from './ab-drawer/index.tsx'
196
+ // ๐Ÿค 0.2.0 drawers v2: edge swipes + the swipe / snap rules
197
+ export { useAbEdgeSwipe, AB_ASIDE_DRAWER_MAX_WIDTH, AB_SWIPE, resolveAbSheetRelease, resolveAbSideRelease } from './ab-drawer/index.tsx'
198
+ export type { AbDrawerTier, AbSheetSnap, UseAbEdgeSwipeOptions } from './ab-drawer/index.tsx'
182
199
  export type { AbDrawerProps, AbDrawerSide, AbDrawerScope, UseAbDrawer } from './ab-drawer/index.tsx'
183
200
  export { default as AbDrawerList } from './ab-drawer-list/index.tsx'
184
201
  export type { AbDrawerListItem, AbDrawerListProps } from './ab-drawer-list/index.tsx'
@@ -187,6 +204,24 @@ export type { AbConfirmDrawerProps } from './ab-confirm-drawer/index.tsx'
187
204
  // ๐Ÿ“ฑ 0.1.14 (D40): AbBottomDrawer, the mobile bottom drawer
188
205
  export { default as AbBottomDrawer } from './ab-bottom-drawer/index.tsx'
189
206
  export type { AbBottomDrawerProps } from './ab-bottom-drawer/index.tsx'
207
+ // ๐Ÿ†• 0.2.0 drawers v2: AbMobileHeader
208
+ export { default as AbMobileHeader } from './ab-mobile-header/index.tsx'
209
+ export type { AbMobileHeaderProps } from './ab-mobile-header/index.tsx'
210
+ // ๐Ÿ†• 0.2.0 drawers v2: AbSearchDrawer
211
+ export { default as AbSearchDrawer, addAbSearchRecent, highlightAbSearch, AB_SEARCH_RECENT_KEY } from './ab-search-drawer/index.tsx'
212
+ export type { AbSearchDrawerProps, AbSearchDrawerItem, AbSearchDrawerGroup, AbSearchDrawerLabels } from './ab-search-drawer/index.tsx'
213
+ // ๐Ÿ†• 0.2.0 drawers v2: AbTocDrawer
214
+ export { default as AbTocDrawer } from './ab-toc-drawer/index.tsx'
215
+ export type { AbTocDrawerProps, AbTocDrawerLink } from './ab-toc-drawer/index.tsx'
216
+ // ๐Ÿ†• 0.2.0 drawers v2: AbNavDrawer
217
+ export { default as AbNavDrawer } from './ab-nav-drawer/index.tsx'
218
+ export type { AbNavDrawerProps, AbNavDrawerItem, AbNavDrawerSection } from './ab-nav-drawer/index.tsx'
219
+ // ๐Ÿ†• 0.2.0 drawers v2: AbSettingsDrawer
220
+ export { default as AbSettingsDrawer } from './ab-settings-drawer/index.tsx'
221
+ export type { AbSettingsDrawerProps, AbSettingsDrawerLabels, AbSettingsLocale, AbSettingsTheme } from './ab-settings-drawer/index.tsx'
222
+ // ๐Ÿ‘ค 0.2.1: the profile circle (initials / photo / signed-out glyph)
223
+ export { default as AbProfileAvatar, getAbInitials } from './ab-profile-avatar/index.tsx'
224
+ export type { AbProfileAvatarProps, AbProfileUser } from './ab-profile-avatar/index.tsx'
190
225
  // ๐Ÿท๏ธ 0.1.14 (P9): AbVersionSwitcher
191
226
  export { default as AbVersionSwitcher } from './ab-version-switcher/index.tsx'
192
227
  export type { AbVersionOption, AbVersionSwitcherProps } from './ab-version-switcher/index.tsx'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ab-nextjs-components",
3
- "version": "0.1.14",
3
+ "version": "0.2.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",
@@ -43,7 +43,7 @@
43
43
  "ab-nextjs-animations": "^0.2.4",
44
44
  "ab-nextjs-hooks": "^0.1.7",
45
45
  "ab-nextjs-icons": "^0.2.4",
46
- "ab-nextjs-theme": "^0.3.5",
46
+ "ab-nextjs-theme": "^0.3.6",
47
47
  "clsx": "^2",
48
48
  "next": "^16.3.4",
49
49
  "react": "^19",
@@ -56,7 +56,7 @@
56
56
  "ab-nextjs-animations": "^0.2.4",
57
57
  "ab-nextjs-hooks": "^0.1.7",
58
58
  "ab-nextjs-icons": "^0.2.4",
59
- "ab-nextjs-theme": "^0.3.5",
59
+ "ab-nextjs-theme": "^0.3.6",
60
60
  "clsx": "^2.1.1",
61
61
  "esbuild": "^0.28.2",
62
62
  "eslint": "^9.39.0",
@@ -118,6 +118,12 @@
118
118
  "ab-drawer-list",
119
119
  "ab-confirm-drawer",
120
120
  "ab-bottom-drawer",
121
+ "ab-mobile-header",
122
+ "ab-search-drawer",
123
+ "ab-toc-drawer",
124
+ "ab-nav-drawer",
125
+ "ab-settings-drawer",
126
+ "ab-profile-avatar",
121
127
  "ab-version-switcher",
122
128
  "ab-breadcrumbs",
123
129
  "ab-list",
@@ -165,6 +171,12 @@
165
171
  "./ab-drawer-list": "./ab-drawer-list/index.tsx",
166
172
  "./ab-confirm-drawer": "./ab-confirm-drawer/index.tsx",
167
173
  "./ab-bottom-drawer": "./ab-bottom-drawer/index.tsx",
174
+ "./ab-mobile-header": "./ab-mobile-header/index.tsx",
175
+ "./ab-search-drawer": "./ab-search-drawer/index.tsx",
176
+ "./ab-toc-drawer": "./ab-toc-drawer/index.tsx",
177
+ "./ab-nav-drawer": "./ab-nav-drawer/index.tsx",
178
+ "./ab-settings-drawer": "./ab-settings-drawer/index.tsx",
179
+ "./ab-profile-avatar": "./ab-profile-avatar/index.tsx",
168
180
  "./ab-version-switcher": "./ab-version-switcher/index.tsx",
169
181
  "./ab-breadcrumbs": "./ab-breadcrumbs/index.tsx",
170
182
  "./ab-list": "./ab-list/index.tsx",
package/types/index.d.ts CHANGED
@@ -77,9 +77,15 @@ export { default as AbNavbar } from '../ab-navbar/index.tsx';
77
77
  export { default as AbSidebar } from '../ab-sidebar/index.tsx';
78
78
  // ๐Ÿ“‘ 0.1.13 (Joseph): AbToc + the panes main-scroller helpers (also at `ab-nextjs-components/ab-toc`)
79
79
  export { default as AbToc, getAbMainScroller, AB_MAIN_SCROLLER_SELECTOR } from '../ab-toc/index.tsx';
80
+ // ๐Ÿ†• 0.2.1: the aside "New" card
81
+ export { default as AbTocPromo } from '../ab-toc/promo.tsx';
82
+ export type { AbTocPromoProps } from '../ab-toc/promo.tsx';
80
83
  export type { AbTocItem, AbTocProps } from '../ab-toc/index.tsx';
81
84
  // ๐Ÿ—„๏ธ 0.1.14 (G53): AbDrawer + useAbDrawer (also at `ab-nextjs-components/ab-drawer`)
82
- export { default as AbDrawer, useAbDrawer, getAbDrawerHost, AB_DRAWER_DURATION } from '../ab-drawer/index.tsx';
85
+ export { default as AbDrawer, useAbDrawer, getAbDrawerHost, AB_DRAWER_DURATION, AB_DRAWER_RETURN_FOCUS } from '../ab-drawer/index.tsx';
86
+ // ๐Ÿค 0.2.0 drawers v2: edge swipes + the swipe / snap rules
87
+ export { useAbEdgeSwipe, AB_ASIDE_DRAWER_MAX_WIDTH, AB_SWIPE, resolveAbSheetRelease, resolveAbSideRelease } from '../ab-drawer/index.tsx';
88
+ export type { AbDrawerTier, AbSheetSnap, UseAbEdgeSwipeOptions } from '../ab-drawer/index.tsx';
83
89
  export type { AbDrawerProps, AbDrawerSide, AbDrawerScope, UseAbDrawer } from '../ab-drawer/index.tsx';
84
90
  export { default as AbDrawerList } from '../ab-drawer-list/index.tsx';
85
91
  export type { AbDrawerListItem, AbDrawerListProps } from '../ab-drawer-list/index.tsx';
@@ -88,6 +94,26 @@ export type { AbConfirmDrawerProps } from '../ab-confirm-drawer/index.tsx';
88
94
  // ๐Ÿ“ฑ 0.1.14 (D40): AbBottomDrawer, the mobile bottom drawer
89
95
  export { default as AbBottomDrawer } from '../ab-bottom-drawer/index.tsx';
90
96
  export type { AbBottomDrawerProps } from '../ab-bottom-drawer/index.tsx';
97
+ // ๐Ÿ†• 0.2.0 drawers v2: AbMobileHeader
98
+ export { default as AbMobileHeader } from '../ab-mobile-header/index.tsx';
99
+ export type { AbMobileHeaderProps } from '../ab-mobile-header/index.tsx';
100
+ // ๐Ÿ†• 0.2.0 drawers v2: AbSearchDrawer
101
+ export { default as AbSearchDrawer, addAbSearchRecent, highlightAbSearch, AB_SEARCH_RECENT_KEY } from '../ab-search-drawer/index.tsx';
102
+ export type { AbSearchDrawerProps, AbSearchDrawerItem, AbSearchDrawerGroup, AbSearchDrawerLabels } from '../ab-search-drawer/index.tsx';
103
+ // ๐Ÿ†• 0.2.0 drawers v2: AbTocDrawer
104
+ export { default as AbTocDrawer } from '../ab-toc-drawer/index.tsx';
105
+ export type { AbTocDrawerProps, AbTocDrawerLink } from '../ab-toc-drawer/index.tsx';
106
+ // ๐Ÿ†• 0.2.0 drawers v2: AbNavDrawer
107
+ export { default as AbNavDrawer } from '../ab-nav-drawer/index.tsx';
108
+ export type { AbNavDrawerProps, AbNavDrawerItem, AbNavDrawerSection } from '../ab-nav-drawer/index.tsx';
109
+ // ๐Ÿ†• 0.2.0 drawers v2: AbSettingsDrawer
110
+ export { default as AbSettingsDrawer } from '../ab-settings-drawer/index.tsx';
111
+ export type { AbSettingsDrawerProps, AbSettingsDrawerLabels, AbSettingsLocale, AbSettingsTheme } from '../ab-settings-drawer/index.tsx';
112
+ // ๐Ÿ‘ค 0.2.1: AbSidebarProfileButton + AbProfileAvatar
113
+ export { default as AbSidebarProfileButton } from '../ab-sidebar/profile-button.tsx';
114
+ export type { AbSidebarProfileButtonProps } from '../ab-sidebar/profile-button.tsx';
115
+ export { default as AbProfileAvatar, getAbInitials } from '../ab-profile-avatar/index.tsx';
116
+ export type { AbProfileAvatarProps, AbProfileUser } from '../ab-profile-avatar/index.tsx';
91
117
  // ๐Ÿท๏ธ 0.1.14 (P9): AbVersionSwitcher
92
118
  export { default as AbVersionSwitcher } from '../ab-version-switcher/index.tsx';
93
119
  export type { AbVersionOption, AbVersionSwitcherProps } from '../ab-version-switcher/index.tsx';