@shopify/hydrogen 1.3.2 → 1.4.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.
Files changed (36) hide show
  1. package/dist/esnext/components/CartProvider/CartActions.client.d.ts +62 -0
  2. package/dist/esnext/components/CartProvider/CartActions.client.js +232 -0
  3. package/dist/esnext/components/CartProvider/CartProviderV2.client.d.ts +49 -0
  4. package/dist/esnext/components/CartProvider/CartProviderV2.client.js +370 -0
  5. package/dist/esnext/components/CartProvider/hooks.client.js +1 -1
  6. package/dist/esnext/components/CartProvider/types.d.ts +165 -0
  7. package/dist/esnext/components/CartProvider/useCartAPIStateMachine.client.d.ts +22 -0
  8. package/dist/esnext/components/CartProvider/useCartAPIStateMachine.client.js +251 -0
  9. package/dist/esnext/entry-client.js +26 -8
  10. package/dist/esnext/experimental.d.ts +1 -0
  11. package/dist/esnext/experimental.js +1 -0
  12. package/dist/esnext/foundation/HydrogenRequest/HydrogenRequest.server.d.ts +3 -2
  13. package/dist/esnext/foundation/HydrogenRequest/HydrogenRequest.server.js +1 -0
  14. package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.client.d.ts +3 -3
  15. package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.d.ts +1 -0
  16. package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.js +21 -6
  17. package/dist/esnext/foundation/ShopifyProvider/types.d.ts +5 -2
  18. package/dist/esnext/foundation/useShop/use-shop.d.ts +1 -1
  19. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.js +1 -0
  20. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.js +0 -8
  21. package/dist/esnext/hooks/useDelay/useDelay.d.ts +1 -0
  22. package/dist/esnext/hooks/useDelay/useDelay.js +17 -0
  23. package/dist/esnext/hooks/useShopQuery/hooks.js +4 -2
  24. package/dist/esnext/index.d.ts +1 -0
  25. package/dist/esnext/index.js +1 -0
  26. package/dist/esnext/shared-types.d.ts +2 -1
  27. package/dist/esnext/utilities/apiRoutes.js +4 -2
  28. package/dist/esnext/utilities/object.d.ts +1 -1
  29. package/dist/esnext/utilities/storefrontApi.d.ts +4 -2
  30. package/dist/esnext/utilities/storefrontApi.js +31 -6
  31. package/dist/esnext/version.d.ts +1 -1
  32. package/dist/esnext/version.js +1 -1
  33. package/dist/node/framework/plugins/vite-plugin-hydrogen-config.js +1 -0
  34. package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.js +0 -8
  35. package/dist/node/shared-types.d.ts +2 -1
  36. package/package.json +3 -1
@@ -62,13 +62,5 @@ exports.default = (pluginOptions) => {
62
62
  };
63
63
  async function polyfillOxygenEnv(config) {
64
64
  const env = await (0, vite_1.loadEnv)(config.mode, config.root, '');
65
- const publicPrefixes = Array.isArray(config.envPrefix)
66
- ? config.envPrefix
67
- : [config.envPrefix || ''];
68
- for (const key of Object.keys(env)) {
69
- if (publicPrefixes.some((prefix) => key.startsWith(prefix))) {
70
- delete env[key];
71
- }
72
- }
73
65
  globalThis.Oxygen = { env };
74
66
  }
@@ -26,5 +26,6 @@ export declare type ShopifyConfig = {
26
26
  storeDomain: string;
27
27
  storefrontToken: string;
28
28
  storefrontApiVersion: string;
29
- multipassSecret?: string;
29
+ privateStorefrontToken?: string;
30
+ storefrontId?: string;
30
31
  };
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "engines": {
8
8
  "node": ">=14"
9
9
  },
10
- "version": "1.3.2",
10
+ "version": "1.4.1",
11
11
  "description": "Modern custom Shopify storefronts",
12
12
  "license": "MIT",
13
13
  "main": "dist/esnext/index.js",
@@ -134,6 +134,8 @@
134
134
  },
135
135
  "dependencies": {
136
136
  "@vitejs/plugin-react": "^1.3.0",
137
+ "@xstate/fsm": "^2.0.0",
138
+ "@xstate/react": "^3.0.0",
137
139
  "abort-controller": "^3.0.0",
138
140
  "body-parser": "^1.20.0",
139
141
  "compression": "^1.7.4",