@orangelogic/design-system 4.28.0 → 4.29.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.
Files changed (70) hide show
  1. package/library/chunks/{asset-link-format.BEJh0Fqs.js → asset-link-format.DLmg4fTR.js} +387 -381
  2. package/library/chunks/{audio.BZJvTs_4.js → audio.BVQX3_8E.js} +6 -3
  3. package/library/chunks/{bicolor-picker.C0PxxFzf.js → bicolor-picker.C9XSuhnX.js} +1 -1
  4. package/library/chunks/{block-width.CU2PEBrV.js → block-width.rWsXJkoW.js} +553 -529
  5. package/library/chunks/{border-input-group.w-T10AEY.js → border-input-group.DESRXoh1.js} +1 -1
  6. package/library/chunks/{color-picker.CDUhOLEs.js → color-picker.DUEghDon.js} +2 -2
  7. package/library/chunks/{color-swatch-group.DUskDB_p.js → color-swatch-group.Cf9NcMte.js} +45 -45
  8. package/library/chunks/{config-manager.C9OGzzbe.js → config-manager.FRWbPVTc.js} +17 -17
  9. package/library/chunks/{configs-controller.D3dYYbfz.js → configs-controller.R67BMWep.js} +26 -26
  10. package/library/chunks/{document-viewer.C7WOv7ns.js → document-viewer.DZp_IRF7.js} +16 -7
  11. package/library/chunks/{file-on-demand.DUWFRJnE.js → file-on-demand.C_2vBGS3.js} +3 -3
  12. package/library/chunks/{header.qIpzHeNc.js → header.BaWpIXRz.js} +5 -5
  13. package/library/chunks/{image.DzFSYcXq.js → image.BD0t8XU4.js} +1 -1
  14. package/library/chunks/{masonry.D7YK0FcU.js → masonry.B3G5f-eL.js} +1 -1
  15. package/library/chunks/{shadow-input-group.C9DU0Ehy.js → shadow-input-group.CFb61kzG.js} +1 -1
  16. package/library/chunks/src.DKYroWZc.js +720 -0
  17. package/library/chunks/{src.QS2741a8.js → src.fDrPRx_j.js} +8 -8
  18. package/library/chunks/{tab-group.DP9EvXFy.js → tab-group.oiueox5q.js} +627 -627
  19. package/library/chunks/{tab.C2OFvGGj.js → tab.Dd0cNxxc.js} +12 -8
  20. package/library/chunks/{url.CZO_DV8Y.js → url.BCc06dE7.js} +15 -6
  21. package/library/chunks/{video.BHfy8igQ.js → video.Ba5xl_3K.js} +1 -1
  22. package/library/components/asset-link-format.js +1 -1
  23. package/library/components/atoms.js +9 -9
  24. package/library/components/audio.js +1 -1
  25. package/library/components/bicolor-picker.js +1 -1
  26. package/library/components/border-input-group.js +1 -1
  27. package/library/components/color-picker.js +1 -1
  28. package/library/components/color-swatch-group.js +1 -1
  29. package/library/components/document-viewer.js +1 -1
  30. package/library/components/file-on-demand.js +1 -1
  31. package/library/components/header.js +1 -1
  32. package/library/components/image.js +1 -1
  33. package/library/components/masonry.js +1 -1
  34. package/library/components/molecules.js +4 -4
  35. package/library/components/organisms.js +3 -3
  36. package/library/components/shadow-input-group.js +1 -1
  37. package/library/components/tab-group.js +1 -1
  38. package/library/components/tab.js +1 -1
  39. package/library/components/types.js +12189 -12008
  40. package/library/components/video.js +1 -1
  41. package/library/package.json +1 -1
  42. package/library/packages/atoms/src/components/audio/audio.d.ts +2 -0
  43. package/library/packages/atoms/src/components/document-viewer/document-viewer.d.ts +6 -0
  44. package/library/packages/atoms/src/components/tab-group/tab-group.d.ts +65 -7
  45. package/library/packages/events/src/events.d.ts +0 -4
  46. package/library/packages/hybrid/rich-text/src/rich-text.d.ts +9 -0
  47. package/library/packages/organisms/src/content-builder/blocks/audio/audio.d.ts +13 -0
  48. package/library/packages/organisms/src/content-builder/blocks/button/button.d.ts +8 -0
  49. package/library/packages/organisms/src/content-builder/blocks/column/column.d.ts +5 -0
  50. package/library/packages/organisms/src/content-builder/blocks/column-group/column-group.d.ts +5 -0
  51. package/library/packages/organisms/src/content-builder/blocks/document-viewer/document-viewer.d.ts +8 -0
  52. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +16 -13
  53. package/library/packages/organisms/src/content-builder/blocks/timeline/timeline.d.ts +0 -2
  54. package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +9 -0
  55. package/library/packages/organisms/src/content-builder/components/template-manager/template-manager.d.ts +11 -0
  56. package/library/packages/organisms/src/content-builder/content-builder.d.ts +17 -1
  57. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +15 -6
  58. package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +1 -1
  59. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  60. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +28 -0
  61. package/library/packages/utils/src/asset-url-mode/asset-url-mode.d.ts +22 -0
  62. package/library/packages/utils/src/asset-url-mode/index.d.ts +1 -0
  63. package/library/packages/utils/src/url/url.d.ts +7 -0
  64. package/library/react-web-component.d.ts +25 -1
  65. package/library/utils.js +28 -706
  66. package/package.json +1 -1
  67. package/library/packages/events/src/cx-image-src-resolved.d.ts +0 -9
  68. package/library/packages/events/src/cx-timeline-data-resolved.d.ts +0 -9
  69. package/library/packages/events/src/cx-video-src-resolved.d.ts +0 -8
  70. package/library/packages/events/src/cx-video-thumbnail-resolved.d.ts +0 -8
