@ecomiq/storefront 1.0.0 → 1.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 +63 -17
- package/dist/chunk-PCTSWSTB.js +346 -0
- package/dist/chunk-PCTSWSTB.js.map +1 -0
- package/dist/chunk-PDK2VYWD.js +1598 -0
- package/dist/chunk-PDK2VYWD.js.map +1 -0
- package/dist/chunk-Q762YXCQ.js +175 -0
- package/dist/chunk-Q762YXCQ.js.map +1 -0
- package/dist/{index-C-xqLr1g.d.ts → chunks/client.d.ts} +6577 -4565
- package/dist/chunks/client.js +2046 -0
- package/dist/chunks/client.js.map +1 -0
- package/dist/chunks/config.js +3 -0
- package/dist/chunks/config.js.map +1 -0
- package/dist/chunks/server-nextjs.d.ts +33 -0
- package/dist/chunks/server-nextjs.js +30 -0
- package/dist/chunks/server-nextjs.js.map +1 -0
- package/dist/chunks/server-tanstack.d.ts +22 -0
- package/dist/chunks/server-tanstack.js +30 -0
- package/dist/chunks/server-tanstack.js.map +1 -0
- package/dist/ecomiq-shell-ui-SWIFLQVM.js +8 -0
- package/dist/ecomiq-shell-ui-SWIFLQVM.js.map +1 -0
- package/dist/format-currency-oJD9jGYW.d.ts +6751 -0
- package/dist/index.d.ts +20 -30
- package/dist/index.js +11 -103
- package/dist/index.js.map +1 -1
- package/dist/index.server.d.ts +8 -0
- package/dist/index.server.js +7 -0
- package/dist/index.server.js.map +1 -0
- package/dist/nextjs/api.js +1 -174
- package/dist/nextjs/api.js.map +1 -1
- package/dist/nextjs.d.ts +13 -41
- package/dist/nextjs.js +11 -2964
- package/dist/nextjs.js.map +1 -1
- package/dist/nextjs.server.d.ts +1 -0
- package/dist/nextjs.server.js +1 -0
- package/dist/nextjs.server.js.map +1 -0
- package/dist/tanstack/api.js +3 -171
- package/dist/tanstack/api.js.map +1 -1
- package/dist/tanstack.d.ts +13 -30
- package/dist/tanstack.js +11 -2964
- package/dist/tanstack.js.map +1 -1
- package/dist/tanstack.server.d.ts +1 -0
- package/dist/tanstack.server.js +1 -0
- package/dist/tanstack.server.js.map +1 -0
- package/package.json +13 -1
- /package/dist/{..d.ts → chunks/config.d.ts} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { applyServerRequestOriginFromHeaders, normalizeRequestHostname, fetchPublicStoreSettings } from '../chunk-PDK2VYWD.js';
|
|
2
|
+
export { CustomerAddressSchema, CustomerAddressUpsertSchema, CustomerMeSchema, CustomerOrderDetailSchema, CustomerOrderListItemSchema, CustomerProfilePatchSchema, CustomerRegisterRequestSchema, StoreApiClient, StorefrontProductSchema, StorefrontProductsResponseSchema, addCartCoupon, applyServerRequestOriginFromHeaders, checkoutCart, createCart, createCustomerAddress, createStoreApiClient, customerMeToProfilePatch, deleteCustomerAddress, ecomiqOAuthPassword, fetchPublicStoreSettings, findStorefrontCmsPageBySlug, formatCurrency, getCart, getCartCheckout, getCartPaymentMethods, getCustomerAddresses, getCustomerMe, getCustomerOrder, getCustomerOrders, getSharedOrderDraft, getShippingOptions, getStoreApiBaseUrl, getStoreApiClient, getStorefrontCollectionBySlug, getStorefrontCollections, getStorefrontPageBySlug, getStorefrontPagePreview, getStorefrontPages, getStorefrontProductBySlug, getStorefrontProducts, getStorefrontSettings, isCartNotActiveApiError, patchCartAddresses, patchCartBuyer, patchCustomer, putCartShippingMethod, registerCustomer, removeCartCoupon, resolvePublicStoreSettingsSource, setClientStoreId, setServerRequestOrigin, setServerStoreId, storeApiClient, updateCustomerAddress, uploadPaymentReceipt } from '../chunk-PDK2VYWD.js';
|
|
3
|
+
export { ECOMIQ_CLIENTS_STORE_KV_BINDING, StorefrontSettingsSchema, buildStorefrontKvSnapshotKey, buildStorefrontKvSnapshotKeyFromStoreKey, getStorefrontSettingsFromKv, getStorefrontSettingsFromKvByStoreKey, normalizeStoreHost, resolveStorefrontSettingsHost } from '../chunk-PCTSWSTB.js';
|
|
4
|
+
export { handleStoreProxyRequest } from '../chunk-Q762YXCQ.js';
|
|
5
|
+
import { getRequestHeaders } from '@tanstack/react-start/server';
|
|
6
|
+
|
|
7
|
+
async function getHostname() {
|
|
8
|
+
const headerList = getRequestHeaders();
|
|
9
|
+
applyServerRequestOriginFromHeaders(headerList);
|
|
10
|
+
return normalizeRequestHostname(headerList);
|
|
11
|
+
}
|
|
12
|
+
async function getPublicStore(options) {
|
|
13
|
+
const headerList = getRequestHeaders();
|
|
14
|
+
applyServerRequestOriginFromHeaders(headerList);
|
|
15
|
+
return fetchPublicStoreSettings({
|
|
16
|
+
host: headerList.get("host"),
|
|
17
|
+
source: options?.source
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
async function getPublicStoreFromHeaders(headerList, options) {
|
|
21
|
+
applyServerRequestOriginFromHeaders(headerList);
|
|
22
|
+
return fetchPublicStoreSettings({
|
|
23
|
+
host: headerList.get("host"),
|
|
24
|
+
...options
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { getHostname, getPublicStore, getPublicStoreFromHeaders };
|
|
29
|
+
//# sourceMappingURL=server-tanstack.js.map
|
|
30
|
+
//# sourceMappingURL=server-tanstack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/react/frameworks/tanstack/actions/getHostname.ts","../../src/react/frameworks/tanstack/actions/getPublicStore.ts"],"names":["getRequestHeaders"],"mappings":";;;;;;AAMA,eAAsB,WAAA,GAAsC;AAC1D,EAAA,MAAM,aAAa,iBAAA,EAAkB;AACrC,EAAA,mCAAA,CAAoC,UAAU,CAAA;AAC9C,EAAA,OAAO,yBAAyB,UAAU,CAAA;AAC5C;ACWA,eAAsB,eACpB,OAAA,EAC4B;AAC5B,EAAA,MAAM,aAAaA,iBAAAA,EAAkB;AACrC,EAAA,mCAAA,CAAoC,UAAU,CAAA;AAC9C,EAAA,OAAO,wBAAA,CAAyB;AAAA,IAC9B,IAAA,EAAM,UAAA,CAAW,GAAA,CAAI,MAAM,CAAA;AAAA,IAC3B,QAAQ,OAAA,EAAS;AAAA,GAClB,CAAA;AACH;AAEA,eAAsB,yBAAA,CACpB,YACA,OAAA,EAC4B;AAC5B,EAAA,mCAAA,CAAoC,UAAU,CAAA;AAC9C,EAAA,OAAO,wBAAA,CAAyB;AAAA,IAC9B,IAAA,EAAM,UAAA,CAAW,GAAA,CAAI,MAAM,CAAA;AAAA,IAC3B,GAAG;AAAA,GACJ,CAAA;AACH","file":"server-tanstack.js","sourcesContent":["import { getRequestHeaders } from \"@tanstack/react-start/server\";\nimport {\n applyServerRequestOriginFromHeaders,\n normalizeRequestHostname,\n} from \"../../../../core/server/request-origin\";\n\nexport async function getHostname(): Promise<string | null> {\n const headerList = getRequestHeaders();\n applyServerRequestOriginFromHeaders(headerList);\n return normalizeRequestHostname(headerList);\n}\n","import { getRequestHeaders } from \"@tanstack/react-start/server\";\nimport {\n applyServerRequestOriginFromHeaders,\n} from \"../../../../core/server/request-origin\";\nimport {\n fetchPublicStoreSettings,\n type FetchPublicStoreSettingsOptions,\n type PublicStoreResult,\n type PublicStoreSettingsSource,\n} from \"../../../../core/server/fetch-public-store\";\n\ntype GetPublicStoreOptions = {\n source?: PublicStoreSettingsSource;\n};\n\nexport type { PublicStoreResult, PublicStoreSettingsSource };\n\n/**\n * Obtiene la tienda pública en TanStack Start (server function, loader o server route).\n * Usa `getRequestHeaders()` del contexto de request activo.\n */\nexport async function getPublicStore(\n options?: GetPublicStoreOptions,\n): Promise<PublicStoreResult> {\n const headerList = getRequestHeaders();\n applyServerRequestOriginFromHeaders(headerList);\n return fetchPublicStoreSettings({\n host: headerList.get(\"host\"),\n source: options?.source,\n });\n}\n\nexport async function getPublicStoreFromHeaders(\n headerList: { get(name: string): string | null },\n options?: Omit<FetchPublicStoreSettingsOptions, \"host\">,\n): Promise<PublicStoreResult> {\n applyServerRequestOriginFromHeaders(headerList);\n return fetchPublicStoreSettings({\n host: headerList.get(\"host\"),\n ...options,\n });\n}\n\nexport {\n fetchPublicStoreSettings,\n resolvePublicStoreSettingsSource,\n} from \"../../../../core/server/fetch-public-store\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|