@faststore/core 3.8.0 → 3.9.0

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 (128) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +33 -33
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/eslint/.cache_1gneedd +1 -1
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/server-production/0.pack +0 -0
  9. package/.next/cache/webpack/server-production/index.pack +0 -0
  10. package/.next/next-minimal-server.js.nft.json +1 -1
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.js +1 -1
  13. package/.next/prerender-manifest.json +1 -1
  14. package/.next/react-loadable-manifest.json +13 -13
  15. package/.next/routes-manifest.json +1 -1
  16. package/.next/server/chunks/2082.js +4 -4
  17. package/.next/server/chunks/319.js +1 -1
  18. package/.next/server/chunks/5110.js +1 -1
  19. package/.next/server/chunks/5671.js +1 -1
  20. package/.next/server/chunks/5754.js +1 -1
  21. package/.next/server/chunks/9410.js +1 -1
  22. package/.next/server/chunks/9572.js +3 -3
  23. package/.next/server/chunks/9844.js +1 -1
  24. package/.next/server/middleware-build-manifest.js +1 -1
  25. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  26. package/.next/server/pages/404.js +1 -1
  27. package/.next/server/pages/500.js +1 -1
  28. package/.next/server/pages/[...slug].js +1 -1
  29. package/.next/server/pages/[slug]/p.js +1 -1
  30. package/.next/server/pages/en-US/404.html +1 -1
  31. package/.next/server/pages/en-US/404.json +1 -1
  32. package/.next/server/pages/en-US/500.html +1 -1
  33. package/.next/server/pages/en-US/500.json +1 -1
  34. package/.next/server/pages/en-US/account.html +1 -1
  35. package/.next/server/pages/en-US/account.json +1 -1
  36. package/.next/server/pages/en-US/checkout.html +1 -1
  37. package/.next/server/pages/en-US/checkout.json +1 -1
  38. package/.next/server/pages/en-US/login.html +1 -1
  39. package/.next/server/pages/en-US/login.json +1 -1
  40. package/.next/server/pages/en-US/s.html +1 -1
  41. package/.next/server/pages/en-US/s.json +1 -1
  42. package/.next/server/pages/en-US.html +1 -1
  43. package/.next/server/pages/en-US.json +1 -1
  44. package/.next/server/pages/index.js +1 -1
  45. package/.next/server/pages/login.js +1 -1
  46. package/.next/server/pages/s.js +1 -1
  47. package/.next/server/pages-manifest.json +1 -1
  48. package/.next/static/chunks/{1153.7f616071da309cf5.js → 1153.d7522522b6c917ed.js} +1 -1
  49. package/.next/static/chunks/{1978.afceeb8879bd2646.js → 1978.b33d8b2c02b89474.js} +1 -1
  50. package/.next/static/chunks/4501-effb6aa25a455116.js +1 -0
  51. package/.next/static/chunks/6379-5bc15c2be0861eec.js +1 -0
  52. package/.next/static/chunks/7563-92cb0cc92e3f616d.js +1 -0
  53. package/.next/static/chunks/BannerNewsletter.ee0b11fa76f97f1e.js +1 -0
  54. package/.next/static/chunks/BannerText.2914f18ab31cab35.js +1 -0
  55. package/.next/static/chunks/Newsletter.99c659682ed8b4eb.js +1 -0
  56. package/.next/static/chunks/ProductShelf.4aeec65ee9e7d9bc.js +1 -0
  57. package/.next/static/chunks/pages/404-5e3ccc26e8693eea.js +1 -0
  58. package/.next/static/chunks/pages/500-823cb0432a498a6a.js +1 -0
  59. package/.next/static/chunks/pages/[...slug]-535243edd040fc0c.js +1 -0
  60. package/.next/static/chunks/pages/[slug]/p-1334ebce46042e06.js +1 -0
  61. package/.next/static/chunks/pages/{_app-9d791333b87e7c18.js → _app-9d35d5919aef5334.js} +1 -1
  62. package/.next/static/chunks/pages/index-01e855e8041d8ecd.js +1 -0
  63. package/.next/static/chunks/pages/login-ec8f707d0c577b05.js +1 -0
  64. package/.next/static/chunks/pages/s-a932301211f32425.js +1 -0
  65. package/.next/static/chunks/{webpack-bd90055e2ebc407d.js → webpack-bf502499da135235.js} +1 -1
  66. package/.next/static/sMXa4bqsC2EIl72tw9r2B/_buildManifest.js +1 -0
  67. package/.next/trace +101 -98
  68. package/.turbo/turbo-build.log +10 -10
  69. package/.turbo/turbo-lint.log +1 -1
  70. package/.turbo/turbo-test.log +5 -5
  71. package/CHANGELOG.md +6 -0
  72. package/package.json +9 -9
  73. package/src/components/cms/global/Components.ts +2 -0
  74. package/src/components/cms/home/Components.ts +2 -0
  75. package/src/components/cms/plp/Components.ts +2 -0
  76. package/src/components/cms/search/Components.ts +2 -0
  77. package/src/components/sections/Alert/OverriddenDefaultAlert.ts +2 -0
  78. package/src/components/sections/BannerText/OverriddenDefaultBannerText.ts +2 -0
  79. package/src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb.ts +2 -0
  80. package/src/components/sections/CrossSellingShelf/OverriddenDefaultCrossSellingShelf.ts +2 -0
  81. package/src/components/sections/EmptyState/OverriddenDefaultEmptyState.ts +2 -0
  82. package/src/components/sections/Hero/OverriddenDefaultHero.ts +2 -0
  83. package/src/components/sections/Navbar/OverriddenDefaultNavbar.ts +2 -0
  84. package/src/components/sections/Newsletter/OverriddenDefaultNewsletter.ts +2 -0
  85. package/src/components/sections/ProductDetails/OverriddenDefaultProductDetails.ts +2 -0
  86. package/src/components/sections/ProductGallery/OverriddenDefaultProductGallery.ts +2 -0
  87. package/src/components/sections/ProductShelf/OverriddenDefaultProductShelf.ts +2 -0
  88. package/src/components/sections/RegionBar/OverriddenDefaultRegionBar.ts +2 -0
  89. package/src/components/templates/LandingPage/LandingPage.tsx +2 -0
  90. package/src/customizations/src/GlobalOverrides.tsx +6 -0
  91. package/src/pages/404.tsx +2 -0
  92. package/src/pages/500.tsx +2 -0
  93. package/src/pages/[slug]/p.tsx +2 -0
  94. package/src/pages/_app.tsx +1 -0
  95. package/src/pages/login.tsx +2 -0
  96. package/src/plugins/.gitkeep +0 -0
  97. package/src/plugins/index.scss +3 -0
  98. package/src/plugins/index.ts +2 -0
  99. package/src/plugins/overrides/Alert.tsx +3 -0
  100. package/src/plugins/overrides/BannerText.tsx +3 -0
  101. package/src/plugins/overrides/Breadcrumb.tsx +3 -0
  102. package/src/plugins/overrides/CrossSellingShelf.tsx +3 -0
  103. package/src/plugins/overrides/EmptyState.tsx +3 -0
  104. package/src/plugins/overrides/Hero.tsx +3 -0
  105. package/src/plugins/overrides/Navbar.tsx +3 -0
  106. package/src/plugins/overrides/Newsletter.tsx +3 -0
  107. package/src/plugins/overrides/ProductDetails.tsx +3 -0
  108. package/src/plugins/overrides/ProductGallery.tsx +3 -0
  109. package/src/plugins/overrides/ProductShelf.tsx +3 -0
  110. package/src/plugins/overrides/RegionBar.tsx +3 -0
  111. package/src/plugins/overrides/ThirdPartyScripts.tsx +3 -0
  112. package/src/plugins/overrides/WebFonts.tsx +3 -0
  113. package/.next/static/chunks/4501-7857a5a8218d9f58.js +0 -1
  114. package/.next/static/chunks/6379-e49fe5643b85d5b5.js +0 -1
  115. package/.next/static/chunks/7563-e2275f3ee79ddd83.js +0 -1
  116. package/.next/static/chunks/BannerNewsletter.29403e046f34b6c1.js +0 -1
  117. package/.next/static/chunks/BannerText.24939a8013e30e18.js +0 -1
  118. package/.next/static/chunks/Newsletter.7a07fe93f98e2922.js +0 -1
  119. package/.next/static/chunks/ProductShelf.d40d1e693c5a302b.js +0 -1
  120. package/.next/static/chunks/pages/404-71d5202357fb9e69.js +0 -1
  121. package/.next/static/chunks/pages/500-75704d5230292280.js +0 -1
  122. package/.next/static/chunks/pages/[...slug]-21a03c0e2b98783d.js +0 -1
  123. package/.next/static/chunks/pages/[slug]/p-fcdc2b26731a7f07.js +0 -1
  124. package/.next/static/chunks/pages/index-2ec096f367505f35.js +0 -1
  125. package/.next/static/chunks/pages/login-363e38c5172ec5a4.js +0 -1
  126. package/.next/static/chunks/pages/s-d74217745109de5d.js +0 -1
  127. package/.next/static/er25JH1Tpwm62rGwg_DUa/_buildManifest.js +0 -1
  128. /package/.next/static/{er25JH1Tpwm62rGwg_DUa → sMXa4bqsC2EIl72tw9r2B}/_ssgManifest.js +0 -0
@@ -46,33 +46,33 @@ Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Cont
46
46
  Collecting build traces ...
47
47
 
48
48
  Route (pages) Size First Load JS
49
- ┌ ● / 3.21 kB 122 kB
49
+ ┌ ● / 3.23 kB 122 kB
50
50
  ├ └ css/b1806cbafd0c1f81.css 3.06 kB
51
51
  ├ /_app 0 B 91.9 kB
52
- ├ ● /[...slug] 2 kB 130 kB
53
- ├ ● /[slug]/p 34 kB 153 kB
52
+ ├ ● /[...slug] 2.01 kB 131 kB
53
+ ├ ● /[slug]/p 34.1 kB 153 kB
54
54
  ├ ├ css/bf1560439df2c1a1.css 5.66 kB
55
55
  ├ ├ css/e3ff5d95518a5c79.css 6.01 kB
56
56
  ├ └ css/d92839440872e246.css 15.6 kB
57
- ├ ○ /404 1.46 kB 120 kB
58
- ├ ● /500 1.46 kB 120 kB
57
+ ├ ○ /404 1.48 kB 120 kB
58
+ ├ ● /500 1.48 kB 120 kB
59
59
  ├ ● /account 714 B 120 kB
60
60
  ├ λ /api/graphql 0 B 91.9 kB
61
61
  ├ λ /api/health/live 0 B 91.9 kB
62
62
  ├ λ /api/health/ready 0 B 91.9 kB
63
63
  ├ λ /api/preview 0 B 91.9 kB
64
64
  ├ ● /checkout 695 B 120 kB
65
- ├ ● /login 1.57 kB 121 kB
66
- └ ● /s 2.74 kB 131 kB
65
+ ├ ● /login 1.59 kB 121 kB
66
+ └ ● /s 2.75 kB 131 kB
67
67
  + First Load JS shared by all 95 kB
68
68
  ├ chunks/framework-12a146e94cfcf7c4.js 45.4 kB
69
69
  ├ chunks/main-209ac4974b020af1.js 33.1 kB
70
- ├ chunks/pages/_app-9d791333b87e7c18.js 9.9 kB
71
- ├ chunks/webpack-bd90055e2ebc407d.js 3.57 kB
70
+ ├ chunks/pages/_app-9d35d5919aef5334.js 9.91 kB
71
+ ├ chunks/webpack-bf502499da135235.js 3.57 kB
72
72
  └ css/ee0556daedda6306.css 3.07 kB
73
73
 
74
74
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
75
75
  ○ (Static) automatically rendered as static HTML (uses no initial props)
76
76
  ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
77
77
 
