@orangelogic/design-system 2.129.0 → 2.130.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,9 +1,9 @@
1
1
  import { _ as kd, a as Sa, b as Be, c as Je } from "../chunks/inheritsLoose.BuSn_CvZ.js";
2
2
  import { c as ps, a as Bn } from "../chunks/_commonjsHelpers.DQNKXVTB.js";
3
3
  import { r as Sb } from "../chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js";
4
- import { C as Cb } from "../chunks/image.CDrKFe1H.js";
4
+ import { C as Cb } from "../chunks/image.BC_hwk-b.js";
5
5
  import Mb from "./resize-observer.js";
6
- import { r as Db, R as Pb, a as Rp, b as Lb } from "../chunks/resizable-component.styles.DpK0TTP5.js";
6
+ import { r as Db, R as Pb, a as Rp, b as Lb } from "../chunks/resizable-component.styles.BVhOesNE.js";
7
7
  import { c as Rb } from "../chunks/component.styles.CRO4Odto.js";
8
8
  import { b as Ib } from "../chunks/browser.BHOCIF_A.js";
9
9
  import { c as Ob } from "../chunks/custom-element.L4WJXn1j.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.129.0",
4
+ "version": "2.130.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -2,13 +2,14 @@ import { default as ResizableElement } from '../../../../base/src/resizable-elem
2
2
  import { ObjectFit } from '../../../../types/src/index.ts';
3
3
  import { ClickHandlerType } from '../../../../types/src/image';
4
4
  import { LocalizeController } from '../../../../utils/src/custom-element/i18n';
5
- import { TemplateResult } from 'lit';
5
+ import { nothing, TemplateResult } from 'lit';
6
6
  import { Zoom } from 'medium-zoom';
7
7
  import { default as CxIcon } from '../icon/icon';
8
8
  import { default as CxPopup } from '../popup/popup';
9
9
  import { default as CxResizeObserver } from '../resize-observer/resize-observer';
10
10
  import { default as CxSkeleton } from '../skeleton/skeleton';
11
11
  import { default as CxSpace } from '../space/space';
12
+ import { default as CxSpinner } from '../spinner/spinner';
12
13
 
13
14
  /**
14
15
  * @summary Images are wrappers for img elements with built-in lazy loading, skeleton, and fallback support.
@@ -16,7 +17,8 @@ import { default as CxSpace } from '../space/space';
16
17
  *
17
18
  * @csspart image - The `img` element.
18
19
  * @csspart skeleton - The skeleton element, will be shown while the image is loading and the `skeleton` property is set.
19
- * @csspart fallback - The fallback element, will be shown if the image fails to load and the `fallback` property is set.
20
+ * @csspart retry-spinner - The spinner overlay shown while a failed load is being retried (when `retry-on-error` is enabled).
21
+ * @csspart fallback - The fallback element, always shown when the image fails to load (after retries, when applicable).
20
22
  * @csspart base - The component’s outer wrapper.
21
23
  * @csspart fallback-icon - The icon rendered inside the fallback slot.
22
24
  *
@@ -27,6 +29,7 @@ import { default as CxSpace } from '../space/space';
27
29
  * @cssproperty --padding-bottom - The padding-bottom of the image (this will override the `--padding` property).
28
30
  * @cssproperty --border-radius - The border-radius of the image.
29
31
  * @cssproperty --border - The border of the image.
32
+ * @cssproperty [--fallback-icon-color=var(--cx-input-icon-color)] - The color of the icon shown when the image fails to load.
30
33
  *
31
34
  * @event cx-load - Emitted when the image has loaded.
32
35
  * @event cx-error - Emitted when the image has failed to load (after all retry attempts when `retry-on-error` is enabled).
@@ -34,7 +37,7 @@ import { default as CxSpace } from '../space/space';
34
37
  * @event cx-image-zoom-close - Emitted when the image zoom is closed.
35
38
  *
36
39
  * @slot skeleton - The skeleton element, will be shown while the image is loading and the `skeleton` property is set.
37
- * @slot fallback - The fallback element, will be shown if the image fails to load and the `fallback` property is set.
40
+ * @slot fallback - The fallback element, always shown when the image fails to load; override this slot to customize the broken-image UI.
38
41
  */
