index
int64
0
0
repo_id
stringlengths
16
181
file_path
stringlengths
28
270
content
stringlengths
1
11.6M
__index_level_0__
int64
0
10k
0
petrpan-code/sanity-io/sanity/dev/design-studio
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes/selectInputs.ts
export default { type: 'document', name: 'selectInputs', title: 'Select inputs', fields: [ { type: 'string', name: 'title', title: 'Title', }, { type: 'string', name: 'stringObjects', title: 'String (objects)', options: { list: [ { ...
1,200
0
petrpan-code/sanity-io/sanity/dev/design-studio
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes/settings.ts
import {Rule} from 'sanity' export default { type: 'document', name: 'settings', title: 'Settings', liveEdit: true, fields: [ { type: 'string', name: 'title', title: 'Title', validation: (rule: Rule) => rule.required().min(10).max(80), }, ], }
1,201
0
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes/complexArrays/arrayExample1.ts
function generateOf(num: number) { return Array.from(new Array(num)).map((_, idx) => { return { type: 'object', name: `array${idx}`, title: `Object #${idx + 1}`, fields: [{type: 'string', name: 'title', title: 'Title'}], } }) } export default { type: 'array', name: 'arrayExample...
1,202
0
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes/complexArrays/index.ts
import arrayExample1 from './arrayExample1' export default { type: 'document', name: 'complexArrays', title: 'Complex arrays', fields: [{type: 'string', name: 'title', title: 'Title'}, arrayExample1], }
1,203
0
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes/documentWithViews/index.ts
export {documentWithViews as default} from './schema'
1,204
0
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes/documentWithViews/schema.ts
export const documentWithViews = { type: 'document', name: 'documentWithViews', title: 'Document with views', fields: [ { type: 'string', name: 'title', title: 'Title', }, ], }
1,205
0
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes/documentWithViews
petrpan-code/sanity-io/sanity/dev/design-studio/schemaTypes/documentWithViews/view/styledTest.tsx
import React from 'react' import styled from 'styled-components' const Thing = styled.div` background: #fe0; height: 100%; padding: 20px; box-sizing: border-box; ` export function StyledTestView() { // throw new Error('called?') return ( <Thing key="test"> Styled with <code>styled-components</c...
1,206
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-next-studio/.depcheckignore.json
{ "ignore": ["styled-components", "react", "react-dom", "sanity", "eslint-config-next"] }
1,207
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-next-studio/.eslintrc
{ "extends": ["@sanity/eslint-config-studio", "next"] }
1,208
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-next-studio/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.
1,209
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-next-studio/next.config.js
module.exports = { async redirects() { return [ { // the studio will redirect to /desk after load, we do it here so it's already done before load source: '/studio', destination: '/studio/desk', permanent: false, }, ] }, }
1,210
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-next-studio/package.json
{ "name": "sanity-starter-next-studio", "version": "3.20.1", "private": true, "license": "MIT", "author": "Sanity.io <hello@sanity.io>", "scripts": { "build": "next build", "dev": "next dev", "lint": "eslint .", "start": "next start" }, "dependencies": { "next": "^14.0.0", "react...
1,211
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-next-studio/reset.css
html, body, #__next { margin: 0; padding: 0; height: 100%; width: 100%; overscroll-behavior: none; }
1,212
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-next-studio/tsconfig.json
{ "compilerOptions": { "target": "ES2017", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": false, "forceConsistentCasingInFileNames": true, "noEmit": true, "incremental": true, "esModuleInterop": true, "module": "esnext", "moduleRe...
1,213
0
petrpan-code/sanity-io/sanity/dev/starter-next-studio
petrpan-code/sanity-io/sanity/dev/starter-next-studio/components/Studio.tsx
import {useMemo} from 'react' import {defineConfig, Studio} from 'sanity' import {deskTool} from 'sanity/desk' const wrapperStyles = {height: '100vh', width: '100vw'} export default function StudioRoot({basePath}: {basePath: string}) { const config = useMemo( () => defineConfig({ basePath, ...
1,214
0
petrpan-code/sanity-io/sanity/dev/starter-next-studio
petrpan-code/sanity-io/sanity/dev/starter-next-studio/pages/_app.tsx
import type {AppProps} from 'next/app' // eslint-disable-next-line import/no-unassigned-import import '../reset.css' export default function App({Component, pageProps}: AppProps) { return <Component {...pageProps} /> }
1,215
0
petrpan-code/sanity-io/sanity/dev/starter-next-studio
petrpan-code/sanity-io/sanity/dev/starter-next-studio/pages/index.tsx
import Link from 'next/link' export default function IndexPage() { return ( <Link href="/studio/desk"> <a style={{ display: 'block', textAlign: 'center', paddingTop: '40vh', }} > Launch Sanity Studio inside Next.js! </a> </Link> ) }
1,216
0
petrpan-code/sanity-io/sanity/dev/starter-next-studio/pages
petrpan-code/sanity-io/sanity/dev/starter-next-studio/pages/studio/[[...tool]].tsx
import {useRouter} from 'next/router' import {useState} from 'react' import Studio from '../../components/Studio' export default function StudioPage() { const router = useRouter() const [basePath] = useState(() => router.route.split('/[[...tool]]')?.[0]) return <Studio basePath={basePath} /> }
1,217
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-studio/.depcheckignore.json
{ "ignore": ["styled-components", "react", "react-dom", "sanity"] }
1,218
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-studio/package.json
{ "name": "sanity-starter-studio", "version": "3.20.1", "private": true, "license": "MIT", "author": "Sanity.io <hello@sanity.io>", "scripts": { "build": "../.bin/sanity build", "clean": "rimraf .sanity dist", "dev": "../.bin/sanity dev --port 3337", "lint": "eslint .", "start": "../.bin...
1,219
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-studio/sanity.cli.ts
import {defineCliConfig} from 'sanity/cli' export default defineCliConfig({ api: { projectId: 'ppsg7ml5', dataset: 'test', }, })
1,220
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-studio/sanity.config.ts
import {defineConfig} from 'sanity' import {deskTool} from 'sanity/desk' export default defineConfig({ dataset: 'test', plugins: [deskTool()], name: 'default', projectId: 'ppsg7ml5', title: 'Starter Studio', schema: { types: [], }, })
1,221
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/starter-studio/tsconfig.json
{ "extends": "../tsconfig.dev", "include": ["**/*.ts", "**/*.tsx"], "compilerOptions": { "jsx": "preserve" }, "references": [{"path": "../../packages/sanity/tsconfig.lib.json"}] }
1,222
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/strict-studio/.depcheckignore.json
{ "ignore": ["styled-components", "react", "react-dom", "sanity"] }
1,223
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/strict-studio/_document.tsx
import React from 'react' import {DefaultDocument} from 'sanity' export default function Document(props) { const {entryPath, ...rest} = props return <DefaultDocument entryPath="/entry.tsx" {...rest} /> }
1,224
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/strict-studio/entry.tsx
import React, {StrictMode} from 'react' import {createRoot} from 'react-dom/client' import {Studio} from 'sanity' import config from './sanity.config' // eslint-disable-next-line no-console console.log('Rendering studio in React 18 strict mode') const root = createRoot(document.getElementById('sanity')) root.render( ...
1,225
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/strict-studio/package.json
{ "name": "sanity-strict-studio", "version": "3.20.1", "private": true, "license": "MIT", "author": "Sanity.io <hello@sanity.io>", "scripts": { "build": "../.bin/sanity build", "clean": "rimraf .sanity dist", "dev": "../.bin/sanity dev", "lint": "eslint .", "start": "../.bin/sanity start...
1,226
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/strict-studio/sanity.config.ts
import {defineConfig} from 'sanity' import {deskTool} from 'sanity/desk' import {schemaTypes} from './schema' export default defineConfig({ plugins: [deskTool()], title: 'Strict', name: 'default', projectId: 'ppsg7ml5', dataset: 'test', schema: {types: schemaTypes}, })
1,227
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/strict-studio/schema.ts
export const schemaTypes = [ { name: 'pet', type: 'document', fields: [ { name: 'name', title: 'name', type: 'string', }, { name: 'slug', title: 'Slug', type: 'slug', }, { name: 'bio', title: 'Bio', type:...
1,228
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/strict-studio/tsconfig.json
{ "extends": "../tsconfig.dev", "include": ["**/*.ts", "**/*.tsx"], "compilerOptions": { "composite": true, "jsx": "preserve" }, "references": [{"path": "../../packages/sanity/tsconfig.lib.json"}] }
1,229
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing/.eslintrc
{ "extends": "@sanity/eslint-config-studio" }
1,230
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing/README.md
# Sanity Clean Content Studio Congratulations, you have now installed the Sanity Content Studio, an open source real-time content editing environment connected to the Sanity backend. Now you can do the following things: - [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?ut...
1,231
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing/package.json
{ "name": "studio-e2e-testing", "private": true, "version": "3.20.1", "license": "MIT", "author": "Sanity.io <hello@sanity.io>", "scripts": { "build": "sanity build", "dev": "sanity dev --port 3339", "lint": "eslint .", "start": "sanity start --port 3339" }, "keywords": [ "sanity" ...
1,232
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing/sanity.cli.ts
import {defineCliConfig} from 'sanity/cli' import {loadEnvFiles} from '../../scripts/utils/loadEnvFiles' loadEnvFiles() export default defineCliConfig({ api: { projectId: process.env.SANITY_E2E_PROJECT_ID, dataset: process.env.SANITY_E2E_DATASET, }, vite: { define: { 'process.env.SANITY_E2E_PR...
1,233
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing/sanity.config.ts
import {defineConfig, definePlugin} from 'sanity' import {deskTool} from 'sanity/desk' import {visionTool} from '@sanity/vision' import {BookIcon} from '@sanity/icons' import {muxInput} from 'sanity-plugin-mux-input' import {googleMapsInput} from '@sanity/google-maps-input' import {imageAssetSource} from 'sanity-test-s...
1,234
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing/tsconfig.json
{ "compilerOptions": { "target": "ES2017", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "re...
1,235
0
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing/components/Branding.tsx
import {Box, Text} from '@sanity/ui' import React from 'react' export function Branding() { return ( <Box padding={3}> <Text weight="bold">E2E Test Studio&trade;</Text> </Box> ) }
1,236
0
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing
petrpan-code/sanity-io/sanity/dev/studio-e2e-testing/schemas/index.ts
export {schemaTypes} from 'sanity-test-studio/schema'
1,237
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-next-studio/.depcheckignore.json
{ "ignore": ["styled-components", "react", "react-dom", "sanity", "eslint-config-next"] }
1,238
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-next-studio/.eslintrc
{ "extends": ["@sanity/eslint-config-studio", "next"] }
1,239
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-next-studio/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> /// <reference types="next/navigation-types/compat/navigation" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.
1,240
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-next-studio/next.config.mjs
// eslint-disable-next-line tsdoc/syntax /** @type {import('next').NextConfig} */ export default { experimental: {appDir: true}, }
1,241
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-next-studio/package.json
{ "name": "sanity-test-next-studio", "version": "3.20.1", "private": true, "license": "MIT", "author": "Sanity.io <hello@sanity.io>", "scripts": { "build": "next build", "dev": "next dev", "lint": "eslint .", "start": "next start" }, "dependencies": { "next": "^14.0.0", "react": ...
1,242
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-next-studio/tsconfig.json
{ "compilerOptions": { "target": "esnext", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": false, "forceConsistentCasingInFileNames": true, "noEmit": true, "incremental": true, "esModuleInterop": true, "module": "esnext", "moduleRe...
1,243
0
petrpan-code/sanity-io/sanity/dev/test-next-studio
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/Studio.tsx
'use client' import {useMemo} from 'react' import {defineConfig, Studio, StudioProps} from 'sanity' import {deskTool} from 'sanity/desk' export default function StudioRoot({ basePath, scheme, unstable_globalStyles, unstable_noAuthBoundary, }: {basePath: string} & Pick< StudioProps, 'scheme' | 'unstable_no...
1,244
0
petrpan-code/sanity-io/sanity/dev/test-next-studio
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/global.css
html, body { margin: 0; padding: 0; } #sanity { height: 100vh; max-height: 100dvh; overscroll-behavior: none; -webkit-font-smoothing: antialiased; overflow: auto; }
1,245
0
petrpan-code/sanity-io/sanity/dev/test-next-studio
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/layout.tsx
// eslint-disable-next-line import/no-unassigned-import import './global.css' import StyledComponentsRegistry from './registry' export default function RootLayout({children}: {children: React.ReactNode}) { return ( <html lang="en"> <body> <StyledComponentsRegistry>{children}</StyledComponentsRegist...
1,246
0
petrpan-code/sanity-io/sanity/dev/test-next-studio
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/page.tsx
import Link from 'next/link' const links = [ // appDir ['/app-defaults', '/app with defaults'], ['/app-scheme-system', '/app with `scheme` hardcoded to `system`'], ['/app-scheme-light', '/app with `scheme` hardcoded to `light`'], ['/app-scheme-dark', '/app with `scheme` hardcoded to `dark`'], ['/app-global...
1,247
0
petrpan-code/sanity-io/sanity/dev/test-next-studio
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/registry.tsx
// https://beta.nextjs.org/docs/styling/css-in-js#styled-components 'use client' import React, {useState} from 'react' import {useServerInsertedHTML} from 'next/navigation' import {ServerStyleSheet, StyleSheetManager} from 'styled-components' export default function StyledComponentsRegistry({children}: {children: Re...
1,248
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-defaults
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-defaults/[[...path]]/page.tsx
import Studio from '../../Studio' export default function StudioPage() { return <Studio basePath="/app-defaults" /> }
1,249
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-global-styles
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-global-styles/[[...path]]/page.tsx
import Studio from '../../Studio' export default function StudioPage() { return <Studio basePath="/app-global-styles" unstable_globalStyles /> }
1,250
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-no-auth-boundary
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-no-auth-boundary/[[...path]]/page.tsx
import Studio from '../../Studio' export default function StudioPage() { return <Studio basePath="/app-no-auth-boundary" unstable_noAuthBoundary /> }
1,251
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-scheme-dark
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-scheme-dark/[[...path]]/page.tsx
import Studio from '../../Studio' export default function StudioPage() { return <Studio basePath="/app-scheme-dark" scheme="dark" /> }
1,252
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-scheme-light
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-scheme-light/[[...path]]/page.tsx
import Studio from '../../Studio' export default function StudioPage() { return <Studio basePath="/app-scheme-light" scheme="light" /> }
1,253
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-scheme-system
petrpan-code/sanity-io/sanity/dev/test-next-studio/app/app-scheme-system/[[...path]]/page.tsx
import Studio from '../../Studio' export default function StudioPage() { return <Studio basePath="/app-scheme-system" scheme="system" /> }
1,254
0
petrpan-code/sanity-io/sanity/dev/test-next-studio
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages/_app.tsx
import type {AppProps} from 'next/app' // eslint-disable-next-line import/no-unassigned-import import '../app/global.css' export default function App({Component, pageProps}: AppProps) { return <Component {...pageProps} /> }
1,255
0
petrpan-code/sanity-io/sanity/dev/test-next-studio
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages/_document.tsx
import Document, {type DocumentContext} from 'next/document' import {ServerStyleSheet} from 'styled-components' export default class ServerStyleSheetDocument extends Document { static async getInitialProps(ctx: DocumentContext) { const sheet = new ServerStyleSheet() const originalRenderPage = ctx.renderPage ...
1,256
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages/pages-defaults/[[...path]].tsx
import Studio from '../../app/Studio' export default function StudioPage() { return <Studio basePath="/pages-defaults" /> }
1,257
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages/pages-global-styles/[[...path]].tsx
import Studio from '../../app/Studio' export default function StudioPage() { return <Studio basePath="/pages-global-styles" unstable_globalStyles /> }
1,258
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages/pages-no-auth-boundary/[[...path]].tsx
import Studio from '../../app/Studio' export default function StudioPage() { return <Studio basePath="/pages-no-auth-boundary" unstable_noAuthBoundary /> }
1,259
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages/pages-scheme-dark/[[...path]].tsx
import Studio from '../../app/Studio' export default function StudioPage() { return <Studio basePath="/pages-scheme-dark" scheme="dark" /> }
1,260
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages/pages-scheme-light/[[...path]].tsx
import Studio from '../../app/Studio' export default function StudioPage() { return <Studio basePath="/pages-scheme-light" scheme="light" /> }
1,261
0
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages
petrpan-code/sanity-io/sanity/dev/test-next-studio/pages/pages-scheme-system/[[...path]].tsx
import Studio from '../../app/Studio' export default function StudioPage() { return <Studio basePath="/pages-scheme-system" scheme="system" /> }
1,262
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/.depcheckignore.json
{ "//": "https://github.com/depcheck/depcheck/pull/756", "ignore": ["https:", "@sanity/client", "@vercel/stega"] }
1,263
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/.env.example
# To disable strict mode on your local checkout: # `cp .env.example .env.development` # Then restart your `sanity dev` or `yarn dev` command SANITY_STUDIO_REACT_STRICT_MODE=false
1,264
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/.eslintignore
# Package specific sanity.theme.mjs
1,265
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/package.json
{ "name": "sanity-test-studio", "version": "3.20.1", "private": true, "license": "MIT", "author": "Sanity.io <hello@sanity.io>", "scripts": { "build": "run-s workshop:build sanity:build", "clean": "rimraf .sanity dist", "dev": "run-p workshop:dev sanity:dev", "lint": "eslint .", "sanity:...
1,266
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/sanity.cli.ts
import path from 'path' import {defineCliConfig} from 'sanity/cli' import {UserConfig} from 'vite' export default defineCliConfig({ api: { projectId: 'ppsg7ml5', dataset: 'test', }, // Can be overriden by: // A) `SANITY_STUDIO_REACT_STRICT_MODE=false yarn dev` // B) creating a `.env` file locally th...
1,267
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/sanity.config.ts
import {BookIcon} from '@sanity/icons' import {visionTool} from '@sanity/vision' import {defineConfig, definePlugin} from 'sanity' import {deskTool} from 'sanity/desk' import {muxInput} from 'sanity-plugin-mux-input' import {assist} from '@sanity/assist' import {googleMapsInput} from '@sanity/google-maps-input' import ...
1,268
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/sanity.theme.mjs
// Generated 2023-08-10T00:53:46.713Z by https://themer.sanity.build/api/hues?preset=tw-cyan&default=64748b&primary=d946ef%3Blightest%3Afdf4ff%3Bdarkest%3A701a75&transparent=6b7180%3Bdarkest%3A111826&positive=43d675%3B400%3Blightest%3Af8fafc&caution=f59e09%3B300%3Blightest%3Afffbeb%3Bdarkest%3A783510&critical=f43f5e%3B...
1,269
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/tsconfig.json
{ "extends": "../tsconfig.dev", "include": ["**/*.ts", "**/*.tsx"], "compilerOptions": { "jsx": "preserve", "allowJs": true, "isolatedModules": false }, "references": [ {"path": "../../packages/@sanity/types/tsconfig.lib.json"}, {"path": "../../packages/@sanity/vision/tsconfig.lib.json"}, ...
1,270
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/turbo.json
{ "$schema": "https://turbo.build/schema.json", "extends": ["//"], "pipeline": { "build": { "outputs": [".sanity/**", "dist/**"] } } }
1,271
0
petrpan-code/sanity-io/sanity/dev
petrpan-code/sanity-io/sanity/dev/test-studio/vercel.json
{ "version": 2, "routes": [ { "handle": "filesystem" }, { "src": "/workshop/frame/(.*)", "dest": "/workshop/frame/index.html" }, { "src": "/(.*)", "dest": "/index.html" } ] }
1,272
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/assetSources/imageAssetSource.tsx
import {ImagesIcon} from '@sanity/icons' import {AssetSource, AssetSourceComponentProps} from '@sanity/types' import {Box, Dialog, Text} from '@sanity/ui' import React from 'react' function ImageAssetSource(props: AssetSourceComponentProps) { const {dialogHeaderTitle, onClose, ...restProps} = props return ( <...
1,273
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/assetSources/index.ts
export * from './imageAssetSource'
1,274
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/components/Branding.tsx
import {Box, Text} from '@sanity/ui' import React from 'react' export function Branding() { return ( <Box padding={3}> <Text weight="bold">Test Studio&trade;</Text> </Box> ) }
1,275
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/components/formComponents.tsx
import React from 'react' import {Card} from '@sanity/ui' import { definePlugin, InputProps, FieldProps, ItemProps, PreviewProps, BlockProps, BlockAnnotationProps, } from 'sanity' export function Input(props: InputProps) { return ( <Card data-testid="input-config-component" padding={2} border tone=...
1,276
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/components/studioComponents.tsx
import React, {createContext, useContext} from 'react' import {Box, Card, Flex, Stack, Text} from '@sanity/ui' import {LogoProps, NavbarProps, LayoutProps, definePlugin, ToolMenuProps} from 'sanity' export const studioComponentsPlugin = definePlugin({ name: 'studio-components-plugin', studio: { components: { ...
1,277
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/components/workspaceLogos.tsx
import React from 'react' import {useColorScheme} from 'sanity' export const VercelLogo = () => { const {scheme} = useColorScheme() const fill = scheme === 'dark' ? '#fff' : '#000' return ( <svg width="1155" height="1000" viewBox="0 0 1155 1000" fill="none" xmlns="http://www.w3...
1,278
0
petrpan-code/sanity-io/sanity/dev/test-studio/components
petrpan-code/sanity-io/sanity/dev/test-studio/components/deskTool/LanguageFilter.tsx
import {SchemaType} from '@sanity/types' import {Card, Text} from '@sanity/ui' import React from 'react' export function LanguageFilter(props: {schemaType: SchemaType}) { return ( <Card border padding={3} radius={2}> <div style={{margin: -1}}> <Text size={2}>LanguageFilter: {props.schemaType.name}<...
1,279
0
petrpan-code/sanity-io/sanity/dev/test-studio/components
petrpan-code/sanity-io/sanity/dev/test-studio/components/documentViews/jsonPreview.tsx
import {Card, Code} from '@sanity/ui' import React from 'react' export function JSONPreviewDocumentView(props: any) { return ( <Card padding={4} sizing="border" style={{minHeight: '100%'}} tone="transparent"> <Code language="json">{JSON.stringify(props.document.displayed, null, 2)}</Code> </Card> ) }...
1,280
0
petrpan-code/sanity-io/sanity/dev/test-studio/components
petrpan-code/sanity-io/sanity/dev/test-studio/components/formBuilder/ArrayFunctions.tsx
import React from 'react' export const ArrayFunctions: any = () => { return <div>ArrayFunctions</div> }
1,281
0
petrpan-code/sanity-io/sanity/dev/test-studio/components
petrpan-code/sanity-io/sanity/dev/test-studio/components/formBuilder/CustomMarkers.tsx
import React from 'react' export const CustomMarkers: any = () => { return <div>CustomMarkers</div> }
1,282
0
petrpan-code/sanity-io/sanity/dev/test-studio/components
petrpan-code/sanity-io/sanity/dev/test-studio/components/formBuilder/Markers.tsx
import React from 'react' export const Markers: any = () => { return <div>CustomMarkers</div> }
1,283
0
petrpan-code/sanity-io/sanity/dev/test-studio/components
petrpan-code/sanity-io/sanity/dev/test-studio/components/navbar/ToolMenu.tsx
import {Button, Flex} from '@sanity/ui' import React from 'react' import {ToolLink, ToolMenuProps} from 'sanity' export function ToolMenu(props: ToolMenuProps) { const {context, tools, closeSidebar} = props return ( <Flex gap={3} direction={context === 'sidebar' ? 'column' : 'row'}> {tools.map((tool) =>...
1,284
0
petrpan-code/sanity-io/sanity/dev/test-studio/components
petrpan-code/sanity-io/sanity/dev/test-studio/components/navbar/index.ts
export * from './ToolMenu'
1,285
0
petrpan-code/sanity-io/sanity/dev/test-studio/components
petrpan-code/sanity-io/sanity/dev/test-studio/components/panes/JsonDocumentDump.tsx
import {useClient} from 'sanity' import {SanityDocument} from '@sanity/types' import {Box, Code, Flex, Spinner, Text} from '@sanity/ui' import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState, } from 'react' import {Subscription} from 'rxjs' export const JsonDocumentDump =...
1,286
0
petrpan-code/sanity-io/sanity/dev/test-studio/components/panes
petrpan-code/sanity-io/sanity/dev/test-studio/components/panes/debug/DebugPane.tsx
import {UserComponent, usePaneRouter} from 'sanity/desk' import {ChevronDownIcon, ChevronRightIcon, ControlsIcon, LinkIcon} from '@sanity/icons' import {Box, Card, Code, Flex, Stack, Text} from '@sanity/ui' import React, {useMemo} from 'react' function usePaneChildLinkComponent(props: { id: string params?: Record<...
1,287
0
petrpan-code/sanity-io/sanity/dev/test-studio/components/panes
petrpan-code/sanity-io/sanity/dev/test-studio/components/panes/debug/index.ts
export * from './DebugPane'
1,288
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/documentActions/index.ts
import {DocumentActionsResolver} from 'sanity' import {TestConfirmDialogAction} from './actions/TestConfirmDialogAction' import {TestModalDialogAction} from './actions/TestModalDialogAction' import {TestPopoverDialogAction} from './actions/TestPopoverDialogAction' import {TestCustomComponentAction} from './actions/Test...
1,289
0
petrpan-code/sanity-io/sanity/dev/test-studio/documentActions
petrpan-code/sanity-io/sanity/dev/test-studio/documentActions/actions/TestConfirmDialogAction.tsx
import {DocumentActionComponent, DocumentActionDescription} from 'sanity' import {CheckmarkCircleIcon, CloseCircleIcon} from '@sanity/icons' import {Button, Text, useToast} from '@sanity/ui' import React, {useCallback, useMemo, useState} from 'react' export const TestConfirmDialogAction: DocumentActionComponent = (pro...
1,290
0
petrpan-code/sanity-io/sanity/dev/test-studio/documentActions
petrpan-code/sanity-io/sanity/dev/test-studio/documentActions/actions/TestCustomComponentAction.tsx
import {Button, Card, Dialog, Stack, Text} from '@sanity/ui' import {DocumentActionComponent} from 'sanity' import React, {useCallback, useState} from 'react' export const TestCustomComponentAction: DocumentActionComponent = () => { const [open, setOpen] = useState<boolean>(false) const toggleOpen = useCallback(()...
1,291
0
petrpan-code/sanity-io/sanity/dev/test-studio/documentActions
petrpan-code/sanity-io/sanity/dev/test-studio/documentActions/actions/TestModalDialogAction.tsx
import {DocumentActionComponent, DocumentActionDescription} from 'sanity' import {CopyIcon} from '@sanity/icons' import {Button, Grid, Text, useToast} from '@sanity/ui' import React, {useCallback, useMemo, useState} from 'react' export const TestModalDialogAction: DocumentActionComponent = (props) => { const {onComp...
1,292
0
petrpan-code/sanity-io/sanity/dev/test-studio/documentActions
petrpan-code/sanity-io/sanity/dev/test-studio/documentActions/actions/TestPopoverDialogAction.tsx
import {DocumentActionComponent, DocumentActionDescription} from 'sanity' import {LaunchIcon} from '@sanity/icons' import {Button, Stack, Text, useToast} from '@sanity/ui' import React, {useCallback, useMemo, useState} from 'react' export const TestPopoverDialogAction: DocumentActionComponent = (props) => { const {o...
1,293
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/fieldActions/PrivateIcon.tsx
import {LockIcon} from '@sanity/icons' import {Text, Tooltip} from '@sanity/ui' import React from 'react' export function PrivateIcon() { return ( <Tooltip content={ <Text size={1} style={{whiteSpace: 'nowrap'}}> Only visible to you </Text> } padding={2} placemen...
1,294
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/fieldActions/assistFieldActionGroup.ts
import {SparklesIcon} from '@sanity/icons' import {useMemo} from 'react' import {defineDocumentFieldAction} from 'sanity' import {PrivateIcon} from './PrivateIcon' import {defineActionGroup, defineActionItem} from './define' export const assistFieldActionGroup = defineDocumentFieldAction({ name: 'test/assist', use...
1,295
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/fieldActions/copyAction.ts
import {CopyIcon} from '@sanity/icons' import {useCallback} from 'react' import {defineDocumentFieldAction} from 'sanity' import {defineActionItem} from './define' export const copyAction = defineDocumentFieldAction({ name: 'test/copy', useAction({documentId, documentType, path}) { const onAction = useCallback...
1,296
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/fieldActions/define.ts
import {DocumentFieldActionGroup, DocumentFieldActionItem} from 'sanity' // TODO: consider adding this to core export function defineActionItem(node: DocumentFieldActionItem): DocumentFieldActionItem { return node } // TODO: consider adding this to core export function defineActionGroup(node: DocumentFieldActionGro...
1,297
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/fieldActions/pasteAction.ts
import {ClipboardIcon} from '@sanity/icons' import {useCallback} from 'react' import {defineDocumentFieldAction} from 'sanity' import {defineActionItem} from './define' export const pasteAction = defineDocumentFieldAction({ name: 'test/paste', useAction({documentId, documentType, path}) { const onAction = useC...
1,298
0
petrpan-code/sanity-io/sanity/dev/test-studio
petrpan-code/sanity-io/sanity/dev/test-studio/initialValueTemplates/index.ts
import {Template} from 'sanity' export const resolveInitialValueTemplates: Template[] = [ { id: 'author-developer', title: 'Developer', description: `Selects the role "Developer" for you, so you don't have to`, schemaType: 'author', value: () => ({role: 'developer'}), }, { id: 'author-unl...
1,299