@orangelogic/design-system 2.192.0 → 2.193.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.CDd4iPA2.js → asset-link-format.BX1hdLgZ.js} +682 -665
- package/library/chunks/{color-swatch-group.NOcRP-23.js → color-swatch-group.BpEQJM1b.js} +1 -1
- package/library/chunks/{document-viewer.CRluR-_W.js → document-viewer.DZsbpf0x.js} +2 -2
- package/library/chunks/{image.CiQwSDfe.js → image.BSvc6eti.js} +10 -6
- package/library/chunks/transformation.CkwgrwKQ.js +312 -0
- package/library/components/asset-link-format.js +2 -2
- package/library/components/atoms.js +2 -2
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/document-viewer.js +2 -2
- package/library/components/image.js +1 -1
- package/library/components/masonry.js +68 -66
- package/library/components/organisms.js +2 -2
- package/library/components/types.js +12609 -12583
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/image/image.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +2 -0
- package/library/packages/services/src/api/asset/asset.d.ts +10 -1
- package/library/packages/types/src/gallery-item.d.ts +1 -0
- package/library/packages/types/src/masonry.d.ts +1 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +13 -4
- package/library/react-web-component.d.ts +4 -4
- package/library/utils.js +34 -33
- package/package.json +1 -1
- package/library/chunks/transformation.BfIEi4p4.js +0 -300
|
@@ -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.BSvc6eti.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
|
@@ -174,6 +174,8 @@ export default class CxImage extends ResizableElement {
|
|
|
174
174
|
};
|
|
175
175
|
/** The crossorigin value for the `<img>`; `undefined` (attribute omitted) when `noCrossorigin` is set. */
|
|
176
176
|
get crossorigin(): string | undefined;
|
|
177
|
+
/** Whether there is nothing to display: no source and no placeholder to stand in for one. */
|
|
178
|
+
protected get isEmpty(): boolean;
|
|
177
179
|
/**
|
|
178
180
|
* Whether to hold the box with a skeleton rather than the loaded image.
|
|
179
181
|
*
|
|
@@ -176,6 +176,8 @@ export default class CxSbImage extends CxImage {
|
|
|
176
176
|
* server-side resize would flatten to a still frame.
|
|
177
177
|
*/
|
|
178
178
|
private assetExtension;
|
|
179
|
+
/** Width of the proxy currently displayed; caps `srcset` so it never asks to upscale. */
|
|
180
|
+
private assetProxyWidth;
|
|
179
181
|
/**
|
|
180
182
|
* Whether an asset fetch has reported back for the current record.
|
|
181
183
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetAllFormatCodesResponse, GetAssetsInFolderRequest, GetAssetsInFolderResponse, GetAssetsRequest, GetAssetsResponse, GetAuthorizedObjectsRequest, GetAuthorizedObjectsResponse, GetAvailableProxiesResponse, GetCropZoneSuggestionRequest, GetCropZoneSuggestionResponse, GetTransformAssetLinkResponse, SearchAssetsParams, SearchAssetsResponse } from './asset.types';
|
|
1
|
+
import { GetAllFormatCodesResponse, GetAssetsInFolderRequest, GetAssetsInFolderResponse, GetAssetsRequest, GetAssetsResponse, GetAuthorizedObjectsRequest, GetAuthorizedObjectsResponse, GetAvailableProxiesResponse, GetCropZoneSuggestionRequest, GetCropZoneSuggestionResponse, GetTransformAssetLinkResponse, SearchAssetsItem, SearchAssetsParams, SearchAssetsResponse } from './asset.types';
|
|
2
2
|
|
|
3
3
|
export declare const DEFAULT_VIEW_SIZE = "CoreField.LargeSizePreview";
|
|
4
4
|
export declare const FIELD_CORTEX_PATH = "Document.CortexPath";
|
|
@@ -19,6 +19,8 @@ export declare const FIELD_ORIGINAL_FILE_NAME = "CoreField.OriginalFileName";
|
|
|
19
19
|
export declare const FIELD_UPDATED_FILE_NAME = "CoreField.UpdatedFileName";
|
|
20
20
|
export declare const FIELD_LARGE_SIZE_PREVIEW_ID = "Document.DocumentDirectRepresentativeRID";
|
|
21
21
|
export declare const LIBRARY_NAME = "Library";
|
|
22
|
+
/** Appended to a `path_*` key to carry that proxy's rendered width alongside its URI. */
|
|
23
|
+
export declare const MEDIA_FIELD_WIDTH_SUFFIX = "__width";
|
|
22
24
|
export declare const MESSAGE_NEW_LINE = "\n";
|
|
23
25
|
export declare const ORIGINAL_VIEW_SIZE = "CoreField.OriginalPreview";
|
|
24
26
|
export declare const FIELD_DOC_SUBTYPE = "Document.DocSubType";
|
|
@@ -41,6 +43,13 @@ export declare function apiGetTransformAssetLink({ assetId, extension, format, s
|
|
|
41
43
|
useSession?: string;
|
|
42
44
|
}): Promise<GetTransformAssetLinkResponse | null>;
|
|
43
45
|
export declare function apiGetAssets({ extraFields, getPermanentAssetsPaths, isSiteBuilder, recordIds, securityByPassToken, token, }: GetAssetsRequest): Promise<GetAssetsResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Reads the pixel width a `path_*` proxy field actually has.
|
|
48
|
+
*
|
|
49
|
+
* Each proxy is rendered at its own size, so this is the ceiling for resizing that URL —
|
|
50
|
+
* distinct from `CoreField.MaximumWidth`, which describes the original file.
|
|
51
|
+
*/
|
|
52
|
+
export declare function readSearchAssetItemWidth(item: SearchAssetsItem, field: string): number | undefined;
|
|
44
53
|
export declare function apiGetAssetsInFolder({ countPerPage, directParentFolderIdentifier, extraFields, getPermanentAssetsPaths, isSiteBuilder, limitedDocTypes, pageNumber, parentFolderIdentifier, searchTerm, securityByPassToken, sortOrder, token, }: GetAssetsInFolderRequest): Promise<GetAssetsInFolderResponse>;
|
|
45
54
|
export declare function apiGetCropFocusMode({ autoCropMode, cropHeight, cropWidth, imageUrl, useSession, }: GetCropZoneSuggestionRequest): Promise<GetCropZoneSuggestionResponse | null>;
|
|
46
55
|
export declare function apiGetAvailableProxies({ assetRecordId, isSiteBuilder, siteUrl, token, useSession, }: {
|
|
@@ -67,6 +67,14 @@ export declare const AUTO_ORIGINAL_FORMAT_MAX_BYTES: number;
|
|
|
67
67
|
* reported" apart from "genuinely empty file" — the two lead to different decisions.
|
|
68
68
|
*/
|
|
69
69
|
export declare function parseFileSizeToBytes(size: string | number | null | undefined): number | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The largest width `Auto` may request for an item.
|
|
72
|
+
*
|
|
73
|
+
* Each proxy is rendered at a fixed size (a `TR1` may be 1200px where its `TRX` is 7360px),
|
|
74
|
+
* so resizing past it only asks the backend to upscale. Returns `undefined` under a manual
|
|
75
|
+
* format — the author's choice is left alone — and when the proxy reported no width.
|
|
76
|
+
*/
|
|
77
|
+
export declare function resolveAutoMaxWidth(manualFormat: boolean, proxyWidth: string | number | null | undefined): number | undefined;
|
|
70
78
|
/**
|
|
71
79
|
* Picks the proxy format an asset should be served under when the author chose `Auto`
|
|
72
80
|
* instead of naming a format.
|
|
@@ -87,10 +95,11 @@ export declare function resolveAutoFormat(extension: string | null | undefined,
|
|
|
87
95
|
* candidate per ladder entry, letting the browser fetch and decode only the pixels
|
|
88
96
|
* the layout actually needs.
|
|
89
97
|
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
98
|
+
* When `maxWidth` is known the list is bounded by the asset itself: rungs above it are
|
|
99
|
+
* dropped so the backend is never asked to upscale, rungs within
|
|
100
|
+
* `ORIGINAL_INSTEAD_OF_RESIZE_MARGIN` of it are dropped as near-duplicates, and the
|
|
101
|
+
* untransformed URL closes the list at its real width. That last candidate costs no
|
|
102
|
+
* render and is the only one that can serve the image sharp at full size.
|
|
94
103
|
*
|
|
95
104
|
* Returns an empty string when the URL is not an asset link, when it already carries
|
|
96
105
|
* a transformation (the width was configured upstream), or when it is an animated GIF
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
export type CxGraphViewNodeAction = { controlType: 'default' | 'switch'; icon: string; id: string; name: string; showDivider: boolean; style: { color: string; }; };
|
|
23
23
|
export type CxGraphViewRecord = any;
|
|
24
24
|
export type CxGraphViewSummary = { icon: string; texts: string[]; };
|
|
25
|
-
export type CxMasonryMasonryItem = { alt: string; extension: string; hasError: boolean; id: string; loading: boolean; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; src: string; };
|
|
25
|
+
export type CxMasonryMasonryItem = { alt: string; extension: string; hasError: boolean; id: string; loading: boolean; maxWidth: string; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; src: string; };
|
|
26
26
|
export type CxMasonryMasonryItemAction = { color: string; event: string; icon: string; src: string; tooltip: string; };
|
|
27
27
|
export type CxMentionsAutocompleteItem = { id: string; label: string; name: string; suffixContent: string; suffixIcon: string; suffixTooltip: string; suffixType: 'badge'; title: string; type: string; };
|
|
28
28
|
export type CxMultiSelectColumnData = { id: string; items: { disabled: boolean; group: string; id: string; index: string; text: string; tooltip: string; type: string; }[]; sort: boolean; title: string; };
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
export type CxAssetLinkFormatFocusMode = { auto: boolean; label: string; value: string; };
|
|
34
34
|
export type CxAssetLinkFormatProxy = { cdnName: string; extension: string; formatHeight: number; formatWidth: number; height: number; id: string; permanentLink: string; proxyLabel: string; proxyName: string; width: number; };
|
|
35
35
|
export type CxAssetLinkFormatTransformation = { key: 'Crop' | 'Metadata' | 'Proxy' | 'Quality' | 'Resize' | 'Rotate'; value: { disabledSize: boolean; focusMode: string; height: number; isFocusModeAuto: boolean; keepMetadata: boolean; mode: string; position: 'bottom-center' | 'bottom-left' | 'bottom-right' | 'center-center' | 'center-left' | 'center-right' | 'top-center' | 'top-left' | 'top-right'; quality: number; ratioHeight: number; ratioWidth: number; rotation: number; unit: '%' | 'px'; width: number; x: number; y: number; }; };
|
|
36
|
-
export type CxBentoGridGalleryItem = { additions: string[]; alt: string; cardType: 'asset' | 'folder' | 'link' | 'page' | 'space'; className: string; details: string; docType: '' | 'Album' | 'Audio' | 'Audio segment' | 'Image' | 'Multimedia' | 'ProjectDocument' | 'Story' | 'Video' | 'Widget'; extension: string; filler: boolean; header: string; id: string; isClone: boolean; name: string; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; openInNewTab: boolean; pageId: string; rawId: string; size: string; src: string; url: string; };
|
|
37
|
-
export type CxCarouselGalleryItem = { additions: string[]; alt: string; cardType: 'asset' | 'folder' | 'link' | 'page' | 'space'; className: string; details: string; docType: '' | 'Album' | 'Audio' | 'Audio segment' | 'Image' | 'Multimedia' | 'ProjectDocument' | 'Story' | 'Video' | 'Widget'; extension: string; filler: boolean; header: string; id: string; isClone: boolean; name: string; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; openInNewTab: boolean; pageId: string; rawId: string; size: string; src: string; url: string; };
|
|
36
|
+
export type CxBentoGridGalleryItem = { additions: string[]; alt: string; cardType: 'asset' | 'folder' | 'link' | 'page' | 'space'; className: string; details: string; docType: '' | 'Album' | 'Audio' | 'Audio segment' | 'Image' | 'Multimedia' | 'ProjectDocument' | 'Story' | 'Video' | 'Widget'; extension: string; filler: boolean; header: string; id: string; isClone: boolean; maxWidth: string; name: string; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; openInNewTab: boolean; pageId: string; rawId: string; size: string; src: string; url: string; };
|
|
37
|
+
export type CxCarouselGalleryItem = { additions: string[]; alt: string; cardType: 'asset' | 'folder' | 'link' | 'page' | 'space'; className: string; details: string; docType: '' | 'Album' | 'Audio' | 'Audio segment' | 'Image' | 'Multimedia' | 'ProjectDocument' | 'Story' | 'Video' | 'Widget'; extension: string; filler: boolean; header: string; id: string; isClone: boolean; maxWidth: string; name: string; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; openInNewTab: boolean; pageId: string; rawId: string; size: string; src: string; url: string; };
|
|
38
38
|
export type CxChatbotChatbotEvent = { event: string; excludedFromPurposes: string[]; label: string; };
|
|
39
39
|
export type CxTableTimeFormatterParams = { color: string; fontSize: string; fontWeight: string; inputUnit: string; locale: string; placeholder: string; style: dictionary; unitsFormat: string; displayStyle: string; paramsMapField: string; paramsMap: dictionary; };
|
|
40
40
|
export type CxTableTextFormatParams = { colorMap: dictionary; color: string; };
|
|
@@ -6762,7 +6762,7 @@
|
|
|
6762
6762
|
/**
|
|
6763
6763
|
* The key to use for the id of the items in the masonry layout.
|
|
6764
6764
|
*/
|
|
6765
|
-
idKey?: 'src' | 'extension' | 'loading' | 'alt' | 'hasError' | 'id' | 'objectFit';
|
|
6765
|
+
idKey?: 'src' | 'extension' | 'loading' | 'maxWidth' | 'alt' | 'hasError' | 'id' | 'objectFit';
|
|
6766
6766
|
/**
|
|
6767
6767
|
* The proxy format the item images were resolved with. <br/> Only used to decide whether a `srcset` may be generated: an original-file format paired with an animated source must be delivered untouched.
|
|
6768
6768
|
*/
|
package/library/utils.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { b as _ } from "./chunks/url.CGdWC06g.js";
|
|
2
|
-
import { R as
|
|
2
|
+
import { R as yt, f as At, g as Et, h as It, U as Lt, a as Ft, d as Rt, c as bt, i as Ot, r as Vt, t as vt, e as kt } from "./chunks/url.CGdWC06g.js";
|
|
3
3
|
import { j as Ut, f as Yt, b as Nt, c as Pt, g as Wt, e as Xt, i as Ht, a as Bt, h as Gt, m as $t, d as zt, r as qt, t as Qt } from "./chunks/toast.C5Ir5yKA.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
|
-
import { d as le, C as ce, e as ue, H as me, R as fe, c as he, h as ge, f as de, g as pe, l as De, a as Te, p as we, b as
|
|
6
|
-
import { a as Ce, g as
|
|
5
|
+
import { d as le, C as ce, e as ue, H as me, R as fe, 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";
|
|
6
|
+
import { a as Ce, g as xe } from "./chunks/active-elements.jTVWtBDp.js";
|
|
7
7
|
import { a as Ae, p as Ee, c as Ie, b as Le, s as Fe, w as Re } from "./chunks/event.BeKOsirN.js";
|
|
8
8
|
import { t as Oe } from "./chunks/converters.DkDtLstb.js";
|
|
9
9
|
import { c as ve } from "./chunks/custom-element.L4WJXn1j.js";
|
|
@@ -17,9 +17,9 @@ import { L as Ze, r as je } from "./chunks/i18n.DbXTTLXx.js";
|
|
|
17
17
|
import { c as Ke, q as tr } from "./chunks/math.DuKzLacZ.js";
|
|
18
18
|
import { g as rr } from "./chunks/modal.Ct0bJBSe.js";
|
|
19
19
|
import { g as sr, l as or, s as nr, u as ir } from "./chunks/scroll.xtO5yojm.js";
|
|
20
|
-
import { k as
|
|
21
|
-
import { c as cr, d as ur, h as mr, m as fr, a as hr, g as gr, j as dr, b as pr, f as Dr, i as Tr, e as wr, l as
|
|
22
|
-
import { H as
|
|
20
|
+
import { k as x } from "./chunks/dom.gRV2cDjL.js";
|
|
21
|
+
import { c as cr, d as ur, h as mr, m as fr, a as hr, g as gr, j as dr, b as pr, f as Dr, i as Tr, e as wr, l as Mr, s as Sr } from "./chunks/dom.gRV2cDjL.js";
|
|
22
|
+
import { H as xr, a as yr, g as Ar } from "./chunks/slot.j5oheLJC.js";
|
|
23
23
|
import { a as Ir, g as Lr } from "./chunks/tabbable.BwnZBHrm.js";
|
|
24
24
|
import { i as Rr } from "./chunks/user-agent.D9aPuOyL.js";
|
|
25
25
|
import { w as Or } from "./chunks/watch.DJF5K-8U.js";
|
|
@@ -30,16 +30,16 @@ import { f as Qr } from "./chunks/content-builder.BX4pHujE.js";
|
|
|
30
30
|
import { c as jr, f as Jr, e as Kr, b as ta, g as ea, d as ra, i as aa, r as sa, a as oa } from "./chunks/image.Y5c_hFx8.js";
|
|
31
31
|
import { b as ia, e as la } from "./chunks/waveform.1U9U_0rd.js";
|
|
32
32
|
import { c as ua, b as ma, a as fa, e as ha, d as ga, f as da, g as pa, r as Da, s as Ta } from "./chunks/number.Cx2ncfJJ.js";
|
|
33
|
-
import { s as
|
|
34
|
-
import { b as Ca, n as
|
|
33
|
+
import { s as Ma } from "./chunks/parse.Cu5nBDTb.js";
|
|
34
|
+
import { b as Ca, n as xa, d as ya, e as Aa, f as Ea, y as Ia, o as La, g as Fa, h as Ra, l as ba, p as Oa, z as Va, x as va, a as ka, c as _a, s as Ua, w as Ya, r as Na, t as Pa, q as Wa, v as Xa, i as Ha, m as Ba, u as Ga } from "./chunks/string.CfI2ejyR.js";
|
|
35
35
|
import { g as za, a as qa } from "./chunks/template.ClovJacp.js";
|
|
36
36
|
import { c as Za, f as ja, a as Ja, g as Ka } from "./chunks/time.DYWuX2id.js";
|
|
37
|
-
import { A as es,
|
|
37
|
+
import { A as es, g as rs, S as as, c as ss, f as os, b as ns, e as is, d as ls, h as cs, p as us, r as ms, a as fs } from "./chunks/transformation.CkwgrwKQ.js";
|
|
38
38
|
function n(t) {
|
|
39
39
|
const e = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
|
|
40
40
|
return `${e}-${r}-${s}`;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function y(t) {
|
|
43
43
|
const e = String(t.getHours()).padStart(2, "0"), r = String(t.getMinutes()).padStart(2, "0"), s = String(t.getSeconds()).padStart(2, "0");
|
|
44
44
|
return `${e}:${r}:${s}`;
|
|
45
45
|
}
|
|
@@ -87,9 +87,9 @@ class Q {
|
|
|
87
87
|
const a = new Date(r.getTime() - 18e5);
|
|
88
88
|
return {
|
|
89
89
|
fromDate: n(a),
|
|
90
|
-
fromTime:
|
|
90
|
+
fromTime: y(a),
|
|
91
91
|
toDate: s,
|
|
92
|
-
toTime:
|
|
92
|
+
toTime: y(r)
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
case c.today:
|
|
@@ -290,14 +290,14 @@ function et(t, e) {
|
|
|
290
290
|
}
|
|
291
291
|
class rt {
|
|
292
292
|
constructor(e) {
|
|
293
|
-
this.currentZIndex =
|
|
293
|
+
this.currentZIndex = x(), (this.host = e).addController(this);
|
|
294
294
|
}
|
|
295
295
|
hostConnected() {
|
|
296
296
|
}
|
|
297
297
|
hostDisconnected() {
|
|
298
298
|
}
|
|
299
299
|
async activatePopup() {
|
|
300
|
-
this.currentZIndex =
|
|
300
|
+
this.currentZIndex = x();
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
class at {
|
|
@@ -528,7 +528,7 @@ function B(t, e, r) {
|
|
|
528
528
|
}
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
|
-
async function*
|
|
531
|
+
async function* Mt({
|
|
532
532
|
cache: t,
|
|
533
533
|
canvas: e,
|
|
534
534
|
duration: r,
|
|
@@ -547,11 +547,11 @@ async function* St({
|
|
|
547
547
|
const T = g * i + d, D = T * s;
|
|
548
548
|
if (D >= r)
|
|
549
549
|
continue;
|
|
550
|
-
const w = d * p,
|
|
551
|
-
|
|
550
|
+
const w = d * p, M = g * l, S = H(t[a] ?? [], d, g), C = d === i - 1 && g === f - 1 || D + s >= r;
|
|
551
|
+
S ? yield { ...S, isLastFrame: C } : (await B(o, D, s), k.drawImage(
|
|
552
552
|
o,
|
|
553
553
|
w,
|
|
554
|
-
|
|
554
|
+
M,
|
|
555
555
|
p,
|
|
556
556
|
l
|
|
557
557
|
), yield {
|
|
@@ -565,13 +565,13 @@ async function* St({
|
|
|
565
565
|
rows: f,
|
|
566
566
|
time: Number(D.toFixed(X)),
|
|
567
567
|
x: w,
|
|
568
|
-
y:
|
|
568
|
+
y: M
|
|
569
569
|
}), await new Promise(requestAnimationFrame);
|
|
570
570
|
}
|
|
571
571
|
} catch {
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function St({
|
|
575
575
|
duration: t,
|
|
576
576
|
frameWidth: e,
|
|
577
577
|
playbackSpeed: r,
|
|
@@ -592,12 +592,12 @@ export {
|
|
|
592
592
|
Be as FormControlController,
|
|
593
593
|
ue as HEX_ALPHA_VALIDATION_REGEX,
|
|
594
594
|
me as HEX_VALIDATION_REGEX,
|
|
595
|
-
|
|
595
|
+
xr as HasSlotController,
|
|
596
596
|
ft as HistoryManager,
|
|
597
597
|
W as KeyboardKey,
|
|
598
598
|
Ze as LocalizeController,
|
|
599
599
|
X as PRECISION,
|
|
600
|
-
|
|
600
|
+
yt as RELATIVE_URL_REGEX,
|
|
601
601
|
fe as RGB_VALIDATION_REGEX,
|
|
602
602
|
as as SRCSET_WIDTH_LADDER,
|
|
603
603
|
At as URL_DOMAIN_VALIDATION_REGEX,
|
|
@@ -634,10 +634,10 @@ export {
|
|
|
634
634
|
et as downloadAsset,
|
|
635
635
|
Pe as drag,
|
|
636
636
|
Ca as emptyToSpace,
|
|
637
|
-
|
|
637
|
+
xa as escapeXML,
|
|
638
638
|
ge as extractColor,
|
|
639
|
-
|
|
640
|
-
|
|
639
|
+
ya as extractExtension,
|
|
640
|
+
Mt as extractFrames,
|
|
641
641
|
Aa as extractRootData,
|
|
642
642
|
ha as extractValueAndUnit,
|
|
643
643
|
la as extractWaveformPeaks,
|
|
@@ -668,9 +668,9 @@ export {
|
|
|
668
668
|
de as getColorType,
|
|
669
669
|
ea as getContainedImageSize,
|
|
670
670
|
fr as getCortexPopupLayer,
|
|
671
|
-
|
|
671
|
+
x as getCurrentZIndex,
|
|
672
672
|
Nr as getDateMask,
|
|
673
|
-
|
|
673
|
+
xe as getDeepestActiveElement,
|
|
674
674
|
Pt as getDeviceType,
|
|
675
675
|
Ka as getDurationPartsByUnitsFormat,
|
|
676
676
|
hr as getElementFromHTMLString,
|
|
@@ -680,8 +680,8 @@ export {
|
|
|
680
680
|
P as getFormControls,
|
|
681
681
|
za as getHighlightedTitle,
|
|
682
682
|
qa as getHighlightedTitleHtml,
|
|
683
|
-
|
|
684
|
-
|
|
683
|
+
yr as getInnerHTML,
|
|
684
|
+
St as getInterval,
|
|
685
685
|
pe as getLightDarkCssString,
|
|
686
686
|
ra as getNaturalWidthHeight,
|
|
687
687
|
dr as getNeededPaddingForBoxShadow,
|
|
@@ -719,7 +719,7 @@ export {
|
|
|
719
719
|
Ot as isValidUrl,
|
|
720
720
|
Hr as isoToDate,
|
|
721
721
|
Z as isoWeekNumber,
|
|
722
|
-
|
|
722
|
+
Mr as loadScript,
|
|
723
723
|
or as lockBodyScrolling,
|
|
724
724
|
De as luminanceTextColor,
|
|
725
725
|
Bt as moveMultipleToIndex,
|
|
@@ -740,7 +740,7 @@ export {
|
|
|
740
740
|
dt as parseJsonString,
|
|
741
741
|
we as parseLightDark,
|
|
742
742
|
pt as parseListString,
|
|
743
|
-
|
|
743
|
+
Me as parseShadow,
|
|
744
744
|
gt as pick,
|
|
745
745
|
oe as popoverSupported,
|
|
746
746
|
Ie as prefersReducedMotion,
|
|
@@ -753,6 +753,7 @@ export {
|
|
|
753
753
|
qt as removeMultipleAtIndex,
|
|
754
754
|
sa as resizeImage,
|
|
755
755
|
ms as resolveAutoFormat,
|
|
756
|
+
fs as resolveAutoMaxWidth,
|
|
756
757
|
Vt as resolveSpaceUrl,
|
|
757
758
|
Da as rotateBox,
|
|
758
759
|
oa as rotateImage,
|
|
@@ -764,9 +765,9 @@ export {
|
|
|
764
765
|
ut as serialize,
|
|
765
766
|
tt as shareAsset,
|
|
766
767
|
Le as shimKeyframesHeightAuto,
|
|
767
|
-
|
|
768
|
+
Sr as sortByTopPosition,
|
|
768
769
|
N as sortTypefaceVariants,
|
|
769
|
-
|
|
770
|
+
Ma as splitBoxValues,
|
|
770
771
|
Ya as splitCamelCaseFormatted,
|
|
771
772
|
Fe as stopAnimations,
|
|
772
773
|
ne as supportHLS,
|
package/package.json
CHANGED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { C as y, T as m, U as v } from "./asset-link-format.ClaYu_v8.js";
|
|
2
|
-
import { P as $ } from "./position-picker.DjnhxIKF.js";
|
|
3
|
-
const g = "/AssetLink/", N = {
|
|
4
|
-
[$.BottomCenter]: y.South,
|
|
5
|
-
[$.BottomLeft]: y.Southwest,
|
|
6
|
-
[$.BottomRight]: y.Southeast,
|
|
7
|
-
[$.CenterCenter]: y.Center,
|
|
8
|
-
[$.CenterLeft]: y.West,
|
|
9
|
-
[$.CenterRight]: y.East,
|
|
10
|
-
[$.TopCenter]: y.North,
|
|
11
|
-
[$.TopLeft]: y.Northwest,
|
|
12
|
-
[$.TopRight]: y.Northeast
|
|
13
|
-
}, p = "/t/", S = [400, 800, 1200, 1600, 2400];
|
|
14
|
-
function O({
|
|
15
|
-
asset: t,
|
|
16
|
-
baseUrl: n,
|
|
17
|
-
extension: s,
|
|
18
|
-
options: f,
|
|
19
|
-
parameters: c,
|
|
20
|
-
transformations: r,
|
|
21
|
-
useSession: a = ""
|
|
22
|
-
}) {
|
|
23
|
-
if (n == null)
|
|
24
|
-
return "";
|
|
25
|
-
let o = n;
|
|
26
|
-
const h = r?.findLast(
|
|
27
|
-
(d) => d.key === m.Quality
|
|
28
|
-
);
|
|
29
|
-
if (h && (r = [
|
|
30
|
-
...r?.filter(
|
|
31
|
-
(d) => d.key !== m.Quality
|
|
32
|
-
) || [],
|
|
33
|
-
h
|
|
34
|
-
]), r) {
|
|
35
|
-
const d = [];
|
|
36
|
-
for (let e = 0; e < r.length; e++) {
|
|
37
|
-
const u = r[e];
|
|
38
|
-
if (u.key === m.Rotate) {
|
|
39
|
-
let i = u.value.rotation ?? 0;
|
|
40
|
-
for (; r[e + 1]?.key === m.Rotate; )
|
|
41
|
-
e++, i += r[e].value.rotation ?? 0;
|
|
42
|
-
i !== 0 && d.push({ key: m.Rotate, value: { rotation: i } });
|
|
43
|
-
} else
|
|
44
|
-
d.push(u);
|
|
45
|
-
}
|
|
46
|
-
r = d;
|
|
47
|
-
}
|
|
48
|
-
r && r.length > 0 && (o += "/t/"), r?.forEach(({ key: d, value: e }) => {
|
|
49
|
-
if (d === m.Resize) {
|
|
50
|
-
if (e.unit === v.AspectRatio && e.ratioWidth && e.ratioHeight) {
|
|
51
|
-
o += `re_ar_${e.ratioWidth}:${e.ratioHeight}/`;
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
const u = [
|
|
55
|
-
...[
|
|
56
|
-
{
|
|
57
|
-
key: "re_w_",
|
|
58
|
-
value: Math.round(e.width ?? 0)
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
key: "re_h_",
|
|
62
|
-
value: Math.round(e.height ?? 0)
|
|
63
|
-
}
|
|
64
|
-
].filter((i) => i.value !== void 0).map((i) => ({
|
|
65
|
-
key: i.key,
|
|
66
|
-
value: Math.round(Number(i.value))
|
|
67
|
-
})),
|
|
68
|
-
{
|
|
69
|
-
key: "re_rm_",
|
|
70
|
-
value: "stretch"
|
|
71
|
-
}
|
|
72
|
-
];
|
|
73
|
-
u.forEach(({ key: i, value: _ }, T) => {
|
|
74
|
-
o += `${i}${_}${T < u.length - 1 ? "," : ""}`;
|
|
75
|
-
}), o += "/";
|
|
76
|
-
}
|
|
77
|
-
if (d === m.Crop) {
|
|
78
|
-
const u = e.unit === v.AspectRatio && !!e.ratioWidth && !!e.ratioHeight, i = !e.disabledSize && !u, _ = i && (e.x !== void 0 || e.y !== void 0), T = [
|
|
79
|
-
...[
|
|
80
|
-
{
|
|
81
|
-
key: "c_",
|
|
82
|
-
value: e.mode
|
|
83
|
-
},
|
|
84
|
-
...u ? [
|
|
85
|
-
{
|
|
86
|
-
key: "ar_",
|
|
87
|
-
value: `${e.ratioWidth}:${e.ratioHeight}`
|
|
88
|
-
}
|
|
89
|
-
] : [],
|
|
90
|
-
...i ? [
|
|
91
|
-
{
|
|
92
|
-
key: "c_w_",
|
|
93
|
-
value: Math.round(e.width ?? 0)
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
key: "c_h_",
|
|
97
|
-
value: Math.round(e.height ?? 0)
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
key: "c_x_",
|
|
101
|
-
value: Math.round(e.x ?? 0) === 0 && f?.omitZeroXY ? void 0 : Math.round(e.x ?? 0)
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
key: "c_y_",
|
|
105
|
-
value: Math.round(e.y ?? 0) === 0 && f?.omitZeroXY ? void 0 : Math.round(e.y ?? 0)
|
|
106
|
-
}
|
|
107
|
-
] : [],
|
|
108
|
-
...!_ && e.focusMode && e.focusMode !== "manual" ? [
|
|
109
|
-
{
|
|
110
|
-
key: e.isFocusModeAuto ? "acm_" : "c_g_",
|
|
111
|
-
value: e.focusMode
|
|
112
|
-
}
|
|
113
|
-
] : [],
|
|
114
|
-
...!_ && e.focusMode === "manual" && e.position ? [
|
|
115
|
-
{
|
|
116
|
-
key: "c_g_",
|
|
117
|
-
value: N[e.position]
|
|
118
|
-
}
|
|
119
|
-
] : []
|
|
120
|
-
].filter((k) => k.value !== void 0 && k.value !== null).map((k) => ({
|
|
121
|
-
key: k.key,
|
|
122
|
-
value: k.value
|
|
123
|
-
})),
|
|
124
|
-
...u ? [] : [
|
|
125
|
-
{
|
|
126
|
-
key: "c_whu_",
|
|
127
|
-
value: "pixel"
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
];
|
|
131
|
-
T.forEach(({ key: k, value: R }, b) => {
|
|
132
|
-
const I = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(k);
|
|
133
|
-
o += `${k}${I ? Math.round(Number(R)) : R}${b < T.length - 1 ? "," : ""}`;
|
|
134
|
-
}), o += "/";
|
|
135
|
-
}
|
|
136
|
-
if (d === m.Rotate && ([
|
|
137
|
-
{
|
|
138
|
-
key: "r_a_",
|
|
139
|
-
value: e.rotation
|
|
140
|
-
}
|
|
141
|
-
].filter((i) => i.value !== void 0).map((i) => ({
|
|
142
|
-
key: i.key,
|
|
143
|
-
value: Math.round(Number(i.value))
|
|
144
|
-
})).forEach(({ key: i, value: _ }) => {
|
|
145
|
-
o += `${i}${_}`;
|
|
146
|
-
}), o += "/"), d === m.Quality) {
|
|
147
|
-
const u = [
|
|
148
|
-
{
|
|
149
|
-
key: "q_level_",
|
|
150
|
-
value: e.quality
|
|
151
|
-
}
|
|
152
|
-
].filter((i) => i.value !== void 0).map((i) => ({
|
|
153
|
-
key: i.key,
|
|
154
|
-
value: Math.round(Number(i.value))
|
|
155
|
-
}));
|
|
156
|
-
u.forEach(({ key: i, value: _ }, T) => {
|
|
157
|
-
o += `${i}${_}${T < u.length - 1 ? "," : ""}`;
|
|
158
|
-
}), o += "/";
|
|
159
|
-
}
|
|
160
|
-
if (d === m.Metadata) {
|
|
161
|
-
const u = [
|
|
162
|
-
{
|
|
163
|
-
key: "fl_keep_metadata",
|
|
164
|
-
value: e.keepMetadata
|
|
165
|
-
}
|
|
166
|
-
].filter((i) => i.value !== void 0).map((i) => ({ key: i.key, value: i.value }));
|
|
167
|
-
u.forEach(({ key: i }, _) => {
|
|
168
|
-
o += `${i}${_ < u.length - 1 ? "," : ""}`;
|
|
169
|
-
}), o += "/";
|
|
170
|
-
}
|
|
171
|
-
}), s && (o += `${t?.identifier ?? crypto.randomUUID()}${s}`);
|
|
172
|
-
const l = [];
|
|
173
|
-
return c && c.length > 0 && c.forEach(({ key: d, value: e }) => {
|
|
174
|
-
l.push(
|
|
175
|
-
`${encodeURIComponent(d.trim())}=${encodeURIComponent(e.trim())}`
|
|
176
|
-
);
|
|
177
|
-
}), n && a && l.push(`UseSession=${encodeURIComponent(a)}`), l.length > 0 && (o += `?${l.join("&")}`), o.endsWith("/") && (o = o.slice(0, -1)), o;
|
|
178
|
-
}
|
|
179
|
-
function G(t, n) {
|
|
180
|
-
if (!t || !n?.length)
|
|
181
|
-
return t;
|
|
182
|
-
const s = O({ baseUrl: "", transformations: n }).replace(
|
|
183
|
-
/\/t\//g,
|
|
184
|
-
""
|
|
185
|
-
);
|
|
186
|
-
if (!s)
|
|
187
|
-
return t;
|
|
188
|
-
const f = t.indexOf(g);
|
|
189
|
-
if (f < 0)
|
|
190
|
-
return `${t}/t/${s}`;
|
|
191
|
-
const c = t.slice(0, f + g.length), r = t.slice(f + g.length), a = r.indexOf("/t/");
|
|
192
|
-
if (a >= 0) {
|
|
193
|
-
const h = r.slice(0, a);
|
|
194
|
-
return `${c}${h}/t/${s}`;
|
|
195
|
-
}
|
|
196
|
-
const o = r.indexOf("/");
|
|
197
|
-
if (o >= 0) {
|
|
198
|
-
const h = r.slice(0, o), l = r.slice(o);
|
|
199
|
-
return `${c}${h}/t/${s}${l}`;
|
|
200
|
-
}
|
|
201
|
-
return `${t}/t/${s}`;
|
|
202
|
-
}
|
|
203
|
-
function E(t) {
|
|
204
|
-
return `re_w_${Math.round(t)}`;
|
|
205
|
-
}
|
|
206
|
-
function C(t, n) {
|
|
207
|
-
if (!t || !Number.isFinite(n) || n <= 0)
|
|
208
|
-
return t;
|
|
209
|
-
const s = t.indexOf(g);
|
|
210
|
-
if (s < 0)
|
|
211
|
-
return t;
|
|
212
|
-
const f = E(n), c = t.slice(0, s + g.length), r = t.slice(s + g.length), a = r.indexOf(p);
|
|
213
|
-
if (a >= 0) {
|
|
214
|
-
const h = r.slice(0, a), l = r.slice(
|
|
215
|
-
a + p.length
|
|
216
|
-
);
|
|
217
|
-
return `${c}${h}${p}${f}/${l}`;
|
|
218
|
-
}
|
|
219
|
-
const o = r.indexOf("/");
|
|
220
|
-
if (o >= 0) {
|
|
221
|
-
const h = r.slice(0, o), l = r.slice(o);
|
|
222
|
-
return `${c}${h}${p}${f}${l}`;
|
|
223
|
-
}
|
|
224
|
-
return `${c}${r}${p}${f}`;
|
|
225
|
-
}
|
|
226
|
-
function F(t) {
|
|
227
|
-
const n = t.indexOf(g);
|
|
228
|
-
return n < 0 ? !1 : t.slice(n + g.length).includes(p);
|
|
229
|
-
}
|
|
230
|
-
const x = "TRX", M = "TR1", L = /* @__PURE__ */ new Set(["gif", "png", "tif", "tiff"]);
|
|
231
|
-
function A(t) {
|
|
232
|
-
if (!t)
|
|
233
|
-
return "";
|
|
234
|
-
const n = t.trim().toLowerCase();
|
|
235
|
-
return n.startsWith(".") ? n.slice(1) : n;
|
|
236
|
-
}
|
|
237
|
-
function W(t) {
|
|
238
|
-
return A(t) === "gif";
|
|
239
|
-
}
|
|
240
|
-
const U = 10 * 1024 * 1024, w = {
|
|
241
|
-
b: 1,
|
|
242
|
-
byte: 1,
|
|
243
|
-
bytes: 1,
|
|
244
|
-
gb: 1024 ** 3,
|
|
245
|
-
kb: 1024,
|
|
246
|
-
mb: 1024 ** 2,
|
|
247
|
-
tb: 1024 ** 4
|
|
248
|
-
};
|
|
249
|
-
function B(t) {
|
|
250
|
-
if (typeof t == "number")
|
|
251
|
-
return Number.isFinite(t) && t >= 0 ? t : void 0;
|
|
252
|
-
if (!t)
|
|
253
|
-
return;
|
|
254
|
-
const n = /^\s*([\d.,]+)\s*([a-z]*)\s*$/i.exec(t);
|
|
255
|
-
if (!n)
|
|
256
|
-
return;
|
|
257
|
-
const s = Number(n[1].replace(/,/g, ""));
|
|
258
|
-
if (!Number.isFinite(s) || s < 0)
|
|
259
|
-
return;
|
|
260
|
-
const f = n[2].toLowerCase();
|
|
261
|
-
if (!f)
|
|
262
|
-
return s;
|
|
263
|
-
const c = w[f];
|
|
264
|
-
return c === void 0 ? void 0 : s * c;
|
|
265
|
-
}
|
|
266
|
-
function X(t, n) {
|
|
267
|
-
if (!L.has(A(t)))
|
|
268
|
-
return M;
|
|
269
|
-
const s = B(n);
|
|
270
|
-
return s !== void 0 && s > U ? M : x;
|
|
271
|
-
}
|
|
272
|
-
function Y(t, n = {}) {
|
|
273
|
-
if (!t.includes(g) || F(t) || n.format === x && W(n.extension))
|
|
274
|
-
return "";
|
|
275
|
-
const { maxWidth: s, widths: f = S } = n, c = [...f].filter((a) => Number.isFinite(a) && a > 0).sort((a, o) => a - o);
|
|
276
|
-
if (c.length === 0)
|
|
277
|
-
return "";
|
|
278
|
-
let r = c;
|
|
279
|
-
if (s !== void 0 && Number.isFinite(s) && s > 0) {
|
|
280
|
-
const a = c.filter((o) => o <= s);
|
|
281
|
-
r = a.length > 0 ? a : [c[0]];
|
|
282
|
-
}
|
|
283
|
-
return r.map((a) => `${C(t, a)} ${a}w`).join(", ");
|
|
284
|
-
}
|
|
285
|
-
function D(t, n = 100) {
|
|
286
|
-
return !Number.isFinite(t) || t <= 0 ? "" : `${Math.ceil(t / n) * n}px`;
|
|
287
|
-
}
|
|
288
|
-
export {
|
|
289
|
-
M as A,
|
|
290
|
-
S,
|
|
291
|
-
G as a,
|
|
292
|
-
Y as b,
|
|
293
|
-
O as c,
|
|
294
|
-
D as d,
|
|
295
|
-
C as e,
|
|
296
|
-
U as f,
|
|
297
|
-
F as h,
|
|
298
|
-
B as p,
|
|
299
|
-
X as r
|
|
300
|
-
};
|