Skip to content

Commit

Permalink
feat: releases v0.5
Browse files Browse the repository at this point in the history
chore(release): publish corel [skip ci]

fix: fully support perspectives

chore: improve typegen, add react compiler

chore: start moving to typegen

chore: fix weird build issue

chore: bump versions, tweak live setup

chore(release): publish corel [skip ci]

fix: ensure drafts are included in the documents list

chore: render array if array

chore(release): publish corel [skip ci]

fix: apply changes in latest corel tagged release

chore: use `@sanity/client` to validate API perspective

fix: only refetch if the list of ids have changed

chore: sync up remaining changes

fix: improve perspectives handling

chore: regen lockfile

chore: fix linter issues

chore(release): publish corel [skip ci]

chore: prepare release

fix: apply suggestion from pedro

fix: restore changes lost in merge conflict handling

fix: adjust to changes in bundle perspectives

chore: lockfile

fix: use publishedId from 'sanity'

fix: use publishedId when fetching union types

chore(release-overlay-previews): add simple release overlay previews (#2084)

* chore(release-overlay-previews): add simple release overlay previews

wip improve data fetching

wip ui

tidy up comments

tidy up postmessagereleases

ensure preview is only shown when data attribute is set

* chore(release-overlay-previews): use useReleases hook

* chore(release-overlay-previews): add releases.data to comlink useEffect deps

* fix: update how the nearestRelease is obtained

---------

fix: support bundle perspective (#2083)

* chore: fix live-next build

* fix: support bundle perspective

fix: ensure comlink stays connected if `navigate` changes (#2082)

* chore: find cause

* fix: handle comlink disconnect

* chore: remove debug code

fix: remove vite.config temp file

chore: revert presentation loader tag name change

chore(publish): publish new version

fix(loader): load drafts data when using previewDrafts

feat(presentation): add releases to presentation - first pass

chore(deps): update to 6.22.2-bundle-perspective client

chore(deps): update sanity to latest corel

chore(deps): remove local sanity icons and ui packages

chore(deps): update sanity corel to latest

chore(deps): update sanity corel to latest

chore(deps): update to 6.22.2-bundle-perspective client

fix(deps): add the registry files

fix: update types due to client change

chore(deps): link with tagged client release

Co-Authored-By: pedrobonamin <[email protected]>
Co-Authored-By: George Francis <[email protected]>
  • Loading branch information
2 people authored and stipsan committed Dec 6, 2024
1 parent ad8a765 commit d24f8b3
Show file tree
Hide file tree
Showing 28 changed files with 897 additions and 1,077 deletions.
147 changes: 0 additions & 147 deletions apps/live-next/sanity.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,141 +265,6 @@ export type SanityImageMetadata = {
isOpaque?: boolean
}

export type SanityAssistInstructionTask = {
_type: 'sanity.assist.instructionTask'
path?: string
instructionKey?: string
started?: string
updated?: string
info?: string
}

export type SanityAssistTaskStatus = {
_type: 'sanity.assist.task.status'
tasks?: Array<
{
_key: string
} & SanityAssistInstructionTask
>
}

export type SanityAssistSchemaTypeAnnotations = {
_type: 'sanity.assist.schemaType.annotations'
title?: string
fields?: Array<
{
_key: string
} & SanityAssistSchemaTypeField
>
}

export type SanityAssistOutputType = {
_type: 'sanity.assist.output.type'
type?: string
}

export type SanityAssistOutputField = {
_type: 'sanity.assist.output.field'
path?: string
}

export type SanityAssistInstructionContext = {
_type: 'sanity.assist.instruction.context'
reference?: {
_ref: string
_type: 'reference'
_weak?: boolean
[internalGroqTypeReferenceTo]?: 'assist.instruction.context'
}
}

export type AssistInstructionContext = {
_id: string
_type: 'assist.instruction.context'
_createdAt: string
_updatedAt: string
_rev: string
title?: string
context?: Array<{
children?: Array<{
marks?: Array<string>
text?: string
_type: 'span'
_key: string
}>
style?: 'normal'
listItem?: never
markDefs?: null
level?: number
_type: 'block'
_key: string
}>
}

export type SanityAssistInstructionUserInput = {
_type: 'sanity.assist.instruction.userInput'
message?: string
description?: string
}

export type SanityAssistInstructionPrompt = Array<{
children?: Array<
| {
marks?: Array<string>
text?: string
_type: 'span'
_key: string
}
| ({
_key: string
} & SanityAssistInstructionFieldRef)
| ({
_key: string
} & SanityAssistInstructionContext)
| ({
_key: string
} & SanityAssistInstructionUserInput)
>
style?: 'normal'
listItem?: never
markDefs?: null
level?: number
_type: 'block'
_key: string
}>

export type SanityAssistInstructionFieldRef = {
_type: 'sanity.assist.instruction.fieldRef'
path?: string
}

export type SanityAssistInstruction = {
_type: 'sanity.assist.instruction'
prompt?: SanityAssistInstructionPrompt
icon?: string
title?: string
userId?: string
createdById?: string
output?: Array<
| ({
_key: string
} & SanityAssistOutputField)
| ({
_key: string
} & SanityAssistOutputType)
>
}

export type SanityAssistSchemaTypeField = {
_type: 'sanity.assist.schemaType.field'
path?: string
instructions?: Array<
{
_key: string
} & SanityAssistInstruction
>
}

export type Color = {
_type: 'color'
hex?: string
Expand Down Expand Up @@ -448,18 +313,6 @@ export type AllSanitySchemaTypes =
| SanityImageAsset
| SanityAssetSourceData
| SanityImageMetadata
| SanityAssistInstructionTask
| SanityAssistTaskStatus
| SanityAssistSchemaTypeAnnotations
| SanityAssistOutputType
| SanityAssistOutputField
| SanityAssistInstructionContext
| AssistInstructionContext
| SanityAssistInstructionUserInput
| SanityAssistInstructionPrompt
| SanityAssistInstructionFieldRef
| SanityAssistInstruction
| SanityAssistSchemaTypeField
| Color
| RgbaColor
| HsvaColor
Expand Down
1 change: 0 additions & 1 deletion apps/page-builder-demo/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {Page, sectionFragment} from '@/components/page'
import {sanityFetch} from '@/sanity/live'
import {defineQuery} from 'next-sanity'
import {notFound} from 'next/navigation'

const frontPageQuery = defineQuery(`
*[_id == "siteSettings"][0]{
Expand Down
1 change: 0 additions & 1 deletion apps/page-builder-demo/src/app/pages/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {Page, sectionFragment} from '@/components/page'
import {sanityFetch} from '@/sanity/live'
import {defineQuery} from 'next-sanity'
import {notFound} from 'next/navigation'

const pageQuery = defineQuery(`
*[_type == "page" && slug.current == $slug][0]{
Expand Down
4 changes: 4 additions & 0 deletions apps/studio/sanity.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ function defineWorkspace(
projectId,
dataset,
plugins,
scheduledPublishing: {
// Content Releases already handle scheduling
enabled: false,
},
})
}

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
},
"prettier": "@repo/prettier-config",
"dependencies": {
"@sanity/types": "3.66.0",
"@sanity/util": "3.66.0",
"@sanity/vision": "3.66.0",
"groq": "3.66.0",
"sanity": "3.66.0"
"@sanity/types": "3.65.2-corel.468",
"@sanity/util": "3.65.2-corel.468",
"@sanity/vision": "3.65.2-corel.468",
"groq": "3.65.2-corel.468",
"sanity": "3.65.2-corel.468"
},
"devDependencies": {
"@repo/prettier-config": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/@repo/env/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const datasets = {
'blog': 'blog',
} as const

export const apiVersion = '2024-10-21' as const
export const apiVersion = 'X' as const

export const workspaces = {
'astro': {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {assist} from '@sanity/assist'
// import {assist} from '@sanity/assist'
import {defineField, definePlugin, defineType} from 'sanity'
import {unsplashImageAsset} from 'sanity-plugin-asset-source-unsplash'
import {structureTool} from 'sanity/structure'
Expand All @@ -25,6 +25,7 @@ const brandType = defineType(
title: 'Logo',
options: {
hotspot: true,
// @ts-expect-error - this is fine
aiAssist: {
imageDescriptionField: 'alt',
imageInstructionField: 'imagePrompt',
Expand All @@ -51,5 +52,9 @@ const brandType = defineType(
export const crossDatasetReferencesPlugin = definePlugin({
name: '@repo/sanity-schema/cross-dataset-references',
schema: {types: [brandType]},
plugins: [assist(), unsplashImageAsset(), structureTool()],
plugins: [
// assist() , Assist is not supported yet in releases.
unsplashImageAsset(),
structureTool(),
],
})
Loading

0 comments on commit d24f8b3

Please sign in to comment.