@orangelogic/design-system 2.183.0 → 2.185.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 (89) hide show
  1. package/library/chunks/{asset-link-format.H5j0gJtQ.js → asset-link-format.D--xQVgR.js} +505 -493
  2. package/library/chunks/{button.Dc8L4hcg.js → button.BnkkUqiI.js} +1 -1
  3. package/library/chunks/{color-swatch-group.DqP6pp2u.js → color-swatch-group.BmtcN7Kp.js} +31 -21
  4. package/library/chunks/{confirm-popover.DlIPMgF1.js → confirm-popover.CrQKEChc.js} +2 -2
  5. package/library/chunks/{dialog.BD012ZUN.js → dialog.CWGtufDA.js} +1 -1
  6. package/library/chunks/{document-viewer.DbA73wGD.js → document-viewer.C90j1Xrr.js} +5 -5
  7. package/library/chunks/file_on_demand.BVnxByUA.js +80 -0
  8. package/library/chunks/{folder-select.C4JVju2L.js → folder-select.CIqVGGFl.js} +4 -4
  9. package/library/chunks/{icon-button.CBZkhhs8.js → icon-button.CVrxJcZq.js} +1 -1
  10. package/library/chunks/{icon.BTuMIrIm.js → icon.CpHbi8tH.js} +2 -1
  11. package/library/chunks/{image.CCDdKXjt.js → image.CTMzUqCC.js} +2 -2
  12. package/library/chunks/{input.B5AHlTl-.js → input.33UmFGqR.js} +1 -1
  13. package/library/chunks/{markdown.rDppL64E.js → markdown.DOHru2Rz.js} +1 -1
  14. package/library/chunks/{option.zUMZKPFe.js → option.B6odSlS2.js} +1 -1
  15. package/library/chunks/{pagination.CqJwMe9w.js → pagination.mzolTIpF.js} +4 -4
  16. package/library/chunks/{tab-group.BUj0CO1c.js → tab-group.CjISeeMB.js} +2 -2
  17. package/library/chunks/{tree.CgBxt5my.js → tree.CmEdKtzK.js} +1 -1
  18. package/library/chunks/{url.B17OsCqV.js → url.CGdWC06g.js} +2 -2
  19. package/library/components/alert.js +1 -1
  20. package/library/components/animated-image.js +1 -1
  21. package/library/components/asset-link-format.js +2 -2
  22. package/library/components/atoms.js +13 -13
  23. package/library/components/audio.js +1 -1
  24. package/library/components/avatar.js +1 -1
  25. package/library/components/border-input-group.js +1 -1
  26. package/library/components/breadcrumb.js +1 -1
  27. package/library/components/button.js +2 -2
  28. package/library/components/checkbox.js +1 -1
  29. package/library/components/color-picker.js +3 -3
  30. package/library/components/color-swatch-group.js +1 -1
  31. package/library/components/confirm-popover.js +3 -3
  32. package/library/components/copy-button.js +1 -1
  33. package/library/components/corner-position-input-group.js +2 -2
  34. package/library/components/date-calendar.js +1 -1
  35. package/library/components/details.js +1 -1
  36. package/library/components/dialog.js +2 -2
  37. package/library/components/document-viewer.js +3 -3
  38. package/library/components/drawer.js +1 -1
  39. package/library/components/dropdown.js +1 -1
  40. package/library/components/dynamic-select.js +3 -3
  41. package/library/components/element-clamp.js +1 -1
  42. package/library/components/file-on-demand.js +10 -10
  43. package/library/components/folder-select.js +4 -4
  44. package/library/components/icon-button.js +2 -2
  45. package/library/components/icon.js +1 -1
  46. package/library/components/image-comparer.js +1 -1
  47. package/library/components/image.js +3 -3
  48. package/library/components/input.js +2 -2
  49. package/library/components/line-clamp.js +1 -1
  50. package/library/components/markdown.js +2 -2
  51. package/library/components/masonry.js +2 -2
  52. package/library/components/menu-item.js +87 -78
  53. package/library/components/molecules.js +2 -2
  54. package/library/components/option.js +2 -2
  55. package/library/components/organisms.js +2 -2
  56. package/library/components/padding-input-group.js +1 -1
  57. package/library/components/pagination.js +5 -5
  58. package/library/components/radio.js +1 -1
  59. package/library/components/rating.js +1 -1
  60. package/library/components/select.js +2 -2
  61. package/library/components/shadow-input-group.js +1 -1
  62. package/library/components/share-option-list.js +1 -1
  63. package/library/components/sidebar.js +2 -2
  64. package/library/components/size-input-group.js +2 -2
  65. package/library/components/step.js +1 -1
  66. package/library/components/stepper-wizard.js +1 -1
  67. package/library/components/tab-group.js +3 -3
  68. package/library/components/tab.js +1 -1
  69. package/library/components/tag.js +1 -1
  70. package/library/components/tree-item.js +2 -2
  71. package/library/components/tree.js +1 -1
  72. package/library/components/typeface.js +1 -1
  73. package/library/components/types.js +33193 -32123
  74. package/library/components/video.js +1 -1
  75. package/library/package.json +1 -1
  76. package/library/packages/atoms/src/components/icon/custom-icons/file_on_demand.d.ts +4 -0
  77. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +5 -1
  78. package/library/packages/hybrid/table-core/src/tabulator-tables/core/RowManager.d.ts +4 -0
  79. package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +20 -3
  80. package/library/packages/organisms/src/content-builder/blocks/audio/audio.d.ts +54 -0
  81. package/library/packages/organisms/src/content-builder/blocks/audio/audio.styles.d.ts +2 -0
  82. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +255 -0
  83. package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +223 -0
  84. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +34 -10
  85. package/library/packages/services/src/api/asset/asset.d.ts +1 -1
  86. package/library/packages/types/src/menu-item.d.ts +8 -0
  87. package/library/react-web-component.d.ts +9 -1
  88. package/library/utils.js +2 -2
  89. package/package.json +1 -1
