@orangelogic/design-system 3.10.0 → 3.12.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 (120) hide show
  1. package/library/chunks/{asset-link-format.BLKOUD2l.js → asset-link-format.f7Khv8SZ.js} +646 -642
  2. package/library/chunks/{button.w0zH5Ivx.js → button.-Jl_NdgM.js} +1 -1
  3. package/library/chunks/{color-swatch-group.Bvq6xkM-.js → color-swatch-group.Ib1WYbMl.js} +10 -10
  4. package/library/chunks/{color-swatch.Caved2kL.js → color-swatch.Dc-IqxsX.js} +1 -1
  5. package/library/chunks/{confirm-popover.BpYjy5nJ.js → confirm-popover.mgYIjZdo.js} +3 -3
  6. package/library/chunks/{dialog.ICoCAj6Z.js → dialog.YFc-HBc5.js} +2 -2
  7. package/library/chunks/{document-viewer.CRMRT7Ou.js → document-viewer.CMET1HRd.js} +7 -7
  8. package/library/chunks/{dot-pagination.CzVpiv00.js → dot-pagination.BgETAL2j.js} +1 -1
  9. package/library/chunks/{folder-select.CP0NPc0S.js → folder-select.Hl51n0ge.js} +4 -4
  10. package/library/chunks/{header.BQg_JjHw.js → header.BeZml2NV.js} +2 -2
  11. package/library/chunks/{i18n.BA19xtyU.js → i18n.CNnI4-0K.js} +4 -0
  12. package/library/chunks/{icon-button.BWJ1Vqn5.js → icon-button.ENVA7x3u.js} +1 -1
  13. package/library/chunks/{iframe.Dm-nXSBv.js → iframe.Cgy_DE7W.js} +1 -1
  14. package/library/chunks/{image.BsLsWySo.js → image.rtjsax7e.js} +2 -2
  15. package/library/chunks/{index.CExDr5Lh.js → index.BBLDucoY.js} +584 -619
  16. package/library/chunks/{input.D1TGTsxj.js → input.BJ5LN8of.js} +1 -1
  17. package/library/chunks/{markdown.CnX2rNeb.js → markdown.CrIkpd0h.js} +2 -2
  18. package/library/chunks/{menu-item.uFqeX_J6.js → menu-item.DfsfX25P.js} +1 -1
  19. package/library/chunks/{option.jeaj7_Lr.js → option.B34is9Z5.js} +1 -1
  20. package/library/chunks/{pagination.DDW-Lw16.js → pagination.DMAcWRyI.js} +5 -5
  21. package/library/chunks/{tab-group.Dpj7Lx8_.js → tab-group.D14m1Kel.js} +4 -4
  22. package/library/chunks/{toast.CCWVobz5.js → toast.CGIDPKV8.js} +1 -1
  23. package/library/chunks/transformation.OaRYixzE.js +385 -0
  24. package/library/chunks/{tree.DYFFjW1-.js → tree.BEFWro0D.js} +1 -1
  25. package/library/chunks/{types.CQDQXXnW.js → types.IAKAUHSg.js} +21505 -21291
  26. package/library/components/alert.js +2 -2
  27. package/library/components/asset-link-format.js +4 -4
  28. package/library/components/atoms.js +15 -15
  29. package/library/components/audio.js +2 -2
  30. package/library/components/border-input-group.js +2 -2
  31. package/library/components/breadcrumb.js +1 -1
  32. package/library/components/button.js +2 -2
  33. package/library/components/color-picker.js +3 -3
  34. package/library/components/color-swatch-group.js +5 -5
  35. package/library/components/color-swatch.js +2 -2
  36. package/library/components/confirm-popover.js +4 -4
  37. package/library/components/copy-button.js +1 -1
  38. package/library/components/corner-position-input-group.js +3 -3
  39. package/library/components/date-calendar.js +1 -1
  40. package/library/components/details.js +1 -1
  41. package/library/components/dialog.js +3 -3
  42. package/library/components/document-viewer.js +3 -3
  43. package/library/components/dot-pagination.js +2 -2
  44. package/library/components/drawer.js +2 -2
  45. package/library/components/dropdown.js +2 -2
  46. package/library/components/dynamic-select.js +4 -4
  47. package/library/components/e-chart.js +1 -1
  48. package/library/components/element-clamp.js +2 -2
  49. package/library/components/file-on-demand.js +9 -9
  50. package/library/components/folder-select.js +4 -4
  51. package/library/components/format-bytes.js +1 -1
  52. package/library/components/format-date.js +1 -1
  53. package/library/components/format-number.js +1 -1
  54. package/library/components/format-time.js +1 -1
  55. package/library/components/header.js +2 -2
  56. package/library/components/icon-button.js +2 -2
  57. package/library/components/iframe.js +2 -2
  58. package/library/components/image-comparer.js +1 -1
  59. package/library/components/image.js +2 -2
  60. package/library/components/input.js +2 -2
  61. package/library/components/line-clamp.js +1 -1
  62. package/library/components/markdown.js +3 -3
  63. package/library/components/masonry.js +2 -2
  64. package/library/components/menu-item.js +2 -2
  65. package/library/components/menu.js +2 -2
  66. package/library/components/molecules.js +3 -3
  67. package/library/components/option.js +2 -2
  68. package/library/components/organisms.js +2 -2
  69. package/library/components/padding-input-group.js +1 -1
  70. package/library/components/pagination.js +6 -6
  71. package/library/components/popup.js +1 -1
  72. package/library/components/position-picker.js +1 -1
  73. package/library/components/progress-bar.js +1 -1
  74. package/library/components/progress-ring.js +1 -1
  75. package/library/components/range.js +1 -1
  76. package/library/components/rating.js +1 -1
  77. package/library/components/relative-time.js +1 -1
  78. package/library/components/select.js +2 -2
  79. package/library/components/shadow-input-group.js +1 -1
  80. package/library/components/share-option-list.js +1 -1
  81. package/library/components/sidebar.js +1 -1
  82. package/library/components/size-input-group.js +3 -3
  83. package/library/components/spinner.js +1 -1
  84. package/library/components/split-panel.js +1 -1
  85. package/library/components/tab-group.js +5 -5
  86. package/library/components/tab.js +2 -2
  87. package/library/components/tag.js +2 -2
  88. package/library/components/tooltip.js +1 -1
  89. package/library/components/tree-item.js +2 -2
  90. package/library/components/tree.js +2 -2
  91. package/library/components/typeface.js +2 -2
  92. package/library/components/types.js +267 -267
  93. package/library/components/video.js +2 -2
  94. package/library/package.json +1 -1
  95. package/library/packages/events/src/cx-publish-page-cancel.d.ts +6 -0
  96. package/library/packages/events/src/cx-publish-page-submit.d.ts +9 -0
  97. package/library/packages/events/src/cx-view-and-sort-action-click.d.ts +11 -0
  98. package/library/packages/events/src/events.d.ts +3 -0
  99. package/library/packages/molecules/src/index.d.ts +1 -0
  100. package/library/packages/molecules/src/publish-page/publish-page.d.ts +169 -0
  101. package/library/packages/molecules/src/publish-page/publish-page.styles.d.ts +2 -0
  102. package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +7 -0
  103. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +2 -0
  104. package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +1 -0
  105. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +0 -25
  106. package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +8 -0
  107. package/library/packages/organisms/src/content-builder/content-builder.d.ts +39 -25
  108. package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +0 -5
  109. package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
  110. package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +11 -1
  111. package/library/packages/organisms/src/template-switcher/template-switcher-example.data.d.ts +1 -0
  112. package/library/packages/organisms/src/template-switcher/template-switcher.d.ts +3 -0
  113. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +10 -0
  114. package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
  115. package/library/packages/types/src/content-builder.d.ts +0 -5
  116. package/library/packages/utils/src/transformation/transformation.d.ts +10 -29
  117. package/library/react-web-component.d.ts +116 -13
  118. package/library/utils.js +95 -96
  119. package/package.json +1 -1
  120. package/library/chunks/transformation.D27sTUdZ.js +0 -392
