@sanity/vision
Advanced tools
Comparing version 3.52.5-canary.18 to 3.53.0
@@ -179,3 +179,3 @@ "use strict"; | ||
const key = localStorage.key(i); | ||
key != null && key.startsWith(keyPrefix) && localStorage.removeItem(key); | ||
key?.startsWith(keyPrefix) && localStorage.removeItem(key); | ||
} | ||
@@ -689,3 +689,2 @@ } | ||
`; | ||
var __defProp$1 = Object.defineProperty, __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key != "symbol" ? key + "" : key, value); | ||
function nodeContains(node, other) { | ||
@@ -708,4 +707,14 @@ return !node || !other ? !1 : node === other || !!(node.compareDocumentPosition(other) & 16); | ||
class VisionGui extends react.PureComponent { | ||
_visionRoot; | ||
_queryEditorContainer; | ||
_paramsEditorContainer; | ||
_operationUrlElement; | ||
_customApiVersionElement; | ||
_resizeListener; | ||
_querySubscription; | ||
_listenSubscription; | ||
_client; | ||
_localStorage; | ||
constructor(props) { | ||
super(props), __publicField$1(this, "_visionRoot"), __publicField$1(this, "_queryEditorContainer"), __publicField$1(this, "_paramsEditorContainer"), __publicField$1(this, "_operationUrlElement"), __publicField$1(this, "_customApiVersionElement"), __publicField$1(this, "_resizeListener"), __publicField$1(this, "_querySubscription"), __publicField$1(this, "_listenSubscription"), __publicField$1(this, "_client"), __publicField$1(this, "_localStorage"); | ||
super(props); | ||
const { client, datasets, config } = props; | ||
@@ -761,3 +770,3 @@ this._localStorage = getLocalStorage(client.config().projectId || "default"); | ||
handleResize(entries) { | ||
const entry = entries == null ? void 0 : entries[0]; | ||
const entry = entries?.[0]; | ||
this.setState((prevState) => ({ | ||
@@ -834,6 +843,5 @@ ...prevState, | ||
const apiVersion = evt.target.value; | ||
if ((apiVersion == null ? void 0 : apiVersion.toLowerCase()) === "other") { | ||
if (apiVersion?.toLowerCase() === "other") { | ||
this.setState({ customApiVersion: "v" }, () => { | ||
var _a; | ||
(_a = this._customApiVersionElement.current) == null || _a.focus(); | ||
this._customApiVersionElement.current?.focus(); | ||
}); | ||
@@ -1237,8 +1245,5 @@ return; | ||
} | ||
var __defProp = Object.defineProperty, __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value); | ||
class VisionErrorBoundary extends react.Component { | ||
constructor(props) { | ||
super(props), __publicField(this, "handleRetryRender", () => this.setState((prev) => ({ error: null, numRetries: prev.numRetries + 1 }))), __publicField(this, "handleRetryWithCacheClear", () => { | ||
clearLocalStorage(), this.handleRetryRender(); | ||
}), this.state = { error: null, numRetries: 0 }; | ||
super(props), this.state = { error: null, numRetries: 0 }; | ||
} | ||
@@ -1248,2 +1253,6 @@ static getDerivedStateFromError(error) { | ||
} | ||
handleRetryRender = () => this.setState((prev) => ({ error: null, numRetries: prev.numRetries + 1 })); | ||
handleRetryWithCacheClear = () => { | ||
clearLocalStorage(), this.handleRetryRender(); | ||
}; | ||
render() { | ||
@@ -1250,0 +1259,0 @@ if (!this.state.error) |
@@ -197,3 +197,3 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime"; | ||
const key = localStorage.key(i); | ||
key != null && key.startsWith(keyPrefix) && localStorage.removeItem(key); | ||
key?.startsWith(keyPrefix) && localStorage.removeItem(key); | ||
} | ||
@@ -707,3 +707,2 @@ } | ||
`; | ||
var __defProp$1 = Object.defineProperty, __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key != "symbol" ? key + "" : key, value); | ||
function nodeContains(node, other) { | ||
@@ -726,4 +725,14 @@ return !node || !other ? !1 : node === other || !!(node.compareDocumentPosition(other) & 16); | ||
class VisionGui extends PureComponent { | ||
_visionRoot; | ||
_queryEditorContainer; | ||
_paramsEditorContainer; | ||
_operationUrlElement; | ||
_customApiVersionElement; | ||
_resizeListener; | ||
_querySubscription; | ||
_listenSubscription; | ||
_client; | ||
_localStorage; | ||
constructor(props) { | ||
super(props), __publicField$1(this, "_visionRoot"), __publicField$1(this, "_queryEditorContainer"), __publicField$1(this, "_paramsEditorContainer"), __publicField$1(this, "_operationUrlElement"), __publicField$1(this, "_customApiVersionElement"), __publicField$1(this, "_resizeListener"), __publicField$1(this, "_querySubscription"), __publicField$1(this, "_listenSubscription"), __publicField$1(this, "_client"), __publicField$1(this, "_localStorage"); | ||
super(props); | ||
const { client, datasets, config } = props; | ||
@@ -779,3 +788,3 @@ this._localStorage = getLocalStorage(client.config().projectId || "default"); | ||
handleResize(entries) { | ||
const entry = entries == null ? void 0 : entries[0]; | ||
const entry = entries?.[0]; | ||
this.setState((prevState) => ({ | ||
@@ -852,6 +861,5 @@ ...prevState, | ||
const apiVersion = evt.target.value; | ||
if ((apiVersion == null ? void 0 : apiVersion.toLowerCase()) === "other") { | ||
if (apiVersion?.toLowerCase() === "other") { | ||
this.setState({ customApiVersion: "v" }, () => { | ||
var _a; | ||
(_a = this._customApiVersionElement.current) == null || _a.focus(); | ||
this._customApiVersionElement.current?.focus(); | ||
}); | ||
@@ -1255,8 +1263,5 @@ return; | ||
} | ||
var __defProp = Object.defineProperty, __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value); | ||
class VisionErrorBoundary extends Component { | ||
constructor(props) { | ||
super(props), __publicField(this, "handleRetryRender", () => this.setState((prev) => ({ error: null, numRetries: prev.numRetries + 1 }))), __publicField(this, "handleRetryWithCacheClear", () => { | ||
clearLocalStorage(), this.handleRetryRender(); | ||
}), this.state = { error: null, numRetries: 0 }; | ||
super(props), this.state = { error: null, numRetries: 0 }; | ||
} | ||
@@ -1266,2 +1271,6 @@ static getDerivedStateFromError(error) { | ||
} | ||
handleRetryRender = () => this.setState((prev) => ({ error: null, numRetries: prev.numRetries + 1 })); | ||
handleRetryWithCacheClear = () => { | ||
clearLocalStorage(), this.handleRetryRender(); | ||
}; | ||
render() { | ||
@@ -1268,0 +1277,0 @@ if (!this.state.error) |
{ | ||
"name": "@sanity/vision", | ||
"version": "3.52.5-canary.18+3b2329cf64", | ||
"version": "3.53.0", | ||
"description": "Sanity plugin for running/debugging GROQ-queries against Sanity datasets", | ||
@@ -75,16 +75,16 @@ "keywords": [ | ||
"devDependencies": { | ||
"@repo/package.config": "3.52.4", | ||
"@sanity/block-tools": "3.52.5-canary.18+3b2329cf64", | ||
"@sanity/cli": "3.52.5-canary.18+3b2329cf64", | ||
"@repo/package.config": "3.53.0", | ||
"@sanity/block-tools": "3.53.0", | ||
"@sanity/cli": "3.53.0", | ||
"@sanity/client": "^6.21.1", | ||
"@sanity/codegen": "3.52.5-canary.18+3b2329cf64", | ||
"@sanity/diff": "3.52.5-canary.18+3b2329cf64", | ||
"@sanity/migrate": "3.52.5-canary.18+3b2329cf64", | ||
"@sanity/mutator": "3.52.5-canary.18+3b2329cf64", | ||
"@sanity/schema": "3.52.5-canary.18+3b2329cf64", | ||
"@sanity/types": "3.52.5-canary.18+3b2329cf64", | ||
"@sanity/util": "3.52.5-canary.18+3b2329cf64", | ||
"@sanity/codegen": "3.53.0", | ||
"@sanity/diff": "3.53.0", | ||
"@sanity/migrate": "3.53.0", | ||
"@sanity/mutator": "3.53.0", | ||
"@sanity/schema": "3.53.0", | ||
"@sanity/types": "3.53.0", | ||
"@sanity/util": "3.53.0", | ||
"@types/lodash": "^4.17.7", | ||
"react": "^18.3.1", | ||
"sanity": "3.52.5-canary.18+3b2329cf64", | ||
"sanity": "3.53.0", | ||
"styled-components": "^6.1.12" | ||
@@ -96,3 +96,3 @@ }, | ||
}, | ||
"gitHead": "3b2329cf640954f308676a4b02f3fda701c65587" | ||
"gitHead": "d60dc6d2ae67d56ae680ebfffee2c66599924b4d" | ||
} |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6306
0
0
594982