@@ -125,6 +125,36 @@ export type SanityAssetSourceData = {
125125 url ?: string ;
126126} ;
127127
128+ export type CodeBlock = {
129+ _type : 'code-block' ;
130+ code ?: Code ;
131+ caption ?: string ;
132+ } ;
133+
134+ export type Content = Array <
135+ | {
136+ children ?: Array < {
137+ marks ?: Array < string > ;
138+ text ?: string ;
139+ _type : 'span' ;
140+ _key : string ;
141+ } > ;
142+ style ?: 'normal' | 'h2' | 'h3' | 'h4' | 'h5' | 'blockquote' ;
143+ listItem ?: 'bullet' | 'number' ;
144+ markDefs ?: Array < {
145+ href ?: string ;
146+ _type : 'link' ;
147+ _key : string ;
148+ } > ;
149+ level ?: number ;
150+ _type : 'block' ;
151+ _key : string ;
152+ }
153+ | ( {
154+ _key : string ;
155+ } & CodeBlock )
156+ > ;
157+
128158export type Component = {
129159 _id : string ;
130160 _type : 'component' ;
@@ -133,6 +163,7 @@ export type Component = {
133163 _rev : string ;
134164 name ?: string ;
135165 slug ?: Slug ;
166+ content ?: Content ;
136167} ;
137168
138169export type Slug = {
@@ -141,6 +172,14 @@ export type Slug = {
141172 source ?: string ;
142173} ;
143174
175+ export type Code = {
176+ _type : 'code' ;
177+ language ?: string ;
178+ filename ?: string ;
179+ code ?: string ;
180+ highlightedLines ?: Array < number > ;
181+ } ;
182+
144183export type AllSanitySchemaTypes =
145184 | SanityImagePaletteSwatch
146185 | SanityImagePalette
@@ -152,8 +191,11 @@ export type AllSanitySchemaTypes =
152191 | SanityImageMetadata
153192 | Geopoint
154193 | SanityAssetSourceData
194+ | CodeBlock
195+ | Content
155196 | Component
156- | Slug ;
197+ | Slug
198+ | Code ;
157199export declare const internalGroqTypeReferenceTo : unique symbol ;
158200// Source: ./app/routes/_docs.tsx
159201// Variable: COMPONENTS_NAVIGATION_QUERY
@@ -164,10 +206,11 @@ export type COMPONENTS_NAVIGATION_QUERYResult = Array<{
164206 slug : string | '' ;
165207} > ;
166208
167- // Source: ./app/routes/_docs/komponenter. $slug.tsx
209+ // Source: ./app/routes/_docs/komponenter/ $slug.tsx
168210// Variable: COMPONENT_QUERY
169- // Query: *[_type == "component" && slug.current == $slug][0]{ "name": coalesce(name, '') }
211+ // Query: *[_type == "component" && slug.current == $slug][0]{ content, "name": coalesce(name, '') }
170212export type COMPONENT_QUERYResult = {
213+ content : Content | null ;
171214 name : string | '' ;
172215} | null ;
173216
@@ -187,6 +230,6 @@ declare module '@sanity/client' {
187230 "*[_type == \"component\"]{ _id, name, 'slug': coalesce(slug.current, '')} | order(name asc)" :
188231 | COMPONENTS_NAVIGATION_QUERYResult
189232 | COMPONENTS_INDEX_QUERYResult ;
190- '*[_type == "component" && slug.current == $slug][0]{ "name": coalesce(name, \'\') }' : COMPONENT_QUERYResult ;
233+ '*[_type == "component" && slug.current == $slug][0]{ content, "name": coalesce(name, \'\') }' : COMPONENT_QUERYResult ;
191234 }
192235}
0 commit comments