@orangelogic/design-system 2.201.0 → 2.203.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.201.0",
4
+ "version": "2.203.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -42,7 +42,7 @@ export default class CxBentoGrid extends CortexElement {
42
42
  /** Cached viewport height — updated on resize only, not on every scroll. */
43
43
  private _viewportHeight;
44
44
  /** Watches the host element for size changes so the grid reflows when its container resizes. */
45
- private _resizeObserver;
45
+ private resizeObserver;
46
46
  /** Tracks the last emitted range to avoid firing cx-bento-range-change when the range hasn't changed. */
47
47
  private _lastEmittedFirst;
48
48
  private _lastEmittedLast;
@@ -273,6 +273,11 @@ export default class CxBentoGrid extends CortexElement {
273
273
  runConnectedCallback(): void;
274
274
  disconnectedCallback(): void;
275
275
  runFirstUpdated(): void;
276
+ /**
277
+ * ResizeObserver on the container covers both window resize and any container-driven
278
+ * width changes (sidebar toggle, flex layout shifts, etc.).
279
+ */
280
+ private observeContainerResize;
276
281
  /**
277
282
  * Returns the visible viewport height for virtualization.
278
283
  *
@@ -339,8 +344,27 @@ export default class CxBentoGrid extends CortexElement {
339
344
  * instead of stopping it.
340
345
  */
341
346
  private scheduleRowRelease;
342
- /** Clears any pending release and resets the gate back to its initial state. */
347
+ /** Drops the pending release, keeping the rows already released. */
348
+ private cancelRowRelease;
349
+ /**
350
+ * Clears any pending release and resets the gate back to its initial state.
351
+ *
352
+ * Must run BEFORE `computeLayout()` in the same pass: that call ends by arming the
353
+ * next release, and a reset landing after it cancels the arm with nothing left to
354
+ * re-arm, which gates every row for good.
355
+ */
343
356
  private resetRowRelease;
357
+ /**
358
+ * Restarts row gating when the dataset shrinks or is replaced wholesale.
359
+ *
360
+ * Row indices refer to a specific layout, so keeping a release count across a new
361
+ * dataset would let its rows load all at once — the burst this gate exists to prevent.
362
+ * Progress is kept only for an appended page: the new dataset must repeat the previous
363
+ * items, in order, as its prefix, so the already-released rows still hold the same
364
+ * items and the new rows queue behind them. Any other replacement restarts the gate,
365
+ * including a same-length or larger array carrying different items.
366
+ */
367
+ private resetRowReleaseForNewData;
344
368
  /**
345
369
  * Returns the index of the last item whose rowStart is within maxRows.
346
370
  */
@@ -377,21 +401,18 @@ export default class CxBentoGrid extends CortexElement {
377
401
  * idempotent — safe to call again on already-observed elements.
378
402
  */
379
403
  private observeItemContentSlots;
404
+ /**
405
+ * Decides whether this pass restarts row gating, and does so.
406
+ *
407
+ * Must run BEFORE `computeLayout()` — see `resetRowRelease()`.
408
+ */
409
+ private applyRowReleaseResets;
380
410
  willUpdate(changed: PropertyValues): void;
381
411
  /**
382
412
  * Re-syncs row content heights whenever the layout recomputes (containerStyles
383
413
  * changes on every computeLayout() call, including resize-driven reflows) or
384
414
  * the sync-row-content-height flag itself is toggled.
385
415
  */
386
- /**
387
- * Restarts row gating when the dataset shrinks or is replaced wholesale.
388
- *
389
- * Row indices refer to a specific layout, so keeping a release count across a new
390
- * dataset would let its rows load all at once — the burst this gate exists to prevent.
391
- * A dataset that only grew is treated as an appended page: the already-released rows
392
- * still hold the same items, so their progress is kept and the new rows queue behind.
393
- */
394
- handleDataChangeForRowRelease(oldData?: unknown, newData?: unknown): void;
395
416
  handleRowContentHeightSync(): Promise<void>;
396
417
  /**
397
418
  * Get content position based on the size of the item.
@@ -29,6 +29,18 @@ type FetchImageControllerOptions = {
29
29
  token?: string;
30
30
  };
31
31
  export declare function isSupportedImageExtension(extension: string): boolean;
32
+ /**
33
+ * Whether `path_TRX` — the untouched original file — can be served to an `<img>`.
34
+ *
35
+ * Two independent signals have to agree, because each catches what the other misses:
36
+ * a `.psd` is `DocType: Image` yet no browser decodes it, while a source whose extension
37
+ * the API did not report is still ruled out by a `DocType` of `Video` or `Multimedia`
38
+ * (the type a PDF carries). Only `Image` passes, so a media type added later defaults to
39
+ * the transcoded proxy instead of silently reaching an `<img>` as a PDF or an MP4.
40
+ *
41
+ * Every other format is already transcoded, so this only gates the original.
42
+ */
43
+ export declare function canServeOriginalAsImage(docType: string | undefined, extension: string): boolean;
32
44
  export declare class FetchImageController implements ReactiveController {
33
45
  private readonly host;
34
46
  private data;
package/library/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { b as k } from "./chunks/url.CGdWC06g.js";
2
2
  import { R as xt, f as At, g as Et, h as It, U as Lt, a as Ft, d as Rt, c as Ot, i as bt, r as Vt, t as vt, e as _t } from "./chunks/url.CGdWC06g.js";
3
- import { j as Ut, f as Yt, b as Nt, c as Pt, g as Wt, e as Xt, i as Ht, a as Bt, h as Gt, m as $t, d as zt, r as qt, t as Qt } from "./chunks/toast.hZJztBTm.js";
3
+ import { j as Ut, f as Yt, b as Nt, c as Pt, g as Wt, e as Xt, i as Ht, a as Bt, h as Gt, m as $t, d as zt, r as qt, t as Qt } from "./chunks/toast.Ci418pnA.js";
4
4
  import { e as jt, a as Jt, f as Kt, g as te, d as ee, b as re, c as ae, i as se, p as oe, s as ne } from "./chunks/browser.BHOCIF_A.js";
5
5
  import { d as le, C as ce, e as ue, H as me, R as fe, c as he, h as ge, f as de, g as pe, l as De, a as Te, p as we, b as Me } from "./chunks/color.LzSGBy7o.js";
6
6
  import { a as Ce, g as ye } from "./chunks/active-elements.jTVWtBDp.js";
@@ -26,7 +26,7 @@ import { w as br } from "./chunks/watch.DJF5K-8U.js";
26
26
  import { C as vr } from "./chunks/calendar-grid.BWjcZL5W.js";
27
27
  import { b as kr, c as Ur, f as Yr, h as Nr, g as Pr, a as Wr, i as Xr, d as Hr, n as Br, e as Gr, p as $r, t as zr } from "./chunks/date.iWq_pkIk.js";
28
28
  import { f as c, a as u, D as m } from "./chunks/date-picker.BGHn6qg8.js";
29
- import { o as Qr, l as Zr, p as jr, k as Jr, a as Kr, m as ta, b as ea, e as ra, d as aa, f as sa, n as oa, q as na, r as ia, c as la } from "./chunks/transformation.DHEr6Kf3.js";
29
+ import { o as Qr, l as Zr, p as jr, k as Jr, a as Kr, m as ta, b as ea, e as ra, d as aa, f as sa, n as oa, q as na, r as ia, c as la } from "./chunks/transformation.DhMUTZnT.js";
30
30
  import { c as ua, f as ma, e as fa, b as ha, g as ga, d as da, i as pa, r as Da, a as Ta } from "./chunks/image.Y5c_hFx8.js";
31
31
  import { b as Ma, e as Sa } from "./chunks/waveform.1U9U_0rd.js";
32
32
  import { c as ya, b as xa, a as Aa, e as Ea, d as Ia, f as La, g as Fa, r as Ra, s as Oa } from "./chunks/number.Cx2ncfJJ.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.201.0",
4
+ "version": "2.203.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {