@ecomiq/storefront 0.1.0 → 0.1.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.
@@ -4330,4 +4330,4 @@ declare function storefrontFaviconUrl(settings: StorefrontSettings | null | unde
4330
4330
  /** Imagen social / OG: branding, luego logo de tienda. */
4331
4331
  declare function storefrontOgImageUrl(settings: StorefrontSettings | null | undefined): string | null;
4332
4332
 
4333
- export { StorefrontProductDetailSchema as A, StorefrontPriceTierSchema as B, StorefrontBundleItemSchema as C, StorefrontCollectionSchema as D, StorefrontCollectionsResponseSchema as E, StorefrontCollectionDetailSchema as F, StorefrontSettingsSchema as G, StorefrontStoreSchema as H, StorefrontCheckoutSettingsSchema as I, StorefrontSettingsLegacyFlatSchema as J, storefrontStoreRecord as K, storefrontFaviconUrl as L, storefrontOgImageUrl as M, normalizeStorefrontSettingsPayload as N, type ProductsFilters as P, type StorefrontSettings as S, type StorefrontProduct as a, type StorefrontProductDetail as b, type StorefrontCollection as c, type StorefrontProductsParamsInput as d, type Product as e, type ProductVariant as f, type ProductsResponse as g, type StorefrontProductsResponse as h, type StorefrontVariant as i, type StorefrontVariantOption as j, type StorefrontProductImage as k, type StorefrontPriceTier as l, type StorefrontBundleItem as m, type StorefrontCollectionsResponse as n, type StorefrontCollectionDetail as o, type StorefrontStore as p, type StorefrontCmsSettings as q, type StorefrontCmsPage as r, type StorefrontSettingsLegacyFlat as s, ProductSchema as t, ProductVariantSchema as u, ProductsResponseSchema as v, ProductsFiltersSchema as w, StorefrontProductSchema as x, StorefrontProductsResponseSchema as y, StorefrontProductsParamsSchema as z };
4333
+ export { StorefrontProductDetailSchema as A, StorefrontPriceTierSchema as B, StorefrontBundleItemSchema as C, StorefrontCollectionSchema as D, StorefrontCollectionsResponseSchema as E, StorefrontCollectionDetailSchema as F, StorefrontSettingsSchema as G, StorefrontStoreSchema as H, StorefrontCheckoutSettingsSchema as I, StorefrontSettingsLegacyFlatSchema as J, storefrontStoreRecord as K, storefrontFaviconUrl as L, storefrontOgImageUrl as M, normalizeStorefrontSettingsPayload as N, type ProductsFilters as P, type StorefrontSettings as S, type StorefrontProductsParamsInput as a, type Product as b, type ProductVariant as c, type ProductsResponse as d, type StorefrontProduct as e, type StorefrontProductsResponse as f, type StorefrontProductDetail as g, type StorefrontVariant as h, type StorefrontVariantOption as i, type StorefrontProductImage as j, type StorefrontPriceTier as k, type StorefrontBundleItem as l, type StorefrontCollection as m, type StorefrontCollectionsResponse as n, type StorefrontCollectionDetail as o, type StorefrontStore as p, type StorefrontCmsSettings as q, type StorefrontCmsPage as r, type StorefrontSettingsLegacyFlat as s, ProductSchema as t, ProductVariantSchema as u, ProductsResponseSchema as v, ProductsFiltersSchema as w, StorefrontProductSchema as x, StorefrontProductsResponseSchema as y, StorefrontProductsParamsSchema as z };
package/package.json CHANGED
@@ -50,7 +50,7 @@
50
50
  "optional": true
51
51
  }
52
52
  },
53
- "version": "0.1.0",
53
+ "version": "0.1.1",
54
54
  "dependencies": {
55
55
  "@opennextjs/cloudflare": "^1.3.1",
56
56
  "@hookform/resolvers": "5.0.1",
@@ -1,119 +0,0 @@
1
- import * as zustand from 'zustand';
2
- import { S as StorefrontSettings, a as StorefrontProduct, b as StorefrontProductDetail, c as StorefrontCollection } from './store-CYBCpY6v.js';
3
- import * as react from 'react';
4
- import { ReactNode, ComponentType, JSX } from 'react';
5
- import { StorefrontProductDetail as StorefrontProductDetail$1, StorefrontVariant, StoreTheme, StorefrontSettings as StorefrontSettings$1, StorefrontPageDetail } from '@ecomiq/storefront/react';
6
-
7
- type Drawers = {
8
- cart: boolean;
9
- search: boolean;
10
- menu: boolean;
11
- filter: boolean;
12
- [key: string]: boolean;
13
- };
14
- type Modals = {
15
- login: boolean;
16
- signup: boolean;
17
- [key: string]: boolean;
18
- };
19
- type StoreState = {
20
- data: StorefrontSettings | null;
21
- drawers: Drawers;
22
- modals: Modals;
23
- openDrawer: (drawer: keyof Drawers) => void;
24
- closeDrawer: (drawer: keyof Drawers) => void;
25
- toggleDrawer: (drawer: keyof Drawers) => void;
26
- closeAllDrawers: () => void;
27
- openModal: (modal: keyof Modals) => void;
28
- closeModal: (modal: keyof Modals) => void;
29
- toggleModal: (modal: keyof Modals) => void;
30
- closeAllModals: () => void;
31
- };
32
- declare const useStore: zustand.UseBoundStore<zustand.StoreApi<StoreState>>;
33
-
34
- type CmsRenderSettings = Record<string, unknown>;
35
- type CmsRenderBlock = {
36
- id?: string;
37
- type: string;
38
- order: number;
39
- settings?: CmsRenderSettings;
40
- };
41
- type CmsRenderSection = {
42
- id?: string;
43
- type: string;
44
- order: number;
45
- settings?: CmsRenderSettings;
46
- blocks?: CmsRenderBlock[];
47
- };
48
- type CmsProduct = StorefrontProduct | StorefrontProductDetail;
49
- type CmsSectionData = {
50
- products?: CmsProduct[];
51
- collections?: StorefrontCollection[];
52
- };
53
- type CmsLinkProps = {
54
- href: string;
55
- className?: string;
56
- children: ReactNode;
57
- };
58
- type CmsSectionsRendererProps = {
59
- sections: CmsRenderSection[];
60
- sectionData?: Record<string, CmsSectionData>;
61
- linkComponent?: ComponentType<CmsLinkProps>;
62
- currency?: string;
63
- preview?: boolean;
64
- wrap?: boolean;
65
- };
66
-
67
- declare function getCmsSectionKey(section: CmsRenderSection, index: number): string;
68
- declare function canonicalSectionType(type: string): string;
69
- declare function storefrontHref(value: string): string;
70
- declare function productSortValue(value: string): string;
71
- declare function sanitizeHtml(html: string): string;
72
- declare const DEFAULT_CMS_IMAGE_URL: string;
73
-
74
- /** Option group derived from variants (e.g. Color: [Black, White], Size: [6x8, 8x11]) */
75
- type OptionGroup = {
76
- key: string;
77
- name: string;
78
- values: string[];
79
- };
80
- /** Selected options per group (e.g. { Color: "Black", Size: "8 x 11 inch" }) */
81
- type SelectedOptions = Record<string, string>;
82
- type ProductVariantSelectorRenderProps = {
83
- product: StorefrontProductDetail$1;
84
- selectedVariant: StorefrontVariant | null;
85
- displayPrice: number;
86
- compareAtPrice: number | null | undefined;
87
- isAvailable: boolean;
88
- selectedOptions: SelectedOptions;
89
- };
90
-
91
- type ProductVariantSelectorProps = {
92
- product: StorefrontProductDetail$1;
93
- currency?: string;
94
- features?: string[];
95
- onVariantChange?: (variant: StorefrontVariant | null, price: number) => void;
96
- children?: (props: {
97
- product: StorefrontProductDetail$1;
98
- selectedVariant: StorefrontVariant | null;
99
- displayPrice: number;
100
- compareAtPrice: number | null | undefined;
101
- isAvailable: boolean;
102
- selectedOptions: SelectedOptions;
103
- }) => React.ReactNode;
104
- };
105
- declare function ProductVariantSelector({ product, currency, features, onVariantChange, children, }: ProductVariantSelectorProps): react.JSX.Element;
106
-
107
- interface ThemeInjectorProps {
108
- theme: StoreTheme;
109
- className?: string;
110
- }
111
- declare function SafeThemeInjector({ theme, className }: ThemeInjectorProps): JSX.Element | null;
112
-
113
- /**
114
- * Busca una página CMS en `settings.cms.pages` (payload de `getPublicStore` / settings)
115
- * y la valida como `StorefrontPageDetail` para `DynamicPage`.
116
- */
117
- declare function findStorefrontCmsPageBySlug(settings: StorefrontSettings$1 | null | undefined, slug: string): StorefrontPageDetail | null;
118
-
119
- export { type CmsSectionsRendererProps as C, DEFAULT_CMS_IMAGE_URL as D, type OptionGroup as O, ProductVariantSelector as P, SafeThemeInjector as S, storefrontHref as a, type CmsLinkProps as b, canonicalSectionType as c, type CmsProduct as d, type CmsRenderBlock as e, findStorefrontCmsPageBySlug as f, getCmsSectionKey as g, type CmsRenderSection as h, type CmsRenderSettings as i, type CmsSectionData as j, type ProductVariantSelectorProps as k, type SelectedOptions as l, type ProductVariantSelectorRenderProps as m, productSortValue as p, sanitizeHtml as s, useStore as u };