@cloudgrid-io/ui 0.59.1 → 0.59.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.
@@ -39,14 +39,27 @@
39
39
  * block does not know what a grid is; a caller who needs two families passes two
40
40
  * different `seed` prefixes and gets two stable, different looks.
41
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.
42
+ * ## A loaded picture draws no letter and no ground (ui#511)
43
+ *
44
+ * Until ui#511 the initials were always rendered and the picture painted over
45
+ * them, with no JavaScript. A picture with transparent areas showed the letter
46
+ * and the ground through them: a 3:1 logo the Console pads to a transparent
47
+ * square showed the letter's feet under the bar. So the mark watches its
48
+ * picture now (`AvatarFrame`, the one client part, so this module and its
49
+ * constants stay usable from a server component), and says what it knows in
50
+ * `data-picture` once it knows it:
51
+ *
52
+ * - No `src`, or a picture still loading (the first frame, and the server's):
53
+ * no attribute, and the ground and the letter, with the picture painted over
54
+ * them the moment it arrives. The markup of before, byte for byte.
55
+ * - `loaded`: the picture alone. No letter, and the ground is
56
+ * `pictureGround`'s: transparent (Asaf, 2026-11-17), so a transparent logo
57
+ * sits on whatever is behind it. The shape and the radius stay.
58
+ * - `error`: a 404, a dead signed URL, a blocked host. The ground and the
59
+ * letter, and the broken image is hidden, so a spoken `alt` is not drawn as
60
+ * text over the letter.
61
+ *
62
+ * Without JavaScript it stays the first frame, which is what it was before.
50
63
  *
51
64
  * ## `alt` is what makes an avatar speak
52
65
  *
@@ -155,7 +168,10 @@ declare function Avatar({ name, seed, src, alt, size, monogram, shape, look: loo
155
168
  * id rather than a title.
156
169
  */
157
170
  seed?: string;
158
- /** A real picture, painted over the initials. A miss falls back to them. */
171
+ /**
172
+ * A real picture. Once it has loaded it is drawn alone, with no initials and
173
+ * no ground under it (ui#511); while it loads, and if it fails, the initials.
174
+ */
159
175
  src?: string;
160
176
  /**
161
177
  * The accessible name. Omitted — the default — the mark is `aria-hidden`,
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/blocks/avatar.tsx"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,gBAAgB,uCAAwC,CAAA;AAErE,2CAA2C;AAC3C,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY;;;;CAIf,CAAA;AAEV,mEAAmE;AACnE,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,YAAY,CAAA;AAsBlD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,mFAIjB,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAC1D,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAC7C,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAA;AAE9C,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAEvD;AAyBD,iBAAS,MAAM,CAAC,EACd,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,GAAG,EACH,IAAS,EACT,QAAQ,EACR,KAAgB,EAChB,IAAI,EAAE,QAAqB,EAC3B,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,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GAAG,QAAQ,CAAA;AAE9C,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAEvD;AAmCD,iBAAS,MAAM,CAAC,EACd,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,GAAG,EACH,IAAS,EACT,QAAQ,EACR,KAAgB,EAChB,IAAI,EAAE,QAAqB,EAC3B,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;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,cAAc,GAAG,UAAU,CAAA;IAClC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mFAAmF;IACnF,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,mGAAmG;IACnG,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB,+BA+DA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -1,5 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/cloudgrid-cn.js";
3
+ import { AvatarFrame } from "../lib/avatar-frame.js";
3
4
  import { entityIdentityLook, entityIdentitySeed, entityMonogram, } from "./entity-identity.js";
4
5
  /**
5
6
  * A person, as a mark: their picture if there is one, their initials on a
@@ -42,14 +43,27 @@ import { entityIdentityLook, entityIdentitySeed, entityMonogram, } from "./entit
42
43
  * block does not know what a grid is; a caller who needs two families passes two
43
44
  * different `seed` prefixes and gets two stable, different looks.
44
45
  *
45
- * ## A broken image falls back with no JavaScript
46
+ * ## A loaded picture draws no letter and no ground (ui#511)
46
47
  *
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.
48
+ * Until ui#511 the initials were always rendered and the picture painted over
49
+ * them, with no JavaScript. A picture with transparent areas showed the letter
50
+ * and the ground through them: a 3:1 logo the Console pads to a transparent
51
+ * square showed the letter's feet under the bar. So the mark watches its
52
+ * picture now (`AvatarFrame`, the one client part, so this module and its
53
+ * constants stay usable from a server component), and says what it knows in
54
+ * `data-picture` once it knows it:
55
+ *
56
+ * - No `src`, or a picture still loading (the first frame, and the server's):
57
+ * no attribute, and the ground and the letter, with the picture painted over
58
+ * them the moment it arrives. The markup of before, byte for byte.
59
+ * - `loaded`: the picture alone. No letter, and the ground is
60
+ * `pictureGround`'s: transparent (Asaf, 2026-11-17), so a transparent logo
61
+ * sits on whatever is behind it. The shape and the radius stay.
62
+ * - `error`: a 404, a dead signed URL, a blocked host. The ground and the
63
+ * letter, and the broken image is hidden, so a spoken `alt` is not drawn as
64
+ * text over the letter.
65
+ *
66
+ * Without JavaScript it stays the first frame, which is what it was before.
53
67
  *
54
68
  * ## `alt` is what makes an avatar speak
55
69
  *
@@ -180,6 +194,15 @@ const SQUARE_RADIUS = {
180
194
  };
181
195
  /** 15/32 of the box, `--cg-avatar-letter-ratio` (#482): 15px at 32, as the frame. */
182
196
  const PASTEL_RATIO = "--cg-avatar-letter-ratio";
197
+ /**
198
+ * The ground behind a LOADED picture (ui#511). Asaf's call, 2026-11-17:
199
+ * transparent, on every surface, so a transparent logo sits on the page and an
200
+ * opaque one fills the shape. No border: a hairline is possible if Asaf wants a
201
+ * transparent logo's square to read. This is the one place that decides it.
202
+ */
203
+ function pictureGround(_ground) {
204
+ return "transparent";
205
+ }
183
206
  const firstLetter = (name) => {
184
207
  // Array.from walks code points, so an emoji first is drawn whole, never half a pair.
185
208
  const ch = Array.from(name.trim())[0] ?? "";
@@ -197,29 +220,27 @@ function Avatar({ name, seed, src, alt, size = 24, monogram, shape = "circle", l
197
220
  // One rule, resolved once, so the three elements below cannot disagree about
198
221
  // whether this mark is announced. See the docblock: silent by default.
199
222
  const spoken = alt !== undefined;
200
- return (_jsxs("span", { "data-slot": "avatar", "data-size": box, "data-look": pastelToken ? `pastel-${AVATAR_PASTELS.indexOf(pastelToken) + 1}` : look.name, "data-shape": shape, ...(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", squareRadius ? null : "rounded-pill", pastel ? "font-normal" : "font-medium", className), style: {
223
+ // The identity tile's measured shade, and mixed toward --cg-ink the same
224
+ // way. Not mixed against --cg-surface-card: that token is `transparent`
225
+ // inside a purple panel, and mixing a hue into transparent gives a
226
+ // half-transparent hue rather than a shade.
227
+ // ui#496: one colour per person, space and grid, as in 0.53.1. 0.54.0
228
+ // painted every person lavender (Primary 20 under Primary press); that
229
+ // was a mistake in the design, and the identity look is back.
230
+ const ground = pastelToken
231
+ ? `var(${pastelToken})`
232
+ : `color-mix(in srgb, var(${look.hue}) ${look.tile}, var(--cg-ink))`;
233
+ return (_jsx(AvatarFrame, { src: src, imageAlt: spoken ? alt : "", letters: letters, pictureGround: pictureGround(ground), "data-slot": "avatar", "data-size": box, "data-look": pastelToken ? `pastel-${AVATAR_PASTELS.indexOf(pastelToken) + 1}` : look.name, "data-shape": shape, ...(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", squareRadius ? null : "rounded-pill", pastel ? "font-normal" : "font-medium", className), style: {
201
234
  width: box,
202
235
  height: box,
203
236
  // The diameter times a named ratio (#482), so the size is a token's.
204
237
  fontSize: `calc(${box}px * var(${pastel ? PASTEL_RATIO : MONOGRAM_RATIO}))`,
205
238
  ...(squareRadius ? { borderRadius: `var(${squareRadius})` } : null),
206
239
  lineHeight: 1,
207
- // The identity tile's measured shade, and mixed toward --cg-ink the same
208
- // way. Not mixed against --cg-surface-card: that token is `transparent`
209
- // inside a purple panel, and mixing a hue into transparent gives a
210
- // half-transparent hue rather than a shade.
211
- // ui#496: one colour per person, space and grid, as in 0.53.1. 0.54.0
212
- // painted every person lavender (Primary 20 under Primary press); that
213
- // was a mistake in the design, and the identity look is back.
214
- background: pastelToken
215
- ? `var(${pastelToken})`
216
- : `color-mix(in srgb, var(${look.hue}) ${look.tile}, var(--cg-ink))`,
240
+ background: ground,
217
241
  color: pastel ? "var(--cg-ink)" : "var(--cg-text-on-primary)",
218
242
  ...style,
219
- }, ...props, children: [_jsx("span", { "data-slot": "avatar-initials", "aria-hidden": "true", children: letters }), src ? (
220
- // Over the initials, never instead of them. `alt=""` when the mark is
221
- // silent, so a decorative avatar does not announce a filename.
222
- _jsx("img", { "data-slot": "avatar-image", src: src, alt: spoken ? alt : "", className: "absolute inset-0 size-full object-cover" })) : null] }));
243
+ }, ...props }));
223
244
  }
224
245
  export { Avatar };
225
246
  //# sourceMappingURL=avatar.js.map
@@ -1 +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,EACL,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,GACf,MAAM,+BAA+B,CAAA;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EA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,IAAI,CAAC;YACnE,UAAU,EAAE,CAAC;YACb,UAAU,EAAE,MAAM;YAClB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,2BAA2B;YAC7D,GAAG,KAAK;SACT,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -110,32 +110,55 @@ declare function SettingsLink({ render, className, children, ...props }: useRend
110
110
  * `placeholder` are the field's own. After a save or a cancel, focus is back
111
111
  * on the pencil. A click outside neither saves nor cancels.
112
112
  *
113
- * ## No jump between view and edit
114
- *
115
- * The field's text starts where the value's text started and sits on the same
116
- * line: the field reaches 15px out to the left (its border and its 14px
117
- * inset), and 9px above and below (its border and its 8px block padding),
118
- * with negative margins, so its box in the layout is the value's line box. The
119
- * check and the cross take the pencil's place on that line, right after the
120
- * field. A one-line field is at most 448 wide (and never narrower than the
121
- * value), so a short name does not open a field across the whole page. In a column that
122
- * starts at the value's left edge (the Grid profile, a settings row at phone
123
- * width) nothing moves; in a row that ends at the right edge (a settings row's
124
- * control at desktop width), the right end stays and the field opens to the
125
- * left by its inset and the second button (about 47px); the row's height does
126
- * not change.
113
+ * ## One field at a time (ui#512)
114
+ *
115
+ * One in-place field is open in a document, wherever it is on the page (the
116
+ * Grid profile, a settings row, on the page or on ink). Pressing another
117
+ * pencil asks the open one first:
118
+ *
119
+ * - unchanged, it closes (no call), and the new field opens with focus;
120
+ * - with changes (or a save still running), it STAYS open, focus goes back to
121
+ * it, and the line under it says "Save or cancel this first." The new field
122
+ * does not open. The note is not an error: the field is not marked invalid,
123
+ * and typing clears it.
124
+ *
125
+ * The rule lives here, in a per-document slot that every in-place
126
+ * `EditableValue` joins when it opens and leaves when it closes or unmounts, so
127
+ * a caller (`GridProfile`) gets it with no change and no provider. Another
128
+ * document (a frame, another test's page) has a slot of its own.
129
+ *
130
+ * ## No overlap (ui#512)
131
+ *
132
+ * The field never reaches above or below its own box: it is in the layout at
133
+ * its full height (its border and 8px padding above and below the text), so
134
+ * the line it opens on grows by 18 and pushes what is under it down, rather
135
+ * than covering it. A field over its neighbour (the Grid name's over the
136
+ * description, 8 below it) was the bug.
137
+ *
138
+ * Sideways it still reaches out, into room it has: 15px to the start (its
139
+ * border and its 14px inset), so the field's text starts where the value's
140
+ * text started. Where the field sits beside the logo (24 away) or opens a
141
+ * settings row's control (32 from the text column), or starts at a phone-width
142
+ * column's edge (inside the page's padding), there is that room. The check and
143
+ * the cross take the pencil's place, right after the field, centred on it. A
144
+ * one-line field is at most 448 wide (and never narrower than the value), so a
145
+ * short name does not open a field across the whole page. In a row that ends
146
+ * at the right edge (a settings row's control at desktop width), the right end
147
+ * stays and the field opens to the left by its inset and the second button
148
+ * (about 47px).
127
149
  *
128
150
  * ## A `multiline` field keeps the text's width (ui#509)
129
151
  *
130
152
  * The field reaches 15px out on BOTH sides, so its text box is exactly the
131
153
  * value's measure: the text breaks on the same words and takes the same lines
132
- * in view and in edit, at every width. The cross and the check sit in a row
154
+ * in view and in edit, at every width. The check and the cross sit in a row
133
155
  * UNDER the field, 8 below it (the 4px scale's small gap), right-aligned to the
134
- * field's edge: the cross, then the check, 4 apart. Tab goes field, cross,
135
- * check. The column grows by that row and nothing else (the field's 9 under
136
- * the last line, the 8 and the 24 buttons: 41). The field's right edge is 15
137
- * past the value's, as its left edge is, so it needs that much room on the
138
- * right, as it does on the left. An error shows under the buttons.
156
+ * field's edge: the check, then the cross, 4 apart, the order a one-line field
157
+ * has (ui#512). Tab goes field, check, cross. The column grows by the field's
158
+ * 9 above the first line and 9 under the last, and that row (the 8 and the 24
159
+ * buttons: 50). The field's right edge is 15 past the value's, as its left
160
+ * edge is, so it needs that much room on the right, as it does on the left. An
161
+ * error shows under the buttons.
139
162
  */
140
163
  /** What `onSave` resolves to: nothing when saved, or the error to show. */
141
164
  type EditableValueSaveResult = void | undefined | {
@@ -1 +1 @@
1
- {"version":3,"file":"settings-row.d.ts","sourceRoot":"","sources":["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F,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,qBA+PF;AAGD;;;;;;;;;;;;;GAaG;AACH,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,KAAK,EACL,WAAW,EACX,MAAM,EACN,UAAU,EACV,MAAM,EACN,IAAW,EACX,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAC3D,wEAAwE;IACxE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB,qBAoDA;AAED;;;;;;GAMG;AACH,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IAChD,KAAK,EAAE,SAAS;QAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,EAAE,CAAA;CACrE,qBAeA;AAED,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA;AACjG,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -178,26 +178,38 @@ function SettingsLink({ render, className, children, ...props }) {
178
178
  }
179
179
  /** When a save throws something with no message. */
180
180
  const SAVE_FAILED = "Could not save. Try again.";
181
+ /** The line under a field that stays open because it has changes (ui#512). */
182
+ const HOLD_NOTE = "Save or cancel this first.";
183
+ /** The one in-place field open in each document (ui#512): see "One field at a time". */
184
+ const openInPlace = new WeakMap();
185
+ /** `editor` leaves the slot it holds in `slot`'s document, if it still holds it. */
186
+ function leaveInPlace(slot, editor) {
187
+ const doc = slot.current;
188
+ if (doc && openInPlace.get(doc) === editor)
189
+ openInPlace.delete(doc);
190
+ slot.current = null;
191
+ }
181
192
  /** The pencil, the check and the cross: one look, the pencil's. */
182
193
  const ICON_BUTTON = "inline-flex size-6 shrink-0 items-center justify-center rounded-xs text-body transition-colors hover:bg-(--cg-hover) hover:text-ink focus-line disabled:pointer-events-none disabled:opacity-50";
183
194
  /**
184
- * The field over the value's line box: out 15 to the start (1 border, 14 inset),
185
- * out 9 above and below (1 border, 8 padding), in the value's own type size and
186
- * line height at every width.
195
+ * The field where the value was: out 15 to the start (1 border, 14 inset), so
196
+ * its text starts where the value's did; nothing above or below (ui#512), so it
197
+ * covers no neighbour. In the value's own type size and line height at every
198
+ * width.
187
199
  */
188
- const IN_PLACE_FIELD = "-my-[9px] -ms-[15px] min-w-0 flex-1 py-2 text-[length:inherit] md:text-[length:inherit] leading-[inherit]";
200
+ const IN_PLACE_FIELD = "-ms-[15px] min-w-0 flex-1 py-2 text-[length:inherit] md:text-[length:inherit] leading-[inherit]";
189
201
  /**
190
202
  * A `multiline` field (ui#509): out 15 to BOTH sides, so its text box is the
191
- * value's own measure and the text breaks on the same words; out 9 above, on
192
- * the value's first line. Its 9 below stays in the layout: the cross and the
193
- * check sit 8 under it.
203
+ * value's own measure and the text breaks on the same words; nothing above or
204
+ * below (ui#512). The check and the cross sit 8 under it.
194
205
  */
195
- const IN_PLACE_FIELD_MULTILINE = "-mt-[9px] -mx-[15px] w-[calc(100%+30px)] max-w-none min-w-0 py-2 text-[length:inherit] md:text-[length:inherit] leading-[inherit]";
206
+ const IN_PLACE_FIELD_MULTILINE = "-mx-[15px] w-[calc(100%+30px)] max-w-none min-w-0 py-2 text-[length:inherit] md:text-[length:inherit] leading-[inherit]";
196
207
  function EditableValue({ value, label, onEdit, onSave, editValue, multiline = false, validate, maxLength, placeholder, valueClassName, wrap = false, className, ...props }) {
197
208
  const [editing, setEditing] = React.useState(false);
198
209
  const [draft, setDraft] = React.useState("");
199
210
  const [pending, setPending] = React.useState(false);
200
211
  const [message, setMessage] = React.useState(null);
212
+ const [note, setNote] = React.useState(false);
201
213
  const [textWidth, setTextWidth] = React.useState(undefined);
202
214
  const pencilRef = React.useRef(null);
203
215
  const textRef = React.useRef(null);
@@ -207,12 +219,32 @@ function EditableValue({ value, label, onEdit, onSave, editValue, multiline = fa
207
219
  const mounted = React.useRef(true);
208
220
  const messageId = React.useId();
209
221
  const initial = editValue ?? (typeof value === "string" ? value : "");
222
+ // ui#512: this field as the others see it, and the document whose slot it holds.
223
+ const live = React.useRef({ unsaved: false });
224
+ const slot = React.useRef(null);
225
+ const [self] = React.useState(() => ({
226
+ unsaved: () => live.current.unsaved,
227
+ dismiss: () => {
228
+ leaveInPlace(slot, self);
229
+ setMessage(null);
230
+ setNote(false);
231
+ setEditing(false);
232
+ },
233
+ hold: () => {
234
+ setNote(true);
235
+ fieldRef.current?.focus();
236
+ },
237
+ }));
238
+ React.useLayoutEffect(() => {
239
+ live.current.unsaved = editing && (pending || draft !== initial);
240
+ });
210
241
  React.useEffect(() => {
211
242
  mounted.current = true;
212
243
  return () => {
213
244
  mounted.current = false;
245
+ leaveInPlace(slot, self);
214
246
  };
215
- }, []);
247
+ }, [self]);
216
248
  // Opened: the field, focused, its text selected. Closed by a save or a
217
249
  // cancel: focus back on the pencil.
218
250
  React.useLayoutEffect(() => {
@@ -242,14 +274,29 @@ function EditableValue({ value, label, onEdit, onSave, editValue, multiline = fa
242
274
  el.style.height = `${el.scrollHeight + 2}px`;
243
275
  }, [editing, multiline, draft]);
244
276
  const open = () => {
277
+ // One field at a time (ui#512): the open one, if any, closes or is held.
278
+ const doc = pencilRef.current?.ownerDocument ?? document;
279
+ const other = openInPlace.get(doc);
280
+ if (other && other !== self) {
281
+ if (other.unsaved()) {
282
+ other.hold();
283
+ return;
284
+ }
285
+ other.dismiss();
286
+ }
287
+ openInPlace.set(doc, self);
288
+ slot.current = doc;
245
289
  setTextWidth(textRef.current?.getBoundingClientRect().width);
246
290
  setDraft(initial);
247
291
  setMessage(null);
292
+ setNote(false);
248
293
  setEditing(true);
249
294
  };
250
295
  const close = () => {
296
+ leaveInPlace(slot, self);
251
297
  returnFocus.current = true;
252
298
  setMessage(null);
299
+ setNote(false);
253
300
  setEditing(false);
254
301
  };
255
302
  const commit = async () => {
@@ -266,6 +313,7 @@ function EditableValue({ value, label, onEdit, onSave, editValue, multiline = fa
266
313
  }
267
314
  setPending(true);
268
315
  setMessage(null);
316
+ setNote(false);
269
317
  let failure = null;
270
318
  try {
271
319
  const result = await onSave(draft);
@@ -301,13 +349,14 @@ function EditableValue({ value, label, onEdit, onSave, editValue, multiline = fa
301
349
  placeholder,
302
350
  "aria-label": label,
303
351
  "aria-invalid": message ? true : undefined,
304
- "aria-describedby": message ? messageId : undefined,
352
+ "aria-describedby": message || note ? messageId : undefined,
305
353
  // One line: at least as wide as the value was, so it opens with the value
306
354
  // whole in a row that shrinks to its control. A wrapping value already
307
355
  // takes its column's width.
308
356
  style: textWidth && !wrap ? { minWidth: `${Math.ceil(textWidth) + 30}px` } : undefined,
309
357
  onChange: (event) => {
310
358
  setDraft(event.target.value);
359
+ setNote(false);
311
360
  setMessage(validate?.(event.target.value) || null);
312
361
  },
313
362
  onKeyDown: (event) => {
@@ -321,7 +370,7 @@ function EditableValue({ value, label, onEdit, onSave, editValue, multiline = fa
321
370
  };
322
371
  const save = (_jsx("button", { type: "button", "aria-label": `Save ${label}`, "aria-busy": pending || undefined, disabled: pending, onClick: () => void commit(), onKeyDown: escape, className: ICON_BUTTON, children: pending ? _jsx(Spinner, { decorative: true }) : _jsx(CheckIcon, { className: "size-4" }) }));
323
372
  const cancel = (_jsx("button", { type: "button", "aria-label": `Cancel editing ${label}`, disabled: pending, onClick: close, onKeyDown: escape, className: ICON_BUTTON, children: _jsx(CloseIcon, { className: "size-4" }) }));
324
- return (_jsxs("span", { "data-slot": "editable-value", "data-editing": "", "aria-busy": pending || undefined, className: cn("flex min-w-0 flex-col text-body-sm text-ink", valueClassName, className), ...props, children: [multiline ? (_jsxs(_Fragment, { children: [_jsx(Textarea, { ...fieldProps, size: "lg", className: cn(IN_PLACE_FIELD_MULTILINE, "min-h-[calc(1lh+18px)]") }), _jsxs("span", { "data-slot": "editable-value-actions", className: "-me-[15px] mt-2 flex shrink-0 items-center justify-end gap-1", children: [cancel, save] })] })) : (_jsxs("span", { className: cn("flex min-w-0 gap-2", wrap ? "items-start" : "items-center"), children: [_jsx(Input, { ...fieldProps, size: "lg", className: cn(IN_PLACE_FIELD, "h-[calc(1lh+18px)] max-w-md") }), _jsxs("span", { "data-slot": "editable-value-actions", className: cn("-me-1 flex h-[1lh] shrink-0 items-center gap-1", !wrap && "min-h-6"), children: [save, cancel] })] })), _jsx("p", { id: messageId, "data-slot": "editable-value-message", "aria-live": "polite", className: "m-0 pt-1.5 text-caption text-danger-strong empty:pt-0", children: message })] }));
373
+ return (_jsxs("span", { "data-slot": "editable-value", "data-editing": "", "aria-busy": pending || undefined, className: cn("flex min-w-0 flex-col text-body-sm text-ink", valueClassName, className), ...props, children: [multiline ? (_jsxs(_Fragment, { children: [_jsx(Textarea, { ...fieldProps, size: "lg", className: cn(IN_PLACE_FIELD_MULTILINE, "min-h-[calc(1lh+18px)]") }), _jsxs("span", { "data-slot": "editable-value-actions", className: "-me-[15px] mt-2 flex shrink-0 items-center justify-end gap-1", children: [save, cancel] })] })) : (_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Input, { ...fieldProps, size: "lg", className: cn(IN_PLACE_FIELD, "h-[calc(1lh+18px)] max-w-md") }), _jsxs("span", { "data-slot": "editable-value-actions", className: "-me-1 flex shrink-0 items-center gap-1", children: [save, cancel] })] })), _jsx("p", { id: messageId, "data-slot": "editable-value-message", "aria-live": "polite", className: "m-0 pt-1.5 text-caption text-danger-strong empty:pt-0", children: message ?? (note ? HOLD_NOTE : null) })] }));
325
374
  }
326
375
  const edit = onSave ? open : onEdit;
327
376
  const pencil = edit ? (_jsx("button", { ref: pencilRef, type: "button", "aria-label": `Edit ${label}`, onClick: edit, className: cn("-me-1 inline-flex size-6 shrink-0 items-center justify-center rounded-xs text-body transition-colors hover:bg-(--cg-hover) hover:text-ink focus-line",
@@ -1 +1 @@
1
- {"version":3,"file":"settings-row.js","sourceRoot":"","sources":["../../src/blocks/settings-row.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAEH;;;;GAIG;AACH,MAAM,yBAAyB,GAAG,KAAK,CAAC,aAAa,CAA4B,KAAK,CAAC,CAAA;AAEvF,+EAA+E;AAC/E,MAAM,sBAAsB,GAAG,KAAK,CAAC,aAAa,CAAwB,SAAS,CAAC,CAAA;AA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C5C,4BAAgB,yBAAyB,EAAC,SAAS,EAAC,wDAAwD,YACzG,MAAM,GACF,EACN,UAAU,CAAC,CAAC,CAAC,CACZ,4BAAgB,8BAA8B,EAAC,SAAS,EAAC,wBAAwB,YAC9E,UAAU,GACN,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,CAAC,CAAC,CACR,2BACY,yBAAyB,EACnC,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,EAAE,CAAC,0CAA0C,EAAE,WAAW,IAAI,wBAAwB,CAAC,YAEjG,MAAM,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,EAClB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EAGT;IACC,OAAO,CACL,0BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,4GAA4G,EAAE,SAAS,CAAC,KAClI,KAAK,YAER,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,MAAC,KAAK,CAAC,QAAQ,eACb,aAAI,SAAS,EAAC,gCAAgC,YAAE,IAAI,CAAC,KAAK,GAAM,EAChE,aAAI,SAAS,EAAC,uCAAuC,YAAE,IAAI,CAAC,KAAK,GAAM,KAFpD,CAAC,CAGL,CAClB,CAAC,GACC,CACN,CAAA;AACH,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare function AvatarFrame({ src, imageAlt, letters, pictureGround, ...props }: Omit<React.ComponentProps<"span">, "children"> & {
3
+ src?: string;
4
+ /** The image's own `alt`: `""` when the mark is silent. */
5
+ imageAlt: string;
6
+ letters: string;
7
+ /** The ground under a loaded picture; `style.background` is the letter's. */
8
+ pictureGround: string;
9
+ }): React.JSX.Element;
10
+ export { AvatarFrame };
11
+ //# sourceMappingURL=avatar-frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-frame.d.ts","sourceRoot":"","sources":["../../src/lib/avatar-frame.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA6D9B,iBAAS,WAAW,CAAC,EACnB,GAAG,EACH,QAAQ,EACR,OAAO,EACP,aAAa,EACb,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAClD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,6EAA6E;IAC7E,aAAa,EAAE,MAAM,CAAA;CACtB,qBAkCA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,60 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ /**
5
+ * Keyed by `src`, so a new picture starts at `loading` again rather than
6
+ * inheriting the last one's answer.
7
+ *
8
+ * The load and error events are the main path. An image the browser finished
9
+ * before React hydrated fired its event before React listened, so the effect
10
+ * reads `complete` once: loaded if it has pixels. A finished image with no
11
+ * pixels is a failure, or an SVG with no size of its own; a fresh `Image` on
12
+ * the same URL, served from the cache, fires the event that tells them apart.
13
+ * Until then it is `loading`, which draws what the mark drew before ui#511.
14
+ */
15
+ function usePictureStatus(src) {
16
+ const image = React.useRef(null);
17
+ const [settled, setSettled] = React.useState(null);
18
+ React.useEffect(() => {
19
+ const el = image.current;
20
+ if (!src || !el?.complete)
21
+ return;
22
+ if (el.naturalWidth > 0) {
23
+ setSettled({ src, status: "loaded" });
24
+ return;
25
+ }
26
+ let live = true;
27
+ const probe = new window.Image();
28
+ probe.onload = () => live && setSettled({ src, status: "loaded" });
29
+ probe.onerror = () => live && setSettled({ src, status: "error" });
30
+ probe.src = el.currentSrc || src;
31
+ return () => {
32
+ live = false;
33
+ probe.onload = probe.onerror = null;
34
+ };
35
+ }, [src]);
36
+ const status = !src ? undefined : settled?.src === src ? settled.status : "loading";
37
+ const onLoad = () => {
38
+ if (src)
39
+ setSettled({ src, status: "loaded" });
40
+ };
41
+ const onError = () => {
42
+ if (src)
43
+ setSettled({ src, status: "error" });
44
+ };
45
+ return { image, status, onLoad, onError };
46
+ }
47
+ function AvatarFrame({ src, imageAlt, letters, pictureGround, ...props }) {
48
+ const picture = usePictureStatus(src);
49
+ const loaded = picture.status === "loaded";
50
+ return (
51
+ // `data-picture` only once the load is known, and `style` kept in its own
52
+ // place among the props, so the server's markup is what it was before
53
+ // ui#511, byte for byte (test/avatar-colours-496.test.mjs).
54
+ _jsxs("span", { ...props, style: loaded ? { ...props.style, background: pictureGround } : props.style, "data-picture": picture.status === "loading" ? undefined : picture.status, children: [loaded ? null : (_jsx("span", { "data-slot": "avatar-initials", "aria-hidden": "true", children: letters })), src ? (
55
+ // Over the initials while it loads, alone once it has. Not drawn when it
56
+ // fails, but kept: the element is where a test or devtools reads why.
57
+ _jsx("img", { ref: picture.image, "data-slot": "avatar-image", src: src, alt: imageAlt, style: picture.status === "error" ? { display: "none" } : undefined, onLoad: picture.onLoad, onError: picture.onError, className: "absolute inset-0 size-full object-cover" })) : null] }));
58
+ }
59
+ export { AvatarFrame };
60
+ //# sourceMappingURL=avatar-frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-frame.js","sourceRoot":"","sources":["../../src/lib/avatar-frame.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAkB9B;;;;;;;;;;GAUG;AACH,SAAS,gBAAgB,CAAC,GAAuB;IAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAmB,IAAI,CAAC,CAAA;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AAM,EAAE,OAAO,CAAC,MAAM,EACtB,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,SAAS,EAAC,yCAAyC,GACnD,CACH,CAAC,CAAC,CAAC,IAAI,IACH,CACR,CAAA;AACH,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudgrid-io/ui",
3
- "version": "0.59.1",
3
+ "version": "0.59.3",
4
4
  "description": "CloudGrid design system: React components, brand design tokens, Tailwind theme, self-hosted fonts.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",