@@ -4,19 +4,31 @@ import { default as CortexLightElement } from '../../../base/src/cortex-light-el
4
4
  * @summary Wraps content-builder output — read mode and the editor canvas alike —
5
5
  * supplying its blocks with data they would otherwise each fetch for themselves.
6
6
  *
7
- * @description Renders no UI. Scans its light-DOM children for blocks linking to a
8
- * space, fetches the space list once, and assigns it as `spaces`. Blocks skip their
9
- * own fetch whenever an ancestor supplies it, so they must sit inside this element
10
- * for that to apply in the editor that means inside the canvas document.
7
+ * @description Scans its light-DOM children for record-id blocks (`cx-sb-image`,
8
+ * `cx-sb-video`, `cx-sb-audio`) and batch-fetches their asset metadata in one Search
9
+ * call, and for blocks linking to a team space (`cx-sb-button`, `cx-sb-image`,
10
+ * `cx-sb-video`), fetching the space list once and assigning it as `spaces`. It also
11
+ * distributes its `securityBypassToken` to every record-id child (including
12
+ * `cx-timeline`, for expired-URL recovery only) so their own runtime Search calls are
13
+ * authorised. Renders no UI. Blocks skip their own fetch whenever an ancestor supplies
14
+ * it, so they must sit inside this element for that to apply — in the editor that means
15
+ * inside the canvas document.
11
16
  *
12
- * They re-resolve their stored space URL because it breaks when the space moves
13
- * domain; doing it per block would repeat one identical request each and race this
14
- * assignment.
17
+ * Space URLs are re-resolved per scan because they break when the space moves domain;
18
+ * doing it per block would repeat one identical request each and race this assignment.
15
19
  */