@@ -1,13 +1,13 @@
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.BsLsWySo.js";
4
+ import { C as Cb } from "../chunks/image.rtjsax7e.js";
5
5
  import Mb from "./resize-observer.js";
6
6
  import { r as Db, R as Pb, a as Rp, b as Lb } from "../chunks/resizable-component.styles.CAfXABBc.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";
10
- import { L as kb } from "../chunks/i18n.BA19xtyU.js";
10
+ import { L as kb } from "../chunks/i18n.CNnI4-0K.js";
11
11
  import { w as Ki } from "../chunks/watch.DJF5K-8U.js";
12
12
  import { i as Bb, x as Qc } from "../chunks/lit-element.jLBm65_O.js";
13
13
  import { n as Ri } from "../chunks/lib-cortex-element.CVMmyPMC.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "3.10.0",
4
+ "version": "3.12.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -0,0 +1,6 @@
1
+ export type CxPublishPageCancelEvent = CustomEvent<Record<PropertyKey, never>>;
2
+ declare global {
3
+ interface GlobalEventHandlersEventMap {
4
+ 'cx-publish-page-cancel': CxPublishPageCancelEvent;
5
+ }
6
+ }
@@ -0,0 +1,9 @@
1
+ export type CxPublishPageSubmitEvent = CustomEvent<{
2
+ description: string;
3
+ versionName: string;
4
+ }>;
5
+ declare global {
6
+ interface GlobalEventHandlersEventMap {
7
+ 'cx-publish-page-submit': CxPublishPageSubmitEvent;
8
+ }
9
+ }
@@ -0,0 +1,11 @@
1
+ export type CxViewAndSortActionClickEvent = CustomEvent<{
2
+ /** The action's own event name, opaque to the menu. */
3
+ eventName: string;
4
+ /** The menu item's value. */
5
+ value: string;
6
+ }>;
7
+ declare global {
8
+ interface GlobalEventHandlersEventMap {
9
+ 'cx-view-and-sort-action-click': CxViewAndSortActionClickEvent;
10
+ }
11
+ }
@@ -151,6 +151,8 @@ export * from './cx-pdf-viewer-toolbar-scale-change';
151
151
  export * from './cx-pdf-viewer-toolbar-view-toggle';
