Skip to content

Commit fb4fc6f

Browse files
committed
fix: apply changes in latest corel tagged release
1 parent f23ef18 commit fb4fc6f

File tree

4 files changed

+656
-756
lines changed

4 files changed

+656
-756
lines changed

apps/page-builder-demo/src/sanity.types.ts

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -771,104 +771,6 @@ export type ProjectsPageQueryResult = Array<{
771771
slug?: Slug
772772
}>
773773

774-
// Source: ./src/app/product/[slug]/page.tsx
775-
// Variable: productSlugsQuery
776-
// Query: *[_type == "product" && defined(slug.current)]{"slug": slug.current}
777-
export type ProductSlugsQueryResult = Array<{
778-
slug: string | null
779-
}>
780-
// Variable: productPageQuery
781-
// Query: *[_type == "product" && slug.current == $slug][0]
782-
export type ProductPageQueryResult = {
783-
_id: string
784-
_type: 'product'
785-
_createdAt: string
786-
_updatedAt: string
787-
_rev: string
788-
title?: string
789-
slug?: Slug
790-
media?: Array<{
791-
asset?: {
792-
_ref: string
793-
_type: 'reference'
794-
_weak?: boolean
795-
[internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
796-
}
797-
hotspot?: SanityImageHotspot
798-
crop?: SanityImageCrop
799-
alt?: string
800-
_type: 'image'
801-
_key: string
802-
}>
803-
description?: Array<{
804-
children?: Array<{
805-
marks?: Array<string>
806-
text?: string
807-
_type: 'span'
808-
_key: string
809-
}>
810-
style?: 'blockquote' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'normal'
811-
listItem?: 'bullet' | 'number'
812-
markDefs?: Array<{
813-
href?: string
814-
_type: 'link'
815-
_key: string
816-
}>
817-
level?: number
818-
_type: 'block'
819-
_key: string
820-
}>
821-
brandReference?: unknown
822-
details?: {
823-
materials?: string
824-
collectionNotes?: Array<{
825-
children?: Array<{
826-
marks?: Array<string>
827-
text?: string
828-
_type: 'span'
829-
_key: string
830-
}>
831-
style?: 'blockquote' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'normal'
832-
listItem?: 'bullet' | 'number'
833-
markDefs?: Array<{
834-
href?: string
835-
_type: 'link'
836-
_key: string
837-
}>
838-
level?: number
839-
_type: 'block'
840-
_key: string
841-
}>
842-
performance?: Array<{
843-
children?: Array<{
844-
marks?: Array<string>
845-
text?: string
846-
_type: 'span'
847-
_key: string
848-
}>
849-
style?: 'blockquote' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'normal'
850-
listItem?: 'bullet' | 'number'
851-
markDefs?: Array<{
852-
href?: string
853-
_type: 'link'
854-
_key: string
855-
}>
856-
level?: number
857-
_type: 'block'
858-
_key: string
859-
}>
860-
ledLifespan?: string
861-
certifications?: Array<string>
862-
}
863-
variants?: Array<{
864-
title?: string
865-
price?: string
866-
sku?: string
867-
_type: 'variant'
868-
_key: string
869-
}>
870-
} | null
871-
872774
// Source: ./src/app/pages/[slug]/page.tsx
873775
// Variable: pageQuery
874776
// Query: *[_type == "page" && slug.current == $slug][0]{ _type, _id, title, sections[]{ ..., symbol->{_type}, 'headline': coalesce(headline, symbol->headline), 'tagline': coalesce(tagline, symbol->tagline), 'subline': coalesce(subline, symbol->subline), 'image': coalesce(image, symbol->image), product->{ _type, _id, title, slug, "media": media[0] }, products[]{ _key, ...(@->{ _type, _id, title, slug, "media": media[0] }) } }, style }
@@ -1017,6 +919,104 @@ export type PageSlugsResult = Array<{
1017919
slug: string | null
1018920
}>
1019921

922+
// Source: ./src/app/product/[slug]/page.tsx
923+
// Variable: productSlugsQuery
924+
// Query: *[_type == "product" && defined(slug.current)]{"slug": slug.current}
925+
export type ProductSlugsQueryResult = Array<{
926+
slug: string | null
927+
}>
928+
// Variable: productPageQuery
929+
// Query: *[_type == "product" && slug.current == $slug][0]
930+
export type ProductPageQueryResult = {
931+
_id: string
932+
_type: 'product'
933+
_createdAt: string
934+
_updatedAt: string
935+
_rev: string
936+
title?: string
937+
slug?: Slug
938+
media?: Array<{
939+
asset?: {
940+
_ref: string
941+
_type: 'reference'
942+
_weak?: boolean
943+
[internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
944+
}
945+
hotspot?: SanityImageHotspot
946+
crop?: SanityImageCrop
947+
alt?: string
948+
_type: 'image'
949+
_key: string
950+
}>
951+
description?: Array<{
952+
children?: Array<{
953+
marks?: Array<string>
954+
text?: string
955+
_type: 'span'
956+
_key: string
957+
}>
958+
style?: 'blockquote' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'normal'
959+
listItem?: 'bullet' | 'number'
960+
markDefs?: Array<{
961+
href?: string
962+
_type: 'link'
963+
_key: string
964+
}>
965+
level?: number
966+
_type: 'block'
967+
_key: string
968+
}>
969+
brandReference?: unknown
970+
details?: {
971+
materials?: string
972+
collectionNotes?: Array<{
973+
children?: Array<{
974+
marks?: Array<string>
975+
text?: string
976+
_type: 'span'
977+
_key: string
978+
}>
979+
style?: 'blockquote' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'normal'
980+
listItem?: 'bullet' | 'number'
981+
markDefs?: Array<{
982+
href?: string
983+
_type: 'link'
984+
_key: string
985+
}>
986+
level?: number
987+
_type: 'block'
988+
_key: string
989+
}>
990+
performance?: Array<{
991+
children?: Array<{
992+
marks?: Array<string>
993+
text?: string
994+
_type: 'span'
995+
_key: string
996+
}>
997+
style?: 'blockquote' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'normal'
998+
listItem?: 'bullet' | 'number'
999+
markDefs?: Array<{
1000+
href?: string
1001+
_type: 'link'
1002+
_key: string
1003+
}>
1004+
level?: number
1005+
_type: 'block'
1006+
_key: string
1007+
}>
1008+
ledLifespan?: string
1009+
certifications?: Array<string>
1010+
}
1011+
variants?: Array<{
1012+
title?: string
1013+
price?: string
1014+
sku?: string
1015+
_type: 'variant'
1016+
_key: string
1017+
}>
1018+
} | null
1019+
10201020
// Source: ./src/app/project/[slug]/page.tsx
10211021
// Variable: projectSlugsQuery
10221022
// Query: *[_type == "project" && defined(slug.current)]{"slug": slug.current}
@@ -1042,10 +1042,10 @@ declare module '@sanity/client' {
10421042
'\n *[_type == "dndTestPage"]{\n _id,\n title,\n children\n }[0]\n': DndPageQueryResult
10431043
'\n *[_type == "product" && defined(slug.current)]{\n _id,\n title,\n description,\n slug,\n "media": media[0]\n }\n': ProductsPageQueryResult
10441044
'*[_type == "project" && defined(slug.current)]': ProjectsPageQueryResult
1045-
'*[_type == "product" && defined(slug.current)]{"slug": slug.current}': ProductSlugsQueryResult
1046-
'*[_type == "product" && slug.current == $slug][0]': ProductPageQueryResult
10471045
"\n *[_type == \"page\" && slug.current == $slug][0]{\n _type,\n _id,\n title,\n sections[]{\n ...,\n symbol->{_type},\n 'headline': coalesce(headline, symbol->headline),\n 'tagline': coalesce(tagline, symbol->tagline),\n 'subline': coalesce(subline, symbol->subline),\n 'image': coalesce(image, symbol->image),\n product->{\n _type,\n _id,\n title,\n slug,\n \"media\": media[0]\n },\n products[]{\n _key,\n ...(@->{\n _type,\n _id,\n title,\n slug,\n \"media\": media[0]\n })\n }\n },\n style\n }\n": PageQueryResult
10481046
'*[_type == "page" && defined(slug.current)]{"slug": slug.current}': PageSlugsResult
1047+
'*[_type == "product" && defined(slug.current)]{"slug": slug.current}': ProductSlugsQueryResult
1048+
'*[_type == "product" && slug.current == $slug][0]': ProductPageQueryResult
10491049
'*[_type == "project" && defined(slug.current)]{"slug": slug.current}': ProjectSlugsQueryResult
10501050
'*[_type == "project" && slug.current == $slug][0]': ProjectPageQueryResult
10511051
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
},
3434
"prettier": "@repo/prettier-config",
3535
"dependencies": {
36-
"@sanity/types": "3.59.2-corel.412",
37-
"@sanity/util": "3.59.2-corel.412",
38-
"@sanity/vision": "3.59.2-corel.412",
39-
"groq": "3.59.2-corel.412",
40-
"sanity": "3.59.2-corel.412"
36+
"@sanity/types": "3.65.2-corel.465",
37+
"@sanity/util": "3.65.2-corel.465",
38+
"@sanity/vision": "3.65.2-corel.465",
39+
"groq": "3.65.2-corel.465",
40+
"sanity": "3.65.2-corel.465"
4141
},
4242
"devDependencies": {
4343
"@repo/prettier-config": "workspace:*",

packages/presentation/src/PresentationTool.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ export default function PresentationTool(props: {
175175
const navigate = useMemo(() => debounce<PresentationNavigate>(_navigate, 50), [_navigate])
176176

177177
const [state, dispatch] = useReducer(presentationReducer, {}, presentationReducerInit)
178-
const {bundlesPerspective, perspective: globalPerspective = 'previewDrafts'} = usePerspective()
178+
const {perspectiveStack, selectedPerspectiveName = 'previewDrafts'} = usePerspective()
179179
const perspective = (
180-
globalPerspective.startsWith('bundle.') ? bundlesPerspective : globalPerspective
180+
selectedPerspectiveName.startsWith('r') ? perspectiveStack : selectedPerspectiveName
181181
) as PresentationPerspective
182182

183183
const viewport = useMemo(() => (params.viewport ? 'mobile' : 'desktop'), [params.viewport])

0 commit comments

Comments
 (0)