16
20
  export default class CxContentBuilderViewer extends CortexLightElement {
17
21
  #private;
18
- /** Blocks already populated by a previous scan; skipped on re-scans. */
19
- private readonly processedBlocks;
22
+ /**
23
+ * Page-scoped security-bypass token, stamped by the server on this element in read-mode HTML.
24
+ * The viewer uses it for its batched Search call and distributes it to its record-id children
25
+ * (which consume it as `siteBuilderToken`). Empty on authenticated/preview pages.
26
+ */
27
+ securityBypassToken: string;
28
+ /** Blocks already populated by a previous asset-data scan; skipped on re-scans. */
29
+ private readonly processedFetchableBlocks;
30
+ /** Blocks already populated by a previous space-list scan; skipped on re-scans. */
31
+ private readonly processedSpaceListBlocks;
20
32
  private apiGetTeamSpaceSpaceList;
21
33
  constructor();
22
34
  createRenderRoot(): this;
@@ -25,6 +37,18 @@ export default class CxContentBuilderViewer extends CortexLightElement {
25
37
  /** Blocks arrive in bursts as the page parses, so scans are collapsed. */
26
38
  private scheduleScan;
27
39
  private scanAndFetch;
40
+ /** Give every record-id child the page token so its own runtime fetch is authorised. */
41
+ private distributeToken;
42
+ private scanAndFetchAssetData;
43
+ private collectFetchableBlocks;
44
+ /** The record ID a block would use if it fetched its own asset data right now. */
45
+ private getPrimaryRecordId;
46
+ /** Every field a block could map from fetched asset data. */
47
+ private getRequestedFields;
48
+ private buildFetchPlan;
49
+ private fetchAllAssetData;
50
+ private applyFetchedData;
51
+ private scanAndFetchSpaceList;
28
52
  /**
29
53
  * One request per element, shared by every scan — authoring mutates the tree
30
54
  * constantly, and each burst would otherwise refetch the same list.
@@ -33,7 +57,7 @@ export default class CxContentBuilderViewer extends CortexLightElement {
33
57
  * disabling resolution for the rest of the session.
34
58
  */
35
59
  private fetchSpaceList;
36
- private collectPendingBlocks;
60
+ private collectPendingSpaceListBlocks;
37
61
  private applySpaceList;
38
62
  }
39
63
  declare global {
@@ -30,7 +30,7 @@ export declare const SEARCH_FIELDS: {
30
30
  ORIGINAL_VIEW_SIZE: string;
31
31
  };
32
32
  export declare function resolveAssetExtraFilters(selectedFacets?: Record<string, string[]>): Record<string, string[]>;
33
- export declare function apiSearchAssets({ countPerPage, fields, getPermanentAssetsPaths, isSiteBuilder, pageNumber, query, securityByPassToken, siteUrl, sort, token, useSession, }: SearchAssetsParams): Promise<SearchAssetsResponse>;
33
+ export declare function apiSearchAssets({ countPerPage, fields, getPermanentAssetsPaths, httpMethod, isSiteBuilder, pageNumber, query, securityByPassToken, siteUrl, sort, token, useSession, }: SearchAssetsParams): Promise<SearchAssetsResponse>;
34
34
  export declare function apiGetTransformAssetLink({ assetId, extension, format, siteUrl, token, transformations, useSession, }: {
35
35
  assetId: string;
36
36
  extension?: string;
@@ -3,6 +3,14 @@ export declare enum MenuItemCheckPlacement {
3
3
  Prefix = "prefix",
4
4
  Suffix = "suffix"
5
5
  }
6
+ /** Values accepted by the `aria-current` attribute, indicating what kind of "current" item this represents within a set. */
7
+ export declare enum AriaCurrentValue {
8
+ Date = "date",
9
+ Location = "location",
10
+ Page = "page",
11
+ Step = "step",
12
+ Time = "time"
13
+ }
6
14
  /**
7
15
  * Interface for menu item data that can be shared between events and components
8
16
  * This breaks the circular dependency between events and atoms packages
@@ -577,6 +577,10 @@
577
577
  * Draws the menu item in an active - selected state.
578
578
  */
579
579
  active?: boolean;
580
+ /**
581
+ * Reflects as the item's `aria-current` attribute.
582
+ */
583
+ current?: 'date' | 'location' | 'page' | 'step' | 'time';
580
584
  /**
581
585
  * Makes the menu item readonly
582
586
  */
@@ -9704,7 +9708,7 @@
9704
9708
  */
9705
9709
  transformations?: CxTimelineTransformation[];
9706
9710
  /**
9707
- *
9711
+ * Set by cx-content-builder-viewer (one shared page token); non-reflecting so it isn't written back as a per-block attribute.
9708
9712
  */
9709
9713
  siteBuilderToken?: string;
9710
9714
  /**
@@ -9853,6 +9857,10 @@
9853
9857
  */
9854
9858
  interface CxContentBuilderViewerAttributes extends HTMLAttributes<CxContentBuilderViewer> {
9855
9859
 
9860
+ /**
9861
+ * 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.
9862
+ */
9863
+ securityBypassToken?: string;
9856
9864
  /**
9857
9865
  * Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
9858
9866
  */
package/library/utils.js CHANGED
@@ -1,5 +1,5 @@
1
- import { b as Y } from "./chunks/url.B17OsCqV.js";
2
- import { R as St, f as Et, g as At, h as It, U as Lt, a as Ft, e as Rt, c as bt, i as Vt, r as vt, t as Ot, d as kt } from "./chunks/url.B17OsCqV.js";
1
+ import { b as Y } from "./chunks/url.CGdWC06g.js";
2
+ import { R as St, f as Et, g as At, h as It, U as Lt, a as Ft, d as Rt, c as bt, i as Vt, r as vt, t as Ot, e as kt } from "./chunks/url.CGdWC06g.js";
3
3
  import { j as Ut, f as _t, b as Nt, c as Pt, g as Xt, e as Ht, i as Wt, a as Bt, h as Gt, m as $t, d as qt, r as zt, t as Qt } from "./chunks/toast.CXEAfCvN.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 fe, R as me, 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";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.183.0",
4
+ "version": "2.185.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {