@questpie/admin 3.0.3 → 3.0.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 (249) hide show
  1. package/README.md +34 -5
  2. package/dist/client/blocks/block-renderer.d.mts +2 -2
  3. package/dist/client/blocks/block-renderer.mjs +4 -1
  4. package/dist/client/builder/types/action-types.d.mts +31 -3
  5. package/dist/client/builder/types/collection-types.d.mts +140 -0
  6. package/dist/client/builder/types/ui-config.d.mts +16 -2
  7. package/dist/client/builder/types/views.d.mts +57 -0
  8. package/dist/client/builder/types/widget-types.d.mts +5 -0
  9. package/dist/client/components/actions/action-button.mjs +137 -199
  10. package/dist/client/components/actions/action-dialog.mjs +198 -156
  11. package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
  12. package/dist/client/components/actions/header-actions.mjs +52 -53
  13. package/dist/client/components/admin-link.d.mts +2 -2
  14. package/dist/client/components/auth/auth-loading.mjs +41 -18
  15. package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
  16. package/dist/client/components/blocks/block-insert-button.mjs +4 -4
  17. package/dist/client/components/blocks/block-item.mjs +2 -2
  18. package/dist/client/components/blocks/block-library-sidebar.mjs +2 -2
  19. package/dist/client/components/component-renderer.mjs +1 -1
  20. package/dist/client/components/fields/array-field.mjs +14 -14
  21. package/dist/client/components/fields/asset-preview-field.mjs +1 -1
  22. package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
  23. package/dist/client/components/fields/json-field.mjs +2 -2
  24. package/dist/client/components/fields/object-array-field.mjs +22 -22
  25. package/dist/client/components/fields/object-field.mjs +5 -5
  26. package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
  27. package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
  28. package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
  29. package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
  30. package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
  31. package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
  32. package/dist/client/components/fields/relation-picker.mjs +7 -6
  33. package/dist/client/components/fields/relation-select.mjs +71 -47
  34. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
  35. package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
  36. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
  37. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
  38. package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
  39. package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
  40. package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
  41. package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
  42. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
  43. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
  44. package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
  45. package/dist/client/components/fields/upload-field.mjs +45 -49
  46. package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
  47. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
  48. package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
  49. package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
  50. package/dist/client/components/history-sidebar.mjs +850 -340
  51. package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
  52. package/dist/client/components/locale-switcher.mjs +8 -8
  53. package/dist/client/components/media/media-grid.mjs +12 -9
  54. package/dist/client/components/media/media-picker-dialog.mjs +242 -230
  55. package/dist/client/components/preview/live-preview-mode.mjs +1 -1
  56. package/dist/client/components/primitives/asset-preview.mjs +37 -22
  57. package/dist/client/components/primitives/date-input.mjs +212 -249
  58. package/dist/client/components/primitives/dropzone.mjs +192 -159
  59. package/dist/client/components/primitives/field-select-control.mjs +93 -0
  60. package/dist/client/components/primitives/select-multi.mjs +251 -230
  61. package/dist/client/components/primitives/select-single.mjs +345 -290
  62. package/dist/client/components/primitives/time-input.mjs +2 -2
  63. package/dist/client/components/sheets/resource-sheet.mjs +2 -0
  64. package/dist/client/components/ui/accordion.mjs +4 -4
  65. package/dist/client/components/ui/alert.mjs +3 -3
  66. package/dist/client/components/ui/badge.mjs +4 -4
  67. package/dist/client/components/ui/button.mjs +47 -37
  68. package/dist/client/components/ui/card.mjs +2 -2
  69. package/dist/client/components/ui/checkbox.mjs +1 -1
  70. package/dist/client/components/ui/command.mjs +5 -5
  71. package/dist/client/components/ui/dialog.mjs +3 -3
  72. package/dist/client/components/ui/drawer.mjs +1 -1
  73. package/dist/client/components/ui/dropdown-menu.mjs +157 -15
  74. package/dist/client/components/ui/empty-state.mjs +88 -59
  75. package/dist/client/components/ui/field.mjs +2 -2
  76. package/dist/client/components/ui/input-group.mjs +3 -3
  77. package/dist/client/components/ui/input.mjs +1 -1
  78. package/dist/client/components/ui/kbd.mjs +1 -1
  79. package/dist/client/components/ui/label.mjs +1 -1
  80. package/dist/client/components/ui/popover.mjs +19 -11
  81. package/dist/client/components/ui/scroll-fade.mjs +170 -0
  82. package/dist/client/components/ui/search-input.mjs +1 -1
  83. package/dist/client/components/ui/select.mjs +129 -27
  84. package/dist/client/components/ui/sheet.mjs +54 -34
  85. package/dist/client/components/ui/sidebar.mjs +15 -14
  86. package/dist/client/components/ui/skeleton.mjs +28 -12
  87. package/dist/client/components/ui/switch.mjs +2 -2
  88. package/dist/client/components/ui/table.mjs +82 -74
  89. package/dist/client/components/ui/tabs.mjs +26 -31
  90. package/dist/client/components/ui/textarea.mjs +1 -1
  91. package/dist/client/components/ui/tooltip.mjs +1 -1
  92. package/dist/client/components/widgets/chart-widget.mjs +134 -96
  93. package/dist/client/components/widgets/progress-widget.mjs +59 -34
  94. package/dist/client/components/widgets/quick-actions-widget.mjs +184 -113
  95. package/dist/client/components/widgets/recent-items-widget.mjs +144 -102
  96. package/dist/client/components/widgets/stats-widget.mjs +91 -72
  97. package/dist/client/components/widgets/table-widget.mjs +159 -246
  98. package/dist/client/components/widgets/timeline-widget.mjs +66 -43
  99. package/dist/client/components/widgets/value-widget.mjs +261 -152
  100. package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
  101. package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
  102. package/dist/client/contexts/focus-context.d.mts +2 -2
  103. package/dist/client/hooks/use-action.mjs +63 -55
  104. package/dist/client/hooks/use-audit-history.mjs +1 -65
  105. package/dist/client/hooks/use-collection-validation.mjs +36 -23
  106. package/dist/client/hooks/use-collection.mjs +96 -1
  107. package/dist/client/hooks/use-saved-views.mjs +70 -49
  108. package/dist/client/hooks/use-server-actions.mjs +59 -40
  109. package/dist/client/hooks/use-server-validation.mjs +156 -41
  110. package/dist/client/hooks/use-server-widget-data.mjs +1 -1
  111. package/dist/client/hooks/use-setup-status.d.mts +3 -3
  112. package/dist/client/hooks/use-setup-status.mjs +2 -2
  113. package/dist/client/hooks/use-transition-stage.mjs +2 -10
  114. package/dist/client/hooks/use-validation-error-map.mjs +31 -13
  115. package/dist/client/hooks/use-view-state.mjs +238 -174
  116. package/dist/client/i18n/date-locale.mjs +33 -0
  117. package/dist/client/i18n/hooks.mjs +17 -1
  118. package/dist/client/lib/utils.mjs +3 -2
  119. package/dist/client/preview/block-scope-context.d.mts +2 -2
  120. package/dist/client/preview/preview-banner.d.mts +2 -2
  121. package/dist/client/preview/preview-field.d.mts +4 -4
  122. package/dist/client/preview/preview-field.mjs +2 -2
  123. package/dist/client/runtime/provider.mjs +8 -1
  124. package/dist/client/runtime/translations-provider.mjs +1 -1
  125. package/dist/client/scope/picker.d.mts +2 -2
  126. package/dist/client/scope/provider.d.mts +2 -2
  127. package/dist/client/styles/base.css +1022 -0
  128. package/dist/client/styles/index.css +3 -589
  129. package/dist/client/utils/auto-expand-fields.mjs +4 -2
  130. package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
  131. package/dist/client/utils/use-lazy-component.mjs +80 -0
  132. package/dist/client/views/auth/auth-layout.d.mts +18 -11
  133. package/dist/client/views/auth/auth-layout.mjs +291 -80
  134. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  135. package/dist/client/views/auth/forgot-password-form.mjs +2 -2
  136. package/dist/client/views/auth/login-form.d.mts +2 -2
  137. package/dist/client/views/auth/login-form.mjs +1 -1
  138. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  139. package/dist/client/views/auth/reset-password-form.mjs +2 -2
  140. package/dist/client/views/auth/setup-form.d.mts +2 -2
  141. package/dist/client/views/collection/auto-form-fields.mjs +11 -9
  142. package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
  143. package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
  144. package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
  145. package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
  146. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
  147. package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
  148. package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
  149. package/dist/client/views/collection/columns/build-columns.mjs +29 -9
  150. package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
  151. package/dist/client/views/collection/field-renderer.mjs +50 -89
  152. package/dist/client/views/collection/form-view.mjs +237 -227
  153. package/dist/client/views/collection/table-view.mjs +1162 -229
  154. package/dist/client/views/collection/view-skeletons.mjs +222 -79
  155. package/dist/client/views/common/global-search.mjs +29 -18
  156. package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
  157. package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
  158. package/dist/client/views/dashboard/widget-card.mjs +23 -14
  159. package/dist/client/views/globals/global-form-view.mjs +634 -589
  160. package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
  161. package/dist/client/views/layout/admin-layout.d.mts +3 -6
  162. package/dist/client/views/layout/admin-layout.mjs +149 -172
  163. package/dist/client/views/layout/admin-router.mjs +747 -544
  164. package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
  165. package/dist/client/views/layout/admin-sidebar.mjs +751 -591
  166. package/dist/client/views/layout/admin-theme.d.mts +10 -0
  167. package/dist/client/views/layout/admin-theme.mjs +84 -0
  168. package/dist/client/views/layout/admin-view-layout.mjs +161 -0
  169. package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
  170. package/dist/client/views/pages/accept-invite-page.mjs +49 -26
  171. package/dist/client/views/pages/dashboard-page.d.mts +2 -2
  172. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  173. package/dist/client/views/pages/forgot-password-page.mjs +2 -19
  174. package/dist/client/views/pages/invite-page.d.mts +2 -2
  175. package/dist/client/views/pages/invite-page.mjs +2 -19
  176. package/dist/client/views/pages/login-page.d.mts +1 -1
  177. package/dist/client/views/pages/login-page.mjs +4 -21
  178. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  179. package/dist/client/views/pages/reset-password-page.mjs +3 -20
  180. package/dist/client/views/pages/setup-page.d.mts +2 -2
  181. package/dist/client/views/pages/setup-page.mjs +3 -20
  182. package/dist/client.d.mts +6 -2
  183. package/dist/client.mjs +2 -1
  184. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  185. package/dist/index.d.mts +6 -2
  186. package/dist/index.mjs +2 -1
  187. package/dist/server/augmentation/dashboard.d.mts +67 -3
  188. package/dist/server/augmentation/form-layout.d.mts +21 -0
  189. package/dist/server/augmentation/index.d.mts +1 -1
  190. package/dist/server/codegen/admin-client-template.mjs +4 -0
  191. package/dist/server/fields/blocks.d.mts +1 -1
  192. package/dist/server/fields/blocks.mjs +12 -0
  193. package/dist/server/fields/rich-text.d.mts +1 -1
  194. package/dist/server/fields/rich-text.mjs +8 -0
  195. package/dist/server/i18n/index.mjs +17 -1
  196. package/dist/server/i18n/messages/cs.mjs +23 -0
  197. package/dist/server/i18n/messages/de.mjs +23 -0
  198. package/dist/server/i18n/messages/en.mjs +64 -1
  199. package/dist/server/i18n/messages/es.mjs +23 -0
  200. package/dist/server/i18n/messages/fr.mjs +23 -0
  201. package/dist/server/i18n/messages/pl.mjs +23 -0
  202. package/dist/server/i18n/messages/pt.mjs +23 -0
  203. package/dist/server/i18n/messages/sk.mjs +83 -1
  204. package/dist/server/modules/admin/block/introspection.mjs +4 -1
  205. package/dist/server/modules/admin/block/prefetch.mjs +12 -2
  206. package/dist/server/modules/admin/collections/account.d.mts +50 -50
  207. package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
  208. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  209. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  210. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  211. package/dist/server/modules/admin/collections/assets.d.mts +20 -20
  212. package/dist/server/modules/admin/collections/assets.mjs +0 -1
  213. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  214. package/dist/server/modules/admin/collections/user.d.mts +12 -0
  215. package/dist/server/modules/admin/collections/user.mjs +40 -9
  216. package/dist/server/modules/admin/collections/verification.d.mts +2 -2
  217. package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
  218. package/dist/server/modules/admin/factories.mjs +7 -18
  219. package/dist/server/modules/admin/index.d.mts +1 -1
  220. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  221. package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
  222. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  223. package/dist/server/modules/admin/routes/execute-action.mjs +33 -0
  224. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  225. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  226. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  227. package/dist/server/modules/admin/routes/setup.d.mts +10 -10
  228. package/dist/server/modules/admin/routes/setup.mjs +7 -7
  229. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  230. package/dist/server/modules/admin/routes/translations.mjs +5 -1
  231. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  232. package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
  233. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
  234. package/dist/server/modules/audit/.generated/module.d.mts +1 -1
  235. package/dist/server/modules/audit/.generated/module.mjs +1 -1
  236. package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
  237. package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
  238. package/dist/server/modules/audit/config/app.mjs +99 -42
  239. package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
  240. package/dist/server/plugin.mjs +4 -2
  241. package/dist/server/proxy-factories.d.mts +4 -3
  242. package/dist/server/proxy-factories.mjs +34 -8
  243. package/dist/shared/types/saved-views.types.d.mts +2 -0
  244. package/package.json +6 -4
  245. package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
  246. package/dist/client/components/ui/spinner.mjs +0 -52
  247. package/dist/client/components/ui/toolbar.mjs +0 -136
  248. package/dist/client/contexts/breadcrumb-context.mjs +0 -60
  249. package/dist/client/views/layout/admin-topbar.mjs +0 -236
@@ -4,7 +4,6 @@ import { useTranslation } from "../../../i18n/hooks.mjs";
4
4
  import { EMPTY_BLOCK_CONTENT, isBlockContent } from "../../../blocks/types.mjs";
5
5
  import { useAdminConfig } from "../../../hooks/use-admin-config.mjs";
6
6
  import { FieldWrapper } from "../field-wrapper.mjs";
7
- import { Card, CardContent, CardHeader, CardTitle } from "../../ui/card.mjs";
8
7
  import { countBlocks } from "../../blocks/utils/tree-utils.mjs";
9
8
  import { BlockEditorLayout } from "../../blocks/block-editor-layout.mjs";
10
9
  import { BlockEditorProvider } from "../../blocks/block-editor-provider.mjs";
@@ -20,13 +19,14 @@ import { useFormContext, useWatch } from "react-hook-form";
20
19
  * Form field for editing block content using the visual block editor.
21
20
  * Block definitions are fetched from server introspection API.
22
21
  */
22
+ const EMPTY_BLOCKS = {};
23
23
  /**
24
24
  * Blocks field component.
25
25
  *
26
26
  * Renders the visual block editor for editing block content.
27
27
  */
28
28
  function BlocksField(t0) {
29
- const $ = c(42);
29
+ const $ = c(39);
30
30
  const { name, value, onChange, label, description, error, required, disabled, allowedBlocks, minBlocks, maxBlocks } = t0;
31
31
  const { t } = useTranslation();
32
32
  const form = useFormContext();
@@ -50,105 +50,85 @@ function BlocksField(t0) {
50
50
  $[5] = t2;
51
51
  } else t2 = $[5];
52
52
  const content = t2;
53
+ const blocks = adminConfig?.blocks ?? EMPTY_BLOCKS;
53
54
  let t3;
54
- if ($[6] !== adminConfig?.blocks) {
55
- t3 = adminConfig?.blocks ?? {};
56
- $[6] = adminConfig?.blocks;
57
- $[7] = t3;
58
- } else t3 = $[7];
59
- const blocks = t3;
60
- let t4;
61
55
  bb0: {
62
56
  if (!allowedBlocks || allowedBlocks.length === 0) {
63
- t4 = blocks;
57
+ t3 = blocks;
64
58
  break bb0;
65
59
  }
60
+ let t4$1;
61
+ if ($[6] !== allowedBlocks) {
62
+ t4$1 = new Set(allowedBlocks);
63
+ $[6] = allowedBlocks;
64
+ $[7] = t4$1;
65
+ } else t4$1 = $[7];
66
+ const allowed = t4$1;
66
67
  let t5$1;
67
- if ($[8] !== allowedBlocks) {
68
- t5$1 = new Set(allowedBlocks);
69
- $[8] = allowedBlocks;
70
- $[9] = t5$1;
71
- } else t5$1 = $[9];
72
- const allowed = t5$1;
73
- let t6$1;
74
- if ($[10] !== allowed || $[11] !== blocks) {
75
- t6$1 = Object.fromEntries(Object.entries(blocks).filter((t7$1) => {
76
- const [name_0] = t7$1;
68
+ if ($[8] !== allowed || $[9] !== blocks) {
69
+ t5$1 = Object.fromEntries(Object.entries(blocks).filter((t6$1) => {
70
+ const [name_0] = t6$1;
77
71
  return allowed.has(name_0);
78
72
  }));
79
- $[10] = allowed;
80
- $[11] = blocks;
81
- $[12] = t6$1;
82
- } else t6$1 = $[12];
83
- t4 = t6$1;
73
+ $[8] = allowed;
74
+ $[9] = blocks;
75
+ $[10] = t5$1;
76
+ } else t5$1 = $[10];
77
+ t3 = t5$1;
84
78
  }
85
- const filteredBlocks = t4;
86
- let t5;
87
- if ($[13] !== onChange) {
88
- t5 = (newContent) => {
79
+ const filteredBlocks = t3;
80
+ let t4;
81
+ if ($[11] !== onChange) {
82
+ t4 = (newContent) => {
89
83
  onChange?.(newContent);
90
84
  };
91
- $[13] = onChange;
85
+ $[11] = onChange;
86
+ $[12] = t4;
87
+ } else t4 = $[12];
88
+ const handleChange = t4;
89
+ let t5;
90
+ if ($[13] !== content._tree) {
91
+ t5 = countBlocks(content._tree);
92
+ $[13] = content._tree;
92
93
  $[14] = t5;
93
94
  } else t5 = $[14];
94
- const handleChange = t5;
95
+ const blockCount = t5;
95
96
  let t6;
96
- if ($[15] !== content._tree) {
97
- t6 = countBlocks(content._tree);
98
- $[15] = content._tree;
97
+ if ($[15] !== filteredBlocks) {
98
+ t6 = Object.keys(filteredBlocks);
99
+ $[15] = filteredBlocks;
99
100
  $[16] = t6;
100
101
  } else t6 = $[16];
101
- const blockCount = t6;
102
+ const hasBlocks = t6.length > 0;
102
103
  let t7;
103
- if ($[17] !== filteredBlocks) {
104
- t7 = Object.keys(filteredBlocks);
105
- $[17] = filteredBlocks;
106
- $[18] = t7;
107
- } else t7 = $[18];
108
- const hasBlocks = t7.length > 0;
109
- let t8;
110
- if ($[19] !== allowedBlocks || $[20] !== blockCount || $[21] !== content || $[22] !== filteredBlocks || $[23] !== handleChange || $[24] !== hasBlocks || $[25] !== t) {
111
- t8 = hasBlocks ? /* @__PURE__ */ jsx(BlockEditorProvider, {
104
+ if ($[17] !== allowedBlocks || $[18] !== content || $[19] !== filteredBlocks || $[20] !== handleChange || $[21] !== hasBlocks || $[22] !== t) {
105
+ t7 = hasBlocks ? /* @__PURE__ */ jsx(BlockEditorProvider, {
112
106
  value: content,
113
107
  onChange: handleChange,
114
108
  blocks: filteredBlocks,
115
109
  allowedBlocks,
116
110
  children: /* @__PURE__ */ jsx(BlockEditorLayout, {})
117
- }) : /* @__PURE__ */ jsxs(Card, {
118
- className: "border-dashed",
119
- children: [/* @__PURE__ */ jsx(CardHeader, {
120
- className: "pb-2",
121
- children: /* @__PURE__ */ jsx(CardTitle, {
122
- className: "flex items-center justify-between text-sm font-medium",
123
- children: /* @__PURE__ */ jsxs("span", { children: [
124
- "Blocks (",
125
- blockCount,
126
- ")"
127
- ] })
128
- })
129
- }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
130
- className: "text-muted-foreground py-8 text-center",
131
- children: [/* @__PURE__ */ jsx("p", {
132
- className: "text-sm",
133
- children: t("blocks.noDefinitions")
134
- }), /* @__PURE__ */ jsx("p", {
135
- className: "mt-1 text-xs",
136
- children: t("blocks.noDefinitionsHint")
137
- })]
138
- }) })]
111
+ }) : /* @__PURE__ */ jsxs("div", {
112
+ className: "text-muted-foreground py-4",
113
+ children: [/* @__PURE__ */ jsx("p", {
114
+ className: "text-sm",
115
+ children: t("blocks.noDefinitions")
116
+ }), /* @__PURE__ */ jsx("p", {
117
+ className: "mt-1 text-xs",
118
+ children: t("blocks.noDefinitionsHint")
119
+ })]
139
120
  });
140
- $[19] = allowedBlocks;
141
- $[20] = blockCount;
142
- $[21] = content;
143
- $[22] = filteredBlocks;
144
- $[23] = handleChange;
145
- $[24] = hasBlocks;
146
- $[25] = t;
147
- $[26] = t8;
148
- } else t8 = $[26];
149
- let t9;
150
- if ($[27] !== blockCount || $[28] !== maxBlocks || $[29] !== minBlocks) {
151
- t9 = (minBlocks || maxBlocks) && /* @__PURE__ */ jsxs("div", {
121
+ $[17] = allowedBlocks;
122
+ $[18] = content;
123
+ $[19] = filteredBlocks;
124
+ $[20] = handleChange;
125
+ $[21] = hasBlocks;
126
+ $[22] = t;
127
+ $[23] = t7;
128
+ } else t7 = $[23];
129
+ let t8;
130
+ if ($[24] !== blockCount || $[25] !== maxBlocks || $[26] !== minBlocks) {
131
+ t8 = (minBlocks || maxBlocks) && /* @__PURE__ */ jsxs("div", {
152
132
  className: "text-muted-foreground mt-2 text-xs",
153
133
  children: [
154
134
  minBlocks && /* @__PURE__ */ jsxs("span", { children: [
@@ -167,42 +147,42 @@ function BlocksField(t0) {
167
147
  })
168
148
  ]
169
149
  });
170
- $[27] = blockCount;
171
- $[28] = maxBlocks;
172
- $[29] = minBlocks;
150
+ $[24] = blockCount;
151
+ $[25] = maxBlocks;
152
+ $[26] = minBlocks;
153
+ $[27] = t8;
154
+ } else t8 = $[27];
155
+ let t9;
156
+ if ($[28] !== t7 || $[29] !== t8) {
157
+ t9 = /* @__PURE__ */ jsxs("div", {
158
+ className: "qa-blocks-field",
159
+ children: [t7, t8]
160
+ });
161
+ $[28] = t7;
162
+ $[29] = t8;
173
163
  $[30] = t9;
174
164
  } else t9 = $[30];
175
165
  let t10;
176
- if ($[31] !== t8 || $[32] !== t9) {
177
- t10 = /* @__PURE__ */ jsxs("div", {
178
- className: "qa-blocks-field",
179
- children: [t8, t9]
180
- });
181
- $[31] = t8;
182
- $[32] = t9;
183
- $[33] = t10;
184
- } else t10 = $[33];
185
- let t11;
186
- if ($[34] !== description || $[35] !== disabled || $[36] !== error || $[37] !== label || $[38] !== name || $[39] !== required || $[40] !== t10) {
187
- t11 = /* @__PURE__ */ jsx(FieldWrapper, {
166
+ if ($[31] !== description || $[32] !== disabled || $[33] !== error || $[34] !== label || $[35] !== name || $[36] !== required || $[37] !== t9) {
167
+ t10 = /* @__PURE__ */ jsx(FieldWrapper, {
188
168
  name,
189
169
  label,
190
170
  description,
191
171
  error,
192
172
  required,
193
173
  disabled,
194
- children: t10
174
+ children: t9
195
175
  });
196
- $[34] = description;
197
- $[35] = disabled;
198
- $[36] = error;
199
- $[37] = label;
200
- $[38] = name;
201
- $[39] = required;
202
- $[40] = t10;
203
- $[41] = t11;
204
- } else t11 = $[41];
205
- return t11;
176
+ $[31] = description;
177
+ $[32] = disabled;
178
+ $[33] = error;
179
+ $[34] = label;
180
+ $[35] = name;
181
+ $[36] = required;
182
+ $[37] = t9;
183
+ $[38] = t10;
184
+ } else t10 = $[38];
185
+ return t10;
206
186
  }
207
187
 
208
188
  //#endregion
@@ -339,7 +339,7 @@ function JsonCodeEditor(t0) {
339
339
  let t15;
340
340
  if ($[26] !== parseError) {
341
341
  t15 = parseError && /* @__PURE__ */ jsxs("div", {
342
- className: "text-destructive absolute top-2 right-2 flex items-center gap-1 text-xs",
342
+ className: "text-destructive bg-background/80 absolute top-2 right-2 flex items-center gap-1 px-1 text-xs text-pretty backdrop-blur-sm",
343
343
  children: [/* @__PURE__ */ jsx(Icon, {
344
344
  icon: "ph:warning-circle-fill",
345
345
  className: "size-3"
@@ -448,7 +448,7 @@ function JsonFormEditor(t0) {
448
448
  let t3;
449
449
  if ($[10] !== formContent) {
450
450
  t3 = /* @__PURE__ */ jsx("div", {
451
- className: "border p-4",
451
+ className: "panel-surface p-4",
452
452
  children: formContent
453
453
  });
454
454
  $[10] = formContent;
@@ -55,7 +55,7 @@ function ItemFieldRenderer(t0) {
55
55
  let readOnly;
56
56
  let required;
57
57
  if ($[4] !== options) {
58
- const { label: t2$1, description: t3$1, placeholder: t4$1, required: t5$1, disabled: t6$1, readOnly: t7, hidden, localized: t8, locale: t9, ...t10 } = options;
58
+ const { label: t2$1, description: t3$1, placeholder: t4$1, required: t5$1, disabled: t6$1, readOnly: t7, hidden: _hidden, localized: t8, locale: t9, ...t10 } = options;
59
59
  label = t2$1;
60
60
  description = t3$1;
61
61
  placeholder = t4$1;
@@ -144,9 +144,9 @@ function ObjectArrayItemFields(t0) {
144
144
  let t1$1;
145
145
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
146
146
  t1$1 = /* @__PURE__ */ jsx("div", {
147
- className: "border border-dashed p-4 text-center",
147
+ className: "py-2",
148
148
  children: /* @__PURE__ */ jsx("p", {
149
- className: "text-muted-foreground text-sm",
149
+ className: "text-muted-foreground text-sm text-pretty",
150
150
  children: "No fields configured for items."
151
151
  })
152
152
  });
@@ -397,9 +397,9 @@ function ObjectArrayField(t0) {
397
397
  let t16;
398
398
  if ($[42] !== t15) {
399
399
  t16 = /* @__PURE__ */ jsx("div", {
400
- className: "border border-dashed p-4 text-center",
400
+ className: "py-2",
401
401
  children: /* @__PURE__ */ jsx("p", {
402
- className: "text-muted-foreground text-sm",
402
+ className: "text-muted-foreground text-sm text-pretty",
403
403
  children: t15
404
404
  })
405
405
  });
@@ -451,7 +451,7 @@ function ObjectArrayField(t0) {
451
451
  children: "*"
452
452
  }),
453
453
  maxItems && /* @__PURE__ */ jsxs("span", {
454
- className: "text-muted-foreground ml-2 text-xs",
454
+ className: "text-muted-foreground ml-2 text-xs tabular-nums",
455
455
  children: [
456
456
  "(",
457
457
  fields.length,
@@ -476,7 +476,7 @@ function ObjectArrayField(t0) {
476
476
  let t20;
477
477
  if ($[65] !== description || $[66] !== resolveText) {
478
478
  t20 = description && /* @__PURE__ */ jsx("p", {
479
- className: "text-muted-foreground text-sm",
479
+ className: "text-muted-foreground text-sm text-pretty",
480
480
  children: resolveText(description)
481
481
  });
482
482
  $[65] = description;
@@ -491,13 +491,13 @@ function ObjectArrayField(t0) {
491
491
  const canMoveUp = orderable && index_1 > 0;
492
492
  const canMoveDown = orderable && index_1 < fields.length - 1;
493
493
  return /* @__PURE__ */ jsxs("div", {
494
- className: "border-border bg-card border",
494
+ className: "panel-surface overflow-hidden",
495
495
  children: [/* @__PURE__ */ jsxs("div", {
496
- className: "flex items-center justify-between border-b px-3 py-2",
496
+ className: "border-border-subtle bg-surface-low flex items-center justify-between border-b px-3 py-2",
497
497
  children: [/* @__PURE__ */ jsxs("div", {
498
498
  className: "flex items-center gap-2",
499
499
  children: [/* @__PURE__ */ jsxs("span", {
500
- className: "text-muted-foreground text-xs",
500
+ className: "text-muted-foreground text-xs tabular-nums",
501
501
  children: ["#", index_1 + 1]
502
502
  }), /* @__PURE__ */ jsx("span", {
503
503
  className: "text-sm font-medium",
@@ -509,35 +509,35 @@ function ObjectArrayField(t0) {
509
509
  orderable && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
510
510
  type: "button",
511
511
  variant: "ghost",
512
- size: "icon",
513
- className: "h-6 w-6",
512
+ size: "icon-sm",
513
+ className: "relative after:absolute after:-inset-1",
514
514
  onClick: () => handleMove(index_1, index_1 - 1),
515
515
  disabled: !canMoveUp || disabled,
516
516
  title: t("field.moveUp"),
517
517
  "aria-label": t("field.moveUp"),
518
518
  children: /* @__PURE__ */ jsx(Icon, {
519
519
  icon: "ph:caret-up",
520
- className: "h-3 w-3"
520
+ className: "size-3.5"
521
521
  })
522
522
  }), /* @__PURE__ */ jsx(Button, {
523
523
  type: "button",
524
524
  variant: "ghost",
525
- size: "icon",
526
- className: "h-6 w-6",
525
+ size: "icon-sm",
526
+ className: "relative after:absolute after:-inset-1",
527
527
  onClick: () => handleMove(index_1, index_1 + 1),
528
528
  disabled: !canMoveDown || disabled,
529
529
  title: t("field.moveDown"),
530
530
  "aria-label": t("field.moveDown"),
531
531
  children: /* @__PURE__ */ jsx(Icon, {
532
532
  icon: "ph:caret-down",
533
- className: "h-3 w-3"
533
+ className: "size-3.5"
534
534
  })
535
535
  })] }),
536
536
  mode !== "inline" && /* @__PURE__ */ jsx(Button, {
537
537
  type: "button",
538
538
  variant: "ghost",
539
- size: "icon",
540
- className: "h-6 w-6",
539
+ size: "icon-sm",
540
+ className: "relative after:absolute after:-inset-1",
541
541
  onClick: () => {
542
542
  setActiveIndex(index_1);
543
543
  setIsOpen(true);
@@ -547,21 +547,21 @@ function ObjectArrayField(t0) {
547
547
  "aria-label": t("common.edit"),
548
548
  children: /* @__PURE__ */ jsx(Icon, {
549
549
  icon: "ph:pencil",
550
- className: "h-3 w-3"
550
+ className: "size-3.5"
551
551
  })
552
552
  }),
553
553
  canRemove && /* @__PURE__ */ jsx(Button, {
554
554
  type: "button",
555
555
  variant: "ghost",
556
- size: "icon",
557
- className: "h-6 w-6",
556
+ size: "icon-sm",
557
+ className: "relative after:absolute after:-inset-1",
558
558
  onClick: () => handleRemove(index_1),
559
559
  disabled,
560
560
  title: t("common.remove"),
561
561
  "aria-label": t("common.remove"),
562
562
  children: /* @__PURE__ */ jsx(Icon, {
563
563
  icon: "ph:trash",
564
- className: "h-3 w-3"
564
+ className: "size-3.5"
565
565
  })
566
566
  })
567
567
  ]
@@ -229,7 +229,7 @@ function ObjectField(t0) {
229
229
  if (wrapper === "collapsible") {
230
230
  let t11$1;
231
231
  if ($[18] !== className) {
232
- t11$1 = cn("qa-object-field border-border bg-card border", className);
232
+ t11$1 = cn("qa-object-field panel-surface", className);
233
233
  $[18] = className;
234
234
  $[19] = t11$1;
235
235
  } else t11$1 = $[19];
@@ -297,7 +297,7 @@ function ObjectField(t0) {
297
297
  t19 = /* @__PURE__ */ jsx("button", {
298
298
  type: "button",
299
299
  onClick: t12$1,
300
- className: "hover:bg-muted flex w-full items-center justify-between p-3 text-left",
300
+ className: "hover:bg-muted flex min-h-10 w-full items-center justify-between p-3 text-left transition-colors active:scale-[0.96]",
301
301
  disabled,
302
302
  children: t18
303
303
  });
@@ -398,7 +398,7 @@ function ObjectField(t0) {
398
398
  if (wrapper === "collapsible" || layout === "collapsible") {
399
399
  let t7$1;
400
400
  if ($[68] !== className) {
401
- t7$1 = cn("qa-object-field border-border bg-card border", className);
401
+ t7$1 = cn("qa-object-field panel-surface", className);
402
402
  $[68] = className;
403
403
  $[69] = t7$1;
404
404
  } else t7$1 = $[69];
@@ -466,7 +466,7 @@ function ObjectField(t0) {
466
466
  t15 = /* @__PURE__ */ jsx("button", {
467
467
  type: "button",
468
468
  onClick: t8$1,
469
- className: "hover:bg-muted flex w-full items-center justify-between p-3 text-left",
469
+ className: "hover:bg-muted flex min-h-10 w-full items-center justify-between p-3 text-left transition-colors active:scale-[0.96]",
470
470
  disabled,
471
471
  children: t14
472
472
  });
@@ -480,7 +480,7 @@ function ObjectField(t0) {
480
480
  t16 = !isCollapsed && /* @__PURE__ */ jsxs("div", {
481
481
  className: "border-t p-4",
482
482
  children: [description && /* @__PURE__ */ jsx("p", {
483
- className: "text-muted-foreground mb-4 text-sm",
483
+ className: "text-muted-foreground mb-4 text-sm text-pretty",
484
484
  children: resolveText(description)
485
485
  }), /* @__PURE__ */ jsx(NestedFieldsLayout, {
486
486
  fieldEntries,
@@ -1,4 +1,5 @@
1
1
  import { useResolveText, useTranslation } from "../../../../i18n/hooks.mjs";
2
+ import { cn } from "../../../../lib/utils.mjs";
2
3
  import { Button } from "../../../ui/button.mjs";
3
4
  import { Skeleton } from "../../../ui/skeleton.mjs";
4
5
  import { formatCellValue, formatColumnHeader, getImageUrl, getItemDisplayValue } from "./types.mjs";
@@ -35,10 +36,16 @@ function CardsSkeleton(t0) {
35
36
  let t6;
36
37
  if ($[2] !== hasImage || $[3] !== skeletonKeys) {
37
38
  t6 = skeletonKeys.map((key) => /* @__PURE__ */ jsxs("div", {
38
- className: "border-border bg-card overflow-hidden border",
39
+ className: "panel-surface overflow-hidden",
39
40
  children: [hasImage && /* @__PURE__ */ jsx(Skeleton, { className: "aspect-video w-full" }), /* @__PURE__ */ jsxs("div", {
40
41
  className: "space-y-2 p-3",
41
- children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-3/4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/2 rounded" })]
42
+ children: [/* @__PURE__ */ jsx(Skeleton, {
43
+ variant: "text",
44
+ className: "h-5 w-3/4"
45
+ }), /* @__PURE__ */ jsx(Skeleton, {
46
+ variant: "text",
47
+ className: "h-4 w-1/2"
48
+ })]
42
49
  })]
43
50
  }, key));
44
51
  $[2] = hasImage;
@@ -130,13 +137,13 @@ function CardsDisplay(t0) {
130
137
  const subtitle = getSubtitle(item_3);
131
138
  const meta = getMeta(item_3);
132
139
  const cardContent = /* @__PURE__ */ jsxs("div", {
133
- className: "border-border bg-card hover:bg-card h-full overflow-hidden border transition-colors",
140
+ className: cn("panel-surface h-full overflow-hidden", (editable || !!actions?.onEdit || linkToDetail) && "hover:border-border hover:bg-accent/30 hover:text-foreground"),
134
141
  children: [image && /* @__PURE__ */ jsx("div", {
135
142
  className: "bg-muted aspect-video",
136
143
  children: /* @__PURE__ */ jsx("img", {
137
144
  src: image,
138
145
  alt: getTitle(item_3),
139
- className: "h-full w-full object-cover"
146
+ className: "image-outline h-full w-full object-cover"
140
147
  })
141
148
  }), /* @__PURE__ */ jsxs("div", {
142
149
  className: "p-3",
@@ -156,8 +163,8 @@ function CardsDisplay(t0) {
156
163
  children: [actions?.onEdit && /* @__PURE__ */ jsx(Button, {
157
164
  type: "button",
158
165
  variant: "ghost",
159
- size: "icon",
160
- className: "h-7 w-7",
166
+ size: "icon-xs",
167
+ className: "relative after:absolute after:-inset-1",
161
168
  onClick: (e) => {
162
169
  e.preventDefault();
163
170
  e.stopPropagation();
@@ -171,8 +178,8 @@ function CardsDisplay(t0) {
171
178
  }), actions?.onRemove && /* @__PURE__ */ jsx(Button, {
172
179
  type: "button",
173
180
  variant: "ghost",
174
- size: "icon",
175
- className: "h-7 w-7",
181
+ size: "icon-xs",
182
+ className: "relative after:absolute after:-inset-1",
176
183
  onClick: (e_0) => {
177
184
  e_0.preventDefault();
178
185
  e_0.stopPropagation();
@@ -188,7 +195,7 @@ function CardsDisplay(t0) {
188
195
  }), meta.length > 0 && /* @__PURE__ */ jsx("div", {
189
196
  className: "text-muted-foreground mt-2 flex flex-wrap gap-x-3 gap-y-1 text-xs",
190
197
  children: meta.map((m_0) => /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsxs("span", {
191
- className: "font-medium",
198
+ className: "font-chrome chrome-meta mr-1 font-medium",
192
199
  children: [resolveText(m_0.label), ":"]
193
200
  }), m_0.value] }, String(m_0.label)))
194
201
  })]
@@ -37,7 +37,10 @@ function ChipsSkeleton(t0) {
37
37
  return t3;
38
38
  }
39
39
  function _temp2(key) {
40
- return /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-20 rounded-full" }, key);
40
+ return /* @__PURE__ */ jsx(Skeleton, {
41
+ variant: "chip",
42
+ className: "h-6 w-20"
43
+ }, key);
41
44
  }
42
45
  function _temp() {
43
46
  return crypto.randomUUID();
@@ -73,7 +76,7 @@ function ChipsDisplay(t0) {
73
76
  t7$1 = (item) => {
74
77
  const displayText = getItemDisplayValue(item);
75
78
  if (editable && (actions?.onEdit || actions?.onRemove)) return /* @__PURE__ */ jsxs("div", {
76
- className: "bg-secondary inline-flex items-center gap-1 border py-1 pr-1 pl-2",
79
+ className: "qa-chips-display__chip item-surface border-border bg-secondary text-secondary-foreground inline-flex min-h-8 items-center gap-1 py-0.5 pr-1 pl-2",
77
80
  children: [
78
81
  iconElement,
79
82
  /* @__PURE__ */ jsx("span", {
@@ -83,8 +86,8 @@ function ChipsDisplay(t0) {
83
86
  actions?.onEdit && /* @__PURE__ */ jsx(Button, {
84
87
  type: "button",
85
88
  variant: "ghost",
86
- size: "icon",
87
- className: "h-5 w-5",
89
+ size: "icon-xs",
90
+ className: "relative after:absolute after:-inset-1",
88
91
  onClick: () => actions.onEdit?.(item),
89
92
  "aria-label": t("field.editItem"),
90
93
  children: /* @__PURE__ */ jsx(Icon, {
@@ -95,8 +98,8 @@ function ChipsDisplay(t0) {
95
98
  actions?.onRemove && /* @__PURE__ */ jsx(Button, {
96
99
  type: "button",
97
100
  variant: "ghost",
98
- size: "icon",
99
- className: "h-5 w-5",
101
+ size: "icon-xs",
102
+ className: "relative after:absolute after:-inset-1",
100
103
  onClick: () => actions.onRemove?.(item),
101
104
  "aria-label": t("field.removeItem"),
102
105
  children: /* @__PURE__ */ jsx(Icon, {
@@ -109,10 +112,10 @@ function ChipsDisplay(t0) {
109
112
  if (actions?.onEdit) return /* @__PURE__ */ jsx("button", {
110
113
  type: "button",
111
114
  onClick: () => actions.onEdit?.(item),
112
- className: "inline-flex",
115
+ className: "focus-visible:ring-ring/40 inline-flex rounded-md focus-visible:ring-2 focus-visible:outline-none active:scale-[0.96]",
113
116
  children: /* @__PURE__ */ jsxs(Badge, {
114
117
  variant: "secondary",
115
- className: "hover:bg-secondary cursor-pointer gap-1",
118
+ className: "item-surface border-border hover:bg-accent hover:text-accent-foreground cursor-pointer gap-1",
116
119
  children: [
117
120
  iconElement,
118
121
  displayText,
@@ -126,16 +129,16 @@ function ChipsDisplay(t0) {
126
129
  if (linkToDetail && actions?.onNavigate) return /* @__PURE__ */ jsx(CollectionEditLink, {
127
130
  collection,
128
131
  id: item.id,
129
- className: "inline-flex",
132
+ className: "focus-visible:ring-ring/40 inline-flex rounded-md focus-visible:ring-2 focus-visible:outline-none active:scale-[0.96]",
130
133
  children: /* @__PURE__ */ jsxs(Badge, {
131
134
  variant: "secondary",
132
- className: "hover:bg-secondary cursor-pointer gap-1",
135
+ className: "item-surface border-border hover:bg-accent hover:text-accent-foreground cursor-pointer gap-1",
133
136
  children: [iconElement, displayText]
134
137
  })
135
138
  }, item.id);
136
139
  return /* @__PURE__ */ jsxs(Badge, {
137
140
  variant: "secondary",
138
- className: "gap-1",
141
+ className: "item-surface border-border gap-1",
139
142
  children: [iconElement, displayText]
140
143
  }, item.id);
141
144
  };
@@ -160,7 +163,7 @@ function ChipsDisplay(t0) {
160
163
  let t7;
161
164
  if ($[19] !== t6) {
162
165
  t7 = /* @__PURE__ */ jsx("div", {
163
- className: "flex flex-wrap gap-2",
166
+ className: "qa-chips-display flex flex-wrap gap-2",
164
167
  children: t6
165
168
  });
166
169
  $[19] = t6;