Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sanity/preview-kit

Package Overview
Dependencies
Maintainers
62
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/preview-kit - npm Package Compare versions

Comparing version 5.1.3 to 5.1.4

19

dist/_chunks-es/LiveQueryProvider.js

@@ -5,3 +5,3 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";

import { applyPatch } from "mendoza";
import { memo, useState, useEffect, useCallback, startTransition, useMemo } from "react";
import { useState, useEffect, useCallback, startTransition, useMemo } from "react";
import { defineStoreContext } from "./context.js";

@@ -933,3 +933,4 @@ var s = { 0: 8203, 1: 8204, 2: 8205, 3: 8290, 4: 8291, 5: 8288, 6: 65279, 7: 8289, 8: 119155, 9: 119156, a: 119157, b: 119158, c: 119159, d: 119160, e: 119161, f: 119162 }, c = { 0: 8203, 1: 8204, 2: 8205, 3: 65279 };

max: 500
}), LiveStoreProvider = memo(function(props) {
});
function LiveStoreProvider(props) {
const { children, refreshInterval = 1e4, token } = props;

@@ -1012,5 +1013,5 @@ if (!props.client)

] });
});
}
LiveStoreProvider.displayName = "LiveStoreProvider";
const QuerySubscription = memo(function(props) {
function QuerySubscription(props) {
const { client, refreshInterval, query, params, listeners, snapshots, turboIdsFromSourceMap } = props, { projectId, dataset } = useMemo(() => {

@@ -1060,3 +1061,3 @@ const { projectId: projectId2, dataset: dataset2 } = client.config();

]), null;
});
}
QuerySubscription.displayName = "QuerySubscription";

@@ -1086,3 +1087,3 @@ function getTurboCacheKey(projectId, dataset, _id) {

}
const Turbo = memo(function(props) {
function Turbo(props) {
const { client, snapshots, cache, turboIds, setTurboIds, docsInUse } = props, { projectId, dataset } = useMemo(() => {

@@ -1163,5 +1164,5 @@ const { projectId: projectId2, dataset: dataset2 } = client.config();

)) });
});
}
Turbo.displayName = "Turbo";
const GetDocuments = memo(function(props) {
function GetDocuments(props) {
const { client, projectId, dataset, ids } = props;

@@ -1177,3 +1178,3 @@ return useEffect(() => {

}, [client, dataset, ids, projectId]), null;
});
}
GetDocuments.displayName = "GetDocuments";

@@ -1180,0 +1181,0 @@ let warnedAboutCrossDatasetReference = !1;

@@ -0,3 +1,3 @@

import {ComponentType} from 'react'
import {LazyExoticComponent} from 'react'
import {NamedExoticComponent} from 'react'
import type {QueryParams} from '@sanity/client'

@@ -30,13 +30,4 @@ import type {SanityClient} from '@sanity/client'

/**
* @deprecated Use `LiveQueryProvider` instead
* @internal
*/
export declare function createLiveQueryProvider(_options: {
GroqStoreProvider: React.ComponentType<LiveQueryProviderProps>
LiveStoreProvider: React.ComponentType<LiveQueryProviderProps>
}): React.ComponentType<LiveQueryProviderProps>
/**
* @internal
*/
export declare type DefineListenerContext = <QueryResult>(

@@ -75,3 +66,3 @@ initialSnapshot: QueryResult,

/** @public */
declare const LiveQueryProvider: LazyExoticComponent<NamedExoticComponent<LiveQueryProviderProps>>
declare const LiveQueryProvider: LazyExoticComponent<ComponentType<LiveQueryProviderProps>>
export {LiveQueryProvider}

@@ -78,0 +69,0 @@ export default LiveQueryProvider

@@ -220,9 +220,7 @@ import { useQueryParams } from "@sanity/preview-kit-compat";

}
const LiveQueryProvider = lazy(() => import("./_chunks-es/LiveQueryProvider.js"));
function createLiveQueryProvider(_options) {
return LiveQueryProvider;
}
const LiveQueryProvider = lazy(
() => import("./_chunks-es/LiveQueryProvider.js")
);
export {
LiveQueryProvider,
createLiveQueryProvider,
LiveQueryProvider as default,

@@ -229,0 +227,0 @@ useIsEnabled,

@@ -1,2 +0,1 @@

import {MemoExoticComponent} from 'react'
import type {QueryParams} from '@sanity/client'

@@ -8,3 +7,3 @@

*/
export declare function LiveQueryClientComponent<
declare function LiveQueryClientComponent<
QueryResult,

@@ -14,11 +13,9 @@ QueryParams extends QueryParams = QueryParams,

export declare namespace LiveQueryClientComponent {
declare namespace LiveQueryClientComponent {
var displayName: string
}
export {LiveQueryClientComponent}
export default LiveQueryClientComponent
/** @public */
declare const LiveQueryClientComponentMemo: MemoExoticComponent<typeof LiveQueryClientComponent>
export default LiveQueryClientComponentMemo
/** @public */
export declare interface LiveQueryClientComponentProps<QueryResult, QueryParams> {

@@ -25,0 +22,0 @@ children?: React.ReactNode | undefined

"use client";
import { useContext, useMemo, useState, useCallback, useSyncExternalStore, memo, isValidElement, cloneElement, Children } from "react";
import { useContext, useMemo, useState, useCallback, useSyncExternalStore, isValidElement, cloneElement, Children } from "react";
import { useQueryParams } from "@sanity/preview-kit-compat";

@@ -52,6 +52,5 @@ import { defineStoreContext } from "../_chunks-es/context.js";

LiveQueryClientComponent.displayName = "LiveQueryClientComponent";
const LiveQueryClientComponentMemo = memo(LiveQueryClientComponent);
export {
LiveQueryClientComponentMemo as default
LiveQueryClientComponent as default
};
//# sourceMappingURL=client-component.js.map
{
"name": "@sanity/preview-kit",
"version": "5.1.3",
"version": "5.1.4",
"description": "General purpose utils for live content and visual editing",

@@ -117,3 +117,3 @@ "keywords": [

"semantic-release": "^24.1.2",
"typescript": "5.5.3",
"typescript": "5.6.3",
"use-sync-external-store": "1.2.2",

@@ -120,0 +120,0 @@ "vitest": "^2.1.3",

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

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

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