@sanity/embeddings-index-ui 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +53 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { AddIcon, ErrorOutlineIcon, TrashIcon, EllipsisVerticalIcon, UndoIcon, E
|
|
|
2
2
|
import { useClient, useProjectId, useSchema, DefaultPreview, useDocumentPreviewStore, getPreviewStateObservable, SanityDefaultPreview, getPreviewValueWithFallback, typed, definePlugin, unset, setIfMissing, set, isObjectInputProps } from "sanity";
|
|
3
3
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
4
4
|
import { Card, Text, Stack, Label, Box, TextInput, TextArea, Dialog, Button, Spinner, Autocomplete, Flex, Heading, MenuButton, Menu, MenuItem } from "@sanity/ui";
|
|
5
|
-
import
|
|
5
|
+
import React, { useMemo, createContext, useState, useEffect, useContext, useCallback, useId, useRef, useSyncExternalStore, forwardRef } from "react";
|
|
6
6
|
import { useIntentLink, useRouter } from "sanity/router";
|
|
7
7
|
import { useDocumentPane } from "sanity/desk";
|
|
8
8
|
function queryIndex(queryConfig, client) {
|
|
@@ -287,16 +287,16 @@ function requireDist() {
|
|
|
287
287
|
renderCounterRegistry: () => renderCounterRegistry,
|
|
288
288
|
useRenderCounter: () => useRenderCounter
|
|
289
289
|
}), dist = __toCommonJS(index_exports);
|
|
290
|
-
var React = __toESM(
|
|
290
|
+
var React$1 = __toESM(React), { useRef: useRef2, useEffect: useEffect2, isValidElement } = React$1, _a, ReactSecretInternals = (
|
|
291
291
|
//@ts-ignore
|
|
292
|
-
(_a = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) != null ? _a : React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
292
|
+
(_a = React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) != null ? _a : React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
293
293
|
), $empty = Symbol.for("react.memo_cache_sentinel"), _a2, c = (
|
|
294
294
|
// @ts-expect-error
|
|
295
|
-
typeof ((_a2 = React.__COMPILER_RUNTIME) == null ? void 0 : _a2.c) == "function" ? (
|
|
295
|
+
typeof ((_a2 = React$1.__COMPILER_RUNTIME) == null ? void 0 : _a2.c) == "function" ? (
|
|
296
296
|
// @ts-expect-error
|
|
297
|
-
React.__COMPILER_RUNTIME.c
|
|
297
|
+
React$1.__COMPILER_RUNTIME.c
|
|
298
298
|
) : function(size) {
|
|
299
|
-
return React.useMemo(() => {
|
|
299
|
+
return React$1.useMemo(() => {
|
|
300
300
|
const $ = new Array(size);
|
|
301
301
|
for (let ii = 0; ii < size; ii++)
|
|
302
302
|
$[ii] = $empty;
|
|
@@ -1646,7 +1646,7 @@ function timer(dueTime, intervalOrScheduler, scheduler) {
|
|
|
1646
1646
|
scheduler === void 0 && (scheduler = async);
|
|
1647
1647
|
var intervalDuration = -1;
|
|
1648
1648
|
return intervalOrScheduler != null && (isScheduler(intervalOrScheduler) ? scheduler = intervalOrScheduler : intervalDuration = intervalOrScheduler), new Observable(function(subscriber) {
|
|
1649
|
-
var due = isValidDate(dueTime) ?
|
|
1649
|
+
var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;
|
|
1650
1650
|
due < 0 && (due = 0);
|
|
1651
1651
|
var n = 0;
|
|
1652
1652
|
return scheduler.schedule(function() {
|