@cloudgrid-io/ui 0.23.0 → 0.25.0
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/dist/blocks/avatar.d.ts +92 -0
- package/dist/blocks/avatar.d.ts.map +1 -0
- package/dist/blocks/avatar.js +107 -0
- package/dist/blocks/avatar.js.map +1 -0
- package/dist/blocks/entity-card.d.ts +50 -4
- package/dist/blocks/entity-card.d.ts.map +1 -1
- package/dist/blocks/entity-card.js +55 -7
- package/dist/blocks/entity-card.js.map +1 -1
- package/dist/blocks/feed-post.d.ts +98 -0
- package/dist/blocks/feed-post.d.ts.map +1 -0
- package/dist/blocks/feed-post.js +88 -0
- package/dist/blocks/feed-post.js.map +1 -0
- package/dist/blocks/icons.d.ts +78 -18
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +78 -18
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/phosphor-marks.d.ts +12 -8
- package/dist/blocks/phosphor-marks.d.ts.map +1 -1
- package/dist/blocks/phosphor-marks.js +18 -12
- package/dist/blocks/phosphor-marks.js.map +1 -1
- package/dist/fonts.css +17 -10
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/prose.css +7 -2
- package/dist/theme.css +9 -0
- package/dist/tokens/base.json +49 -21
- package/dist/tokens/surface-panel.json +4 -2
- package/dist/tokens.css +165 -31
- package/dist/tokens.json +12 -10
- package/package.json +1 -2
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A person, as a mark: their picture if there is one, their initials on a
|
|
3
|
+
* derived ground if there is not.
|
|
4
|
+
*
|
|
5
|
+
* The library had no avatar at all until #203, which is the gap under the gap
|
|
6
|
+
* that issue found: `EntityCard` has taken a `creator.avatar` NODE since #176
|
|
7
|
+
* and the console has been feeding it a local component
|
|
8
|
+
* (`components/ui/Avatar.tsx`), so the only definition of what a CloudGrid
|
|
9
|
+
* person looks like lived downstream of the library that owns the look.
|
|
10
|
+
*
|
|
11
|
+
* ## The hue is the entity tile's hue, deliberately
|
|
12
|
+
*
|
|
13
|
+
* `EntityIdentity` already answers "what does a thing with no picture look
|
|
14
|
+
* like", through FNV-1a into an eight-entry look table. This uses THAT table
|
|
15
|
+
* and THAT hash rather than a second one, so a person and the entities around
|
|
16
|
+
* them read as one identity system instead of two schemes that happen to sit on
|
|
17
|
+
* the same row. Adding a hue is still one line in `ENTITY_IDENTITY_LOOKS`, and
|
|
18
|
+
* both marks move together when it happens.
|
|
19
|
+
*
|
|
20
|
+
* The ground is the look's `tile` mix — the deeper of its two shades, the one
|
|
21
|
+
* the identity tile puts its monogram on — because that is the value whose
|
|
22
|
+
* contrast against `--cg-text-on-primary` is measured (purple 7.99:1, lime
|
|
23
|
+
* 5.08:1, cyan 4.93:1, ink 15.9:1). The `field` tint is a background for a
|
|
24
|
+
* 1200x630 card and is far too pale to carry two letters at 18px.
|
|
25
|
+
*
|
|
26
|
+
* ## Why the console's ramps did not come across
|
|
27
|
+
*
|
|
28
|
+
* That component carries eight hardcoded hexes, four for people and four for
|
|
29
|
+
* grids, each with its contrast measured by hand. Every one of them is rejected
|
|
30
|
+
* by this repo's literals gate: `scripts/check-literals.mjs` allows zero colour
|
|
31
|
+
* literals under `packages/ui/src/blocks`, on the rule that a hex looks right on
|
|
32
|
+
* white and is the one wrong thing on a purple panel. `color-mix` against the
|
|
33
|
+
* brand's own four hues is the token-only way to get a generative ramp, and it
|
|
34
|
+
* is what the identity tile already does.
|
|
35
|
+
*
|
|
36
|
+
* The console's `kind: 'person' | 'grid'` axis is NOT reproduced here. It exists
|
|
37
|
+
* because that app puts a person and a grid at the same size and shape in the
|
|
38
|
+
* same chrome and needs the hue to be the only thing telling them apart. This
|
|
39
|
+
* block does not know what a grid is; a caller who needs two families passes two
|
|
40
|
+
* different `seed` prefixes and gets two stable, different looks.
|
|
41
|
+
*
|
|
42
|
+
* ## A broken image falls back with no JavaScript
|
|
43
|
+
*
|
|
44
|
+
* The initials are always rendered. An image, when there is one, is painted OVER
|
|
45
|
+
* them. So a 404, a dead signed URL or a blocked third-party host paints nothing
|
|
46
|
+
* and the tile underneath simply shows through — the same arrangement
|
|
47
|
+
* `EntityCard` uses for `previewUrl`, and for the same reason: an `onError`
|
|
48
|
+
* swap would make this a client component to solve a problem the layering
|
|
49
|
+
* already solves.
|
|
50
|
+
*
|
|
51
|
+
* ## `alt` is what makes an avatar speak
|
|
52
|
+
*
|
|
53
|
+
* By default the whole mark is `aria-hidden`. That is not an oversight: in every
|
|
54
|
+
* place this renders — a card's creator line, a feed post's byline, a member
|
|
55
|
+
* list — the person's NAME is written immediately beside it, and an avatar that
|
|
56
|
+
* announced the name too would read every byline twice.
|
|
57
|
+
*
|
|
58
|
+
* Passing `alt` opts into an accessible name, for the case where the mark stands
|
|
59
|
+
* alone with no name in the markup.
|
|
60
|
+
*/
|
|
61
|
+
/** 18, 24, 38. The three diameters the card, the feed and a header need. */
|
|
62
|
+
export declare const AVATAR_SIZES: {
|
|
63
|
+
readonly s: 18;
|
|
64
|
+
readonly m: 24;
|
|
65
|
+
readonly l: 38;
|
|
66
|
+
};
|
|
67
|
+
export type AvatarSize = keyof typeof AVATAR_SIZES;
|
|
68
|
+
declare function Avatar({ name, seed, src, alt, size, monogram, className, style, ...props }: Omit<React.ComponentProps<"span">, "children"> & {
|
|
69
|
+
/** Whose mark this is. Read for the initials, and for the hue unless `seed` is given. */
|
|
70
|
+
name: string;
|
|
71
|
+
/**
|
|
72
|
+
* What the hue is derived from. Defaults to `name`.
|
|
73
|
+
*
|
|
74
|
+
* Pass a stable id where there is one. A person who changes their display name
|
|
75
|
+
* keeps their colour, which is the whole reason the identity tile asks for an
|
|
76
|
+
* id rather than a title.
|
|
77
|
+
*/
|
|
78
|
+
seed?: string;
|
|
79
|
+
/** A real picture, painted over the initials. A miss falls back to them. */
|
|
80
|
+
src?: string;
|
|
81
|
+
/**
|
|
82
|
+
* The accessible name. Omitted — the default — the mark is `aria-hidden`,
|
|
83
|
+
* because the name it stands for is written beside it.
|
|
84
|
+
*/
|
|
85
|
+
alt?: string;
|
|
86
|
+
/** 18, 24 or 38 across. */
|
|
87
|
+
size?: AvatarSize;
|
|
88
|
+
/** Overrides the derived initials, for a name they read badly from. */
|
|
89
|
+
monogram?: string;
|
|
90
|
+
}): import("react").JSX.Element;
|
|
91
|
+
export { Avatar };
|
|
92
|
+
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/blocks/avatar.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,YAAY;;;;CAIf,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,YAAY,CAAA;AAelD,iBAAS,MAAM,CAAC,EACd,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,GAAG,EACH,IAAU,EACV,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAClD,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2BAA2B;IAC3B,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,+BAqDA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
3
|
+
import { entityIdentityLook, entityMonogram } from "./entity-identity.js";
|
|
4
|
+
/**
|
|
5
|
+
* A person, as a mark: their picture if there is one, their initials on a
|
|
6
|
+
* derived ground if there is not.
|
|
7
|
+
*
|
|
8
|
+
* The library had no avatar at all until #203, which is the gap under the gap
|
|
9
|
+
* that issue found: `EntityCard` has taken a `creator.avatar` NODE since #176
|
|
10
|
+
* and the console has been feeding it a local component
|
|
11
|
+
* (`components/ui/Avatar.tsx`), so the only definition of what a CloudGrid
|
|
12
|
+
* person looks like lived downstream of the library that owns the look.
|
|
13
|
+
*
|
|
14
|
+
* ## The hue is the entity tile's hue, deliberately
|
|
15
|
+
*
|
|
16
|
+
* `EntityIdentity` already answers "what does a thing with no picture look
|
|
17
|
+
* like", through FNV-1a into an eight-entry look table. This uses THAT table
|
|
18
|
+
* and THAT hash rather than a second one, so a person and the entities around
|
|
19
|
+
* them read as one identity system instead of two schemes that happen to sit on
|
|
20
|
+
* the same row. Adding a hue is still one line in `ENTITY_IDENTITY_LOOKS`, and
|
|
21
|
+
* both marks move together when it happens.
|
|
22
|
+
*
|
|
23
|
+
* The ground is the look's `tile` mix — the deeper of its two shades, the one
|
|
24
|
+
* the identity tile puts its monogram on — because that is the value whose
|
|
25
|
+
* contrast against `--cg-text-on-primary` is measured (purple 7.99:1, lime
|
|
26
|
+
* 5.08:1, cyan 4.93:1, ink 15.9:1). The `field` tint is a background for a
|
|
27
|
+
* 1200x630 card and is far too pale to carry two letters at 18px.
|
|
28
|
+
*
|
|
29
|
+
* ## Why the console's ramps did not come across
|
|
30
|
+
*
|
|
31
|
+
* That component carries eight hardcoded hexes, four for people and four for
|
|
32
|
+
* grids, each with its contrast measured by hand. Every one of them is rejected
|
|
33
|
+
* by this repo's literals gate: `scripts/check-literals.mjs` allows zero colour
|
|
34
|
+
* literals under `packages/ui/src/blocks`, on the rule that a hex looks right on
|
|
35
|
+
* white and is the one wrong thing on a purple panel. `color-mix` against the
|
|
36
|
+
* brand's own four hues is the token-only way to get a generative ramp, and it
|
|
37
|
+
* is what the identity tile already does.
|
|
38
|
+
*
|
|
39
|
+
* The console's `kind: 'person' | 'grid'` axis is NOT reproduced here. It exists
|
|
40
|
+
* because that app puts a person and a grid at the same size and shape in the
|
|
41
|
+
* same chrome and needs the hue to be the only thing telling them apart. This
|
|
42
|
+
* block does not know what a grid is; a caller who needs two families passes two
|
|
43
|
+
* different `seed` prefixes and gets two stable, different looks.
|
|
44
|
+
*
|
|
45
|
+
* ## A broken image falls back with no JavaScript
|
|
46
|
+
*
|
|
47
|
+
* The initials are always rendered. An image, when there is one, is painted OVER
|
|
48
|
+
* them. So a 404, a dead signed URL or a blocked third-party host paints nothing
|
|
49
|
+
* and the tile underneath simply shows through — the same arrangement
|
|
50
|
+
* `EntityCard` uses for `previewUrl`, and for the same reason: an `onError`
|
|
51
|
+
* swap would make this a client component to solve a problem the layering
|
|
52
|
+
* already solves.
|
|
53
|
+
*
|
|
54
|
+
* ## `alt` is what makes an avatar speak
|
|
55
|
+
*
|
|
56
|
+
* By default the whole mark is `aria-hidden`. That is not an oversight: in every
|
|
57
|
+
* place this renders — a card's creator line, a feed post's byline, a member
|
|
58
|
+
* list — the person's NAME is written immediately beside it, and an avatar that
|
|
59
|
+
* announced the name too would read every byline twice.
|
|
60
|
+
*
|
|
61
|
+
* Passing `alt` opts into an accessible name, for the case where the mark stands
|
|
62
|
+
* alone with no name in the markup.
|
|
63
|
+
*/
|
|
64
|
+
/** 18, 24, 38. The three diameters the card, the feed and a header need. */
|
|
65
|
+
export const AVATAR_SIZES = {
|
|
66
|
+
s: 18,
|
|
67
|
+
m: 24,
|
|
68
|
+
l: 38,
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* The monogram's size as a fraction of the diameter, rather than a rung of the
|
|
72
|
+
* type ramp.
|
|
73
|
+
*
|
|
74
|
+
* The ramp bottoms out at `--cg-caption`, 13px, which overflows an 18px circle
|
|
75
|
+
* carrying two letters. More to the point, this is a mark inside a fixed
|
|
76
|
+
* diameter and not running text: pinning it to the body ramp would mean a
|
|
77
|
+
* future type change breaks the circle rather than resizing the words. One
|
|
78
|
+
* ratio also means a fourth diameter is one row in the table above and nothing
|
|
79
|
+
* else. 0.44 puts m at 10.6px, which is where the console's own 24px avatar sat.
|
|
80
|
+
*/
|
|
81
|
+
const MONOGRAM_RATIO = 0.44;
|
|
82
|
+
function Avatar({ name, seed, src, alt, size = "m", monogram, className, style, ...props }) {
|
|
83
|
+
const box = AVATAR_SIZES[size];
|
|
84
|
+
const look = entityIdentityLook(seed ?? name);
|
|
85
|
+
const letters = monogram ?? entityMonogram(name);
|
|
86
|
+
// One rule, resolved once, so the three elements below cannot disagree about
|
|
87
|
+
// whether this mark is announced. See the docblock: silent by default.
|
|
88
|
+
const spoken = alt !== undefined;
|
|
89
|
+
return (_jsxs("span", { "data-slot": "avatar", "data-size": size, "data-look": look.name, ...(spoken ? { role: "img", "aria-label": alt } : { "aria-hidden": true }), className: cn("relative isolate inline-flex shrink-0 select-none items-center justify-center overflow-hidden rounded-pill font-medium", className), style: {
|
|
90
|
+
width: box,
|
|
91
|
+
height: box,
|
|
92
|
+
fontSize: Math.round(box * MONOGRAM_RATIO * 10) / 10,
|
|
93
|
+
lineHeight: 1,
|
|
94
|
+
// The identity tile's measured shade, and mixed toward --cg-ink the same
|
|
95
|
+
// way. Not mixed against --cg-surface-card: that token is `transparent`
|
|
96
|
+
// inside a purple panel, and mixing a hue into transparent gives a
|
|
97
|
+
// half-transparent hue rather than a shade.
|
|
98
|
+
background: `color-mix(in srgb, var(${look.hue}) ${look.tile}, var(--cg-ink))`,
|
|
99
|
+
color: "var(--cg-text-on-primary)",
|
|
100
|
+
...style,
|
|
101
|
+
}, ...props, children: [_jsx("span", { "data-slot": "avatar-initials", "aria-hidden": "true", children: letters }), src ? (
|
|
102
|
+
// Over the initials, never instead of them. `alt=""` when the mark is
|
|
103
|
+
// silent, so a decorative avatar does not announce a filename.
|
|
104
|
+
_jsx("img", { "data-slot": "avatar-image", src: src, alt: spoken ? alt : "", className: "absolute inset-0 size-full object-cover" })) : null] }));
|
|
105
|
+
}
|
|
106
|
+
export { Avatar };
|
|
107
|
+
//# sourceMappingURL=avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/blocks/avatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;CACG,CAAA;AAIV;;;;;;;;;;GAUG;AACH,MAAM,cAAc,GAAG,IAAI,CAAA;AAE3B,SAAS,MAAM,CAAC,EACd,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,GAAG,EACH,IAAI,GAAG,GAAG,EACV,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EAuBT;IACC,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;IAC9B,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,IAAI,IAAI,CAAC,CAAA;IAC7C,MAAM,OAAO,GAAG,QAAQ,IAAI,cAAc,CAAC,IAAI,CAAC,CAAA;IAEhD,6EAA6E;IAC7E,uEAAuE;IACvE,MAAM,MAAM,GAAG,GAAG,KAAK,SAAS,CAAA;IAEhC,OAAO,CACL,6BACY,QAAQ,eAKP,IAAI,eACJ,IAAI,CAAC,IAAI,KAChB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAC3E,SAAS,EAAE,EAAE,CACX,wHAAwH,EACxH,SAAS,CACV,EACD,KAAK,EAAE;YACL,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;YACX,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,cAAc,GAAG,EAAE,CAAC,GAAG,EAAE;YACpD,UAAU,EAAE,CAAC;YACb,yEAAyE;YACzE,wEAAwE;YACxE,mEAAmE;YACnE,4CAA4C;YAC5C,UAAU,EAAE,0BAA0B,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,IAAI,kBAAkB;YAC9E,KAAK,EAAE,2BAA2B;YAClC,GAAG,KAAK;SACT,KACG,KAAK,aAET,4BAAgB,iBAAiB,iBAAa,MAAM,YACjD,OAAO,GACH,EACN,GAAG,CAAC,CAAC,CAAC;YACL,sEAAsE;YACtE,+DAA+D;YAC/D,2BACY,cAAc,EACxB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EACtB,SAAS,EAAC,yCAAyC,GACnD,CACH,CAAC,CAAC,CAAC,IAAI,IACH,CACR,CAAA;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -83,6 +83,12 @@ import * as React from "react";
|
|
|
83
83
|
* `minimal` below is where that is decided, and it is tied to whether a panel
|
|
84
84
|
* exists — so a card that cannot open keeps every field it ever had.
|
|
85
85
|
*
|
|
86
|
+
* What that ruling left owing, and #203 pays: three facts went off the rest
|
|
87
|
+
* state with nowhere to go — where the entity lives, that it was migrated, when
|
|
88
|
+
* it was last touched. The founder's follow-up ruling (2026-09-10) puts them in
|
|
89
|
+
* the panel, through `panelMeta`, as one small line under the creator. The slot
|
|
90
|
+
* is generic and this card names none of the three; see the prop.
|
|
91
|
+
*
|
|
86
92
|
* ## Two tiers of preview, and neither can fail dark
|
|
87
93
|
*
|
|
88
94
|
* `seed` turns the preview region on. With `seed` alone the card shows the
|
|
@@ -154,13 +160,29 @@ import * as React from "react";
|
|
|
154
160
|
* "look inside", and a gear promises "change how this is configured". Those are
|
|
155
161
|
* different pages and a reader who takes one for the other has been misled by
|
|
156
162
|
* the icon rather than by the label. The mark is `EntityDashboardIcon`
|
|
157
|
-
* (Phosphor `
|
|
163
|
+
* (Phosphor `engine` since #200, `gauge` before it — a dial reads as a speed,
|
|
164
|
+
* not as machinery); `SettingsIcon` is still exported for the surfaces that
|
|
158
165
|
* really are settings.
|
|
159
166
|
*
|
|
160
167
|
* The prop is `dashboardHref`. `settingsHref` is kept as a deprecated alias for
|
|
161
168
|
* this minor and maps straight to it, so no caller breaks on the rename — see
|
|
162
169
|
* the note on the prop.
|
|
163
170
|
*
|
|
171
|
+
* **Open opens a new tab; Dashboard does not.** Founder ruling 2026-09-10
|
|
172
|
+
* (#200), and it is a default in the library rather than a prop, because the two
|
|
173
|
+
* actions go to two different KINDS of place: Open leaves for the live entity,
|
|
174
|
+
* which is a tenant's own application, and Dashboard goes further into the
|
|
175
|
+
* console the reader is already standing in. Navigating a working surface away
|
|
176
|
+
* to look at one card costs the list, the filters and the scroll position that
|
|
177
|
+
* got someone there, and a back button restores none of that in a virtual grid.
|
|
178
|
+
*
|
|
179
|
+
* So Open carries `target="_blank" rel="noopener noreferrer"` at every size, and
|
|
180
|
+
* the `rel` is load-bearing rather than boilerplate: without `noopener` the
|
|
181
|
+
* tenant's app holds a live handle back into the console's window, and without
|
|
182
|
+
* `noreferrer` the console URL — grid and entity in the path — is sent to it as
|
|
183
|
+
* a Referer. The disabled, href-less Open takes neither: there is no navigation
|
|
184
|
+
* to describe.
|
|
185
|
+
*
|
|
164
186
|
* ## The reveal never depends on data
|
|
165
187
|
*
|
|
166
188
|
* Founder direction, via #193 and cloudgrid-console#657: *a card whose entity
|
|
@@ -293,7 +315,7 @@ import * as React from "react";
|
|
|
293
315
|
*
|
|
294
316
|
* **In the panel they carry Dashboard's gating, and for #171's reason.** They
|
|
295
317
|
* are lifted above Open's stretched layer with `relative z-10` so a tap on the
|
|
296
|
-
*
|
|
318
|
+
* pin toggle reaches the toggle, and they are `pointer-events-none` until the
|
|
297
319
|
* panel is revealed — invisible at rest means inert at rest, or the card has a
|
|
298
320
|
* region that behaves differently from every pixel around it with nothing to
|
|
299
321
|
* see.
|
|
@@ -422,7 +444,7 @@ declare function EntityKindBadge({ kind, size, className, ...props }: Omit<React
|
|
|
422
444
|
kind: EntityKind;
|
|
423
445
|
size?: "sm" | "md";
|
|
424
446
|
}): React.JSX.Element;
|
|
425
|
-
declare function EntityCard({ title, slug, description, size, titleLines, descriptionLines, status, statusDot, headerActions, stats, seed, previewUrl, kind, reveal, openDisabledReason, dashboardHref, settingsHref, creator, href, ariaLabel, meta, footer, className, children, ...props }: Omit<React.ComponentProps<"div">, "ref" | "title"> & {
|
|
447
|
+
declare function EntityCard({ title, slug, description, size, titleLines, descriptionLines, status, statusDot, headerActions, stats, seed, previewUrl, kind, reveal, openDisabledReason, dashboardHref, settingsHref, creator, panelMeta, href, ariaLabel, meta, footer, className, children, ...props }: Omit<React.ComponentProps<"div">, "ref" | "title"> & {
|
|
426
448
|
title: string;
|
|
427
449
|
/** The entity's address, in the mono utility face. */
|
|
428
450
|
slug?: string;
|
|
@@ -465,7 +487,12 @@ declare function EntityCard({ title, slug, description, size, titleLines, descri
|
|
|
465
487
|
*/
|
|
466
488
|
statusDot?: React.ReactNode;
|
|
467
489
|
/**
|
|
468
|
-
* The card's own controls — a
|
|
490
|
+
* The card's own controls — a pin toggle, an overflow menu.
|
|
491
|
+
*
|
|
492
|
+
* "Pin", not "save", since #200: the founder's ruling is that the gesture is
|
|
493
|
+
* pinning, and `SaveIcon` draws `push-pin` accordingly. The PROP name and the
|
|
494
|
+
* icon export names did not move, because renaming a prop breaks every caller
|
|
495
|
+
* for a word; the console's own labels are its sibling issue.
|
|
469
496
|
*
|
|
470
497
|
* They render **once**, and where depends on the form again: in the header row
|
|
471
498
|
* on a text card and on a row, and INSIDE the panel, at the end of the
|
|
@@ -550,6 +577,25 @@ declare function EntityCard({ title, slug, description, size, titleLines, descri
|
|
|
550
577
|
name: string;
|
|
551
578
|
avatar?: React.ReactNode;
|
|
552
579
|
};
|
|
580
|
+
/**
|
|
581
|
+
* The facts that used to sit on the card at rest, now that it has none: where
|
|
582
|
+
* the entity lives, that it was migrated, when it was last touched.
|
|
583
|
+
*
|
|
584
|
+
* The founder's ruling on #196, 2026-09-10. #196 stripped the rest state down
|
|
585
|
+
* to a picture, a name and a dot, which took three true things off the card
|
|
586
|
+
* with nowhere to put them; this is where they went. Rest stays minimal and
|
|
587
|
+
* the panel carries them, one hover away.
|
|
588
|
+
*
|
|
589
|
+
* The SLOT is generic and this card names none of those three. It renders one
|
|
590
|
+
* small muted line below the creator, and what goes in it is the console's —
|
|
591
|
+
* a residence line, a migration badge and a date are one caller's answer, and
|
|
592
|
+
* Pulse will have a different one.
|
|
593
|
+
*
|
|
594
|
+
* Rendered only where there is a panel to render it in, which by construction
|
|
595
|
+
* means every size except `row`: a row shows `status` and `meta` at rest
|
|
596
|
+
* already, so it has nothing to reveal and nowhere to reveal it.
|
|
597
|
+
*/
|
|
598
|
+
panelMeta?: React.ReactNode;
|
|
553
599
|
/** When set, the whole card is the target. A plain anchor: routing is yours. */
|
|
554
600
|
href?: string;
|
|
555
601
|
/** Accessible name for the whole-card link. Defaults to `title`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-card.d.ts","sourceRoot":"","sources":["../../src/blocks/entity-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"entity-card.d.ts","sourceRoot":"","sources":["../../src/blocks/entity-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,O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,SAAS,CAAA;IAC/B,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACpC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAA;IACpD;;;;;;;;;;;;;;;;;OAiBG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,qBAy3BA;AAED,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import { Avatar } from "./avatar.js";
|
|
3
4
|
import { Card } from "../ui/card.js";
|
|
4
5
|
import { EntityIdentity } from "./entity-identity.js";
|
|
5
6
|
import { EntityStateDot, EntityStatus } from "./entity-status.js";
|
|
@@ -231,7 +232,7 @@ function statusDotFrom(status) {
|
|
|
231
232
|
return null;
|
|
232
233
|
return _jsx(EntityStateDot, { status: props.status, label: props.label });
|
|
233
234
|
}
|
|
234
|
-
function EntityCard({ title, slug, description, size = "default", titleLines = 2, descriptionLines = 1, status, statusDot, headerActions, stats, seed, previewUrl, kind, reveal = false, openDisabledReason, dashboardHref, settingsHref, creator, href, ariaLabel, meta, footer, className, children, ...props }) {
|
|
235
|
+
function EntityCard({ title, slug, description, size = "default", titleLines = 2, descriptionLines = 1, status, statusDot, headerActions, stats, seed, previewUrl, kind, reveal = false, openDisabledReason, dashboardHref, settingsHref, creator, panelMeta, href, ariaLabel, meta, footer, className, children, ...props }) {
|
|
235
236
|
const sized = SIZE_STYLE[size];
|
|
236
237
|
// The reveal owns the preview, so `seed` is what it needs and all it needs: a
|
|
237
238
|
// panel over nothing is not a panel. It deliberately does NOT ask for an
|
|
@@ -316,6 +317,26 @@ function EntityCard({ title, slug, description, size = "default", titleLines = 2
|
|
|
316
317
|
* is tapped, not a second way to reach Dashboard.
|
|
317
318
|
*/
|
|
318
319
|
const actionPair = (_jsxs(_Fragment, { children: [openLive ? (_jsxs("a", { href: href, "data-slot": "entity-card-open",
|
|
320
|
+
// A NEW TAB, at every size, and it is the default rather than a prop
|
|
321
|
+
// (#200). Founder ruling 2026-09-10: Open leaves for the live entity,
|
|
322
|
+
// which is not this application — the console is a place a person is
|
|
323
|
+
// working, and navigating it away to look at one card's app costs
|
|
324
|
+
// them the list they were reading and every filter that got them to
|
|
325
|
+
// it. A back button does not restore a scroll position in a virtual
|
|
326
|
+
// grid, and on a phone it often does not restore the page at all.
|
|
327
|
+
//
|
|
328
|
+
// `rel` is not decoration. `target="_blank"` hands the opened
|
|
329
|
+
// document a live `window.opener` back into this origin, and the
|
|
330
|
+
// opened document is a TENANT'S app: `noopener` is what stops it
|
|
331
|
+
// reaching in, and `noreferrer` is what stops the console's URL —
|
|
332
|
+
// which carries the grid and the entity — travelling to it as a
|
|
333
|
+
// Referer header. Both, always, and never one without the other.
|
|
334
|
+
//
|
|
335
|
+
// Only this half of the pair. Dashboard stays in the tab (it is the
|
|
336
|
+
// console itself), and the disabled Open below has no `href`, so a
|
|
337
|
+
// `target` on it would be a promise about a navigation that cannot
|
|
338
|
+
// happen.
|
|
339
|
+
target: "_blank", rel: "noopener noreferrer",
|
|
319
340
|
// The word is not drawn. The founder's draft puts one 20px arrow at
|
|
320
341
|
// the top right of the panel and no label, and a pill with "Open" in
|
|
321
342
|
// it would be the widest thing on a 260px card. `sr-only` is what
|
|
@@ -416,7 +437,7 @@ function EntityCard({ title, slug, description, size = "default", titleLines = 2
|
|
|
416
437
|
* **`headerActions` moved INTO it** (#196, and it supersedes only the
|
|
417
438
|
* PLACEMENT half of #176). The rule #176 exists for is that a control renders
|
|
418
439
|
* once and never twice; that is unchanged. What changed is which single place:
|
|
419
|
-
* the rest state no longer has a header row to put a
|
|
440
|
+
* the rest state no longer has a header row to put a pin toggle in, and the
|
|
420
441
|
* panel's creator line has a right edge that is empty. They sit there, gated
|
|
421
442
|
* exactly like Dashboard is — invisible at rest means inert at rest (#171).
|
|
422
443
|
*/
|
|
@@ -452,14 +473,23 @@ function EntityCard({ title, slug, description, size = "default", titleLines = 2
|
|
|
452
473
|
// for normal text, so the value is deliberately NOT adopted — see the
|
|
453
474
|
// note in the PR. The muted rung is 3.69:1 and is out for the same
|
|
454
475
|
// reason.
|
|
455
|
-
className: cn("m-0 text-caption text-body", size === "compact" ? "truncate" : "line-clamp-2"), children: description })) : null, !openLive && openDisabledReason ? (_jsx("p", { "data-slot": "entity-card-reveal-reason", dir: "auto", "aria-hidden": "true", className: "m-0 truncate text-caption text-body", children: openDisabledReason })) : null, creator || headerActions ? (_jsxs("div", { className: "flex min-w-0 items-center justify-between gap-2", children: [creator ? (_jsxs("span", { "data-slot": "entity-card-reveal-creator", className: "flex min-w-0 items-center gap-1 text-caption text-ink", children: [creator.avatar ? (_jsx("span", { "aria-hidden": "true", className: "inline-flex size-6 shrink-0 overflow-hidden rounded-pill [&>*]:size-full", children: creator.avatar })) :
|
|
476
|
+
className: cn("m-0 text-caption text-body", size === "compact" ? "truncate" : "line-clamp-2"), children: description })) : null, !openLive && openDisabledReason ? (_jsx("p", { "data-slot": "entity-card-reveal-reason", dir: "auto", "aria-hidden": "true", className: "m-0 truncate text-caption text-body", children: openDisabledReason })) : null, creator || headerActions ? (_jsxs("div", { className: "flex min-w-0 items-center justify-between gap-2", children: [creator ? (_jsxs("span", { "data-slot": "entity-card-reveal-creator", className: "flex min-w-0 items-center gap-1 text-caption text-ink", children: [creator.avatar ? (_jsx("span", { "aria-hidden": "true", className: "inline-flex size-6 shrink-0 overflow-hidden rounded-pill [&>*]:size-full", children: creator.avatar })) : (
|
|
477
|
+
// The library's own mark, at the size this box was already
|
|
478
|
+
// holding. It renders OUTSIDE that wrapper deliberately: the
|
|
479
|
+
// wrapper exists to force an arbitrary caller node to 24px with
|
|
480
|
+
// `size-full`, and an `Avatar` carries its own width, so nesting
|
|
481
|
+
// the two would be two sizing systems arguing over one element.
|
|
482
|
+
//
|
|
483
|
+
// A creator with no picture used to render a name with a gap
|
|
484
|
+
// where every neighbouring row had a mark. #203.
|
|
485
|
+
_jsx(Avatar, { name: creator.name, size: "m" })), _jsx("span", { className: "truncate", children: creator.name })] })) : (_jsx("span", {})), headerActions ? (_jsx("div", { "data-slot": "entity-card-actions", className: cn(
|
|
456
486
|
// relative z-10 to sit above Open's stretched layer, so a tap on
|
|
457
|
-
// the
|
|
487
|
+
// the pin toggle reaches the toggle.
|
|
458
488
|
"relative z-10 flex shrink-0 items-center gap-1",
|
|
459
489
|
// And dead while the panel cannot be seen, which is Dashboard's
|
|
460
490
|
// rule and #171's: an invisible control that behaves differently
|
|
461
491
|
// from the pixels around it is a trap a reader cannot see.
|
|
462
|
-
"pointer-events-none group-hover/card:pointer-events-auto group-focus-within/card:pointer-events-auto"), children: headerActions })) : null] })) : null] })) : null;
|
|
492
|
+
"pointer-events-none group-hover/card:pointer-events-auto group-focus-within/card:pointer-events-auto"), children: headerActions })) : null] })) : null, panelMeta ? (_jsx("div", { "data-slot": "entity-card-panel-meta", dir: "auto", className: "flex min-w-0 items-center gap-1.5 truncate text-caption text-body", children: panelMeta })) : null] })) : null;
|
|
463
493
|
/**
|
|
464
494
|
* THE ROW. The same card, running across instead of down.
|
|
465
495
|
*
|
|
@@ -488,7 +518,7 @@ function EntityCard({ title, slug, description, size = "default", titleLines = 2
|
|
|
488
518
|
* and nothing is stretched over it. Here it sits inside Open's hit area, so it
|
|
489
519
|
* carries `relative z-10` to stay above it. That is safe in a way the same
|
|
490
520
|
* treatment on the panel's Dashboard was not (#171): these controls are
|
|
491
|
-
* VISIBLE at rest, so a tap landing on the
|
|
521
|
+
* VISIBLE at rest, so a tap landing on the pin toggle rather than on the row
|
|
492
522
|
* is what a reader can see is going to happen. The invisible-at-rest rule
|
|
493
523
|
* still binds the two actions, which is why Dashboard keeps its
|
|
494
524
|
* `pointer-events-none`.
|
|
@@ -505,7 +535,13 @@ function EntityCard({ title, slug, description, size = "default", titleLines = 2
|
|
|
505
535
|
// sharing the card's top edge. Its own hairline is gone with the
|
|
506
536
|
// restyle: the card has one now, and two lines 3px apart read as a
|
|
507
537
|
// mistake.
|
|
508
|
-
cn("aspect-[159/92] overflow-hidden rounded-sm", ROW_THUMBNAIL), "sm"), _jsx("div", { className: cn("flex w-0 min-w-0 flex-1 flex-col", sized.body), children: children ?? (_jsxs(_Fragment, { children: [_jsxs("span", { dir: "auto", "data-slot": "entity-card-title", title: title, className: cn("block truncate font-medium text-ink", sized.title), children: [kind && !seed ? (_jsx(EntityKindBadge, { kind: kind, size: "sm", className: "mr-1.5 align-[-0.2em]" })) : null, title] }), slug ? (_jsx("span", { dir: "auto", "data-slot": "entity-card-slug", title: slug, className: "block truncate font-mono text-caption text-faint", children: slug })) : null, description ? (_jsx("p", { dir: "auto", "data-slot": "entity-card-description", title: description, className: cn("m-0 truncate text-body", sized.description), children: description })) : null, creator || meta ? (_jsxs("div", { className: "flex min-w-0 items-center gap-2 text-caption text-body", children: [creator ? (_jsxs("span", { "data-slot": "entity-card-creator", className: "flex min-w-0 items-center gap-1.5", children: [creator.avatar ? (_jsx("span", { "aria-hidden": "true", className: "inline-flex size-4 shrink-0 overflow-hidden rounded-pill [&>*]:size-full", children: creator.avatar })) :
|
|
538
|
+
cn("aspect-[159/92] overflow-hidden rounded-sm", ROW_THUMBNAIL), "sm"), _jsx("div", { className: cn("flex w-0 min-w-0 flex-1 flex-col", sized.body), children: children ?? (_jsxs(_Fragment, { children: [_jsxs("span", { dir: "auto", "data-slot": "entity-card-title", title: title, className: cn("block truncate font-medium text-ink", sized.title), children: [kind && !seed ? (_jsx(EntityKindBadge, { kind: kind, size: "sm", className: "mr-1.5 align-[-0.2em]" })) : null, title] }), slug ? (_jsx("span", { dir: "auto", "data-slot": "entity-card-slug", title: slug, className: "block truncate font-mono text-caption text-faint", children: slug })) : null, description ? (_jsx("p", { dir: "auto", "data-slot": "entity-card-description", title: description, className: cn("m-0 truncate text-body", sized.description), children: description })) : null, creator || meta ? (_jsxs("div", { className: "flex min-w-0 items-center gap-2 text-caption text-body", children: [creator ? (_jsxs("span", { "data-slot": "entity-card-creator", className: "flex min-w-0 items-center gap-1.5", children: [creator.avatar ? (_jsx("span", { "aria-hidden": "true", className: "inline-flex size-4 shrink-0 overflow-hidden rounded-pill [&>*]:size-full", children: creator.avatar })) : (
|
|
539
|
+
// 18px, the smallest the mark comes, against the 16px
|
|
540
|
+
// box a caller's own node is forced into. Two pixels,
|
|
541
|
+
// and they are the right two: `s` is a size the block
|
|
542
|
+
// declares and 16 is a number this row happened to pick
|
|
543
|
+
// for a slot that had to hold anything at all.
|
|
544
|
+
_jsx(Avatar, { name: creator.name, size: "s" })), _jsx("span", { className: "truncate", children: creator.name })] })) : null, meta] })) : null] })) }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [status ? _jsx("span", { className: "shrink-0", children: status }) : null, headerActions ? (_jsx("div", { "data-slot": "entity-card-actions", className: "relative z-10 flex shrink-0 items-center gap-1", children: headerActions })) : null, _jsx("div", { "data-slot": "entity-card-row-actions", className: cn("flex shrink-0 items-center gap-2",
|
|
509
545
|
// The row's whole hover behaviour, and all of it: the
|
|
510
546
|
// information is already on screen, so what arrives is the two
|
|
511
547
|
// actions and nothing else.
|
|
@@ -549,6 +585,18 @@ function EntityCard({ title, slug, description, size = "default", titleLines = 2
|
|
|
549
585
|
// by closing the outer one.
|
|
550
586
|
if (!href || revealed)
|
|
551
587
|
return card;
|
|
588
|
+
// NO `target` here, and it is a scope decision rather than an oversight.
|
|
589
|
+
// #200's ruling is about the card's Open ACTION, which is what every revealed
|
|
590
|
+
// card — the founder's v2 card, and the shape the console ships — actually
|
|
591
|
+
// offers: with `reveal` set, Open's stretched layer IS the click target, so a
|
|
592
|
+
// click on the card opens the tab.
|
|
593
|
+
//
|
|
594
|
+
// This wrapper is the older shape, a card that is a link in its own right, and
|
|
595
|
+
// a caller reaching for it has made the card a navigation element on its own
|
|
596
|
+
// page. Silently retargeting that is a behaviour change for a surface the
|
|
597
|
+
// ruling did not look at. If the founder wants the whole card to spawn a tab
|
|
598
|
+
// too, it is this one attribute — and it should be decided on a screen, not
|
|
599
|
+
// inferred here.
|
|
552
600
|
return (_jsx("a", { href: href, "aria-label": ariaLabel ?? title,
|
|
553
601
|
// The focus ring is the same token every control uses, so it flips with
|
|
554
602
|
// the surface. A card-sized link with no visible focus state is unusable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-card.js","sourceRoot":"","sources":["../../src/blocks/entity-card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,E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sE;QACtE,uEAAuE;QACvE,wEAAwE;QACxE,sBAAsB;QACtB,EAAE;QACF,iEAAiE;QACjE,sEAAsE;QACtE,wEAAwE;QACxE,wEAAwE;QACxE,EAAE;QACF,sEAAsE;QACtE,kEAAkE;QAClE,wCAAwC;QACxC,oEAAoE,EACpE,KAAK,CAAC,IAAI;QACV,wEAAwE;QACxE,yEAAyE;QACzE,uEAAuE;QACvE,qDAAqD;QACrD,IAAI,IAAI,CAAC,QAAQ,IAAI,QAAQ,EAC7B,KAAK,CAAC,WAAW,EACjB,SAAS,CACV,KACG,KAAK,aAER,aAAa;YACZ,wEAAwE;YACxE,uEAAuE;YACvE,kDAAkD;YAClD,yEAAyE,EACzE,IAAI,CACL,EAIA,QAAQ,CAAC,CAAC,CAAC,CACV,cAAK,SAAS,EAAE,EAAE,CAAC,iDAAiD,EAAE,KAAK,CAAC,IAAI,CAAC,YAC9E,QAAQ,GACL,CACP,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACZ,OAAO,CACR,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAE,EAAE,CAAC,iDAAiD,EAAE,KAAK,CAAC,IAAI,CAAC,YAC9E,QAAQ,GACL,CACP,EAEA,WAAW,IACP,CACR,CAAA;IAED,0EAA0E;IAC1E,8EAA8E;IAC9E,4BAA4B;IAC5B,IAAI,CAAC,IAAI,IAAI,QAAQ;QAAE,OAAO,IAAI,CAAA;IAElC,OAAO,CACL,YACE,IAAI,EAAE,IAAI,gBACE,SAAS,IAAI,KAAK;QAC9B,wEAAwE;QACxE,yEAAyE;QACzE,gEAAgE;QAChE,SAAS,EAAC,6GAA6G,YAEtH,IAAI,GACH,CACL,CAAA;AACH,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"entity-card.js","sourceRoot":"","sources":["../../src/blocks/entity-card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAA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The shape cloudgrid-console#677 needed and the library did not have, so the
|
|
6
|
+
* console composed its own from `Card` + a local `Avatar` + `EntityKindBadge` +
|
|
7
|
+
* `Chip` + a relative-time helper (`components/feedback/FeedbackPost.tsx`). That
|
|
8
|
+
* composition was the right interim — no new tokens, no invented values, every
|
|
9
|
+
* mark the library's own — and it is also a shape three surfaces want, with the
|
|
10
|
+
* console currently holding the only definition of it. Pulse and the entity
|
|
11
|
+
* feedback tab are the next two.
|
|
12
|
+
*
|
|
13
|
+
* The arrangement here is that component's, on purpose: the console swaps to
|
|
14
|
+
* this block without redesigning anything, and the two renderings of a post do
|
|
15
|
+
* not diverge for a release while everyone waits.
|
|
16
|
+
*
|
|
17
|
+
* ## It knows no vocabulary, and that is the whole design
|
|
18
|
+
*
|
|
19
|
+
* Every part of a post that carries product words is a NODE:
|
|
20
|
+
*
|
|
21
|
+
* - **`time`** — the library has no clock. `formatRelative` and the exact
|
|
22
|
+
* timestamp behind its `title` belong to the caller.
|
|
23
|
+
* - **`context`** — a kind badge and a link to the entity, composed by the
|
|
24
|
+
* caller. Which means the TOMBSTONE needs nothing here: an entity that was
|
|
25
|
+
* deleted or is no longer reachable is a different node in the same slot, and
|
|
26
|
+
* the words somebody wrote about it still render. A block that owned the link
|
|
27
|
+
* would have had to own that sentence too.
|
|
28
|
+
* - **`corner`** — the category label. The console passes Bug / Idea / Praise /
|
|
29
|
+
* Question / Note through `Chip`; another surface will pass something else.
|
|
30
|
+
* - **the body** — including a reaction. #203 is explicit that a reaction
|
|
31
|
+
* arrives as a node and this block owns no table for one: the library's
|
|
32
|
+
* reaction marks are a different set from the wire's `up` / `down`, and §23
|
|
33
|
+
* forbids thumbs, so the shipped words are "Liked" and "Disliked". A reaction
|
|
34
|
+
* with no message is a post too.
|
|
35
|
+
* - **`actions`** — a reply control, a resolve toggle, a menu. Optional, and the
|
|
36
|
+
* caller's.
|
|
37
|
+
*
|
|
38
|
+
* What is left for the block to own is the arrangement, which is the part three
|
|
39
|
+
* surfaces would otherwise each get slightly wrong.
|
|
40
|
+
*
|
|
41
|
+
* ## An unattributed post is a post
|
|
42
|
+
*
|
|
43
|
+
* `author.name` may be absent — an anonymous submission has no user to name —
|
|
44
|
+
* and the row still renders, with `unattributed` in the name's place rather than
|
|
45
|
+
* a blank, a collapsed lockup or a dropped post. It defaults to the word
|
|
46
|
+
* "Anonymous", which is plain, is what the console ships, and is the one piece
|
|
47
|
+
* of copy here that is not the caller's; pass the prop to say it differently.
|
|
48
|
+
*
|
|
49
|
+
* ## It is one post, and it fetches nothing
|
|
50
|
+
*
|
|
51
|
+
* No list, no order, no merge, no pagination — #203's "what it should NOT do".
|
|
52
|
+
* The caller owns the feed.
|
|
53
|
+
*/
|
|
54
|
+
/** How many lines the body is allowed. Unset means the whole thing. */
|
|
55
|
+
declare const BODY_CLAMP: {
|
|
56
|
+
readonly 1: "line-clamp-1";
|
|
57
|
+
readonly 2: "line-clamp-2";
|
|
58
|
+
readonly 3: "line-clamp-3";
|
|
59
|
+
};
|
|
60
|
+
export type FeedPostBodyLines = keyof typeof BODY_CLAMP;
|
|
61
|
+
declare function FeedPost({ author, unattributed, time, context, corner, bodyLines, actions, className, children, ...props }: Omit<React.ComponentProps<typeof Card>, "title"> & {
|
|
62
|
+
/**
|
|
63
|
+
* Who wrote it. `avatar` is a node, the way `EntityCard`'s creator slot is, so
|
|
64
|
+
* a caller with a real picture passes one; a caller with only a name gets an
|
|
65
|
+
* `Avatar` derived from it and does not have to reach for the block itself.
|
|
66
|
+
*
|
|
67
|
+
* `name` may be absent. See `unattributed`.
|
|
68
|
+
*/
|
|
69
|
+
author?: {
|
|
70
|
+
name?: string;
|
|
71
|
+
avatar?: React.ReactNode;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* What stands in for a missing name. Defaults to "Anonymous", set in italic so
|
|
75
|
+
* it reads as a state rather than as somebody actually called that.
|
|
76
|
+
*/
|
|
77
|
+
unattributed?: React.ReactNode;
|
|
78
|
+
/** When, as the caller formats it. Usually relative, with the exact time on `title`. */
|
|
79
|
+
time?: React.ReactNode;
|
|
80
|
+
/** What the post is about: a kind badge and a link, or a tombstone. */
|
|
81
|
+
context?: React.ReactNode;
|
|
82
|
+
/** The far end of the byline. A category label. */
|
|
83
|
+
corner?: React.ReactNode;
|
|
84
|
+
/**
|
|
85
|
+
* Clamps the body.
|
|
86
|
+
*
|
|
87
|
+
* A feed shows a post whole and passes nothing. A PREVIEW of that feed — three
|
|
88
|
+
* posts on Home — passes 3, so one person's essay does not become the whole
|
|
89
|
+
* section.
|
|
90
|
+
*/
|
|
91
|
+
bodyLines?: FeedPostBodyLines;
|
|
92
|
+
/** An optional row under the body. Reply, resolve, a menu. */
|
|
93
|
+
actions?: React.ReactNode;
|
|
94
|
+
/** The post itself. A message, a reaction, both. */
|
|
95
|
+
children?: React.ReactNode;
|
|
96
|
+
}): import("react").JSX.Element;
|
|
97
|
+
export { FeedPost };
|
|
98
|
+
//# sourceMappingURL=feed-post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed-post.d.ts","sourceRoot":"","sources":["../../src/blocks/feed-post.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,uEAAuE;AACvE,QAAA,MAAM,UAAU;;;;CAIN,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,UAAU,CAAA;AAEvD,iBAAS,QAAQ,CAAC,EAChB,MAAM,EACN,YAA0B,EAC1B,IAAI,EACJ,OAAO,EACP,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,OAAO,CAAC,GAAG;IACpD;;;;;;OAMG;IACH,MAAM,CAAC,E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