zero-to-app 3.2.1 → 3.2.2
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/dist/brand/brand-config.d.ts +65 -0
- package/dist/brand/brand-config.d.ts.map +1 -0
- package/dist/brand/brand-config.js +68 -0
- package/dist/brand/brand-config.js.map +1 -0
- package/dist/brand/brand-context.d.ts +55 -0
- package/dist/brand/brand-context.d.ts.map +1 -0
- package/dist/brand/brand-context.js +76 -0
- package/dist/brand/brand-context.js.map +1 -0
- package/dist/brand/brand-types.d.ts +92 -0
- package/dist/brand/brand-types.d.ts.map +1 -0
- package/dist/brand/brand-types.js +2 -0
- package/dist/brand/brand-types.js.map +1 -0
- package/dist/brand/default-brand.d.ts +11 -0
- package/dist/brand/default-brand.d.ts.map +1 -0
- package/dist/brand/default-brand.js +32 -0
- package/dist/brand/default-brand.js.map +1 -0
- package/dist/brand/index.d.ts +6 -0
- package/dist/brand/index.d.ts.map +1 -0
- package/dist/brand/index.js +8 -0
- package/dist/brand/index.js.map +1 -0
- package/dist/brand/palette-generator.d.ts +64 -0
- package/dist/brand/palette-generator.d.ts.map +1 -0
- package/dist/brand/palette-generator.js +292 -0
- package/dist/brand/palette-generator.js.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/navigation/app-tabs/app-tabs.d.ts +63 -0
- package/dist/components/navigation/app-tabs/app-tabs.d.ts.map +1 -0
- package/dist/components/navigation/app-tabs/app-tabs.js +13 -0
- package/dist/components/navigation/app-tabs/app-tabs.js.map +1 -0
- package/dist/components/navigation/app-tabs/app-tabs.web.d.ts +47 -0
- package/dist/components/navigation/app-tabs/app-tabs.web.d.ts.map +1 -0
- package/dist/components/navigation/app-tabs/app-tabs.web.js +104 -0
- package/dist/components/navigation/app-tabs/app-tabs.web.js.map +1 -0
- package/dist/components/navigation/app-tabs/index.d.ts +3 -0
- package/dist/components/navigation/app-tabs/index.d.ts.map +1 -0
- package/dist/components/navigation/app-tabs/index.js +3 -0
- package/dist/components/navigation/app-tabs/index.js.map +1 -0
- package/dist/components/navigation/drawer/drawer.d.ts +24 -0
- package/dist/components/navigation/drawer/drawer.d.ts.map +1 -0
- package/dist/components/navigation/drawer/drawer.js +82 -0
- package/dist/components/navigation/drawer/drawer.js.map +1 -0
- package/dist/components/navigation/index.d.ts +10 -0
- package/dist/components/navigation/index.d.ts.map +1 -0
- package/dist/components/navigation/index.js +11 -0
- package/dist/components/navigation/index.js.map +1 -0
- package/dist/components/navigation/native-header.d.ts +25 -0
- package/dist/components/navigation/native-header.d.ts.map +1 -0
- package/dist/components/navigation/native-header.js +32 -0
- package/dist/components/navigation/native-header.js.map +1 -0
- package/dist/components/navigation/shared/sidebar-styles.d.ts +34 -0
- package/dist/components/navigation/shared/sidebar-styles.d.ts.map +1 -0
- package/dist/components/navigation/shared/sidebar-styles.js +34 -0
- package/dist/components/navigation/shared/sidebar-styles.js.map +1 -0
- package/dist/components/navigation/sidebar/index.d.ts +10 -0
- package/dist/components/navigation/sidebar/index.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/index.js +7 -0
- package/dist/components/navigation/sidebar/index.js.map +1 -0
- package/dist/components/navigation/sidebar/sidebar-footer.d.ts +18 -0
- package/dist/components/navigation/sidebar/sidebar-footer.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/sidebar-footer.js +27 -0
- package/dist/components/navigation/sidebar/sidebar-footer.js.map +1 -0
- package/dist/components/navigation/sidebar/sidebar-header.d.ts +26 -0
- package/dist/components/navigation/sidebar/sidebar-header.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/sidebar-header.js +38 -0
- package/dist/components/navigation/sidebar/sidebar-header.js.map +1 -0
- package/dist/components/navigation/sidebar/sidebar-item.d.ts +36 -0
- package/dist/components/navigation/sidebar/sidebar-item.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/sidebar-item.js +63 -0
- package/dist/components/navigation/sidebar/sidebar-item.js.map +1 -0
- package/dist/components/navigation/sidebar/sidebar-section.d.ts +34 -0
- package/dist/components/navigation/sidebar/sidebar-section.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/sidebar-section.js +56 -0
- package/dist/components/navigation/sidebar/sidebar-section.js.map +1 -0
- package/dist/components/navigation/sidebar/sidebar.d.ts +2 -0
- package/dist/components/navigation/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/sidebar.js +4 -0
- package/dist/components/navigation/sidebar/sidebar.js.map +1 -0
- package/dist/components/navigation/sidebar/sidebar.native.d.ts +23 -0
- package/dist/components/navigation/sidebar/sidebar.native.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/sidebar.native.js +80 -0
- package/dist/components/navigation/sidebar/sidebar.native.js.map +1 -0
- package/dist/components/navigation/sidebar/sidebar.web.d.ts +26 -0
- package/dist/components/navigation/sidebar/sidebar.web.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/sidebar.web.js +90 -0
- package/dist/components/navigation/sidebar/sidebar.web.js.map +1 -0
- package/dist/components/navigation/themed-stack.d.ts +25 -0
- package/dist/components/navigation/themed-stack.d.ts.map +1 -0
- package/dist/components/navigation/themed-stack.js +37 -0
- package/dist/components/navigation/themed-stack.js.map +1 -0
- package/dist/components/shared/index.d.ts +3 -0
- package/dist/components/shared/index.d.ts.map +1 -0
- package/dist/components/shared/index.js +2 -0
- package/dist/components/shared/index.js.map +1 -0
- package/dist/components/shared/types.d.ts +82 -0
- package/dist/components/shared/types.d.ts.map +1 -0
- package/dist/components/shared/types.js +2 -0
- package/dist/components/shared/types.js.map +1 -0
- package/dist/components/shared/utils.d.ts +19 -0
- package/dist/components/shared/utils.d.ts.map +1 -0
- package/dist/components/shared/utils.js +23 -0
- package/dist/components/shared/utils.js.map +1 -0
- package/dist/components/ui/button.d.ts +132 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +252 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/chip.d.ts +88 -0
- package/dist/components/ui/chip.d.ts.map +1 -0
- package/dist/components/ui/chip.js +129 -0
- package/dist/components/ui/chip.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +88 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +66 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/container.d.ts +31 -0
- package/dist/components/ui/container.d.ts.map +1 -0
- package/dist/components/ui/container.js +46 -0
- package/dist/components/ui/container.js.map +1 -0
- package/dist/components/ui/fab.d.ts +51 -0
- package/dist/components/ui/fab.d.ts.map +1 -0
- package/dist/components/ui/fab.js +142 -0
- package/dist/components/ui/fab.js.map +1 -0
- package/dist/components/ui/index.d.ts +23 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +22 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/components/ui/screen.d.ts +40 -0
- package/dist/components/ui/screen.d.ts.map +1 -0
- package/dist/components/ui/screen.js +57 -0
- package/dist/components/ui/screen.js.map +1 -0
- package/dist/components/ui/slider.d.ts +47 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +41 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/themed-image.d.ts +7 -0
- package/dist/components/ui/themed-image.d.ts.map +1 -0
- package/dist/components/ui/themed-image.js +9 -0
- package/dist/components/ui/themed-image.js.map +1 -0
- package/dist/components/ui/themed-view.d.ts +20 -0
- package/dist/components/ui/themed-view.d.ts.map +1 -0
- package/dist/components/ui/themed-view.js +75 -0
- package/dist/components/ui/themed-view.js.map +1 -0
- package/dist/components/ui/typography.d.ts +110 -0
- package/dist/components/ui/typography.d.ts.map +1 -0
- package/dist/components/ui/typography.js +69 -0
- package/dist/components/ui/typography.js.map +1 -0
- package/dist/context/layout-context.d.ts +66 -0
- package/dist/context/layout-context.d.ts.map +1 -0
- package/dist/context/layout-context.js +83 -0
- package/dist/context/layout-context.js.map +1 -0
- package/dist/context/scroll-context.d.ts +8 -0
- package/dist/context/scroll-context.d.ts.map +1 -0
- package/dist/context/scroll-context.js +16 -0
- package/dist/context/scroll-context.js.map +1 -0
- package/dist/context/sidebar-context.d.ts +74 -0
- package/dist/context/sidebar-context.d.ts.map +1 -0
- package/dist/context/sidebar-context.js +95 -0
- package/dist/context/sidebar-context.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +5 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-breakpoint.d.ts +8 -0
- package/dist/hooks/use-breakpoint.d.ts.map +1 -0
- package/dist/hooks/use-breakpoint.js +10 -0
- package/dist/hooks/use-breakpoint.js.map +1 -0
- package/dist/hooks/use-dimensions.d.ts +31 -0
- package/dist/hooks/use-dimensions.d.ts.map +1 -0
- package/dist/hooks/use-dimensions.js +44 -0
- package/dist/hooks/use-dimensions.js.map +1 -0
- package/dist/hooks/use-route-navigation.d.ts +19 -0
- package/dist/hooks/use-route-navigation.d.ts.map +1 -0
- package/dist/hooks/use-route-navigation.js +25 -0
- package/dist/hooks/use-route-navigation.js.map +1 -0
- package/dist/icons/icon-utils.d.ts +24 -0
- package/dist/icons/icon-utils.d.ts.map +1 -0
- package/dist/icons/icon-utils.js +57 -0
- package/dist/icons/icon-utils.js.map +1 -0
- package/dist/icons/index.d.ts +13 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +12 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/theme/high-contrast-theme.d.ts +19 -0
- package/dist/theme/high-contrast-theme.d.ts.map +1 -0
- package/dist/theme/high-contrast-theme.js +257 -0
- package/dist/theme/high-contrast-theme.js.map +1 -0
- package/dist/theme/index.d.ts +5 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +6 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/theme-config.d.ts +150 -0
- package/dist/theme/theme-config.d.ts.map +1 -0
- package/dist/theme/theme-config.js +318 -0
- package/dist/theme/theme-config.js.map +1 -0
- package/dist/theme/theme.d.ts +106 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/theme.js +135 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/utils/contrast-checker.d.ts +51 -0
- package/dist/utils/contrast-checker.d.ts.map +1 -0
- package/dist/utils/contrast-checker.js +97 -0
- package/dist/utils/contrast-checker.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Sidebar context state
|
|
4
|
+
*/
|
|
5
|
+
export interface SidebarContextType {
|
|
6
|
+
/** Whether the sidebar/drawer is currently open */
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
/** Open the sidebar/drawer */
|
|
9
|
+
open: () => void;
|
|
10
|
+
/** Close the sidebar/drawer */
|
|
11
|
+
close: () => void;
|
|
12
|
+
/** Toggle sidebar/drawer open/closed */
|
|
13
|
+
toggle: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface SidebarProviderProps {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
/** Initial open state. @default false */
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Sidebar state provider component.
|
|
22
|
+
* Wrap your app with this to enable useSidebar() hook.
|
|
23
|
+
*
|
|
24
|
+
* Note: This is automatically included in ZeroToApp provider,
|
|
25
|
+
* so you typically don't need to wrap your app with this directly.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <SidebarProvider>
|
|
30
|
+
* <App />
|
|
31
|
+
* </SidebarProvider>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare const SidebarProvider: React.FC<SidebarProviderProps>;
|
|
35
|
+
/**
|
|
36
|
+
* Hook to access sidebar state and controls.
|
|
37
|
+
* Must be used within a SidebarProvider (automatically included in ZeroToApp).
|
|
38
|
+
*
|
|
39
|
+
* @returns Sidebar context with isOpen state and control functions
|
|
40
|
+
* @throws Error if used outside of SidebarProvider
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* function MyComponent() {
|
|
45
|
+
* const { isOpen, open, close, toggle } = useSidebar();
|
|
46
|
+
*
|
|
47
|
+
* return (
|
|
48
|
+
* <View>
|
|
49
|
+
* <Button title="Toggle Menu" onPress={toggle} />
|
|
50
|
+
* <Button title="Open Menu" onPress={open} />
|
|
51
|
+
* {isOpen && <Text>Sidebar is open!</Text>}
|
|
52
|
+
* </View>
|
|
53
|
+
* );
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* // Close sidebar when navigating
|
|
60
|
+
* function SidebarMenuItem({ href }: { href: string }) {
|
|
61
|
+
* const { close } = useSidebar();
|
|
62
|
+
* const router = useRouter();
|
|
63
|
+
*
|
|
64
|
+
* const handlePress = () => {
|
|
65
|
+
* router.push(href);
|
|
66
|
+
* close();
|
|
67
|
+
* };
|
|
68
|
+
*
|
|
69
|
+
* return <Button onPress={handlePress} />;
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare const useSidebar: () => SidebarContextType;
|
|
74
|
+
//# sourceMappingURL=sidebar-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-context.d.ts","sourceRoot":"","sources":["../../context/sidebar-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,MAAM,EAAE,OAAO,CAAC;IAChB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,wCAAwC;IACxC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAQD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8B1D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,UAAU,QAAO,kBAoB7B,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useState, useContext, useCallback } from 'react';
|
|
3
|
+
// Sentinel value to detect missing provider
|
|
4
|
+
const MISSING_PROVIDER = Symbol('MISSING_PROVIDER');
|
|
5
|
+
// Create context with sentinel
|
|
6
|
+
const SidebarContext = createContext(MISSING_PROVIDER);
|
|
7
|
+
/**
|
|
8
|
+
* Sidebar state provider component.
|
|
9
|
+
* Wrap your app with this to enable useSidebar() hook.
|
|
10
|
+
*
|
|
11
|
+
* Note: This is automatically included in ZeroToApp provider,
|
|
12
|
+
* so you typically don't need to wrap your app with this directly.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <SidebarProvider>
|
|
17
|
+
* <App />
|
|
18
|
+
* </SidebarProvider>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export const SidebarProvider = ({ children, defaultOpen = false }) => {
|
|
22
|
+
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
23
|
+
const open = useCallback(() => {
|
|
24
|
+
setIsOpen(true);
|
|
25
|
+
}, []);
|
|
26
|
+
const close = useCallback(() => {
|
|
27
|
+
setIsOpen(false);
|
|
28
|
+
}, []);
|
|
29
|
+
const toggle = useCallback(() => {
|
|
30
|
+
setIsOpen(prev => !prev);
|
|
31
|
+
}, []);
|
|
32
|
+
const value = {
|
|
33
|
+
isOpen,
|
|
34
|
+
open,
|
|
35
|
+
close,
|
|
36
|
+
toggle,
|
|
37
|
+
};
|
|
38
|
+
return (_jsx(SidebarContext.Provider, { value: value, children: children }));
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Hook to access sidebar state and controls.
|
|
42
|
+
* Must be used within a SidebarProvider (automatically included in ZeroToApp).
|
|
43
|
+
*
|
|
44
|
+
* @returns Sidebar context with isOpen state and control functions
|
|
45
|
+
* @throws Error if used outside of SidebarProvider
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* function MyComponent() {
|
|
50
|
+
* const { isOpen, open, close, toggle } = useSidebar();
|
|
51
|
+
*
|
|
52
|
+
* return (
|
|
53
|
+
* <View>
|
|
54
|
+
* <Button title="Toggle Menu" onPress={toggle} />
|
|
55
|
+
* <Button title="Open Menu" onPress={open} />
|
|
56
|
+
* {isOpen && <Text>Sidebar is open!</Text>}
|
|
57
|
+
* </View>
|
|
58
|
+
* );
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* // Close sidebar when navigating
|
|
65
|
+
* function SidebarMenuItem({ href }: { href: string }) {
|
|
66
|
+
* const { close } = useSidebar();
|
|
67
|
+
* const router = useRouter();
|
|
68
|
+
*
|
|
69
|
+
* const handlePress = () => {
|
|
70
|
+
* router.push(href);
|
|
71
|
+
* close();
|
|
72
|
+
* };
|
|
73
|
+
*
|
|
74
|
+
* return <Button onPress={handlePress} />;
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export const useSidebar = () => {
|
|
79
|
+
const context = useContext(SidebarContext);
|
|
80
|
+
if (context === MISSING_PROVIDER) {
|
|
81
|
+
throw new Error('useSidebar must be used within a SidebarProvider.\n\n' +
|
|
82
|
+
'SidebarProvider is automatically included in ZeroToApp:\n\n' +
|
|
83
|
+
' import { ZeroToApp, createBrand } from "zero-to-app";\n\n' +
|
|
84
|
+
' const brand = createBrand({ ... });\n\n' +
|
|
85
|
+
' function App() {\n' +
|
|
86
|
+
' return (\n' +
|
|
87
|
+
' <ZeroToApp brand={brand}>\n' +
|
|
88
|
+
' <YourComponent />\n' +
|
|
89
|
+
' </ZeroToApp>\n' +
|
|
90
|
+
' );\n' +
|
|
91
|
+
' }');
|
|
92
|
+
}
|
|
93
|
+
return context;
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=sidebar-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-context.js","sourceRoot":"","sources":["../../context/sidebar-context.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAgBhF,4CAA4C;AAC5C,MAAM,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAEpD,+BAA+B;AAC/B,MAAM,cAAc,GAAG,aAAa,CAA+C,gBAAgB,CAAC,CAAC;AAQrG;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,QAAQ,EACR,WAAW,GAAG,KAAK,EACpB,EAAE,EAAE;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAElD,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE;QAC5B,SAAS,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,SAAS,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,KAAK,GAAuB;QAChC,MAAM;QACN,IAAI;QACJ,KAAK;QACL,MAAM;KACP,CAAC;IAEF,OAAO,CACL,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAClC,QAAQ,GACe,CAC3B,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAAuB,EAAE;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE3C,IAAI,OAAO,KAAK,gBAAgB,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb,uDAAuD;YACrD,6DAA6D;YAC7D,6DAA6D;YAC7D,2CAA2C;YAC3C,sBAAsB;YACtB,gBAAgB;YAChB,mCAAmC;YACnC,6BAA6B;YAC7B,sBAAsB;YACtB,UAAU;YACV,KAAK,CACR,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../hooks/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../hooks/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { breakpoints } from './use-dimensions';
|
|
2
|
+
import type { Breakpoint } from './use-dimensions';
|
|
3
|
+
/**
|
|
4
|
+
* Helper hook to check if current width meets a named breakpoint
|
|
5
|
+
*/
|
|
6
|
+
export declare function useBreakpoint(name: Breakpoint): boolean;
|
|
7
|
+
export { breakpoints };
|
|
8
|
+
//# sourceMappingURL=use-breakpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-breakpoint.d.ts","sourceRoot":"","sources":["../../hooks/use-breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAGvD;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useDimensions, breakpoints } from './use-dimensions';
|
|
2
|
+
/**
|
|
3
|
+
* Helper hook to check if current width meets a named breakpoint
|
|
4
|
+
*/
|
|
5
|
+
export function useBreakpoint(name) {
|
|
6
|
+
const { width } = useDimensions();
|
|
7
|
+
return width >= breakpoints[name];
|
|
8
|
+
}
|
|
9
|
+
export { breakpoints };
|
|
10
|
+
//# sourceMappingURL=use-breakpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-breakpoint.js","sourceRoot":"","sources":["../../hooks/use-breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAgB;IAC5C,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,EAAE,CAAC;IAClC,OAAO,KAAK,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoints for responsive design (sizing only)
|
|
3
|
+
*/
|
|
4
|
+
export declare const breakpoints: {
|
|
5
|
+
small: number;
|
|
6
|
+
medium: number;
|
|
7
|
+
large: number;
|
|
8
|
+
xlarge: number;
|
|
9
|
+
};
|
|
10
|
+
export type Breakpoint = 'small' | 'medium' | 'large' | 'xlarge';
|
|
11
|
+
export interface DimensionsInfo {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
breakpoint: Breakpoint;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Unified hook that provides window dimensions and breakpoint information
|
|
18
|
+
* Focuses on sizing decisions only - no duplicate semantic abstractions
|
|
19
|
+
* Platform checks should use React Native Platform.OS directly
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* const dimensions = useDimensions();
|
|
23
|
+
* if (dimensions.width > breakpoints.medium) { ... }
|
|
24
|
+
* if (dimensions.breakpoint !== 'small') { ... }
|
|
25
|
+
*
|
|
26
|
+
* // For platform-specific logic:
|
|
27
|
+
* import { Platform } from 'react-native';
|
|
28
|
+
* if (Platform.OS === 'web' && dimensions.breakpoint === 'small') { ... }
|
|
29
|
+
*/
|
|
30
|
+
export declare const useDimensions: () => DimensionsInfo;
|
|
31
|
+
//# sourceMappingURL=use-dimensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-dimensions.d.ts","sourceRoot":"","sources":["../../hooks/use-dimensions.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,QAAO,cAkBhC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useWindowDimensions } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Breakpoints for responsive design (sizing only)
|
|
4
|
+
*/
|
|
5
|
+
export const breakpoints = {
|
|
6
|
+
small: 480,
|
|
7
|
+
medium: 768,
|
|
8
|
+
large: 1024,
|
|
9
|
+
xlarge: 1280,
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Unified hook that provides window dimensions and breakpoint information
|
|
13
|
+
* Focuses on sizing decisions only - no duplicate semantic abstractions
|
|
14
|
+
* Platform checks should use React Native Platform.OS directly
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const dimensions = useDimensions();
|
|
18
|
+
* if (dimensions.width > breakpoints.medium) { ... }
|
|
19
|
+
* if (dimensions.breakpoint !== 'small') { ... }
|
|
20
|
+
*
|
|
21
|
+
* // For platform-specific logic:
|
|
22
|
+
* import { Platform } from 'react-native';
|
|
23
|
+
* if (Platform.OS === 'web' && dimensions.breakpoint === 'small') { ... }
|
|
24
|
+
*/
|
|
25
|
+
export const useDimensions = () => {
|
|
26
|
+
const { width, height } = useWindowDimensions();
|
|
27
|
+
// Determine breakpoint based on width
|
|
28
|
+
let breakpoint = 'small';
|
|
29
|
+
if (width >= breakpoints.xlarge) {
|
|
30
|
+
breakpoint = 'xlarge';
|
|
31
|
+
}
|
|
32
|
+
else if (width >= breakpoints.large) {
|
|
33
|
+
breakpoint = 'large';
|
|
34
|
+
}
|
|
35
|
+
else if (width >= breakpoints.medium) {
|
|
36
|
+
breakpoint = 'medium';
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
width,
|
|
40
|
+
height,
|
|
41
|
+
breakpoint,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=use-dimensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-dimensions.js","sourceRoot":"","sources":["../../hooks/use-dimensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;CACb,CAAC;AAUF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAmB,EAAE;IAChD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhD,sCAAsC;IACtC,IAAI,UAAU,GAAe,OAAO,CAAC;IACrC,IAAI,KAAK,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;QAChC,UAAU,GAAG,QAAQ,CAAC;IACxB,CAAC;SAAM,IAAI,KAAK,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;QACtC,UAAU,GAAG,OAAO,CAAC;IACvB,CAAC;SAAM,IAAI,KAAK,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;QACvC,UAAU,GAAG,QAAQ,CAAC;IACxB,CAAC;IAED,OAAO;QACL,KAAK;QACL,MAAM;QACN,UAAU;KACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface IsActiveOptions {
|
|
2
|
+
/** Require exact path match instead of startsWith. @default false */
|
|
3
|
+
exact?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface RouteNavigation {
|
|
6
|
+
pathname: string;
|
|
7
|
+
isActive: (route: string, options?: IsActiveOptions) => boolean;
|
|
8
|
+
navigateTo: (route: string) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Provides route-aware navigation helpers for sidebar and nav components.
|
|
12
|
+
* Wraps expo-router's usePathname + useRouter into reusable utilities.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const { isActive, navigateTo } = useRouteNavigation();
|
|
16
|
+
* <SidebarItem active={isActive('/explore', { exact: true })} onPress={() => navigateTo('/explore')} />
|
|
17
|
+
*/
|
|
18
|
+
export declare function useRouteNavigation(): RouteNavigation;
|
|
19
|
+
//# sourceMappingURL=use-route-navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-route-navigation.d.ts","sourceRoot":"","sources":["../../hooks/use-route-navigation.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,KAAK,OAAO,CAAC;IAChE,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,CAiBpD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { usePathname, useRouter } from 'expo-router';
|
|
2
|
+
/**
|
|
3
|
+
* Provides route-aware navigation helpers for sidebar and nav components.
|
|
4
|
+
* Wraps expo-router's usePathname + useRouter into reusable utilities.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const { isActive, navigateTo } = useRouteNavigation();
|
|
8
|
+
* <SidebarItem active={isActive('/explore', { exact: true })} onPress={() => navigateTo('/explore')} />
|
|
9
|
+
*/
|
|
10
|
+
export function useRouteNavigation() {
|
|
11
|
+
const pathname = usePathname();
|
|
12
|
+
const router = useRouter();
|
|
13
|
+
const isActive = (route, options) => {
|
|
14
|
+
const currentPath = typeof pathname === 'string' ? pathname : '';
|
|
15
|
+
if (options?.exact) {
|
|
16
|
+
return currentPath === route;
|
|
17
|
+
}
|
|
18
|
+
return currentPath === route || currentPath.startsWith(route + '/');
|
|
19
|
+
};
|
|
20
|
+
const navigateTo = (route) => {
|
|
21
|
+
router.push(route);
|
|
22
|
+
};
|
|
23
|
+
return { pathname, isActive, navigateTo };
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=use-route-navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-route-navigation.js","sourceRoot":"","sources":["../../hooks/use-route-navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAarD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,OAAyB,EAAW,EAAE;QACrE,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,OAAO,WAAW,KAAK,KAAK,CAAC;QAC/B,CAAC;QACD,OAAO,WAAW,KAAK,KAAK,IAAI,WAAW,CAAC,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;IACtE,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,CAAC,KAAa,EAAQ,EAAE;QACzC,MAAM,CAAC,IAAI,CAAC,KAAY,CAAC,CAAC;IAC5B,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as Icons from '@expo/vector-icons';
|
|
3
|
+
import { PlatformIcon, IconLibrary } from '../brand/brand-types';
|
|
4
|
+
type IconLibraryType = keyof typeof Icons;
|
|
5
|
+
/**
|
|
6
|
+
* Normalizes icon configuration to PlatformIcon format
|
|
7
|
+
* Handles backward compatibility with string format
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeIcon(icon: PlatformIcon | string | undefined, defaultLibrary?: IconLibrary): {
|
|
10
|
+
library: IconLibraryType;
|
|
11
|
+
name: string;
|
|
12
|
+
} | null;
|
|
13
|
+
/**
|
|
14
|
+
* Renders an icon component based on library and name
|
|
15
|
+
* Returns null if icon config is invalid
|
|
16
|
+
*/
|
|
17
|
+
export declare function renderIcon(icon: PlatformIcon | string | undefined, defaultLibrary?: IconLibrary, size?: number, color?: string): React.ReactElement | null;
|
|
18
|
+
/**
|
|
19
|
+
* Gets icon name for Feather icon type casting
|
|
20
|
+
* Used for components that specifically need Feather icons
|
|
21
|
+
*/
|
|
22
|
+
export declare function getFeatherIconName(icon: PlatformIcon | string | undefined, defaultLibrary?: IconLibrary): string;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=icon-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-utils.d.ts","sourceRoot":"","sources":["../../icons/icon-utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEjE,KAAK,eAAe,GAAG,MAAM,OAAO,KAAK,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,EACvC,cAAc,GAAE,WAAuB,GACtC;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAanD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,EACvC,cAAc,GAAE,WAAuB,EACvC,IAAI,GAAE,MAAW,EACjB,KAAK,CAAC,EAAE,MAAM,GACb,KAAK,CAAC,YAAY,GAAG,IAAI,CAgB3B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,EACvC,cAAc,GAAE,WAAuB,GACtC,MAAM,CAcR"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as Icons from '@expo/vector-icons';
|
|
3
|
+
/**
|
|
4
|
+
* Normalizes icon configuration to PlatformIcon format
|
|
5
|
+
* Handles backward compatibility with string format
|
|
6
|
+
*/
|
|
7
|
+
export function normalizeIcon(icon, defaultLibrary = 'Feather') {
|
|
8
|
+
if (!icon)
|
|
9
|
+
return null;
|
|
10
|
+
// String format (backward compatible) - assume default library
|
|
11
|
+
if (typeof icon === 'string') {
|
|
12
|
+
return { library: defaultLibrary, name: icon };
|
|
13
|
+
}
|
|
14
|
+
// PlatformIcon format - use specified library or default
|
|
15
|
+
return {
|
|
16
|
+
library: (icon.library || defaultLibrary),
|
|
17
|
+
name: icon.name,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Renders an icon component based on library and name
|
|
22
|
+
* Returns null if icon config is invalid
|
|
23
|
+
*/
|
|
24
|
+
export function renderIcon(icon, defaultLibrary = 'Feather', size = 20, color) {
|
|
25
|
+
const normalized = normalizeIcon(icon, defaultLibrary);
|
|
26
|
+
if (!normalized)
|
|
27
|
+
return null;
|
|
28
|
+
const { library, name } = normalized;
|
|
29
|
+
const IconComponent = Icons[library];
|
|
30
|
+
if (!IconComponent) {
|
|
31
|
+
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
32
|
+
console.warn(`Icon library "${library}" not found. Falling back to Feather.`);
|
|
33
|
+
}
|
|
34
|
+
const FeatherIcon = Icons.Feather;
|
|
35
|
+
return React.createElement(FeatherIcon, { name, size, color });
|
|
36
|
+
}
|
|
37
|
+
return React.createElement(IconComponent, { name, size, color });
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets icon name for Feather icon type casting
|
|
41
|
+
* Used for components that specifically need Feather icons
|
|
42
|
+
*/
|
|
43
|
+
export function getFeatherIconName(icon, defaultLibrary = 'Feather') {
|
|
44
|
+
const normalized = normalizeIcon(icon, defaultLibrary);
|
|
45
|
+
if (!normalized)
|
|
46
|
+
return 'circle';
|
|
47
|
+
// If library is not Feather, we can't use it as Feather icon name
|
|
48
|
+
// Return a fallback
|
|
49
|
+
if (normalized.library !== 'Feather') {
|
|
50
|
+
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
51
|
+
console.warn(`Icon library "${normalized.library}" cannot be used as Feather icon. Using fallback.`);
|
|
52
|
+
}
|
|
53
|
+
return 'circle';
|
|
54
|
+
}
|
|
55
|
+
return normalized.name;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=icon-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-utils.js","sourceRoot":"","sources":["../../icons/icon-utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAK5C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAuC,EACvC,iBAA8B,SAAS;IAEvC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,+DAA+D;IAC/D,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,EAAE,OAAO,EAAE,cAAiC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACpE,CAAC;IAED,yDAAyD;IACzD,OAAO;QACL,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,cAAc,CAAoB;QAC5D,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CACxB,IAAuC,EACvC,iBAA8B,SAAS,EACvC,OAAe,EAAE,EACjB,KAAc;IAEd,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACvD,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC;IAE7B,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;IACrC,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IAErC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,EAAE,CAAC;YAC9C,OAAO,CAAC,IAAI,CAAC,iBAAiB,OAAO,uCAAuC,CAAC,CAAC;QAChF,CAAC;QACD,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC;QAClC,OAAO,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAA8C,CAAC,CAAC;IAC7G,CAAC;IAED,OAAO,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgD,CAAC,CAAC;AACjH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAAuC,EACvC,iBAA8B,SAAS;IAEvC,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACvD,IAAI,CAAC,UAAU;QAAE,OAAO,QAAQ,CAAC;IAEjC,kEAAkE;IAClE,oBAAoB;IACpB,IAAI,UAAU,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACrC,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,EAAE,CAAC;YAC9C,OAAO,CAAC,IAAI,CAAC,iBAAiB,UAAU,CAAC,OAAO,mDAAmD,CAAC,CAAC;QACvG,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,UAAU,CAAC,IAAI,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon utilities for zero-to-app
|
|
3
|
+
*
|
|
4
|
+
* Provides cross-platform icon rendering utilities that work with:
|
|
5
|
+
* - SF Symbols on iOS
|
|
6
|
+
* - Material Design icons on Android
|
|
7
|
+
* - Any @expo/vector-icons library on web
|
|
8
|
+
*
|
|
9
|
+
* @module icons
|
|
10
|
+
*/
|
|
11
|
+
export { normalizeIcon, renderIcon, getFeatherIconName } from './icon-utils';
|
|
12
|
+
export type { PlatformIcon, IconLibrary } from '../brand/brand-types';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../icons/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC7E,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon utilities for zero-to-app
|
|
3
|
+
*
|
|
4
|
+
* Provides cross-platform icon rendering utilities that work with:
|
|
5
|
+
* - SF Symbols on iOS
|
|
6
|
+
* - Material Design icons on Android
|
|
7
|
+
* - Any @expo/vector-icons library on web
|
|
8
|
+
*
|
|
9
|
+
* @module icons
|
|
10
|
+
*/
|
|
11
|
+
export { normalizeIcon, renderIcon, getFeatherIconName } from './icon-utils';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../icons/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './brand';
|
|
2
|
+
export * from './theme';
|
|
3
|
+
export * from './components';
|
|
4
|
+
export * from './hooks';
|
|
5
|
+
export * from './icons';
|
|
6
|
+
export { ScrollProvider, useScrollContext } from './context/scroll-context';
|
|
7
|
+
export { useSidebar, type SidebarContextType } from './context/sidebar-context';
|
|
8
|
+
export { useLayout, type LayoutContextType } from './context/layout-context';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAE7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Main barrel export for zero-to-app design system
|
|
2
|
+
// Re-export everything from submodules
|
|
3
|
+
export * from './brand';
|
|
4
|
+
export * from './theme';
|
|
5
|
+
export * from './components';
|
|
6
|
+
// Chat components are now exported via components
|
|
7
|
+
export * from './hooks';
|
|
8
|
+
export * from './icons';
|
|
9
|
+
export { ScrollProvider, useScrollContext } from './context/scroll-context';
|
|
10
|
+
export { useSidebar } from './context/sidebar-context';
|
|
11
|
+
export { useLayout } from './context/layout-context';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,uCAAuC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,kDAAkD;AAClD,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAA2B,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,SAAS,EAA0B,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* High Contrast Theme Support
|
|
3
|
+
* Provides enhanced contrast for accessibility
|
|
4
|
+
*/
|
|
5
|
+
import { ThemeValuesType } from './theme-config';
|
|
6
|
+
import type { Brand } from '../brand';
|
|
7
|
+
/**
|
|
8
|
+
* Creates a high-contrast light theme
|
|
9
|
+
* @param brand Brand configuration
|
|
10
|
+
* @returns High-contrast theme values
|
|
11
|
+
*/
|
|
12
|
+
export declare function createHighContrastLightTheme(brand: Brand): ThemeValuesType;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a high-contrast dark theme
|
|
15
|
+
* @param brand Brand configuration
|
|
16
|
+
* @returns High-contrast dark theme values
|
|
17
|
+
*/
|
|
18
|
+
export declare function createHighContrastDarkTheme(brand: Brand): ThemeValuesType;
|
|
19
|
+
//# sourceMappingURL=high-contrast-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"high-contrast-theme.d.ts","sourceRoot":"","sources":["../../theme/high-contrast-theme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe,CAwH1E;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe,CAyHzE"}
|