Skip to content

Commit

Permalink
ready next 15
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Nov 21, 2024
1 parent b441211 commit 3501430
Show file tree
Hide file tree
Showing 19 changed files with 677 additions and 142 deletions.
8 changes: 7 additions & 1 deletion next-14/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
logging: {
fetches: {
fullUrl: true,
},
},
}

export default nextConfig
6 changes: 4 additions & 2 deletions next-14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
"start": "next start",
"typegen:generate": "sanity typegen generate"
},
"dependencies": {
"@sanity/client": "^6.22.5",
"groq": "^3.64.2",
"next": "14.2.18",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"use-effect-event": "^1.0.2"
},
"devDependencies": {
"@types/node": "^20",
Expand Down
3 changes: 3 additions & 0 deletions next-14/sanity-typegen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"schema": "../studio/schema.json"
}
168 changes: 168 additions & 0 deletions next-14/sanity.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
/**
* ---------------------------------------------------------------------------------
* This file has been generated by Sanity TypeGen.
* Command: `sanity typegen generate`
*
* Any modifications made directly to this file will be overwritten the next time
* the TypeScript definitions are generated. Please make changes to the Sanity
* schema definitions and/or GROQ queries if you need to update these types.
*
* For more information on how to use Sanity TypeGen, visit the official documentation:
* https://www.sanity.io/docs/sanity-typegen
* ---------------------------------------------------------------------------------
*/

// Source: schema.json
export type SanityImagePaletteSwatch = {
_type: 'sanity.imagePaletteSwatch'
background?: string
foreground?: string
population?: number
title?: string
}

export type SanityImagePalette = {
_type: 'sanity.imagePalette'
darkMuted?: SanityImagePaletteSwatch
lightVibrant?: SanityImagePaletteSwatch
darkVibrant?: SanityImagePaletteSwatch
vibrant?: SanityImagePaletteSwatch
dominant?: SanityImagePaletteSwatch
lightMuted?: SanityImagePaletteSwatch
muted?: SanityImagePaletteSwatch
}

export type SanityImageDimensions = {
_type: 'sanity.imageDimensions'
height?: number
width?: number
aspectRatio?: number
}

export type SanityImageHotspot = {
_type: 'sanity.imageHotspot'
x?: number
y?: number
height?: number
width?: number
}

export type SanityImageCrop = {
_type: 'sanity.imageCrop'
top?: number
bottom?: number
left?: number
right?: number
}

export type SanityFileAsset = {
_id: string
_type: 'sanity.fileAsset'
_createdAt: string
_updatedAt: string
_rev: string
originalFilename?: string
label?: string
title?: string
description?: string
altText?: string
sha1hash?: string
extension?: string
mimeType?: string
size?: number
assetId?: string
uploadId?: string
path?: string
url?: string
source?: SanityAssetSourceData
}

export type SanityImageAsset = {
_id: string
_type: 'sanity.imageAsset'
_createdAt: string
_updatedAt: string
_rev: string
originalFilename?: string
label?: string
title?: string
description?: string
altText?: string
sha1hash?: string
extension?: string
mimeType?: string
size?: number
assetId?: string
uploadId?: string
path?: string
url?: string
metadata?: SanityImageMetadata
source?: SanityAssetSourceData
}

export type SanityImageMetadata = {
_type: 'sanity.imageMetadata'
location?: Geopoint
dimensions?: SanityImageDimensions
palette?: SanityImagePalette
lqip?: string
blurHash?: string
hasAlpha?: boolean
isOpaque?: boolean
}

export type Geopoint = {
_type: 'geopoint'
lat?: number
lng?: number
alt?: number
}

export type SanityAssetSourceData = {
_type: 'sanity.assetSourceData'
name?: string
id?: string
url?: string
}

export type Demo = {
_id: string
_type: 'demo'
_createdAt: string
_updatedAt: string
_rev: string
title?: string
slug?: Slug
}

export type Slug = {
_type: 'slug'
current?: string
source?: string
}

export type Theme = {
_id: string
_type: 'theme'
_createdAt: string
_updatedAt: string
_rev: string
background?: string
text?: string
}

export type AllSanitySchemaTypes =
| SanityImagePaletteSwatch
| SanityImagePalette
| SanityImageDimensions
| SanityImageHotspot
| SanityImageCrop
| SanityFileAsset
| SanityImageAsset
| SanityImageMetadata
| Geopoint
| SanityAssetSourceData
| Demo
| Slug
| Theme
export declare const internalGroqTypeReferenceTo: unique symbol
6 changes: 5 additions & 1 deletion next-15/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import type {NextConfig} from 'next'

const nextConfig: NextConfig = {
/* config options here */
logging: {
fetches: {
fullUrl: true,
},
},
}

export default nextConfig
6 changes: 4 additions & 2 deletions next-15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
"build": "next build",
"dev": "next dev --turbopack",
"lint": "next lint",
"start": "next start"
"start": "next start",
"typegen:generate": "sanity typegen generate"
},
"dependencies": {
"@sanity/client": "^6.22.5",
"groq": "^3.64.2",
"next": "15.0.3",
"react": "rc",
"react-dom": "rc"
"react-dom": "rc",
"use-effect-event": "^1.0.2"
},
"devDependencies": {
"@types/node": "^20",
Expand Down
3 changes: 3 additions & 0 deletions next-15/sanity-typegen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"schema": "../studio/schema.json"
}
Loading

0 comments on commit 3501430

Please sign in to comment.