@orangelogic/design-system 2.157.0 → 2.158.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.DzYh0_YS.js → asset-link-format.CUPqX8XL.js} +1 -1
- package/library/chunks/{header.x8SZLjAG.js → header.e1FLwywx.js} +10 -8
- package/library/chunks/transformation.BDmd3kER.js +163 -0
- package/library/components/asset-link-format.js +2 -2
- package/library/components/atoms.js +1 -1
- package/library/components/header.js +1 -1
- package/library/components/organisms.js +1 -1
- package/library/components/types.js +3932 -3917
- package/library/package.json +1 -1
- package/library/utils.js +1 -1
- package/package.json +1 -1
- package/library/chunks/transformation.DGzjBg6V.js +0 -163
package/library/package.json
CHANGED
package/library/utils.js
CHANGED
|
@@ -34,7 +34,7 @@ import { s as fa } from "./chunks/parse.Cu5nBDTb.js";
|
|
|
34
34
|
import { b as ga, o as da, d as pa, e as Da, f as Ta, m as wa, q as Ca, g as xa, h as Ma, l as ya, p as Sa, z as Ea, y as Aa, a as La, c as Ia, s as va, x as ba, v as Ra, t as Va, r as Fa, w as ka, i as Oa, n as Ya, u as Na } from "./chunks/string.BhJ0Zogu.js";
|
|
35
35
|
import { g as Pa, a as _a } from "./chunks/template.ClovJacp.js";
|
|
36
36
|
import { c as Ha, f as Wa, a as Ba, g as $a } from "./chunks/time.DWfbnPnM.js";
|
|
37
|
-
import { b as za } from "./chunks/transformation.
|
|
37
|
+
import { b as za } from "./chunks/transformation.BDmd3kER.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}`;
|
package/package.json
CHANGED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { T as u, U as s } from "./asset-link-format.QzzboHHE.js";
|
|
2
|
-
function m({
|
|
3
|
-
asset: v,
|
|
4
|
-
baseUrl: l,
|
|
5
|
-
extension: y,
|
|
6
|
-
options: f,
|
|
7
|
-
parameters: c,
|
|
8
|
-
transformations: n,
|
|
9
|
-
useSession: _ = ""
|
|
10
|
-
}) {
|
|
11
|
-
if (l == null)
|
|
12
|
-
return "";
|
|
13
|
-
let i = l;
|
|
14
|
-
const k = n?.findLast(
|
|
15
|
-
(r) => r.key === u.Quality
|
|
16
|
-
);
|
|
17
|
-
if (k && (n = [
|
|
18
|
-
...n?.filter(
|
|
19
|
-
(r) => r.key !== u.Quality
|
|
20
|
-
) || [],
|
|
21
|
-
k
|
|
22
|
-
]), n) {
|
|
23
|
-
const r = [];
|
|
24
|
-
for (let e = 0; e < n.length; e++) {
|
|
25
|
-
const o = n[e];
|
|
26
|
-
if (o.key === u.Rotate) {
|
|
27
|
-
let t = o.value.rotation ?? 0;
|
|
28
|
-
for (; n[e + 1]?.key === u.Rotate; )
|
|
29
|
-
e++, t += n[e].value.rotation ?? 0;
|
|
30
|
-
t !== 0 && r.push({ key: u.Rotate, value: { rotation: t } });
|
|
31
|
-
} else
|
|
32
|
-
r.push(o);
|
|
33
|
-
}
|
|
34
|
-
n = r;
|
|
35
|
-
}
|
|
36
|
-
n && n.length > 0 && (i += "/t/"), n?.forEach(({ key: r, value: e }) => {
|
|
37
|
-
if (r === u.Resize) {
|
|
38
|
-
if (e.unit === s.AspectRatio && e.ratioWidth && e.ratioHeight) {
|
|
39
|
-
i += `re_ar_${e.ratioWidth}:${e.ratioHeight}/`;
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const o = [
|
|
43
|
-
...[
|
|
44
|
-
{
|
|
45
|
-
key: "re_w_",
|
|
46
|
-
value: Math.round(e.width ?? 0)
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
key: "re_h_",
|
|
50
|
-
value: Math.round(e.height ?? 0)
|
|
51
|
-
}
|
|
52
|
-
].filter((t) => t.value !== void 0).map((t) => ({
|
|
53
|
-
key: t.key,
|
|
54
|
-
value: Math.round(Number(t.value))
|
|
55
|
-
})),
|
|
56
|
-
{
|
|
57
|
-
key: "re_rm_",
|
|
58
|
-
value: "stretch"
|
|
59
|
-
}
|
|
60
|
-
];
|
|
61
|
-
o.forEach(({ key: t, value: a }, d) => {
|
|
62
|
-
i += `${t}${a}${d < o.length - 1 ? "," : ""}`;
|
|
63
|
-
}), i += "/";
|
|
64
|
-
}
|
|
65
|
-
if (r === u.Crop) {
|
|
66
|
-
const o = e.unit === s.AspectRatio && !!e.ratioWidth && !!e.ratioHeight, t = [
|
|
67
|
-
...[
|
|
68
|
-
{
|
|
69
|
-
key: "c_",
|
|
70
|
-
value: e.mode
|
|
71
|
-
},
|
|
72
|
-
...o ? [
|
|
73
|
-
{
|
|
74
|
-
key: "ar_",
|
|
75
|
-
value: `${e.ratioWidth}:${e.ratioHeight}`
|
|
76
|
-
}
|
|
77
|
-
] : [],
|
|
78
|
-
...!e.disabledSize && !o ? [
|
|
79
|
-
{
|
|
80
|
-
key: "c_w_",
|
|
81
|
-
value: Math.round(e.width ?? 0)
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
key: "c_h_",
|
|
85
|
-
value: Math.round(e.height ?? 0)
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
key: "c_x_",
|
|
89
|
-
value: Math.round(e.x ?? 0) === 0 && f?.omitZeroXY ? void 0 : Math.round(e.x ?? 0)
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
key: "c_y_",
|
|
93
|
-
value: Math.round(e.y ?? 0) === 0 && f?.omitZeroXY ? void 0 : Math.round(e.y ?? 0)
|
|
94
|
-
}
|
|
95
|
-
] : [],
|
|
96
|
-
...e.focusMode && e.focusMode !== "manual" ? [
|
|
97
|
-
{
|
|
98
|
-
key: e.isFocusModeAuto ? "acm_" : "c_g_",
|
|
99
|
-
value: e.focusMode
|
|
100
|
-
}
|
|
101
|
-
] : []
|
|
102
|
-
].filter((a) => a.value !== void 0 && a.value !== null).map((a) => ({
|
|
103
|
-
key: a.key,
|
|
104
|
-
value: a.value
|
|
105
|
-
})),
|
|
106
|
-
...o ? [] : [
|
|
107
|
-
{
|
|
108
|
-
key: "c_whu_",
|
|
109
|
-
value: "pixel"
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
];
|
|
113
|
-
t.forEach(({ key: a, value: d }, $) => {
|
|
114
|
-
const p = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(a);
|
|
115
|
-
i += `${a}${p ? Math.round(Number(d)) : d}${$ < t.length - 1 ? "," : ""}`;
|
|
116
|
-
}), i += "/";
|
|
117
|
-
}
|
|
118
|
-
if (r === u.Rotate && ([
|
|
119
|
-
{
|
|
120
|
-
key: "r_a_",
|
|
121
|
-
value: e.rotation
|
|
122
|
-
}
|
|
123
|
-
].filter((t) => t.value !== void 0).map((t) => ({
|
|
124
|
-
key: t.key,
|
|
125
|
-
value: Math.round(Number(t.value))
|
|
126
|
-
})).forEach(({ key: t, value: a }) => {
|
|
127
|
-
i += `${t}${a}`;
|
|
128
|
-
}), i += "/"), r === u.Quality) {
|
|
129
|
-
const o = [
|
|
130
|
-
{
|
|
131
|
-
key: "q_level_",
|
|
132
|
-
value: e.quality
|
|
133
|
-
}
|
|
134
|
-
].filter((t) => t.value !== void 0).map((t) => ({
|
|
135
|
-
key: t.key,
|
|
136
|
-
value: Math.round(Number(t.value))
|
|
137
|
-
}));
|
|
138
|
-
o.forEach(({ key: t, value: a }, d) => {
|
|
139
|
-
i += `${t}${a}${d < o.length - 1 ? "," : ""}`;
|
|
140
|
-
}), i += "/";
|
|
141
|
-
}
|
|
142
|
-
if (r === u.Metadata) {
|
|
143
|
-
const o = [
|
|
144
|
-
{
|
|
145
|
-
key: "fl_keep_metadata",
|
|
146
|
-
value: e.keepMetadata
|
|
147
|
-
}
|
|
148
|
-
].filter((t) => t.value !== void 0).map((t) => ({ key: t.key, value: t.value }));
|
|
149
|
-
o.forEach(({ key: t }, a) => {
|
|
150
|
-
i += `${t}${a < o.length - 1 ? "," : ""}`;
|
|
151
|
-
}), i += "/";
|
|
152
|
-
}
|
|
153
|
-
}), y && (i += `${v?.identifier ?? crypto.randomUUID()}${y}`);
|
|
154
|
-
const h = [];
|
|
155
|
-
return c && c.length > 0 && c.forEach(({ key: r, value: e }) => {
|
|
156
|
-
h.push(
|
|
157
|
-
`${encodeURIComponent(r.trim())}=${encodeURIComponent(e.trim())}`
|
|
158
|
-
);
|
|
159
|
-
}), l && _ && h.push(`UseSession=${encodeURIComponent(_)}`), h.length > 0 && (i += `?${h.join("&")}`), i.endsWith("/") && (i = i.slice(0, -1)), i;
|
|
160
|
-
}
|
|
161
|
-
export {
|
|
162
|
-
m as b
|
|
163
|
-
};
|