camox 0.23.0 → 0.24.1

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.
@@ -190,6 +190,7 @@ declare function createApp({
190
190
  alt: string;
191
191
  filename: string;
192
192
  mimeType: string;
193
+ size?: number;
193
194
  _fileId?: string;
194
195
  } & {
195
196
  readonly __brand: "ImageValue";
@@ -207,6 +208,7 @@ declare function createApp({
207
208
  alt: string;
208
209
  filename: string;
209
210
  mimeType: string;
211
+ size?: number;
210
212
  _fileId?: string;
211
213
  } & {
212
214
  readonly __brand: "FileValue";
@@ -222,6 +224,7 @@ declare function createApp({
222
224
  alt: string;
223
225
  filename: string;
224
226
  mimeType: string;
227
+ size?: number;
225
228
  _fileId?: string;
226
229
  } & {
227
230
  readonly __brand: "ImageValue";
@@ -239,6 +242,7 @@ declare function createApp({
239
242
  alt: string;
240
243
  filename: string;
241
244
  mimeType: string;
245
+ size?: number;
242
246
  _fileId?: string;
243
247
  } & {
244
248
  readonly __brand: "FileValue";
@@ -584,6 +588,7 @@ declare function createApp({
584
588
  alt: string;
585
589
  filename: string;
586
590
  mimeType: string;
591
+ size?: number;
587
592
  _fileId?: string;
588
593
  } & {
589
594
  readonly __brand: "ImageValue";
@@ -601,6 +606,7 @@ declare function createApp({
601
606
  alt: string;
602
607
  filename: string;
603
608
  mimeType: string;
609
+ size?: number;
604
610
  _fileId?: string;
605
611
  } & {
606
612
  readonly __brand: "FileValue";
@@ -616,6 +622,7 @@ declare function createApp({
616
622
  alt: string;
617
623
  filename: string;
618
624
  mimeType: string;
625
+ size?: number;
619
626
  _fileId?: string;
620
627
  } & {
621
628
  readonly __brand: "ImageValue";
@@ -633,6 +640,7 @@ declare function createApp({
633
640
  alt: string;
634
641
  filename: string;
635
642
  mimeType: string;
643
+ size?: number;
636
644
  _fileId?: string;
637
645
  } & {
638
646
  readonly __brand: "FileValue";
@@ -811,6 +811,7 @@ declare function createBlock<TSchemaShape extends Record<string, TSchema>, TSett
811
811
  alt: string;
812
812
  filename: string;
813
813
  mimeType: string;
814
+ size?: number;
814
815
  _fileId?: string;
815
816
  } & {
816
817
  readonly __brand: "ImageValue";
@@ -948,6 +949,7 @@ declare function createBlock<TSchemaShape extends Record<string, TSchema>, TSett
948
949
  alt: string;
949
950
  filename: string;
950
951
  mimeType: string;
952
+ size?: number;
951
953
  _fileId?: string;
952
954
  } & {
953
955
  readonly __brand: "FileValue";
@@ -1035,6 +1037,7 @@ declare function createBlock<TSchemaShape extends Record<string, TSchema>, TSett
1035
1037
  alt: string;
1036
1038
  filename: string;
1037
1039
  mimeType: string;
1040
+ size?: number;
1038
1041
  _fileId?: string;
1039
1042
  } & {
1040
1043
  readonly __brand: "ImageValue";
@@ -1124,6 +1127,7 @@ declare function createBlock<TSchemaShape extends Record<string, TSchema>, TSett
1124
1127
  alt: string;
1125
1128
  filename: string;
1126
1129
  mimeType: string;
1130
+ size?: number;
1127
1131
  _fileId?: string;
1128
1132
  } & {
1129
1133
  readonly __brand: "FileValue";
@@ -282,9 +282,9 @@ function createBlock(options) {
282
282
  };
283
283
  const Embed = (t0) => {
284
284
  const $ = c(59);
285
- if ($[0] !== "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c") {
285
+ if ($[0] !== "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a") {
286
286
  for (let $i = 0; $i < 59; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
287
- $[0] = "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c";
287
+ $[0] = "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a";
288
288
  }
289
289
  const { name, children } = t0;
290
290
  const blockContext = React.use(Context);
@@ -532,9 +532,9 @@ function createBlock(options) {
532
532
  };
533
533
  const Link = (t0) => {
534
534
  const $ = c(38);
535
- if ($[0] !== "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c") {
535
+ if ($[0] !== "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a") {
536
536
  for (let $i = 0; $i < 38; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
537
- $[0] = "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c";
537
+ $[0] = "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a";
538
538
  }
539
539
  const { name, children } = t0;
540
540
  const blockContext = React.use(Context);
@@ -773,9 +773,9 @@ function createBlock(options) {
773
773
  };
774
774
  const Image = (t0) => {
775
775
  const $ = c(22);
776
- if ($[0] !== "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c") {
776
+ if ($[0] !== "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a") {
777
777
  for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
778
- $[0] = "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c";
778
+ $[0] = "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a";
779
779
  }
780
780
  const { name, children } = t0;
781
781
  const blockContext = React.use(Context);
@@ -846,9 +846,10 @@ function createBlock(options) {
846
846
  const imageProps = {
847
847
  src: transformImageUrl(fieldValue.url, {
848
848
  width: getDefaultImageWidth(),
849
- mimeType: fieldValue.mimeType
849
+ mimeType: fieldValue.mimeType,
850
+ size: fieldValue.size
850
851
  }),
851
- srcSet: buildImageSrcSet(fieldValue.url, fieldValue.mimeType),
852
+ srcSet: buildImageSrcSet(fieldValue.url, fieldValue.mimeType, fieldValue.size),
852
853
  sizes: getDefaultImageSizes(),
853
854
  alt: fieldValue.alt
854
855
  };
@@ -896,9 +897,9 @@ function createBlock(options) {
896
897
  };
897
898
  const File = (t0) => {
898
899
  const $ = c(9);
899
- if ($[0] !== "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c") {
900
+ if ($[0] !== "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a") {
900
901
  for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
901
- $[0] = "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c";
902
+ $[0] = "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a";
902
903
  }
903
904
  const { name, children } = t0;
904
905
  const blockContext = React.use(Context);
@@ -973,9 +974,9 @@ function createBlock(options) {
973
974
  const FileList = _AssetList;
974
975
  const RepeaterItemWrapper = (t0) => {
975
976
  const $ = c(9);
976
- if ($[0] !== "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c") {
977
+ if ($[0] !== "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a") {
977
978
  for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
978
- $[0] = "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c";
979
+ $[0] = "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a";
979
980
  }
980
981
  const { itemId, blockId, mode, children } = t0;
981
982
  const isContentEditable = useIsEditable(mode);
@@ -1016,9 +1017,9 @@ function createBlock(options) {
1016
1017
  };
1017
1018
  const RepeaterHoverProvider = (t0) => {
1018
1019
  const $ = c(7);
1019
- if ($[0] !== "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c") {
1020
+ if ($[0] !== "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a") {
1020
1021
  for (let $i = 0; $i < 7; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1021
- $[0] = "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c";
1022
+ $[0] = "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a";
1022
1023
  }
1023
1024
  const { blockId, fieldName, children } = t0;
1024
1025
  const isContentEditable = useIsEditable("site");
@@ -1049,9 +1050,9 @@ function createBlock(options) {
1049
1050
  };
1050
1051
  const Repeater = (t0) => {
1051
1052
  const $ = c(27);
1052
- if ($[0] !== "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c") {
1053
+ if ($[0] !== "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a") {
1053
1054
  for (let $i = 0; $i < 27; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1054
- $[0] = "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c";
1055
+ $[0] = "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a";
1055
1056
  }
1056
1057
  const { name, children } = t0;
1057
1058
  const blockContext = React.use(Context);
@@ -1176,9 +1177,9 @@ function createBlock(options) {
1176
1177
  };
1177
1178
  const BlockComponent = (t0) => {
1178
1179
  const $ = c(70);
1179
- if ($[0] !== "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c") {
1180
+ if ($[0] !== "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a") {
1180
1181
  for (let $i = 0; $i < 70; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1181
- $[0] = "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c";
1182
+ $[0] = "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a";
1182
1183
  }
1183
1184
  const { blockData, mode, isFirstBlock, showAddBlockTop, showAddBlockBottom, addBlockAfterPosition } = t0;
1184
1185
  const isContentEditable = useIsEditable(mode);
@@ -1478,9 +1479,9 @@ function createBlock(options) {
1478
1479
  */
1479
1480
  const Detached = (t0) => {
1480
1481
  const $ = c(31);
1481
- if ($[0] !== "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c") {
1482
+ if ($[0] !== "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a") {
1482
1483
  for (let $i = 0; $i < 31; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1483
- $[0] = "98134dd394fa3308ac68d447ce9bf4f882877a513e6fcb8411414b3cca25135c";
1484
+ $[0] = "7449f3ea9be4e14dfde818341dfd9ef5acd44b63f0cff7104a5c200feae79d4a";
1484
1485
  }
1485
1486
  const { children } = t0;
1486
1487
  const ctx = React.use(Context);
@@ -59,6 +59,7 @@ type ImageValue = {
59
59
  alt: string;
60
60
  filename: string;
61
61
  mimeType: string;
62
+ size?: number;
62
63
  _fileId?: string;
63
64
  } & {
64
65
  readonly __brand: "ImageValue";
@@ -68,6 +69,7 @@ type FileValue = {
68
69
  alt: string;
69
70
  filename: string;
70
71
  mimeType: string;
72
+ size?: number;
71
73
  _fileId?: string;
72
74
  } & {
73
75
  readonly __brand: "FileValue";
@@ -9,6 +9,7 @@ const DEFAULT_SRCSET_WIDTHS = [
9
9
  ];
10
10
  const DEFAULT_SRC_WIDTH = 1280;
11
11
  const DEFAULT_SIZES = "100vw";
12
+ const MIN_OPTIMIZE_SIZE = 50 * 1024;
12
13
  function isNonProxiedHostname(hostname) {
13
14
  if (hostname === "localhost") return true;
14
15
  if (hostname === "127.0.0.1") return true;
@@ -43,6 +44,7 @@ function isRasterImage(mimeType) {
43
44
  function transformImageUrl(url, options = {}) {
44
45
  if (!url) return url;
45
46
  if (isNonTransformableMimeType(options.mimeType)) return url;
47
+ if (options.size != null && options.size < MIN_OPTIMIZE_SIZE) return url;
46
48
  const parsed = parseUrl(url);
47
49
  if (!parsed) return url;
48
50
  if (!isTransformableUrl(parsed)) return url;
@@ -54,9 +56,10 @@ function transformImageUrl(url, options = {}) {
54
56
  if (options.width != null) parts.push(`width=${options.width}`);
55
57
  return `${parsed.origin}/cdn-cgi/image/${parts.join(",")}${parsed.pathname}${parsed.search}`;
56
58
  }
57
- function buildImageSrcSet(url, mimeType) {
59
+ function buildImageSrcSet(url, mimeType, size) {
58
60
  if (!url) return void 0;
59
61
  if (isNonTransformableMimeType(mimeType)) return void 0;
62
+ if (size != null && size < MIN_OPTIMIZE_SIZE) return void 0;
60
63
  const parsed = parseUrl(url);
61
64
  if (!parsed) return void 0;
62
65
  if (!isTransformableUrl(parsed)) return void 0;
@@ -5,108 +5,150 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { FileIcon } from "lucide-react";
6
6
 
7
7
  //#region src/features/content/components/AssetCard.tsx
8
+ const OPAQUE_IMAGE_MIME_TYPES = new Set(["image/jpeg", "image/jpg"]);
8
9
  const AssetCard = (t0) => {
9
- const $ = c(27);
10
- if ($[0] !== "9ecd8015db2f9718029c6f2952f71322cd0d4bdec949a22375db105de6ada5db") {
11
- for (let $i = 0; $i < 27; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
12
- $[0] = "9ecd8015db2f9718029c6f2952f71322cd0d4bdec949a22375db105de6ada5db";
10
+ const $ = c(46);
11
+ if ($[0] !== "1047e431261024f9506ec8f4989ecb00b2808af70364054688c5f3d5eb9e1f28") {
12
+ for (let $i = 0; $i < 46; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
13
+ $[0] = "1047e431261024f9506ec8f4989ecb00b2808af70364054688c5f3d5eb9e1f28";
13
14
  }
14
15
  const { file, selected, onSelect, onOpen } = t0;
16
+ let extension;
17
+ let isImage;
18
+ let isOpaqueImage;
15
19
  let t1;
16
- if ($[1] !== file.mimeType) {
17
- t1 = file.mimeType?.startsWith("image/");
18
- $[1] = file.mimeType;
19
- $[2] = t1;
20
- } else t1 = $[2];
21
- const isImage = t1;
22
20
  let t2;
23
- if ($[3] !== file.filename) {
24
- t2 = file.filename?.split(".").pop()?.toUpperCase() ?? "";
25
- $[3] = file.filename;
26
- $[4] = t2;
27
- } else t2 = $[4];
28
- const extension = t2;
29
- const t3 = file.id;
30
- const t4 = selected ? "bg-primary/20 border-2 border-primary" : "hover:bg-accent/75";
21
+ let t3;
22
+ let t4;
31
23
  let t5;
32
- if ($[5] !== t4) {
33
- t5 = cn("group flex flex-col gap-1.5 rounded-lg p-2 text-left border-2 border-transparent", t4);
34
- $[5] = t4;
35
- $[6] = t5;
36
- } else t5 = $[6];
37
24
  let t6;
38
- if ($[7] !== onSelect) {
39
- t6 = (e) => {
40
- e.stopPropagation();
41
- onSelect();
42
- };
43
- $[7] = onSelect;
44
- $[8] = t6;
45
- } else t6 = $[8];
25
+ if ($[1] !== file.filename || $[2] !== file.id || $[3] !== file.mimeType || $[4] !== onOpen || $[5] !== onSelect || $[6] !== selected) {
26
+ isImage = file.mimeType?.startsWith("image/");
27
+ isOpaqueImage = isImage && OPAQUE_IMAGE_MIME_TYPES.has(file.mimeType ?? "");
28
+ let t7;
29
+ if ($[16] !== file.filename) {
30
+ t7 = file.filename?.split(".").pop()?.toUpperCase() ?? "";
31
+ $[16] = file.filename;
32
+ $[17] = t7;
33
+ } else t7 = $[17];
34
+ extension = t7;
35
+ t2 = "button";
36
+ t3 = file.id;
37
+ const t8 = selected ? "bg-primary/20 border-2 border-primary" : "hover:bg-accent/75";
38
+ if ($[18] !== t8) {
39
+ t4 = cn("group flex flex-col gap-1.5 rounded-lg p-2 text-left border-2 border-transparent", t8);
40
+ $[18] = t8;
41
+ $[19] = t4;
42
+ } else t4 = $[19];
43
+ if ($[20] !== onSelect) {
44
+ t5 = (e) => {
45
+ e.stopPropagation();
46
+ onSelect();
47
+ };
48
+ $[20] = onSelect;
49
+ $[21] = t5;
50
+ } else t5 = $[21];
51
+ if ($[22] !== onOpen) {
52
+ t6 = (e_0) => {
53
+ e_0.stopPropagation();
54
+ onOpen();
55
+ };
56
+ $[22] = onOpen;
57
+ $[23] = t6;
58
+ } else t6 = $[23];
59
+ t1 = cn("flex aspect-4/3 w-full items-center justify-center overflow-hidden rounded-sm", isOpaqueImage && "bg-muted", !isImage && "bg-muted", isImage && !isOpaqueImage && "checkered p-1.5");
60
+ $[1] = file.filename;
61
+ $[2] = file.id;
62
+ $[3] = file.mimeType;
63
+ $[4] = onOpen;
64
+ $[5] = onSelect;
65
+ $[6] = selected;
66
+ $[7] = extension;
67
+ $[8] = isImage;
68
+ $[9] = isOpaqueImage;
69
+ $[10] = t1;
70
+ $[11] = t2;
71
+ $[12] = t3;
72
+ $[13] = t4;
73
+ $[14] = t5;
74
+ $[15] = t6;
75
+ } else {
76
+ extension = $[7];
77
+ isImage = $[8];
78
+ isOpaqueImage = $[9];
79
+ t1 = $[10];
80
+ t2 = $[11];
81
+ t3 = $[12];
82
+ t4 = $[13];
83
+ t5 = $[14];
84
+ t6 = $[15];
85
+ }
46
86
  let t7;
47
- if ($[9] !== onOpen) {
48
- t7 = (e_0) => {
49
- e_0.stopPropagation();
50
- onOpen();
51
- };
52
- $[9] = onOpen;
53
- $[10] = t7;
54
- } else t7 = $[10];
87
+ if ($[24] !== extension || $[25] !== file.alt || $[26] !== file.filename || $[27] !== file.mimeType || $[28] !== file.size || $[29] !== file.url || $[30] !== isImage || $[31] !== isOpaqueImage) {
88
+ t7 = isImage ? /* @__PURE__ */ jsx("img", {
89
+ src: transformImageUrl(file.url, {
90
+ width: 480,
91
+ mimeType: file.mimeType,
92
+ size: file.size
93
+ }),
94
+ alt: file.alt || file.filename,
95
+ draggable: false,
96
+ className: cn("pointer-events-none h-full w-full", isOpaqueImage ? "object-cover" : "object-contain")
97
+ }) : /* @__PURE__ */ jsxs("div", {
98
+ className: "text-muted-foreground flex flex-col items-center gap-1",
99
+ children: [/* @__PURE__ */ jsx(FileIcon, { className: "h-8 w-8" }), extension && /* @__PURE__ */ jsx("span", {
100
+ className: "text-sm font-medium",
101
+ children: extension
102
+ })]
103
+ });
104
+ $[24] = extension;
105
+ $[25] = file.alt;
106
+ $[26] = file.filename;
107
+ $[27] = file.mimeType;
108
+ $[28] = file.size;
109
+ $[29] = file.url;
110
+ $[30] = isImage;
111
+ $[31] = isOpaqueImage;
112
+ $[32] = t7;
113
+ } else t7 = $[32];
55
114
  let t8;
56
- if ($[11] !== extension || $[12] !== file.alt || $[13] !== file.filename || $[14] !== file.mimeType || $[15] !== file.url || $[16] !== isImage) {
115
+ if ($[33] !== t1 || $[34] !== t7) {
57
116
  t8 = /* @__PURE__ */ jsx("div", {
58
- className: "checkered flex aspect-4/3 w-full items-center justify-center overflow-hidden rounded-sm p-1.5",
59
- children: isImage ? /* @__PURE__ */ jsx("img", {
60
- src: transformImageUrl(file.url, {
61
- width: 480,
62
- mimeType: file.mimeType
63
- }),
64
- alt: file.alt || file.filename,
65
- draggable: false,
66
- className: "pointer-events-none h-full w-full object-contain"
67
- }) : /* @__PURE__ */ jsxs("div", {
68
- className: "text-muted-foreground flex flex-col items-center gap-1",
69
- children: [/* @__PURE__ */ jsx(FileIcon, { className: "h-8 w-8" }), extension && /* @__PURE__ */ jsx("span", {
70
- className: "text-sm font-medium",
71
- children: extension
72
- })]
73
- })
117
+ className: t1,
118
+ children: t7
74
119
  });
75
- $[11] = extension;
76
- $[12] = file.alt;
77
- $[13] = file.filename;
78
- $[14] = file.mimeType;
79
- $[15] = file.url;
80
- $[16] = isImage;
81
- $[17] = t8;
82
- } else t8 = $[17];
120
+ $[33] = t1;
121
+ $[34] = t7;
122
+ $[35] = t8;
123
+ } else t8 = $[35];
83
124
  let t9;
84
- if ($[18] !== file.filename) {
125
+ if ($[36] !== file.filename) {
85
126
  t9 = /* @__PURE__ */ jsx("p", {
86
127
  className: "line-clamp-2 px-0.5 text-xs break-all",
87
128
  children: file.filename
88
129
  });
89
- $[18] = file.filename;
90
- $[19] = t9;
91
- } else t9 = $[19];
130
+ $[36] = file.filename;
131
+ $[37] = t9;
132
+ } else t9 = $[37];
92
133
  let t10;
93
- if ($[20] !== file.id || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 || $[25] !== t9) {
134
+ if ($[38] !== t2 || $[39] !== t3 || $[40] !== t4 || $[41] !== t5 || $[42] !== t6 || $[43] !== t8 || $[44] !== t9) {
94
135
  t10 = /* @__PURE__ */ jsxs("button", {
95
- type: "button",
136
+ type: t2,
96
137
  "data-asset-id": t3,
97
- className: t5,
98
- onClick: t6,
99
- onDoubleClick: t7,
138
+ className: t4,
139
+ onClick: t5,
140
+ onDoubleClick: t6,
100
141
  children: [t8, t9]
101
142
  });
102
- $[20] = file.id;
103
- $[21] = t5;
104
- $[22] = t6;
105
- $[23] = t7;
106
- $[24] = t8;
107
- $[25] = t9;
108
- $[26] = t10;
109
- } else t10 = $[26];
143
+ $[38] = t2;
144
+ $[39] = t3;
145
+ $[40] = t4;
146
+ $[41] = t5;
147
+ $[42] = t6;
148
+ $[43] = t8;
149
+ $[44] = t9;
150
+ $[45] = t10;
151
+ } else t10 = $[45];
110
152
  return t10;
111
153
  };
112
154
 
@@ -15,6 +15,8 @@ declare function usePreviewedPage(): {
15
15
  metaTitle: string | null;
16
16
  metaDescription: string | null;
17
17
  aiSeoEnabled: boolean | null;
18
+ customOgImageBlobId: string | null;
19
+ customOgImageUrl: string | null;
18
20
  createdAt: number;
19
21
  updatedAt: number;
20
22
  };
@@ -21,9 +21,9 @@ function assetLabel(isImage, multiple) {
21
21
  }
22
22
  const AssetActionButtons = (t0) => {
23
23
  const $ = c(27);
24
- if ($[0] !== "44259d77bb7c7c167ba0def21aa6d5d7b7d1115e4b30d38a3c3d829d0a76df91") {
24
+ if ($[0] !== "578c810b03b0bcf84595cb011652bdf58260b853f4d229ef94d55109880eacf0") {
25
25
  for (let $i = 0; $i < 27; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
26
- $[0] = "44259d77bb7c7c167ba0def21aa6d5d7b7d1115e4b30d38a3c3d829d0a76df91";
26
+ $[0] = "578c810b03b0bcf84595cb011652bdf58260b853f4d229ef94d55109880eacf0";
27
27
  }
28
28
  const { isImage, multiple, fileInputRef, onPickerOpen, onFilesSelected, uploads } = t0;
29
29
  let t1;
@@ -126,9 +126,9 @@ const AssetActionButtons = (t0) => {
126
126
  };
127
127
  const SingleAssetFieldEditor = (t0) => {
128
128
  const $ = c(29);
129
- if ($[0] !== "44259d77bb7c7c167ba0def21aa6d5d7b7d1115e4b30d38a3c3d829d0a76df91") {
129
+ if ($[0] !== "578c810b03b0bcf84595cb011652bdf58260b853f4d229ef94d55109880eacf0") {
130
130
  for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
131
- $[0] = "44259d77bb7c7c167ba0def21aa6d5d7b7d1115e4b30d38a3c3d829d0a76df91";
131
+ $[0] = "578c810b03b0bcf84595cb011652bdf58260b853f4d229ef94d55109880eacf0";
132
132
  }
133
133
  const { fieldName, assetType, currentData, onFieldChange } = t0;
134
134
  const asset = currentData[fieldName];
@@ -210,7 +210,8 @@ const SingleAssetFieldEditor = (t0) => {
210
210
  children: /* @__PURE__ */ jsx("img", {
211
211
  src: transformImageUrl(asset.url, {
212
212
  width: 128,
213
- mimeType: asset.mimeType
213
+ mimeType: asset.mimeType,
214
+ size: asset.size
214
215
  }),
215
216
  alt: asset.alt || asset.filename,
216
217
  className: "h-full w-full object-cover"
@@ -3,8 +3,8 @@ import { getAuthCookieHeader } from "../../../lib/auth.js";
3
3
  import { getApiUrl, getEnvironmentName } from "../../../lib/api-client.js";
4
4
  import { fileMutations, fileQueries } from "../../../lib/queries.js";
5
5
  import { isRasterImage, transformImageUrl } from "../../../core/lib/imageTransform.js";
6
- import { DebouncedFieldEditor } from "./DebouncedFieldEditor.js";
7
6
  import { UploadDropZone } from "../../content/components/UploadDropZone.js";
7
+ import { DebouncedFieldEditor } from "./DebouncedFieldEditor.js";
8
8
  import { c } from "react/compiler-runtime";
9
9
  import { Label } from "@camox/ui/label";
10
10
  import { toast } from "@camox/ui/toaster";
@@ -21,9 +21,9 @@ import { ButtonGroup } from "@camox/ui/button-group";
21
21
  //#region src/features/preview/components/AssetLightbox.tsx
22
22
  function MetadataRow(t0) {
23
23
  const $ = c(9);
24
- if ($[0] !== "50fbf2f7ee8a6e8b4452e53c7c776c76cf2aa2926c13218fcc4664012d02ad9a") {
24
+ if ($[0] !== "5a5b1edf9c8dcefe67d31c9a59c95831dcc6dfede24df286efbdba62d1fd4e8d") {
25
25
  for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
26
- $[0] = "50fbf2f7ee8a6e8b4452e53c7c776c76cf2aa2926c13218fcc4664012d02ad9a";
26
+ $[0] = "5a5b1edf9c8dcefe67d31c9a59c95831dcc6dfede24df286efbdba62d1fd4e8d";
27
27
  }
28
28
  const { label, children } = t0;
29
29
  let t1;
@@ -67,9 +67,9 @@ function MetadataRow(t0) {
67
67
  }
68
68
  function DeliveredSize(t0) {
69
69
  const $ = c(16);
70
- if ($[0] !== "50fbf2f7ee8a6e8b4452e53c7c776c76cf2aa2926c13218fcc4664012d02ad9a") {
70
+ if ($[0] !== "5a5b1edf9c8dcefe67d31c9a59c95831dcc6dfede24df286efbdba62d1fd4e8d") {
71
71
  for (let $i = 0; $i < 16; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
72
- $[0] = "50fbf2f7ee8a6e8b4452e53c7c776c76cf2aa2926c13218fcc4664012d02ad9a";
72
+ $[0] = "5a5b1edf9c8dcefe67d31c9a59c95831dcc6dfede24df286efbdba62d1fd4e8d";
73
73
  }
74
74
  const { bytes, raw } = t0;
75
75
  if (bytes == null) {
@@ -138,9 +138,9 @@ function DeliveredSize(t0) {
138
138
  }
139
139
  function DeliveredLabel(t0) {
140
140
  const $ = c(4);
141
- if ($[0] !== "50fbf2f7ee8a6e8b4452e53c7c776c76cf2aa2926c13218fcc4664012d02ad9a") {
141
+ if ($[0] !== "5a5b1edf9c8dcefe67d31c9a59c95831dcc6dfede24df286efbdba62d1fd4e8d") {
142
142
  for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
143
- $[0] = "50fbf2f7ee8a6e8b4452e53c7c776c76cf2aa2926c13218fcc4664012d02ad9a";
143
+ $[0] = "5a5b1edf9c8dcefe67d31c9a59c95831dcc6dfede24df286efbdba62d1fd4e8d";
144
144
  }
145
145
  const { children } = t0;
146
146
  let t1;
@@ -243,11 +243,13 @@ const AssetLightbox = ({ open, onOpenChange, fileId }) => {
243
243
  }
244
244
  const phoneUrl = transformImageUrl(fileUrl, {
245
245
  width: DELIVERED_PHONE_WIDTH,
246
- mimeType: fileMimeType
246
+ mimeType: fileMimeType,
247
+ size: file?.size
247
248
  });
248
249
  const laptopUrl = transformImageUrl(fileUrl, {
249
250
  width: DELIVERED_LAPTOP_WIDTH,
250
- mimeType: fileMimeType
251
+ mimeType: fileMimeType,
252
+ size: file?.size
251
253
  });
252
254
  if (phoneUrl === fileUrl && laptopUrl === fileUrl) {
253
255
  setDeliveredSizes(null);