@ai-matrx/design-system 0.86.357 → 0.86.359

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.
Files changed (91) hide show
  1. package/CHANGELOG.md +30 -2
  2. package/dist/carousel.js +6 -6
  3. package/dist/{chunk-T4D7WAV7.js → chunk-42GFQMLA.js} +2 -2
  4. package/dist/{chunk-POJ3RR3K.js → chunk-B5D3VIMC.js} +1 -1
  5. package/dist/{chunk-POJ3RR3K.js.map → chunk-B5D3VIMC.js.map} +1 -1
  6. package/dist/{chunk-FRJ4PPA2.js → chunk-CZGZV35G.js} +2 -2
  7. package/dist/{chunk-ACZALXD6.js → chunk-K3XWUACX.js} +3 -3
  8. package/dist/{chunk-TV2IDHPZ.js → chunk-K5ZQROWN.js} +4 -4
  9. package/dist/{chunk-U46XUQI7.js → chunk-KSCSH7AO.js} +16 -14
  10. package/dist/chunk-KSCSH7AO.js.map +1 -0
  11. package/dist/{chunk-MTE6N7XU.js → chunk-NFJ63LIH.js} +2 -2
  12. package/dist/{chunk-XZGYKKCE.js → chunk-OUQT72UL.js} +3 -3
  13. package/dist/{chunk-WUD23YTG.js → chunk-P56Y43RL.js} +6 -6
  14. package/dist/{chunk-GMNROZQJ.js → chunk-QTPW44IJ.js} +2 -2
  15. package/dist/{chunk-QA7EHFRX.js → chunk-T3FKFPCW.js} +5 -5
  16. package/dist/{chunk-X6ZRHJQP.js → chunk-T57DLONB.js} +20 -11
  17. package/dist/chunk-T57DLONB.js.map +1 -0
  18. package/dist/{chunk-SOCNWQMX.js → chunk-TEMAM5ET.js} +3 -3
  19. package/dist/{chunk-CH2NWSES.js → chunk-TIV6M7Q7.js} +3 -3
  20. package/dist/{chunk-6XNYYROM.js → chunk-WVEDW5VO.js} +2 -2
  21. package/dist/clipboard-fallback-dialog.js +2 -2
  22. package/dist/controls.cjs +19 -10
  23. package/dist/controls.cjs.map +1 -1
  24. package/dist/controls.js +6 -6
  25. package/dist/data-table/data-row-inspector.cjs +99 -11
  26. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  27. package/dist/data-table/data-row-inspector.js +8 -7
  28. package/dist/data-table/data-row-window.cjs +99 -11
  29. package/dist/data-table/data-row-window.cjs.map +1 -1
  30. package/dist/data-table/data-row-window.js +9 -8
  31. package/dist/data-table/drill-chart.js +1 -1
  32. package/dist/data-table/host.cjs.map +1 -1
  33. package/dist/data-table/host.d.cts +6 -2
  34. package/dist/data-table/host.d.ts +6 -2
  35. package/dist/data-table/host.js +1 -1
  36. package/dist/data-table/index.cjs +39 -37
  37. package/dist/data-table/index.cjs.map +1 -1
  38. package/dist/data-table/index.d.cts +6 -2
  39. package/dist/data-table/index.d.ts +6 -2
  40. package/dist/data-table/index.js +19 -23
  41. package/dist/data-table/index.js.map +1 -1
  42. package/dist/data-table/pagination.cjs +19 -10
  43. package/dist/data-table/pagination.cjs.map +1 -1
  44. package/dist/data-table/pagination.js +4 -4
  45. package/dist/data-table/uuid-cell.cjs +99 -11
  46. package/dist/data-table/uuid-cell.cjs.map +1 -1
  47. package/dist/data-table/uuid-cell.js +5 -4
  48. package/dist/desktop.cjs +20 -11
  49. package/dist/desktop.cjs.map +1 -1
  50. package/dist/desktop.d.cts +1 -1
  51. package/dist/desktop.d.ts +1 -1
  52. package/dist/desktop.js +13 -13
  53. package/dist/desktop.js.map +1 -1
  54. package/dist/email-input-dialog.js +1 -1
  55. package/dist/index.cjs +31 -22
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.d.cts +9 -9
  58. package/dist/index.d.ts +9 -9
  59. package/dist/index.js +20 -20
  60. package/dist/item.cjs +19 -10
  61. package/dist/item.cjs.map +1 -1
  62. package/dist/item.js +5 -5
  63. package/dist/lite-table.js +3 -3
  64. package/dist/menu-look.cjs +19 -10
  65. package/dist/menu-look.cjs.map +1 -1
  66. package/dist/menu-look.js +2 -2
  67. package/dist/record-list.cjs +19 -10
  68. package/dist/record-list.cjs.map +1 -1
  69. package/dist/record-list.js +6 -6
  70. package/dist/settings.js +3 -3
  71. package/dist/swipe-deck.cjs +11 -2
  72. package/dist/swipe-deck.cjs.map +1 -1
  73. package/dist/swipe-deck.js +12 -3
  74. package/dist/swipe-deck.js.map +1 -1
  75. package/dist/text-input-dialog.js +1 -1
  76. package/dist/writing-field.js +3 -3
  77. package/package.json +2 -2
  78. package/dist/chunk-U46XUQI7.js.map +0 -1
  79. package/dist/chunk-X6ZRHJQP.js.map +0 -1
  80. /package/dist/{chunk-T4D7WAV7.js.map → chunk-42GFQMLA.js.map} +0 -0
  81. /package/dist/{chunk-FRJ4PPA2.js.map → chunk-CZGZV35G.js.map} +0 -0
  82. /package/dist/{chunk-ACZALXD6.js.map → chunk-K3XWUACX.js.map} +0 -0
  83. /package/dist/{chunk-TV2IDHPZ.js.map → chunk-K5ZQROWN.js.map} +0 -0
  84. /package/dist/{chunk-MTE6N7XU.js.map → chunk-NFJ63LIH.js.map} +0 -0
  85. /package/dist/{chunk-XZGYKKCE.js.map → chunk-OUQT72UL.js.map} +0 -0
  86. /package/dist/{chunk-WUD23YTG.js.map → chunk-P56Y43RL.js.map} +0 -0
  87. /package/dist/{chunk-GMNROZQJ.js.map → chunk-QTPW44IJ.js.map} +0 -0
  88. /package/dist/{chunk-QA7EHFRX.js.map → chunk-T3FKFPCW.js.map} +0 -0
  89. /package/dist/{chunk-SOCNWQMX.js.map → chunk-TEMAM5ET.js.map} +0 -0
  90. /package/dist/{chunk-CH2NWSES.js.map → chunk-TIV6M7Q7.js.map} +0 -0
  91. /package/dist/{chunk-6XNYYROM.js.map → chunk-WVEDW5VO.js.map} +0 -0
@@ -8,7 +8,6 @@ import {
8
8
  import {
9
9
  ErrorActions
10
10
  } from "./chunk-5Z5GTXKL.js";
11
- import "./chunk-HS6GMHKZ.js";
12
11
  import {
13
12
  Dialog,
14
13
  DialogContent,
@@ -22,6 +21,7 @@ import "./chunk-U24MOJWK.js";
22
21
  import "./chunk-NDTDBBMM.js";
23
22
  import "./chunk-BKCJUFD3.js";
24
23
  import "./chunk-MOZRIHJF.js";
24
+ import "./chunk-HS6GMHKZ.js";
25
25
  import "./chunk-WFITMVDB.js";
26
26
  import "./chunk-WAT2XW7L.js";
27
27
  import {
package/dist/index.cjs CHANGED
@@ -2744,18 +2744,20 @@ var init_dialog = __esm({
2744
2744
  });
2745
2745
 
2746
2746
  // src/dropdown-menu.tsx
2747
- function readTopClearance() {
2748
- return readClearance("var(--matrx-floating-top-clearance, var(--shell-header-h, 0px))");
2749
- }
2750
- function readBottomClearance() {
2751
- return readClearance("var(--matrx-floating-clearance, 0px)");
2752
- }
2753
2747
  function menuCollisionPadding(caller, top, bottom, fallback = 0) {
2754
2748
  const side = (key) => typeof caller === "number" ? caller : caller?.[key] ?? fallback;
2755
2749
  return { top: Math.max(side("top"), top), right: side("right"), bottom: Math.max(side("bottom"), bottom), left: side("left") };
2756
2750
  }
2757
- function readClearance(height) {
2751
+ function readClearance(height, shared = false) {
2758
2752
  if (typeof document === "undefined") return 0;
2753
+ const now = clock();
2754
+ const held = shared ? clearanceCache.get(height) : void 0;
2755
+ if (held && now - held.at < CLEARANCE_REUSE_MS) return held.px;
2756
+ const px3 = measureClearance(height);
2757
+ clearanceCache.set(height, { px: px3, at: now });
2758
+ return px3;
2759
+ }
2760
+ function measureClearance(height) {
2759
2761
  const probe2 = document.createElement("div");
2760
2762
  probe2.style.cssText = `position:fixed;top:0;left:0;width:0;visibility:hidden;pointer-events:none;height:${height}`;
2761
2763
  document.body.appendChild(probe2);
@@ -2763,7 +2765,7 @@ function readClearance(height) {
2763
2765
  probe2.remove();
2764
2766
  return Number.isFinite(px3) ? Math.ceil(px3) : 0;
2765
2767
  }
2766
- var DropdownMenuPrimitive, React27, import_jsx_runtime36, DropdownMenu, DropdownMenuTrigger, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuRadioGroup, MENU_SURFACE_CLASS, MENU_ITEM_CLASS, MENU_INDICATOR_ITEM_CLASS, DropdownMenuSubTrigger, DropdownMenuSubContent, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut;
2768
+ var DropdownMenuPrimitive, React27, import_jsx_runtime36, DropdownMenu, DropdownMenuTrigger, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuRadioGroup, MENU_SURFACE_CLASS, MENU_ITEM_CLASS, MENU_INDICATOR_ITEM_CLASS, DropdownMenuSubTrigger, DropdownMenuSubContent, CLEARANCE_REUSE_MS, clearanceCache, clock, TOP_CLEARANCE, BOTTOM_CLEARANCE, sharedTopClearance, sharedBottomClearance, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut;
2767
2769
  var init_dropdown_menu = __esm({
2768
2770
  "src/dropdown-menu.tsx"() {
2769
2771
  "use strict";
@@ -2809,7 +2811,7 @@ var init_dropdown_menu = __esm({
2809
2811
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
2810
2812
  DropdownMenuSubContent = React27.forwardRef(({ className, container, surface = "default", sideOffset = 2, alignOffset = -4, collisionPadding, onFocusOutside, children, ...props }, ref) => {
2811
2813
  const portalContainer = usePortalContainer(container);
2812
- const [bottomClearance] = React27.useState(readBottomClearance);
2814
+ const [bottomClearance] = React27.useState(sharedBottomClearance);
2813
2815
  const padding = menuCollisionPadding(collisionPadding ?? 8, 0, bottomClearance);
2814
2816
  const nested = useNestedSubmenuPlacement(ref, padding);
2815
2817
  const keep = useSubmenuSurvivesParentPanelFocus(nested.ref, onFocusOutside);
@@ -2831,10 +2833,17 @@ var init_dropdown_menu = __esm({
2831
2833
  ) });
2832
2834
  });
2833
2835
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
2836
+ CLEARANCE_REUSE_MS = 500;
2837
+ clearanceCache = /* @__PURE__ */ new Map();
2838
+ clock = () => typeof performance !== "undefined" ? performance.now() : Date.now();
2839
+ TOP_CLEARANCE = "var(--matrx-floating-top-clearance, var(--shell-header-h, 0px))";
2840
+ BOTTOM_CLEARANCE = "var(--matrx-floating-clearance, 0px)";
2841
+ sharedTopClearance = () => readClearance(TOP_CLEARANCE, true);
2842
+ sharedBottomClearance = () => readClearance(BOTTOM_CLEARANCE, true);
2834
2843
  DropdownMenuContent = React27.forwardRef(({ className, sideOffset = 4, container, surface = "default", children, onCloseAutoFocus, collisionPadding, ...props }, ref) => {
2835
2844
  const portalContainer = usePortalContainer(container);
2836
- const [topClearance] = React27.useState(readTopClearance);
2837
- const [bottomClearance] = React27.useState(readBottomClearance);
2845
+ const [topClearance] = React27.useState(sharedTopClearance);
2846
+ const [bottomClearance] = React27.useState(sharedBottomClearance);
2838
2847
  const edges = useMenuScrollEdges(ref);
2839
2848
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2840
2849
  DropdownMenuPrimitive.Content,
@@ -10315,13 +10324,14 @@ function useTableNotice() {
10315
10324
  const [message, setMessage] = (0, import_react10.useState)(null);
10316
10325
  const notify = (0, import_react10.useMemo)(
10317
10326
  () => ({
10318
- success(text) {
10319
- if (host.notify) host.notify.success(text);
10320
- else setMessage({ text, error: false });
10327
+ // A card is a short title and an optional line (NOTICE_TEXT_BUDGET); the inline fallback joins them.
10328
+ success(text, options) {
10329
+ if (host.notify) host.notify.success(text, options);
10330
+ else setMessage({ text: options?.description ? `${text}. ${options.description}` : text, error: false });
10321
10331
  },
10322
- error(text) {
10323
- if (host.notify) host.notify.error(text);
10324
- else setMessage({ text, error: true });
10332
+ error(text, options) {
10333
+ if (host.notify) host.notify.error(text, options);
10334
+ else setMessage({ text: options?.description ? `${text}. ${options.description}` : text, error: true });
10325
10335
  }
10326
10336
  }),
10327
10337
  [host]
@@ -10356,6 +10366,7 @@ function displayId(id, show = "auto") {
10356
10366
  }
10357
10367
 
10358
10368
  // src/record-id.tsx
10369
+ init_error_sentence();
10359
10370
  var import_jsx_runtime71 = require("react/jsx-runtime");
10360
10371
  function RecordId({
10361
10372
  value,
@@ -10416,7 +10427,7 @@ function RecordId({
10416
10427
  e.preventDefault();
10417
10428
  void (0, import_clipboard.copyText)(value).then((ok) => {
10418
10429
  if (!ok) {
10419
- notify?.error(`Couldn't copy ${copyLabel}`);
10430
+ notify?.error("Not copied", { description: copyLabel });
10420
10431
  return;
10421
10432
  }
10422
10433
  setCopied(true);
@@ -10432,12 +10443,10 @@ function RecordId({
10432
10443
  try {
10433
10444
  const result = await onOpen(value);
10434
10445
  if (result === "forbidden") {
10435
- notify?.error("You don't have access to open this record");
10446
+ notify?.error("No access", { description: "This account can't open this record" });
10436
10447
  }
10437
10448
  } catch (err) {
10438
- notify?.error(
10439
- `Couldn't open: ${err instanceof Error ? err.message : String(err)}`
10440
- );
10449
+ notify?.error("Not opened", { description: peopleErrorSentence(err, null, { card: true }) });
10441
10450
  } finally {
10442
10451
  setOpening(false);
10443
10452
  }