@simpleapps-com/augur-hooks 2.4.0 → 2026.11.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/EXPORTS.md +25 -65
- package/README.md +21 -246
- package/dist/checkout/create-checkout-provider.d.ts +25 -0
- package/dist/checkout/create-checkout-provider.d.ts.map +1 -0
- package/dist/checkout/index.cjs +123 -106
- package/dist/checkout/index.cjs.map +1 -1
- package/dist/checkout/index.d.ts +5 -293
- package/dist/checkout/index.d.ts.map +1 -0
- package/dist/checkout/index.js +99 -82
- package/dist/checkout/index.js.map +1 -1
- package/dist/checkout/{index.d.cts → types.d.ts} +18 -40
- package/dist/checkout/types.d.ts.map +1 -0
- package/dist/chunk-6Z6JGK2C.cjs.map +1 -1
- package/dist/chunk-JJX23M5N.js +532 -0
- package/dist/chunk-JJX23M5N.js.map +1 -0
- package/dist/chunk-UZAFXUAO.cjs +532 -0
- package/dist/chunk-UZAFXUAO.cjs.map +1 -0
- package/dist/duration.d.ts +16 -0
- package/dist/duration.d.ts.map +1 -0
- package/dist/hooks/use-cart-actions.d.ts +68 -0
- package/dist/hooks/use-cart-actions.d.ts.map +1 -0
- package/dist/hooks/use-cart-initialization.d.ts +60 -0
- package/dist/hooks/use-cart-initialization.d.ts.map +1 -0
- package/dist/hooks/use-cart-pricing.d.ts +41 -0
- package/dist/hooks/use-cart-pricing.d.ts.map +1 -0
- package/dist/hooks/use-checkout-persistence.d.ts +41 -0
- package/dist/hooks/use-checkout-persistence.d.ts.map +1 -0
- package/dist/hooks/use-debounce.d.ts +6 -0
- package/dist/hooks/use-debounce.d.ts.map +1 -0
- package/dist/hooks/use-format-price.d.ts +29 -0
- package/dist/hooks/use-format-price.d.ts.map +1 -0
- package/dist/hooks/use-latest.d.ts +8 -0
- package/dist/hooks/use-latest.d.ts.map +1 -0
- package/dist/hooks/use-modal-lifecycle.d.ts +11 -0
- package/dist/hooks/use-modal-lifecycle.d.ts.map +1 -0
- package/dist/hooks/use-order-readiness.d.ts +47 -0
- package/dist/hooks/use-order-readiness.d.ts.map +1 -0
- package/dist/hooks/use-pagination-prefetch.d.ts +27 -0
- package/dist/hooks/use-pagination-prefetch.d.ts.map +1 -0
- package/dist/{use-order-readiness-DZTIfRzw.d.ts → hooks/use-payment-flow.d.ts} +23 -67
- package/dist/hooks/use-payment-flow.d.ts.map +1 -0
- package/dist/hooks/use-stock.d.ts +32 -0
- package/dist/hooks/use-stock.d.ts.map +1 -0
- package/dist/index.cjs +227 -184
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +32 -456
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +205 -162
- package/dist/index.js.map +1 -1
- package/dist/persistence/apply-limits.d.ts +8 -0
- package/dist/persistence/apply-limits.d.ts.map +1 -0
- package/dist/persistence/create-persister.d.ts +10 -0
- package/dist/persistence/create-persister.d.ts.map +1 -0
- package/dist/persistence/serializer.d.ts +11 -0
- package/dist/persistence/serializer.d.ts.map +1 -0
- package/dist/persistence/use-persistence.d.ts +59 -0
- package/dist/persistence/use-persistence.d.ts.map +1 -0
- package/dist/persistence/use-storage-monitor.d.ts +11 -0
- package/dist/persistence/use-storage-monitor.d.ts.map +1 -0
- package/dist/provider.d.ts +89 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/queries/batch-query.d.ts +23 -0
- package/dist/queries/batch-query.d.ts.map +1 -0
- package/dist/queries/index.d.ts +3 -0
- package/dist/queries/index.d.ts.map +1 -0
- package/dist/query-action-registry.d.ts +19 -0
- package/dist/query-action-registry.d.ts.map +1 -0
- package/dist/rules.d.ts +133 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/server.cjs +2 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.ts +10 -12
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +2 -1
- package/dist/server.js.map +1 -1
- package/dist/stores/cart-store.d.ts +51 -0
- package/dist/stores/cart-store.d.ts.map +1 -0
- package/dist/stores/items-filters-store.d.ts +30 -0
- package/dist/stores/items-filters-store.d.ts.map +1 -0
- package/dist/types.d.ts +48 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/web/use-image-with-fallback.d.ts +16 -0
- package/dist/web/use-image-with-fallback.d.ts.map +1 -0
- package/dist/web/use-mobile-detection.d.ts +28 -0
- package/dist/web/use-mobile-detection.d.ts.map +1 -0
- package/dist/web/use-mobile-optimized-intersection.d.ts +17 -0
- package/dist/web/use-mobile-optimized-intersection.d.ts.map +1 -0
- package/dist/web.cjs.map +1 -1
- package/dist/web.d.ts +4 -60
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js.map +1 -1
- package/llms.txt +76 -54
- package/package.json +26 -14
- package/dist/batch-query-CTlvxSmL.d.cts +0 -165
- package/dist/batch-query-CTlvxSmL.d.ts +0 -165
- package/dist/chunk-F5DUFW57.cjs +0 -383
- package/dist/chunk-F5DUFW57.cjs.map +0 -1
- package/dist/chunk-JNOHB4OP.js +0 -383
- package/dist/chunk-JNOHB4OP.js.map +0 -1
- package/dist/index.d.cts +0 -456
- package/dist/server.d.cts +0 -44
- package/dist/use-order-readiness-DZTIfRzw.d.cts +0 -137
- package/dist/web.d.cts +0 -60
package/dist/web.d.cts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
import { ImageConfig, ImageUrlOptions } from '@simpleapps-com/augur-utils';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the screen is mobile-sized.
|
|
8
|
-
* Uses `useSyncExternalStore` for proper SSR support.
|
|
9
|
-
*
|
|
10
|
-
* - SSR-safe: returns false on server, updates on client after hydration
|
|
11
|
-
* - Single listener: one resize listener regardless of component count
|
|
12
|
-
* - Throttled: resize events throttled to prevent excessive re-renders
|
|
13
|
-
*/
|
|
14
|
-
declare function useIsMobile(): boolean;
|
|
15
|
-
interface MobileProviderProps {
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Optional provider that tracks hydration state.
|
|
20
|
-
* Wrap your app with this if you need to conditionally render
|
|
21
|
-
* mobile-only content after hydration.
|
|
22
|
-
*/
|
|
23
|
-
declare function MobileProvider({ children }: MobileProviderProps): react_jsx_runtime.JSX.Element;
|
|
24
|
-
/**
|
|
25
|
-
* Returns true only after the client has hydrated.
|
|
26
|
-
* Prevents hydration mismatches with conditional rendering.
|
|
27
|
-
*/
|
|
28
|
-
declare function useIsHydrated(): boolean;
|
|
29
|
-
|
|
30
|
-
interface UseMobileOptimizedIntersectionOptions {
|
|
31
|
-
rootMarginMobile?: string;
|
|
32
|
-
rootMarginDesktop?: string;
|
|
33
|
-
threshold?: number;
|
|
34
|
-
enabled?: boolean;
|
|
35
|
-
mobileBreakpoint?: number;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* IntersectionObserver hook with mobile-optimized root margins.
|
|
39
|
-
* Uses larger margins on mobile for more aggressive prefetching/lazy loading.
|
|
40
|
-
*/
|
|
41
|
-
declare const useMobileOptimizedIntersection: ({ rootMarginMobile, rootMarginDesktop, threshold, enabled, mobileBreakpoint, }?: UseMobileOptimizedIntersectionOptions) => {
|
|
42
|
-
ref: react.RefObject<HTMLDivElement | null>;
|
|
43
|
-
isIntersecting: boolean;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
interface UseImageWithFallbackResult {
|
|
47
|
-
src: string;
|
|
48
|
-
isLoading: boolean;
|
|
49
|
-
hasError: boolean;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Preloads an agr.media image and shows a fallback while loading.
|
|
53
|
-
*
|
|
54
|
-
* 1. Returns the default image immediately.
|
|
55
|
-
* 2. Preloads the real image via `new Image()`.
|
|
56
|
-
* 3. Swaps to the real URL on success; keeps the fallback on error.
|
|
57
|
-
*/
|
|
58
|
-
declare function useImageWithFallback(config: ImageConfig, imagePath: string | undefined, options?: ImageUrlOptions): UseImageWithFallbackResult;
|
|
59
|
-
|
|
60
|
-
export { MobileProvider, useImageWithFallback, useIsHydrated, useIsMobile, useMobileOptimizedIntersection };
|