These rules can now be found in a repository:
https://github.com/sanity-io/ai-rules/blob/main/sanity-opinionated.mdc
Read more in the Sanity documentation:
| HTTP/2 307 | |
| age: 0 | |
| cache-control: no-cache | |
| cache-status: "Netlify Durable"; fwd=bypass | |
| cache-status: "Netlify Edge"; fwd=miss | |
| date: Mon, 14 Jul 2025 12:54:34 GMT | |
| location: /stats/npm | |
| netlify-vary: query | |
| server: Netlify | |
| strict-transport-security: max-age=31536000 |
| import { Stack, Text, Flex, Button, Radio, Grid, Container } from "@sanity/ui"; | |
| import { useState } from "react"; | |
| const LANGUAGES = [ | |
| { code: "en", label: "English" }, | |
| { code: "fr", label: "Français" }, | |
| { code: "de", label: "Deutsch" }, | |
| { code: "it", label: "Italiano" }, | |
| { code: "es", label: "Español" }, | |
| { code: "ko", label: "한국어" }, |
These rules can now be found in a repository:
https://github.com/sanity-io/ai-rules/blob/main/sanity-opinionated.mdc
Read more in the Sanity documentation:
| import {uuid} from '@sanity/uuid' | |
| import {SanityDocumentLike} from 'sanity' | |
| import {defineMigration, create} from 'sanity/migrate' | |
| // Update these constants to match your Document Internationalization Plugin configuration | |
| const BASE_FIELD = `__i18n_base` | |
| const REFS_FIELD = `__i18n_refs` | |
| const LANGUAGE_FIELD = `_lang` | |
| const ID_SUFFIX = '__i18n' |
| "editor.padding.top": 10, | |
| "editor.lineDecorationsWidth": 20, | |
| "breadcrumbs.enabled": false, | |
| "github.copilot.editor.enableCodeActions": false, | |
| "github.copilot.editor.enableAutoCompletions": true, | |
| "editor.cursorBlinking": "solid", | |
| "editor.cursorSmoothCaretAnimation": "on", | |
| "editor.cursorStyle": "line", | |
| "editor.cursorWidth": 18, | |
| "editor.fontSize": 20, |
| import { | |
| createIfNotExists, | |
| defineMigration, | |
| } from 'sanity/migrate' | |
| type WordPressDataType = | |
| | 'categories' | |
| | 'posts' | |
| | 'tags' | |
| | 'users' |
| /** | |
| * --------------------------------------------------------------------------------- | |
| * 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: |
| import type { KeyedObject, TypedObject } from "sanity"; | |
| import PageBuilderContent from "./pageBuilderContent"; | |
| import PageBuilderColumns from "./pageBuilderColumns"; | |
| const Components = { | |
| pageBuilderContent: PageBuilderContent, | |
| pageBuilderColumns: PageBuilderColumns, | |
| }; |
| import {useEffect, useState} from 'react' | |
| import {ImageAsset, ObjectInputProps, Reference, set, unset, useClient} from 'sanity' | |
| type ExtendedImageValue = { | |
| asset: Reference | |
| lqip?: string | |
| blurHash?: string | |
| } | |
| export default function ImageExtendedInput(props: ObjectInputProps<ExtendedImageValue>) { |
| import {useState, useEffect, useCallback} from 'react' | |
| import {useToast, Card, Button, Stack, Text, Code} from '@sanity/ui' | |
| import {extractWithPath} from '@sanity/mutator' | |
| import { | |
| Preview, | |
| DocumentActionProps, | |
| SanityDocument, | |
| useClient, | |
| useSchema, | |
| pathToString, |