@questpie/admin 3.2.2 → 3.2.4

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.
Files changed (53) hide show
  1. package/dist/client/blocks/block-renderer.d.mts +2 -2
  2. package/dist/client/components/blocks/block-library-sidebar.mjs +126 -113
  3. package/dist/client/components/fields/json-field.mjs +114 -118
  4. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +38 -40
  5. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +6 -17
  6. package/dist/client/components/fields/rich-text-editor/index.mjs +71 -87
  7. package/dist/client/components/history-sidebar.mjs +25 -10
  8. package/dist/client/components/media/media-picker-dialog.mjs +237 -254
  9. package/dist/client/components/preview/live-preview-mode.mjs +230 -203
  10. package/dist/client/components/primitives/asset-preview.mjs +1 -1
  11. package/dist/client/contexts/focus-context.d.mts +4 -0
  12. package/dist/client/contexts/focus-context.mjs +106 -86
  13. package/dist/client/preview/block-scope-context.d.mts +2 -2
  14. package/dist/client/preview/diff.mjs +110 -0
  15. package/dist/client/preview/preview-banner.d.mts +2 -2
  16. package/dist/client/preview/preview-field.d.mts +4 -4
  17. package/dist/client/preview/preview-field.mjs +125 -187
  18. package/dist/client/preview/use-collection-preview.mjs +49 -21
  19. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  20. package/dist/client/views/auth/auth-layout.d.mts +3 -3
  21. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  22. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  23. package/dist/client/views/collection/bulk-action-toolbar.mjs +135 -156
  24. package/dist/client/views/collection/field-renderer.mjs +162 -51
  25. package/dist/client/views/collection/form-view.mjs +43 -81
  26. package/dist/client/views/collection/table-view.mjs +12 -10
  27. package/dist/client/views/common/global-search.mjs +199 -182
  28. package/dist/client/views/globals/global-form-view.mjs +625 -621
  29. package/dist/client/views/layout/admin-router.mjs +84 -100
  30. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  31. package/dist/client/views/pages/invite-page.d.mts +2 -2
  32. package/dist/server/modules/admin/collections/account.d.mts +50 -50
  33. package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
  34. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  35. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  36. package/dist/server/modules/admin/collections/apikey.d.mts +67 -67
  37. package/dist/server/modules/admin/collections/assets.d.mts +39 -39
  38. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  39. package/dist/server/modules/admin/collections/user.d.mts +62 -62
  40. package/dist/server/modules/admin/collections/verification.d.mts +23 -23
  41. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  42. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  43. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  44. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  45. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  46. package/dist/server/modules/admin/routes/setup.d.mts +7 -7
  47. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  48. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  49. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +41 -41
  50. package/dist/server/modules/audit/.generated/module.d.mts +6 -6
  51. package/dist/server/modules/audit/collections/audit-log.d.mts +78 -78
  52. package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +2 -2
  53. package/package.json +3 -3
@@ -65,7 +65,7 @@ const MIME_TYPE_FILTERS = [
65
65
  }
66
66
  ];
