@ai-matrx/records-ui 0.116.14 → 0.116.16
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 +25 -1
- package/dist/{SaveToTable-QZCRFD5Q.js → SaveToTable-54FVMGKL.js} +3 -3
- package/dist/{chunk-NE72B4OK.js → chunk-QVTYE4XU.js} +39 -17
- package/dist/chunk-QVTYE4XU.js.map +1 -0
- package/dist/{chunk-RQL7QRGR.js → chunk-TF3JYYJN.js} +1 -1
- package/dist/chunk-TF3JYYJN.js.map +1 -0
- package/dist/{chunk-6WDNTT2G.js → chunk-WETGQ7P3.js} +66 -10
- package/dist/chunk-WETGQ7P3.js.map +1 -0
- package/dist/{chunk-HUPBD4JF.js → chunk-YIGEIVU7.js} +2 -2
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +10 -1
- package/dist/helpers.d.ts +10 -1
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +2834 -2683
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -9
- package/dist/index.d.ts +40 -9
- package/dist/index.js +2523 -2422
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +34 -11
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +2 -2
- package/dist/skeleton.cjs +64 -8
- package/dist/skeleton.cjs.map +1 -1
- package/dist/skeleton.d.cts +48 -1
- package/dist/skeleton.d.ts +48 -1
- package/dist/skeleton.js +25 -1
- package/package.json +5 -5
- package/dist/chunk-6WDNTT2G.js.map +0 -1
- package/dist/chunk-NE72B4OK.js.map +0 -1
- package/dist/chunk-RQL7QRGR.js.map +0 -1
- /package/dist/{SaveToTable-QZCRFD5Q.js.map → SaveToTable-54FVMGKL.js.map} +0 -0
- /package/dist/{chunk-HUPBD4JF.js.map → chunk-YIGEIVU7.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
### Unreleased
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
- **The URL-cell link preview shows the site's real icon** even when the page metadata carries none (falls back to Google / DuckDuckGo favicons). Consumer action: none.
|
|
7
|
+
|
|
5
8
|
- **A ring of many slices is visible again; a share never wraps.** Past 24 slices a donut's gap is half of each slice's share (`donutGap`, exported) and its slices draw no outline — before, a fixed 1° gap plus recharts' white 1px outline left a 200-group ring blank around its number. The legend's share column no longer wraps "23.5 %" onto two lines in a narrow card. Guard: `src/a-donut-says-the-hosts-total-and-colours.test.tsx`. Consumer action: none.
|
|
6
9
|
- **`ChartBlock` says a host's total, its option colours, and no legend (CHART-CONVERGENCE, 2026-10-17).** Three new optional props, so Spaces draws its database chart (donut included) with ChartBlock and its own donut is deleted: `centerTotal` (the number a `centerValue` donut draws in its middle — the total over every record, or an average / min / max over every record; `null` draws "–"; absent = the drawn groups added up, as before), `groupColors` (a colour per group keyed by its stored value as text, `""` for no value — a choice column's option colours; bars, columns and donut slices and legend rows; single-group, uncompared blocks only) and `legend` (`false` hides the donut legend and the value list under bars / a line; default `true`). New export `colorOfGroup`. Guard: `src/a-donut-says-the-hosts-total-and-colours.test.tsx` (red without the props). Additive. Consumer action: none.
|
|
7
10
|
- **Who else is looking at this table (AIRTABLE-PARITY row 183).** New optional host port `presence` on `RecordsUiHost` (`RecordsPresencePort`, bound with `createRecordsPresencePort` from `@ai-matrx/records/realtime`). `TablePage` draws `TablePresence` in its one toolbar row: avatars of the other people (+N past four), and each person's selected cell outlined in their colour; this person's selected cell is told to the others. Exports `TablePresence`, `useTablePresence`, `presenceOutlineCss` and the port types. Unbound: nothing drawn. Guard: `src/a-table-shows-who-else-is-looking.test.tsx`. Additive. Consumer action: bind `presence` to see colleagues.
|
|
@@ -14,11 +17,32 @@
|
|
|
14
17
|
- Tests: `vitest.setup.ts` gives jsdom a no-op `performance.mark` / `measure`.
|
|
15
18
|
- **New subpath `@ai-matrx/records-ui/data-source`:** `recordsDataSource`, `personActor` and the who-changed words (`whenWords`, `actorWords`, `actorBadge`, `lastChangeSentence`, `SOMEBODY`, `THE_SYSTEM`) alone. `/helpers` also carries the field-type words, the colour resolver and the table builders, which read `@ai-matrx/records/core`; this entry reaches `@ai-matrx/kit` only, and shares the one data-source cache with `/helpers` and the root. Additive. Consumer action: a shell-reachable service that only binds its supabase client or says when imports from `/data-source`.
|
|
16
19
|
|
|
17
|
-
## 0.116.
|
|
20
|
+
## 0.116.16
|
|
18
21
|
|
|
19
22
|
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
20
23
|
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/records-ui/src`.
|
|
21
24
|
|
|
25
|
+
## 0.116.15
|
|
26
|
+
|
|
27
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
28
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
29
|
+
Diff: `git diff 850ff71080 b3732ecfc5 -- apps/shared/records-ui/src`
|
|
30
|
+
|
|
31
|
+
Changed shipped source files (2):
|
|
32
|
+
- `apps/shared/records-ui/src/buttonCell.tsx`
|
|
33
|
+
- `apps/shared/records-ui/src/host.tsx`
|
|
34
|
+
|
|
35
|
+
## 0.116.14
|
|
36
|
+
|
|
37
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
38
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
39
|
+
Diff: `git diff 803a1d7fd1 850ff71080 -- apps/shared/records-ui/src`
|
|
40
|
+
|
|
41
|
+
Changed shipped source files (3):
|
|
42
|
+
- `apps/shared/records-ui/src/ChartBlock.tsx`
|
|
43
|
+
- `apps/shared/records-ui/src/ChartLayout.tsx`
|
|
44
|
+
- `apps/shared/records-ui/src/entityViews.tsx`
|
|
45
|
+
|
|
22
46
|
## 0.116.13
|
|
23
47
|
|
|
24
48
|
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
SAVE_TO_TABLE_TYPES,
|
|
5
5
|
SaveToTable,
|
|
6
6
|
shapesOfSource
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YIGEIVU7.js";
|
|
8
8
|
import "./chunk-DDTOL35E.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-TF3JYYJN.js";
|
|
10
10
|
import "./chunk-TIZHA6VK.js";
|
|
11
11
|
import "./chunk-IUUZVQZD.js";
|
|
12
12
|
import "./chunk-MUK63ANA.js";
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
SaveToTable,
|
|
18
18
|
shapesOfSource
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=SaveToTable-
|
|
20
|
+
//# sourceMappingURL=SaveToTable-54FVMGKL.js.map
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
isValueSet,
|
|
36
36
|
looksLikeId,
|
|
37
37
|
recordName,
|
|
38
|
+
recordNameIn,
|
|
38
39
|
recordVersions_exports,
|
|
39
40
|
refusalIsMissingInput,
|
|
40
41
|
refusalSentence,
|
|
@@ -49,7 +50,7 @@ import {
|
|
|
49
50
|
useRecordsUi,
|
|
50
51
|
useTableRights,
|
|
51
52
|
withoutInternalCodes
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-TF3JYYJN.js";
|
|
53
54
|
import {
|
|
54
55
|
kindItemWords,
|
|
55
56
|
kindLabel,
|
|
@@ -450,8 +451,15 @@ function numberOf(value) {
|
|
|
450
451
|
function Swatch({ color, className }) {
|
|
451
452
|
return /* @__PURE__ */ jsx2("span", { "aria-hidden": true, className: cn2("inline-block h-4 w-4 shrink-0 rounded border border-border", className), style: { backgroundColor: color } });
|
|
452
453
|
}
|
|
453
|
-
function
|
|
454
|
-
const
|
|
454
|
+
function colorPairGround(format, context) {
|
|
455
|
+
const fixed = format.options?.contrastWith;
|
|
456
|
+
if (fixed?.readsOnField) return context?.ground ?? null;
|
|
457
|
+
if (context?.ground) return context.ground;
|
|
458
|
+
if (!fixed || !fixed.light && !fixed.dark) return null;
|
|
459
|
+
return { ...fixed.light ? { light: fixed.light } : {}, ...fixed.dark ? { dark: fixed.dark } : {}, label: fixed.label ?? "its background" };
|
|
460
|
+
}
|
|
461
|
+
function colorPairContrast(pair, format, context) {
|
|
462
|
+
const ground = colorPairGround(format, context);
|
|
455
463
|
if (!ground) return {};
|
|
456
464
|
const out = {};
|
|
457
465
|
if (ground.light) {
|
|
@@ -586,11 +594,11 @@ function ColorPairPreview({ value }) {
|
|
|
586
594
|
/* @__PURE__ */ jsx2("span", { className: "flex items-end p-2", style: { backgroundColor: pair.dark ?? pair.light }, children: /* @__PURE__ */ jsx2("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs text-foreground", children: "Dark" }) })
|
|
587
595
|
] });
|
|
588
596
|
}
|
|
589
|
-
function colorPairChecks(value, format) {
|
|
597
|
+
function colorPairChecks(value, format, context) {
|
|
590
598
|
const pair = readColorPair(value);
|
|
591
599
|
if (!pair) return [];
|
|
592
|
-
const contrast = colorPairContrast(pair, format);
|
|
593
|
-
const ground = format
|
|
600
|
+
const contrast = colorPairContrast(pair, format, context);
|
|
601
|
+
const ground = colorPairGround(format, context)?.label ?? "its background";
|
|
594
602
|
const out = [];
|
|
595
603
|
for (const part of ["light", "dark"]) {
|
|
596
604
|
const ratio = contrast[part];
|
|
@@ -841,10 +849,10 @@ function fieldLookFor(formatId) {
|
|
|
841
849
|
function fieldLookIds() {
|
|
842
850
|
return [...LOOKS.keys()];
|
|
843
851
|
}
|
|
844
|
-
function lookChecks(value, format) {
|
|
852
|
+
function lookChecks(value, format, context) {
|
|
845
853
|
if (!format) return [];
|
|
846
854
|
const look = LOOKS.get(format.id);
|
|
847
|
-
return look?.checks ? look.checks(value, format) : [];
|
|
855
|
+
return look?.checks ? look.checks(value, format, context) : [];
|
|
848
856
|
}
|
|
849
857
|
function registeredLook(format) {
|
|
850
858
|
return format && LOOKS.has(format.id) ? format : void 0;
|
|
@@ -3307,7 +3315,7 @@ function linkChipText(raw) {
|
|
|
3307
3315
|
|
|
3308
3316
|
// src/LinkPreviewCard.tsx
|
|
3309
3317
|
import { useEffect as useEffect8, useRef as useRef8, useState as useState13 } from "react";
|
|
3310
|
-
import { HoverCard, HoverCardContent, HoverCardTrigger } from "@ai-matrx/design-system";
|
|
3318
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger, SiteIcon } from "@ai-matrx/design-system";
|
|
3311
3319
|
import { Fragment as Fragment8, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3312
3320
|
var answers = /* @__PURE__ */ new Map();
|
|
3313
3321
|
function LinkPreviewCard({ url, children }) {
|
|
@@ -3344,10 +3352,7 @@ function LinkPreviewCard({ url, children }) {
|
|
|
3344
3352
|
/* @__PURE__ */ jsx18("img", { src: shown2.imageUrl, alt: "", className: "h-28 w-full rounded object-cover", referrerPolicy: "no-referrer" })
|
|
3345
3353
|
) : null,
|
|
3346
3354
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1.5", children: [
|
|
3347
|
-
shown2.faviconUrl
|
|
3348
|
-
// eslint-disable-next-line @next/next/no-img-element
|
|
3349
|
-
/* @__PURE__ */ jsx18("img", { src: shown2.faviconUrl, alt: "", className: "h-3.5 w-3.5 shrink-0", referrerPolicy: "no-referrer" })
|
|
3350
|
-
) : null,
|
|
3355
|
+
/* @__PURE__ */ jsx18(SiteIcon, { site: url, iconUrl: shown2.faviconUrl, className: "h-3.5 w-3.5" }),
|
|
3351
3356
|
/* @__PURE__ */ jsx18("span", { className: "truncate text-muted-foreground", children: shown2.siteName ?? "" })
|
|
3352
3357
|
] }),
|
|
3353
3358
|
shown2.title ? /* @__PURE__ */ jsx18("div", { className: "line-clamp-2 font-medium", children: shown2.title }) : null,
|
|
@@ -4348,7 +4353,7 @@ import { AlchemyMenu } from "@ai-matrx/alchemy/react";
|
|
|
4348
4353
|
import { OutboundLink as OutboundLink5 } from "@ai-matrx/kit/outbound-react";
|
|
4349
4354
|
import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
|
|
4350
4355
|
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4351
|
-
var SaveToTable = lazy(() => import("./SaveToTable-
|
|
4356
|
+
var SaveToTable = lazy(() => import("./SaveToTable-54FVMGKL.js").then((m) => ({ default: m.SaveToTable })));
|
|
4352
4357
|
var LONGEST_READ = 5e5;
|
|
4353
4358
|
var FENCE = /^```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n?```$/;
|
|
4354
4359
|
function isPlainObject(v) {
|
|
@@ -9001,6 +9006,10 @@ function buttonPressWords(label, pressed) {
|
|
|
9001
9006
|
const status = pressed.status ?? "ran";
|
|
9002
9007
|
return [`${pressed.automation ?? label}: ${status}.`, pressed.says].filter(Boolean).join(" ");
|
|
9003
9008
|
}
|
|
9009
|
+
function addRowWords(label, table, document2) {
|
|
9010
|
+
const name = recordNameIn(table, document2, "");
|
|
9011
|
+
return name !== "" ? `${label}: added \u201C${name}\u201D and opened it.` : `${label}: added to ${tableName(table)} and opened it.`;
|
|
9012
|
+
}
|
|
9004
9013
|
var POLL_EVERY_MS = 1200;
|
|
9005
9014
|
var POLL_FOR_MS = 12e4;
|
|
9006
9015
|
var RUN_BOOKKEEPING = /* @__PURE__ */ new Set(["run_id", "conversation_id"]);
|
|
@@ -9046,7 +9055,7 @@ function waitingRunsOf(pressed) {
|
|
|
9046
9055
|
return out;
|
|
9047
9056
|
}
|
|
9048
9057
|
var stop2 = (event) => event.stopPropagation();
|
|
9049
|
-
function ButtonValue({ field: field2, recordId, inCell }) {
|
|
9058
|
+
function ButtonValue({ field: field2, recordId, inCell, beforeSave }) {
|
|
9050
9059
|
const client = useOptionalRecordsClient11();
|
|
9051
9060
|
const b = buttonOf2(field2);
|
|
9052
9061
|
const [busy, setBusy] = useState26(false);
|
|
@@ -9060,6 +9069,12 @@ function ButtonValue({ field: field2, recordId, inCell }) {
|
|
|
9060
9069
|
useEffect18(() => () => void (waitingOn.current += 1), []);
|
|
9061
9070
|
if (!b) return null;
|
|
9062
9071
|
const color = isStyleColor(b.color) ? CHOICE_CHIP_CLASS[b.color] : NEUTRAL_CHIP_CLASS;
|
|
9072
|
+
if (beforeSave) {
|
|
9073
|
+
return /* @__PURE__ */ jsxs32("span", { className: "inline-flex min-w-0 items-center gap-2", "data-records-button-before-save": field2.key, children: [
|
|
9074
|
+
/* @__PURE__ */ jsx36(Button15, { type: "button", size: "xs", variant: "outline", disabled: true, "aria-describedby": `${field2.key}-before-save`, "data-records-button": field2.key, className: cn18("max-w-full gap-1 border px-2 font-medium", inCell ? "h-5" : "h-6", color), children: /* @__PURE__ */ jsx36("span", { className: "truncate", children: b.label }) }),
|
|
9075
|
+
/* @__PURE__ */ jsx36("span", { id: `${field2.key}-before-save`, className: "whitespace-nowrap text-xs text-muted-foreground", children: "Save the record first" })
|
|
9076
|
+
] });
|
|
9077
|
+
}
|
|
9063
9078
|
const needs = buttonNeeds2(b);
|
|
9064
9079
|
const tableId = field2.entity_definition_id;
|
|
9065
9080
|
const press = async () => {
|
|
@@ -9082,6 +9097,12 @@ function ButtonValue({ field: field2, recordId, inCell }) {
|
|
|
9082
9097
|
here.open(pressed.record_id);
|
|
9083
9098
|
return setSaid({ kind: "ran", says: `${b.label}: a row was added and opened.` });
|
|
9084
9099
|
}
|
|
9100
|
+
if (host.openRecord && addsTo.data) {
|
|
9101
|
+
const made = addsTo.data;
|
|
9102
|
+
host.openRecord({ table: made, recordId: pressed.record_id });
|
|
9103
|
+
const read = await client.recordRead({ record_id: pressed.record_id });
|
|
9104
|
+
return setSaid({ kind: "ran", says: addRowWords(b.label, made, read.ok ? read.data.document : void 0) });
|
|
9105
|
+
}
|
|
9085
9106
|
const href = addsTo.data ? host.hrefForRecord?.({ table: addsTo.data, recordId: pressed.record_id }) : void 0;
|
|
9086
9107
|
if (href) {
|
|
9087
9108
|
setOpening(true);
|
|
@@ -9830,7 +9851,7 @@ function FieldControl({ field: field2, value, onChange, disabled, id, autoOpen,
|
|
|
9830
9851
|
const ownDetails = useOptionalRecordsClient12() === null;
|
|
9831
9852
|
if (isTypedDraft(value)) return /* @__PURE__ */ jsx40(TypedTextControl, { field: field2, value, onChange, disabled, id: inputId, onCommit, onCancel });
|
|
9832
9853
|
if (isSignatureField(field2)) return /* @__PURE__ */ jsx40(SignaturePad, { id: inputId, value, onChange, disabled });
|
|
9833
|
-
if (isButtonField2(field2)) return /* @__PURE__ */ jsx40(ButtonValue, { field: field2 });
|
|
9854
|
+
if (isButtonField2(field2)) return /* @__PURE__ */ jsx40(ButtonValue, { field: field2, recordId: recordId ?? null, beforeSave: !recordId });
|
|
9834
9855
|
const newerControl = newerKindControl({ field: field2, value, onChange, disabled, id: inputId });
|
|
9835
9856
|
if (newerControl !== void 0) return newerControl;
|
|
9836
9857
|
const format = formatForField(field2);
|
|
@@ -11558,6 +11579,7 @@ export {
|
|
|
11558
11579
|
SignaturePad,
|
|
11559
11580
|
TYPE_SAMPLE,
|
|
11560
11581
|
Swatch,
|
|
11582
|
+
colorPairGround,
|
|
11561
11583
|
colorPairContrast,
|
|
11562
11584
|
ContrastMark,
|
|
11563
11585
|
ColorWell,
|
|
@@ -11708,4 +11730,4 @@ export {
|
|
|
11708
11730
|
RecordNameText,
|
|
11709
11731
|
HeldChangeDecision
|
|
11710
11732
|
};
|
|
11711
|
-
//# sourceMappingURL=chunk-
|
|
11733
|
+
//# sourceMappingURL=chunk-QVTYE4XU.js.map
|