@orangelogic/design-system 2.196.0 → 2.198.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.
- package/library/chunks/{asset-link-format.BFxmPgwt.js → asset-link-format.B_Im2jz7.js} +643 -639
- package/library/chunks/{color-swatch-group.C0BXFL4I.js → color-swatch-group.DyOxAUOC.js} +2 -2
- package/library/chunks/{document-viewer.C5IT7M61.js → document-viewer.CRuqeIIg.js} +2 -2
- package/library/chunks/{header.CWlWNree.js → header.Cbu_nxls.js} +1 -1
- package/library/chunks/{image.BSvc6eti.js → image.ZANuNTs8.js} +1 -1
- package/library/chunks/{toast.COzwhRI6.js → toast.hZJztBTm.js} +1 -1
- package/library/chunks/transformation.DHEr6Kf3.js +385 -0
- package/library/components/asset-link-format.js +2 -2
- package/library/components/atoms.js +3 -3
- package/library/components/color-swatch-group.js +3 -3
- package/library/components/document-viewer.js +2 -2
- package/library/components/header.js +1 -1
- package/library/components/image.js +1 -1
- package/library/components/masonry.js +1 -1
- package/library/components/organisms.js +2 -2
- package/library/components/types.js +12756 -12824
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +0 -25
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +8 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +39 -25
- package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +0 -5
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +10 -0
- package/library/packages/types/src/content-builder.d.ts +0 -5
- package/library/packages/utils/src/transformation/transformation.d.ts +10 -29
- package/library/react-web-component.d.ts +6 -6
- package/library/utils.js +94 -95
- package/package.json +1 -1
- package/library/chunks/transformation.CkEA7Ymz.js +0 -392
|
@@ -1,7 +1,7 @@
|
|
|
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.
|
|
4
|
+
import { C as Cb } from "../chunks/image.ZANuNTs8.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";
|
package/library/package.json
CHANGED
|
@@ -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
|
*/
|
package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts
CHANGED
|
@@ -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.
|
package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts
CHANGED
|
@@ -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
|
|
23
|
-
*
|
|
24
|
-
*
|
|
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
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* `
|
|
127
|
-
*
|
|
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
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* `
|
|
134
|
-
*
|
|
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
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* `
|
|
141
|
-
*
|
|
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
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* `
|
|
148
|
-
*
|
|
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
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* `
|
|
155
|
-
*
|
|
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;
|
|
@@ -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;
|
|
@@ -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[]
|
|
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
|
|
@@ -9819,7 +9819,7 @@
|
|
|
9819
9819
|
preRender?: boolean;
|
|
9820
9820
|
}
|
|
9821
9821
|
/**
|
|
9822
|
-
* 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, and timeline blocks. Off by default.<br/> `default-image-format`, `default-video-poster-format`, `default-
|
|
9822
|
+
* 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, 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.
|
|
9823
9823
|
*/
|
|
9824
9824
|
interface CxContentBuilderAttributes extends HTMLAttributes<CxContentBuilder> {
|
|
9825
9825
|
|
|
@@ -9864,23 +9864,23 @@
|
|
|
9864
9864
|
*/
|
|
9865
9865
|
enableMetrics?: boolean;
|
|
9866
9866
|
/**
|
|
9867
|
-
*
|
|
9867
|
+
* Retained for backward compatibility; it no longer changes how image blocks resolve. <br/> Image blocks always start in `Auto` now: no format is stored on creation or on pick, so each one derives its proxy from the asset's own file extension. Setting this attribute is accepted and reflected, but nothing reads it. <br/> <br/>@deprecated Image format is resolved from the asset; this value is ignored.
|
|
9868
9868
|
*/
|
|
9869
9869
|
defaultImageFormat?: string;
|
|
9870
9870
|
/**
|
|
9871
|
-
*
|
|
9871
|
+
* Retained for backward compatibility; it no longer changes how video posters resolve. <br/> A video poster always starts in `Auto` now: no thumbnail format is stored on creation or on pick, so the proxy is derived from the picked asset. Setting this attribute is accepted and reflected, but nothing reads it. <br/> <br/>@deprecated Poster format is resolved from the asset; this value is ignored.
|
|
9872
9872
|
*/
|
|
9873
9873
|
defaultVideoPosterFormat?: string;
|
|
9874
9874
|
/**
|
|
9875
|
-
*
|
|
9875
|
+
* Retained for backward compatibility; it no longer changes how galleries resolve. <br/> A gallery always starts in `Auto` now: no format is stored on creation, and switching source resets back to `Auto`, so each item derives its proxy from its own file extension. Setting this attribute is accepted and reflected, but nothing reads it. <br/> <br/>@deprecated Format is resolved per item from the asset; this value is ignored.
|
|
9876
9876
|
*/
|
|
9877
9877
|
defaultGalleryFormat?: string;
|
|
9878
9878
|
/**
|
|
9879
|
-
*
|
|
9879
|
+
* Retained for backward compatibility; it no longer changes how carousels resolve. <br/> A carousel always starts in `Auto` now: no format is stored on creation, and switching source resets back to `Auto`, so each item derives its proxy from its own file extension. Setting this attribute is accepted and reflected, but nothing reads it. <br/> <br/>@deprecated Format is resolved per item from the asset; this value is ignored.
|
|
9880
9880
|
*/
|
|
9881
9881
|
defaultCarouselFormat?: string;
|
|
9882
9882
|
/**
|
|
9883
|
-
*
|
|
9883
|
+
* Retained for backward compatibility; it no longer changes how timelines resolve. <br/> Timeline thumbnails always start in `Auto` now: no format is stored on creation, so each item derives its proxy from its own file extension. Setting this attribute is accepted and reflected, but nothing reads it. <br/> <br/>@deprecated Timeline format is resolved per item from the asset; this value is ignored.
|
|
9884
9884
|
*/
|
|
9885
9885
|
defaultTimelineFormat?: string;
|
|
9886
9886
|
/**
|