@ai-matrx/records-ui 0.116.79 → 0.116.81
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 +5 -4
- package/dist/{chunk-5ICDUZS7.js → chunk-5DELD6DC.js} +18 -5
- package/dist/{chunk-5ICDUZS7.js.map → chunk-5DELD6DC.js.map} +1 -1
- package/dist/entity-doors.cjs +164 -0
- package/dist/entity-doors.cjs.map +1 -0
- package/dist/entity-doors.d.cts +289 -0
- package/dist/entity-doors.d.ts +289 -0
- package/dist/entity-doors.js +154 -0
- package/dist/entity-doors.js.map +1 -0
- package/dist/entity-ref.cjs +795 -0
- package/dist/entity-ref.cjs.map +1 -0
- package/dist/entity-ref.d.cts +709 -0
- package/dist/entity-ref.d.ts +709 -0
- package/dist/entity-ref.js +764 -0
- package/dist/entity-ref.js.map +1 -0
- package/dist/index.cjs +18 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +16 -3
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +1 -1
- package/package.json +24 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
-
## 0.116.
|
|
3
|
+
## 0.116.81
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
- **The grid's hover peek opens below its row, not beside it (live walk, 2026-10-22).** A row spans the whole grid, so the side placement had no room and the card landed partly off the screen's edge; it now opens below (above near the bottom) and slides sideways to stay on screen. Guard: `a-hovered-grid-row-shows-the-one-peek.test.tsx`. Consumer action: none.
|
|
6
|
+
|
|
7
|
+
- **References to other records live here: `@ai-matrx/records-ui/entity-ref` and `/entity-doors` (lane RU, 2026-10-22).** `EntityRef`, `EntityDoorControls`, `TextWithDoors`, `toastDoor`, `NewTabLink`, `useEntityHref` and `RecordStamps` moved in from matrx-frontend `components/official/{entity-ref,record-stamps}`. Everything the app knows arrives through ONE host bound once with `configureEntityRefs({ registry, adminHref, hasPeek, openPeek, useAddress, Link, ErrorMenu, Person })` (a `globalThis` slot: references are drawn far outside `<RecordsUiProvider>`). Unbound, a reference draws its name with no door, carries `data-entity-ref-host="unconfigured"` and warns once. `/entity-doors` is the light, banner-free half (`isUuidValue`, `doorTokenFromColumnName` — renamed from `tokenFromColumnName`, which collided with design-system's looser helper —, `hasAnyDoor`, `resolveEntityDoors`, `segmentSentenceIds`, `tokenFromPrecedingWords`, `configureEntityRefs`). Guard: `src/entity-ref/entity-ref.test.tsx`. Consumer action: call `configureEntityRefs` once before the first render.
|
|
7
8
|
|
|
8
9
|
## 0.116.78
|
|
9
10
|
|
|
@@ -15,7 +16,7 @@ Check the package's gitHead on npm against this version's gitHead: `git diff <pr
|
|
|
15
16
|
- **`ObjectActionGlyph` draws through `@ai-matrx/design-system/icons`.** The 34 inline path tables in `objectActionIcons.tsx` are replaced by a name-to-glyph map; the `data-object-action-icon` attribute and the exported name are unchanged, and each svg now also carries its `lucide-<name>` class. Consumer action: none.
|
|
16
17
|
- **A link can point at several tables, and a picker's search asks the store (lane CLOSE-LINK, 2026-10-22).** `RelationPicker` reads `config.target_mode` "several" / `config.target_tables` (new export `linkTargetsOf(field)`): it offers the records of every table the link points at, each told apart by its table's name, and a refusal from any one of them is said under the list. A typed search is also asked of each target table's own search (`listPage`'s `search`, debounced while the list is open), so a record beyond the first 200 is found by part of its name. `FieldEditor` gains "Also points at" (new `AlsoPointsAt`, reads the tables only when drawn) on an existing link column, sending `target_tables` only when the list changed. Guards: `a-link-to-several-tables-offers-each-and-a-search-asks-the-store.test.tsx` (red on the old picker), `FieldEditor.test.tsx` "a link can also point at other tables". Store: matrx-frontend migration `closelink_g`. Consumer action: none. Needs `@ai-matrx/records` with `FieldPatch.target_tables`.
|
|
17
18
|
|
|
18
|
-
- **A URL's hover preview is the one Peek.** `LinkPreviewCard` draws the page's preview as `<Peek>` inside `PeekHoverCard` (title, site as subtitle, favicon as avatar, image on top, description, the address as the record's page, Copy hands Alchemy url/title/description/site) instead of a hand-built hover card. Kept: asked once per address through the host's `linkPreview` port, no port or nothing to show is the chip alone, hover-only on phones. Hover timing is now the design system's standard hover-card delay. Consumer action: none.
|
|
19
|
+
- **A URL's hover preview is the one Peek.** `LinkPreviewCard` draws the page's preview as `<Peek>` inside `PeekHoverCard` (title, site as subtitle, favicon as avatar, image on top, description, the address as the record's page, Copy hands Alchemy url/title/description/site) instead of a hand-built hover card. Kept: asked once per address through the host's `linkPreview` port, no port or nothing to show is the chip alone, hover-only on phones. Hover timing is now the design system's standard hover-card delay. The site icon keeps the SiteIcon fallback chain (the page's favicon, else Google's, else DuckDuckGo's, each probed by loading) through `resolveSiteIcon`. Needs `@ai-matrx/design-system` with `resolveSiteIcon`. Consumer action: none.
|
|
19
20
|
|
|
20
21
|
## 0.116.77
|
|
21
22
|
|
|
@@ -3664,7 +3664,7 @@ import { OutboundLink as OutboundLink3 } from "@ai-matrx/kit/outbound-react";
|
|
|
3664
3664
|
|
|
3665
3665
|
// src/LinkPreviewCard.tsx
|
|
3666
3666
|
import { useEffect as useEffect10, useMemo as useMemo8, useState as useState15 } from "react";
|
|
3667
|
-
import { Peek, PeekHoverCard } from "@ai-matrx/design-system";
|
|
3667
|
+
import { Peek, PeekHoverCard, resolveSiteIcon } from "@ai-matrx/design-system";
|
|
3668
3668
|
import { Fragment as Fragment9, jsx as jsx19 } from "react/jsx-runtime";
|
|
3669
3669
|
var answers = /* @__PURE__ */ new Map();
|
|
3670
3670
|
function hostOf(url) {
|
|
@@ -3674,7 +3674,7 @@ function hostOf(url) {
|
|
|
3674
3674
|
return url;
|
|
3675
3675
|
}
|
|
3676
3676
|
}
|
|
3677
|
-
function linkPreviewRecord(url, shown2) {
|
|
3677
|
+
function linkPreviewRecord(url, shown2, icon = shown2.faviconUrl) {
|
|
3678
3678
|
const site = shown2.siteName?.trim() || hostOf(url);
|
|
3679
3679
|
const title = shown2.title?.trim() || site;
|
|
3680
3680
|
return {
|
|
@@ -3683,7 +3683,7 @@ function linkPreviewRecord(url, shown2) {
|
|
|
3683
3683
|
showId: false,
|
|
3684
3684
|
title,
|
|
3685
3685
|
...shown2.siteName || shown2.title ? { subtitle: site } : {},
|
|
3686
|
-
avatar: { initials: site.slice(0, 1).toUpperCase(), ...
|
|
3686
|
+
avatar: { initials: site.slice(0, 1).toUpperCase(), ...icon ? { src: icon } : {} },
|
|
3687
3687
|
...shown2.imageUrl ? { media: { alt: title, src: shown2.imageUrl, aspect: "16:9" } } : {},
|
|
3688
3688
|
...shown2.description ? { body: [{ section: "Description", text: shown2.description, clamp: 3 }] } : {},
|
|
3689
3689
|
href: url,
|
|
@@ -3695,7 +3695,20 @@ function LinkPreviewCard({ url, children }) {
|
|
|
3695
3695
|
const [preview, setPreview] = useState15(void 0);
|
|
3696
3696
|
const [open, setOpen] = useState15(false);
|
|
3697
3697
|
const shown2 = preview && (preview.title || preview.description || preview.imageUrl) ? preview : null;
|
|
3698
|
-
const
|
|
3698
|
+
const [icon, setIcon] = useState15(null);
|
|
3699
|
+
const iconKey = `${url}|${shown2?.faviconUrl ?? ""}`;
|
|
3700
|
+
useEffect10(() => {
|
|
3701
|
+
if (!shown2) return;
|
|
3702
|
+
let live = true;
|
|
3703
|
+
void resolveSiteIcon(url, shown2.faviconUrl).then((src) => live && setIcon({ key: iconKey, src }));
|
|
3704
|
+
return () => {
|
|
3705
|
+
live = false;
|
|
3706
|
+
};
|
|
3707
|
+
}, [shown2, url, iconKey]);
|
|
3708
|
+
const record = useMemo8(
|
|
3709
|
+
() => shown2 ? linkPreviewRecord(url, shown2, icon?.key === iconKey ? icon.src : shown2.faviconUrl) : null,
|
|
3710
|
+
[url, shown2, icon, iconKey]
|
|
3711
|
+
);
|
|
3699
3712
|
useEffect10(() => setPreview(void 0), [url]);
|
|
3700
3713
|
if (!port) return /* @__PURE__ */ jsx19(Fragment9, { children });
|
|
3701
3714
|
const ask = () => {
|
|
@@ -14408,4 +14421,4 @@ export {
|
|
|
14408
14421
|
RecordNameText,
|
|
14409
14422
|
HeldChangeDecision
|
|
14410
14423
|
};
|
|
14411
|
-
//# sourceMappingURL=chunk-
|
|
14424
|
+
//# sourceMappingURL=chunk-5DELD6DC.js.map
|