@ai-matrx/design-system 0.21.1 → 0.21.3
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 +12 -0
- package/dist/content-transfer.cjs +20 -6
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.d.cts +38 -4
- package/dist/content-transfer.d.ts +38 -4
- package/dist/content-transfer.js +20 -6
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/copy-helpers.d.cts +4 -3
- package/dist/data-table/copy-helpers.d.ts +4 -3
- package/dist/data-table/copy-types.cjs.map +1 -1
- package/dist/data-table/copy-types.d.cts +7 -2
- package/dist/data-table/copy-types.d.ts +7 -2
- package/dist/data-table/data-row-inspector.cjs +23 -6
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +23 -6
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +23 -6
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +23 -6
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/filter-engine.d.cts +4 -3
- package/dist/data-table/filter-engine.d.ts +4 -3
- package/dist/data-table/host.cjs +12 -1
- package/dist/data-table/host.cjs.map +1 -1
- package/dist/data-table/host.d.cts +16 -3
- package/dist/data-table/host.d.ts +16 -3
- package/dist/data-table/host.js +12 -1
- package/dist/data-table/host.js.map +1 -1
- package/dist/data-table/index.cjs +992 -843
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +15 -6
- package/dist/data-table/index.d.ts +15 -6
- package/dist/data-table/index.js +949 -800
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +4 -3
- package/dist/data-table/infer-filter.d.ts +4 -3
- package/dist/data-table/layered-filters.d.cts +4 -3
- package/dist/data-table/layered-filters.d.ts +4 -3
- package/dist/data-table/pagination.cjs +3 -0
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +3 -0
- package/dist/data-table/pagination.js.map +1 -1
- package/dist/data-table/query-control.d.cts +4 -3
- package/dist/data-table/query-control.d.ts +4 -3
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +3 -2
- package/dist/data-table/types.d.ts +3 -2
- package/dist/data-table/url-state.d.cts +4 -3
- package/dist/data-table/url-state.d.ts +4 -3
- package/dist/data-table/uuid-cell.cjs +3 -0
- package/dist/data-table/uuid-cell.cjs.map +1 -1
- package/dist/data-table/uuid-cell.js +3 -0
- package/dist/data-table/uuid-cell.js.map +1 -1
- package/dist/data-table/xlsx.d.cts +4 -3
- package/dist/data-table/xlsx.d.ts +4 -3
- package/dist/styles.css +9 -0
- package/dist/{types-B99KFITZ.d.cts → types-BarjBFyG.d.cts} +9 -1
- package/dist/{types-CryQuMmz.d.ts → types-JFlsIv-0.d.ts} +9 -1
- package/package.json +1 -1
- package/dist/extensions-DCHtNwG3.d.cts +0 -32
- package/dist/extensions-DCHtNwG3.d.ts +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.21.3
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/design-system/v0.21.2..npm/design-system/v0.21.3 -- apps/shared/design-system`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.21.2
|
|
10
|
+
|
|
11
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
12
|
+
`git diff npm/design-system/v0.21.1..npm/design-system/v0.21.2 -- apps/shared/design-system`).
|
|
13
|
+
No source changes intended and no consumer action required.
|
|
14
|
+
|
|
3
15
|
## 0.21.1
|
|
4
16
|
|
|
5
17
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -1512,7 +1512,12 @@ function MatrxCopyMenuSession(props) {
|
|
|
1512
1512
|
...props.referenceActions ? { referenceActions: props.referenceActions } : {},
|
|
1513
1513
|
...props.icon !== void 0 ? { icon: props.icon } : {},
|
|
1514
1514
|
...props.triggerVariant !== void 0 ? { triggerVariant: props.triggerVariant } : {},
|
|
1515
|
-
controllerRef:
|
|
1515
|
+
controllerRef: (value) => {
|
|
1516
|
+
controller.current = value;
|
|
1517
|
+
if (typeof props.controllerRef === "function") props.controllerRef(value);
|
|
1518
|
+
else if (props.controllerRef) props.controllerRef.current = value;
|
|
1519
|
+
},
|
|
1520
|
+
...props.triggerHidden ? { triggerHidden: true } : {},
|
|
1516
1521
|
label: props.label,
|
|
1517
1522
|
variants,
|
|
1518
1523
|
actions,
|
|
@@ -2068,8 +2073,9 @@ function ContentTransferMenu(props) {
|
|
|
2068
2073
|
const identityKey = props.capabilities?.identityKey ?? inherited.identityKey;
|
|
2069
2074
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ContentTransferMenuSession, { ...props }, identityKey ?? "anonymous");
|
|
2070
2075
|
}
|
|
2071
|
-
function ContentTransferMenuSession({ references = [], referenceActions = [], source, surface, label, projection, sections, preferences, table, formatSources, sourceFormats = true, variants = EMPTY_VARIANTS, actions = [], capabilities: local, disabled, enabled = true, className, stopPropagation = true, hide = [], controllerRef, icon = "portal", triggerVariant = "transparent", triggerSize = "default" }) {
|
|
2076
|
+
function ContentTransferMenuSession({ references = [], referenceActions = [], source, surface, label, projection, sections, preferences, table, formatSources, sourceFormats = true, variants = EMPTY_VARIANTS, actions = [], capabilities: local, disabled, enabled = true, className, stopPropagation = true, hide = [], controllerRef, icon = "portal", triggerVariant = "transparent", triggerSize = "default", triggerHidden = false }) {
|
|
2072
2077
|
const triggerRef = React10.useRef(null);
|
|
2078
|
+
const restoreFocusRef = React10.useRef(null);
|
|
2073
2079
|
const inherited = React10.useContext(CapabilityContext);
|
|
2074
2080
|
const nearestSurface = React10.useContext(SurfaceContext);
|
|
2075
2081
|
const fence = useFence();
|
|
@@ -2319,13 +2325,21 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
|
|
|
2319
2325
|
);
|
|
2320
2326
|
React10.useImperativeHandle(controllerRef, () => ({
|
|
2321
2327
|
focusTrigger: () => triggerRef.current?.focus(),
|
|
2328
|
+
preparePrimary: async (options) => {
|
|
2329
|
+
if (!enabled) throw new Error("Alchemy is not enabled for this record.");
|
|
2330
|
+
if (disabled) throw new Error("Alchemy is disabled for this record.");
|
|
2331
|
+
if (hide.includes("prepare")) throw new Error("Alchemy preparation is unavailable for this record.");
|
|
2332
|
+
if (!primary) throw new Error("Alchemy has no source to prepare.");
|
|
2333
|
+
restoreFocusRef.current = options?.restoreFocus ?? null;
|
|
2334
|
+
await openWorkspace(primaryWorkspaceKey, { source: primary, label: sourceLabel });
|
|
2335
|
+
},
|
|
2322
2336
|
prepare: async (requestedSource, options) => {
|
|
2323
2337
|
const requestedLabel = options?.label ?? ("label" in requestedSource ? requestedSource.label : "content");
|
|
2324
2338
|
const requestedKey = `controller:${options?.id ?? "source"}:${materialIdentity(requestedSource)}`;
|
|
2325
2339
|
externalWorkspaceKeys.current.add(requestedKey);
|
|
2326
2340
|
await openWorkspace(requestedKey, { source: requestedSource, label: requestedLabel });
|
|
2327
2341
|
}
|
|
2328
|
-
}), [openWorkspace]);
|
|
2342
|
+
}), [disabled, enabled, hide, openWorkspace, primary, primaryWorkspaceKey, sourceLabel]);
|
|
2329
2343
|
const runAction = React10.useCallback(async (action) => {
|
|
2330
2344
|
const { controller, id } = fence.begin();
|
|
2331
2345
|
try {
|
|
@@ -2408,7 +2422,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
|
|
|
2408
2422
|
] }, id);
|
|
2409
2423
|
};
|
|
2410
2424
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: cn("matrx-alchemy", className), onClick: stopPropagation ? (event) => event.stopPropagation() : void 0, children: [
|
|
2411
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Popover, { open: paletteOpen, onOpenChange: (open) => {
|
|
2425
|
+
!triggerHidden ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Popover, { open: paletteOpen, onOpenChange: (open) => {
|
|
2412
2426
|
setPaletteOpen(open);
|
|
2413
2427
|
if (open) {
|
|
2414
2428
|
setMode("copy");
|
|
@@ -2517,13 +2531,13 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
|
|
|
2517
2531
|
] }, group) : null;
|
|
2518
2532
|
})
|
|
2519
2533
|
] })
|
|
2520
|
-
] }),
|
|
2534
|
+
] }) : null,
|
|
2521
2535
|
notice && triggerRef.current ? (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "matrx-alchemy-feedback", children: [
|
|
2522
2536
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { role: "status", children: notice }),
|
|
2523
2537
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ReceiptLink, { target: receiptTarget }),
|
|
2524
2538
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { type: "button", "aria-label": "Dismiss Alchemy feedback", onClick: () => setNotice(null), children: "\xD7" })
|
|
2525
2539
|
] }), triggerRef.current.ownerDocument.body) : null,
|
|
2526
|
-
Object.values(workspaces).map((saved) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PreparationWorkspace, { restoreFocus: () => triggerRef.current?.focus(), open: workspaceOpen && workspaceKey === saved.key, state: saved, scopes, scopeLabels: table?.scopeLabels, onClose: () => setWorkspaceOpen(false), onChange: (next) => setWorkspaces((current) => ({ ...current, [saved.key]: next })), transport, adapters, actions: preparedActions, captureScope: workspaceCaptures.current.get(saved.key) ?? capturePrimary, ...ai ? { ai } : {}, onOutcome: report }, saved.key)),
|
|
2540
|
+
Object.values(workspaces).map((saved) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PreparationWorkspace, { restoreFocus: () => restoreFocusRef.current?.() ?? triggerRef.current?.focus(), open: workspaceOpen && workspaceKey === saved.key, state: saved, scopes, scopeLabels: table?.scopeLabels, onClose: () => setWorkspaceOpen(false), onChange: (next) => setWorkspaces((current) => ({ ...current, [saved.key]: next })), transport, adapters, actions: preparedActions, captureScope: workspaceCaptures.current.get(saved.key) ?? capturePrimary, ...ai ? { ai } : {}, onOutcome: report }, saved.key)),
|
|
2527
2541
|
emailReview
|
|
2528
2542
|
] });
|
|
2529
2543
|
}
|