@overmap-ai/blocks 0.0.10-alpha.0 → 0.0.10-alpha.2

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/blocks.js CHANGED
@@ -1,9 +1,8 @@
1
- import "@radix-ui/themes/styles.css";
2
1
  export * from "@radix-ui/colors";
3
2
  import { Cross1Icon as xt, CheckIcon as Ke, DragHandleDots2Icon as Se, Cross2Icon as yt, DividerHorizontalIcon as $t } from "@radix-ui/react-icons";
4
3
  export * from "@radix-ui/react-icons";
5
4
  import { useThemeContext as wt, Badge as St, Flex as T, Box as H, Link as kt, Text as he, Button as Pt, IconButton as qe, Card as Tt, Inset as _e, Dialog as re, AlertDialog as Q, DropdownMenu as I, TextField as V, Select as K, Checkbox as Nt, Switch as It, Portal as Dt, Popover as be, TextArea as Ot, Callout as xe, Tooltip as At, Theme as zt, Separator as We } from "@radix-ui/themes";
6
- import { AccessibleIcon as Ci, AspectRatio as _i, Avatar as bi, Blockquote as xi, Box as yi, Callout as $i, Card as wi, Code as Si, Container as ki, ContextMenu as Pi, Em as Ti, Grid as Ni, Heading as Ii, HoverCard as Di, Inset as Oi, Kbd as Ai, Link as zi, Portal as Ri, Quote as Ei, RadioGroup as Bi, ScrollArea as Mi, Section as Li, Slider as Wi, Slot as Hi, Strong as ji, Table as Ui, Tabs as Gi, TextField as Fi, Theme as Vi, VisuallyHidden as Ki, updateThemeAppearanceClass as qi, useThemeContext as Xi } from "@radix-ui/themes";
5
+ import { AccessibleIcon as vi, AspectRatio as Ci, Avatar as _i, Blockquote as bi, Box as xi, Callout as yi, Card as $i, Code as wi, Container as Si, ContextMenu as ki, Em as Pi, Grid as Ti, Heading as Ni, HoverCard as Ii, Inset as Di, Kbd as Oi, Link as Ai, Portal as zi, Quote as Ri, RadioGroup as Ei, ScrollArea as Bi, Section as Mi, Slider as Li, Slot as Wi, Strong as Hi, Table as ji, Tabs as Ui, TextField as Gi, Theme as Fi, VisuallyHidden as Vi, updateThemeAppearanceClass as Ki, useThemeContext as qi } from "@radix-ui/themes";
7
6
  import { jsx as s, jsxs as _, Fragment as G } from "react/jsx-runtime";
8
7
  import z, { useMemo as E, useState as k, useLayoutEffect as ze, useCallback as y, useEffect as O, Children as Y, isValidElement as de, forwardRef as x, memo as b, createContext as ce, useContext as pe, cloneElement as Te, createElement as R, useRef as A, useReducer as Rt, Fragment as Et } from "react";
9
8
  import { useMediaQuery as ae } from "react-responsive";
@@ -76,7 +75,7 @@ const Kt = {
76
75
  const o = wt();
77
76
  if (e)
78
77
  return e === "primary" ? o.accentColor : Kt[e];
79
- }, Lr = () => {
78
+ }, Mr = () => {
80
79
  const [e, o] = k("initial"), [n, t] = k("initial"), i = ae({ minWidth: "520px" }), r = ae({ minWidth: "768px" }), a = ae({ minWidth: "1024px" }), c = ae({ minWidth: "1280px" }), u = ae({ minWidth: "1640px" });
81
80
  return ze(() => {
82
81
  t((l) => (o(l), u ? "xl" : c ? "lg" : a ? "md" : r ? "sm" : i ? "xs" : "initial"));
@@ -124,7 +123,7 @@ const Kt = {
124
123
  children: i
125
124
  }
126
125
  );
127
- }), Wr = b(Xt), Qt = "_zeroMinWidth_curjh_1", Yt = "_zeroMinHeight_curjh_5", Zt = "_radius_curjh_9", Ie = {
126
+ }), Lr = b(Xt), Qt = "_zeroMinWidth_curjh_1", Yt = "_zeroMinHeight_curjh_5", Zt = "_radius_curjh_9", Ie = {
128
127
  zeroMinWidth: Qt,
129
128
  zeroMinHeight: Yt,
130
129
  radius: Zt
@@ -171,7 +170,7 @@ const Kt = {
171
170
  ) });
172
171
  }
173
172
  )
174
- ), Hr = {
173
+ ), Wr = {
175
174
  Group: tn,
176
175
  Item: en
177
176
  }, nn = "_fluid_r73gr_1", on = "_hoverSpin90Clockwise_r73gr_15", rn = "_hoverSpin180Clockwise_r73gr_25", cn = "_hoverSpin360Clockwise_r73gr_35", ue = {
@@ -185,7 +184,7 @@ const Kt = {
185
184
  spin360Clockwise: ue.hoverSpin360Clockwise
186
185
  }, sn = (e) => {
187
186
  (e.key === "Enter" || e.key === " ") && e.currentTarget.click();
188
- }, jr = {
187
+ }, Hr = {
189
188
  role: "button",
190
189
  tabIndex: 0,
191
190
  onKeyDown: sn
@@ -324,7 +323,7 @@ const Kt = {
324
323
  const { variant: n } = Re(), t = /* @__PURE__ */ s(Pe, { ref: o, ...e, radius: "large", variant: n });
325
324
  return n === "ghost" ? /* @__PURE__ */ s(H, { asChild: !0, my: "1", mx: "2", children: t }) : t;
326
325
  })
327
- ), Ur = {
326
+ ), jr = {
328
327
  Root: vn,
329
328
  Item: Cn
330
329
  }, _n = b(function(o) {
@@ -339,7 +338,7 @@ const Kt = {
339
338
  ] }),
340
339
  i(r)
341
340
  ] });
342
- }), Gr = b(
341
+ }), Ur = b(
343
342
  x((e, o) => {
344
343
  const {
345
344
  children: n,
@@ -425,7 +424,7 @@ const Kt = {
425
424
  throw new Error("No AlertDialogProvider found");
426
425
  }), yn = {
427
426
  content: () => null
428
- }, Fr = b(function({ children: o }) {
427
+ }, Gr = b(function({ children: o }) {
429
428
  const [n, t] = k(!1), [i, r] = k(yn), a = y(
430
429
  (c) => {
431
430
  if (n)
@@ -435,7 +434,7 @@ const Kt = {
435
434
  [n]
436
435
  );
437
436
  return /* @__PURE__ */ s(xn, { open: n, setOpen: t, ...i, children: /* @__PURE__ */ s(ot.Provider, { value: a, children: o }) });
438
- }), $n = () => pe(ot), Vr = () => {
437
+ }), $n = () => pe(ot), Fr = () => {
439
438
  const e = $n();
440
439
  return y(
441
440
  (o) => e({
@@ -505,7 +504,7 @@ const Kt = {
505
504
  /* @__PURE__ */ s(I.SubTrigger, { children: i }),
506
505
  /* @__PURE__ */ s(I.SubContent, { ...a, children: r })
507
506
  ] });
508
- }), Kr = {
507
+ }), Vr = {
509
508
  Root: Sn,
510
509
  ItemGroup: kn,
511
510
  Item: wn,
@@ -516,7 +515,7 @@ const Kt = {
516
515
  DropdownSelectInputWrapper: In,
517
516
  DropdownSelectInput: Dn,
518
517
  DropdownSelectItem: On
519
- }, An = 150, qr = b(
518
+ }, An = 150, Kr = b(
520
519
  x(
521
520
  ({
522
521
  trigger: e,
@@ -651,7 +650,7 @@ const Kt = {
651
650
  children: l.map(({ itemContent: w, value: C, ...S }) => /* @__PURE__ */ s(K.Item, { className: "overmap-select-item", value: C, ...S, children: w }, C))
652
651
  }
653
652
  ));
654
- }), Xr = z.memo(En), Ue = b(
653
+ }), qr = z.memo(En), Ue = b(
655
654
  x((e, o) => {
656
655
  const { checked: n, label: t, value: i, size: r = "2" } = e;
657
656
  return /* @__PURE__ */ s(H, { asChild: !0, px: r, children: /* @__PURE__ */ s(K.Item, { value: i, ref: o, children: /* @__PURE__ */ _(T, { gap: r, align: "center", children: [
@@ -659,7 +658,7 @@ const Kt = {
659
658
  t
660
659
  ] }) }) });
661
660
  })
662
- ), $e = "__select_all__", Qr = b(
661
+ ), $e = "__select_all__", Xr = b(
663
662
  x((e, o) => {
664
663
  const [n, t] = k(!1), { placeholder: i, value: r, onValueChange: a, options: c, disabled: u, name: l, ...h } = e, d = X(e.size, se), m = N(e.severity), p = E(() => new Map(c.map((C) => [C.value, C.label])), [c]), f = r.length > 4 ? (
665
664
  // to ensure the width of the select doesn't get too big
@@ -765,7 +764,7 @@ const Kt = {
765
764
  ),
766
765
  /* @__PURE__ */ s(Dt, { container: d, asChild: !0, children: t && "checked" in t ? v ? t.checked : t.unchecked : t })
767
766
  ] });
768
- }), Yr = b(Mn), Ln = "_sidebarContent_1onyo_1", Wn = "_right_1onyo_7", Hn = "_resizeHandle_1onyo_10", jn = "_left_1onyo_13", Un = "_overlay_1onyo_33", te = {
767
+ }), Qr = b(Mn), Ln = "_sidebarContent_1onyo_1", Wn = "_right_1onyo_7", Hn = "_resizeHandle_1onyo_10", jn = "_left_1onyo_13", Un = "_overlay_1onyo_33", te = {
769
768
  sidebarContent: Ln,
770
769
  right: Wn,
771
770
  resizeHandle: Hn,
@@ -820,7 +819,7 @@ const Kt = {
820
819
  }
821
820
  )
822
821
  ] }) });
823
- }), Zr = b(Fn), Vn = "_outerContent_1iy9c_1", Kn = "_enter_1iy9c_4", qn = "_right_1iy9c_4", Xn = "_left_1iy9c_8", Qn = "_enterActive_1iy9c_12", Yn = "_exitActive_1iy9c_22", Zn = "_exitDone_1iy9c_32", Jn = "_resizable_1iy9c_41", eo = "_slideOutOverlay_1iy9c_47", U = {
822
+ }), Yr = b(Fn), Vn = "_outerContent_1iy9c_1", Kn = "_enter_1iy9c_4", qn = "_right_1iy9c_4", Xn = "_left_1iy9c_8", Qn = "_enterActive_1iy9c_12", Yn = "_exitActive_1iy9c_22", Zn = "_exitDone_1iy9c_32", Jn = "_resizable_1iy9c_41", eo = "_slideOutOverlay_1iy9c_47", U = {
824
823
  outerContent: Vn,
825
824
  enter: Kn,
826
825
  right: qn,
@@ -830,7 +829,7 @@ const Kt = {
830
829
  exitDone: Zn,
831
830
  resizable: Jn,
832
831
  slideOutOverlay: eo
833
- }, to = 200, Jr = b(function({
832
+ }, to = 200, Zr = b(function({
834
833
  className: o,
835
834
  open: n,
836
835
  side: t = "left",
@@ -950,7 +949,7 @@ const Kt = {
950
949
  ]
951
950
  }
952
951
  );
953
- }), ei = z.memo(so), ao = "_wrapper_tmtz0_1", lo = {
952
+ }), Jr = z.memo(so), ao = "_wrapper_tmtz0_1", lo = {
954
953
  wrapper: ao
955
954
  }, uo = x(function({ className: o, trigger: n, open: t, onOpenChange: i, defaultOpen: r = !1, modal: a = !1, children: c, ...u }, l) {
956
955
  return /* @__PURE__ */ _(be.Root, { defaultOpen: r, modal: a, open: t, onOpenChange: i, children: [
@@ -973,7 +972,7 @@ const Kt = {
973
972
  resizable: vo,
974
973
  resizeHandle: Co,
975
974
  panelMainContent: _o
976
- }, Ge = 200, F = 150, ti = b(function({
975
+ }, Ge = 200, F = 150, ei = b(function({
977
976
  children: o,
978
977
  showLeft: n,
979
978
  leftPanel: t,
@@ -1257,7 +1256,7 @@ const Po = x(function({ page: o, className: n, direction: t = "vertical", color:
1257
1256
  children: (d) => h(d)
1258
1257
  }
1259
1258
  );
1260
- }), ni = z.memo(Po), To = "_charCount_17uut_1", No = {
1259
+ }), ti = z.memo(Po), To = "_charCount_17uut_1", No = {
1261
1260
  charCount: To
1262
1261
  }, Io = x(function({ className: o, showInputLength: n, inputLengthTemplate: t, value: i, severity: r = "primary", resize: a, ...c }, u) {
1263
1262
  const l = N(r), h = N("info"), d = n || n === void 0 && (c.maxLength !== void 0 || c.minLength !== void 0), m = i !== void 0 ? i.toString() : "", p = E(() => {
@@ -1281,7 +1280,7 @@ const Po = x(function({ page: o, className: n, direction: t = "vertical", color:
1281
1280
  ),
1282
1281
  d && /* @__PURE__ */ s(he, { as: "p", className: No.charCount, color: h, align: "right", children: p })
1283
1282
  ] });
1284
- }), oi = b(Io), Do = x(function({
1283
+ }), ni = b(Io), Do = x(function({
1285
1284
  // ToggleGroup Primitive Props
1286
1285
  loop: o,
1287
1286
  type: n,
@@ -1321,7 +1320,7 @@ const Po = x(function({ page: o, className: n, direction: t = "vertical", color:
1321
1320
  ))) })
1322
1321
  }
1323
1322
  );
1324
- }), ri = b(Do), Oo = {
1323
+ }), oi = b(Do), Oo = {
1325
1324
  default: "_default_xqvoc_1"
1326
1325
  }, Ao = b(
1327
1326
  x(({ className: e, minContentGap: o = "2", children: n, ...t }, i) => /* @__PURE__ */ s(
@@ -1350,7 +1349,7 @@ const Po = x(function({ page: o, className: n, direction: t = "vertical", color:
1350
1349
  children: e
1351
1350
  }
1352
1351
  ))
1353
- ), ii = {
1352
+ ), ri = {
1354
1353
  Root: Ao,
1355
1354
  LeftContent: zo,
1356
1355
  RightContent: Ro
@@ -1380,7 +1379,7 @@ const Po = x(function({ page: o, className: n, direction: t = "vertical", color:
1380
1379
  ] }),
1381
1380
  /* @__PURE__ */ s(le.Close, { asChild: !0, children: /* @__PURE__ */ s(et, { "aria-label": "Close", variant: "ghost", severity: i, children: /* @__PURE__ */ s(yt, {}) }) })
1382
1381
  ] }) }) });
1383
- }), jo = b(Ho), it = ce({}), ci = () => {
1382
+ }), jo = b(Ho), it = ce({}), ii = () => {
1384
1383
  const e = pe(it);
1385
1384
  if (!e)
1386
1385
  throw new Error("useToast must be used within a ToastProvider");
@@ -1392,7 +1391,7 @@ const Po = x(function({ page: o, className: n, direction: t = "vertical", color:
1392
1391
  return (Fe + n / Uo) * o;
1393
1392
  };
1394
1393
  let Fo;
1395
- const si = b(function({
1394
+ const ci = b(function({
1396
1395
  children: o,
1397
1396
  // Use this class to change where the viewport for the toasts should be
1398
1397
  className: n,
@@ -1430,7 +1429,7 @@ const si = b(function({
1430
1429
  ] }) });
1431
1430
  }), Vo = {
1432
1431
  default: "_default_1odpt_1"
1433
- }, ai = b(
1432
+ }, si = b(
1434
1433
  x(({ className: e, children: o, content: n, ...t }, i) => /* @__PURE__ */ s(
1435
1434
  At,
1436
1435
  {
@@ -1443,7 +1442,7 @@ const si = b(function({
1443
1442
  ))
1444
1443
  ), Ko = "_noWrap_1wpa5_1", qo = {
1445
1444
  noWrap: Ko
1446
- }, li = b(
1445
+ }, ai = b(
1447
1446
  x(({ className: e, noWrap: o, severity: n, as: t, ...i }, r) => {
1448
1447
  const a = N(n);
1449
1448
  return /* @__PURE__ */ s(
@@ -1458,7 +1457,7 @@ const si = b(function({
1458
1457
  );
1459
1458
  })
1460
1459
  );
1461
- const ui = b(
1460
+ const li = b(
1462
1461
  x((e, o) => {
1463
1462
  const { panelBackground: n = "solid", radius: t = "full", ...i } = e;
1464
1463
  return /* @__PURE__ */ s(zt, { panelBackground: n, radius: t, ref: o, ...i });
@@ -1488,7 +1487,7 @@ const ui = b(
1488
1487
  ]
1489
1488
  }
1490
1489
  );
1491
- }), di = b(Qo);
1490
+ }), ui = b(Qo);
1492
1491
  function q() {
1493
1492
  return q = Object.assign ? Object.assign.bind() : function(e) {
1494
1493
  for (var o = 1; o < arguments.length; o++) {
@@ -1837,7 +1836,7 @@ const lr = [
1837
1836
  ...e,
1838
1837
  [o]: n
1839
1838
  };
1840
- }, {}), ht = "Checkbox", [ur, hi] = Zo(ht), [dr, hr] = ur(ht), pr = /* @__PURE__ */ x((e, o) => {
1839
+ }, {}), ht = "Checkbox", [ur, di] = Zo(ht), [dr, hr] = ur(ht), pr = /* @__PURE__ */ x((e, o) => {
1841
1840
  const { __scopeCheckbox: n, name: t, checked: i, defaultChecked: r, required: a, disabled: c, value: u = "on", onCheckedChange: l, ...h } = e, [d, m] = k(null), p = st(
1842
1841
  o,
1843
1842
  (S) => m(S)
@@ -1980,7 +1979,7 @@ const vr = pr, Cr = mr, _r = "_checkboxContainer_pb9za_5", br = "_checkbox_pb9za
1980
1979
  ] }) });
1981
1980
  }), ft = b(Sr);
1982
1981
  ft.displayName = "Checkbox";
1983
- const pi = b(function({
1982
+ const hi = b(function({
1984
1983
  className: o,
1985
1984
  labelClassName: n,
1986
1985
  label: t,
@@ -2027,80 +2026,80 @@ const pi = b(function({
2027
2026
  ] });
2028
2027
  });
2029
2028
  export {
2030
- Ci as AccessibleIcon,
2029
+ vi as AccessibleIcon,
2031
2030
  xn as AlertDialog,
2032
2031
  ot as AlertDialogContent,
2033
- Fr as AlertDialogProvider,
2034
- _i as AspectRatio,
2035
- bi as Avatar,
2036
- Wr as Badge,
2037
- xi as Blockquote,
2038
- yi as Box,
2039
- Hr as Breadcrumb,
2032
+ Gr as AlertDialogProvider,
2033
+ Ci as AspectRatio,
2034
+ _i as Avatar,
2035
+ Lr as Badge,
2036
+ bi as Blockquote,
2037
+ xi as Box,
2038
+ Wr as Breadcrumb,
2040
2039
  Pe as Button,
2041
2040
  tt as ButtonGroup,
2042
- Ur as ButtonList,
2043
- $i as Callout,
2044
- wi as Card,
2041
+ jr as ButtonList,
2042
+ yi as Callout,
2043
+ $i as Card,
2045
2044
  ft as Checkbox,
2046
- Si as Code,
2047
- ki as Container,
2048
- Pi as ContextMenu,
2049
- ui as DefaultTheme,
2050
- Gr as Dialog,
2051
- Kr as DropdownMenu,
2052
- qr as DropdownSelect,
2053
- Ti as Em,
2045
+ wi as Code,
2046
+ Si as Container,
2047
+ ki as ContextMenu,
2048
+ li as DefaultTheme,
2049
+ Ur as Dialog,
2050
+ Vr as DropdownMenu,
2051
+ Kr as DropdownSelect,
2052
+ Pi as Em,
2054
2053
  W as Flex,
2055
- Ni as Grid,
2056
- Ii as Heading,
2057
- Di as HoverCard,
2054
+ Ti as Grid,
2055
+ Ni as Heading,
2056
+ Ii as HoverCard,
2058
2057
  zn as HoverUtility,
2059
2058
  et as IconButton,
2060
- ei as Input,
2061
- Oi as Inset,
2062
- Ai as Kbd,
2063
- ti as LeftAndRightPanels,
2064
- zi as Link,
2065
- ni as MultiPagePopover,
2066
- Qr as MultiSelect,
2059
+ Jr as Input,
2060
+ Di as Inset,
2061
+ Oi as Kbd,
2062
+ ei as LeftAndRightPanels,
2063
+ Ai as Link,
2064
+ ti as MultiPagePopover,
2065
+ Xr as MultiSelect,
2067
2066
  ho as Popover,
2068
- Ri as Portal,
2069
- Ei as Quote,
2070
- Bi as RadioGroup,
2067
+ zi as Portal,
2068
+ Ri as Quote,
2069
+ Ei as RadioGroup,
2071
2070
  Ao as Root,
2072
- Mi as ScrollArea,
2073
- Li as Section,
2074
- Xr as Select,
2075
- pi as SelectAllCheckbox,
2076
- di as Separator,
2077
- Zr as Sidebar,
2078
- Jr as SlideOut,
2079
- Wi as Slider,
2080
- Hi as Slot,
2081
- ji as Strong,
2082
- Yr as Switch,
2083
- Ui as Table,
2084
- Gi as Tabs,
2085
- li as Text,
2086
- oi as TextArea,
2087
- Fi as TextField,
2088
- Vi as Theme,
2071
+ Bi as ScrollArea,
2072
+ Mi as Section,
2073
+ qr as Select,
2074
+ hi as SelectAllCheckbox,
2075
+ ui as Separator,
2076
+ Yr as Sidebar,
2077
+ Zr as SlideOut,
2078
+ Li as Slider,
2079
+ Wi as Slot,
2080
+ Hi as Strong,
2081
+ Qr as Switch,
2082
+ ji as Table,
2083
+ Ui as Tabs,
2084
+ ai as Text,
2085
+ ni as TextArea,
2086
+ Gi as TextField,
2087
+ Fi as Theme,
2089
2088
  jo as Toast,
2090
2089
  it as ToastContext,
2091
- si as ToastProvider,
2092
- ri as ToggleGroup,
2093
- ii as Toolbar,
2094
- ai as Tooltip,
2095
- Ki as VisuallyHidden,
2096
- jr as divButtonProps,
2090
+ ci as ToastProvider,
2091
+ oi as ToggleGroup,
2092
+ ri as Toolbar,
2093
+ si as Tooltip,
2094
+ Vi as VisuallyHidden,
2095
+ Hr as divButtonProps,
2097
2096
  Fo as unsafeShowToast,
2098
- qi as updateThemeAppearanceClass,
2097
+ Ki as updateThemeAppearanceClass,
2099
2098
  $n as useAlertDialog,
2100
- Vr as useDiscardAlertDialog,
2099
+ Fr as useDiscardAlertDialog,
2101
2100
  N as useSeverityColor,
2102
- Xi as useThemeContext,
2103
- ci as useToast,
2104
- Lr as useViewportSize
2101
+ qi as useThemeContext,
2102
+ ii as useToast,
2103
+ Mr as useViewportSize
2105
2104
  };
2106
2105
  //# sourceMappingURL=blocks.js.map