67
67
  function MediaPickerDialog(t0) {
68
- const $ = c(116);
68
+ const $ = c(112);
69
69
  const { open, onOpenChange, mode: t1, accept, onSelect, maxItems, collection } = t0;
70
70
  const mode = t1 === void 0 ? "single" : t1;
71
71
  const { t } = useTranslation();
@@ -181,12 +181,20 @@ function MediaPickerDialog(t0) {
181
181
  } else t10 = $[23];
182
182
  const assets = t10;
183
183
  let t11;
184
- if ($[24] !== assets || $[25] !== previewAssetId) {
185
- t11 = assets.find((asset) => asset.id === previewAssetId) ?? null;
186
- $[24] = assets;
187
- $[25] = previewAssetId;
188
- $[26] = t11;
189
- } else t11 = $[26];
184
+ bb1: {
185
+ if (!open || assets.length === 0) {
186
+ t11 = null;
187
+ break bb1;
188
+ }
189
+ let t12$1;
190
+ if ($[24] !== assets || $[25] !== previewAssetId) {
191
+ t12$1 = assets.find((asset) => asset.id === previewAssetId) ?? assets[0];
192
+ $[24] = assets;
193
+ $[25] = previewAssetId;
194
+ $[26] = t12$1;
195
+ } else t12$1 = $[26];
196
+ t11 = t12$1;
197
+ }
190
198
  const previewAsset = t11;
191
199
  let t12;
192
200
  if ($[27] !== mimeFilter || $[28] !== t) {
@@ -197,70 +205,44 @@ function MediaPickerDialog(t0) {
197
205
  } else t12 = $[29];
198
206
  const selectedMimeFilterLabel = t12;
199
207
  let t13;
200
- let t14;
201
- if ($[30] !== open) {
208
+ if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
202
209
  t13 = () => {
203
- if (!open) {
204
- setSelectedIds(/* @__PURE__ */ new Set());
205
- setSearchQuery("");
206
- setMimeFilter("all");
207
- setPreviewAssetId(null);
208
- return;
209
- }
210
+ setSelectedIds(/* @__PURE__ */ new Set());
211
+ setSearchQuery("");
212
+ setMimeFilter("all");
213
+ setPreviewAssetId(null);
210
214
  };
211
- t14 = [open];
212
- $[30] = open;
213
- $[31] = t13;
215
+ $[30] = t13;
216
+ } else t13 = $[30];
217
+ const resetPickerState = t13;
218
+ let t14;
219
+ if ($[31] !== onOpenChange) {
220
+ t14 = (nextOpen) => {
221
+ if (!nextOpen) resetPickerState();
222
+ onOpenChange(nextOpen);
223
+ };
224
+ $[31] = onOpenChange;
214
225
  $[32] = t14;
215
- } else {
216
- t13 = $[31];
217
- t14 = $[32];
218
- }
219
- React.useEffect(t13, t14);
226
+ } else t14 = $[32];
227
+ const handleOpenChange = t14;
220
228
  let t15;
221
- let t16;
222
- if ($[33] !== assets || $[34] !== open || $[35] !== previewAssetId) {
223
- t15 = () => {
224
- if (!open || assets.length === 0) return;
225
- if (!previewAssetId) {
226
- setPreviewAssetId(assets[0].id);
227
- return;
228
- }
229
- if (!assets.some((asset_0) => asset_0.id === previewAssetId)) setPreviewAssetId(assets[0].id);
230
- };
231
- t16 = [
232
- open,
233
- assets,
234
- previewAssetId
235
- ];
236
- $[33] = assets;
237
- $[34] = open;
238
- $[35] = previewAssetId;
239
- $[36] = t15;
240
- $[37] = t16;
241
- } else {
242
- t15 = $[36];
243
- t16 = $[37];
244
- }
245
- React.useEffect(t15, t16);
246
- let t17;
247
- if ($[38] !== maxItems || $[39] !== mode || $[40] !== t) {
248
- t17 = (ids) => {
229
+ if ($[33] !== maxItems || $[34] !== mode || $[35] !== t) {
230
+ t15 = (ids) => {
249
231
  if (mode === "multiple" && maxItems && ids.size > maxItems) {
250
232
  toast.warning(t("error.maxItemsAllowed", { max: maxItems }));
251
233
  return;
252
234
  }
253
235
  setSelectedIds(ids);
254
236
  };
255
- $[38] = maxItems;
256
- $[39] = mode;
257
- $[40] = t;
258
- $[41] = t17;
259
- } else t17 = $[41];
260
- const handleSelectionChange = t17;
261
- let t18;
262
- if ($[42] !== availableUploadCollections || $[43] !== mode || $[44] !== onOpenChange || $[45] !== onSelect || $[46] !== resolvedCollection || $[47] !== selectedIds || $[48] !== t) {
263
- t18 = () => {
237
+ $[33] = maxItems;
238
+ $[34] = mode;
239
+ $[35] = t;
240
+ $[36] = t15;
241
+ } else t15 = $[36];
242
+ const handleSelectionChange = t15;
243
+ let t16;
244
+ if ($[37] !== assets || $[38] !== availableUploadCollections || $[39] !== handleOpenChange || $[40] !== mode || $[41] !== onSelect || $[42] !== resolvedCollection || $[43] !== selectedIds || $[44] !== t) {
245
+ t16 = () => {
264
246
  if (!resolvedCollection) {
265
247
  toast.error(availableUploadCollections.length > 1 ? `Multiple upload collections are available (${availableUploadCollections.join(", ")}). Specify the collection for MediaPickerDialog.` : "No upload collection is configured for media library.");
266
248
  return;
@@ -271,106 +253,107 @@ function MediaPickerDialog(t0) {
271
253
  }
272
254
  if (mode === "single") {
273
255
  const [id] = Array.from(selectedIds);
274
- onSelect(id);
275
- } else onSelect(Array.from(selectedIds));
276
- onOpenChange(false);
256
+ onSelect(id, assets.find((candidate) => candidate.id === id));
257
+ } else onSelect(Array.from(selectedIds), assets.filter((asset_1) => selectedIds.has(asset_1.id)));
258
+ handleOpenChange(false);
259
+ };
260
+ $[37] = assets;
261
+ $[38] = availableUploadCollections;
262
+ $[39] = handleOpenChange;
263
+ $[40] = mode;
264
+ $[41] = onSelect;
265
+ $[42] = resolvedCollection;
266
+ $[43] = selectedIds;
267
+ $[44] = t;
268
+ $[45] = t16;
269
+ } else t16 = $[45];
270
+ const handleSelect = t16;
271
+ let t17;
272
+ if ($[46] !== handleOpenChange) {
273
+ t17 = () => {
274
+ handleOpenChange(false);
277
275
  };
278
- $[42] = availableUploadCollections;
279
- $[43] = mode;
280
- $[44] = onOpenChange;
281
- $[45] = onSelect;
282
- $[46] = resolvedCollection;
283
- $[47] = selectedIds;
276
+ $[46] = handleOpenChange;
277
+ $[47] = t17;
278
+ } else t17 = $[47];
279
+ const handleCancel = t17;
280
+ let t18;
281
+ if ($[48] !== t) {
282
+ t18 = t("media.browseLibrary");
284
283
  $[48] = t;
285
284
  $[49] = t18;
286
285
  } else t18 = $[49];
287
- const handleSelect = t18;
288
286
  let t19;
289
- if ($[50] !== onOpenChange) {
290
- t19 = () => {
291
- onOpenChange(false);
292
- };
293
- $[50] = onOpenChange;
287
+ if ($[50] !== t18) {
288
+ t19 = /* @__PURE__ */ jsx(SheetTitle, { children: t18 });
289
+ $[50] = t18;
294
290
  $[51] = t19;
295
291
  } else t19 = $[51];
296
- const handleCancel = t19;
297
- let t20;
298
- if ($[52] !== t) {
299
- t20 = t("media.browseLibrary");
300
- $[52] = t;
301
- $[53] = t20;
302
- } else t20 = $[53];
292
+ const t20 = mode === "single" ? "Select an asset from your library" : `Select up to ${maxItems || "multiple"} assets`;
303
293
  let t21;
304
- if ($[54] !== t20) {
305
- t21 = /* @__PURE__ */ jsx(SheetTitle, { children: t20 });
306
- $[54] = t20;
307
- $[55] = t21;
308
- } else t21 = $[55];
309
- const t22 = mode === "single" ? "Select an asset from your library" : `Select up to ${maxItems || "multiple"} assets`;
310
- let t23;
311
- if ($[56] !== t22) {
312
- t23 = /* @__PURE__ */ jsx(SheetDescription, { children: t22 });
313
- $[56] = t22;
314
- $[57] = t23;
315
- } else t23 = $[57];
316
- let t24;
317
- if ($[58] !== t21 || $[59] !== t23) {
318
- t24 = /* @__PURE__ */ jsxs(SheetHeader, {
294
+ if ($[52] !== t20) {
295
+ t21 = /* @__PURE__ */ jsx(SheetDescription, { children: t20 });
296
+ $[52] = t20;
297
+ $[53] = t21;
298
+ } else t21 = $[53];
299
+ let t22;
300
+ if ($[54] !== t19 || $[55] !== t21) {
301
+ t22 = /* @__PURE__ */ jsxs(SheetHeader, {
319
302
  className: "px-6 pt-6",
320
- children: [t21, t23]
303
+ children: [t19, t21]
321
304
  });
322
- $[58] = t21;
323
- $[59] = t23;
324
- $[60] = t24;
325
- } else t24 = $[60];
326
- let t25;
327
- if ($[61] !== availableUploadCollections || $[62] !== resolvedCollection) {
328
- t25 = !resolvedCollection && /* @__PURE__ */ jsx("div", {
305
+ $[54] = t19;
306
+ $[55] = t21;
307
+ $[56] = t22;
308
+ } else t22 = $[56];
309
+ let t23;
310
+ if ($[57] !== availableUploadCollections || $[58] !== resolvedCollection) {
311
+ t23 = !resolvedCollection && /* @__PURE__ */ jsx("div", {
329
312
  className: "border-warning/40 bg-warning/5 text-warning border p-3 text-sm",
330
313
  children: availableUploadCollections.length > 1 ? `Multiple upload collections are available (${availableUploadCollections.join(", ")}). Pass the collection prop to choose one.` : "No upload collection is configured for media library."
331
314
  });
332
- $[61] = availableUploadCollections;
333
- $[62] = resolvedCollection;
334
- $[63] = t25;
335
- } else t25 = $[63];
336
- let t26;
337
- if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
338
- t26 = /* @__PURE__ */ jsx(Icon, {
315
+ $[57] = availableUploadCollections;
316
+ $[58] = resolvedCollection;
317
+ $[59] = t23;
318
+ } else t23 = $[59];
319
+ let t24;
320
+ if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
321
+ t24 = /* @__PURE__ */ jsx(Icon, {
339
322
  icon: "ph:magnifying-glass-bold",
340
323
  className: "text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"
341
324
  });
342
- $[64] = t26;
343
- } else t26 = $[64];
325
+ $[60] = t24;
326
+ } else t24 = $[60];
327
+ let t25;
328
+ if ($[61] !== t) {
329
+ t25 = t("media.searchPlaceholder");
330
+ $[61] = t;
331
+ $[62] = t25;
332
+ } else t25 = $[62];
333
+ let t26;
334
+ if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
335
+ t26 = (e) => setSearchQuery(e.target.value);
336
+ $[63] = t26;
337
+ } else t26 = $[63];
344
338
  let t27;
345
- if ($[65] !== t) {
346
- t27 = t("media.searchPlaceholder");
347
- $[65] = t;
348
- $[66] = t27;
349
- } else t27 = $[66];
350
- let t28;
351
- if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
352
- t28 = (e) => setSearchQuery(e.target.value);
353
- $[67] = t28;
354
- } else t28 = $[67];
355
- let t29;
356
- if ($[68] !== searchQuery || $[69] !== t27) {
357
- t29 = /* @__PURE__ */ jsxs("div", {
339
+ if ($[64] !== searchQuery || $[65] !== t25) {
340
+ t27 = /* @__PURE__ */ jsxs("div", {
358
341
  className: "relative flex-1",
359
- children: [t26, /* @__PURE__ */ jsx(Input, {
342
+ children: [t24, /* @__PURE__ */ jsx(Input, {
360
343
  type: "text",
361
- placeholder: t27,
344
+ placeholder: t25,
362
345
  value: searchQuery,
363
- onChange: t28,
346
+ onChange: t26,
364
347
  className: "pl-9"
365
348
  })]
366
349
  });
367
- $[68] = searchQuery;
368
- $[69] = t27;
369
- $[70] = t29;
370
- } else t29 = $[70];
371
- let t30;
372
- if ($[71] !== accept || $[72] !== mimeFilter || $[73] !== selectedMimeFilterLabel || $[74] !== t) {
373
- t30 = !accept && /* @__PURE__ */ jsxs(Select, {
350
+ $[64] = searchQuery;
351
+ $[65] = t25;
352
+ $[66] = t27;
353
+ } else t27 = $[66];
354
+ let t28;
355
+ if ($[67] !== accept || $[68] !== mimeFilter || $[69] !== selectedMimeFilterLabel || $[70] !== t) {
356
+ t28 = !accept && /* @__PURE__ */ jsxs(Select, {
374
357
  value: mimeFilter,
375
358
  onValueChange: (value) => setMimeFilter(value || "all"),
376
359
  children: [/* @__PURE__ */ jsx(SelectTrigger, {
@@ -387,30 +370,30 @@ function MediaPickerDialog(t0) {
387
370
  children: t(filter_0.labelKey)
388
371
  }, filter_0.value)) })]
389
372
  });
390
- $[71] = accept;
391
- $[72] = mimeFilter;
392
- $[73] = selectedMimeFilterLabel;
393
- $[74] = t;
373
+ $[67] = accept;
374
+ $[68] = mimeFilter;
375
+ $[69] = selectedMimeFilterLabel;
376
+ $[70] = t;
377
+ $[71] = t28;
378
+ } else t28 = $[71];
379
+ let t29;
380
+ if ($[72] !== t27 || $[73] !== t28) {
381
+ t29 = /* @__PURE__ */ jsxs("div", {
382
+ className: "flex flex-col gap-3 border-b pb-4 sm:flex-row",
383
+ children: [t27, t28]
384
+ });
385
+ $[72] = t27;
386
+ $[73] = t28;
387
+ $[74] = t29;
388
+ } else t29 = $[74];
389
+ let t30;
390
+ if ($[75] === Symbol.for("react.memo_cache_sentinel")) {
391
+ t30 = (asset_2) => setPreviewAssetId(asset_2.id);
394
392
  $[75] = t30;
395
393
  } else t30 = $[75];
396
394
  let t31;
397
- if ($[76] !== t29 || $[77] !== t30) {
398
- t31 = /* @__PURE__ */ jsxs("div", {
399
- className: "flex flex-col gap-3 border-b pb-4 sm:flex-row",
400
- children: [t29, t30]
401
- });
402
- $[76] = t29;
403
- $[77] = t30;
404
- $[78] = t31;
405
- } else t31 = $[78];
406
- let t32;
407
- if ($[79] === Symbol.for("react.memo_cache_sentinel")) {
408
- t32 = (asset_1) => setPreviewAssetId(asset_1.id);
409
- $[79] = t32;
410
- } else t32 = $[79];
411
- let t33;
412
- if ($[80] !== assets || $[81] !== handleSelectionChange || $[82] !== isLoading || $[83] !== mode || $[84] !== selectedIds) {
413
- t33 = /* @__PURE__ */ jsx("div", {
395
+ if ($[76] !== assets || $[77] !== handleSelectionChange || $[78] !== isLoading || $[79] !== mode || $[80] !== selectedIds) {
396
+ t31 = /* @__PURE__ */ jsx("div", {
414
397
  className: "flex-1 overflow-y-auto pr-1",
415
398
  children: /* @__PURE__ */ jsx(MediaGrid, {
416
399
  assets,
@@ -420,29 +403,29 @@ function MediaPickerDialog(t0) {
420
403
  loading: isLoading,
421
404
  columns: 5,
422
405
  className: "gap-2",
423
- onAssetClick: t32
406
+ onAssetClick: t30
424
407
  })
425
408
  });
426
- $[80] = assets;
427
- $[81] = handleSelectionChange;
428
- $[82] = isLoading;
429
- $[83] = mode;
430
- $[84] = selectedIds;
431
- $[85] = t33;
432
- } else t33 = $[85];
433
- let t34;
434
- if ($[86] === Symbol.for("react.memo_cache_sentinel")) {
435
- t34 = /* @__PURE__ */ jsx("p", {
409
+ $[76] = assets;
410
+ $[77] = handleSelectionChange;
411
+ $[78] = isLoading;
412
+ $[79] = mode;
413
+ $[80] = selectedIds;
414
+ $[81] = t31;
415
+ } else t31 = $[81];
416
+ let t32;
417
+ if ($[82] === Symbol.for("react.memo_cache_sentinel")) {
418
+ t32 = /* @__PURE__ */ jsx("p", {
436
419
  className: "text-muted-foreground font-chrome chrome-meta text-xs font-medium",
437
420
  children: "Preview"
438
421
  });
439
- $[86] = t34;
440
- } else t34 = $[86];
441
- let t35;
442
- if ($[87] !== previewAsset) {
443
- t35 = /* @__PURE__ */ jsxs("div", {
422
+ $[82] = t32;
423
+ } else t32 = $[82];
424
+ let t33;
425
+ if ($[83] !== previewAsset) {
426
+ t33 = /* @__PURE__ */ jsxs("div", {
444
427
  className: "border-border hidden w-80 shrink-0 flex-col gap-3 border-l pl-4 lg:flex xl:w-96",
445
- children: [t34, previewAsset ? /* @__PURE__ */ jsx(AssetPreview, {
428
+ children: [t32, previewAsset ? /* @__PURE__ */ jsx(AssetPreview, {
446
429
  asset: previewAsset,
447
430
  variant: "card"
448
431
  }) : /* @__PURE__ */ jsx("div", {
@@ -450,22 +433,22 @@ function MediaPickerDialog(t0) {
450
433
  children: "Select an asset to preview"
451
434
  })]
452
435
  });
453
- $[87] = previewAsset;
454
- $[88] = t35;
455
- } else t35 = $[88];
456
- let t36;
457
- if ($[89] !== t33 || $[90] !== t35) {
458
- t36 = /* @__PURE__ */ jsxs("div", {
436
+ $[83] = previewAsset;
437
+ $[84] = t33;
438
+ } else t33 = $[84];
439
+ let t34;
440
+ if ($[85] !== t31 || $[86] !== t33) {
441
+ t34 = /* @__PURE__ */ jsxs("div", {
459
442
  className: "flex flex-1 gap-4 overflow-hidden",
460
- children: [t33, t35]
443
+ children: [t31, t33]
461
444
  });
462
- $[89] = t33;
463
- $[90] = t35;
464
- $[91] = t36;
465
- } else t36 = $[91];
466
- let t37;
467
- if ($[92] !== previewAsset) {
468
- t37 = /* @__PURE__ */ jsx("div", {
445
+ $[85] = t31;
446
+ $[86] = t33;
447
+ $[87] = t34;
448
+ } else t34 = $[87];
449
+ let t35;
450
+ if ($[88] !== previewAsset) {
451
+ t35 = /* @__PURE__ */ jsx("div", {
469
452
  className: "border-t pt-4 lg:hidden",
470
453
  children: previewAsset ? /* @__PURE__ */ jsx(AssetPreview, {
471
454
  asset: previewAsset,
@@ -475,95 +458,95 @@ function MediaPickerDialog(t0) {
475
458
  children: "Select an asset to preview"
476
459
  })
477
460
  });
478
- $[92] = previewAsset;
479
- $[93] = t37;
480
- } else t37 = $[93];
481
- let t38;
482
- if ($[94] !== t25 || $[95] !== t31 || $[96] !== t36 || $[97] !== t37) {
483
- t38 = /* @__PURE__ */ jsxs("div", {
461
+ $[88] = previewAsset;
462
+ $[89] = t35;
463
+ } else t35 = $[89];
464
+ let t36;
465
+ if ($[90] !== t23 || $[91] !== t29 || $[92] !== t34 || $[93] !== t35) {
466
+ t36 = /* @__PURE__ */ jsxs("div", {
484
467
  className: "flex flex-1 flex-col gap-4 overflow-hidden px-6 pb-6",
485
468
  children: [
486
- t25,
487
- t31,
488
- t36,
489
- t37
469
+ t23,
470
+ t29,
471
+ t34,
472
+ t35
490
473
  ]
491
474
  });
492
- $[94] = t25;
493
- $[95] = t31;
494
- $[96] = t36;
495
- $[97] = t37;
496
- $[98] = t38;
497
- } else t38 = $[98];
498
- let t39;
499
- if ($[99] !== handleCancel) {
500
- t39 = /* @__PURE__ */ jsx(Button, {
475
+ $[90] = t23;
476
+ $[91] = t29;
477
+ $[92] = t34;
478
+ $[93] = t35;
479
+ $[94] = t36;
480
+ } else t36 = $[94];
481
+ let t37;
482
+ if ($[95] !== handleCancel) {
483
+ t37 = /* @__PURE__ */ jsx(Button, {
501
484
  variant: "outline",
502
485
  onClick: handleCancel,
503
486
  children: "Cancel"
504
487
  });
505
- $[99] = handleCancel;
506
- $[100] = t39;
507
- } else t39 = $[100];
508
- const t40 = selectedIds.size === 0 || isLoading;
509
- const t41 = selectedIds.size > 0 && `(${selectedIds.size})`;
510
- let t42;
511
- if ($[101] !== handleSelect || $[102] !== t40 || $[103] !== t41) {
512
- t42 = /* @__PURE__ */ jsxs(Button, {
488
+ $[95] = handleCancel;
489
+ $[96] = t37;
490
+ } else t37 = $[96];
491
+ const t38 = selectedIds.size === 0 || isLoading;
492
+ const t39 = selectedIds.size > 0 && `(${selectedIds.size})`;
493
+ let t40;
494
+ if ($[97] !== handleSelect || $[98] !== t38 || $[99] !== t39) {
495
+ t40 = /* @__PURE__ */ jsxs(Button, {
513
496
  className: "tabular-nums",
514
497
  onClick: handleSelect,
515
- disabled: t40,
516
- children: ["Select ", t41]
498
+ disabled: t38,
499
+ children: ["Select ", t39]
517
500
  });
518
- $[101] = handleSelect;
519
- $[102] = t40;
520
- $[103] = t41;
521
- $[104] = t42;
522
- } else t42 = $[104];
523
- let t43;
524
- if ($[105] !== t39 || $[106] !== t42) {
525
- t43 = /* @__PURE__ */ jsx(SheetFooter, {
501
+ $[97] = handleSelect;
502
+ $[98] = t38;
503
+ $[99] = t39;
504
+ $[100] = t40;
505
+ } else t40 = $[100];
506
+ let t41;
507
+ if ($[101] !== t37 || $[102] !== t40) {
508
+ t41 = /* @__PURE__ */ jsx(SheetFooter, {
526
509
  className: "border-t px-6 py-4",
527
510
  children: /* @__PURE__ */ jsxs("div", {
528
511
  className: "flex w-full justify-end gap-2",
529
- children: [t39, t42]
512
+ children: [t37, t40]
530
513
  })
531
514
  });
532
- $[105] = t39;
533
- $[106] = t42;
534
- $[107] = t43;
535
- } else t43 = $[107];
536
- let t44;
537
- if ($[108] !== t24 || $[109] !== t38 || $[110] !== t43) {
538
- t44 = /* @__PURE__ */ jsxs(SheetContent, {
515
+ $[101] = t37;
516
+ $[102] = t40;
517
+ $[103] = t41;
518
+ } else t41 = $[103];
519
+ let t42;
520
+ if ($[104] !== t22 || $[105] !== t36 || $[106] !== t41) {
521
+ t42 = /* @__PURE__ */ jsxs(SheetContent, {
539
522
  side: "right",
540
523
  showOverlay: false,
541
524
  className: "qa-media-picker w-full p-0 data-[side=right]:sm:max-w-6xl",
542
525
  children: [
543
- t24,
544
- t38,
545
- t43
526
+ t22,
527
+ t36,
528
+ t41
546
529
  ]
547
530
  });
548
- $[108] = t24;
549
- $[109] = t38;
550
- $[110] = t43;
551
- $[111] = t44;
552
- } else t44 = $[111];
553
- let t45;
554
- if ($[112] !== onOpenChange || $[113] !== open || $[114] !== t44) {
555
- t45 = /* @__PURE__ */ jsx(Sheet, {
531
+ $[104] = t22;
532
+ $[105] = t36;
533
+ $[106] = t41;
534
+ $[107] = t42;
535
+ } else t42 = $[107];
536
+ let t43;
537
+ if ($[108] !== handleOpenChange || $[109] !== open || $[110] !== t42) {
538
+ t43 = /* @__PURE__ */ jsx(Sheet, {
556
539
  open,
557
- onOpenChange,
540
+ onOpenChange: handleOpenChange,
558
541
  modal: false,
559
- children: t44
542
+ children: t42
560
543
  });
561
- $[112] = onOpenChange;
562
- $[113] = open;
563
- $[114] = t44;
564
- $[115] = t45;
565
- } else t45 = $[115];
566
- return t45;
544
+ $[108] = handleOpenChange;
545
+ $[109] = open;
546
+ $[110] = t42;
547
+ $[111] = t43;
548
+ } else t43 = $[111];
549
+ return t43;
567
550
  }
568
551
  function _temp(pattern) {
569
552
  if (pattern.startsWith(".")) return { filename: { endsWith: pattern } };