@orangelogic/design-system 4.3.0 → 4.4.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.C5Ue4EGP.js → asset-link-format.DTLA2CFh.js} +407 -388
- package/library/chunks/{button.DbAUlIXG.js → button.cbDkxJHn.js} +1 -1
- package/library/chunks/{color-swatch-group.B10yWbVM.js → color-swatch-group.CZSeCrot.js} +7 -7
- package/library/chunks/{confirm-popover.Cd4HM5-B.js → confirm-popover.Dvgoz-oA.js} +3 -3
- package/library/chunks/{dialog.CXphbq8N.js → dialog.BvSMV36r.js} +2 -2
- package/library/chunks/{document-viewer.B_ESlazf.js → document-viewer.BLdEjbza.js} +7 -7
- package/library/chunks/{dot-pagination.CzT-MZmt.js → dot-pagination.CukHxNBk.js} +1 -1
- package/library/chunks/{folder-select.BWeanVkA.js → folder-select.DAZQRdLq.js} +4 -4
- package/library/chunks/{header.Dy57RuQW.js → header.2RH_nPmz.js} +1 -1
- package/library/chunks/{i18n.Q5_2aVLU.js → i18n.BSPmBQ73.js} +1 -0
- package/library/chunks/{icon-button.BjAbCuH8.js → icon-button.DV5Fks8j.js} +1 -1
- package/library/chunks/{iframe.CdktjPCB.js → iframe.ddX2kGu3.js} +1 -1
- package/library/chunks/{image.CCo__54F.js → image.BM7bPTub.js} +174 -143
- package/library/chunks/{index.DiZGZkHv.js → index.DKKvxBAi.js} +70 -66
- package/library/chunks/{input.ftEf4GS6.js → input.7pumTpdu.js} +1 -1
- package/library/chunks/{markdown.RljldBNb.js → markdown.LHSzm035.js} +2 -2
- package/library/chunks/{menu-item.BNs1Ji48.js → menu-item.CqPvDGeN.js} +1 -1
- package/library/chunks/{option.C8IEnv5Q.js → option.dBUWN4sF.js} +1 -1
- package/library/chunks/{pagination.Bke9vgl4.js → pagination.C2f8lUVb.js} +5 -5
- package/library/chunks/{resizable-component.styles.CAfXABBc.js → resizable-component.styles.kMFDlGgv.js} +2 -2
- package/library/chunks/{tab-group.DZ32f41G.js → tab-group.DOnaT12G.js} +4 -4
- package/library/chunks/{tree.Umn7TAkc.js → tree.CHQ1WjZV.js} +1 -1
- package/library/chunks/{types.BW36Gr9c.js → types.PdpKNndx.js} +2519 -2411
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +3 -3
- package/library/components/atoms.js +15 -15
- package/library/components/audio.js +3 -3
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +6 -6
- package/library/components/color-swatch-group.js +2 -2
- package/library/components/color-swatch.js +1 -1
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +4 -4
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +3 -3
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +3 -3
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +2 -2
- package/library/components/molecules.js +2 -2
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +5 -5
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +21 -21
- package/library/components/video.js +1341 -1294
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/image/image.d.ts +16 -0
- package/library/packages/atoms/src/components/video/video.d.ts +6 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +2 -0
- package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +5 -6
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +6 -0
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +5 -1
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +10 -3
- package/library/packages/organisms/src/content-builder/configs/header.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +13 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +6 -0
- package/library/packages/types/src/content-builder.d.ts +6 -2
- package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
- package/library/react-web-component.d.ts +4 -0
- package/library/utils.js +1 -1
- package/package.json +1 -1
package/library/package.json
CHANGED
|
@@ -69,6 +69,10 @@ export default class CxImage extends ResizableElement {
|
|
|
69
69
|
* The path to the image to load.
|
|
70
70
|
*/
|
|
71
71
|
src: string;
|
|
72
|
+
/** Intrinsic width / height used to reserve space while loading with Height Auto.
|
|
73
|
+
* @defaultValue 0
|
|
74
|
+
*/
|
|
75
|
+
aspectRatio: number;
|
|
72
76
|
/**
|
|
73
77
|
* Candidate sources for the underlying `<img>`, as a standard `srcset` value
|
|
74
78
|
* (e.g. `"…/re_w_400/img.jpg 400w, …/re_w_800/img.jpg 800w"`).
|
|
@@ -179,6 +183,18 @@ export default class CxImage extends ResizableElement {
|
|
|
179
183
|
'highlightable-item': boolean;
|
|
180
184
|
'highlightable-item--effect-text-reveal': boolean;
|
|
181
185
|
};
|
|
186
|
+
protected get currentAspectRatio(): number;
|
|
187
|
+
private get loadingAspectRatio();
|
|
188
|
+
getHighlighterClass(isError?: boolean): {
|
|
189
|
+
'highlighter--loading-ratio': boolean;
|
|
190
|
+
highlighter: boolean;
|
|
191
|
+
'highlighter--background': boolean;
|
|
192
|
+
'highlighter--border': boolean;
|
|
193
|
+
'highlighter--centered': boolean;
|
|
194
|
+
'highlighter--color-overlay': boolean;
|
|
195
|
+
'highlighter--drop-shadow': boolean;
|
|
196
|
+
'highlighter--opacity': boolean;
|
|
197
|
+
};
|
|
182
198
|
get imageClass(): {
|
|
183
199
|
[x: string]: boolean;
|
|
184
200
|
image: boolean;
|
|
@@ -155,6 +155,11 @@ export default class CxVideo extends ResizableElement {
|
|
|
155
155
|
protected removeVideoEventListeners(): void;
|
|
156
156
|
attachSeekbar(): void;
|
|
157
157
|
private applyBigPlayButtonVisibility;
|
|
158
|
+
/**
|
|
159
|
+
* Keeps the big play button centered in the visible video content rather than
|
|
160
|
+
* the full player when object-fit leaves empty space around the video.
|
|
161
|
+
*/
|
|
162
|
+
private updateBigPlayButtonPosition;
|
|
158
163
|
protected setupVideoJsPlayer(src?: string): Promise<void>;
|
|
159
164
|
handleLoopChange(): Promise<void>;
|
|
160
165
|
handleMutedChange(): Promise<void>;
|
|
@@ -163,6 +168,7 @@ export default class CxVideo extends ResizableElement {
|
|
|
163
168
|
handleDisableRemotePlaybackChange(): Promise<void>;
|
|
164
169
|
handleDisableVolumePanelChange(): Promise<void>;
|
|
165
170
|
handleHideBigPlayButtonChange(): Promise<void>;
|
|
171
|
+
handleVideoPlacementChange(): void;
|
|
166
172
|
handlePosterChange(): Promise<void>;
|
|
167
173
|
handleFormattedPosterChange(): Promise<void>;
|
|
168
174
|
handleSrcChange(): Promise<void>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Transformation } from '../../types/src/asset-link-format';
|
|
2
2
|
|
|
3
3
|
export type CxAssetTransformationDialogConfirmEvent = CustomEvent<{
|
|
4
|
+
/** Width / height from the applied transformation response, when available. */
|
|
5
|
+
aspectRatio?: number;
|
|
4
6
|
format: string;
|
|
5
7
|
/** False when the format follows the asset's file extension instead of an explicit pick. */
|
|
6
8
|
manualFormat: boolean;
|
|
@@ -175,14 +175,13 @@ export default class CxIconPicker extends CortexElement {
|
|
|
175
175
|
* re-focuses on a timer), so a focus-driven load would re-fire long after
|
|
176
176
|
* the dropdown closed.
|
|
177
177
|
*
|
|
178
|
-
* The
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* listeners armed — which intermittently closed the dropdown right after
|
|
183
|
-
* it appeared.
|
|
178
|
+
* The virtualizer waits for the first catalog request to settle before it
|
|
179
|
+
* mounts. Mounting it with an empty item set can leave its visible range
|
|
180
|
+
* empty until the user scrolls. The open-state guard also prevents a late
|
|
181
|
+
* request from mounting the list after the control has already closed.
|
|
184
182
|
*/
|
|
185
183
|
private ensureIconsData;
|
|
184
|
+
private showVirtualizerWhenReady;
|
|
186
185
|
private handleSelectShow;
|
|
187
186
|
private handleSelectHide;
|
|
188
187
|
private handleDropdownShow;
|
|
@@ -212,6 +212,7 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
212
212
|
/** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
|
|
213
213
|
private get hasUnfrozenTransformations();
|
|
214
214
|
private apiGetTransformAssetLink;
|
|
215
|
+
private transformRequest?;
|
|
215
216
|
private apiGetCropFocusMode;
|
|
216
217
|
/**
|
|
217
218
|
* The unit of the last applied crop transformation, for the no-asset case only. Reflects
|
|
@@ -327,6 +328,11 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
327
328
|
x: number;
|
|
328
329
|
y: number;
|
|
329
330
|
};
|
|
331
|
+
/** Captures the current request synchronously; later edits cannot change Save's ratio. */
|
|
332
|
+
getAppliedAspectRatio(): Promise<number | undefined>;
|
|
333
|
+
private get transformRequestOptions();
|
|
334
|
+
private getTransformRequest;
|
|
335
|
+
private requestTransformAsset;
|
|
330
336
|
setActiveSetting(activeSetting: string): void;
|
|
331
337
|
private freezeTransformations;
|
|
332
338
|
private upsertTransformation;
|
package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { default as CxAssetLinkFormat } from '../asset-link-format/asset-link-fo
|
|
|
20
20
|
* `cx-icon-button`. Automatically disabled when `asset-id` is not set.
|
|
21
21
|
*
|
|
22
22
|
* @event cx-asset-transformation-dialog-cancel - Emitted when the user closes or cancels the dialog.
|
|
23
|
-
* @event {{ detail: { format: string; manualFormat: boolean; transformations: Transformation[] } }} cx-asset-transformation-dialog-confirm - Emitted when the user saves, with the resolved proxy id, whether that id was picked by hand
|
|
23
|
+
* @event {{ detail: { aspectRatio?: number; format: string; manualFormat: boolean; transformations: Transformation[] } }} cx-asset-transformation-dialog-confirm - Emitted when the user saves, with the applied image ratio, resolved proxy id, whether that id was picked by hand, and the transformation array.
|
|
24
24
|
* @event cx-asset-transformation-dialog-delete - Emitted when the user resets the format to its default and clears the saved transformations via the reset button.
|
|
25
25
|
*/
|
|
26
26
|
export default class CxAssetTransformationDialog extends CortexElement {
|
|
@@ -91,6 +91,10 @@ export default class CxAssetTransformationDialog extends CortexElement {
|
|
|
91
91
|
private proxies;
|
|
92
92
|
/** False while the authorization check is in flight or after it confirms no access. */
|
|
93
93
|
private canAccess;
|
|
94
|
+
private saving;
|
|
95
|
+
/** Seeds one editing session; subsequent Apply changes belong to the child. */
|
|
96
|
+
private initialDraft;
|
|
97
|
+
private editSession;
|
|
94
98
|
/**
|
|
95
99
|
* Whether the author changed anything away from the block's defaults, which is what the
|
|
96
100
|
* Reset control acts on.
|
|
@@ -5,7 +5,7 @@ import { Transformation } from '../../../../../types/src/asset-link-format';
|
|
|
5
5
|
import { TeamSpace } from '../../../../../types/src/content-builder';
|
|
6
6
|
import { ContentType } from '../../../../../types/src/gallery';
|
|
7
7
|
import { HighlightableElementContentPosition } from '../../../../../types/src/highlightable-element';
|
|
8
|
-
import { TemplateResult } from 'lit';
|
|
8
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @summary Images are wrappers for img elements with built-in lazy loading, skeleton, and fallback support.
|
|
@@ -25,7 +25,7 @@ import { TemplateResult } from 'lit';
|
|
|
25
25
|
* @cssproperty --border-radius - The border-radius of the image.
|
|
26
26
|
* @cssproperty --border - The border of the image.
|
|
27
27
|
*
|
|
28
|
-
* @event cx-load - Emitted
|
|
28
|
+
* @event cx-load - Emitted on each successful image load, including subsequent srcset candidate loads. May fire multiple times for the same block.
|
|
29
29
|
* @event cx-error - Emitted when the image has failed to load.
|
|
30
30
|
* @event cx-image-zoom-open - Emitted when the image zoom is opened.
|
|
31
31
|
* @event cx-image-zoom-close - Emitted when the image zoom is closed.
|
|
@@ -96,6 +96,8 @@ export default class CxSbImage extends CxImage {
|
|
|
96
96
|
manualFormat: boolean;
|
|
97
97
|
/** Whether `formatDarkMode` was picked by hand. See `manualFormat`. */
|
|
98
98
|
manualFormatDarkMode: boolean;
|
|
99
|
+
/** Saved intrinsic width / height for the dark image. */
|
|
100
|
+
aspectRatioDarkMode: number;
|
|
99
101
|
/**
|
|
100
102
|
* Asset transformations applied to the image.
|
|
101
103
|
*/
|
|
@@ -155,6 +157,7 @@ export default class CxSbImage extends CxImage {
|
|
|
155
157
|
* delivery URL from the `path_*` fields here rather than searching for one.
|
|
156
158
|
*/
|
|
157
159
|
fetchedAssetData: Record<string, unknown>;
|
|
160
|
+
private renderedImageSrc;
|
|
158
161
|
/**
|
|
159
162
|
* Indicates whether the image is currently zoomed.
|
|
160
163
|
*/
|
|
@@ -221,7 +224,7 @@ export default class CxSbImage extends CxImage {
|
|
|
221
224
|
* getters key off this single predicate so alt, recordId, transformations and
|
|
222
225
|
* click handlers stay aligned with whichever image is actually being displayed.
|
|
223
226
|
*/
|
|
224
|
-
|
|
227
|
+
get useDarkVariant(): boolean;
|
|
225
228
|
get currentAltValue(): string;
|
|
226
229
|
get currentRecordId(): string;
|
|
227
230
|
get currentSrc(): string;
|
|
@@ -274,6 +277,7 @@ export default class CxSbImage extends CxImage {
|
|
|
274
277
|
image: boolean;
|
|
275
278
|
'image--hidden': boolean;
|
|
276
279
|
};
|
|
280
|
+
protected get currentAspectRatio(): number;
|
|
277
281
|
/**
|
|
278
282
|
* Whether the image have zoom action.
|
|
279
283
|
*/
|
|
@@ -302,6 +306,8 @@ export default class CxSbImage extends CxImage {
|
|
|
302
306
|
*/
|
|
303
307
|
handleRecordIdChangeForExtension(): void;
|
|
304
308
|
handleFetchedAssetDataChange(): void;
|
|
309
|
+
protected update(changedProps: PropertyValues): void;
|
|
310
|
+
protected handleLoad(event: Event): void;
|
|
305
311
|
/**
|
|
306
312
|
* Support CMS5 click action for the image.
|
|
307
313
|
*/
|
|
@@ -356,6 +362,7 @@ export default class CxSbImage extends CxImage {
|
|
|
356
362
|
*/
|
|
357
363
|
private recoverExpiredSources;
|
|
358
364
|
private recoverExpiredSource;
|
|
365
|
+
private get renderedSrc();
|
|
359
366
|
protected renderContent(): TemplateResult;
|
|
360
367
|
render(): TemplateResult;
|
|
361
368
|
}
|
|
@@ -16,7 +16,7 @@ type Attribute = {
|
|
|
16
16
|
};
|
|
17
17
|
declare const _default: {
|
|
18
18
|
configs: (localize: LocalizeController, options?: ConfigsOptions) => Array<PropertyConfig<Attribute>>;
|
|
19
|
-
defaultValue: Attribute
|
|
19
|
+
defaultValue: Partial<Attribute>;
|
|
20
20
|
stylable: string[];
|
|
21
21
|
};
|
|
22
22
|
export default _default;
|
|
@@ -5,6 +5,8 @@ import { default as CxImage } from '../blocks/image/image';
|
|
|
5
5
|
type Attribute = {
|
|
6
6
|
'additional-fields': string;
|
|
7
7
|
'alt-source-field': CxImage['altSourceField'];
|
|
8
|
+
'aspect-ratio': CxImage['aspectRatio'];
|
|
9
|
+
'aspect-ratio-dark-mode': CxImage['aspectRatioDarkMode'];
|
|
8
10
|
'click-action': CxImage['clickAction'];
|
|
9
11
|
'click-link'?: CxImage['clickLink'];
|
|
10
12
|
'click-page'?: CxImage['clickPage'];
|
|
@@ -310,6 +310,8 @@ export default class ConfigsController {
|
|
|
310
310
|
}>[] | import('../../../types/src/content-builder').PropertyConfig<{
|
|
311
311
|
'additional-fields': string;
|
|
312
312
|
'alt-source-field': import('./blocks/image/image').default["altSourceField"];
|
|
313
|
+
'aspect-ratio': import('./blocks/image/image').default["aspectRatio"];
|
|
314
|
+
'aspect-ratio-dark-mode': import('./blocks/image/image').default["aspectRatioDarkMode"];
|
|
313
315
|
'click-action': import('./blocks/image/image').default["clickAction"];
|
|
314
316
|
'click-link'?: import('./blocks/image/image').default["clickLink"];
|
|
315
317
|
'click-page'?: import('./blocks/image/image').default["clickPage"];
|
|
@@ -704,6 +706,17 @@ export default class ConfigsController {
|
|
|
704
706
|
variant: import('../../../types/src/gallery').GalleryVariant;
|
|
705
707
|
width: string;
|
|
706
708
|
'zoom-style': import('../../../types/src/highlightable-element').HighlightableElementZoomStyle;
|
|
709
|
+
}> | Partial<{
|
|
710
|
+
alignment: import('../../../types/src/header').Alignment;
|
|
711
|
+
'custom-line-height': boolean;
|
|
712
|
+
'data-constraints': boolean;
|
|
713
|
+
'disabled-copy-button': boolean;
|
|
714
|
+
'font-size': string;
|
|
715
|
+
'font-size-desktop': string;
|
|
716
|
+
'font-size-tablet': string;
|
|
717
|
+
'has-anchor-link': boolean;
|
|
718
|
+
role: string;
|
|
719
|
+
variant: import('../../../types/src/header').Variant;
|
|
707
720
|
}> | {
|
|
708
721
|
name: string;
|
|
709
722
|
'page-id': string;
|
|
@@ -55,6 +55,7 @@ export default class StyleController {
|
|
|
55
55
|
versionLabelKey?: string;
|
|
56
56
|
};
|
|
57
57
|
assetTransformationConfigs?: {
|
|
58
|
+
aspectRatioKey?: string;
|
|
58
59
|
assetIdKey?: string;
|
|
59
60
|
defaultFormat?: string;
|
|
60
61
|
dialogLabel?: string;
|
|
@@ -144,6 +145,7 @@ export default class StyleController {
|
|
|
144
145
|
multiple?: boolean;
|
|
145
146
|
pickerConfigs?: {
|
|
146
147
|
accepts?: string[];
|
|
148
|
+
aspectRatioKey?: string;
|
|
147
149
|
defaultFormat?: string;
|
|
148
150
|
multiple?: boolean;
|
|
149
151
|
nameKey?: string;
|
|
@@ -157,6 +157,12 @@ export declare class ControlRenderer {
|
|
|
157
157
|
* `cx-asset-transformation-dialog`.
|
|
158
158
|
*/
|
|
159
159
|
private resolveAssetFormatSrc;
|
|
160
|
+
/** Resolves the URL and intrinsic ratio from the same selected media field. */
|
|
161
|
+
resolveAssetFormat(recordId: string, format: string): Promise<{
|
|
162
|
+
aspectRatio: number;
|
|
163
|
+
src: string;
|
|
164
|
+
}>;
|
|
165
|
+
private getResolvedImage;
|
|
160
166
|
renderControl({ blockAttributes, container, currentValue, disabled, handleChange, key, label, trait, }: {
|
|
161
167
|
blockAttributes: Record<string, any>;
|
|
162
168
|
container?: Ref<HTMLElement>;
|
|
@@ -65,6 +65,8 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
|
|
|
65
65
|
versionLabelKey?: string;
|
|
66
66
|
};
|
|
67
67
|
assetTransformationConfigs?: {
|
|
68
|
+
/** Attribute that stores the transformed image's width / height. */
|
|
69
|
+
aspectRatioKey?: string;
|
|
68
70
|
assetIdKey?: string;
|
|
69
71
|
defaultFormat?: string;
|
|
70
72
|
dialogLabel?: string;
|
|
@@ -185,6 +187,8 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
|
|
|
185
187
|
options?: Option[];
|
|
186
188
|
pickerConfigs?: {
|
|
187
189
|
accepts?: string[];
|
|
190
|
+
/** Attribute that stores the selected image's width / height. */
|
|
191
|
+
aspectRatioKey?: string;
|
|
188
192
|
/** The format code used to resolve a preview src immediately after picking an image (before the user configures a format). */
|
|
189
193
|
defaultFormat?: string;
|
|
190
194
|
multiple?: boolean;
|
|
@@ -400,8 +404,6 @@ export declare enum DataSourceId {
|
|
|
400
404
|
TranslatableTexts = "TRANSLATABLE_TEXTS"
|
|
401
405
|
}
|
|
402
406
|
export type ConfigsOptions = {
|
|
403
|
-
enableAssetFormatControls?: boolean;
|
|
404
|
-
enableFontFamilyControls?: boolean;
|
|
405
407
|
/**
|
|
406
408
|
* Variants of the font the block's container resolves for it — a font kit's
|
|
407
409
|
* rows. Present means the block sits inside such a container, so its font
|
|
@@ -409,6 +411,8 @@ export type ConfigsOptions = {
|
|
|
409
411
|
* styles, and writes every other option explicitly.
|
|
410
412
|
*/
|
|
411
413
|
containerFontVariants?: FontFamily[];
|
|
414
|
+
enableAssetFormatControls?: boolean;
|
|
415
|
+
enableFontFamilyControls?: boolean;
|
|
412
416
|
};
|
|
413
417
|
/**
|
|
414
418
|
* Well-known editable sections of a content-builder canvas. The page content is the implicit
|
|
@@ -1038,6 +1038,7 @@ export interface Translation extends DefaultTranslation {
|
|
|
1038
1038
|
specialCharacters: string;
|
|
1039
1039
|
specialCharactersEmpty: string;
|
|
1040
1040
|
specificWidthInPixelsOrPercentage: string;
|
|
1041
|
+
specifiedWidthAsPercentageOfContainer: string;
|
|
1041
1042
|
specifiedWidthInPixels: string;
|
|
1042
1043
|
speed: string;
|
|
1043
1044
|
spellcheck: string;
|
|
@@ -2914,6 +2914,10 @@
|
|
|
2914
2914
|
* The path to the image to load.
|
|
2915
2915
|
*/
|
|
2916
2916
|
src?: string;
|
|
2917
|
+
/**
|
|
2918
|
+
* Intrinsic width / height used to reserve space while loading with Height Auto. <br/>@defaultValue 0
|
|
2919
|
+
*/
|
|
2920
|
+
aspectRatio?: number;
|
|
2917
2921
|
/**
|
|
2918
2922
|
* Candidate sources for the underlying `img`, as a standard `srcset` value (e.g. `"…/re_w_400/img.jpg 400w, …/re_w_800/img.jpg 800w"`). <br/> Lets the browser fetch and decode only the pixels the layout needs, which is what bounds memory on image-heavy pages — a large original decodes to `naturalWidth × naturalHeight × 4` bytes regardless of its display size. Pair with `sizes`; without it the browser assumes the image is `100vw` wide.
|
|
2919
2923
|
*/
|
package/library/utils.js
CHANGED
|
@@ -13,7 +13,7 @@ import { d as Xe } from "./chunks/drag.DenOh3AE.js";
|
|
|
13
13
|
import { f as Be } from "./chunks/focus-when-visible.jWSw9ks0.js";
|
|
14
14
|
import { f as U } from "./chunks/form.LpappO1d.js";
|
|
15
15
|
import { F as $e, c as ze, g as qe, v as Qe, a as je } from "./chunks/form.LpappO1d.js";
|
|
16
|
-
import { L as Je, r as Ke } from "./chunks/i18n.
|
|
16
|
+
import { L as Je, r as Ke } from "./chunks/i18n.BSPmBQ73.js";
|
|
17
17
|
import { c as er, q as rr } from "./chunks/math.DuKzLacZ.js";
|
|
18
18
|
import { g as sr } from "./chunks/modal.Ct0bJBSe.js";
|
|
19
19
|
import { g as nr, l as ir, s as lr, u as cr } from "./chunks/scroll.xtO5yojm.js";
|