@sanity/visual-editing-csm
Advanced tools
Comparing version 2.0.0 to 2.0.1
# Changelog | ||
## [2.0.1](https://github.com/sanity-io/visual-editing/compare/visual-editing-csm-v2.0.0...visual-editing-csm-v2.0.1) (2025-01-22) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to ^6.27.0 (main) ([#2548](https://github.com/sanity-io/visual-editing/issues/2548)) ([faeb98f](https://github.com/sanity-io/visual-editing/commit/faeb98f5b0f029409c1d5c4e2e0bd4c2e0512cbb)) | ||
* remove isDraft ([#2537](https://github.com/sanity-io/visual-editing/issues/2537)) ([bfc5aca](https://github.com/sanity-io/visual-editing/commit/bfc5aca9000c987785ef715c8a3d149cc99c7455)) | ||
### Dependencies | ||
* The following workspace dependencies were updated | ||
* dependencies | ||
* @sanity/visual-editing-types bumped to 1.0.3 | ||
## [2.0.0](https://github.com/sanity-io/visual-editing/compare/visual-editing-csm-v1.0.1...visual-editing-csm-v2.0.0) (2025-01-22) | ||
@@ -4,0 +19,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { getPublishedId, studioPath, isDraftId } from "@sanity/client/csm"; | ||
import { getPublishedId, studioPath } from "@sanity/client/csm"; | ||
import { pipe, string, minLength, optional, object, is, record, unknown, safeParse, parse } from "valibot"; | ||
@@ -11,4 +11,3 @@ const lengthyStr$1 = pipe(string(), minLength(1)), optionalLengthyStr = optional(lengthyStr$1), sanityNodeSchema = object({ | ||
type: optionalLengthyStr, | ||
workspace: optionalLengthyStr, | ||
isDraft: optional(string()) | ||
workspace: optionalLengthyStr | ||
}); | ||
@@ -51,8 +50,4 @@ function isValidSanityNode(node) { | ||
["workspace", workspace], | ||
["tool", tool], | ||
["isDraft", isDraftId(_id)] | ||
].filter(([, value]) => !!value).map((part) => { | ||
const [key, value] = part; | ||
return value === !0 ? key : part.join("="); | ||
}).join(";") : void 0; | ||
["tool", tool] | ||
].filter(([, value]) => !!value).map((part) => part.join("=")).join(";") : void 0; | ||
} | ||
@@ -153,5 +148,2 @@ function createDataAttribute(props) { | ||
break; | ||
case "isDraft": | ||
acc.isDraft = ""; | ||
break; | ||
} | ||
@@ -158,0 +150,0 @@ return acc; |
{ | ||
"name": "@sanity/visual-editing-csm", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"homepage": "https://github.com/sanity-io/visual-editing/tree/main/packages/visual-editing-csm#readme", | ||
@@ -44,15 +44,15 @@ "bugs": { | ||
"valibot": "0.31.1", | ||
"@sanity/visual-editing-types": "^1.0.2" | ||
"@sanity/visual-editing-types": "^1.0.3" | ||
}, | ||
"devDependencies": { | ||
"@sanity/client": "^6.26.0", | ||
"@sanity/client": "^6.27.0", | ||
"@sanity/pkg-utils": "6.13.4", | ||
"eslint": "^8.57.1", | ||
"typescript": "5.7.3", | ||
"vitest": "^3.0.2", | ||
"@repo/eslint-config": "0.0.0", | ||
"@repo/package.config": "0.0.0" | ||
"vitest": "^3.0.3", | ||
"@repo/package.config": "0.0.0", | ||
"@repo/eslint-config": "0.0.0" | ||
}, | ||
"peerDependencies": { | ||
"@sanity/client": "^6.26.0" | ||
"@sanity/client": "^6.27.0" | ||
}, | ||
@@ -59,0 +59,0 @@ "engines": { |
@@ -53,5 +53,2 @@ import {studioPath} from '@sanity/client/csm' | ||
break | ||
case 'isDraft': | ||
acc.isDraft = '' | ||
break | ||
default: | ||
@@ -58,0 +55,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import {getPublishedId, isDraftId, studioPath} from '@sanity/client/csm' | ||
import {getPublishedId, studioPath} from '@sanity/client/csm' | ||
import type {SanityNode} from '@sanity/visual-editing-types' | ||
@@ -26,3 +26,2 @@ import {isValidSanityNode} from './isValidSanityNode' | ||
['tool', tool], | ||
['isDraft', isDraftId(_id)], | ||
] | ||
@@ -32,9 +31,4 @@ | ||
.filter(([, value]) => !!value) | ||
.map((part) => { | ||
const [key, value] = part | ||
// For true values, just display the key | ||
if (value === true) return key | ||
return part.join('=') | ||
}) | ||
.map((part) => part.join('=')) | ||
.join(';') | ||
} |
@@ -15,3 +15,2 @@ import {minLength, object, optional, pipe, string} from 'valibot' | ||
workspace: optionalLengthyStr, | ||
isDraft: optional(string()), | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
66326
816