@sanity/embeddings-index-ui
4.0.134.0.14
dist/index.js~
dist/index.jsModified+17−14
Index: package/dist/index.js
===================================================================
--- package/dist/index.js
+++ package/dist/index.js
@@ -1,15 +1,18 @@
+import "@sanity/ui/styles.css";
import { EarthGlobeIcon } from "@sanity/icons/EarthGlobe";
import { DefaultPreview, SanityDefaultPreview, definePlugin, getPreviewStateObservable, getPreviewValueWithFallback, isObjectInputProps, set, setIfMissing, typed, unset, useClient, useDocumentPreviewStore, useProjectId, useSchema } from "sanity";
import { c } from "react/compiler-runtime";
import { AddIcon } from "@sanity/icons/Add";
import { UndoIcon } from "@sanity/icons/Undo";
-import { Autocomplete, Box, Button, Card, Dialog, Flex, Heading, Label, Menu, MenuButton, MenuItem, Spinner, Stack, Text, TextArea, TextInput } from "@sanity/ui";
+import { Box, Button, Card, Dialog, Flex, Heading, Label, Spinner, Stack, Text, TextArea, TextInput } from "@sanity/ui";
import { createContext, useContext, useEffect, useId, useRef, useState } from "react";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
import { EllipsisVerticalIcon } from "@sanity/icons/EllipsisVertical";
import { TrashIcon } from "@sanity/icons/Trash";
+import { Menu, MenuButton, MenuItem } from "@sanity/ui/menu";
import { useIntentLink, useRouter } from "sanity/router";
+import { Autocomplete } from "@sanity/ui/autocomplete";
import { ErrorOutlineIcon } from "@sanity/icons/ErrorOutline";
import { useObservable } from "react-rx";
import { LinkIcon } from "@sanity/icons/Link";
import { useDocumentPane } from "sanity/structure";
@@ -184,9 +187,9 @@
style: { resize: "vertical" }
}), $[7] = handleChange, $[8] = id, $[9] = placeholder, $[10] = readOnly, $[11] = type, $[12] = value, $[13] = t4) : t4 = $[13];
let t5;
return $[14] !== t2 || $[15] !== t3 || $[16] !== t4 ? (t5 = /* @__PURE__ */ jsxs(Stack, {
- space: 3,
+ gap: 3,
children: [
t2,
t3,
t4
@@ -210,9 +213,9 @@
onClose,
header: "Create embeddings index",
children: /* @__PURE__ */ jsx(Stack, {
padding: 4,
- space: 5,
+ gap: 5,
children: /* @__PURE__ */ jsx(IndexEditor, {
readOnly: !1,
onSubmit: handleSubmit
})
@@ -315,9 +318,9 @@
tone: "primary"
}), $[29] = loading, $[30] = onSubmit, $[31] = readOnly, $[32] = t10) : t10 = $[32];
let t11;
$[33] !== t10 || $[34] !== t5 || $[35] !== t6 || $[36] !== t7 || $[37] !== t8 || $[38] !== t9 ? (t11 = /* @__PURE__ */ jsxs(Stack, {
- space: 4,
+ gap: 4,
children: [
t5,
t6,
t7,
@@ -637,9 +640,9 @@
let t10;
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = { maxWidth: 600 }, $[15] = t10) : t10 = $[15];
let t11;
$[16] === selectedIndex ? t11 = $[17] : (t11 = /* @__PURE__ */ jsxs(Stack, {
- space: 4,
+ gap: 4,
flex: 1,
style: t10,
children: [/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(IndexEditor, {
index: selectedIndex,
@@ -652,9 +655,9 @@
children: "Query index"
}), $[18] = t12) : t12 = $[18];
let t13;
$[19] === selectedIndex.indexName ? t13 = $[20] : (t13 = /* @__PURE__ */ jsxs(Stack, {
- space: 3,
+ gap: 3,
flex: 1,
children: [t12, /* @__PURE__ */ jsx(QueryIndex, { indexName: selectedIndex.indexName }, selectedIndex.indexName)]
}), $[19] = selectedIndex.indexName, $[20] = t13);
let t14;
@@ -663,9 +666,9 @@
children: [t11, t13]
}), $[21] = t11, $[22] = t13, $[23] = t14) : t14 = $[23];
let t15;
return $[24] !== t14 || $[25] !== t9 ? (t15 = /* @__PURE__ */ jsxs(Stack, {
- space: 4,
+ gap: 4,
flex: 1,
children: [t9, t14]
}), $[24] = t14, $[25] = t9, $[26] = t15) : t15 = $[26], t15;
}
@@ -683,9 +686,9 @@
$[1] === selectedIndex.status ? t2 = $[2] : (t2 = /* @__PURE__ */ jsxs(Flex, {
gap: 2,
align: "center",
children: [t1, /* @__PURE__ */ jsx(Stack, {
- space: 2,
+ gap: 2,
children: /* @__PURE__ */ jsx(Text, { children: selectedIndex.status })
})]
}), $[1] = selectedIndex.status, $[2] = t2);
let t3;
@@ -701,9 +704,9 @@
$[4] !== selectedIndex.startDocumentCount || $[5] !== t4 ? (t5 = /* @__PURE__ */ jsxs(Flex, {
gap: 5,
align: "center",
children: [t3, /* @__PURE__ */ jsx(Stack, {
- space: 2,
+ gap: 2,
children: /* @__PURE__ */ jsxs(Text, { children: [
t4,
" /",
" ",
@@ -724,15 +727,15 @@
$[8] === selectedIndex.failedDocumentCount ? t7 = $[9] : (t7 = /* @__PURE__ */ jsxs(Flex, {
gap: 5,
align: "center",
children: [t6, /* @__PURE__ */ jsx(Stack, {
- space: 2,
+ gap: 2,
children: /* @__PURE__ */ jsx(Text, { children: selectedIndex.failedDocumentCount })
})]
}), $[8] = selectedIndex.failedDocumentCount, $[9] = t7);
let t8;
return $[10] !== t2 || $[11] !== t5 || $[12] !== t7 ? (t8 = /* @__PURE__ */ jsxs(Stack, {
- space: 4,
+ gap: 4,
flex: 1,
children: [
t2,
t5,
@@ -787,11 +790,11 @@
] })
}), $[5] = t5) : t5 = $[5];
let t6;
$[6] !== indexes || $[7] !== onIndexSelected || $[8] !== selectedIndex ? (t6 = /* @__PURE__ */ jsxs(Stack, {
- space: 2,
+ gap: 2,
children: [t5, indexes.length ? /* @__PURE__ */ jsx(Stack, {
- space: 2,
+ gap: 2,
style: {
maxHeight: 200,
overflow: "auto"
},
@@ -1000,9 +1003,9 @@
onSubmit
}), $[39] = createIndexOpen, $[40] = onSubmit, $[41] = t18) : t18 = $[41];
let t19;
return $[42] !== t14 || $[43] !== t15 || $[44] !== t16 || $[45] !== t17 || $[46] !== t18 ? (t19 = /* @__PURE__ */ jsxs(Stack, {
- space: 4,
+ gap: 4,
children: [
t14,
t15,
t16,