@ai-matrx/records-ui 0.116.15 → 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/{chunk-E5HKO5LT.js → chunk-QVTYE4XU.js} +26 -15
- package/dist/chunk-QVTYE4XU.js.map +1 -0
- package/dist/{chunk-6WDNTT2G.js → chunk-WETGQ7P3.js} +66 -10
- package/dist/chunk-WETGQ7P3.js.map +1 -0
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +1 -1
- package/dist/helpers.d.ts +1 -1
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +2824 -2683
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -9
- package/dist/index.d.ts +31 -9
- package/dist/index.js +2521 -2420
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +21 -11
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +1 -1
- 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 +4 -4
- package/dist/chunk-6WDNTT2G.js.map +0 -1
- package/dist/chunk-E5HKO5LT.js.map +0 -1
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,
|
|
@@ -451,8 +451,15 @@ function numberOf(value) {
|
|
|
451
451
|
function Swatch({ color, className }) {
|
|
452
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 } });
|
|
453
453
|
}
|
|
454
|
-
function
|
|
455
|
-
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);
|
|
456
463
|
if (!ground) return {};
|
|
457
464
|
const out = {};
|
|
458
465
|
if (ground.light) {
|
|
@@ -587,11 +594,11 @@ function ColorPairPreview({ value }) {
|
|
|
587
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" }) })
|
|
588
595
|
] });
|
|
589
596
|
}
|
|
590
|
-
function colorPairChecks(value, format) {
|
|
597
|
+
function colorPairChecks(value, format, context) {
|
|
591
598
|
const pair = readColorPair(value);
|
|
592
599
|
if (!pair) return [];
|
|
593
|
-
const contrast = colorPairContrast(pair, format);
|
|
594
|
-
const ground = format
|
|
600
|
+
const contrast = colorPairContrast(pair, format, context);
|
|
601
|
+
const ground = colorPairGround(format, context)?.label ?? "its background";
|
|
595
602
|
const out = [];
|
|
596
603
|
for (const part of ["light", "dark"]) {
|
|
597
604
|
const ratio = contrast[part];
|
|
@@ -842,10 +849,10 @@ function fieldLookFor(formatId) {
|
|
|
842
849
|
function fieldLookIds() {
|
|
843
850
|
return [...LOOKS.keys()];
|
|
844
851
|
}
|
|
845
|
-
function lookChecks(value, format) {
|
|
852
|
+
function lookChecks(value, format, context) {
|
|
846
853
|
if (!format) return [];
|
|
847
854
|
const look = LOOKS.get(format.id);
|
|
848
|
-
return look?.checks ? look.checks(value, format) : [];
|
|
855
|
+
return look?.checks ? look.checks(value, format, context) : [];
|
|
849
856
|
}
|
|
850
857
|
function registeredLook(format) {
|
|
851
858
|
return format && LOOKS.has(format.id) ? format : void 0;
|
|
@@ -3308,7 +3315,7 @@ function linkChipText(raw) {
|
|
|
3308
3315
|
|
|
3309
3316
|
// src/LinkPreviewCard.tsx
|
|
3310
3317
|
import { useEffect as useEffect8, useRef as useRef8, useState as useState13 } from "react";
|
|
3311
|
-
import { HoverCard, HoverCardContent, HoverCardTrigger } from "@ai-matrx/design-system";
|
|
3318
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger, SiteIcon } from "@ai-matrx/design-system";
|
|
3312
3319
|
import { Fragment as Fragment8, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3313
3320
|
var answers = /* @__PURE__ */ new Map();
|
|
3314
3321
|
function LinkPreviewCard({ url, children }) {
|
|
@@ -3345,10 +3352,7 @@ function LinkPreviewCard({ url, children }) {
|
|
|
3345
3352
|
/* @__PURE__ */ jsx18("img", { src: shown2.imageUrl, alt: "", className: "h-28 w-full rounded object-cover", referrerPolicy: "no-referrer" })
|
|
3346
3353
|
) : null,
|
|
3347
3354
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1.5", children: [
|
|
3348
|
-
shown2.faviconUrl
|
|
3349
|
-
// eslint-disable-next-line @next/next/no-img-element
|
|
3350
|
-
/* @__PURE__ */ jsx18("img", { src: shown2.faviconUrl, alt: "", className: "h-3.5 w-3.5 shrink-0", referrerPolicy: "no-referrer" })
|
|
3351
|
-
) : null,
|
|
3355
|
+
/* @__PURE__ */ jsx18(SiteIcon, { site: url, iconUrl: shown2.faviconUrl, className: "h-3.5 w-3.5" }),
|
|
3352
3356
|
/* @__PURE__ */ jsx18("span", { className: "truncate text-muted-foreground", children: shown2.siteName ?? "" })
|
|
3353
3357
|
] }),
|
|
3354
3358
|
shown2.title ? /* @__PURE__ */ jsx18("div", { className: "line-clamp-2 font-medium", children: shown2.title }) : null,
|
|
@@ -9051,7 +9055,7 @@ function waitingRunsOf(pressed) {
|
|
|
9051
9055
|
return out;
|
|
9052
9056
|
}
|
|
9053
9057
|
var stop2 = (event) => event.stopPropagation();
|
|
9054
|
-
function ButtonValue({ field: field2, recordId, inCell }) {
|
|
9058
|
+
function ButtonValue({ field: field2, recordId, inCell, beforeSave }) {
|
|
9055
9059
|
const client = useOptionalRecordsClient11();
|
|
9056
9060
|
const b = buttonOf2(field2);
|
|
9057
9061
|
const [busy, setBusy] = useState26(false);
|
|
@@ -9065,6 +9069,12 @@ function ButtonValue({ field: field2, recordId, inCell }) {
|
|
|
9065
9069
|
useEffect18(() => () => void (waitingOn.current += 1), []);
|
|
9066
9070
|
if (!b) return null;
|
|
9067
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
|
+
}
|
|
9068
9078
|
const needs = buttonNeeds2(b);
|
|
9069
9079
|
const tableId = field2.entity_definition_id;
|
|
9070
9080
|
const press = async () => {
|
|
@@ -9841,7 +9851,7 @@ function FieldControl({ field: field2, value, onChange, disabled, id, autoOpen,
|
|
|
9841
9851
|
const ownDetails = useOptionalRecordsClient12() === null;
|
|
9842
9852
|
if (isTypedDraft(value)) return /* @__PURE__ */ jsx40(TypedTextControl, { field: field2, value, onChange, disabled, id: inputId, onCommit, onCancel });
|
|
9843
9853
|
if (isSignatureField(field2)) return /* @__PURE__ */ jsx40(SignaturePad, { id: inputId, value, onChange, disabled });
|
|
9844
|
-
if (isButtonField2(field2)) return /* @__PURE__ */ jsx40(ButtonValue, { field: field2 });
|
|
9854
|
+
if (isButtonField2(field2)) return /* @__PURE__ */ jsx40(ButtonValue, { field: field2, recordId: recordId ?? null, beforeSave: !recordId });
|
|
9845
9855
|
const newerControl = newerKindControl({ field: field2, value, onChange, disabled, id: inputId });
|
|
9846
9856
|
if (newerControl !== void 0) return newerControl;
|
|
9847
9857
|
const format = formatForField(field2);
|
|
@@ -11569,6 +11579,7 @@ export {
|
|
|
11569
11579
|
SignaturePad,
|
|
11570
11580
|
TYPE_SAMPLE,
|
|
11571
11581
|
Swatch,
|
|
11582
|
+
colorPairGround,
|
|
11572
11583
|
colorPairContrast,
|
|
11573
11584
|
ContrastMark,
|
|
11574
11585
|
ColorWell,
|
|
@@ -11719,4 +11730,4 @@ export {
|
|
|
11719
11730
|
RecordNameText,
|
|
11720
11731
|
HeldChangeDecision
|
|
11721
11732
|
};
|
|
11722
|
-
//# sourceMappingURL=chunk-
|
|
11733
|
+
//# sourceMappingURL=chunk-QVTYE4XU.js.map
|