@faststore/core 2.2.51 → 2.2.52
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +42 -43
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1gneedd +1 -1
- package/.next/cache/next-server.js.nft.json +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/390.js +393 -453
- package/.next/server/chunks/74.js +329 -187
- package/.next/server/chunks/773.js +550 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/[...slug].js +5 -5
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/account.html +2 -2
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages/index.js +3 -3
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/s.js +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/static/Vfb6D5MSONBW7u11rKVhf/_buildManifest.js +1 -0
- package/.next/static/chunks/158-85b4b978d0a1cf1b.js +1 -0
- package/.next/static/chunks/pages/{404-2240f0b22db2d370.js → 404-7710903c2a59fa6e.js} +1 -1
- package/.next/static/chunks/pages/{500-c0580e3299329874.js → 500-88a231e61179db83.js} +1 -1
- package/.next/static/chunks/pages/[...slug]-e87fa1c381512f10.js +1 -0
- package/.next/static/chunks/pages/[slug]/{p-e1df08570f34a0d8.js → p-c4c65f184eaa6c98.js} +1 -1
- package/.next/static/chunks/pages/{account-b35bcbef719765f3.js → account-f163e14670372c05.js} +1 -1
- package/.next/static/chunks/pages/{checkout-55bd56ade4408cbe.js → checkout-cf498a32e110bde8.js} +1 -1
- package/.next/static/chunks/pages/index-098f2e020e698003.js +1 -0
- package/.next/static/chunks/pages/{login-3f94bff1503b4fdc.js → login-707636c85f23cac6.js} +1 -1
- package/.next/static/chunks/pages/{s-8575d9c5780684d0.js → s-0bfcfd0d40841dcf.js} +1 -1
- package/.next/static/chunks/webpack-590d458bd6727c5b.js +1 -0
- package/.next/static/css/14238403d5139812.css +1 -0
- package/.next/static/css/4e42cc999ad62b57.css +1 -0
- package/.next/static/css/d456bfc64bc489a2.css +1 -0
- package/.next/trace +80 -80
- package/.turbo/turbo-build.log +10 -9
- package/.turbo/turbo-test.log +8 -8
- package/package.json +9 -9
- package/src/components/sections/Hero/DefaultComponents.ts +11 -0
- package/src/components/sections/Hero/Hero.tsx +12 -9
- package/src/components/sections/Hero/OverriddenDefaultHero.ts +12 -0
- package/src/components/templates/LandingPage/LandingPage.tsx +1 -1
- package/src/components/templates/ProductListingPage/ProductListing.tsx +1 -1
- package/src/pages/index.tsx +1 -1
- package/src/sdk/overrides/getOverriddenSection.tsx +5 -3
- package/src/sdk/overrides/sections.tsx +4 -0
- package/src/typings/overrides.ts +1 -1
- package/.next/server/chunks/398.js +0 -611
- package/.next/static/EcMI9hKhWC_hpCOHJZCZc/_buildManifest.js +0 -1
- package/.next/static/chunks/469-1925f9bd1c82e92b.js +0 -1
- package/.next/static/chunks/pages/[...slug]-92810abb37fa7bda.js +0 -1
- package/.next/static/chunks/pages/index-2506749e45c335bf.js +0 -1
- package/.next/static/chunks/webpack-86d49ac4b093b8cf.js +0 -1
- package/.next/static/css/29868543c76bc6fd.css +0 -1
- package/.next/static/css/527e334fa69cf40a.css +0 -1
- package/.next/static/css/a2eefb25a4608343.css +0 -1
- package/src/components/sections/Hero/Overrides.tsx +0 -20
- /package/.next/static/{EcMI9hKhWC_hpCOHJZCZc → Vfb6D5MSONBW7u11rKVhf}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -38,27 +38,28 @@ info - Generating static pages (7/7)
|
|
|
38
38
|
info - Finalizing page optimization...
|
|
39
39
|
|
|
40
40
|
Route (pages) Size First Load JS
|
|
41
|
-
┌ ● /
|
|
41
|
+
┌ ● / 2.43 kB 128 kB
|
|
42
|
+
├ └ css/d456bfc64bc489a2.css 5.47 kB
|
|
42
43
|
├ /_app 0 B 83.8 kB
|
|
43
|
-
├ ● /[...slug]
|
|
44
|
-
├ └ css/
|
|
44
|
+
├ ● /[...slug] 3.57 kB 140 kB
|
|
45
|
+
├ └ css/4e42cc999ad62b57.css 5.9 kB
|
|
45
46
|
├ ● /[slug]/p 10.9 kB 136 kB
|
|
46
47
|
├ └ css/d7bbfbd552f407e9.css 11.3 kB
|
|
47
|
-
├ ○ /404 1.19 kB
|
|
48
|
-
├ ● /500 1.21 kB
|
|
49
|
-
├ ● /account
|
|
48
|
+
├ ○ /404 1.19 kB 113 kB
|
|
49
|
+
├ ● /500 1.21 kB 113 kB
|
|
50
|
+
├ ● /account 677 B 112 kB
|
|
50
51
|
├ λ /api/graphql 0 B 83.8 kB
|
|
51
52
|
├ λ /api/health/live 0 B 83.8 kB
|
|
52
53
|
├ λ /api/health/ready 0 B 83.8 kB
|
|
53
54
|
├ λ /api/preview 0 B 83.8 kB
|
|
54
|
-
├ ● /checkout 661 B
|
|
55
|
+
├ ● /checkout 661 B 112 kB
|
|
55
56
|
├ ● /login 1.14 kB 112 kB
|
|
56
|
-
└ ● /s 4.57 kB
|
|
57
|
+
└ ● /s 4.57 kB 127 kB
|
|
57
58
|
+ First Load JS shared by all 86.8 kB
|
|
58
59
|
├ chunks/framework-dfd14d7ce6600b03.js 45.3 kB
|
|
59
60
|
├ chunks/main-e4e873ee741162eb.js 24.2 kB
|
|
60
61
|
├ chunks/pages/_app-30b9666307e4b3b1.js 12.1 kB
|
|
61
|
-
├ chunks/webpack-
|
|
62
|
+
├ chunks/webpack-590d458bd6727c5b.js 2.25 kB
|
|
62
63
|
└ css/5d1f64b61ea581f4.css 3.05 kB
|
|
63
64
|
|
|
64
65
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
$ jest
|
|
2
|
-
PASS test/server/index.test.ts (
|
|
2
|
+
PASS test/server/index.test.ts (21.475 s)
|
|
3
3
|
FastStore GraphQL Layer
|
|
4
4
|
@faststore/api
|
|
5
|
-
✓ should return a valid GraphQL schema (
|
|
6
|
-
✓ should return a valid GraphQL schema contain all expected types (
|
|
5
|
+
✓ should return a valid GraphQL schema (5 ms)
|
|
6
|
+
✓ should return a valid GraphQL schema contain all expected types (5 ms)
|
|
7
7
|
✓ should return a valid GraphQL schema contain all expected queries (1 ms)
|
|
8
8
|
✓ should return a valid GraphQL schema contain all expected mutations
|
|
9
9
|
VTEX API Extension
|
|
10
10
|
✓ getTypeDefsFromFolder function should return an Array (5 ms)
|
|
11
11
|
Third Party API Extension
|
|
12
|
-
✓ getTypeDefsFromFolder function should return an Array (
|
|
12
|
+
✓ getTypeDefsFromFolder function should return an Array (9 ms)
|
|
13
13
|
Final Schema after merging
|
|
14
|
-
✓ should return a valid merged GraphQL schema (
|
|
14
|
+
✓ should return a valid merged GraphQL schema (34 ms)
|
|
15
15
|
Envelop
|
|
16
|
-
✓ should exist with its plugins (
|
|
17
|
-
✓ should handle options and execute (
|
|
16
|
+
✓ should exist with its plugins (41 ms)
|
|
17
|
+
✓ should handle options and execute (567 ms)
|
|
18
18
|
|
|
19
19
|
Test Suites: 1 passed, 1 total
|
|
20
20
|
Tests: 9 passed, 9 total
|
|
21
21
|
Snapshots: 0 total
|
|
22
|
-
Time: 21.
|
|
22
|
+
Time: 21.585 s
|
|
23
23
|
Ran all test suites.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.52",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"@envelop/graphql-jit": "^1.1.1",
|
|
38
38
|
"@envelop/parser-cache": "^2.2.0",
|
|
39
39
|
"@envelop/validation-cache": "^2.2.0",
|
|
40
|
-
"@faststore/api": "^2.2.
|
|
41
|
-
"@faststore/components": "^2.2.
|
|
42
|
-
"@faststore/graphql-utils": "^2.2.
|
|
43
|
-
"@faststore/sdk": "^2.2.
|
|
44
|
-
"@faststore/ui": "^2.2.
|
|
40
|
+
"@faststore/api": "^2.2.52",
|
|
41
|
+
"@faststore/components": "^2.2.52",
|
|
42
|
+
"@faststore/graphql-utils": "^2.2.52",
|
|
43
|
+
"@faststore/sdk": "^2.2.52",
|
|
44
|
+
"@faststore/ui": "^2.2.52",
|
|
45
45
|
"@graphql-codegen/cli": "^3.3.1",
|
|
46
46
|
"@graphql-codegen/typescript": "^3.0.4",
|
|
47
47
|
"@graphql-codegen/typescript-operations": "^3.0.4",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@cypress/code-coverage": "^3.12.1",
|
|
80
80
|
"@envelop/testing": "^6.0.0",
|
|
81
|
-
"@faststore/cli": "^2.2.
|
|
82
|
-
"@faststore/eslint-config": "^2.2.
|
|
81
|
+
"@faststore/cli": "^2.2.52",
|
|
82
|
+
"@faststore/eslint-config": "^2.2.52",
|
|
83
83
|
"@faststore/lighthouse": "^1.12.32",
|
|
84
84
|
"@lhci/cli": "^0.9.0",
|
|
85
85
|
"@testing-library/cypress": "^10.0.1",
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"node": "18.19.0",
|
|
124
124
|
"yarn": "1.19.1"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "ac3400c44c5088f570681217c224a596b0db3e39"
|
|
127
127
|
}
|
|
@@ -4,11 +4,8 @@ import {
|
|
|
4
4
|
} from '@faststore/ui'
|
|
5
5
|
import { ReactNode } from 'react'
|
|
6
6
|
import { Image } from 'src/components/ui/Image'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
HeroImage,
|
|
10
|
-
HeroHeader,
|
|
11
|
-
} from 'src/components/sections/Hero/Overrides'
|
|
7
|
+
|
|
8
|
+
import { useOverrideComponents } from 'src/sdk/overrides/OverrideContext'
|
|
12
9
|
|
|
13
10
|
import Section from '../Section'
|
|
14
11
|
|
|
@@ -36,16 +33,22 @@ const Hero = ({
|
|
|
36
33
|
title,
|
|
37
34
|
subtitle,
|
|
38
35
|
image,
|
|
39
|
-
variant
|
|
40
|
-
colorVariant
|
|
36
|
+
variant,
|
|
37
|
+
colorVariant,
|
|
41
38
|
icon,
|
|
42
39
|
}: HeroProps) => {
|
|
40
|
+
const {
|
|
41
|
+
Hero: HeroWrapper,
|
|
42
|
+
HeroImage,
|
|
43
|
+
HeroHeader,
|
|
44
|
+
} = useOverrideComponents<'Hero'>()
|
|
45
|
+
|
|
43
46
|
return (
|
|
44
47
|
<Section className={`${styles.section} section-hero`}>
|
|
45
48
|
<HeroWrapper.Component
|
|
46
49
|
{...HeroWrapper.props}
|
|
47
|
-
variant={variant}
|
|
48
|
-
colorVariant={colorVariant}
|
|
50
|
+
variant={variant ?? HeroWrapper.props.variant ?? 'primary'}
|
|
51
|
+
colorVariant={colorVariant ?? HeroWrapper.props.colorVariant ?? 'main'}
|
|
49
52
|
>
|
|
50
53
|
<HeroImage.Component {...HeroImage.props}>
|
|
51
54
|
<Image
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { override } from 'src/customizations/src/components/overrides/Hero'
|
|
2
|
+
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
+
import type { SectionOverrideDefinition } from 'src/typings/overridesDefinition'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This component exists to support overrides 1.0
|
|
7
|
+
*
|
|
8
|
+
* This allows users to override the default Hero section present in the Headless CMS
|
|
9
|
+
*/
|
|
10
|
+
export const OverriddenDefaultHero = getOverriddenSection(
|
|
11
|
+
override as SectionOverrideDefinition<'Hero'>
|
|
12
|
+
)
|
|
@@ -4,7 +4,7 @@ import type { Locator } from '@vtex/client-cms'
|
|
|
4
4
|
|
|
5
5
|
import MissingContentError from 'src/sdk/error/MissingContentError/MissingContentError'
|
|
6
6
|
import RenderSections from 'src/components/cms/RenderSections'
|
|
7
|
-
import Hero from 'src/components/sections/Hero'
|
|
7
|
+
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
8
8
|
import Incentives from 'src/components/sections/Incentives'
|
|
9
9
|
import ProductShelf from 'src/components/sections/ProductShelf'
|
|
10
10
|
import ProductTiles from 'src/components/sections/ProductTiles'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ServerCollectionPageQueryQuery } from '@generated/graphql'
|
|
2
2
|
import Breadcrumb from 'src/components/sections/Breadcrumb'
|
|
3
|
-
import Hero from 'src/components/sections/Hero'
|
|
3
|
+
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
4
4
|
import ProductGallery from 'src/components/sections/ProductGallery'
|
|
5
5
|
import ProductShelf from 'src/components/sections/ProductShelf'
|
|
6
6
|
import ScrollToTopButton from 'src/components/sections/ScrollToTopButton'
|
package/src/pages/index.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import type { ComponentType } from 'react'
|
|
|
5
5
|
|
|
6
6
|
import RenderSections from 'src/components/cms/RenderSections'
|
|
7
7
|
import BannerText from 'src/components/sections/BannerText'
|
|
8
|
-
import Hero from 'src/components/sections/Hero'
|
|
8
|
+
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
9
9
|
import Incentives from 'src/components/sections/Incentives'
|
|
10
10
|
import Newsletter from 'src/components/sections/Newsletter'
|
|
11
11
|
import ProductShelf from 'src/components/sections/ProductShelf'
|
|
@@ -21,8 +21,7 @@ function createOverriddenSection<
|
|
|
21
21
|
sectionOverrides,
|
|
22
22
|
className,
|
|
23
23
|
}: {
|
|
24
|
-
|
|
25
|
-
Section: ComponentType<ComponentProps<(typeof Sections)[SectionName]>>
|
|
24
|
+
Section: (typeof Sections)[SectionName]
|
|
26
25
|
sectionOverrides: OverriddenComponents<SectionName>
|
|
27
26
|
className?: string
|
|
28
27
|
}) {
|
|
@@ -31,9 +30,12 @@ function createOverriddenSection<
|
|
|
31
30
|
return function OverriddenSection(
|
|
32
31
|
props: React.ComponentProps<typeof Section>
|
|
33
32
|
) {
|
|
33
|
+
/** This type wizardry is here because the props won't behave correctly if nothing is done */
|
|
34
|
+
const SectionComponent = Section as ComponentType<typeof props>
|
|
35
|
+
|
|
34
36
|
return (
|
|
35
37
|
<OverrideProvider value={overrideContextValue}>
|
|
36
|
-
<
|
|
38
|
+
<SectionComponent {...props} />
|
|
37
39
|
</OverrideProvider>
|
|
38
40
|
)
|
|
39
41
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import Alert from '../../components/sections/Alert'
|
|
2
|
+
import Hero from '../../components/sections/Hero'
|
|
2
3
|
|
|
3
4
|
import type { DefaultSectionComponentsDefinitions } from '../../typings/overridesDefinition'
|
|
4
5
|
import type { SectionsOverrides } from '../../typings/overrides'
|
|
5
6
|
import { AlertDefaultComponents } from '../../components/sections/Alert/DefaultComponents'
|
|
7
|
+
import { HeroDefaultComponents } from '../../components/sections/Hero/DefaultComponents'
|
|
6
8
|
|
|
7
9
|
export const Sections = {
|
|
8
10
|
Alert,
|
|
11
|
+
Hero,
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
export const DefaultComponents: Partial<
|
|
@@ -15,4 +18,5 @@ export const DefaultComponents: Partial<
|
|
|
15
18
|
>
|
|
16
19
|
> = {
|
|
17
20
|
Alert: AlertDefaultComponents,
|
|
21
|
+
Hero: HeroDefaultComponents,
|
|
18
22
|
}
|
package/src/typings/overrides.ts
CHANGED
|
@@ -47,7 +47,7 @@ export type SectionOverride = {
|
|
|
47
47
|
}[keyof SectionsOverrides]
|
|
48
48
|
|
|
49
49
|
/** TODO: every use of this type should be replaced by SectionsOverrides after all sections are supported */
|
|
50
|
-
export type SupportedSectionsOverridesV2 = Pick<SectionsOverrides, 'Alert'>
|
|
50
|
+
export type SupportedSectionsOverridesV2 = Pick<SectionsOverrides, 'Alert' | 'Hero'>
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Originally, these types were defined in their respective Overrides file
|