Socket
Socket
Sign inDemoInstall

@sanity/vision

Package Overview
Dependencies
Maintainers
55
Versions
1327
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/vision - npm Package Compare versions

Comparing version 3.52.5-canary.18 to 3.52.5-canary.41

31

lib/_chunks-cjs/SanityVision.js

@@ -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.52.5-canary.41+812e1e3930",
"description": "Sanity plugin for running/debugging GROQ-queries against Sanity datasets",

@@ -76,15 +76,15 @@ "keywords": [

"@repo/package.config": "3.52.4",
"@sanity/block-tools": "3.52.5-canary.18+3b2329cf64",
"@sanity/cli": "3.52.5-canary.18+3b2329cf64",
"@sanity/block-tools": "3.52.5-canary.41+812e1e3930",
"@sanity/cli": "3.52.5-canary.41+812e1e3930",
"@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.52.5-canary.41+812e1e3930",
"@sanity/diff": "3.52.5-canary.41+812e1e3930",
"@sanity/migrate": "3.52.5-canary.41+812e1e3930",
"@sanity/mutator": "3.52.5-canary.41+812e1e3930",
"@sanity/schema": "3.52.5-canary.41+812e1e3930",
"@sanity/types": "3.52.5-canary.41+812e1e3930",
"@sanity/util": "3.52.5-canary.41+812e1e3930",
"@types/lodash": "^4.17.7",
"react": "^18.3.1",
"sanity": "3.52.5-canary.18+3b2329cf64",
"sanity": "3.52.5-canary.41+812e1e3930",
"styled-components": "^6.1.12"

@@ -96,3 +96,3 @@ },

},
"gitHead": "3b2329cf640954f308676a4b02f3fda701c65587"
"gitHead": "812e1e393037e12bad90533b992ab4043396b21a"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc