@faststore/core 2.2.9 → 2.2.11

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 (160) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-test.log +9 -9
  3. package/package.json +4 -4
  4. package/src/components/sections/ProductShelf/section.module.scss +0 -8
  5. package/src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx +3 -3
  6. package/src/components/ui/Carousel/Carousel.tsx +12 -5
  7. package/src/components/ui/ProductShelf/ProductShelf.tsx +8 -1
  8. package/.next/BUILD_ID +0 -1
  9. package/.next/build-manifest.json +0 -126
  10. package/.next/cache/.tsbuildinfo +0 -1
  11. package/.next/cache/config.json +0 -7
  12. package/.next/cache/eslint/.cache_1gneedd +0 -1
  13. package/.next/cache/next-server.js.nft.json +0 -1
  14. package/.next/cache/webpack/client-production/0.pack +0 -0
  15. package/.next/cache/webpack/client-production/index.pack +0 -0
  16. package/.next/cache/webpack/server-production/0.pack +0 -0
  17. package/.next/cache/webpack/server-production/index.pack +0 -0
  18. package/.next/export-marker.json +0 -1
  19. package/.next/images-manifest.json +0 -1
  20. package/.next/next-server.js.nft.json +0 -1
  21. package/.next/package.json +0 -1
  22. package/.next/prerender-manifest.json +0 -1
  23. package/.next/react-loadable-manifest.json +0 -47
  24. package/.next/required-server-files.json +0 -1
  25. package/.next/routes-manifest.json +0 -1
  26. package/.next/server/chunks/117.js +0 -430
  27. package/.next/server/chunks/177.js +0 -120
  28. package/.next/server/chunks/183.js +0 -121
  29. package/.next/server/chunks/184.js +0 -61
  30. package/.next/server/chunks/289.js +0 -240
  31. package/.next/server/chunks/312.js +0 -678
  32. package/.next/server/chunks/350.js +0 -200
  33. package/.next/server/chunks/386.js +0 -200
  34. package/.next/server/chunks/390.js +0 -550
  35. package/.next/server/chunks/398.js +0 -610
  36. package/.next/server/chunks/52.js +0 -4007
  37. package/.next/server/chunks/53.js +0 -61
  38. package/.next/server/chunks/574.js +0 -145
  39. package/.next/server/chunks/576.js +0 -121
  40. package/.next/server/chunks/585.js +0 -640
  41. package/.next/server/chunks/676.js +0 -32
  42. package/.next/server/chunks/693.js +0 -58
  43. package/.next/server/chunks/732.js +0 -1880
  44. package/.next/server/chunks/74.js +0 -3964
  45. package/.next/server/chunks/779.js +0 -58
  46. package/.next/server/chunks/817.js +0 -4007
  47. package/.next/server/chunks/825.js +0 -4074
  48. package/.next/server/chunks/854.js +0 -72
  49. package/.next/server/chunks/859.js +0 -959
  50. package/.next/server/chunks/863.js +0 -111
  51. package/.next/server/chunks/979.js +0 -1292
  52. package/.next/server/chunks/98.js +0 -163
  53. package/.next/server/chunks/988.js +0 -211
  54. package/.next/server/chunks/font-manifest.json +0 -1
  55. package/.next/server/font-manifest.json +0 -1
  56. package/.next/server/middleware-build-manifest.js +0 -1
  57. package/.next/server/middleware-manifest.json +0 -6
  58. package/.next/server/middleware-react-loadable-manifest.js +0 -1
  59. package/.next/server/pages/404.js +0 -391
  60. package/.next/server/pages/404.js.nft.json +0 -1
  61. package/.next/server/pages/500.js +0 -395
  62. package/.next/server/pages/500.js.nft.json +0 -1
  63. package/.next/server/pages/[...slug].js +0 -1084
  64. package/.next/server/pages/[...slug].js.nft.json +0 -1
  65. package/.next/server/pages/[slug]/p.js +0 -2274
  66. package/.next/server/pages/[slug]/p.js.nft.json +0 -1
  67. package/.next/server/pages/_app.js +0 -287
  68. package/.next/server/pages/_app.js.nft.json +0 -1
  69. package/.next/server/pages/_document.js +0 -365
  70. package/.next/server/pages/_document.js.nft.json +0 -1
  71. package/.next/server/pages/_error.js +0 -164
  72. package/.next/server/pages/_error.js.nft.json +0 -1
  73. package/.next/server/pages/account.js +0 -370
  74. package/.next/server/pages/account.js.nft.json +0 -1
  75. package/.next/server/pages/api/graphql.js +0 -464
  76. package/.next/server/pages/api/graphql.js.nft.json +0 -1
  77. package/.next/server/pages/api/health/live.js +0 -31
  78. package/.next/server/pages/api/health/live.js.nft.json +0 -1
  79. package/.next/server/pages/api/health/ready.js +0 -31
  80. package/.next/server/pages/api/health/ready.js.nft.json +0 -1
  81. package/.next/server/pages/api/preview.js +0 -137
  82. package/.next/server/pages/api/preview.js.nft.json +0 -1
  83. package/.next/server/pages/checkout.js +0 -370
  84. package/.next/server/pages/checkout.js.nft.json +0 -1
  85. package/.next/server/pages/en-US/404.html +0 -81
  86. package/.next/server/pages/en-US/404.json +0 -1
  87. package/.next/server/pages/en-US/500.html +0 -81
  88. package/.next/server/pages/en-US/500.json +0 -1
  89. package/.next/server/pages/en-US/account.html +0 -81
  90. package/.next/server/pages/en-US/account.json +0 -1
  91. package/.next/server/pages/en-US/checkout.html +0 -81
  92. package/.next/server/pages/en-US/checkout.json +0 -1
  93. package/.next/server/pages/en-US/login.html +0 -81
  94. package/.next/server/pages/en-US/login.json +0 -1
  95. package/.next/server/pages/en-US/s.html +0 -81
  96. package/.next/server/pages/en-US/s.json +0 -1
  97. package/.next/server/pages/en-US.html +0 -90
  98. package/.next/server/pages/en-US.json +0 -1
  99. package/.next/server/pages/index.js +0 -439
  100. package/.next/server/pages/index.js.nft.json +0 -1
  101. package/.next/server/pages/login.js +0 -382
  102. package/.next/server/pages/login.js.nft.json +0 -1
  103. package/.next/server/pages/s.js +0 -555
  104. package/.next/server/pages/s.js.nft.json +0 -1
  105. package/.next/server/pages-manifest.json +0 -18
  106. package/.next/server/webpack-api-runtime.js +0 -229
  107. package/.next/server/webpack-runtime.js +0 -229
  108. package/.next/static/NaTRwyQZyZDoWO4cjK1rg/_buildManifest.js +0 -1
  109. package/.next/static/NaTRwyQZyZDoWO4cjK1rg/_ssgManifest.js +0 -1
  110. package/.next/static/chunks/251.1c79f06f2a2814b1.js +0 -1
  111. package/.next/static/chunks/386.d01e0db26c523f0f.js +0 -1
  112. package/.next/static/chunks/400-7ce14b0f942135d1.js +0 -1
  113. package/.next/static/chunks/520-5a9ae7339f19a163.js +0 -1
  114. package/.next/static/chunks/574.70612be06fd1365f.js +0 -1
  115. package/.next/static/chunks/585.4c5d40fc6a72a611.js +0 -1
  116. package/.next/static/chunks/651.7142f31ce1e052b3.js +0 -1
  117. package/.next/static/chunks/741.52f7fb873418346f.js +0 -1
  118. package/.next/static/chunks/742-e32d18d91fe6f08b.js +0 -1
  119. package/.next/static/chunks/783-3e062af27686427b.js +0 -1
  120. package/.next/static/chunks/800.ee4f8b9622001e8c.js +0 -1
  121. package/.next/static/chunks/98.40c7e17d9de4eb8f.js +0 -1
  122. package/.next/static/chunks/988.afda042dd9ba11d1.js +0 -1
  123. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +0 -1
  124. package/.next/static/chunks/main-e4e873ee741162eb.js +0 -1
  125. package/.next/static/chunks/pages/404-d186c22d910fecbb.js +0 -1
  126. package/.next/static/chunks/pages/500-c6f28e1de16c5aab.js +0 -1
  127. package/.next/static/chunks/pages/[...slug]-c7c8e53be9021135.js +0 -1
  128. package/.next/static/chunks/pages/[slug]/p-4441e76801e44b50.js +0 -1
  129. package/.next/static/chunks/pages/_app-48d56037a2534a44.js +0 -1
  130. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +0 -1
  131. package/.next/static/chunks/pages/account-46edcd73944d7924.js +0 -1
  132. package/.next/static/chunks/pages/checkout-49faa1acf04be10c.js +0 -1
  133. package/.next/static/chunks/pages/index-5088cf4fabfe4812.js +0 -1
  134. package/.next/static/chunks/pages/login-e944d38d65d2eea5.js +0 -1
  135. package/.next/static/chunks/pages/s-b8b561b006b5056f.js +0 -1
  136. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +0 -1
  137. package/.next/static/chunks/webpack-743ed70fcff99e29.js +0 -1
  138. package/.next/static/css/527e334fa69cf40a.css +0 -1
  139. package/.next/static/css/5d1f64b61ea581f4.css +0 -1
  140. package/.next/static/css/6a7fdc5a21fbead5.css +0 -1
  141. package/.next/static/css/6e1a7434f061d0ef.css +0 -1
  142. package/.next/static/css/723835bce380750d.css +0 -1
  143. package/.next/static/css/8f93a4630936c20b.css +0 -1
  144. package/.next/static/css/9f79fa103f49bca1.css +0 -1
  145. package/.next/static/css/a2eefb25a4608343.css +0 -1
  146. package/.next/static/css/cb7d1fcea42fab9c.css +0 -1
  147. package/.next/static/css/df588bb98c0b0ca6.css +0 -1
  148. package/.next/static/css/fd27ecc37832aa54.css +0 -1
  149. package/.next/trace +0 -77
  150. package/public/~partytown/debug/partytown-atomics.js +0 -556
  151. package/public/~partytown/debug/partytown-media.js +0 -374
  152. package/public/~partytown/debug/partytown-sandbox-sw.js +0 -543
  153. package/public/~partytown/debug/partytown-sw.js +0 -59
  154. package/public/~partytown/debug/partytown-ww-atomics.js +0 -1789
  155. package/public/~partytown/debug/partytown-ww-sw.js +0 -1781
  156. package/public/~partytown/debug/partytown.js +0 -72
  157. package/public/~partytown/partytown-atomics.js +0 -2
  158. package/public/~partytown/partytown-media.js +0 -2
  159. package/public/~partytown/partytown-sw.js +0 -2
  160. package/public/~partytown/partytown.js +0 -2
@@ -1,61 +0,0 @@
1
- "use strict";
2
- exports.id = 53;
3
- exports.ids = [53];
4
- exports.modules = {
5
-
6
- /***/ 9767:
7
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
-
9
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
11
- /* harmony export */ });
12
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
13
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
14
- /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5450);
15
-
16
-
17
- const Price = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function Price({ value, as: Component = 'span', variant = 'selling', testId = 'fs-price', formatter = (price) => price, SRText, ...otherProps }, ref) {
18
- const formattedPrice = formatter(value, variant);
19
- return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component, { ref: ref, "data-fs-price": true, "data-fs-price-variant": variant, "data-testid": testId, ...otherProps },
20
- SRText && react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { text: SRText }),
21
- formattedPrice));
22
- });
23
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Price);
24
- //# sourceMappingURL=Price.js.map
25
-
26
- /***/ }),
27
-
28
- /***/ 5346:
29
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30
-
31
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32
- /* harmony export */ "P": () => (/* binding */ useFormattedPrice)
33
- /* harmony export */ });
34
- /* unused harmony export usePriceFormatter */
35
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
36
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
37
- /* harmony import */ var _session__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7295);
38
-
39
-
40
- const usePriceFormatter = ({
41
- decimals
42
- } = {}) => {
43
- const {
44
- currency,
45
- locale
46
- } = (0,_session__WEBPACK_IMPORTED_MODULE_1__/* .useSession */ .kP)();
47
- return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(price => Intl.NumberFormat(locale, {
48
- style: 'currency',
49
- currency: currency.code,
50
- minimumFractionDigits: decimals ? 2 : 0
51
- }).format(price), [currency.code, locale, decimals]);
52
- };
53
- const useFormattedPrice = price => {
54
- const formatter = usePriceFormatter();
55
- return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => formatter(price), [formatter, price]);
56
- };
57
-
58
- /***/ })
59
-
60
- };
61
- ;
@@ -1,145 +0,0 @@
1
- "use strict";
2
- exports.id = 574;
3
- exports.ids = [574];
4
- exports.modules = {
5
-
6
- /***/ 3574:
7
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
-
9
- // ESM COMPAT FLAG
10
- __webpack_require__.r(__webpack_exports__);
11
-
12
- // EXPORTS
13
- __webpack_require__.d(__webpack_exports__, {
14
- "default": () => (/* binding */ search)
15
- });
16
-
17
- // EXTERNAL MODULE: ./faststore.config.js
18
- var faststore_config = __webpack_require__(7183);
19
- var faststore_config_default = /*#__PURE__*/__webpack_require__.n(faststore_config);
20
- ;// CONCATENATED MODULE: ./src/utils/getCookie.ts
21
- function getCookie(name) {
22
- const cookieString = decodeURIComponent(document.cookie);
23
- const cookies = cookieString.split(';');
24
-
25
- for (const cookie of cookies) {
26
- const [cookieName, cookieValue] = cookie.trim().split('=');
27
-
28
- if (cookieName === name) {
29
- return cookieValue;
30
- }
31
- }
32
-
33
- return undefined; // Cookie not found
34
- }
35
- ;// CONCATENATED MODULE: ./src/sdk/analytics/platform/vtex/search.ts
36
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
37
-
38
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
39
-
40
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
41
-
42
- /**
43
- * More info at: https://www.notion.so/vtexhandbook/Event-API-Documentation-48eee26730cf4d7f80f8fd7262231f84
44
- */
45
-
46
-
47
- const THIRTY_MINUTES_S = 30 * 60;
48
- const ONE_YEAR_S = 365 * 24 * 3600;
49
-
50
- const randomUUID = () => typeof crypto.randomUUID === 'function' ? crypto.randomUUID() : (Math.random() * 1e6).toFixed(0);
51
-
52
- const createCookie = (key, expiresSecond) => {
53
- // Setting the domain attribute specifies which host can receive it; we need it to make the cookies available on the `secure` subdomain.
54
- // Although https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie mentioned leading dot (.) is not needed and ignored. I couldn't set the cookies without it.
55
- const urlDomain = `.${new URL((faststore_config_default()).storeUrl).hostname}`;
56
- return () => {
57
- const isExpired = getCookie(key) === undefined;
58
-
59
- if (isExpired) {
60
- const value = randomUUID();
61
- document.cookie = `${key}=${value}; max-age=${expiresSecond}; domain=${urlDomain}; path=/;`; // Setting the `path=/` makes the cookie accessible on any path of the domain/subdomain
62
-
63
- return value;
64
- }
65
-
66
- return getCookie(key);
67
- };
68
- };
69
-
70
- const user = {
71
- anonymous: createCookie('vtex-faststore-anonymous', ONE_YEAR_S),
72
- session: createCookie('vtex-faststore-session', THIRTY_MINUTES_S)
73
- };
74
-
75
- const sendEvent = options => fetch(`https://sp.vtex.com/event-api/v1/${(faststore_config_default()).api.storeId}/event`, {
76
- method: 'POST',
77
- body: JSON.stringify(_objectSpread(_objectSpread({}, options), {}, {
78
- userAgent: navigator.userAgent,
79
- anonymous: user.anonymous(),
80
- session: user.session()
81
- })),
82
- headers: {
83
- 'content-type': 'application/json'
84
- }
85
- });
86
-
87
- const isFullTextSearch = url => typeof url.searchParams.get('q') === 'string' && /^\/s(\/)?$/g.test(url.pathname);
88
-
89
- const handleEvent = event => {
90
- switch (event.name) {
91
- case 'search_select_item':
92
- {
93
- const url = new URL(event.params.url);
94
-
95
- if (!isFullTextSearch(url)) {
96
- return;
97
- }
98
-
99
- for (const item of event.params.items ?? []) {
100
- const productId = item.item_id ?? item.item_variant;
101
- const position = item.index;
102
-
103
- if (productId && position) {
104
- sendEvent({
105
- type: 'search.click',
106
- productId,
107
- position,
108
- url: url.href,
109
- text: url.searchParams.get('q') ?? '<empty>'
110
- });
111
- }
112
- }
113
-
114
- break;
115
- }
116
-
117
- case 'intelligent_search_query':
118
- {
119
- sendEvent({
120
- type: 'search.query',
121
- url: event.params.url,
122
- text: event.params.term,
123
- misspelled: event.params.isTermMisspelled,
124
- match: event.params.totalCount,
125
- operator: event.params.logicalOperator,
126
- locale: event.params.locale
127
- });
128
- break;
129
- }
130
-
131
- default:
132
- }
133
- };
134
-
135
- setInterval(() => sendEvent({
136
- type: 'session.ping'
137
- }), 60 * 1e3
138
- /* One minute */
139
- );
140
- /* harmony default export */ const search = (handleEvent);
141
-
142
- /***/ })
143
-
144
- };
145
- ;
@@ -1,121 +0,0 @@
1
- exports.id = 576;
2
- exports.ids = [576];
3
- exports.modules = {
4
-
5
- /***/ 4918:
6
- /***/ ((module) => {
7
-
8
- module.exports = {
9
- seo: {
10
- title: 'FastStore Starter',
11
- description: 'Fast Demo Store',
12
- titleTemplate: '%s | FastStore',
13
- author: 'Store Framework'
14
- },
15
- // Theming
16
- theme: 'custom-theme',
17
- // Ecommerce Platform
18
- platform: 'vtex',
19
- // Platform specific configs for API
20
- api: {
21
- storeId: 'storeframework',
22
- workspace: 'master',
23
- environment: 'vtexcommercestable',
24
- hideUnavailableItems: false,
25
- incrementAddress: true
26
- },
27
- // Default session
28
- session: {
29
- currency: {
30
- code: 'USD',
31
- symbol: '$'
32
- },
33
- locale: 'en-US',
34
- channel: '{"salesChannel":"1","regionId":""}',
35
- country: 'USA',
36
- deliveryMode: null,
37
- addressType: null,
38
- postalCode: null,
39
- geoCoordinates: null,
40
- person: null
41
- },
42
- // Default cart
43
- cart: {
44
- id: '',
45
- items: [],
46
- messages: [],
47
- shouldSplitItem: true
48
- },
49
- // Production URLs
50
- storeUrl: 'https://vtexfaststore.com',
51
- secureSubdomain: 'https://secure.vtexfaststore.com',
52
- checkoutUrl: 'https://secure.vtexfaststore.com/checkout',
53
- loginUrl: 'https://secure.vtexfaststore.com/api/io/login',
54
- accountUrl: 'https://secure.vtexfaststore.com/api/io/account',
55
- // Preview redirects
56
- previewRedirects: {
57
- home: '/',
58
- plp: '/office',
59
- search: '/s?q=headphone',
60
- pdp: '/apple-magic-mouse/p'
61
- },
62
- // Lighthouse CI
63
- lighthouse: {
64
- server: process.env.BASE_SITE_URL || 'http://localhost:3000',
65
- pages: {
66
- home: '/',
67
- pdp: '/apple-magic-mouse/p',
68
- collection: '/office'
69
- }
70
- },
71
- // E2E CI
72
- cypress: {
73
- pages: {
74
- home: '/',
75
- pdp: '/apple-magic-mouse/p',
76
- collection: '/office',
77
- collection_2: '/technology',
78
- collection_filtered: '/office/?category-1=office&marca=acer&facets=category-1%2Cmarca',
79
- search: '/s?q=orange'
80
- }
81
- },
82
- analytics: {
83
- // https://developers.google.com/tag-platform/tag-manager/web#standard_web_page_installation,
84
- gtmContainerId: 'GTM-PGHZ95N'
85
- },
86
- experimental: {
87
- cypressVersion: 12,
88
- enableCypressExtension: false
89
- }
90
- };
91
-
92
- /***/ }),
93
-
94
- /***/ 5576:
95
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
96
-
97
- const defaultConfig = __webpack_require__(4918);
98
-
99
- const starterConfig = __webpack_require__(141);
100
-
101
- const deepmerge = __webpack_require__(6330);
102
- /**
103
- * @type {typeof defaultConfig & Record<string, any>}
104
- * */
105
-
106
-
107
- const finalConfig = deepmerge(defaultConfig, starterConfig);
108
- module.exports = finalConfig;
109
-
110
- /***/ }),
111
-
112
- /***/ 141:
113
- /***/ ((module) => {
114
-
115
- // This is a placeholder file for when starter files are copied here
116
- module.exports = {};
117
-
118
- /***/ })
119
-
120
- };
121
- ;