@@ -42,6 +42,34 @@ export declare function isSupportedImageExtension(extension: string): boolean;
42
42
  * Every other format is already transcoded, so this only gates the original.
43
43
  */
44
44
  export declare function canServeOriginalAsImage(docType: string | undefined, extension: string): boolean;
45
+ /**
46
+ * Picks the delivery URL for one item out of the requested `path_*` fields.
47
+ *
48
+ * Under `Auto` the extension decides the proxy; under a manual format an animated source
49
+ * still takes `path_TRX` so it is not flattened. `path_TR1` closes every branch — it is
50
+ * always transcoded, so it works for any source.
51
+ *
52
+ * The chosen URL is the untransformed path from the API, so this is where the `.auto`
53
+ * marker belongs: every branch returns through `pick`, and the caller only adds a `/t/`
54
+ * segment afterwards.
55
+ */
56
+ /** @internal Exported for focused unit coverage of proxy selection. */
57
+ export declare function resolveItemSrc({ autoFormat, buildSrcset, docType, extension, format, item, manualFormat, size, useExpiringAssetUrls, }: {
58
+ autoFormat: boolean;
59
+ buildSrcset: boolean;
60
+ docType: string | undefined;
61
+ extension: string | undefined;
62
+ format: string | undefined;
63
+ item: Record<string, string | undefined>;
64
+ manualFormat: boolean;
65
+ size: string | undefined;
66
+ useExpiringAssetUrls: boolean;
67
+ }): {
68
+ maxHeight?: string;
69
+ maxWidth?: string;
70
+ src?: string;
71
+ srcset?: string;
72
+ };
45
73
  export declare class FetchImageController implements ReactiveController {
46
74
  private readonly host;
47
75
  private data;
@@ -0,0 +1,22 @@
1
+ export declare const EXPIRING_ASSET_PRIMARY_PATH_FIELD = "path_TR1";
2
+ export declare const EXPIRING_ASSET_FALLBACK_PATH_FIELD = "path_TRX";
3
+ type AssetUrlModeTarget = object | null | undefined;
4
+ /** Only stable, non-expiring asset URLs are safe to serialize into page content. */
5
+ export declare function isPersistableAssetUrl(url: string | null | undefined): boolean;
6
+ /** Whether a stored URL already matches the requested permanent/signed delivery mode. */
7
+ export declare function isAssetUrlReusableForMode(url: string | null | undefined, useExpiringAssetUrls: boolean): boolean;
8
+ /** Manual image formats are irrelevant when signed URL delivery takes precedence. */
9
+ export declare function isAssetFormatRequiredForMode(manualFormat: boolean, useExpiringAssetUrls: boolean): boolean;
10
+ /** Set the mode on the window/realm that will perform asset resolution. */
11
+ export declare function setExpiringAssetUrlMode(enabled: boolean, target?: AssetUrlModeTarget): void;
12
+ /** Whether signed asset URLs must be preserved instead of permanently resolved or transformed. */
13
+ export declare function isExpiringAssetUrlMode(target?: AssetUrlModeTarget): boolean;
14
+ /** The value to pass as `getPermanentAssetsPaths`. */
15
+ export declare function resolveGetPermanentAssetsPaths(target?: AssetUrlModeTarget): boolean;
16
+ /**
17
+ * Pick an unmodified signed image path without applying the configured/automatic format.
18
+ * Animated GIFs prefer their original TRX path; other assets use the safe TR1 raster path.
19
+ * TRX remains the last fallback when TR1 is unavailable and the original can render directly.
20
+ */
21
+ export declare function resolveExpiringAssetPathField(asset: Record<string, unknown>, canUseOriginal: boolean, extension?: string): string | undefined;
22
+ export {};
@@ -0,0 +1 @@
1
+ export * from './asset-url-mode';
@@ -42,6 +42,13 @@ export declare function appendQueryParam(url: string, key: string, value: string
42
42
  * carry an expiry marker once they can no longer be served
43
43
  */
44
44
  export declare function isExpiredAssetUrl(url: string | null | undefined): boolean;
45
+ /**
46
+ * Reads the plaintext expiry (Unix seconds) an expiring asset URL carries, or null when it has none.
47
+ *
48
+ * A hint only: the server re-validates the signed token, so a tampered value cannot extend access — the
49
+ * worst a caller achieves is a needless recovery or a stale URL.
50
+ */
51
+ export declare function readAssetTokenExpiry(url: string | null | undefined): number | null;
45
52
  export declare function isValidUrl(urlString: string): boolean;
46
53
  export declare const RELATIVE_URL_REGEX: string;
47
54
  export declare const URL_VALIDATION_REGEX: string;
@@ -2272,6 +2272,10 @@
2272
2272
  * When overflow-variant is "dropdown", keeps a selected hidden tab visible next to the trigger.
2273
2273
  */
2274
2274
  promoteActiveOverflowTab?: boolean;
2275
+ /**
2276
+ * When set to true, the `cx-tab-show` event will be emitted when the user selects the active tab again, even if the active tab is not changed.
2277
+ */
2278
+ forceOnChange?: boolean;
2275
2279
  /**
2276
2280
  * Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
2277
2281
  */
@@ -9596,6 +9600,10 @@
9596
9600
  * The asset transformations applied to the background image.
9597
9601
  */
9598
9602
  backgroundTransformations?: CxColumnTransformation[];
9603
+ /**
9604
+ *
9605
+ */
9606
+ siteBuilderToken?: string;
9599
9607
  /**
9600
9608
  * The object-fit-style crop applied to the background image.
9601
9609
  */
@@ -9678,6 +9686,10 @@
9678
9686
  * The asset transformations applied to the background image.
9679
9687
  */
9680
9688
  backgroundTransformations?: CxColumnGroupTransformation[];
9689
+ /**
9690
+ *
9691
+ */
9692
+ siteBuilderToken?: string;
9681
9693
  /**
9682
9694
  * Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
9683
9695
  */
@@ -10448,7 +10460,7 @@
10448
10460
  preRender?: boolean;
10449
10461
  }
10450
10462
  /**
10451
- * The `cx-content-builder` component is used to create and manage content blocks in a CMS.<br/> Set `enable-asset-format-controls` to expose the asset format, transformation, download-format, and asset-format-picker controls on image, video, gallery, carousel, column-group, and timeline blocks. Off by default.<br/> `default-image-format`, `default-video-poster-format`, `default-timeline-format`, `default-gallery-format` and `default-carousel-format` are retained for backward compatibility but no longer do anything: every block type now starts in `Auto` and derives its proxy from the asset's own file extension.<br/> Several regions of one canvas page can be edited at once: `container-selector` / `initial-data` describe the implicit `page-content` section and `sections` adds more (for CMS5, the `hero` masthead). Each section is mounted inside its own host container of the canvas document and read back with `getSectionContent(id)`; `html()` / `json()` keep returning the page content.
10463
+ * The `cx-content-builder` component is used to create and manage content blocks in a CMS.<br/> Set `enable-asset-format-controls` to expose the asset format, transformation, download-format, and asset-format-picker controls on image, video, gallery, carousel, column-group, and timeline blocks. Off by default. When `use-expiring-asset-urls` is also set, expiring URLs take precedence and the incompatible format and transformation controls stay disabled.<br/> `default-image-format`, `default-video-poster-format`, `default-timeline-format`, `default-gallery-format` and `default-carousel-format` are retained for backward compatibility but no longer do anything: every block type now starts in `Auto` and derives its proxy from the asset's own file extension.<br/> Several regions of one canvas page can be edited at once: `container-selector` / `initial-data` describe the implicit `page-content` section and `sections` adds more (for CMS5, the `hero` masthead). Each section is mounted inside its own host container of the canvas document and read back with `getSectionContent(id)`; `html()` / `json()` keep returning the page content.
10452
10464
  */
10453
10465
  interface CxContentBuilderAttributes extends HTMLAttributes<CxContentBuilder> {
10454
10466
 
@@ -10496,6 +10508,10 @@
10496
10508
  * Whether to expose the asset format / transformation / download-format / asset-format-picker controls in the per-block config sidebar for image, video, gallery, carousel, and timeline blocks. <br/>@default false
10497
10509
  */
10498
10510
  enableAssetFormatControls?: boolean;
10511
+ /**
10512
+ * Whether the server mints expiring asset URLs for this instance (42ASN5). When set, resolutions stop asking for permanent asset paths, which on the server would create the permanent anonymous link this feature removes. When this and `enable-asset-format-controls` are both true, expiring URLs take precedence and the incompatible controls stay disabled.
10513
+ */
10514
+ useExpiringAssetUrls?: boolean;
10499
10515
  /**
10500
10516
  * Whether the content builder emits `ol:ui-metric` events timing each user action, for collection as browser OpenTelemetry histograms. <br/> Off by default: when false no timers are armed and no events are dispatched, so an unmonitored site pays nothing for this being here. <br/>@default false
10501
10517
  */
@@ -10562,6 +10578,10 @@
10562
10578
  * Page-scoped security-bypass token, stamped by the server on this element in read-mode HTML. The viewer uses it for its batched Search call and distributes it to its record-id children (which consume it as `siteBuilderToken`). Empty on authenticated/preview pages.
10563
10579
  */
10564
10580
  securityBypassToken?: string;
10581
+ /**
10582
+ * Whether the server minted expiring asset URLs for this page (42ASN5). When present, resolutions must not ask for permanent asset paths — on the server that request creates the permanent anonymous link this feature removes. Set from the host attribute, same as `security-bypass-token`.
10583
+ */
10584
+ useExpiringAssetUrls?: boolean;
10565
10585
  /**
10566
10586
  * Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
10567
10587
  */
@@ -11516,6 +11536,10 @@
11516
11536
  * Whether to expose asset format / transformation / download-format / asset-format-picker controls for image, video, gallery, carousel, and timeline blocks. Should match the host `cx-content-builder` setting. <br/>@default false
11517
11537
  */
11518
11538
  enableAssetFormatControls?: boolean;
11539
+ /**
11540
+ * Whether the server mints expiring asset URLs for this instance (42ASN5). When set, resolutions stop asking for permanent asset paths, which on the server would create the permanent anonymous link this feature removes. When this and `enable-asset-format-controls` are both true, expiring URLs take precedence and the incompatible controls stay disabled.
11541
+ */
11542
+ useExpiringAssetUrls?: boolean;
11519
11543
  /**
11520
11544
  * Exposes the font family / style / weight pickers in the block config sidebar. Should match the host `cx-content-builder` setting. <br/>@default false
11521
11545
  */