78
- Done in 71.72s.
78
+ Done in 70.70s.
@@ -1,4 +1,4 @@
1
1
  yarn run v1.22.22
2
2
  $ next lint
3
3
  ✔ No ESLint warnings or errors
4
- Done in 6.17s.
4
+ Done in 5.94s.
@@ -1,12 +1,12 @@
1
1
  yarn run v1.22.22
2
2
  $ jest
3
- PASS test/utils/multipleTemplates.test.ts (37.973 s)
4
- PASS test/server/cms/index.test.ts (38.451 s)
5
- PASS test/server/index.test.ts (41.51 s)
3
+ PASS test/utils/multipleTemplates.test.ts (36.538 s)
4
+ PASS test/server/cms/index.test.ts (37.31 s)
5
+ PASS test/server/index.test.ts (41.077 s)
6
6
 
7
7
  Test Suites: 3 passed, 3 total
8
8
  Tests: 19 passed, 19 total
9
9
  Snapshots: 0 total
10
- Time: 42.722 s
10
+ Time: 42.06 s
11
11
  Ran all test suites.
12
- Done in 44.62s.
12
+ Done in 43.45s.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 3.9.0 (2025-01-22)
7
+
8
+ ### Features
9
+
10
+ - Adds Plugins feature ([#2563](https://github.com/vtex/faststore/issues/2563)) ([83c1bf9](https://github.com/vtex/faststore/commit/83c1bf904f744842060e0dfdb7449406800df157))
11
+
6
12
  # [3.8.0](https://github.com/vtex/faststore/compare/v3.7.0...v3.8.0) (2025-01-15)
7
13
 
8
14
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -43,12 +43,12 @@
43
43
  "@envelop/graphql-jit": "^8.0.3",
44
44
  "@envelop/parser-cache": "^6.0.2",
45
45
  "@envelop/validation-cache": "^6.0.2",
46
- "@faststore/api": "^3.7.0",
47
- "@faststore/components": "^3.7.0",
48
- "@faststore/graphql-utils": "^3.5.0",
49
- "@faststore/lighthouse": "^3.5.0",
50
- "@faststore/sdk": "^3.5.0",
51
- "@faststore/ui": "^3.7.0",
46
+ "@faststore/api": "^3.9.0",
47
+ "@faststore/components": "^3.9.0",
48
+ "@faststore/graphql-utils": "^3.9.0",
49
+ "@faststore/lighthouse": "^3.9.0",
50
+ "@faststore/sdk": "^3.9.0",
51
+ "@faststore/ui": "^3.9.0",
52
52
  "@graphql-codegen/cli": "5.0.2",
53
53
  "@graphql-codegen/client-preset": "4.2.6",
54
54
  "@graphql-codegen/typescript": "4.0.7",
@@ -87,7 +87,7 @@
87
87
  "devDependencies": {
88
88
  "@cypress/code-coverage": "^3.12.1",
89
89
  "@envelop/testing": "^6.0.0",
90
- "@faststore/eslint-config": "^3.5.0",
90
+ "@faststore/eslint-config": "^3.9.0",
91
91
  "@lhci/cli": "^0.9.0",
92
92
  "@testing-library/cypress": "^10.0.1",
93
93
  "@types/cypress": "^1.1.3",
@@ -128,5 +128,5 @@
128
128
  "node": "18.19.0",
129
129
  "yarn": "1.19.1"
130
130
  },
131
- "gitHead": "16615e73214a680a16cf1f92839c8b6ca2c8467e"
131
+ "gitHead": "50345eff012999c1e2100a5fcfeccd0732da131e"
132
132
  }
@@ -6,6 +6,7 @@ import { OverriddenDefaultNavbar as Navbar } from 'src/components/sections/Navba
6
6
  import { OverriddenDefaultRegionBar as RegionBar } from 'src/components/sections/RegionBar/OverriddenDefaultRegionBar'
7
7
 
8
8
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
9
+ import PLUGINS_COMPONENTS from 'src/plugins'
9
10
 
10
11
  const CartSidebar = dynamic(
11
12
  () =>
@@ -34,6 +35,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
34
35
  CartSidebar, // out of viewport
35
36
  RegionModal, // out of viewport
36
37
  Footer, // out of viewport
38
+ ...PLUGINS_COMPONENTS,
37
39
  ...CUSTOM_COMPONENTS,
38
40
  }
39
41
 
@@ -6,6 +6,7 @@ import Incentives from 'src/components/sections/Incentives'
6
6
  import { default as GLOBAL_COMPONENTS } from '../global/Components'
7
7
 
8
8
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
9
+ import PLUGINS_COMPONENTS from 'src/plugins'
9
10
 
10
11
  const BannerText = dynamic(
11
12
  () =>
@@ -48,6 +49,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
48
49
  Newsletter,
49
50
  ProductShelf,
50
51
  ProductTiles,
52
+ ...PLUGINS_COMPONENTS,
51
53
  ...CUSTOM_COMPONENTS,
52
54
  }
53
55
 
@@ -5,6 +5,7 @@ import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sectio
5
5
  import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
6
6
  import { OverriddenDefaultProductGallery as ProductGallery } from 'src/components/sections/ProductGallery/OverriddenDefaultProductGallery'
7
7
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
8
+ import PLUGINS_COMPONENTS from 'src/plugins'
8
9
  import { default as GLOBAL_COMPONENTS } from '../global/Components'
9
10
 
10
11
  const BannerText = dynamic(
@@ -53,6 +54,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
53
54
  Newsletter,
54
55
  ProductShelf,
55
56
  ProductTiles,
57
+ ...PLUGINS_COMPONENTS,
56
58
  ...CUSTOM_COMPONENTS,
57
59
  }
58
60
 
@@ -5,6 +5,7 @@ import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sectio
5
5
  import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
6
6
  import { OverriddenDefaultProductGallery as ProductGallery } from 'src/components/sections/ProductGallery/OverriddenDefaultProductGallery'
7
7
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
8
+ import PLUGINS_COMPONENTS from 'src/plugins'
8
9
  import { default as GLOBAL_COMPONENTS } from '../global/Components'
9
10
 
10
11
  const BannerText = dynamic(
@@ -62,6 +63,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
62
63
  Newsletter,
63
64
  ProductShelf,
64
65
  ProductTiles,
66
+ ...PLUGINS_COMPONENTS,
65
67
  ...CUSTOM_COMPONENTS,
66
68
  }
67
69
 
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/Alert'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/Alert'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import Alert from '.'
4
5
 
@@ -10,6 +11,7 @@ import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinitio
10
11
  * This allows users to override the default Alert section present in the Headless CMS
11
12
  */
12
13
  export const OverriddenDefaultAlert = getOverriddenSection({
14
+ ...(overridePlugin as SectionOverrideDefinitionV1<'Alert'>),
13
15
  ...(override as SectionOverrideDefinitionV1<'Alert'>),
14
16
  Section: Alert,
15
17
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/BannerText'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/BannerText'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import BannerText from '.'
4
5
 
@@ -10,6 +11,7 @@ import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinitio
10
11
  * This allows users to override the default BannerText section present in the Headless CMS
11
12
  */
12
13
  export const OverriddenDefaultBannerText = getOverriddenSection({
14
+ ...(overridePlugin as SectionOverrideDefinitionV1<'BannerText'>),
13
15
  ...(override as SectionOverrideDefinitionV1<'BannerText'>),
14
16
  Section: BannerText,
15
17
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/Breadcrumb'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/Breadcrumb'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import Breadcrumb from '.'
4
5
 
@@ -10,6 +11,7 @@ import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinitio
10
11
  * This allows users to override the default Breadcrumb section present in the Headless CMS
11
12
  */
12
13
  export const OverriddenDefaultBreadcrumb = getOverriddenSection({
14
+ ...(overridePlugin as SectionOverrideDefinitionV1<'Breadcrumb'>),
13
15
  ...(override as SectionOverrideDefinitionV1<'Breadcrumb'>),
14
16
  Section: Breadcrumb,
15
17
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/CrossSellingShelf'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/CrossSellingShelf'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
4
5
  import CrossSellingShelf from '.'
@@ -9,6 +10,7 @@ import CrossSellingShelf from '.'
9
10
  * This allows users to override the default CrossSellingShelf section present in the Headless CMS
10
11
  */
11
12
  export const OverriddenDefaultCrossSellingShelf = getOverriddenSection({
13
+ ...(overridePlugin as SectionOverrideDefinitionV1<'CrossSellingShelf'>),
12
14
  ...(override as SectionOverrideDefinitionV1<'CrossSellingShelf'>),
13
15
  Section: CrossSellingShelf,
14
16
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/EmptyState'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/EmptyState'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
 
4
5
  import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
@@ -10,6 +11,7 @@ import EmptyState from './EmptyState'
10
11
  * This allows users to override the default EmptyState section present in the Headless CMS
11
12
  */
12
13
  export const OverriddenDefaultEmptyState = getOverriddenSection({
14
+ ...(overridePlugin as SectionOverrideDefinitionV1<'EmptyState'>),
13
15
  ...(override as SectionOverrideDefinitionV1<'EmptyState'>),
14
16
  Section: EmptyState,
15
17
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/Hero'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/Hero'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import Hero from '.'
4
5
 
@@ -10,6 +11,7 @@ import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinitio
10
11
  * This allows users to override the default Hero section present in the Headless CMS
11
12
  */
12
13
  export const OverriddenDefaultHero = getOverriddenSection({
14
+ ...(overridePlugin as SectionOverrideDefinitionV1<'Hero'>),
13
15
  ...(override as SectionOverrideDefinitionV1<'Hero'>),
14
16
  Section: Hero,
15
17
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/Navbar'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/Navbar'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
4
5
  import Navbar from './Navbar'
@@ -9,6 +10,7 @@ import Navbar from './Navbar'
9
10
  * This allows users to override the default Navbar section present in the Headless CMS
10
11
  */
11
12
  export const OverriddenDefaultNavbar = getOverriddenSection({
13
+ ...(overridePlugin as SectionOverrideDefinitionV1<'Navbar'>),
12
14
  ...(override as SectionOverrideDefinitionV1<'Navbar'>),
13
15
  Section: Navbar,
14
16
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/Newsletter'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/Newsletter'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
4
5
  import Newsletter from './Newsletter'
@@ -9,6 +10,7 @@ import Newsletter from './Newsletter'
9
10
  * This allows users to override the default Newsletter section present in the Headless CMS
10
11
  */
11
12
  export const OverriddenDefaultNewsletter = getOverriddenSection({
13
+ ...(overridePlugin as SectionOverrideDefinitionV1<'Newsletter'>),
12
14
  ...(override as SectionOverrideDefinitionV1<'Newsletter'>),
13
15
  Section: Newsletter,
14
16
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/ProductDetails'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/ProductDetails'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import ProductDetails from './ProductDetails'
4
5
 
@@ -10,6 +11,7 @@ import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinitio
10
11
  * This allows users to override the default ProductDetails section present in the Headless CMS
11
12
  */
12
13
  export const OverriddenDefaultProductDetails = getOverriddenSection({
14
+ ...(overridePlugin as SectionOverrideDefinitionV1<'ProductDetails'>),
13
15
  ...(override as SectionOverrideDefinitionV1<'ProductDetails'>),
14
16
  Section: ProductDetails,
15
17
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/ProductGallery'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/ProductGallery'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
4
5
  import ProductGallery from '.'
@@ -9,6 +10,7 @@ import ProductGallery from '.'
9
10
  * This allows users to override the default ProductGallery section present in the Headless CMS
10
11
  */
11
12
  export const OverriddenDefaultProductGallery = getOverriddenSection({
13
+ ...(overridePlugin as SectionOverrideDefinitionV1<'ProductGallery'>),
12
14
  ...(override as SectionOverrideDefinitionV1<'ProductGallery'>),
13
15
  Section: ProductGallery,
14
16
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/ProductShelf'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/ProductShelf'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import ProductShelf from '.'
4
5
 
@@ -10,6 +11,7 @@ import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinitio
10
11
  * This allows users to override the default ProductShelf section present in the Headless CMS
11
12
  */
12
13
  export const OverriddenDefaultProductShelf = getOverriddenSection({
14
+ ...(overridePlugin as SectionOverrideDefinitionV1<'ProductShelf'>),
13
15
  ...(override as SectionOverrideDefinitionV1<'ProductShelf'>),
14
16
  Section: ProductShelf,
15
17
  })
@@ -1,4 +1,5 @@
1
1
  import { override } from 'src/customizations/src/components/overrides/RegionBar'
2
+ import { override as overridePlugin } from 'src/plugins/overrides/RegionBar'
2
3
  import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
4
  import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
4
5
  import RegionBar from '.'
@@ -9,6 +10,7 @@ import RegionBar from '.'
9
10
  * This allows users to override the default RegionBar section present in the Headless CMS
10
11
  */
11
12
  export const OverriddenDefaultRegionBar = getOverriddenSection({
13
+ ...(overridePlugin as SectionOverrideDefinitionV1<'RegionBar'>),
12
14
  ...(override as SectionOverrideDefinitionV1<'RegionBar'>),
13
15
  Section: RegionBar,
14
16
  })
@@ -11,6 +11,7 @@ import Incentives from 'src/components/sections/Incentives'
11
11
  import { OverriddenDefaultNewsletter as Newsletter } from 'src/components/sections/Newsletter/OverriddenDefaultNewsletter'
12
12
  import { OverriddenDefaultProductShelf as ProductShelf } from 'src/components/sections/ProductShelf/OverriddenDefaultProductShelf'
13
13
  import ProductTiles from 'src/components/sections/ProductTiles'
14
+ import PLUGINS_COMPONENTS from 'src/plugins'
14
15
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
15
16
  import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
16
17
  import MissingContentError from 'src/sdk/error/MissingContentError/MissingContentError'
@@ -31,6 +32,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
31
32
  Newsletter,
32
33
  ProductShelf,
33
34
  ProductTiles,
35
+ ...PLUGINS_COMPONENTS,
34
36
  ...CUSTOM_COMPONENTS,
35
37
  }
36
38
 
@@ -1,9 +1,15 @@
1
1
  import WebFontsOverrides from 'src/customizations/src/components/overrides/WebFonts'
2
2
  import { default as CoreWebFonts } from 'src/fonts/WebFonts'
3
3
  import ThirdPartyScriptsOverrides from 'src/customizations/src/components/overrides/ThirdPartyScripts'
4
+ import ThirdPartyScriptsPluginsOverrides from 'src/plugins/overrides/ThirdPartyScripts'
5
+ import WebFontsOverridesPlugins from 'src/plugins/overrides/WebFonts'
4
6
 
5
7
  const Components = {
6
8
  WebFonts: CoreWebFonts,
9
+
10
+ ...ThirdPartyScriptsPluginsOverrides.components,
11
+ ...WebFontsOverridesPlugins.components,
12
+
7
13
  ...WebFontsOverrides.components,
8
14
  ...ThirdPartyScriptsOverrides.components,
9
15
  }
package/src/pages/404.tsx CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
11
11
  import RenderSections from 'src/components/cms/RenderSections'
12
12
  import { OverriddenDefaultEmptyState as EmptyState } from 'src/components/sections/EmptyState/OverriddenDefaultEmptyState'
13
+ import PLUGINS_COMPONENTS from 'src/plugins'
13
14
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
14
15
  import { PageContentType, getPage } from 'src/server/cms'
15
16
 
@@ -17,6 +18,7 @@ import { PageContentType, getPage } from 'src/server/cms'
17
18
  const COMPONENTS: Record<string, ComponentType<any>> = {
18
19
  ...GLOBAL_COMPONENTS,
19
20
  EmptyState,
21
+ ...PLUGINS_COMPONENTS,
20
22
  ...CUSTOM_COMPONENTS,
21
23
  }
22
24
 
package/src/pages/500.tsx CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
11
11
  import RenderSections from 'src/components/cms/RenderSections'
12
12
  import { OverriddenDefaultEmptyState as EmptyState } from 'src/components/sections/EmptyState/OverriddenDefaultEmptyState'
13
+ import PLUGINS_COMPONENTS from 'src/plugins'
13
14
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
14
15
  import { PageContentType, getPage } from 'src/server/cms'
15
16
 
@@ -17,6 +18,7 @@ import { PageContentType, getPage } from 'src/server/cms'
17
18
  const COMPONENTS: Record<string, ComponentType<any>> = {
18
19
  ...GLOBAL_COMPONENTS,
19
20
  EmptyState,
21
+ ...PLUGINS_COMPONENTS,
20
22
  ...CUSTOM_COMPONENTS,
21
23
  }
22
24
 
@@ -21,6 +21,7 @@ import { OverriddenDefaultNewsletter as Newsletter } from 'src/components/sectio
21
21
  import { OverriddenDefaultProductDetails as ProductDetails } from 'src/components/sections/ProductDetails/OverriddenDefaultProductDetails'
22
22
  import { OverriddenDefaultProductShelf as ProductShelf } from 'src/components/sections/ProductShelf/OverriddenDefaultProductShelf'
23
23
  import ProductTiles from 'src/components/sections/ProductTiles'
24
+ import PLUGINS_COMPONENTS from 'src/plugins'
24
25
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
25
26
  import { useSession } from 'src/sdk/session'
26
27
  import { execute } from 'src/server'
@@ -49,6 +50,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
49
50
  ProductShelf,
50
51
  ProductTiles,
51
52
  CrossSellingShelf,
53
+ ...PLUGINS_COMPONENTS,
52
54
  ...CUSTOM_COMPONENTS,
53
55
  }
54
56
 
@@ -7,6 +7,7 @@ import SEO from '../../next-seo.config'
7
7
 
8
8
  // FastStore UI's base styles
9
9
  import '../styles/global/index.scss'
10
+ import '../plugins/index.scss'
10
11
  import '../customizations/src/themes/index.scss'
11
12
 
12
13
  import { DefaultSeo } from 'next-seo'
@@ -11,6 +11,7 @@ import {
11
11
  } from 'src/components/cms/GlobalSections'
12
12
  import RenderSections from 'src/components/cms/RenderSections'
13
13
  import { OverriddenDefaultEmptyState as EmptyState } from 'src/components/sections/EmptyState/OverriddenDefaultEmptyState'
14
+ import PLUGINS_COMPONENTS from 'src/plugins'
14
15
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
15
16
  import { PageContentType, getPage } from 'src/server/cms'
16
17
  import storeConfig from '../../discovery.config'
@@ -19,6 +20,7 @@ import storeConfig from '../../discovery.config'
19
20
  const COMPONENTS: Record<string, ComponentType<any>> = {
20
21
  ...GLOBAL_COMPONENTS,
21
22
  EmptyState,
23
+ ...PLUGINS_COMPONENTS,
22
24
  ...CUSTOM_COMPONENTS,
23
25
  }
24
26
 
File without changes
@@ -0,0 +1,3 @@
1
+ // ----------------------------------------------------------
2
+ // Plugins' themes will override this file
3
+ // ----------------------------------------------------------
@@ -0,0 +1,2 @@
1
+ // eslint-disable-next-line import/no-anonymous-default-export
2
+ export default {}
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/Alert'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/BannerText'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/Breadcrumb'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/CrossSellingShelf'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/EmptyState'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/Hero'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/Navbar'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/Newsletter'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/ProductDetails'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/ProductGallery'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/ProductShelf'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { override } from 'src/customizations/src/components/overrides/RegionBar'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { default } from 'src/customizations/src/components/overrides/ThirdPartyScripts'
@@ -0,0 +1,3 @@
1
+ // This is an example of how it can be used on the plugins.
2
+
3
+ export { default } from 'src/customizations/src/components/overrides/WebFonts'