@questpie/admin 3.0.3 → 3.0.5
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/README.md +34 -5
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +4 -1
- package/dist/client/builder/types/action-types.d.mts +31 -3
- package/dist/client/builder/types/collection-types.d.mts +140 -0
- package/dist/client/builder/types/ui-config.d.mts +16 -2
- package/dist/client/builder/types/views.d.mts +57 -0
- package/dist/client/builder/types/widget-types.d.mts +5 -0
- package/dist/client/components/actions/action-button.mjs +137 -199
- package/dist/client/components/actions/action-dialog.mjs +198 -156
- package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
- package/dist/client/components/actions/header-actions.mjs +52 -53
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/auth/auth-loading.mjs +41 -18
- package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
- package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
- package/dist/client/components/blocks/block-insert-button.mjs +4 -4
- package/dist/client/components/blocks/block-item.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +91 -63
- package/dist/client/components/component-renderer.mjs +1 -1
- package/dist/client/components/fields/array-field.mjs +14 -14
- package/dist/client/components/fields/asset-preview-field.mjs +1 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
- package/dist/client/components/fields/json-field.mjs +2 -2
- package/dist/client/components/fields/object-array-field.mjs +22 -22
- package/dist/client/components/fields/object-field.mjs +5 -5
- package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
- package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
- package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
- package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
- package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
- package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
- package/dist/client/components/fields/relation-picker.mjs +7 -6
- package/dist/client/components/fields/relation-select.mjs +71 -47
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
- package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
- package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
- package/dist/client/components/fields/upload-field.mjs +45 -49
- package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
- package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
- package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
- package/dist/client/components/history-sidebar.mjs +850 -340
- package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
- package/dist/client/components/locale-switcher.mjs +8 -8
- package/dist/client/components/media/media-grid.mjs +106 -86
- package/dist/client/components/media/media-picker-dialog.mjs +242 -230
- package/dist/client/components/preview/live-preview-mode.mjs +1 -1
- package/dist/client/components/primitives/asset-preview.mjs +37 -22
- package/dist/client/components/primitives/date-input.mjs +212 -249
- package/dist/client/components/primitives/dropzone.mjs +192 -159
- package/dist/client/components/primitives/field-select-control.mjs +93 -0
- package/dist/client/components/primitives/select-multi.mjs +406 -365
- package/dist/client/components/primitives/select-single.mjs +391 -323
- package/dist/client/components/primitives/time-input.mjs +2 -2
- package/dist/client/components/sheets/resource-sheet.mjs +2 -0
- package/dist/client/components/ui/accordion.mjs +4 -4
- package/dist/client/components/ui/alert.mjs +3 -3
- package/dist/client/components/ui/badge.mjs +4 -4
- package/dist/client/components/ui/button.mjs +47 -37
- package/dist/client/components/ui/card.mjs +2 -2
- package/dist/client/components/ui/checkbox.mjs +1 -1
- package/dist/client/components/ui/command.mjs +5 -5
- package/dist/client/components/ui/dialog.mjs +3 -3
- package/dist/client/components/ui/drawer.mjs +1 -1
- package/dist/client/components/ui/dropdown-menu.mjs +157 -15
- package/dist/client/components/ui/empty-state.mjs +88 -59
- package/dist/client/components/ui/field.mjs +2 -2
- package/dist/client/components/ui/input-group.mjs +3 -3
- package/dist/client/components/ui/input.mjs +1 -1
- package/dist/client/components/ui/kbd.mjs +1 -1
- package/dist/client/components/ui/label.mjs +1 -1
- package/dist/client/components/ui/popover.mjs +19 -11
- package/dist/client/components/ui/scroll-fade.mjs +170 -0
- package/dist/client/components/ui/search-input.mjs +1 -1
- package/dist/client/components/ui/select.mjs +129 -27
- package/dist/client/components/ui/sheet.mjs +54 -34
- package/dist/client/components/ui/sidebar.mjs +15 -14
- package/dist/client/components/ui/skeleton.mjs +28 -12
- package/dist/client/components/ui/switch.mjs +2 -2
- package/dist/client/components/ui/table.mjs +82 -74
- package/dist/client/components/ui/tabs.mjs +26 -31
- package/dist/client/components/ui/textarea.mjs +1 -1
- package/dist/client/components/ui/tooltip.mjs +1 -1
- package/dist/client/components/widgets/chart-widget.mjs +154 -100
- package/dist/client/components/widgets/progress-widget.mjs +63 -36
- package/dist/client/components/widgets/quick-actions-widget.mjs +207 -115
- package/dist/client/components/widgets/recent-items-widget.mjs +147 -103
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +161 -247
- package/dist/client/components/widgets/timeline-widget.mjs +119 -78
- package/dist/client/components/widgets/value-widget.mjs +286 -157
- package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/use-action.mjs +63 -55
- package/dist/client/hooks/use-audit-history.mjs +1 -65
- package/dist/client/hooks/use-collection-validation.mjs +36 -23
- package/dist/client/hooks/use-collection.mjs +96 -1
- package/dist/client/hooks/use-saved-views.mjs +70 -49
- package/dist/client/hooks/use-server-actions.mjs +70 -46
- package/dist/client/hooks/use-server-validation.mjs +156 -41
- package/dist/client/hooks/use-server-widget-data.mjs +1 -1
- package/dist/client/hooks/use-setup-status.d.mts +3 -3
- package/dist/client/hooks/use-setup-status.mjs +2 -2
- package/dist/client/hooks/use-transition-stage.mjs +2 -10
- package/dist/client/hooks/use-validation-error-map.mjs +31 -13
- package/dist/client/hooks/use-view-state.mjs +238 -174
- package/dist/client/i18n/date-locale.mjs +33 -0
- package/dist/client/i18n/hooks.mjs +17 -1
- package/dist/client/lib/utils.mjs +3 -2
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-banner.mjs +75 -46
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/preview/preview-field.mjs +2 -2
- package/dist/client/runtime/provider.mjs +8 -1
- package/dist/client/runtime/translations-provider.mjs +1 -1
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +1022 -0
- package/dist/client/styles/index.css +3 -589
- package/dist/client/utils/auto-expand-fields.mjs +4 -2
- package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
- package/dist/client/utils/use-lazy-component.mjs +80 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +17 -10
- package/dist/client/views/auth/auth-layout.mjs +291 -80
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +1 -1
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.mjs +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +11 -9
- package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
- package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
- package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
- package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
- package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
- package/dist/client/views/collection/columns/build-columns.mjs +29 -9
- package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
- package/dist/client/views/collection/field-renderer.mjs +50 -89
- package/dist/client/views/collection/form-view.mjs +237 -227
- package/dist/client/views/collection/table-view.mjs +1167 -234
- package/dist/client/views/collection/view-skeletons.mjs +222 -79
- package/dist/client/views/common/global-search.mjs +29 -18
- package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
- package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
- package/dist/client/views/dashboard/widget-card.mjs +23 -14
- package/dist/client/views/globals/global-form-view.mjs +634 -589
- package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
- package/dist/client/views/layout/admin-layout.d.mts +3 -6
- package/dist/client/views/layout/admin-layout.mjs +152 -155
- package/dist/client/views/layout/admin-router.mjs +936 -616
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +762 -592
- package/dist/client/views/layout/admin-theme.d.mts +10 -0
- package/dist/client/views/layout/admin-theme.mjs +84 -0
- package/dist/client/views/layout/admin-view-layout.mjs +161 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/accept-invite-page.mjs +49 -26
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.mjs +2 -19
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.mjs +2 -19
- package/dist/client/views/pages/login-page.d.mts +3 -3
- package/dist/client/views/pages/login-page.mjs +4 -21
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +3 -20
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +70 -71
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +2 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +2 -1
- package/dist/server/augmentation/dashboard.d.mts +67 -3
- package/dist/server/augmentation/form-layout.d.mts +21 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/codegen/admin-client-template.mjs +4 -0
- package/dist/server/fields/blocks.d.mts +1 -1
- package/dist/server/fields/blocks.mjs +12 -0
- package/dist/server/fields/rich-text.d.mts +1 -1
- package/dist/server/fields/rich-text.mjs +8 -0
- package/dist/server/i18n/index.mjs +29 -7
- package/dist/server/i18n/messages/cs.mjs +414 -1
- package/dist/server/i18n/messages/de.mjs +412 -1
- package/dist/server/i18n/messages/en.mjs +166 -1
- package/dist/server/i18n/messages/es.mjs +412 -1
- package/dist/server/i18n/messages/fr.mjs +412 -1
- package/dist/server/i18n/messages/pl.mjs +416 -1
- package/dist/server/i18n/messages/pt.mjs +409 -1
- package/dist/server/i18n/messages/sk.mjs +216 -2
- package/dist/server/modules/admin/block/introspection.mjs +4 -1
- package/dist/server/modules/admin/block/prefetch.mjs +12 -2
- package/dist/server/modules/admin/collections/account.d.mts +2 -2
- package/dist/server/modules/admin/collections/admin-locks.d.mts +2 -2
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +42 -42
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/assets.mjs +0 -1
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +40 -28
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
- package/dist/server/modules/admin/factories.mjs +7 -18
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +67 -28
- package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.mjs +25 -17
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
- package/dist/server/modules/admin/routes/setup.d.mts +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +16 -13
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/translations.mjs +5 -1
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +2 -2
- package/dist/server/modules/audit/.generated/module.d.mts +1 -1
- package/dist/server/modules/audit/.generated/module.mjs +1 -1
- package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
- package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
- package/dist/server/modules/audit/config/app.mjs +99 -42
- package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
- package/dist/server/plugin.mjs +4 -2
- package/dist/server/proxy-factories.d.mts +4 -3
- package/dist/server/proxy-factories.mjs +34 -8
- package/dist/shared/types/saved-views.types.d.mts +2 -0
- package/package.json +6 -4
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
- package/dist/client/components/ui/spinner.mjs +0 -52
- package/dist/client/components/ui/toolbar.mjs +0 -136
- package/dist/client/contexts/breadcrumb-context.mjs +0 -60
- package/dist/client/views/layout/admin-topbar.mjs +0 -236
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Skeleton } from "../ui/skeleton.mjs";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
|
|
@@ -13,42 +13,65 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
function AuthLoading(t0) {
|
|
16
|
-
const $ = c(
|
|
16
|
+
const $ = c(10);
|
|
17
17
|
const { className, message: t1, showMessage: t2 } = t0;
|
|
18
18
|
const message = t1 === void 0 ? "Loading..." : t1;
|
|
19
19
|
const showMessage = t2 === void 0 ? true : t2;
|
|
20
20
|
let t3;
|
|
21
21
|
if ($[0] !== className) {
|
|
22
|
-
t3 = cn("flex min-h-screen flex-col items-center justify-center gap-4", className);
|
|
22
|
+
t3 = cn("flex min-h-screen flex-col items-center justify-center gap-4 px-6", className);
|
|
23
23
|
$[0] = className;
|
|
24
24
|
$[1] = t3;
|
|
25
25
|
} else t3 = $[1];
|
|
26
26
|
let t4;
|
|
27
27
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28
|
-
t4 = /* @__PURE__ */ jsx(
|
|
28
|
+
t4 = /* @__PURE__ */ jsx(Skeleton, { className: "mx-auto size-12" });
|
|
29
29
|
$[2] = t4;
|
|
30
30
|
} else t4 = $[2];
|
|
31
31
|
let t5;
|
|
32
|
-
if ($[3]
|
|
33
|
-
t5 =
|
|
32
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
33
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "w-full max-w-sm space-y-4",
|
|
35
|
+
children: [
|
|
36
|
+
t4,
|
|
37
|
+
/* @__PURE__ */ jsxs("div", {
|
|
38
|
+
className: "space-y-2",
|
|
39
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
40
|
+
variant: "text",
|
|
41
|
+
className: "mx-auto h-4 w-40"
|
|
42
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
43
|
+
variant: "text",
|
|
44
|
+
className: "mx-auto h-3 w-56"
|
|
45
|
+
})]
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })
|
|
48
|
+
]
|
|
49
|
+
});
|
|
50
|
+
$[3] = t5;
|
|
51
|
+
} else t5 = $[3];
|
|
52
|
+
let t6;
|
|
53
|
+
if ($[4] !== message || $[5] !== showMessage) {
|
|
54
|
+
t6 = showMessage && /* @__PURE__ */ jsx("p", {
|
|
34
55
|
className: "text-muted-foreground text-sm",
|
|
56
|
+
role: "status",
|
|
35
57
|
children: message
|
|
36
58
|
});
|
|
37
|
-
$[
|
|
38
|
-
$[
|
|
39
|
-
$[
|
|
40
|
-
} else
|
|
41
|
-
let
|
|
42
|
-
if ($[
|
|
43
|
-
|
|
59
|
+
$[4] = message;
|
|
60
|
+
$[5] = showMessage;
|
|
61
|
+
$[6] = t6;
|
|
62
|
+
} else t6 = $[6];
|
|
63
|
+
let t7;
|
|
64
|
+
if ($[7] !== t3 || $[8] !== t6) {
|
|
65
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
44
66
|
className: t3,
|
|
45
|
-
|
|
67
|
+
"aria-busy": "true",
|
|
68
|
+
children: [t5, t6]
|
|
46
69
|
});
|
|
47
|
-
$[
|
|
48
|
-
$[7] = t5;
|
|
70
|
+
$[7] = t3;
|
|
49
71
|
$[8] = t6;
|
|
50
|
-
|
|
51
|
-
|
|
72
|
+
$[9] = t7;
|
|
73
|
+
} else t7 = $[9];
|
|
74
|
+
return t7;
|
|
52
75
|
}
|
|
53
76
|
|
|
54
77
|
//#endregion
|
|
@@ -138,7 +138,7 @@ function BlockEditorLayout(t0) {
|
|
|
138
138
|
}),
|
|
139
139
|
/* @__PURE__ */ jsx("p", {
|
|
140
140
|
className: "text-sm font-medium",
|
|
141
|
-
children: "
|
|
141
|
+
children: t("blocks.emptyTitle")
|
|
142
142
|
}),
|
|
143
143
|
/* @__PURE__ */ jsx("p", {
|
|
144
144
|
className: "text-muted-foreground mt-1 text-xs",
|
|
@@ -153,7 +153,7 @@ function BlockEditorLayout(t0) {
|
|
|
153
153
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
154
154
|
icon: "ph:plus",
|
|
155
155
|
className: "mr-2 h-4 w-4"
|
|
156
|
-
}), "
|
|
156
|
+
}), t("blocks.add")]
|
|
157
157
|
})]
|
|
158
158
|
});
|
|
159
159
|
$[19] = handleOpenSidebar;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import { useResolveText, useTranslation } from "../../i18n/hooks.mjs";
|
|
4
4
|
import { selectAdmin, useAdminStore } from "../../runtime/provider.mjs";
|
|
5
5
|
import { buildFieldDefinitionsFromMetadata } from "../../utils/build-field-definitions-from-schema.mjs";
|
|
6
|
+
import { useLazyComponent } from "../../utils/use-lazy-component.mjs";
|
|
6
7
|
import { FieldLayoutRenderer } from "../layout/field-layout-renderer.mjs";
|
|
8
|
+
import { Skeleton } from "../ui/skeleton.mjs";
|
|
7
9
|
import { c } from "react/compiler-runtime";
|
|
8
10
|
import "react";
|
|
9
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -65,7 +67,7 @@ function BlockFieldsRenderer(t0) {
|
|
|
65
67
|
if (blockSchema.form?.fields?.length) {
|
|
66
68
|
let t2$1;
|
|
67
69
|
if ($[8] !== blockFields || $[9] !== blockId) {
|
|
68
|
-
t2$1 = (fieldName
|
|
70
|
+
t2$1 = (fieldName) => {
|
|
69
71
|
const fieldDef = blockFields[fieldName];
|
|
70
72
|
if (!fieldDef) return null;
|
|
71
73
|
return /* @__PURE__ */ jsx(BlockField, {
|
|
@@ -133,8 +135,33 @@ function BlockFieldsRenderer(t0) {
|
|
|
133
135
|
} else t3 = $[23];
|
|
134
136
|
return t3;
|
|
135
137
|
}
|
|
138
|
+
function BlockFieldSkeleton(t0) {
|
|
139
|
+
const $ = c(3);
|
|
140
|
+
const { type } = t0;
|
|
141
|
+
const isLarge = type === "blocks" || type === "json" || type === "richText";
|
|
142
|
+
let t1;
|
|
143
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
144
|
+
t1 = /* @__PURE__ */ jsx(Skeleton, {
|
|
145
|
+
variant: "text",
|
|
146
|
+
className: "h-4 w-24"
|
|
147
|
+
});
|
|
148
|
+
$[0] = t1;
|
|
149
|
+
} else t1 = $[0];
|
|
150
|
+
const t2 = isLarge ? "h-40 w-full" : "h-10 w-full";
|
|
151
|
+
let t3;
|
|
152
|
+
if ($[1] !== t2) {
|
|
153
|
+
t3 = /* @__PURE__ */ jsxs("div", {
|
|
154
|
+
className: "space-y-2",
|
|
155
|
+
"aria-busy": "true",
|
|
156
|
+
children: [t1, /* @__PURE__ */ jsx(Skeleton, { className: t2 })]
|
|
157
|
+
});
|
|
158
|
+
$[1] = t2;
|
|
159
|
+
$[2] = t3;
|
|
160
|
+
} else t3 = $[2];
|
|
161
|
+
return t3;
|
|
162
|
+
}
|
|
136
163
|
function BlockField(t0) {
|
|
137
|
-
const $ = c(
|
|
164
|
+
const $ = c(31);
|
|
138
165
|
const { name, blockId, definition } = t0;
|
|
139
166
|
const resolveText = useResolveText();
|
|
140
167
|
let t1;
|
|
@@ -171,17 +198,26 @@ function BlockField(t0) {
|
|
|
171
198
|
} else t4 = $[11];
|
|
172
199
|
const placeholder = t4;
|
|
173
200
|
const scopedName = `content._values.${blockId}.${name}`;
|
|
174
|
-
const FieldComponent = definition.component;
|
|
175
|
-
if (
|
|
201
|
+
const { Component: FieldComponent, loading: componentLoading } = useLazyComponent(definition.component);
|
|
202
|
+
if (componentLoading) {
|
|
176
203
|
let t5$1;
|
|
177
204
|
if ($[12] !== fieldType) {
|
|
205
|
+
t5$1 = /* @__PURE__ */ jsx(BlockFieldSkeleton, { type: fieldType });
|
|
206
|
+
$[12] = fieldType;
|
|
207
|
+
$[13] = t5$1;
|
|
208
|
+
} else t5$1 = $[13];
|
|
209
|
+
return t5$1;
|
|
210
|
+
}
|
|
211
|
+
if (!FieldComponent) {
|
|
212
|
+
let t5$1;
|
|
213
|
+
if ($[14] !== fieldType) {
|
|
178
214
|
t5$1 = /* @__PURE__ */ jsxs("div", {
|
|
179
215
|
className: "text-destructive text-sm",
|
|
180
216
|
children: ["No component registered for field type: ", fieldType]
|
|
181
217
|
});
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
} else t5$1 = $[
|
|
218
|
+
$[14] = fieldType;
|
|
219
|
+
$[15] = t5$1;
|
|
220
|
+
} else t5$1 = $[15];
|
|
185
221
|
return t5$1;
|
|
186
222
|
}
|
|
187
223
|
const t5 = options.required ?? false;
|
|
@@ -189,13 +225,13 @@ function BlockField(t0) {
|
|
|
189
225
|
const t7 = options.readOnly ?? false;
|
|
190
226
|
const t8 = options.localized ?? false;
|
|
191
227
|
let t9;
|
|
192
|
-
if ($[
|
|
228
|
+
if ($[16] !== options) {
|
|
193
229
|
t9 = stripUiOptions(options);
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
} else t9 = $[
|
|
230
|
+
$[16] = options;
|
|
231
|
+
$[17] = t9;
|
|
232
|
+
} else t9 = $[17];
|
|
197
233
|
let t10;
|
|
198
|
-
if ($[
|
|
234
|
+
if ($[18] !== description || $[19] !== label || $[20] !== placeholder || $[21] !== scopedName || $[22] !== t5 || $[23] !== t6 || $[24] !== t7 || $[25] !== t8 || $[26] !== t9) {
|
|
199
235
|
t10 = {
|
|
200
236
|
name: scopedName,
|
|
201
237
|
label,
|
|
@@ -207,25 +243,25 @@ function BlockField(t0) {
|
|
|
207
243
|
localized: t8,
|
|
208
244
|
...t9
|
|
209
245
|
};
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
} else t10 = $[
|
|
246
|
+
$[18] = description;
|
|
247
|
+
$[19] = label;
|
|
248
|
+
$[20] = placeholder;
|
|
249
|
+
$[21] = scopedName;
|
|
250
|
+
$[22] = t5;
|
|
251
|
+
$[23] = t6;
|
|
252
|
+
$[24] = t7;
|
|
253
|
+
$[25] = t8;
|
|
254
|
+
$[26] = t9;
|
|
255
|
+
$[27] = t10;
|
|
256
|
+
} else t10 = $[27];
|
|
221
257
|
const componentProps = t10;
|
|
222
258
|
let t11;
|
|
223
|
-
if ($[
|
|
259
|
+
if ($[28] !== FieldComponent || $[29] !== componentProps) {
|
|
224
260
|
t11 = /* @__PURE__ */ jsx(FieldComponent, { ...componentProps });
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
} else t11 = $[
|
|
261
|
+
$[28] = FieldComponent;
|
|
262
|
+
$[29] = componentProps;
|
|
263
|
+
$[30] = t11;
|
|
264
|
+
} else t11 = $[30];
|
|
229
265
|
return t11;
|
|
230
266
|
}
|
|
231
267
|
/**
|
|
@@ -52,7 +52,7 @@ function BlockInsertButton(t0) {
|
|
|
52
52
|
} else t5$1 = $[6];
|
|
53
53
|
let t6$1;
|
|
54
54
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
55
|
-
t6$1 = /* @__PURE__ */ jsx("div", { className: "bg-
|
|
55
|
+
t6$1 = /* @__PURE__ */ jsx("div", { className: "bg-border-strong sm:group-hover:bg-foreground absolute inset-x-0 top-1/2 h-px -translate-y-1/2 transition-colors sm:bg-transparent" });
|
|
56
56
|
$[7] = t6$1;
|
|
57
57
|
} else t6$1 = $[7];
|
|
58
58
|
let t7$1;
|
|
@@ -75,7 +75,7 @@ function BlockInsertButton(t0) {
|
|
|
75
75
|
t9 = /* @__PURE__ */ jsx("div", {
|
|
76
76
|
className: "pointer-events-none absolute inset-x-0 top-1/2 flex -translate-y-1/2 items-center justify-center opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",
|
|
77
77
|
children: /* @__PURE__ */ jsxs("div", {
|
|
78
|
-
className: "bg-
|
|
78
|
+
className: "bg-foreground text-background pointer-events-auto flex cursor-pointer items-center gap-1 rounded-full px-2 py-0.5 text-xs shadow-sm",
|
|
79
79
|
children: [t7$1, /* @__PURE__ */ jsx("span", { children: t8 })]
|
|
80
80
|
})
|
|
81
81
|
});
|
|
@@ -103,14 +103,14 @@ function BlockInsertButton(t0) {
|
|
|
103
103
|
if (variant === "rail") {
|
|
104
104
|
let t4$1;
|
|
105
105
|
if ($[18] !== className) {
|
|
106
|
-
t4$1 = cn("group text-muted-foreground hover:text-foreground relative flex items-center gap-2 text-xs font-medium transition-colors", className);
|
|
106
|
+
t4$1 = cn("group text-muted-foreground hover:text-foreground relative flex min-h-10 items-center gap-2 text-xs font-medium transition-colors active:scale-[0.96]", className);
|
|
107
107
|
$[18] = className;
|
|
108
108
|
$[19] = t4$1;
|
|
109
109
|
} else t4$1 = $[19];
|
|
110
110
|
let t5$1;
|
|
111
111
|
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
112
112
|
t5$1 = /* @__PURE__ */ jsx("div", {
|
|
113
|
-
className: "border-border bg-background text-muted-foreground group-hover:border-foreground group-hover:text-foreground relative z-10 flex h-5 w-5 items-center justify-center rounded-full border transition-
|
|
113
|
+
className: "border-border bg-background text-muted-foreground group-hover:border-foreground group-hover:text-foreground relative z-10 flex h-5 w-5 items-center justify-center rounded-full border transition-[background-color,border-color,color]",
|
|
114
114
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
115
115
|
icon: "ph:plus",
|
|
116
116
|
className: "h-3 w-3"
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { useTranslation } from "../../i18n/hooks.mjs";
|
|
4
4
|
import { cn } from "../../lib/utils.mjs";
|
|
5
|
-
import { Card, CardContent, CardHeader } from "../ui/card.mjs";
|
|
6
5
|
import { useBlockEditorActions, useBlockSchema, useBlockValues, useIsBlockExpanded } from "./block-editor-context.mjs";
|
|
7
6
|
import { BlockInsertButton } from "./block-insert-button.mjs";
|
|
7
|
+
import { Card, CardContent, CardHeader } from "../ui/card.mjs";
|
|
8
8
|
import { BlockFieldsRenderer } from "./block-fields-renderer.mjs";
|
|
9
9
|
import { BlockIcon } from "./block-type-icon.mjs";
|
|
10
10
|
import { BlockItemDropdownMenu } from "./block-item-menu.mjs";
|
|
@@ -138,7 +138,7 @@ const BlockItem = React.memo(function BlockItem$1(t0) {
|
|
|
138
138
|
} else t13 = $[28];
|
|
139
139
|
let t14;
|
|
140
140
|
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
141
|
-
t14 = cn("group flex cursor-pointer flex-row items-center gap-2 px-3 py-2 select-none", "hover:bg-muted transition-colors", "focus-visible:ring-
|
|
141
|
+
t14 = cn("group flex cursor-pointer flex-row items-center gap-2 px-3 py-2 select-none", "hover:bg-muted transition-colors", "focus-visible:ring-ring/25 focus-visible:ring-3 focus-visible:outline-none focus-visible:ring-inset");
|
|
142
142
|
$[29] = t14;
|
|
143
143
|
} else t14 = $[29];
|
|
144
144
|
let t15;
|
|
@@ -19,7 +19,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
19
19
|
* Uses shadcn Sheet component for mobile-friendly sidebar.
|
|
20
20
|
*/
|
|
21
21
|
function BlockLibrarySidebar(t0) {
|
|
22
|
-
const $ = c(
|
|
22
|
+
const $ = c(44);
|
|
23
23
|
const { open, onClose } = t0;
|
|
24
24
|
const { t } = useTranslation();
|
|
25
25
|
const actions = useBlockEditorActions();
|
|
@@ -113,54 +113,80 @@ function BlockLibrarySidebar(t0) {
|
|
|
113
113
|
$[12] = t4;
|
|
114
114
|
} else t4 = $[12];
|
|
115
115
|
let t5;
|
|
116
|
-
if ($[13]
|
|
117
|
-
t5 =
|
|
116
|
+
if ($[13] !== t) {
|
|
117
|
+
t5 = t("blocks.add");
|
|
118
|
+
$[13] = t;
|
|
119
|
+
$[14] = t5;
|
|
120
|
+
} else t5 = $[14];
|
|
121
|
+
let t6;
|
|
122
|
+
if ($[15] !== t5) {
|
|
123
|
+
t6 = /* @__PURE__ */ jsx(SheetTitle, { children: t5 });
|
|
124
|
+
$[15] = t5;
|
|
125
|
+
$[16] = t6;
|
|
126
|
+
} else t6 = $[16];
|
|
127
|
+
let t7;
|
|
128
|
+
if ($[17] !== t) {
|
|
129
|
+
t7 = t("blocks.libraryDescription");
|
|
130
|
+
$[17] = t;
|
|
131
|
+
$[18] = t7;
|
|
132
|
+
} else t7 = $[18];
|
|
133
|
+
let t8;
|
|
134
|
+
if ($[19] !== t7) {
|
|
135
|
+
t8 = /* @__PURE__ */ jsx(SheetDescription, { children: t7 });
|
|
136
|
+
$[19] = t7;
|
|
137
|
+
$[20] = t8;
|
|
138
|
+
} else t8 = $[20];
|
|
139
|
+
let t9;
|
|
140
|
+
if ($[21] !== t6 || $[22] !== t8) {
|
|
141
|
+
t9 = /* @__PURE__ */ jsxs(SheetHeader, {
|
|
118
142
|
className: "space-y-2",
|
|
119
|
-
children: [
|
|
143
|
+
children: [t6, t8]
|
|
120
144
|
});
|
|
121
|
-
$[
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
145
|
+
$[21] = t6;
|
|
146
|
+
$[22] = t8;
|
|
147
|
+
$[23] = t9;
|
|
148
|
+
} else t9 = $[23];
|
|
149
|
+
let t10;
|
|
150
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
151
|
+
t10 = /* @__PURE__ */ jsx(Icon, {
|
|
126
152
|
icon: "ph:magnifying-glass",
|
|
127
153
|
className: "text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"
|
|
128
154
|
});
|
|
129
|
-
$[
|
|
130
|
-
} else
|
|
131
|
-
let
|
|
132
|
-
if ($[
|
|
133
|
-
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
} else
|
|
137
|
-
let
|
|
138
|
-
if ($[
|
|
139
|
-
|
|
140
|
-
$[
|
|
141
|
-
} else
|
|
142
|
-
let
|
|
143
|
-
if ($[
|
|
144
|
-
|
|
155
|
+
$[24] = t10;
|
|
156
|
+
} else t10 = $[24];
|
|
157
|
+
let t11;
|
|
158
|
+
if ($[25] !== t) {
|
|
159
|
+
t11 = t("blocks.searchPlaceholder");
|
|
160
|
+
$[25] = t;
|
|
161
|
+
$[26] = t11;
|
|
162
|
+
} else t11 = $[26];
|
|
163
|
+
let t12;
|
|
164
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
165
|
+
t12 = (e) => setSearch(e.target.value);
|
|
166
|
+
$[27] = t12;
|
|
167
|
+
} else t12 = $[27];
|
|
168
|
+
let t13;
|
|
169
|
+
if ($[28] !== search || $[29] !== t11) {
|
|
170
|
+
t13 = /* @__PURE__ */ jsx("div", {
|
|
145
171
|
className: "px-6 py-4",
|
|
146
172
|
children: /* @__PURE__ */ jsxs("div", {
|
|
147
173
|
className: "relative",
|
|
148
|
-
children: [
|
|
174
|
+
children: [t10, /* @__PURE__ */ jsx(Input, {
|
|
149
175
|
ref: searchInputRef,
|
|
150
|
-
placeholder:
|
|
176
|
+
placeholder: t11,
|
|
151
177
|
value: search,
|
|
152
|
-
onChange:
|
|
178
|
+
onChange: t12,
|
|
153
179
|
className: "pl-9"
|
|
154
180
|
})]
|
|
155
181
|
})
|
|
156
182
|
});
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
} else
|
|
161
|
-
let
|
|
162
|
-
if ($[
|
|
163
|
-
|
|
183
|
+
$[28] = search;
|
|
184
|
+
$[29] = t11;
|
|
185
|
+
$[30] = t13;
|
|
186
|
+
} else t13 = $[30];
|
|
187
|
+
let t14;
|
|
188
|
+
if ($[31] !== categories || $[32] !== handleSelectBlock || $[33] !== search || $[34] !== t) {
|
|
189
|
+
t14 = /* @__PURE__ */ jsx("div", {
|
|
164
190
|
className: "flex-1 overflow-y-auto px-6 pb-6",
|
|
165
191
|
children: categories.length === 0 ? /* @__PURE__ */ jsxs("div", {
|
|
166
192
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
@@ -171,11 +197,11 @@ function BlockLibrarySidebar(t0) {
|
|
|
171
197
|
}),
|
|
172
198
|
/* @__PURE__ */ jsx("p", {
|
|
173
199
|
className: "text-muted-foreground text-sm",
|
|
174
|
-
children: "
|
|
200
|
+
children: t("blocks.noSearchResults")
|
|
175
201
|
}),
|
|
176
202
|
search && /* @__PURE__ */ jsx("p", {
|
|
177
203
|
className: "text-muted-foreground mt-1 text-xs",
|
|
178
|
-
children: "
|
|
204
|
+
children: t("blocks.tryDifferentSearch")
|
|
179
205
|
})
|
|
180
206
|
]
|
|
181
207
|
}) : /* @__PURE__ */ jsx("div", {
|
|
@@ -186,14 +212,14 @@ function BlockLibrarySidebar(t0) {
|
|
|
186
212
|
icon: category_0.config.icon.props.name,
|
|
187
213
|
className: "text-muted-foreground h-4 w-4"
|
|
188
214
|
}), /* @__PURE__ */ jsx("h4", {
|
|
189
|
-
className: "text-muted-foreground text-xs font-semibold
|
|
215
|
+
className: "text-muted-foreground font-chrome chrome-meta text-xs font-semibold",
|
|
190
216
|
children: getCategoryDisplayLabel(category_0.config)
|
|
191
217
|
})]
|
|
192
218
|
}), /* @__PURE__ */ jsx("div", {
|
|
193
219
|
className: "grid grid-cols-2 gap-2",
|
|
194
220
|
children: category_0.blocks.map((block) => /* @__PURE__ */ jsxs("button", {
|
|
195
221
|
type: "button",
|
|
196
|
-
className: cn("flex flex-col items-start gap-2
|
|
222
|
+
className: cn("panel-surface flex flex-col items-start gap-2 p-3 text-left", "hover:border-border hover:bg-accent transition-colors", "focus-visible:ring-ring/25 focus:outline-none focus-visible:ring-3"),
|
|
197
223
|
onClick: () => handleSelectBlock(block.name),
|
|
198
224
|
children: [/* @__PURE__ */ jsx(BlockIcon, {
|
|
199
225
|
icon: block.admin?.icon,
|
|
@@ -213,39 +239,41 @@ function BlockLibrarySidebar(t0) {
|
|
|
213
239
|
})] }, category_0.key))
|
|
214
240
|
})
|
|
215
241
|
});
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
242
|
+
$[31] = categories;
|
|
243
|
+
$[32] = handleSelectBlock;
|
|
244
|
+
$[33] = search;
|
|
245
|
+
$[34] = t;
|
|
246
|
+
$[35] = t14;
|
|
247
|
+
} else t14 = $[35];
|
|
248
|
+
let t15;
|
|
249
|
+
if ($[36] !== t13 || $[37] !== t14 || $[38] !== t9) {
|
|
250
|
+
t15 = /* @__PURE__ */ jsxs(SheetContent, {
|
|
224
251
|
side: "left",
|
|
225
252
|
className: "qa-block-library flex w-full flex-col sm:max-w-md",
|
|
226
253
|
children: [
|
|
227
|
-
t5,
|
|
228
254
|
t9,
|
|
229
|
-
|
|
255
|
+
t13,
|
|
256
|
+
t14
|
|
230
257
|
]
|
|
231
258
|
});
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
259
|
+
$[36] = t13;
|
|
260
|
+
$[37] = t14;
|
|
261
|
+
$[38] = t9;
|
|
262
|
+
$[39] = t15;
|
|
263
|
+
} else t15 = $[39];
|
|
264
|
+
let t16;
|
|
265
|
+
if ($[40] !== open || $[41] !== t15 || $[42] !== t4) {
|
|
266
|
+
t16 = /* @__PURE__ */ jsx(Sheet, {
|
|
239
267
|
open,
|
|
240
268
|
onOpenChange: t4,
|
|
241
|
-
children:
|
|
269
|
+
children: t15
|
|
242
270
|
});
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
} else
|
|
248
|
-
return
|
|
271
|
+
$[40] = open;
|
|
272
|
+
$[41] = t15;
|
|
273
|
+
$[42] = t4;
|
|
274
|
+
$[43] = t16;
|
|
275
|
+
} else t16 = $[43];
|
|
276
|
+
return t16;
|
|
249
277
|
}
|
|
250
278
|
function _temp2(a_0, b_0) {
|
|
251
279
|
return (a_0.admin?.order ?? 999) - (b_0.admin?.order ?? 999);
|
|
@@ -61,7 +61,7 @@ function Badge(t0) {
|
|
|
61
61
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
62
62
|
t2 = {
|
|
63
63
|
default: "bg-muted text-muted-foreground",
|
|
64
|
-
primary: "bg-
|
|
64
|
+
primary: "bg-surface-high text-foreground",
|
|
65
65
|
secondary: "bg-secondary text-secondary-foreground",
|
|
66
66
|
destructive: "bg-destructive/10 text-destructive",
|
|
67
67
|
success: "bg-success/10 text-success",
|
|
@@ -322,7 +322,7 @@ function ArrayField(t0) {
|
|
|
322
322
|
children: "*"
|
|
323
323
|
}),
|
|
324
324
|
maxItems && /* @__PURE__ */ jsxs("span", {
|
|
325
|
-
className: "text-muted-foreground ml-2 text-xs",
|
|
325
|
+
className: "text-muted-foreground ml-2 text-xs tabular-nums",
|
|
326
326
|
children: [
|
|
327
327
|
"(",
|
|
328
328
|
fields.length,
|
|
@@ -347,7 +347,7 @@ function ArrayField(t0) {
|
|
|
347
347
|
let t12;
|
|
348
348
|
if ($[56] !== resolvedDescription) {
|
|
349
349
|
t12 = resolvedDescription && /* @__PURE__ */ jsx("p", {
|
|
350
|
-
className: "text-muted-foreground text-sm",
|
|
350
|
+
className: "text-muted-foreground text-sm text-pretty",
|
|
351
351
|
children: resolvedDescription
|
|
352
352
|
});
|
|
353
353
|
$[56] = resolvedDescription;
|
|
@@ -356,9 +356,9 @@ function ArrayField(t0) {
|
|
|
356
356
|
let t13;
|
|
357
357
|
if ($[58] !== canRemove || $[59] !== disabled || $[60] !== emptyLabel || $[61] !== fields || $[62] !== handleMove || $[63] !== handleRemove || $[64] !== itemType || $[65] !== name || $[66] !== options || $[67] !== orderable || $[68] !== readOnly || $[69] !== resolvedPlaceholder || $[70] !== t || $[71] !== values) {
|
|
358
358
|
t13 = fields.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
359
|
-
className: "
|
|
359
|
+
className: "py-2",
|
|
360
360
|
children: /* @__PURE__ */ jsx("p", {
|
|
361
|
-
className: "text-muted-foreground text-sm",
|
|
361
|
+
className: "text-muted-foreground text-sm text-pretty",
|
|
362
362
|
children: resolvedPlaceholder || emptyLabel
|
|
363
363
|
})
|
|
364
364
|
}) : fields.map((field, index_0) => {
|
|
@@ -385,43 +385,43 @@ function ArrayField(t0) {
|
|
|
385
385
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
386
386
|
type: "button",
|
|
387
387
|
variant: "ghost",
|
|
388
|
-
size: "icon",
|
|
389
|
-
className: "
|
|
388
|
+
size: "icon-sm",
|
|
389
|
+
className: "relative after:absolute after:-inset-1",
|
|
390
390
|
onClick: () => handleMove(index_0, index_0 - 1),
|
|
391
391
|
disabled: !canMoveUp || disabled,
|
|
392
392
|
title: t("field.moveUp"),
|
|
393
393
|
"aria-label": t("field.moveUp"),
|
|
394
394
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
395
395
|
icon: "ph:caret-up",
|
|
396
|
-
className: "
|
|
396
|
+
className: "size-3.5"
|
|
397
397
|
})
|
|
398
398
|
}), /* @__PURE__ */ jsx(Button, {
|
|
399
399
|
type: "button",
|
|
400
400
|
variant: "ghost",
|
|
401
|
-
size: "icon",
|
|
402
|
-
className: "
|
|
401
|
+
size: "icon-sm",
|
|
402
|
+
className: "relative after:absolute after:-inset-1",
|
|
403
403
|
onClick: () => handleMove(index_0, index_0 + 1),
|
|
404
404
|
disabled: !canMoveDown || disabled,
|
|
405
405
|
title: t("field.moveDown"),
|
|
406
406
|
"aria-label": t("field.moveDown"),
|
|
407
407
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
408
408
|
icon: "ph:caret-down",
|
|
409
|
-
className: "
|
|
409
|
+
className: "size-3.5"
|
|
410
410
|
})
|
|
411
411
|
})]
|
|
412
412
|
}),
|
|
413
413
|
!readOnly && canRemove && /* @__PURE__ */ jsx(Button, {
|
|
414
414
|
type: "button",
|
|
415
415
|
variant: "ghost",
|
|
416
|
-
size: "icon",
|
|
417
|
-
className: "
|
|
416
|
+
size: "icon-sm",
|
|
417
|
+
className: "relative after:absolute after:-inset-1",
|
|
418
418
|
onClick: () => handleRemove(index_0),
|
|
419
419
|
disabled,
|
|
420
420
|
title: t("common.remove"),
|
|
421
421
|
"aria-label": t("field.removeItem"),
|
|
422
422
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
423
423
|
icon: "ph:trash",
|
|
424
|
-
className: "
|
|
424
|
+
className: "size-3.5"
|
|
425
425
|
})
|
|
426
426
|
})
|
|
427
427
|
]
|
|
@@ -474,7 +474,7 @@ function ArrayField(t0) {
|
|
|
474
474
|
let t16;
|
|
475
475
|
if ($[81] !== error) {
|
|
476
476
|
t16 = error && /* @__PURE__ */ jsx("p", {
|
|
477
|
-
className: "text-destructive text-sm",
|
|
477
|
+
className: "text-destructive text-sm text-pretty",
|
|
478
478
|
children: error
|
|
479
479
|
});
|
|
480
480
|
$[81] = error;
|
|
@@ -83,7 +83,7 @@ function AssetPreviewField(t0) {
|
|
|
83
83
|
if (!asset) {
|
|
84
84
|
let t16$1;
|
|
85
85
|
if ($[17] !== className) {
|
|
86
|
-
t16$1 = cn("qa-asset-preview-field flex items-center justify-center
|
|
86
|
+
t16$1 = cn("qa-asset-preview-field flex items-center justify-center py-4", "text-muted-foreground", className);
|
|
87
87
|
$[17] = className;
|
|
88
88
|
$[18] = t16$1;
|
|
89
89
|
} else t16$1 = $[18];
|