@surrealdb/ui 1.0.91 → 1.0.92

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/ui.d.ts CHANGED
@@ -2090,6 +2090,13 @@ declare interface ZeroOrMoreNode {
2090
2090
 
2091
2091
  export { }
2092
2092
 
2093
+ declare module "@mantine/core" {
2094
+ type ExtendedCustomColors = "obsidian" | "slate" | import("@mantine/core").DefaultMantineColor;
2095
+ interface MantineThemeColorsOverride {
2096
+ colors: Record<ExtendedCustomColors, import("@mantine/core").MantineColorsTuple>;
2097
+ }
2098
+ }
2099
+
2093
2100
  declare module "@mantine/core" {
2094
2101
  type SurrealVariant = "surreal";
2095
2102
  type SurrealInputVariant = SurrealVariant | "gradient";
@@ -2209,13 +2216,6 @@ declare module "@mantine/core" {
2209
2216
  }
2210
2217
  }
2211
2218
 
2212
- declare module "@mantine/core" {
2213
- type ExtendedCustomColors = "obsidian" | "slate" | import("@mantine/core").DefaultMantineColor;
2214
- interface MantineThemeColorsOverride {
2215
- colors: Record<ExtendedCustomColors, import("@mantine/core").MantineColorsTuple>;
2216
- }
2217
- }
2218
-
2219
2219
  declare module "@mantine/core" {
2220
2220
  type ExtendedCustomSizes = import("@mantine/core").DefaultMantineSize | "2xl" | "3xl";
2221
2221
  interface MantineThemeSizesOverride {
package/dist/ui.js CHANGED
@@ -4,9 +4,9 @@ import { getIndentUnit as sa, indentOnInput as l5, bracketMatching as $5, indent
4
4
  import { highlightSelectionMatches as g5, searchKeymap as T5 } from "@codemirror/search";
5
5
  import { Facet as m5, combineConfig as C5, RangeSetBuilder as x5, EditorSelection as la, EditorState as _e, Compartment as $a } from "@codemirror/state";
6
6
  import { ViewPlugin as V5, EditorView as ne, Decoration as w5, highlightSpecialChars as Z5, drawSelection as y5, dropCursor as b5, rectangularSelection as _5, crosshairCursor as R5, keymap as M0, highlightActiveLineGutter as v5, lineNumbers as k5 } from "@codemirror/view";
7
- import { useMantineColorScheme as z5, useComputedColorScheme as F0, Box as nO, useMantineTheme as N0, getThemeColor as B0, getSize as K0, Paper as Oe, Text as F1, CopyButton as q5, Tooltip as I1, ActionIcon as g1, Alert as gr, Group as m1, Title as H0, Stack as Ne, Button as KO, Image as Mt, Divider as Ft, Table as K, Blockquote as Tr, Checkbox as mr, List as ca, Anchor as Cr, Skeleton as xr, TextInput as yO, Flex as Y5, Select as a1, Switch as T1, Textarea as Li, Menu as uO, Popover as Qi, ThemeIcon as W5, Modal as J0, Badge as Vr, Tabs as ye, TabsList as L5, TabsTab as U5, Code as G5, createTheme as j5, Indicator as A5, Notification as E5, Pagination as D5, Kbd as I5, NavLink as M5, SegmentedControl as F5, PinInput as N5, PasswordInput as B5, TagsInput as K5, Radio as H5, MultiSelect as J5, Overlay as O2, CloseButton as e2, Loader as t2, HoverCard as i2, MenuDropdown as r2, PopoverDropdown as a2, ScrollArea as n2, Autocomplete as s2, NumberInput as o2, InputBase as Q2, rem as eO, defaultVariantColorsResolver as ua } from "@mantine/core";
7
+ import { useMantineColorScheme as z5, useComputedColorScheme as F0, Box as nO, useMantineTheme as N0, getThemeColor as B0, getSize as K0, Paper as Oe, Text as F1, CopyButton as q5, Tooltip as I1, ActionIcon as g1, Alert as gr, Group as m1, Title as H0, Stack as Ne, Button as KO, Image as Mt, Divider as Ft, Table as K, Blockquote as Tr, Checkbox as mr, List as ca, Anchor as Cr, Skeleton as xr, TextInput as yO, Flex as Y5, Select as a1, Switch as T1, Textarea as Li, Menu as uO, Popover as Qi, ThemeIcon as W5, Modal as J0, Badge as Vr, Tabs as ye, TabsList as L5, TabsTab as U5, Code as G5, createTheme as j5, Indicator as A5, Notification as E5, Pagination as D5, Kbd as I5, NavLink as M5, SegmentedControl as F5, PinInput as N5, PasswordInput as B5, TagsInput as K5, Radio as H5, MultiSelect as J5, Overlay as O2, CloseButton as e2, Loader as t2, HoverCard as i2, MenuDropdown as r2, PopoverDropdown as a2, ScrollArea as n2, Autocomplete as s2, NumberInput as o2, InputBase as Q2, rem as OO, defaultVariantColorsResolver as ua } from "@mantine/core";
8
8
  import "@codemirror/lint";
9
- import { useRef as mO, useCallback as M, useState as j, useMemo as OO, useEffect as H, memo as Nt, createRef as l2, createElement as On, createContext as en, useContext as tn } from "react";
9
+ import { useRef as mO, useCallback as M, useState as j, useMemo as eO, useEffect as H, memo as Nt, createRef as l2, createElement as On, createContext as en, useContext as tn } from "react";
10
10
  import { jsx as p, jsxs as v, Fragment as $e } from "react/jsx-runtime";
11
11
  import rn, { YooptaPlugin as ee, useYooptaEditor as fO, useYooptaReadOnly as he, Elements as HO, Blocks as UO, createYooptaMark as $2, Marks as O1, createYooptaEditor as c2 } from "@yoopta/editor";
12
12
  import li from "@yoopta/headings";
@@ -7379,7 +7379,7 @@ function um(O = {}) {
7379
7379
  const x = g.state.toJSON(e);
7380
7380
  d?.(x), Z.current = x;
7381
7381
  }
7382
- }), b = OO(
7382
+ }), b = eO(
7383
7383
  () => ({
7384
7384
  extensions: [
7385
7385
  ne.updateListener.of(T),
@@ -7430,7 +7430,7 @@ function um(O = {}) {
7430
7430
  g && (s && [a].push(...Rd(s)), g.dispatch({
7431
7431
  effects: [X.current.reconfigure(a ?? [])]
7432
7432
  }));
7433
- }, [a, s]), OO(
7433
+ }, [a, s]), eO(
7434
7434
  () => ({
7435
7435
  ref: C,
7436
7436
  mounted: P,
@@ -7564,7 +7564,7 @@ const En = Nt(
7564
7564
  withLineNumbers: r = !1,
7565
7565
  ...n
7566
7566
  }) => {
7567
- const a = F0(), s = OO(() => f0(e)?.parse(O) ?? null, [e, O]), o = OO(() => {
7567
+ const a = F0(), s = eO(() => f0(e)?.parse(O) ?? null, [e, O]), o = eO(() => {
7568
7568
  const Q = [], $ = f0(e), c = a, d = /* @__PURE__ */ new Set();
7569
7569
  for (const Z of i)
7570
7570
  for (let m = Z.start; m <= Z.end; m++)
@@ -7730,7 +7730,7 @@ const En = Nt(
7730
7730
  copyCodeProps: s,
7731
7731
  ...o
7732
7732
  }) => {
7733
- const [Q, $] = j(!1), { code: c, regions: d } = OO(() => {
7733
+ const [Q, $] = j(!1), { code: c, regions: d } = eO(() => {
7734
7734
  const h = jd(e), { processedCode: P, regions: S } = Ad(
7735
7735
  h.code
7736
7736
  );
@@ -7931,7 +7931,7 @@ function Jd({ size: O, color: e, className: t, title: i, ...r }) {
7931
7931
  );
7932
7932
  }
7933
7933
  function Oh({ config: O, frameRef: e, ...t }) {
7934
- const i = OO(() => {
7934
+ const i = eO(() => {
7935
7935
  const { url: r, ...n } = O ?? {}, a = new URL(r ?? "https://app.surrealdb.com/mini"), s = new URLSearchParams(a.search), o = {
7936
7936
  appearance: "compact",
7937
7937
  theme: "auto",
@@ -8043,7 +8043,7 @@ function ah({
8043
8043
  lang: r,
8044
8044
  withBorder: e,
8045
8045
  ...n
8046
- }, $ = n, c = OO(() => ({
8046
+ }, $ = n, c = eO(() => ({
8047
8047
  ...nh(O),
8048
8048
  query: t,
8049
8049
  appearance: "plain",
@@ -8494,10 +8494,10 @@ function fh({
8494
8494
  scope: r,
8495
8495
  ...n
8496
8496
  }) {
8497
- const a = OO(
8497
+ const a = eO(
8498
8498
  () => ph(t, i, r),
8499
8499
  [t, i, r]
8500
- ), s = OO(() => e ? { ...a, ...e } : a, [e, a]), o = M(
8500
+ ), s = eO(() => e ? { ...a, ...e } : a, [e, a]), o = M(
8501
8501
  ($, c, d, h) => {
8502
8502
  const P = `${$.type}-${c}`, S = () => s[$.type];
8503
8503
  if ($.type === "text")
@@ -8540,7 +8540,7 @@ function fh({
8540
8540
  );
8541
8541
  },
8542
8542
  [s]
8543
- ), Q = OO(() => O.children.map(($, c) => o($, c, O, void 0)), [O, o]);
8543
+ ), Q = eO(() => O.children.map(($, c) => o($, c, O, void 0)), [O, o]);
8544
8544
  return /* @__PURE__ */ p(
8545
8545
  Ne,
8546
8546
  {
@@ -13354,7 +13354,7 @@ const pr = {
13354
13354
  m.stopPropagation(), m.key === "Enter" && P(), m.key === "Escape" && S();
13355
13355
  },
13356
13356
  [P, S]
13357
- ), f = OO(() => a.code ? Fi(a.code) : "", [a.code]);
13357
+ ), f = eO(() => a.code ? Fi(a.code) : "", [a.code]);
13358
13358
  return /* @__PURE__ */ v(
13359
13359
  "div",
13360
13360
  {
@@ -13589,7 +13589,7 @@ const pr = {
13589
13589
  X.currentTarget.hasPointerCapture(X.pointerId) && X.currentTarget.releasePointerCapture(X.pointerId), s(!1);
13590
13590
  }), C = tO(() => {
13591
13591
  a || Q(null);
13592
- }), f = OO(() => !t || t <= 0 ? 0 : Math.min(100, Math.max(0, r / t * 100)), [r, t]), Z = OO(() => o === null || !t || t <= 0 ? null : Math.min(100, Math.max(0, o / t * 100)), [t, o]), m = tO((X) => {
13592
+ }), f = eO(() => !t || t <= 0 ? 0 : Math.min(100, Math.max(0, r / t * 100)), [r, t]), Z = eO(() => o === null || !t || t <= 0 ? null : Math.min(100, Math.max(0, o / t * 100)), [t, o]), m = tO((X) => {
13593
13593
  const T = Math.max(0, Math.floor(X)), b = Math.floor(T / 60), w = T % 60;
13594
13594
  return `${b}:${w.toString().padStart(2, "0")}`;
13595
13595
  });
@@ -13938,7 +13938,7 @@ const pr = {
13938
13938
  f.stopPropagation(), f.key === "Enter" && h();
13939
13939
  },
13940
13940
  [h]
13941
- ), S = OO(
13941
+ ), S = eO(
13942
13942
  () => Ni(a.code, a.format) ?? "",
13943
13943
  [a.code, a.format]
13944
13944
  );
@@ -14631,7 +14631,7 @@ const DP = Ui.TodoList.extend({
14631
14631
  blockId: t,
14632
14632
  children: i
14633
14633
  }) => {
14634
- const r = fO(), n = he(), a = e.props ?? It, s = a.rows, o = OO(() => Math.max(...s.map((X) => X.length), 1), [s]), [Q, $] = j(s);
14634
+ const r = fO(), n = he(), a = e.props ?? It, s = a.rows, o = eO(() => Math.max(...s.map((X) => X.length), 1), [s]), [Q, $] = j(s);
14635
14635
  H(() => {
14636
14636
  $(s);
14637
14637
  }, [s]);
@@ -14969,7 +14969,7 @@ const L0 = {
14969
14969
  blockId: t,
14970
14970
  children: i
14971
14971
  }) => {
14972
- const r = fO(), n = he(), a = e.props ?? dr, s = mO(null), [o, Q] = j(a.code), [$, c] = j(a.title), d = OO(KP, []);
14972
+ const r = fO(), n = he(), a = e.props ?? dr, s = mO(null), [o, Q] = j(a.code), [$, c] = j(a.title), d = eO(KP, []);
14973
14973
  H(() => {
14974
14974
  Q(a.code);
14975
14975
  }, [a.code]), H(() => {
@@ -15325,7 +15325,7 @@ const iS = ({
15325
15325
  f.stopPropagation(), f.key === "Enter" && d(), f.key === "Escape" && h();
15326
15326
  },
15327
15327
  [d, h]
15328
- ), S = OO(() => Pr(a.url), [a.url]);
15328
+ ), S = eO(() => Pr(a.url), [a.url]);
15329
15329
  return /* @__PURE__ */ v(
15330
15330
  "div",
15331
15331
  {
@@ -15786,7 +15786,7 @@ const cS = ({
15786
15786
  )
15787
15787
  ] }) }) });
15788
15788
  }, pS = ({ blockId: O }) => {
15789
- const e = fO(), t = O ? UO.getBlock(e, { id: O }) : null, i = t ? cP(t.type) : void 0, r = t ? !Sr.has(t.type) : !1, n = OO(
15789
+ const e = fO(), t = O ? UO.getBlock(e, { id: O }) : null, i = t ? cP(t.type) : void 0, r = t ? !Sr.has(t.type) : !1, n = eO(
15790
15790
  () => Object.values(e.plugins).filter((a) => {
15791
15791
  if (Sr.has(a.type)) return !1;
15792
15792
  const s = a.options;
@@ -16019,7 +16019,7 @@ const cS = ({
16019
16019
  blockOptions: i = PS,
16020
16020
  className: r
16021
16021
  }) => {
16022
- const n = OO(() => {
16022
+ const n = eO(() => {
16023
16023
  const a = c2({ plugins: t, marks: e, value: O });
16024
16024
  return a.readOnly = !0, a;
16025
16025
  }, [O, e, t]);
@@ -16193,7 +16193,7 @@ function xm({
16193
16193
  }), P = tO(() => {
16194
16194
  i(!1), r?.onConfirm?.(o);
16195
16195
  }), S = r?.verification ? wS(a, r.verification) : !0;
16196
- return /* @__PURE__ */ v(Ks.Provider, { value: OO(() => ({ setConfirmation: d }), []), children: [
16196
+ return /* @__PURE__ */ v(Ks.Provider, { value: eO(() => ({ setConfirmation: d }), []), children: [
16197
16197
  e,
16198
16198
  /* @__PURE__ */ v(
16199
16199
  J0,
@@ -16314,7 +16314,7 @@ function Zm({
16314
16314
  components: i,
16315
16315
  scope: r
16316
16316
  }) {
16317
- const n = OO(() => lP(O), [O]);
16317
+ const n = eO(() => lP(O), [O]);
16318
16318
  return /* @__PURE__ */ p(
16319
16319
  fh,
16320
16320
  {
@@ -16769,7 +16769,7 @@ function Rm({ items: O, syncKey: e, ...t }) {
16769
16769
  };
16770
16770
  return window.addEventListener("storage", Q), () => window.removeEventListener("storage", Q);
16771
16771
  }, [e, O]);
16772
- const s = OO(
16772
+ const s = eO(
16773
16773
  () => O.map((Q) => /* @__PURE__ */ p(
16774
16774
  ye.Tab,
16775
16775
  {
@@ -16780,7 +16780,7 @@ function Rm({ items: O, syncKey: e, ...t }) {
16780
16780
  Q.label
16781
16781
  )),
16782
16782
  [O]
16783
- ), o = OO(
16783
+ ), o = eO(
16784
16784
  () => O.map((Q) => /* @__PURE__ */ p(
16785
16785
  ye.Panel,
16786
16786
  {
@@ -16825,36 +16825,37 @@ const km = j5({
16825
16825
  primaryShade: 6,
16826
16826
  defaultRadius: "xs",
16827
16827
  fontSizes: {
16828
- xs: eO(12),
16829
- sm: eO(13),
16830
- md: eO(14),
16831
- lg: eO(16),
16832
- xl: eO(18)
16828
+ xs: OO(12),
16829
+ sm: OO(13),
16830
+ md: OO(14),
16831
+ lg: OO(16),
16832
+ xl: OO(18)
16833
16833
  },
16834
16834
  headings: {
16835
16835
  sizes: {
16836
- h1: { fontSize: eO(64), fontWeight: "700" },
16837
- h2: { fontSize: eO(32), fontWeight: "600" },
16838
- h3: { fontSize: eO(18), fontWeight: "500" },
16839
- h4: { fontSize: eO(14), fontWeight: "600" },
16840
- h5: { fontSize: eO(13), fontWeight: "700" }
16836
+ h1: { fontSize: OO(32), fontWeight: "700" },
16837
+ h2: { fontSize: OO(26), fontWeight: "600" },
16838
+ h3: { fontSize: OO(22), fontWeight: "500" },
16839
+ h4: { fontSize: OO(18), fontWeight: "500" },
16840
+ h5: { fontSize: OO(16), fontWeight: "500" },
16841
+ h6: { fontSize: OO(14), fontWeight: "800" }
16841
16842
  }
16842
16843
  },
16843
16844
  spacing: {
16844
- xs: eO(4),
16845
- sm: eO(8),
16846
- md: eO(12),
16847
- lg: eO(16),
16848
- xl: eO(24),
16849
- "2xl": eO(32),
16850
- "3xl": eO(52)
16845
+ xs: OO(4),
16846
+ sm: OO(8),
16847
+ md: OO(12),
16848
+ lg: OO(16),
16849
+ xl: OO(24),
16850
+ "2xl": OO(32),
16851
+ "3xl": OO(52)
16851
16852
  },
16852
16853
  radius: {
16853
- xs: eO(4),
16854
- sm: eO(8),
16855
- md: eO(12),
16856
- lg: eO(20),
16857
- xl: eO(30)
16854
+ xs: OO(4),
16855
+ sm: OO(8),
16856
+ md: OO(12),
16857
+ lg: OO(20),
16858
+ xl: OO(30)
16858
16859
  },
16859
16860
  colors: {
16860
16861
  obsidian: [