@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.
- package/CHANGELOG.md +30 -2
- package/dist/carousel.js +6 -6
- package/dist/{chunk-T4D7WAV7.js → chunk-42GFQMLA.js} +2 -2
- package/dist/{chunk-POJ3RR3K.js → chunk-B5D3VIMC.js} +1 -1
- package/dist/{chunk-POJ3RR3K.js.map → chunk-B5D3VIMC.js.map} +1 -1
- package/dist/{chunk-FRJ4PPA2.js → chunk-CZGZV35G.js} +2 -2
- package/dist/{chunk-ACZALXD6.js → chunk-K3XWUACX.js} +3 -3
- package/dist/{chunk-TV2IDHPZ.js → chunk-K5ZQROWN.js} +4 -4
- package/dist/{chunk-U46XUQI7.js → chunk-KSCSH7AO.js} +16 -14
- package/dist/chunk-KSCSH7AO.js.map +1 -0
- package/dist/{chunk-MTE6N7XU.js → chunk-NFJ63LIH.js} +2 -2
- package/dist/{chunk-XZGYKKCE.js → chunk-OUQT72UL.js} +3 -3
- package/dist/{chunk-WUD23YTG.js → chunk-P56Y43RL.js} +6 -6
- package/dist/{chunk-GMNROZQJ.js → chunk-QTPW44IJ.js} +2 -2
- package/dist/{chunk-QA7EHFRX.js → chunk-T3FKFPCW.js} +5 -5
- package/dist/{chunk-X6ZRHJQP.js → chunk-T57DLONB.js} +20 -11
- package/dist/chunk-T57DLONB.js.map +1 -0
- package/dist/{chunk-SOCNWQMX.js → chunk-TEMAM5ET.js} +3 -3
- package/dist/{chunk-CH2NWSES.js → chunk-TIV6M7Q7.js} +3 -3
- package/dist/{chunk-6XNYYROM.js → chunk-WVEDW5VO.js} +2 -2
- package/dist/clipboard-fallback-dialog.js +2 -2
- package/dist/controls.cjs +19 -10
- package/dist/controls.cjs.map +1 -1
- package/dist/controls.js +6 -6
- package/dist/data-table/data-row-inspector.cjs +99 -11
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +8 -7
- package/dist/data-table/data-row-window.cjs +99 -11
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +9 -8
- package/dist/data-table/drill-chart.js +1 -1
- package/dist/data-table/host.cjs.map +1 -1
- package/dist/data-table/host.d.cts +6 -2
- package/dist/data-table/host.d.ts +6 -2
- package/dist/data-table/host.js +1 -1
- package/dist/data-table/index.cjs +39 -37
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +6 -2
- package/dist/data-table/index.d.ts +6 -2
- package/dist/data-table/index.js +19 -23
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/pagination.cjs +19 -10
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +4 -4
- package/dist/data-table/uuid-cell.cjs +99 -11
- package/dist/data-table/uuid-cell.cjs.map +1 -1
- package/dist/data-table/uuid-cell.js +5 -4
- package/dist/desktop.cjs +20 -11
- package/dist/desktop.cjs.map +1 -1
- package/dist/desktop.d.cts +1 -1
- package/dist/desktop.d.ts +1 -1
- package/dist/desktop.js +13 -13
- package/dist/desktop.js.map +1 -1
- package/dist/email-input-dialog.js +1 -1
- package/dist/index.cjs +31 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +20 -20
- package/dist/item.cjs +19 -10
- package/dist/item.cjs.map +1 -1
- package/dist/item.js +5 -5
- package/dist/lite-table.js +3 -3
- package/dist/menu-look.cjs +19 -10
- package/dist/menu-look.cjs.map +1 -1
- package/dist/menu-look.js +2 -2
- package/dist/record-list.cjs +19 -10
- package/dist/record-list.cjs.map +1 -1
- package/dist/record-list.js +6 -6
- package/dist/settings.js +3 -3
- package/dist/swipe-deck.cjs +11 -2
- package/dist/swipe-deck.cjs.map +1 -1
- package/dist/swipe-deck.js +12 -3
- package/dist/swipe-deck.js.map +1 -1
- package/dist/text-input-dialog.js +1 -1
- package/dist/writing-field.js +3 -3
- package/package.json +2 -2
- package/dist/chunk-U46XUQI7.js.map +0 -1
- package/dist/chunk-X6ZRHJQP.js.map +0 -1
- /package/dist/{chunk-T4D7WAV7.js.map → chunk-42GFQMLA.js.map} +0 -0
- /package/dist/{chunk-FRJ4PPA2.js.map → chunk-CZGZV35G.js.map} +0 -0
- /package/dist/{chunk-ACZALXD6.js.map → chunk-K3XWUACX.js.map} +0 -0
- /package/dist/{chunk-TV2IDHPZ.js.map → chunk-K5ZQROWN.js.map} +0 -0
- /package/dist/{chunk-MTE6N7XU.js.map → chunk-NFJ63LIH.js.map} +0 -0
- /package/dist/{chunk-XZGYKKCE.js.map → chunk-OUQT72UL.js.map} +0 -0
- /package/dist/{chunk-WUD23YTG.js.map → chunk-P56Y43RL.js.map} +0 -0
- /package/dist/{chunk-GMNROZQJ.js.map → chunk-QTPW44IJ.js.map} +0 -0
- /package/dist/{chunk-QA7EHFRX.js.map → chunk-T3FKFPCW.js.map} +0 -0
- /package/dist/{chunk-SOCNWQMX.js.map → chunk-TEMAM5ET.js.map} +0 -0
- /package/dist/{chunk-CH2NWSES.js.map → chunk-TIV6M7Q7.js.map} +0 -0
- /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(
|
|
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(
|
|
2837
|
-
const [bottomClearance] = React27.useState(
|
|
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
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
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(
|
|
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("
|
|
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
|
}
|