152
152
  export * from './cx-pdf-viewer-view-on-asset-toggle';
153
153
  export * from './cx-ready';
154
+ export * from './cx-publish-page-cancel';
155
+ export * from './cx-publish-page-submit';
154
156
  export * from './cx-redo';
155
157
  export * from './cx-refresh';
156
158
  export * from './cx-register-tag';
@@ -253,6 +255,7 @@ export * from './cx-video-seeked';
253
255
  export * from './cx-video-segment-change';
254
256
  export * from './cx-video-time-update';
255
257
  export * from './cx-video-thumbnail-resolved';
258
+ export * from './cx-view-and-sort-action-click';
256
259
  export * from './cx-view-logs';
257
260
  export * from './cx-xml-editor-asset-type-change';
258
261
  export * from './cx-xml-editor-change';
@@ -32,6 +32,7 @@ export { default as CxPaddingInputGroup } from './padding-input-group/padding-in
32
32
  export { default as CxPageOutline } from './page-outline/page-outline';
33
33
  export { default as CxPdfViewerToolbar } from './pdf-viewer-toolbar/pdf-viewer-toolbar';
34
34
  export { default as CxPositionPicker } from './position-picker/position-picker';
35
+ export { default as CxPublishPage } from './publish-page/publish-page';
35
36
  export { default as CxSearchBox } from './search-box/search-box';
36
37
  export { default as CxShadowInputGroup } from './shadow-input-group/shadow-input-group';
37
38
  export { default as CxShareOptionList } from './share-option-list/share-option-list';
@@ -0,0 +1,169 @@
1
+ import { default as CortexElement } from '../../../base/src/cortex-element.ts';
2
+ import { CxAfterHideEvent, CxChangeEvent, CxInitialFocusEvent, CxInputEvent, CxRequestCloseEvent } from '../../../events/src/events.ts';
3
+ import { CSSResultGroup } from 'lit';
4
+
5
+ /**
6
+ * @summary Collects the version metadata needed to publish a CMS page: a required version name, a
7
+ * read-only version number, and an optional description.
8
+ *
9
+ * @description Presentational only — it performs no network calls. The host listens for
10
+ * `cx-publish-page-submit` and owns the actual publish. Labels are supplied as properties so the
11
+ * server can drive them from configuration; each falls back to a localized term.
12
+ *
13
+ * @event {{ description: string, publishAncestors: boolean, versionName: string }}
14
+ * cx-publish-page-submit - The publish button was activated and the version name passed validation.
15
+ * `publishAncestors` reports the user's answer to the ancestors question, and is true when the page
16
+ * has no unpublished ancestors to decide about.
17
+ * @event cx-publish-page-cancel - The cancel button was activated, or Escape was pressed.
18
+ *
19
+ * @csspart base - The dialog element.
20
+ * @csspart header - The heading block in the dialog's label slot.
21
+ * @csspart title - The form heading.
22
+ * @csspart page-name - The name of the page being published.
23
+ * @csspart status - The page status badge.
24
+ * @csspart ancestors - The block asking what to do about unpublished ancestors.
25
+ * @csspart ancestors-warning - The warning naming pages that will also be published.
26
+ * @csspart ancestors-choice - The checkbox choosing whether to publish those pages too.
27
+ * @csspart blocking-error - The reason the page cannot be published at all.
28
+ * @csspart fields - The container that wraps the form fields.
29
+ * @csspart version-name - The version name field.
30
+ * @csspart version-id - The read-only version number field.
31
+ * @csspart description - The description field.
32
+ * @csspart actions - The container that wraps the action buttons.
33
+ * @csspart submit-button - The publish button.
34
+ * @csspart submit-spinner - The spinner shown in the publish button while the host completes a submit.
35
+ * @csspart cancel-button - The cancel button.
36
+ *
37
+ * @cssproperty [--publish-page-width=840px] - The width of the dialog panel.
38
+ */
39
+ export default class CxPublishPage extends CortexElement {
40
+ static readonly styles: CSSResultGroup;
41
+ static readonly dependencies: Record<string, typeof CortexElement>;
42
+ private readonly localize;
43
+ private readonly versionNameInput;
44
+ private readonly dialog;
45
+ /**
46
+ * Whether the dialog is showing. The host opens the dialog before its data has arrived (see
47
+ * `loading`), so this is driven independently of the field values.
48
+ */
49
+ open: boolean;
50
+ /**
51
+ * The host is still fetching the values this form displays. Submitting is refused while true, so an
52
+ * optimistically-opened dialog cannot be submitted against fields that have not loaded yet.
53
+ */
54
+ loading: boolean;
55
+ /** Heading shown at the top of the form. */
56
+ formTitle: string;
57
+ /** Name of the page being published, shown under the heading. */
58
+ pageName: string;
59
+ /** Current status of the page (e.g. "Draft"), shown as a badge beside the page name. */
60
+ statusLabel: string;
61
+ /**
62
+ * Why this page cannot be published at all. Shown in place of the form: there is nothing to fill in
63
+ * for a publish that cannot happen.
64
+ */
65
+ blockingError: string;
66
+ /**
67
+ * Pages that publishing this one will also publish. Shown above the fields so the user sees the
68
+ * consequence before committing, rather than in a separate confirmation step.
69
+ */
70
+ ancestorsWarning: string;
71
+ /** Label for the checkbox that answers the ancestors warning. */
72
+ ancestorsChoiceLabel: string;
73
+ /** Label for the version name field. */
74
+ versionNameLabel: string;
75
+ /** Label for the read-only version number field. */
76
+ versionIdLabel: string;
77
+ /** Label for the description field. */
78
+ descriptionLabel: string;
79
+ /** Placeholder shown in the empty version name field. */
80
+ versionNamePlaceholder: string;
81
+ /** Placeholder shown in the empty description field. */
82
+ descriptionPlaceholder: string;
83
+ /** The version number this publish will produce. Displayed read-only. */
84
+ versionId: string;
85
+ /** Text for the submit button. */
86
+ submitLabel: string;
87
+ /** Text for the cancel button. */
88
+ cancelLabel: string;
89
+ /** Message shown under the version name field when it is left empty. */
90
+ requiredMessage: string;
91
+ /**
92
+ * Disables both buttons while the host completes a submit, so a slow round trip cannot be
93
+ * submitted twice.
94
+ */
95
+ busy: boolean;
96
+ /** The version name entered so far. */
97
+ private versionName;
98
+ /** The description entered so far. */
99
+ private description;
100
+ /** Whether the empty-version-name message is currently shown. */
101
+ private showVersionNameError;
102
+ /**
103
+ * Bumped on every open, and used to key the fields so each visit gets brand-new controls.
104
+ *
105
+ * Clearing the values is not enough on its own: the form controller marks a control as
106
+ * user-interacted the first time it is typed into and keeps that flag against the element itself.
107
+ * Because this dialog is created once and reused, the second publish reopened onto an input that
108
+ * was still flagged - empty, required and interacted - so it rendered in its invalid state before
109
+ * the user had touched anything.
110
+ */
111
+ private openCount;
112
+ /**
113
+ * Whether the user has declined to publish the unpublished ancestors along with this page.
114
+ *
115
+ * Held negatively so the default stays `false` while the checkbox reads checked: publishing the
116
+ * ancestors is what the server does unless told otherwise, and it is what keeps the page reachable.
117
+ */
118
+ private skipAncestors;
119
+ /**
120
+ * Start every visit to the dialog from a clean slate. The element is created once and reused for
121
+ * every page, so nothing entered for one publish may carry over to the next - neither the ancestors
122
+ * answer nor the text fields, which describe one specific version.
123
+ *
124
+ * This resets on the transition into open, not on close, so a failed publish keeps what was typed:
125
+ * the dialog stays open in that case, ready to retry.
126
+ */
127
+ handleOpenChange(): void;
128
+ /**
129
+ * The dialog owns focus while it is open, so take the initial focus from its own event rather than
130
+ * from first render - the component may be created and rendered long before it is opened.
131
+ */
132
+ handleInitialFocus(event: CxInitialFocusEvent): void;
133
+ handleVersionNameInput(event: CxInputEvent): void;
134
+ handleAncestorsChoiceChange(event: CxChangeEvent): void;
135
+ handleDescriptionInput(event: CxInputEvent): void;
136
+ /**
137
+ * Enter submits, except inside the description, where it has to insert a newline - the box is
138
+ * multi-line and publishing on Enter would make it unusable.
139
+ *
140
+ * Escape is deliberately not handled here: the dialog already closes itself on Escape and reports it
141
+ * through cx-request-close, so handling it too would emit cancel twice.
142
+ */
143
+ handleKeyDown(event: KeyboardEvent): void;
144
+ handleSubmitClick(): void;
145
+ handleCancelClick(): void;
146
+ /**
147
+ * The dialog's own close affordances - close button, Escape, overlay click - are a cancel. Let the
148
+ * dialog run its hide animation; the host closes it by clearing `open`.
149
+ */
150
+ handleRequestClose(event: CxRequestCloseEvent): void;
151
+ /** Keep `open` in step when the dialog hides itself, so reopening it works. */
152
+ handleAfterHide(event: CxAfterHideEvent): void;
153
+ private submit;
154
+ private cancel;
155
+ /**
156
+ * Whether the form is replaced by a notice.
157
+ *
158
+ * Only a blocking error does this. The ancestors warning is informational - publishing goes ahead
159
+ * and takes those pages with it - so hiding the fields for it would hide the required version name
160
+ * and make the page impossible to publish precisely when it has unpublished parents.
161
+ */
162
+ private get hasNotice();
163
+ render(): import('lit').TemplateResult<1>;
164
+ }
165
+ declare global {
166
+ interface HTMLElementTagNameMap {
167
+ 'cx-publish-page': CxPublishPage;
168
+ }
169
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import('lit').CSSResult;
2
+ export default _default;
@@ -21,6 +21,7 @@ import { CSSResultGroup, TemplateResult } from 'lit';
21
21
  * @summary A dropdown menu that accepts a JSON string to render menu items for the template switcher dropdown.
22
22
  *
23
23
  * @event {{ item: MenuItem }} cx-select - Emitted when a menu item is selected.
24
+ * @event {{ eventName: string, value: string }} cx-view-and-sort-action-click - Emitted when a menu item's trailing action icon is pressed. A distinct behavior from selecting the item: `cx-select` is suppressed for that click.
24
25
  *
25
26
  * @cssproperty [--view-and-sort-switch-label-color=var(--cx-color-neutral)] - Label color for switch rows. Switch rows stay neutral because the switch conveys the state; set this to re-enable a checked highlight.
26
27
  */
@@ -59,6 +60,7 @@ export default class CxViewAndSort extends CortexElement {
59
60
  hide(): void;
60
61
  private handleButtonClick;
61
62
  private handleSwitchClick;
63
+ private handleActionClick;
62
64
  /**
63
65
  * Whether an item is one option out of a set the user picks from, such as items per page, and
64
66
  * so needs `aria-checked`. Options share a `group`; switches, buttons, submenu openers and
@@ -68,6 +70,11 @@ export default class CxViewAndSort extends CortexElement {
68
70
  render(): TemplateResult<1>;
69
71
  renderMenuSection(section: MenuSection): TemplateResult;
70
72
  renderMenuItem(item: MenuItem, isHorizontal?: boolean, tooltip?: string): TemplateResult;
73
+ /**
74
+ * Trailing action button for items configured with `action`. Rendered last in
75
+ * the suffix group so it sits at the far right of the row.
76
+ */
77
+ private renderItemAction;
71
78
  }
72
79
  declare global {
73
80
  interface HTMLElementTagNameMap {
@@ -48,6 +48,8 @@ export default class CxSbImage extends CxImage {
48
48
  retryOnError: boolean;
49
49
  /** Content-builder images keep their measured box visible while the asset loads. */
50
50
  skeleton: boolean;
51
+ /** Content-builder blocks hold the box without an animated sheen. */
52
+ protected placeholderSkeletonEffect: "none";
51
53
  /**
52
54
  * The path to the image to load in dark mode.
53
55
  */
@@ -193,6 +193,7 @@ export default class CxSbVideo extends CxVideo {
193
193
  */
194
194
  private resolveClickSpace;
195
195
  handleThumbnailChange(): void;
196
+ handlePosterChange(): Promise<void>;
196
197
  handleFetchedAssetDataChange(): void;
197
198
  handleSrcChange(): Promise<void>;
198
199
  /**
@@ -66,31 +66,6 @@ export default class CxConfigManager extends CortexElement {
66
66
  * @default false
67
67
  */
68
68
  enableFontFamilyControls: boolean;
69
- /**
70
- * Default asset format applied to image blocks.
71
- * @default 'TRX'
72
- */
73
- defaultImageFormat: string;
74
- /**
75
- * Default asset format applied to video poster (thumbnail) blocks.
76
- * @default 'TRX'
77
- */
78
- defaultVideoPosterFormat: string;
79
- /**
80
- * Default asset format applied to gallery blocks.
81
- * @default 'TRX'
82
- */
83
- defaultGalleryFormat: string;
84
- /**
85
- * Default asset format applied to carousel blocks.
86
- * @default 'TRX'
87
- */
88
- defaultCarouselFormat: string;
89
- /**
90
- * Default asset format applied to timeline blocks.
91
- * @default 'TRX'
92
- */
93
- defaultTimelineFormat: string;
94
69
  /**
95
70
  * Root folder ids the folder-picker controls are restricted to (forwarded to
96
71
  * cx-config-form). Sourced from the space's configured root folders.
@@ -93,6 +93,14 @@ export default class CxGalleryPicker extends CortexElement implements CortexForm
93
93
  private readonly maxColumns;
94
94
  private readonly rowHeight;
95
95
  private readonly spacing;
96
+ /**
97
+ * Proxy the picker's thumbnails are always served from.
98
+ *
99
+ * The picker shows the author which asset they are choosing, in a fixed-size grid, so it
100
+ * pins one small proxy instead of following the block's configured format — the format
101
+ * the block will render at says nothing about what this preview needs.
102
+ */
103
+ private static readonly THUMBNAIL_FORMAT;
96
104
  private autofetchController;
97
105
  /** Gets the validity state object */
98
106
  get validity(): {
@@ -18,11 +18,10 @@ import { CxRTEBubbleMenu, CxRTETableGenerator } from './plugins';
18
18
  * download-format, and asset-format-picker controls on image, video, gallery,
19
19
  * carousel, and timeline blocks. Off by default.
20
20
  *
21
- * `default-image-format`, `default-video-poster-format`,
22
- * `default-gallery-format`, `default-carousel-format`, and
23
- * `default-timeline-format` set the initial format for their respective block
24
- * type. All apply regardless of `enable-asset-format-controls`, and act as the
25
- * fallback when a block has not had its format explicitly configured.
21
+ * `default-image-format`, `default-video-poster-format`, `default-timeline-format`,
22
+ * `default-gallery-format` and `default-carousel-format` are retained for backward
23
+ * compatibility but no longer do anything: every block type now starts in `Auto` and
24
+ * derives its proxy from the asset's own file extension.
26
25
  *
27
26
  * @event cx-change - Emitted when the content builder changes.
28
27
  */
@@ -121,38 +120,53 @@ export default class CxContentBuilder extends CortexElement {
121
120
  */
122
121
  enableMetrics: boolean;
123
122
  /**
124
- * Default asset format applied to image blocks.
125
- * Used as the initial format when a block is added, whether or not
126
- * `enable-asset-format-controls` is on.
127
- * @default 'TR1'
123
+ * Retained for backward compatibility; it no longer changes how image blocks resolve.
124
+ *
125
+ * Image blocks always start in `Auto` now: no format is stored on creation or on pick, so
126
+ * each one derives its proxy from the asset's own file extension. Setting this attribute
127
+ * is accepted and reflected, but nothing reads it.
128
+ *
129
+ * @deprecated Image format is resolved from the asset; this value is ignored.
128
130
  */
129
131
  defaultImageFormat: string;
130
132
  /**
131
- * Default asset format applied to video poster (thumbnail) blocks.
132
- * Used as the initial format when a block is added, whether or not
133
- * `enable-asset-format-controls` is on.
134
- * @default 'TR1'
133
+ * Retained for backward compatibility; it no longer changes how video posters resolve.
134
+ *
135
+ * A video poster always starts in `Auto` now: no thumbnail format is stored on creation
136
+ * or on pick, so the proxy is derived from the picked asset. Setting this attribute is
137
+ * accepted and reflected, but nothing reads it.
138
+ *
139
+ * @deprecated Poster format is resolved from the asset; this value is ignored.
135
140
  */
136
141
  defaultVideoPosterFormat: string;
137
142
  /**
138
- * Default asset format applied to gallery blocks.
139
- * Used as the initial format when a block is added, whether or not
140
- * `enable-asset-format-controls` is on.
141
- * @default 'TR1'
143
+ * Retained for backward compatibility; it no longer changes how galleries resolve.
144
+ *
145
+ * A gallery always starts in `Auto` now: no format is stored on creation, and switching
146
+ * source resets back to `Auto`, so each item derives its proxy from its own file
147
+ * extension. Setting this attribute is accepted and reflected, but nothing reads it.
148
+ *
149
+ * @deprecated Format is resolved per item from the asset; this value is ignored.
142
150
  */
143
151
  defaultGalleryFormat: string;
144
152
  /**
145
- * Default asset format applied to carousel blocks.
146
- * Used as the initial format when a block is added, whether or not
147
- * `enable-asset-format-controls` is on.
148
- * @default 'TR1'
153
+ * Retained for backward compatibility; it no longer changes how carousels resolve.
154
+ *
155
+ * A carousel always starts in `Auto` now: no format is stored on creation, and switching
156
+ * source resets back to `Auto`, so each item derives its proxy from its own file
157
+ * extension. Setting this attribute is accepted and reflected, but nothing reads it.
158
+ *
159
+ * @deprecated Format is resolved per item from the asset; this value is ignored.
149
160
  */
150
161
  defaultCarouselFormat: string;
151
162
  /**
152
- * Default asset format applied to timeline blocks.
153
- * Used as the initial format when a block is added, whether or not
154
- * `enable-asset-format-controls` is on.
155
- * @default 'TR1'
163
+ * Retained for backward compatibility; it no longer changes how timelines resolve.
164
+ *
165
+ * Timeline thumbnails always start in `Auto` now: no format is stored on creation, so
166
+ * each item derives its proxy from its own file extension. Setting this attribute is
167
+ * accepted and reflected, but nothing reads it.
168
+ *
169
+ * @deprecated Timeline format is resolved per item from the asset; this value is ignored.
156
170
  */
157
171
  defaultTimelineFormat: string;
158
172
  /**
@@ -4,11 +4,6 @@ import { LocalizeController } from '../../../../utils/src/custom-element/i18n';
4
4
  import { Component, ComponentDefinition, ComponentView, ComponentViewDefinition, Editor } from 'grapesjs';
5
5
 
6
6
  export type EditorPluginOptions = {
7
- defaultCarouselFormat?: string;
8
- defaultGalleryFormat?: string;
9
- defaultImageFormat?: string;
10
- defaultTimelineFormat?: string;
11
- defaultVideoPosterFormat?: string;
12
7
  enableAssetFormatControls?: boolean;
13
8
  localize: LocalizeController;
14
9
  multiLanguage?: boolean;
@@ -21,8 +21,8 @@ export default class StyleController {
21
21
  default?: any;
22
22
  max?: number | undefined;
23
23
  min?: number | undefined;
24
- text?: string | undefined;
25
24
  placeholder?: string;
25
+ text?: string | undefined;
26
26
  category?: (string | import('grapesjs').BlockCategoryProperties) | undefined;
27
27
  command?: string | ((editor: import('grapesjs').Editor, trait: import('grapesjs').Trait) => any) | undefined;
28
28
  step?: number | undefined;
@@ -93,8 +93,18 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
93
93
  * values).
94
94
  */
95
95
  data: DamCustomToolbarButton[];
96
- /** Column definitions forwarded to the inner `cx-list-editor` table. */
96
+ /**
97
+ * Column definitions forwarded to the inner `cx-list-editor` table. Attribute-settable, like
98
+ * `cx-list-editor`'s own `columns`, so a server-rendered host can supply them as JSON.
99
+ */
97
100
  columns: Array<Record<string, unknown>>;
101
+ /**
102
+ * Space that owns the page being configured. Scopes the "Add button" list to that space's
103
+ * quick actions and page buttons. Left empty, the backend resolves the space from the request
104
+ * context, which only answers where the request carries one — a host rendering this editor
105
+ * outside a space page (a settings panel, a popup) must set it or the list comes back empty.
106
+ */
107
+ teamspaceModule: string;
98
108
  /** Boundary element passed to the dialog (typically the content-builder host). */
99
109
  boundary: HTMLElement;
100
110
  /**
@@ -3,3 +3,4 @@ import { MenuData } from '../../../types/src/view-and-sort';
3
3
 
4
4
  export declare const data: TemplateSwitcherProps;
5
5
  export declare const menu: MenuData;
6
+ export declare const singleTableViewData: TemplateSwitcherProps;
@@ -1,4 +1,5 @@
1
1
  import { default as CortexElement } from '../../../base/src/cortex-element.ts';
2
+ import { CxViewAndSortActionClickEvent } from '../../../events/src/events.ts';
2
3
  import { default as CxViewAndSort } from '../../../molecules/src/view-and-sort/view-and-sort.ts';
3
4
  import { ButtonSize, ButtonVariant } from '../../../types/src/button';
4
5
  import { Settings, TemplateSwitcherProps } from '../../../types/src/template-switcher';
@@ -18,6 +19,7 @@ import { TemplateResult } from 'lit';
18
19
  * @property {boolean} _loading - Internal state to indicate if the component is loading.
19
20
  *
20
21
  * @event {{ item: MenuItem }} cx-select - Emitted when a menu item is selected.
22
+ * @event {{ eventName: string, value: string }} cx-view-and-sort-action-click - Emitted when a view's trailing action icon is pressed. Configure it via `Option.action` on a category's single non-setting view. Sends `action.eventName` to Cortex and closes the dropdown without changing the active view.
21
23
  */
22
24
  export default class CxTemplateSwitcher extends CortexElement {
23
25
  static readonly dependencies: {
@@ -47,6 +49,7 @@ export default class CxTemplateSwitcher extends CortexElement {
47
49
  handleSettingsChange(): void;
48
50
  handleAddCortexEvent(eventName: string, value: string, isSetting?: boolean): void;
49
51
  handleItemSelect(event: CustomEvent): void;
52
+ handleActionClick(event: CxViewAndSortActionClickEvent): void;
50
53
  render(): TemplateResult;
51
54
  }
52
55
  declare global {
@@ -14,6 +14,14 @@ type FetchImageControllerOptions = {
14
14
  * asset exactly as stored (an editor preview, say) never picks this up by accident.
15
15
  */
16
16
  autoFormat?: boolean;
17
+ /**
18
+ * Whether items carry a `srcset` resize ladder.
19
+ *
20
+ * Defaults to `false`. A fixed-size surface (an editor preview, a thumbnail strip) renders
21
+ * one known size, so a ladder there only adds `/t/re_w_*` renditions the layout can never
22
+ * use. Opt in from a surface whose images are actually laid out responsively.
23
+ */
24
+ buildSrcset?: boolean;
17
25
  isSiteBuilder?: boolean;
18
26
  maxEnd?: number;
19
27
  pageSize?: number;
@@ -34,6 +42,8 @@ export declare class FetchImageController implements ReactiveController {
34
42
  private readonly isSiteBuilder;
35
43
  /** Whether delivery URLs carry the `.auto` marker. See `FetchImageControllerOptions`. */
36
44
  private readonly autoFormat;
45
+ /** Whether items carry a `srcset` ladder. See `FetchImageControllerOptions`. */
46
+ private readonly buildSrcset;
37
47
  private requestEpoch;
38
48
  constructor(host: ReactiveElement, options?: FetchImageControllerOptions);
39
49
  get totalDataCount(): number;
@@ -10,4 +10,4 @@ import { Schema } from '@tiptap/pm/model';
10
10
  * Constructs the model cannot represent are not dropped: `html_block` and `html_inline` hold their
11
11
  * source verbatim and are replayed on the way out.
12
12
  */
13
- export declare const markdownSchema: Schema<"image" | "blockquote" | "table" | "text" | "heading" | "paragraph" | "frontmatter" | "doc" | "bullet_list" | "code_block" | "horizontal_rule" | "list_item" | "ordered_list" | "table_row" | "table_cell" | "table_header" | "hard_break" | "html_block" | "html_inline", "link" | "code" | "em" | "strong" | "strike">;
13
+ export declare const markdownSchema: Schema<"image" | "heading" | "paragraph" | "table" | "text" | "blockquote" | "frontmatter" | "doc" | "bullet_list" | "code_block" | "horizontal_rule" | "list_item" | "ordered_list" | "table_row" | "table_cell" | "table_header" | "hard_break" | "html_block" | "html_inline", "link" | "code" | "em" | "strong" | "strike">;
@@ -372,11 +372,6 @@ export declare enum DataSourceId {
372
372
  TranslatableTexts = "TRANSLATABLE_TEXTS"
373
373
  }
374
374
  export type ConfigsOptions = {
375
- defaultCarouselFormat?: string;
376
- defaultGalleryFormat?: string;
377
- defaultImageFormat?: string;
378
- defaultTimelineFormat?: string;
379
- defaultVideoPosterFormat?: string;
380
375
  enableAssetFormatControls?: boolean;
381
376
  enableFontFamilyControls?: boolean;
382
377
  };
@@ -18,6 +18,11 @@ export declare function buildTransformationString({ asset, baseUrl, extension, o
18
18
  transformations?: Transformation[];
19
19
  useSession?: string;
20
20
  }): string;
21
+ /**
22
+ * Extension marker that asks the backend to serve whichever rendition suits the asset,
23
+ * rather than the exact file the delivery URL names.
24
+ */
25
+ export declare const AUTO_FORMAT_EXTENSION = ".auto";
21
26
  /**
22
27
  * Applies transformations to a (possibly finished) asset URL and returns the display URL.
23
28
  *
@@ -25,7 +30,11 @@ export declare function buildTransformationString({ asset, baseUrl, extension, o
25
30
  * URLs the transform is anchored right after the access key (before any prettyName/ext tail)
26
31
  * and merged into an existing `/t/`. Other URLs keep the plain append behavior.
27
32
  */
28
- export declare function applyTransformationsToUrl(url: string, transformations: Transformation[]): string;
33
+ export declare function applyTransformationsToUrl(url: string, transformations: Transformation[], options?: {
34
+ autoFormat?: boolean;
35
+ extension?: string | null;
36
+ format?: string;
37
+ }): string;
29
38
  /**
30
39
  * Inserts a width-only resize into an asset-link URL, preserving any transformations
31
40
  * already present.
@@ -97,34 +106,6 @@ export declare function resolveAutoMaxWidth(manualFormat: boolean, proxyWidth: s
97
106
  * silently downgrades an image away from its original.
98
107
  */
99
108
  export declare function resolveAutoFormat(extension: string | null | undefined, size?: string | number | null): string;
100
- /**
101
- * Extension marker that asks the backend to serve whichever rendition suits the asset,
102
- * rather than the exact file the delivery URL names.
103
- */
104
- export declare const AUTO_FORMAT_EXTENSION = ".auto";
105
- /**
106
- * Appends the `.auto` marker to an asset-link URL, letting the backend pick a rendition
107
- * suited to the source instead of returning the file exactly as named.
108
- *
109
- * The existing extension is kept (`photo.jpg` becomes `photo.jpg.auto`): the URL names a
110
- * real proxy file, and rewriting that name is the backend's business, not ours. Only the
111
- * final path segment is touched, so the access key and any `/t/` transform segment are
112
- * preserved and a configured crop or resize still applies.
113
- *
114
- * An animated GIF served as the original file is left alone: whatever rendition the
115
- * backend picked instead would be a still frame, so the marker would cost the animation.
116
- * A GIF under any other format is already a rendered still, so it has nothing left to
117
- * lose and takes the marker like anything else — the same distinction `buildAssetSrcset`
118
- * draws before it resizes.
119
- *
120
- * Returns the URL unchanged when it is not an asset link (arbitrary external sources are
121
- * never rewritten), when there is no final segment to append to, or when the marker is
122
- * already present, so the call is safe to repeat.
123
- */
124
- export declare function applyAutoFormatToAssetUrl(url: string, options?: {
125
- extension?: string | null;
126
- format?: string;
127
- }): string;
128
109
  /**
129
110
  * Builds a `srcset` value for an asset-link URL by emitting one width-only resize
130
111
  * candidate per ladder entry, letting the browser fetch and decode only the pixels