@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
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
ErrorActions
|
|
18
18
|
} from "./chunk-5Z5GTXKL.js";
|
|
19
|
-
import "./chunk-HS6GMHKZ.js";
|
|
20
19
|
import "./chunk-TDMVH77G.js";
|
|
21
20
|
import {
|
|
22
21
|
Dialog,
|
|
@@ -35,6 +34,7 @@ import "./chunk-NDTDBBMM.js";
|
|
|
35
34
|
import "./chunk-BD77DHUO.js";
|
|
36
35
|
import "./chunk-BKCJUFD3.js";
|
|
37
36
|
import "./chunk-MOZRIHJF.js";
|
|
37
|
+
import "./chunk-HS6GMHKZ.js";
|
|
38
38
|
import "./chunk-WFITMVDB.js";
|
|
39
39
|
import "./chunk-WAT2XW7L.js";
|
|
40
40
|
import {
|
package/dist/writing-field.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
AlertDialogHeader,
|
|
21
21
|
AlertDialogTitle,
|
|
22
22
|
Tile
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QTPW44IJ.js";
|
|
24
24
|
import "./chunk-DRSBLHOF.js";
|
|
25
25
|
import {
|
|
26
26
|
Dialog,
|
|
@@ -48,12 +48,12 @@ import {
|
|
|
48
48
|
import {
|
|
49
49
|
Field,
|
|
50
50
|
Textarea
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-WVEDW5VO.js";
|
|
52
52
|
import "./chunk-BD77DHUO.js";
|
|
53
53
|
import "./chunk-BKCJUFD3.js";
|
|
54
54
|
import "./chunk-PIQJULQB.js";
|
|
55
55
|
import "./chunk-MOZRIHJF.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-T57DLONB.js";
|
|
57
57
|
import "./chunk-BNXNIN2S.js";
|
|
58
58
|
import "./chunk-WFITMVDB.js";
|
|
59
59
|
import "./chunk-WAT2XW7L.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/design-system",
|
|
3
|
-
"version": "0.86.
|
|
3
|
+
"version": "0.86.359",
|
|
4
4
|
"description": "AI Matrx semantic React primitives shared across Vite, Next.js, desktop, and customer-built applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -780,5 +780,5 @@
|
|
|
780
780
|
"confirm-dialog",
|
|
781
781
|
"alert-dialog"
|
|
782
782
|
],
|
|
783
|
-
"gitHead": "
|
|
783
|
+
"gitHead": "9ae0103052c767936df5e5fdab71bd82e7232fa1"
|
|
784
784
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/record-id-format.ts","../src/record-id.tsx","../src/data-table/useTableNotice.tsx"],"sourcesContent":["// THE id's formatting — what RecordId shows for an id — as plain functions with no React, so a\n// Server Component (a page title, metadata) shortens an id exactly as the component does.\n// Server-safe entry: `@ai-matrx/design-system/record-id-format`.\n\nimport { isUuidShape } from \"@ai-matrx/kit/uuid\";\n\nconst SHORT_LEN = 8;\n\nexport function shortUuid(id: string, len = SHORT_LEN): string {\n return id.slice(0, len);\n}\n\n/** Up to this many characters an id reads whole; longer ones show their start. */\nconst WHOLE_MAX = 16;\n\n/** A record id the database minted (a UUID) — what a peek shows on its own. */\nexport function isRecordUuid(id: string | null | undefined): boolean {\n return Boolean(id && isUuidShape(id));\n}\n\n/** What RecordId shows for an id: a UUID's (or any long id's) first 8 characters, a short id whole. */\nexport type RecordIdShow = \"auto\" | \"short\" | \"full\";\n\nexport function displayId(id: string, show: RecordIdShow = \"auto\"): string {\n if (show === \"full\") return id;\n if (show === \"short\" || isUuidShape(id) || id.length > WHOLE_MAX) return shortUuid(id);\n return id;\n}\n","\"use client\";\n\n/**\n * RecordId — THE way to show a record's id, anywhere (Arman, 2026-10-18: \"anything with an id …\n * we need to use a simple canonical id component that automatically handles several things,\n * including allowing for easy copy\"). Never `{row.id.slice(0, 8)}`, never a hand-built copy button.\n *\n * What it handles, once:\n * - display: a UUID shows its first 8 characters, a short id (a model id, a video id) shows whole;\n * the full id is always the tooltip;\n * - copy: one click copies the FULL id, a check confirms it, a failure says so;\n * - doors (THE DOOR LAW, \"never render an id you can't open\"): pass `token` (the entity token the\n * id points at) and the route, new tab and quick look resolve from the host registries; or pass\n * `href` / `onOpen`. `forbidden`: copyable, not openable;\n * - looks: `plain` (dense rows, tables — the default) or `chip` (headers, cards, detail panels);\n * `labelled` puts the kind of id in front (\"Agent ID\").\n * Prefer `EntityRef` when the record's NAME is on hand — this is the id itself.\n *\n * The data table's id column (`MatrxUuidCell`) is this component.\n */\n\nimport {\n useEffect,\n useRef,\n useState,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport { Lightbulb, ShieldOff } from \"./data-table/icons\";\nimport { CheckIcon, CopyIcon, ExternalLinkIcon, PanelRightIcon } from \"./icons\";\nimport { useTableNotice } from \"./data-table/useTableNotice\";\nimport { useMatrxDataTableHost } from \"./data-table/host\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"./tooltip\";\nimport { copyText } from \"@ai-matrx/kit/clipboard\";\nimport { cn } from \"./cn\";\nimport { Button as ControlButton } from \"./controls/controls\";\nimport { OutboundLink } from \"@ai-matrx/kit/outbound-react\";\n\nexport { shortUuid, isRecordUuid, displayId, type RecordIdShow } from \"./record-id-format\";\nimport { displayId, type RecordIdShow } from \"./record-id-format\";\nexport type RecordIdLook = \"plain\" | \"chip\" | \"icon\";\n\n\nexport type RecordIdOpenResult = void | \"forbidden\";\n\nexport interface RecordIdProps {\n value: string | null | undefined;\n /** What kind of id it is (\"Agent\", \"Chat\", a column name): the tooltip, the copy label and, with `labelled`, the visible prefix. */\n label?: string | undefined;\n /** `auto` (default): a UUID or long id shows its first 8 characters, a short id shows whole. */\n show?: RecordIdShow;\n /**\n * `plain` (default): dense mono text. `chip`: a quiet bordered pill for headers, cards and panels.\n * `icon`: the copy button alone, header-sized (a record's own header, where the id is shown elsewhere);\n * the full id is its tooltip.\n */\n look?: RecordIdLook;\n /** Show the kind of id in front of it (\"Agent ID 1a2b3c4d\"). */\n labelled?: boolean;\n /** A short note added to the tooltip under the id (\"Not a member of this organization\"). */\n hint?: string;\n /**\n * Inside another control (a button, a select trigger, a door): the id as text only, full id and\n * hint as its native tooltip, no buttons of its own — the control around it owns the click.\n */\n inert?: boolean;\n /**\n * Open the referenced record in-app (prefer WindowPanel).\n * Return `\"forbidden\"` to block navigation and show a muted state.\n */\n onOpen?: (id: string) => RecordIdOpenResult | Promise<RecordIdOpenResult>;\n /** Optional real href (new tab / cmd-click). Used when navigation is allowed. */\n href?: string | null | undefined;\n /**\n * Canonical entity token this id points at (`agent`, `note`, `task`, …).\n * Supplies the route and the peek automatically — THE DOOR LAW, resolved\n * from the registries instead of wired per callsite. An explicit `href` /\n * `onOpen` still wins.\n */\n token?: string | null | undefined;\n /** Force non-navigable (still copyable). */\n forbidden?: boolean;\n className?: string;\n trailing?: ReactNode;\n}\n\nexport function RecordId({\n value,\n label,\n show = \"auto\",\n look = \"plain\",\n labelled = false,\n hint,\n inert = false,\n onOpen,\n href,\n token,\n forbidden = false,\n className,\n trailing,\n}: RecordIdProps) {\n const { resolveEntityDoors, ResourcePeek } = useMatrxDataTableHost();\n const { notify, notice } = useTableNotice();\n const [copied, setCopied] = useState(false);\n const [opening, setOpening] = useState(false);\n const [peekOpen, setPeekOpen] = useState(false);\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timer.current) clearTimeout(timer.current);\n },\n [],\n );\n\n if (!value) {\n return <span className=\"text-disabled-foreground\">—</span>;\n }\n\n const doors = token ? resolveEntityDoors?.(token, value, href) ?? null : null;\n const resolvedHref = doors?.href ?? href ?? null;\n const canPeek = Boolean(doors?.canPeek) && !forbidden;\n const display = displayId(value, show);\n\n // A label that already names the id (\"Execution ID\", \"run_id\", a table's \"… Id\" header) is used as\n // written; any other kind of record gains \" ID\" (\"Agent\" → \"Agent ID\").\n const named = label ? /\\b(id|uuid)$/i.test(label.trim()) || /_id$/i.test(label.trim()) : false;\n const copyLabel = label ? (named ? label.trim() : `${label} ID`) : \"ID\";\n const tip = `${label ? `${copyLabel}: ${value}` : value}${hint ? ` — ${hint}` : \"\"}`;\n if (inert) {\n return (\n <span\n data-matrx-record-id=\"\"\n title={tip}\n className={cn(\"min-w-0 truncate font-mono text-xs tabular-nums\", className)}\n >\n {labelled ? `${copyLabel} ` : \"\"}\n {display}\n </span>\n );\n }\n\n const stop = (e: MouseEvent) => {\n e.stopPropagation();\n };\n\n const onCopy = (e: MouseEvent) => {\n stop(e);\n e.preventDefault();\n void copyText(value).then((ok) => {\n if (!ok) {\n notify?.error(`Couldn't copy ${copyLabel}`);\n return;\n }\n setCopied(true);\n if (timer.current) clearTimeout(timer.current);\n timer.current = setTimeout(() => setCopied(false), 1500);\n });\n };\n\n const handleOpen = async (e: MouseEvent) => {\n stop(e);\n e.preventDefault();\n if (!onOpen || forbidden || opening) return;\n setOpening(true);\n try {\n const result = await onOpen(value);\n if (result === \"forbidden\") {\n // access-errors: ok — relays the onOpen contract's explicit verdict: the caller's opener returns \"forbidden\" only after ITS OWN access check; the cell performs no read and never guesses\n notify?.error(\"You don't have access to open this record\");\n }\n } catch (err) {\n notify?.error(\n `Couldn't open: ${err instanceof Error ? err.message : String(err)}`,\n );\n } finally {\n setOpening(false);\n }\n };\n\n const idNode = (() => {\n if (forbidden) {\n return (\n <span className=\"inline-flex min-w-0 items-center gap-1 font-mono text-xs text-disabled-foreground tabular-nums\">\n <span className=\"min-w-0 truncate\">{display}</span>\n <ShieldOff className=\"h-3 w-3 shrink-0\" aria-hidden />\n </span>\n );\n }\n\n if (onOpen) {\n return (\n <ControlButton\n type=\"button\"\n variant=\"link\"\n iconEnd={<PanelRightIcon className=\"h-3 w-3 shrink-0 text-muted-foreground\" />}\n aria-label={`Open ${label ?? \"record\"} ${display}`}\n onClick={(e) => void handleOpen(e)}\n disabled={opening}\n className=\"min-w-0 font-mono\"\n >\n <span className=\"min-w-0 truncate tabular-nums\">{display}</span>\n </ControlButton>\n );\n }\n\n if (resolvedHref) {\n return (\n <OutboundLink\n href={resolvedHref}\n aria-label={`Open ${label ?? \"record\"} ${display} in a new tab`}\n onClick={stop}\n className=\"inline-flex min-w-0 items-center gap-1 font-mono text-xs text-primary hover:underline\"\n >\n <span className=\"min-w-0 truncate tabular-nums\">{display}</span>\n <ExternalLinkIcon className=\"h-3 w-3 shrink-0 text-muted-foreground\" />\n </OutboundLink>\n );\n }\n\n return (\n <span className=\"min-w-0 truncate font-mono text-xs text-muted-foreground tabular-nums select-all\">\n {display}\n </span>\n );\n })();\n\n return (\n <TooltipProvider delayDuration={200}>\n <span\n data-matrx-cell-control\n data-matrx-record-id=\"\"\n className={cn(\n \"inline-flex min-w-0 max-w-full items-center gap-0.5 whitespace-nowrap\",\n look === \"chip\" && \"h-5 rounded border border-border bg-muted pl-1.5 pr-0.5\",\n className,\n )}\n onClick={stop}\n >\n {labelled && look !== \"icon\" ? <span className=\"mr-1 shrink-0 text-xs text-muted-foreground\">{copyLabel}</span> : null}\n {look === \"icon\" ? null : (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"inline-flex min-w-0 max-w-full items-center\">\n {idNode}\n </span>\n </TooltipTrigger>\n <TooltipContent side=\"top\" className=\"max-w-sm break-all font-mono\">\n {forbidden ? `No access · ${tip}` : tip}\n </TooltipContent>\n </Tooltip>\n )}\n <Tooltip>\n <TooltipTrigger asChild>\n <ControlButton\n type=\"button\"\n variant=\"quiet\"\n icon={copied ? <CheckIcon className={look === \"icon\" ? \"h-3.5 w-3.5\" : \"h-3 w-3\"} /> : <CopyIcon className={look === \"icon\" ? \"h-3.5 w-3.5\" : \"h-3 w-3\"} />}\n onClick={onCopy}\n aria-label={copied ? \"Copied\" : `Copy ${copyLabel}`}\n className=\"shrink-0\"\n />\n </TooltipTrigger>\n <TooltipContent side=\"top\">{copied ? \"Copied\" : `Copy ${copyLabel}: ${value}`}</TooltipContent>\n </Tooltip>\n {canPeek && look !== \"icon\" ? (\n <Tooltip>\n <TooltipTrigger asChild>\n <ControlButton\n type=\"button\"\n variant=\"quiet\"\n icon={<Lightbulb className=\"h-3 w-3\" />}\n onClick={(e) => {\n stop(e);\n setPeekOpen(true);\n }}\n aria-label={`Quick look at ${label ?? \"record\"}`}\n className=\"shrink-0\"\n >\n </ControlButton>\n </TooltipTrigger>\n <TooltipContent side=\"top\">Quick look at {label ?? \"record\"}</TooltipContent>\n </Tooltip>\n ) : null}\n {onOpen && resolvedHref && !forbidden && look !== \"icon\" ? (\n <Tooltip>\n <TooltipTrigger asChild>\n <OutboundLink\n href={resolvedHref}\n onClick={stop}\n aria-label={`Open ${label ?? \"record\"} in a new tab`}\n className=\"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground focus:outline-none\"\n >\n <ExternalLinkIcon className=\"h-3 w-3\" />\n </OutboundLink>\n </TooltipTrigger>\n <TooltipContent side=\"top\">Open {label ?? \"record\"} in a new tab</TooltipContent>\n </Tooltip>\n ) : null}\n {trailing}\n {notice}\n {canPeek && peekOpen && ResourcePeek ? (\n <ResourcePeek\n kind={doors?.peekKind ?? token ?? \"record\"}\n id={value}\n onClose={() => setPeekOpen(false)}\n // Same contract as `EntityDoorControls`: forward the CALLER's raw\n // `href` so the peek's \"Open\" cannot send the user somewhere this\n // cell's own link does not go. `doors.ts` names EntityRef and this\n // cell as the two presentations that must not drift — the peek\n // override shipped on one of them first, which is exactly the drift\n // that file warns about.\n {...(href == null ? {} : { href })}\n />\n ) : null}\n </span>\n </TooltipProvider>\n );\n}\n","\"use client\";\nimport { useMemo, useState } from \"react\";\nimport { useMatrxDataTableHost } from \"./host\";\n\n/** Every portable async action has visible feedback even without a host toast system. */\nexport function useTableNotice() {\n const host = useMatrxDataTableHost();\n const [message, setMessage] = useState<{ text: string; error: boolean } | null>(null);\n // One `notify` per host, so a memoised toolbar that holds it never holds a stale one (RENDER-3).\n const notify = useMemo(\n () => ({\n success(text: string) { if (host.notify) host.notify.success(text); else setMessage({ text, error: false }); },\n error(text: string) { if (host.notify) host.notify.error(text); else setMessage({ text, error: true }); },\n }),\n [host],\n );\n const notice = message ? <span role={message.error ? \"alert\" : \"status\"} className={message.error ? \"text-xs text-destructive-ink\" : \"text-xs text-muted-foreground\"}>{message.text}<button type=\"button\" aria-label=\"Dismiss notification\" className=\"ml-2 underline\" onClick={() => setMessage(null)}>Dismiss</button></span> : null;\n return { notify, notice };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,mBAAmB;AAE5B,IAAM,YAAY;AAEX,SAAS,UAAU,IAAY,MAAM,WAAmB;AAC7D,SAAO,GAAG,MAAM,GAAG,GAAG;AACxB;AAGA,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ClE,IACE;AAAA,QACH;AAAA,QACA;AAAA,QACA,WAAW,YAAY,eACtB,gBAAAD;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,OAAO,YAAY,SAAS;AAAA,YAClC,IAAI;AAAA,YACJ,SAAS,MAAM,YAAY,KAAK;AAAA,YAO/B,GAAI,QAAQ,OAAO,CAAC,IAAI,EAAE,KAAK;AAAA;AAAA,QAClC,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ;","names":["useState","jsx","jsxs","useState"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dropdown-menu.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * DropdownMenu — Radix dropdown with two behaviors the stock body lacks.\n *\n * 1. THE ROOT RENDERS UNCONDITIONALLY — no hydration mount gate. A wrapper in\n * matrx-frontend once deferred rendering until after hydration on a false\n * premise (Radix ids come from React's SSR-stable `useId`), which deleted\n * the always-visible trigger — buttons, `…` menus — from SSR and the first\n * client paint.\n *\n * 2. A LONG MENU SCROLLS INSTEAD OF GROWING OFF-SCREEN. Content and SubContent\n * cap at `--radix-dropdown-menu-content-available-height` — the space Radix\n * actually measured between the trigger and the viewport edge — and scroll\n * past it. Without the cap a menu longer than the viewport puts its last\n * items where no pointer can reach them, and on a short window that can be\n * the only exit from the surface.\n *\n * Portalling goes through the package's `usePortalContainer` seam, so a menu\n * opened inside a Dialog mounts INSIDE the dialog (staying in the scroll\n * shard, where its wheel events work) instead of at `document.body`. An\n * explicit `container` prop still wins.\n *\n * Icons are the package's inlined SVGs (C19) — no icon-library dependency.\n */\n\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport { MOTION_POPPER } from \"./motion\";\nimport { SOLID_SURFACE_CLASS, type PopoverSurface } from \"./solid-surface\";\nimport { RadixCheckIcon, DotFilledIcon, RadixChevronRightIcon } from \"./icons\";\nimport { usePortalContainer } from \"./portal-container\";\nimport { useMenuScrollEdges } from \"./menu-scroll-edges\";\nimport { useSubmenuSurvivesParentPanelFocus } from \"./submenu-focus\";\nimport { useNestedSubmenuPlacement } from \"./submenu-side\";\nimport { keepMovedFocus } from \"./focus-return\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n// The cap is exactly the room Radix measured. What floats at the bottom (the host publishes\n// --matrx-floating-clearance) is kept clear as COLLISION PADDING (see readBottomClearance), never subtracted\n// here: subtracting it crushed any menu opened from inside or just above that floating chrome — the attention\n// dock's snooze menu (the dock is itself bottom chrome, ~240 px) opened as a 0 px sliver.\nconst MENU_SURFACE_CLASS =\n \"z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground\";\n\n\n// gap-2: an item's icon never touches its label (page-pass 2026-09-27, admin pass — every menu).\nconst MENU_ITEM_CLASS =\n \"relative flex select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:text-disabled-foreground\";\n\nconst MENU_INDICATOR_ITEM_CLASS =\n \"relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:text-disabled-foreground\";\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n data-slot=\"dropdown-menu-sub-trigger\"\n className={cn(\n \"flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <RadixChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\n/**\n * A SUBMENU OPENS BESIDE ITS PARENT, NEVER ON TOP OF IT (merged-grid review 2, C1: \"nested\n * submenus overlap the parent menu\"). The submenu was drawn INSIDE the parent's surface, and that\n * surface's entry animation leaves a `transform` on it — which makes the parent the containing\n * block of the submenu's `position: fixed`. Radix measured the submenu's place in viewport\n * coordinates and the browser applied them from the parent's corner, so it landed over the parent\n * (and was clipped by the parent's scroll box). Portalled like every other surface, through the\n * same container seam, it sits beside its trigger as Radix placed it.\n */\nconst DropdownMenuSubContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> & {\n container?: HTMLElement | null;\n /** `\"solid\"` = opaque surface (see PopoverContent `surface`). */\n surface?: PopoverSurface;\n }\n>(({ className, container, surface = \"default\", sideOffset = 2, alignOffset = -4, collisionPadding, onFocusOutside, children, ...props }, ref) => {\n const portalContainer = usePortalContainer(container);\n const [bottomClearance] = React.useState(readBottomClearance);\n const padding = menuCollisionPadding(collisionPadding ?? 8, 0, bottomClearance);\n // A nested submenu opens on its parent's side (see submenu-side.tsx).\n const nested = useNestedSubmenuPlacement(ref, padding);\n // A flipped submenu survives the pointer leaving its trigger (see submenu-focus.ts).\n const keep = useSubmenuSurvivesParentPanelFocus(nested.ref, onFocusOutside);\n const edges = useMenuScrollEdges(keep.ref);\n return (\n <DropdownMenuPrimitive.Portal container={portalContainer}>\n <DropdownMenuPrimitive.SubContent\n ref={edges.ref}\n onFocusOutside={keep.onFocusOutside}\n data-slot=\"dropdown-menu-sub-content\"\n data-surface={surface === \"solid\" ? \"solid\" : undefined}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n {...(nested.padding === undefined ? {} : { collisionPadding: nested.padding })}\n className={cn(MENU_SURFACE_CLASS, edges.surfaceClassName, \"shadow-lg\", surface === \"solid\" && SOLID_SURFACE_CLASS, MOTION_POPPER, className)}\n {...props}\n >\n {nested.wrap(edges.wrap(children))}\n </DropdownMenuPrimitive.SubContent>\n </DropdownMenuPrimitive.Portal>\n );\n});\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nexport interface DropdownMenuContentProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {\n /** Explicit portal target; wins over the injected container. */\n container?: HTMLElement | null;\n /** `\"solid\"` = opaque surface (see PopoverContent `surface`). */\n surface?: PopoverSurface;\n}\n\n/**\n * The px a menu keeps clear of the TOP edge: what the host publishes as `--matrx-floating-top-clearance`\n * (a page's sticky header row, on top of the app header) or, absent that, the app header\n * (`--shell-header-h`). Radix positions against the raw viewport, so without it a menu opened from the first\n * row under a sticky header flips up and its first items sit underneath it. Read once, when the menu opens.\n * Hosts without either variable lose nothing (0px = Radix's own default).\n */\nexport function readTopClearance(): number {\n return readClearance(\"var(--matrx-floating-top-clearance, var(--shell-header-h, 0px))\");\n}\n\n/**\n * The px a menu keeps clear of the BOTTOM edge: what the host publishes as `--matrx-floating-clearance`\n * (the assists pill, the attention dock, any `data-matrx-floating-bottom` chrome). As collision padding,\n * Radix FLIPS a menu upward when the room left below that chrome is too small, and its available height\n * already excludes it — so the last item never ends under the pill, and a menu opened from INSIDE that\n * chrome opens upward at full height instead of collapsing. Read once, when the menu opens.\n */\nexport function readBottomClearance(): number {\n return readClearance(\"var(--matrx-floating-clearance, 0px)\");\n}\n\ntype MenuCollisionPadding = number | Partial<Record<\"top\" | \"right\" | \"bottom\" | \"left\", number>>;\n\n/** Pure: the caller's collision padding (or `fallback` on sides it leaves unset), with the host's top and bottom\n * clearance as a floor — a caller's own padding never puts a menu under the app header or the assists pill. */\nexport function menuCollisionPadding(\n caller: MenuCollisionPadding | undefined,\n top: number,\n bottom: number,\n fallback = 0,\n): Record<\"top\" | \"right\" | \"bottom\" | \"left\", number> {\n const side = (key: \"top\" | \"right\" | \"bottom\" | \"left\") =>\n typeof caller === \"number\" ? caller : (caller?.[key] ?? fallback);\n return { top: Math.max(side(\"top\"), top), right: side(\"right\"), bottom: Math.max(side(\"bottom\"), bottom), left: side(\"left\") };\n}\n\nfunction readClearance(height: string): number {\n if (typeof document === \"undefined\") return 0;\n const probe = document.createElement(\"div\");\n probe.style.cssText = `position:fixed;top:0;left:0;width:0;visibility:hidden;pointer-events:none;height:${height}`;\n document.body.appendChild(probe);\n const px = probe.getBoundingClientRect().height;\n probe.remove();\n return Number.isFinite(px) ? Math.ceil(px) : 0;\n}\n\nconst DropdownMenuContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Content>,\n DropdownMenuContentProps\n>(({ className, sideOffset = 4, container, surface = \"default\", children, onCloseAutoFocus, collisionPadding, ...props }, ref) => {\n const portalContainer = usePortalContainer(container);\n const [topClearance] = React.useState(readTopClearance);\n const [bottomClearance] = React.useState(readBottomClearance);\n const edges = useMenuScrollEdges(ref);\n return (\n <DropdownMenuPrimitive.Portal container={portalContainer}>\n <DropdownMenuPrimitive.Content\n ref={edges.ref}\n data-slot=\"dropdown-menu-content\"\n data-surface={surface === \"solid\" ? \"solid\" : undefined}\n sideOffset={sideOffset}\n collisionPadding={menuCollisionPadding(collisionPadding, topClearance, bottomClearance)}\n className={cn(\n MENU_SURFACE_CLASS,\n edges.surfaceClassName,\n \"shadow-md\",\n surface === \"solid\" && SOLID_SURFACE_CLASS,\n MOTION_POPPER,\n className,\n )}\n {...props}\n onCloseAutoFocus={keepMovedFocus(onCloseAutoFocus)}\n >\n {edges.wrap(children)}\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n );\n});\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n /** `danger`: a destructive item (Delete, Remove) — destructive text and icon, destructive soft\n * fill on hover / focus. Default: the ordinary item. */\n tone?: \"danger\";\n /** `sm`: 13px text on the 28px control row height, for dense frames. Default: the menu's 14px. */\n size?: \"sm\";\n }\n>(({ className, inset, tone, size, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n data-slot=\"dropdown-menu-item\"\n data-tone={tone}\n data-size={size}\n className={cn(MENU_ITEM_CLASS, size === \"sm\" && \"h-7 py-0 text-[13px]\", inset && \"pl-8\", className)}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(MENU_INDICATOR_ITEM_CLASS, className)}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <RadixCheckIcon className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(MENU_INDICATOR_ITEM_CLASS, className)}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"h-4 w-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n data-slot=\"dropdown-menu-label\"\n className={cn(\"type-label px-2 pb-1 pt-2 font-medium text-foreground\", inset && \"pl-8\", className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n);\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,YAAY,2BAA2B;AACvC,YAAY,WAAW;AAwCrB,SAWE,KAXF;AA5BF,IAAM,eAAqC;AAC3C,IAAM,sBAA4C;AAClD,IAAM,oBAA0C;AAChD,IAAM,qBAA2C;AACjD,IAAM,kBAAwC;AAC9C,IAAM,yBAA+C;AAMrD,IAAM,qBACJ;AAIF,IAAM,kBACJ;AAEF,IAAM,4BACJ;AAEF,IAAM,yBAA+B,iBAKnC,CAAC,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAC3C;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,aAAU;AAAA,IACV,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,yBAAsB,WAAU,mBAAkB;AAAA;AAAA;AACrD,CACD;AACD,uBAAuB,cACC,iCAAW;AAWnC,IAAM,yBAA+B,iBAOnC,CAAC,EAAE,WAAW,WAAW,UAAU,WAAW,aAAa,GAAG,cAAc,IAAI,kBAAkB,gBAAgB,UAAU,GAAG,MAAM,GAAG,QAAQ;AAChJ,QAAM,kBAAkB,mBAAmB,SAAS;AACpD,QAAM,CAAC,eAAe,IAAU,eAAS,mBAAmB;AAC5D,QAAM,UAAU,qBAAqB,oBAAoB,GAAG,GAAG,eAAe;AAE9E,QAAM,SAAS,0BAA0B,KAAK,OAAO;AAErD,QAAM,OAAO,mCAAmC,OAAO,KAAK,cAAc;AAC1E,QAAM,QAAQ,mBAAmB,KAAK,GAAG;AACzC,SACE,oBAAuB,8BAAtB,EAA6B,WAAW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AAtB,EACC,8BAAC,kBAAe,WAAU,WAAU,GACtC,GACF;AAAA,MACC;AAAA;AAAA;AACH,CACD;AACD,yBAAyB,cACD,mCAAa;AAErC,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,aAAU;AAAA,IACV,WAAW,GAAG,2BAA2B,SAAS;AAAA,IACjD,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,gEACd,8BAAuB,qCAAtB,EACC,8BAAC,iBAAc,WAAU,wBAAuB,GAClD,GACF;AAAA,MACC;AAAA;AAAA;AACH,CACD;AACD,sBAAsB,cAAoC,gCAAU;AAEpE,IAAM,oBAA0B,iBAK9B,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,aAAU;AAAA,IACV,WAAW,GAAG,yDAAyD,SAAS,QAAQ,SAAS;AAAA,IAChG,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAoC,4BAAM;AAE5D,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,aAAU;AAAA,IACV,WAAW,GAAG,4BAA4B,SAAS;AAAA,IAClD,GAAG;AAAA;AACN,CACD;AACD,sBAAsB,cAAoC,gCAAU;AAEpE,IAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA;AAAA,IACC,aAAU;AAAA,IACV,WAAW,GAAG,yDAAyD,SAAS;AAAA,IAC/E,GAAG;AAAA;AACN;AAEF,qBAAqB,cAAc;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|