39
42
  export default class CxImage extends ResizableElement {
40
43
  static readonly styles: import('lit').CSSResult[];
@@ -44,17 +47,20 @@ export default class CxImage extends ResizableElement {
44
47
  'cx-resize-observer': typeof CxResizeObserver;
45
48
  'cx-skeleton': typeof CxSkeleton;
46
49
  'cx-space': typeof CxSpace;
50
+ 'cx-spinner': typeof CxSpinner;
47
51
  };
48
52
  readonly localize: LocalizeController;
49
53
  imageElement?: HTMLImageElement;
50
54
  zoomImageElement: HTMLImageElement;
51
55
  highlighterElement: HTMLDivElement;
52
- private _retryCount;
53
- private _retryTimer;
56
+ private retryCount;
57
+ private retryTimer;
54
58
  isLoaded: boolean;
55
59
  isError: boolean;
60
+ /** True while a load has failed and a retry is scheduled or in-flight (retry-on-error only). */
61
+ isRetrying: boolean;
56
62
  /** Incremented on each retry attempt to force the img element to remount via keyed(). */
57
- private _retryIndex;
63
+ private retryIndex;
58
64
  /**
59
65
  * The path to the image to load.
60
66
  */
@@ -76,7 +82,9 @@ export default class CxImage extends ResizableElement {
76
82
  */
77
83
  skeleton: boolean;
78
84
  /**
79
- * Should show the fallback image when the image fails to load.
85
+ * @deprecated No longer required: the broken-image UI now always renders when the image
86
+ * fails to load, regardless of this property's value. Kept only for backward compatibility
87
+ * with existing markup that sets the `fallback` attribute.
80
88
  */
81
89
  fallback: boolean;
82
90
  /**
@@ -177,7 +185,7 @@ export default class CxImage extends ResizableElement {
177
185
  protected handleClickAction(event: MouseEvent): void;
178
186
  updated(changedProps: Map<string, unknown>): void;
179
187
  openZoom(): void;
180
- protected renderContent(): TemplateResult;
188
+ protected renderContent(): TemplateResult | typeof nothing;
181
189
  render(): TemplateResult;
182
190
  }
183
191
  declare global {
@@ -60,11 +60,12 @@ export default class HighlightableElement extends CortexElement {
60
60
  */
61
61
  isHovering: boolean;
62
62
  get easeCSSVariable(): string;
63
- getHighlighterClass(): {
63
+ getHighlighterClass(isError?: boolean): {
64
64
  [x: string]: boolean;
65
65
  highlighter: boolean;
66
66
  'highlighter--background': boolean;
67
67
  'highlighter--border': boolean;
68
+ 'highlighter--centered': boolean;
68
69
  'highlighter--color-overlay': boolean;
69
70
  'highlighter--drop-shadow': boolean;
70
71
  'highlighter--opacity': boolean;
@@ -63,8 +63,9 @@ export default class CxAssetPicker extends CortexElement {
63
63
  */
64
64
  onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[], restrictType?: AssetTypeString) => Promise<Asset | Record<string, Asset>>) | undefined;
65
65
  /**
66
- * An optional record ID used to fetch a clean preview image, bypassing any
67
- * stored URL that may have transformations applied.
66
+ * An optional record ID (or space-separated list of record IDs, for `multiple`
67
+ * pickers) used to fetch a clean preview image and title, bypassing any stored
68
+ * URL/name that may be stale or have transformations applied.
68
69
  */
69
70
  recordId: string;
70
71
  /** When true, uses the Site Builder search endpoint for asset fetching. */
@@ -224,7 +224,7 @@ export default class CxBentoGrid extends CortexElement {
224
224
  private getItemSize;
225
225
  /**
226
226
  * Determines the number of columns for the grid based on the current
227
- * container width and breakpoints. Also builds filledData when filler is active.
227
+ * window width and breakpoints. Also builds filledData when filler is active.
228
228
  */
229
229
  private setupGrid;
230
230
  /**
@@ -10,6 +10,12 @@ export declare class ConfigFormController implements ReactiveController {
10
10
  private readonly pendingGalleryPickerSaves;
11
11
  constructor(host: ReactiveControllerHost & CxConfigForm);
12
12
  hostConnected(): void;
13
+ /**
14
+ * `TRX` proxies preserve the asset's original extension. When that extension is not a
15
+ * browser-displayable image format, fall back to the `TR1` transformation proxy, which is
16
+ * always transcoded to a raster format. Mirrors the same fallback in `FetchImageController`
17
+ * (used by the gallery/timeline blocks) and `cx-asset-transformation-dialog`.
18
+ */
13
19
  private resolveAssetFormatSrc;
14
20
  private handleStyleChange;
15
21
  private handleAttributeChange;
@@ -2502,7 +2502,7 @@
2502
2502
  */
2503
2503
  skeleton?: boolean;
2504
2504
  /**
2505
- * Should show the fallback image when the image fails to load.
2505
+ * @deprecated No longer required: the broken-image UI now always renders when the image fails to load, regardless of this property's value. Kept only for backward compatibility with existing markup that sets the `fallback` attribute.
2506
2506
  */
2507
2507
  fallback?: boolean;
2508
2508
  /**
@@ -5830,7 +5830,7 @@
5830
5830
  */
5831
5831
  restrict?: boolean;
5832
5832
  /**
5833
- * An optional record ID used to fetch a clean preview image, bypassing any stored URL that may have transformations applied.
5833
+ * An optional record ID (or space-separated list of record IDs, for `multiple` pickers) used to fetch a clean preview image and title, bypassing any stored URL/name that may be stale or have transformations applied.
5834
5834
  */
5835
5835
  recordId?: string;
5836
5836
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.129.0",
4
+ "version": "2.130.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {