@ecomiq/storefront 1.1.9 → 2.0.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 +30 -415
- package/bin/ecomiq.mjs +165 -0
- package/package.json +72 -94
- package/src/api-proxy.ts +194 -0
- package/src/auth/create-storefront-auth.ts +35 -0
- package/src/auth/ecomiq-oauth-password-client.ts +26 -0
- package/src/auth/ecomiq-oauth-password-constants.ts +26 -0
- package/src/auth/ecomiq-oauth-password-plugin.ts +299 -0
- package/src/auth/ecomiq-oauth-password-types.ts +25 -0
- package/src/auth/ecomiq-storefront-sign-in.ts +47 -0
- package/src/auth/env.ts +7 -0
- package/src/cart-session.ts +241 -0
- package/src/client.ts +48 -0
- package/src/codegen.mjs +704 -0
- package/src/components/checkout/cart-sync.ts +143 -0
- package/src/components/checkout/checkout-external-update-banner.tsx +15 -0
- package/src/components/checkout/checkout-form-controls.tsx +139 -0
- package/src/components/checkout/checkout-line-items.tsx +43 -0
- package/src/components/checkout/checkout-order-summary.tsx +156 -0
- package/src/components/checkout/checkout-payment-section.tsx +215 -0
- package/src/components/checkout/checkout-session-view.tsx +240 -0
- package/src/components/checkout/checkout-shipping-address-section.tsx +266 -0
- package/src/components/checkout/checkout-shipping-section.tsx +90 -0
- package/src/components/checkout/checkout-states.tsx +73 -0
- package/src/components/checkout/form-schema.ts +229 -0
- package/src/components/checkout/format.ts +27 -0
- package/src/components/checkout/index.ts +51 -0
- package/src/components/checkout/types.ts +43 -0
- package/src/components/checkout/use-checkout-geo.ts +50 -0
- package/src/components/checkout/use-checkout-session.ts +583 -0
- package/src/components/hero.tsx +291 -0
- package/src/config.d.ts +69 -0
- package/src/config.mjs +165 -0
- package/src/index.ts +274 -0
- package/src/link.tsx +2 -0
- package/src/pages/checkout.$checkoutId.tsx +60 -0
- package/src/pages/checkout.tsx +31 -0
- package/src/pages/thank-you.tsx +53 -0
- package/src/providers/auth.tsx +69 -0
- package/src/providers/cart.tsx +275 -0
- package/src/providers/ecomiq.ts +137 -0
- package/src/providers/index.ts +26 -0
- package/src/public-config.ts +44 -0
- package/src/review-submission.ts +89 -0
- package/src/runtime/context.ts +1 -0
- package/src/runtime/default-layout.tsx +80 -0
- package/src/runtime/head.ts +126 -0
- package/src/runtime/page.tsx +82 -0
- package/src/runtime/postcss-browser-stub.mjs +5 -0
- package/src/server-config-store.ts +26 -0
- package/src/server.ts +279 -0
- package/src/styles.css +76 -0
- package/src/ui/badge.tsx +32 -0
- package/src/ui/button.tsx +31 -0
- package/src/ui/card.tsx +31 -0
- package/src/ui/carousel.tsx +218 -0
- package/src/ui/cn.ts +6 -0
- package/src/ui/index.ts +8 -0
- package/src/ui/separator.tsx +6 -0
- package/src/ui/skeleton.tsx +6 -0
- package/src/ui/storefront-error.tsx +49 -0
- package/src/utils.ts +36 -0
- package/src/vite-inline.mjs +135 -0
- package/templates/__root.tsx +77 -0
- package/templates/router.tsx +19 -0
- package/dist/chunk-64GLOWMJ.js +0 -216
- package/dist/chunk-64GLOWMJ.js.map +0 -1
- package/dist/chunk-AKD5IDEB.js +0 -177
- package/dist/chunk-AKD5IDEB.js.map +0 -1
- package/dist/chunk-EFEVJJWF.js +0 -1345
- package/dist/chunk-EFEVJJWF.js.map +0 -1
- package/dist/chunk-NAJQB5DN.js +0 -155
- package/dist/chunk-NAJQB5DN.js.map +0 -1
- package/dist/chunk-OABDGTBI.js +0 -253
- package/dist/chunk-OABDGTBI.js.map +0 -1
- package/dist/chunk-Q4U5OEUT.js +0 -21
- package/dist/chunk-Q4U5OEUT.js.map +0 -1
- package/dist/chunk-S7CPZ4UE.js +0 -6
- package/dist/chunk-S7CPZ4UE.js.map +0 -1
- package/dist/chunks/client.css +0 -984
- package/dist/chunks/client.css.map +0 -1
- package/dist/chunks/client.d.ts +0 -10759
- package/dist/chunks/client.js +0 -5398
- package/dist/chunks/client.js.map +0 -1
- package/dist/chunks/config.d.ts +0 -31
- package/dist/chunks/config.js +0 -5
- package/dist/chunks/config.js.map +0 -1
- package/dist/chunks/core-public.d.ts +0 -130
- package/dist/chunks/core-public.js +0 -92
- package/dist/chunks/core-public.js.map +0 -1
- package/dist/chunks/server-nextjs.d.ts +0 -33
- package/dist/chunks/server-nextjs.js +0 -59
- package/dist/chunks/server-nextjs.js.map +0 -1
- package/dist/chunks/server-tanstack.d.ts +0 -22
- package/dist/chunks/server-tanstack.js +0 -40
- package/dist/chunks/server-tanstack.js.map +0 -1
- package/dist/collection-DU7gREXS.d.ts +0 -4062
- package/dist/ecomiq-oauth-password-plugin-B_gMdGuc.d.ts +0 -3631
- package/dist/ecomiq-shell-ui-SWIFLQVM.js +0 -8
- package/dist/ecomiq-shell-ui-SWIFLQVM.js.map +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.server.d.ts +0 -9
- package/dist/index.server.js +0 -8
- package/dist/index.server.js.map +0 -1
- package/dist/nextjs/api.d.ts +0 -45
- package/dist/nextjs/api.js +0 -32
- package/dist/nextjs/api.js.map +0 -1
- package/dist/nextjs/globals.css +0 -13
- package/dist/nextjs.d.ts +0 -2
- package/dist/nextjs.js +0 -2
- package/dist/nextjs.js.map +0 -1
- package/dist/nextjs.server.d.ts +0 -18
- package/dist/nextjs.server.js +0 -1
- package/dist/nextjs.server.js.map +0 -1
- package/dist/postcss.config.mjs +0 -6
- package/dist/react/checkout-page.css +0 -855
- package/dist/react/client.css +0 -984
- package/dist/react/payment-provider.css +0 -91
- package/dist/react/thank-you-page.css +0 -105
- package/dist/react.d.ts +0 -1
- package/dist/react.js +0 -2
- package/dist/react.js.map +0 -1
- package/dist/store-proxy-handler-CNzKlTFA.d.ts +0 -10
- package/dist/tanstack/api.d.ts +0 -41
- package/dist/tanstack/api.js +0 -30
- package/dist/tanstack/api.js.map +0 -1
- package/dist/tanstack.d.ts +0 -1
- package/dist/tanstack.js +0 -2
- package/dist/tanstack.js.map +0 -1
- package/dist/tanstack.server.d.ts +0 -18
- package/dist/tanstack.server.js +0 -1
- package/dist/tanstack.server.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/npm/stubs/ecomiq-shell-ui.tsx"],"names":[],"mappings":";AACO,SAAS,aAAA,GAAgB;AAC9B,EAAA,OAAO,IAAA;AACT","file":"ecomiq-shell-ui-SWIFLQVM.js","sourcesContent":["/** Stub npm: `withShellUi` no incluye modales del monorepo en el tarball publicado. */\nexport function EcomiqShellUi() {\n return null;\n}\n"]}
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./chunks/core-public.js";
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/index.server.d.ts
DELETED
package/dist/index.server.js
DELETED
package/dist/index.server.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/nextjs/api.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
-
import { S as StoreProxyHandlerConfig } from '../store-proxy-handler-CNzKlTFA.js';
|
|
3
|
-
|
|
4
|
-
type StoreApiHandlerConfig = StoreProxyHandlerConfig;
|
|
5
|
-
/**
|
|
6
|
-
* Crea los handlers de ruta para montar la API de store como proxy en Next.js App Router.
|
|
7
|
-
*
|
|
8
|
-
* ```ts
|
|
9
|
-
* // app/api/store/[...path]/route.ts
|
|
10
|
-
* import { toNextJsStoreApiHandler } from "@ecomiq/storefront/nextjs/api";
|
|
11
|
-
*
|
|
12
|
-
* export const { GET, POST, PUT, PATCH, DELETE } = toNextJsStoreApiHandler({
|
|
13
|
-
* apiBaseUrl: process.env.STOREFRONT_API_URL,
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
declare function toNextJsStoreApiHandler(config?: StoreApiHandlerConfig): {
|
|
18
|
-
GET: (request: NextRequest, context: {
|
|
19
|
-
params: Promise<{
|
|
20
|
-
path?: string[];
|
|
21
|
-
}>;
|
|
22
|
-
}) => Promise<NextResponse>;
|
|
23
|
-
POST: (request: NextRequest, context: {
|
|
24
|
-
params: Promise<{
|
|
25
|
-
path?: string[];
|
|
26
|
-
}>;
|
|
27
|
-
}) => Promise<NextResponse>;
|
|
28
|
-
PUT: (request: NextRequest, context: {
|
|
29
|
-
params: Promise<{
|
|
30
|
-
path?: string[];
|
|
31
|
-
}>;
|
|
32
|
-
}) => Promise<NextResponse>;
|
|
33
|
-
PATCH: (request: NextRequest, context: {
|
|
34
|
-
params: Promise<{
|
|
35
|
-
path?: string[];
|
|
36
|
-
}>;
|
|
37
|
-
}) => Promise<NextResponse>;
|
|
38
|
-
DELETE: (request: NextRequest, context: {
|
|
39
|
-
params: Promise<{
|
|
40
|
-
path?: string[];
|
|
41
|
-
}>;
|
|
42
|
-
}) => Promise<NextResponse>;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { type StoreApiHandlerConfig, toNextJsStoreApiHandler };
|
package/dist/nextjs/api.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { handleStoreProxyRequest } from '../chunk-AKD5IDEB.js';
|
|
2
|
-
import '../chunk-S7CPZ4UE.js';
|
|
3
|
-
import '../chunk-Q4U5OEUT.js';
|
|
4
|
-
import { NextResponse } from 'next/server';
|
|
5
|
-
|
|
6
|
-
function toNextJsStoreApiHandler(config = {}) {
|
|
7
|
-
const handler = async (request, context) => {
|
|
8
|
-
const params = await context.params;
|
|
9
|
-
const pathSegments = params.path ?? [];
|
|
10
|
-
const response = await handleStoreProxyRequest(
|
|
11
|
-
request,
|
|
12
|
-
pathSegments,
|
|
13
|
-
config
|
|
14
|
-
);
|
|
15
|
-
return new NextResponse(response.body, {
|
|
16
|
-
status: response.status,
|
|
17
|
-
statusText: response.statusText,
|
|
18
|
-
headers: response.headers
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
return {
|
|
22
|
-
GET: handler,
|
|
23
|
-
POST: handler,
|
|
24
|
-
PUT: handler,
|
|
25
|
-
PATCH: handler,
|
|
26
|
-
DELETE: handler
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { toNextJsStoreApiHandler };
|
|
31
|
-
//# sourceMappingURL=api.js.map
|
|
32
|
-
//# sourceMappingURL=api.js.map
|
package/dist/nextjs/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/frameworks/nextjs/api/store-handler.ts"],"names":[],"mappings":";;;;;AAqBO,SAAS,uBAAA,CAAwB,MAAA,GAAgC,EAAC,EAAG;AAC1E,EAAA,MAAM,OAAA,GAAU,OACd,OAAA,EACA,OAAA,KAC0B;AAC1B,IAAA,MAAM,MAAA,GAAS,MAAM,OAAA,CAAQ,MAAA;AAC7B,IAAA,MAAM,YAAA,GAAe,MAAA,CAAO,IAAA,IAAQ,EAAC;AACrC,IAAA,MAAM,WAAW,MAAM,uBAAA;AAAA,MACrB,OAAA;AAAA,MACA,YAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,OAAO,IAAI,YAAA,CAAa,QAAA,CAAS,IAAA,EAAM;AAAA,MACrC,QAAQ,QAAA,CAAS,MAAA;AAAA,MACjB,YAAY,QAAA,CAAS,UAAA;AAAA,MACrB,SAAS,QAAA,CAAS;AAAA,KACnB,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,GAAA,EAAK,OAAA;AAAA,IACL,IAAA,EAAM,OAAA;AAAA,IACN,GAAA,EAAK,OAAA;AAAA,IACL,KAAA,EAAO,OAAA;AAAA,IACP,MAAA,EAAQ;AAAA,GACV;AACF","file":"api.js","sourcesContent":["import type { NextRequest } from \"next/server\";\nimport { NextResponse } from \"next/server\";\nimport {\n handleStoreProxyRequest,\n type StoreProxyHandlerConfig,\n} from \"../../../../core/server/store-proxy-handler\";\n\nexport type StoreApiHandlerConfig = StoreProxyHandlerConfig;\n\n/**\n * Crea los handlers de ruta para montar la API de store como proxy en Next.js App Router.\n *\n * ```ts\n * // app/api/store/[...path]/route.ts\n * import { toNextJsStoreApiHandler } from \"@ecomiq/storefront/nextjs/api\";\n *\n * export const { GET, POST, PUT, PATCH, DELETE } = toNextJsStoreApiHandler({\n * apiBaseUrl: process.env.STOREFRONT_API_URL,\n * });\n * ```\n */\nexport function toNextJsStoreApiHandler(config: StoreApiHandlerConfig = {}) {\n const handler = async (\n request: NextRequest,\n context: { params: Promise<{ path?: string[] }> },\n ): Promise<NextResponse> => {\n const params = await context.params;\n const pathSegments = params.path ?? [];\n const response = await handleStoreProxyRequest(\n request,\n pathSegments,\n config,\n );\n return new NextResponse(response.body, {\n status: response.status,\n statusText: response.statusText,\n headers: response.headers,\n });\n };\n\n return {\n GET: handler,\n POST: handler,\n PUT: handler,\n PATCH: handler,\n DELETE: handler,\n };\n}\n\nexport { handleStoreProxyRequest } from \"../../../../core/server/store-proxy-handler\";\n"]}
|
package/dist/nextjs/globals.css
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Estilos mínimos para consumidores npm.
|
|
3
|
-
* La app define su propio design system y componentes.
|
|
4
|
-
*/
|
|
5
|
-
@import "tailwindcss";
|
|
6
|
-
|
|
7
|
-
@source "../react/shell/components/product-variant-selector/";
|
|
8
|
-
|
|
9
|
-
@layer base {
|
|
10
|
-
* {
|
|
11
|
-
border-color: var(--border, currentColor);
|
|
12
|
-
}
|
|
13
|
-
}
|
package/dist/nextjs.d.ts
DELETED
package/dist/nextjs.js
DELETED
package/dist/nextjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/nextjs.server.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export * from "./chunks/server-nextjs";
|
|
2
|
-
export type {
|
|
3
|
-
StorefrontSettings,
|
|
4
|
-
StorefrontStore,
|
|
5
|
-
StorefrontCmsSettings,
|
|
6
|
-
StorefrontCmsPage,
|
|
7
|
-
StorefrontProduct,
|
|
8
|
-
StorefrontFacet,
|
|
9
|
-
StorefrontSearchFilter,
|
|
10
|
-
StorefrontProductDetail,
|
|
11
|
-
StorefrontProductsResponse,
|
|
12
|
-
StorefrontProductsParamsInput,
|
|
13
|
-
StorefrontVariant,
|
|
14
|
-
StorefrontCollection,
|
|
15
|
-
StorefrontCollectionDetail,
|
|
16
|
-
StorefrontPageDetail,
|
|
17
|
-
StorefrontPageListItem,
|
|
18
|
-
} from "./chunks/core-public";
|
package/dist/nextjs.server.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./chunks/server-nextjs.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|