@chelone/vue 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/dist/admin/admin.vue_vue_type_script_setup_true_lang.js +5 -4
  2. package/dist/admin/auth-gate.js +1 -3
  3. package/dist/admin/resource-view.d.ts +8 -0
  4. package/dist/admin/resource-view.js +19 -0
  5. package/dist/auth/permissions-hooks.js +1 -3
  6. package/dist/choices/choices-context.d.ts +1 -2
  7. package/dist/choices/use-choices.d.ts +3 -3
  8. package/dist/choices/use-choices.js +13 -10
  9. package/dist/choices/use-reference-input.js +4 -4
  10. package/dist/components/admin/auth/auth-error.vue_vue_type_script_setup_true_lang.js +4 -3
  11. package/dist/components/admin/auth/auth-layout.vue_vue_type_script_setup_true_lang.js +1 -1
  12. package/dist/components/admin/auth/can-access.vue.d.ts +2 -2
  13. package/dist/components/admin/auth/login-form.vue_vue_type_script_setup_true_lang.js +3 -2
  14. package/dist/components/admin/auth/login-with-email.vue_vue_type_script_setup_true_lang.js +1 -0
  15. package/dist/components/admin/buttons/bulk-update-button.vue.d.ts +19 -6
  16. package/dist/components/admin/buttons/bulk-update-button.vue_vue_type_script_setup_true_lang.js +1 -1
  17. package/dist/components/admin/buttons/clone-button.vue.d.ts +19 -16
  18. package/dist/components/admin/buttons/clone-button.vue_vue_type_script_setup_true_lang.js +4 -5
  19. package/dist/components/admin/buttons/delete-button.vue.d.ts +19 -10
  20. package/dist/components/admin/buttons/delete-button.vue_vue_type_script_setup_true_lang.js +6 -7
  21. package/dist/components/admin/buttons/dual-approval-button.vue_vue_type_script_setup_true_lang.js +14 -2
  22. package/dist/components/admin/buttons/edit-button.vue.d.ts +19 -16
  23. package/dist/components/admin/buttons/edit-button.vue_vue_type_script_setup_true_lang.js +4 -5
  24. package/dist/components/admin/buttons/export-button.vue_vue_type_script_setup_true_lang.js +2 -2
  25. package/dist/components/admin/buttons/fields-selector.vue_vue_type_script_setup_true_lang.js +1 -2
  26. package/dist/components/admin/buttons/filter-button.vue_vue_type_script_setup_true_lang.js +1 -1
  27. package/dist/components/admin/buttons/record-button-props.d.ts +12 -0
  28. package/dist/components/admin/buttons/show-button.vue.d.ts +19 -16
  29. package/dist/components/admin/buttons/show-button.vue_vue_type_script_setup_true_lang.js +4 -5
  30. package/dist/components/admin/buttons/status-transition-button.vue_vue_type_script_setup_true_lang.js +3 -7
  31. package/dist/components/admin/buttons/update-button.vue.d.ts +28 -24
  32. package/dist/components/admin/buttons/update-button.vue_vue_type_script_setup_true_lang.js +3 -4
  33. package/dist/components/admin/common/application-updated-notification.vue_vue_type_script_setup_true_lang.js +1 -1
  34. package/dist/components/admin/common/i18n-key-editor.vue_vue_type_script_setup_true_lang.js +1 -2
  35. package/dist/components/admin/csv-import/csv-import.vue_vue_type_script_setup_true_lang.js +2 -5
  36. package/dist/components/admin/feedback/error.vue_vue_type_script_setup_true_lang.js +1 -1
  37. package/dist/components/admin/feedback/linear-progress.vue_vue_type_script_setup_true_lang.js +1 -0
  38. package/dist/components/admin/feedback/loading.vue_vue_type_script_setup_true_lang.js +7 -6
  39. package/dist/components/admin/feedback/placeholder.vue_vue_type_script_setup_true_lang.js +4 -1
  40. package/dist/components/admin/fields/api-key-field.vue.d.ts +3 -3
  41. package/dist/components/admin/fields/api-key-field.vue_vue_type_script_setup_true_lang.js +6 -7
  42. package/dist/components/admin/fields/array-field.vue.d.ts +3 -3
  43. package/dist/components/admin/fields/badge-field.vue.d.ts +3 -3
  44. package/dist/components/admin/fields/boolean-field.vue.d.ts +3 -3
  45. package/dist/components/admin/fields/chip-field.vue.d.ts +3 -3
  46. package/dist/components/admin/fields/color-field.vue.d.ts +3 -3
  47. package/dist/components/admin/fields/cron-field.vue.d.ts +3 -3
  48. package/dist/components/admin/fields/currency-field.vue.d.ts +3 -3
  49. package/dist/components/admin/fields/date-field.vue.d.ts +3 -3
  50. package/dist/components/admin/fields/diff-viewer.vue.d.ts +3 -3
  51. package/dist/components/admin/fields/duration-field.vue.d.ts +3 -3
  52. package/dist/components/admin/fields/email-field.vue.d.ts +3 -3
  53. package/dist/components/admin/fields/field-props.d.ts +2 -2
  54. package/dist/components/admin/fields/file-field.vue.d.ts +3 -3
  55. package/dist/components/admin/fields/function-field.vue.d.ts +3 -3
  56. package/dist/components/admin/fields/image-field.vue.d.ts +3 -3
  57. package/dist/components/admin/fields/json-field.vue.d.ts +3 -3
  58. package/dist/components/admin/fields/number-field.vue.d.ts +3 -3
  59. package/dist/components/admin/fields/phone-field.vue.d.ts +3 -3
  60. package/dist/components/admin/fields/phone-field.vue_vue_type_script_setup_true_lang.js +3 -1
  61. package/dist/components/admin/fields/rating-field.vue.d.ts +3 -3
  62. package/dist/components/admin/fields/rating-field.vue_vue_type_script_setup_true_lang.js +5 -5
  63. package/dist/components/admin/fields/record-field.vue.d.ts +3 -3
  64. package/dist/components/admin/fields/reference-array-field.vue.d.ts +20 -10
  65. package/dist/components/admin/fields/reference-field.vue.d.ts +22 -35
  66. package/dist/components/admin/fields/reference-many-count.vue.d.ts +20 -5
  67. package/dist/components/admin/fields/reference-many-field.vue.d.ts +20 -12
  68. package/dist/components/admin/fields/reference-one-field.vue.d.ts +22 -12
  69. package/dist/components/admin/fields/select-field.vue.d.ts +3 -3
  70. package/dist/components/admin/fields/subscription-plan-field.vue.d.ts +3 -3
  71. package/dist/components/admin/fields/text-array-field.vue.d.ts +3 -3
  72. package/dist/components/admin/fields/text-field.vue.d.ts +3 -3
  73. package/dist/components/admin/fields/url-field.vue.d.ts +3 -3
  74. package/dist/components/admin/fields/usage-meter-field.vue.d.ts +3 -3
  75. package/dist/components/admin/fields/usage-meter-field.vue_vue_type_script_setup_true_lang.js +6 -6
  76. package/dist/components/admin/fields/webhook-endpoint-field.vue.d.ts +3 -3
  77. package/dist/components/admin/fields/webhook-endpoint-field.vue_vue_type_script_setup_true_lang.js +1 -1
  78. package/dist/components/admin/fields/wrapper-field.vue.d.ts +21 -11
  79. package/dist/components/admin/inputs/api-key-input.vue.d.ts +20 -5
  80. package/dist/components/admin/inputs/api-key-input.vue_vue_type_script_setup_true_lang.js +3 -4
  81. package/dist/components/admin/inputs/array-input-row.vue_vue_type_script_setup_true_lang.js +1 -1
  82. package/dist/components/admin/inputs/checkbox-group-input.vue_vue_type_script_setup_true_lang.js +1 -1
  83. package/dist/components/admin/inputs/date-input-format.d.ts +4 -1
  84. package/dist/components/admin/inputs/date-input-format.js +10 -1
  85. package/dist/components/admin/inputs/date-input.vue_vue_type_script_setup_true_lang.js +3 -2
  86. package/dist/components/admin/inputs/date-time-input.vue_vue_type_script_setup_true_lang.js +3 -2
  87. package/dist/components/admin/inputs/duration-input.vue_vue_type_script_setup_true_lang.js +1 -1
  88. package/dist/components/admin/inputs/image-input-thumbnail.vue_vue_type_script_setup_true_lang.js +6 -5
  89. package/dist/components/admin/inputs/image-input.vue.d.ts +1 -0
  90. package/dist/components/admin/inputs/image-input.vue_vue_type_script_setup_true_lang.js +4 -1
  91. package/dist/components/admin/inputs/in-place-editor-form.vue.d.ts +3 -3
  92. package/dist/components/admin/inputs/in-place-editor-form.vue_vue_type_script_setup_true_lang.js +1 -1
  93. package/dist/components/admin/inputs/in-place-editor.vue.d.ts +3 -3
  94. package/dist/components/admin/inputs/number-input.vue.d.ts +6 -0
  95. package/dist/components/admin/inputs/number-input.vue_vue_type_script_setup_true_lang.js +9 -0
  96. package/dist/components/admin/inputs/password-input.vue_vue_type_script_setup_true_lang.js +34 -30
  97. package/dist/components/admin/inputs/phone-input.vue_vue_type_script_setup_true_lang.js +1 -1
  98. package/dist/components/admin/inputs/radio-button-group-input.vue_vue_type_script_setup_true_lang.js +1 -1
  99. package/dist/components/admin/inputs/rating-input.vue_vue_type_script_setup_true_lang.js +24 -12
  100. package/dist/components/admin/inputs/reference-input.vue.d.ts +1 -1
  101. package/dist/components/admin/inputs/reference-input.vue_vue_type_script_setup_true_lang.js +2 -1
  102. package/dist/components/admin/inputs/resettable-text-input.vue.d.ts +6 -4
  103. package/dist/components/admin/inputs/resettable-text-input.vue_vue_type_script_setup_true_lang.js +44 -39
  104. package/dist/components/admin/inputs/subscription-plan-picker.vue_vue_type_script_setup_true_lang.js +2 -2
  105. package/dist/components/admin/inputs/text-input.vue.d.ts +13 -2
  106. package/dist/components/admin/inputs/text-input.vue_vue_type_script_setup_true_lang.js +9 -4
  107. package/dist/components/admin/inputs/time-input.vue_vue_type_script_setup_true_lang.js +3 -2
  108. package/dist/components/admin/inputs/use-choice-input.d.ts +2 -2
  109. package/dist/components/admin/layout/app-sidebar.vue.d.ts +12 -1
  110. package/dist/components/admin/layout/app-sidebar.vue_vue_type_script_setup_true_lang.js +15 -11
  111. package/dist/components/admin/layout/command-menu-content.vue_vue_type_script_setup_true_lang.js +1 -1
  112. package/dist/components/admin/layout/command-menu.vue.d.ts +1 -1
  113. package/dist/components/admin/layout/command-menu.vue_vue_type_script_setup_true_lang.js +9 -63
  114. package/dist/components/admin/layout/data-provider-devtools-entry.vue.d.ts +1 -1
  115. package/dist/components/admin/layout/data-provider-devtools-entry.vue_vue_type_script_setup_true_lang.js +3 -3
  116. package/dist/components/admin/layout/data-provider-devtools.vue_vue_type_script_setup_true_lang.js +1 -1
  117. package/dist/components/admin/layout/layout.vue_vue_type_script_setup_true_lang.js +1 -1
  118. package/dist/components/admin/layout/menu-item-link.vue.d.ts +5 -0
  119. package/dist/components/admin/layout/menu-item-link.vue_vue_type_script_setup_true_lang.js +27 -8
  120. package/dist/components/admin/layout/onboarding-tour-overlay.vue_vue_type_script_setup_true_lang.js +1 -2
  121. package/dist/components/admin/layout/resource-menu-item-group.vue.d.ts +8 -1
  122. package/dist/components/admin/layout/resource-menu-item-group.vue_vue_type_script_setup_true_lang.js +8 -7
  123. package/dist/components/admin/layout/theme-provider.vue_vue_type_script_setup_true_lang.js +2 -1
  124. package/dist/components/admin/layout/title-portal-id.d.ts +1 -1
  125. package/dist/components/admin/layout/title-portal-id.js +1 -9
  126. package/dist/components/admin/layout/top-toolbar.vue_vue_type_script_setup_true_lang.js +4 -1
  127. package/dist/components/admin/list/approval-queue-row.vue.d.ts +2 -2
  128. package/dist/components/admin/list/approval-queue-row.vue_vue_type_script_setup_true_lang.js +2 -2
  129. package/dist/components/admin/list/approval-queue.vue.d.ts +3 -3
  130. package/dist/components/admin/list/calendar-agenda-view.vue.d.ts +23 -15
  131. package/dist/components/admin/list/calendar-event.vue.d.ts +21 -8
  132. package/dist/components/admin/list/calendar-list.vue.d.ts +29 -56
  133. package/dist/components/admin/list/calendar-list.vue_vue_type_script_setup_true_lang.js +12 -8
  134. package/dist/components/admin/list/calendar-month-view.vue.d.ts +26 -20
  135. package/dist/components/admin/list/calendar-month-view.vue_vue_type_script_setup_true_lang.js +2 -6
  136. package/dist/components/admin/list/calendar-week-view.vue.d.ts +24 -17
  137. package/dist/components/admin/list/data-table-col.vue_vue_type_script_setup_true_lang.js +8 -5
  138. package/dist/components/admin/list/data-table-context.d.ts +9 -6
  139. package/dist/components/admin/list/data-table-context.js +9 -1
  140. package/dist/components/admin/list/data-table-row.vue.d.ts +19 -15
  141. package/dist/components/admin/list/data-table-row.vue_vue_type_script_setup_true_lang.js +5 -9
  142. package/dist/components/admin/list/data-table.vue.d.ts +35 -23
  143. package/dist/components/admin/list/data-table.vue_vue_type_script_setup_true_lang.js +4 -7
  144. package/dist/components/admin/list/list-pagination.vue_vue_type_script_setup_true_lang.js +2 -2
  145. package/dist/components/admin/list/pivot-grid.vue.d.ts +3 -3
  146. package/dist/components/admin/list/record-timeline.vue.d.ts +3 -3
  147. package/dist/components/admin/list/record-timeline.vue_vue_type_script_setup_true_lang.js +1 -1
  148. package/dist/components/admin/list/simple-list-item.vue.d.ts +21 -19
  149. package/dist/components/admin/list/simple-list-item.vue_vue_type_script_setup_true_lang.js +3 -7
  150. package/dist/components/admin/list/simple-list.vue.d.ts +28 -20
  151. package/dist/components/admin/list/single-field-list-record.vue.d.ts +19 -9
  152. package/dist/components/admin/list/single-field-list.vue.d.ts +21 -11
  153. package/dist/components/admin/list/tree-list-context.d.ts +11 -6
  154. package/dist/components/admin/list/tree-list-node.vue.d.ts +19 -4
  155. package/dist/components/admin/list/tree-list.vue.d.ts +28 -37
  156. package/dist/components/admin/realtime/comments-thread.vue_vue_type_script_setup_true_lang.js +56 -44
  157. package/dist/components/admin/supabase/forgot-password-form.vue_vue_type_script_setup_true_lang.js +4 -3
  158. package/dist/components/admin/supabase/set-password-form.vue_vue_type_script_setup_true_lang.js +4 -3
  159. package/dist/components/admin/supabase/use-password-recovery.js +11 -1
  160. package/dist/components/admin/view/create.vue_vue_type_script_setup_true_lang.js +1 -1
  161. package/dist/components/admin/view/edit.vue_vue_type_script_setup_true_lang.js +1 -1
  162. package/dist/components/admin/view/show.vue_vue_type_script_setup_true_lang.js +1 -1
  163. package/dist/components/admin/widgets/job-monitor-row.vue.d.ts +24 -11
  164. package/dist/components/admin/widgets/job-monitor.vue.d.ts +3 -3
  165. package/dist/components/admin/widgets/job-monitor.vue_vue_type_script_setup_true_lang.js +2 -2
  166. package/dist/components/block-editor/block-doc-field.vue.d.ts +3 -3
  167. package/dist/components/block-editor/block-drag-handle.vue_vue_type_script_setup_true_lang.js +3 -4
  168. package/dist/components/block-editor/image-block-config.vue_vue_type_script_setup_true_lang.js +2 -3
  169. package/dist/components/charts/bar-chart.vue.d.ts +6 -2
  170. package/dist/components/charts/bar-chart.vue_vue_type_script_setup_true_lang.js +6 -4
  171. package/dist/components/charts/series-chart.d.ts +1 -1
  172. package/dist/components/charts/series-chart.js +9 -3
  173. package/dist/components/index.js +2 -2
  174. package/dist/components/inspector/configurable.vue.d.ts +0 -21
  175. package/dist/components/inspector/configurable.vue_vue_type_script_setup_true_lang.js +2 -2
  176. package/dist/components/inspector/inspector.vue_vue_type_script_setup_true_lang.js +6 -8
  177. package/dist/components/kanban/kanban-board.vue.d.ts +3 -3
  178. package/dist/components/kanban/kanban-board.vue_vue_type_script_setup_true_lang.js +7 -2
  179. package/dist/components/maps/bbox-field.vue_vue_type_script_setup_true_lang.js +4 -4
  180. package/dist/components/maps/geo-json-field.vue_vue_type_script_setup_true_lang.js +4 -4
  181. package/dist/components/maps/geo-json-layers.vue_vue_type_script_setup_true_lang.js +3 -3
  182. package/dist/components/maps/geo-json-view.vue_vue_type_script_setup_true_lang.js +3 -2
  183. package/dist/components/maps/lat-lng-field.vue_vue_type_script_setup_true_lang.js +4 -3
  184. package/dist/components/maps/lat-lng-input.vue_vue_type_script_setup_true_lang.js +5 -7
  185. package/dist/components/maps/map-canvas.vue_vue_type_script_setup_true_lang.js +3 -3
  186. package/dist/components/maps/use-map.js +1 -3
  187. package/dist/components/maps-draw/shape-input.vue_vue_type_script_setup_true_lang.js +5 -5
  188. package/dist/components/maps-draw/simplify-input.vue_vue_type_script_setup_true_lang.js +2 -2
  189. package/dist/components/maps-osm/geocoding-input.vue_vue_type_script_setup_true_lang.js +2 -1
  190. package/dist/components/maps-osm/map-with-search.vue_vue_type_script_setup_true_lang.js +2 -2
  191. package/dist/components/mdx-editor/mdx-editor-theme.css +47 -0
  192. package/dist/components/mdx-editor/mdx-field.vue.d.ts +21 -11
  193. package/dist/components/mdx-editor/mdx-input.vue_vue_type_script_setup_true_lang.js +4 -1
  194. package/dist/components/monaco/internal/use-json-schema.js +1 -2
  195. package/dist/components/monaco/internal/use-monaco-markers.d.ts +0 -6
  196. package/dist/components/monaco/internal/use-monaco-markers.js +4 -2
  197. package/dist/components/monaco/monaco-json-field-lazy.vue.d.ts +2 -2
  198. package/dist/components/monaco/monaco-json-field-lazy.vue_vue_type_script_setup_true_lang.js +3 -2
  199. package/dist/components/monaco/monaco-json-field.vue.d.ts +3 -3
  200. package/dist/components/monaco/monaco-json-input-lazy.vue_vue_type_script_setup_true_lang.js +4 -4
  201. package/dist/components/rich-text-input/rich-text-field.vue.d.ts +3 -3
  202. package/dist/components/ui/avatar.js +1 -1
  203. package/dist/components/ui/badge.js +4 -4
  204. package/dist/components/ui/button-variants.js +1 -1
  205. package/dist/components/ui/chart/chart-container.vue_vue_type_script_setup_true_lang.js +1 -1
  206. package/dist/components/ui/checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
  207. package/dist/components/ui/command/command-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
  208. package/dist/components/ui/sidebar/sidebar-menu-button.vue_vue_type_script_setup_true_lang.js +1 -1
  209. package/dist/components/ui/sidebar/sidebar-parts.js +2 -2
  210. package/dist/components/ui/sidebar/sidebar.vue_vue_type_script_setup_true_lang.js +2 -2
  211. package/dist/controllers/use-controller-for-id.d.ts +2 -2
  212. package/dist/controllers/use-prev-next-controller.d.ts +2 -2
  213. package/dist/controllers/use-reference-many-field-controller.d.ts +4 -4
  214. package/dist/controllers/use-reference-one-field-controller.d.ts +4 -4
  215. package/dist/create-resource-components.d.ts +225 -117
  216. package/dist/data/undoable.js +2 -2
  217. package/dist/form/use-form.d.ts +5 -3
  218. package/dist/form/use-form.js +1 -1
  219. package/dist/form/use-input.d.ts +0 -2
  220. package/dist/form/use-input.js +1 -2
  221. package/dist/index.js +2 -2
  222. package/dist/resource-context.d.ts +5 -1
  223. package/dist/resource-context.js +4 -0
  224. package/dist/router/use-get-path-for-record.d.ts +3 -3
  225. package/package.json +5 -5
@@ -8,7 +8,7 @@ import { toNumberValue } from "@chelone/core";
8
8
  var _hoisted_1 = ["data-invalid"];
9
9
  var _hoisted_2 = {
10
10
  key: 0,
11
- class: "text-sm font-medium leading-none",
11
+ class: "mb-3 text-sm font-medium leading-none",
12
12
  "data-slot": "field-legend"
13
13
  };
14
14
  var _hoisted_3 = { key: 0 };
@@ -23,8 +23,11 @@ var _hoisted_5 = [
23
23
  "disabled",
24
24
  "onClick"
25
25
  ];
26
- var _hoisted_6 = ["fill"];
27
- var _hoisted_7 = ["points"];
26
+ var _hoisted_6 = [
27
+ "width",
28
+ "viewBox",
29
+ "fill"
30
+ ];
28
31
  var rating_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
29
32
  __name: "rating-input",
30
33
  props: {
@@ -60,10 +63,11 @@ var rating_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
60
63
  const currentValue = computed(() => toNumberValue(value.value) ?? 0);
61
64
  const stars = computed(() => Array.from({ length: steps.value }, (_, i) => {
62
65
  const v = (i + 1) * stepValue.value;
66
+ const half = props.allowHalf ? v % 1 !== 0 ? "left" : "right" : void 0;
63
67
  return {
64
68
  v,
65
69
  selected: currentValue.value >= v,
66
- half: v % 1 !== 0
70
+ half
67
71
  };
68
72
  }));
69
73
  const invalid = computed(() => touched.value && error.value != null);
@@ -72,8 +76,11 @@ var rating_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
72
76
  if (props.disabled) return;
73
77
  setValue(v);
74
78
  }
75
- const filledPoints = "12 2 15 9 22 9 16 14 18 22 12 17 6 22 8 14 2 9 9 9";
76
- const halfPoints = "12 2 12 17 6 22 8 14 2 9 9 9";
79
+ const starPoints = "12 2 15 9 22 9 16 14 18 22 12 17 6 22 8 14 2 9 9 9";
80
+ const viewBoxes = {
81
+ left: "0 0 12 24",
82
+ right: "12 0 12 24"
83
+ };
77
84
  return (_ctx, _cache) => {
78
85
  return openBlock(), createElementBlock("fieldset", {
79
86
  class: normalizeClass([props.class, "flex flex-col gap-3 border-0 p-0"]),
@@ -86,7 +93,7 @@ var rating_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
86
93
  role: "radiogroup",
87
94
  "aria-disabled": __props.disabled || void 0,
88
95
  "aria-invalid": invalid.value || void 0,
89
- class: "flex items-center gap-1"
96
+ class: normalizeClass(["flex items-center", __props.allowHalf ? "" : "gap-1"])
90
97
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(stars.value, (star) => {
91
98
  return openBlock(), createElementBlock("button", {
92
99
  key: star.v,
@@ -95,20 +102,25 @@ var rating_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
95
102
  "aria-checked": star.selected,
96
103
  "aria-disabled": __props.disabled || void 0,
97
104
  disabled: __props.disabled,
98
- class: normalizeClass(["p-0.5 leading-none focus:outline-none focus-visible:ring-2 focus-visible:ring-ring", __props.disabled ? "cursor-not-allowed opacity-50" : ""]),
105
+ class: normalizeClass(["py-0.5 leading-none focus:outline-none focus-visible:ring-2 focus-visible:ring-ring", [
106
+ star.half === "left" ? "pl-0.5" : "",
107
+ star.half === "right" ? "pr-0.5 mr-1" : "",
108
+ star.half === void 0 ? "px-0.5" : "",
109
+ __props.disabled ? "cursor-not-allowed opacity-50" : ""
110
+ ]]),
99
111
  onClick: ($event) => pick(star.v),
100
112
  onBlur: _cache[0] || (_cache[0] = (...args) => unref(blur) && unref(blur)(...args))
101
113
  }, [(openBlock(), createElementBlock("svg", {
102
- width: "20",
114
+ width: star.half ? 10 : 20,
103
115
  height: "20",
104
- viewBox: "0 0 24 24",
116
+ viewBox: star.half ? viewBoxes[star.half] : "0 0 24 24",
105
117
  stroke: "currentColor",
106
118
  "stroke-width": "1.5",
107
119
  fill: star.selected ? "currentColor" : "none",
108
120
  class: "text-yellow-500",
109
121
  "aria-hidden": "true"
110
- }, [createElementVNode("polygon", { points: __props.allowHalf && star.half ? halfPoints : filledPoints }, null, 8, _hoisted_7)], 8, _hoisted_6))], 42, _hoisted_5);
111
- }), 128))], 8, _hoisted_4),
122
+ }, [createElementVNode("polygon", { points: starPoints })], 8, _hoisted_6))], 42, _hoisted_5);
123
+ }), 128))], 10, _hoisted_4),
112
124
  invalid.value ? (openBlock(), createBlock(unref(FieldError), { key: 1 }, {
113
125
  default: withCtx(() => [createVNode(validation_error_default, { error: unref(error) }, null, 8, ["error"])]),
114
126
  _: 1
@@ -7,7 +7,7 @@
7
7
  * native `<select>` (the reka-ui combobox autocomplete is a later wave — spec
8
8
  * Risk 1). Choice labels use the reference's record representation.
9
9
  */
10
- import type { SourceProp, Validator } from "@chelone/core";
10
+ import { type SourceProp, type Validator } from "@chelone/core";
11
11
  /** Props for {@link ReferenceInput}. */
12
12
  export interface ReferenceInputProps {
13
13
  source: SourceProp;
@@ -6,6 +6,7 @@ import native_select_default from "../../ui/native-select.js";
6
6
  import validation_error_default from "../common/validation-error.js";
7
7
  import { humanizeSource } from "./label-text.js";
8
8
  import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
9
+ import { DEFAULT_REFERENCE_PER_PAGE } from "@chelone/core";
9
10
  // src/components/admin/inputs/reference-input.vue?vue&type=script&setup=true&lang.ts
10
11
  var _hoisted_1 = { key: 0 };
11
12
  var reference_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
@@ -38,7 +39,7 @@ var reference_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
38
39
  });
39
40
  const query = useGetList(props.reference, () => ({ pagination: {
40
41
  page: 1,
41
- perPage: props.perPage ?? 25
42
+ perPage: props.perPage ?? DEFAULT_REFERENCE_PER_PAGE
42
43
  } }));
43
44
  const getRepresentation = useGetRecordRepresentation(props.reference);
44
45
  const choices = computed(() => {
@@ -1,10 +1,12 @@
1
1
  /**
2
2
  * `<ResettableTextInput>` — a text input with a clear (×) button that resets the
3
3
  * field value, the Vue analog of `@chelone/react`'s
4
- * `inputs/resettable-text-input.tsx`. Wraps `<TextInput>` and hangs a ghost
5
- * button off the right edge; it appears only when the field has a value (unless
6
- * `clearAlwaysVisible`). Clicking it writes `""` (an empty string, not `null` —
7
- * consistent with the coercion fix) so the control stays a controlled string.
4
+ * `inputs/resettable-text-input.tsx`. Wraps `<TextInput>` and overlays a ghost
5
+ * button on the control through its `controlSuffix` slot, so the button is centred
6
+ * on the control with or without a label, helper text or an error. It appears only
7
+ * when the field has a value (unless `clearAlwaysVisible`). Clicking it writes `""`
8
+ * (an empty string, not `null` — consistent with the coercion fix) so the control
9
+ * stays a controlled string.
8
10
  *
9
11
  * Rebridge note: the React twin read the live value via the `useWatch` RHF shim
10
12
  * and cleared via `form.ambient.setFieldValue`. Here we OBSERVE the ambient form store
@@ -4,7 +4,7 @@ import { useTranslate } from "../../../i18n/use-translate.js";
4
4
  import { cn } from "../../../lib/utils.js";
5
5
  import button_default from "../../ui/button.js";
6
6
  import text_input_default from "./text-input.js";
7
- import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, unref, withCtx } from "vue";
7
+ import { computed, createBlock, createElementVNode, createSlots, createVNode, defineComponent, normalizeClass, openBlock, unref, withCtx } from "vue";
8
8
  // src/components/admin/inputs/resettable-text-input.vue?vue&type=script&setup=true&lang.ts
9
9
  var resettable_text_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
10
10
  __name: "resettable-text-input",
@@ -35,10 +35,12 @@ var resettable_text_input_vue_vue_type_script_setup_true_lang_default = /*@__PUR
35
35
  /**
36
36
  * `<ResettableTextInput>` — a text input with a clear (×) button that resets the
37
37
  * field value, the Vue analog of `@chelone/react`'s
38
- * `inputs/resettable-text-input.tsx`. Wraps `<TextInput>` and hangs a ghost
39
- * button off the right edge; it appears only when the field has a value (unless
40
- * `clearAlwaysVisible`). Clicking it writes `""` (an empty string, not `null` —
41
- * consistent with the coercion fix) so the control stays a controlled string.
38
+ * `inputs/resettable-text-input.tsx`. Wraps `<TextInput>` and overlays a ghost
39
+ * button on the control through its `controlSuffix` slot, so the button is centred
40
+ * on the control with or without a label, helper text or an error. It appears only
41
+ * when the field has a value (unless `clearAlwaysVisible`). Clicking it writes `""`
42
+ * (an empty string, not `null` — consistent with the coercion fix) so the control
43
+ * stays a controlled string.
42
44
  *
43
45
  * Rebridge note: the React twin read the live value via the `useWatch` RHF shim
44
46
  * and cleared via `form.ambient.setFieldValue`. Here we OBSERVE the ambient form store
@@ -58,14 +60,13 @@ var resettable_text_input_vue_vue_type_script_setup_true_lang_default = /*@__PUR
58
60
  const v = form.ambient.getFieldValue(wrappedSource);
59
61
  return v != null && v !== "";
60
62
  });
61
- const hasLabel = computed(() => props.label !== false);
62
63
  const showClearButton = computed(() => props.resettable && (props.clearAlwaysVisible || hasValue.value));
63
64
  const clearLabel = computed(() => translate("ra.action.clear_input_value", { _: "Clear value" }));
64
65
  function handleClear() {
65
66
  form.ambient.setFieldValue(wrappedSource, "");
66
67
  }
67
68
  return (_ctx, _cache) => {
68
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)("relative", props.class)) }, [createVNode(text_input_default, {
69
+ return openBlock(), createBlock(text_input_default, {
69
70
  source: __props.source,
70
71
  label: __props.label,
71
72
  "default-value": __props.defaultValue,
@@ -74,8 +75,41 @@ var resettable_text_input_vue_vue_type_script_setup_true_lang_default = /*@__PUR
74
75
  placeholder: __props.placeholder,
75
76
  disabled: __props.disabled,
76
77
  readonly: __props.readonly,
78
+ class: normalizeClass(props.class),
77
79
  "input-class": unref(cn)(__props.resettable ? "pr-9" : void 0, __props.inputClass)
78
- }, null, 8, [
80
+ }, createSlots({ _: 2 }, [showClearButton.value ? {
81
+ name: "controlSuffix",
82
+ fn: withCtx(() => [createVNode(button_default, {
83
+ "data-slot": "reset",
84
+ type: "button",
85
+ variant: "ghost",
86
+ size: "icon",
87
+ class: "absolute right-1 top-1/2 size-7 -translate-y-1/2 text-muted-foreground",
88
+ disabled: __props.disabled || __props.readonly || !hasValue.value,
89
+ "aria-label": clearLabel.value,
90
+ title: clearLabel.value,
91
+ tabindex: -1,
92
+ onClick: handleClear
93
+ }, {
94
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
95
+ xmlns: "http://www.w3.org/2000/svg",
96
+ class: "size-4",
97
+ viewBox: "0 0 24 24",
98
+ fill: "none",
99
+ stroke: "currentColor",
100
+ "stroke-width": "2",
101
+ "stroke-linecap": "round",
102
+ "stroke-linejoin": "round",
103
+ "aria-hidden": "true"
104
+ }, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])]),
105
+ _: 1
106
+ }, 8, [
107
+ "disabled",
108
+ "aria-label",
109
+ "title"
110
+ ])]),
111
+ key: "0"
112
+ } : void 0]), 1032, [
79
113
  "source",
80
114
  "label",
81
115
  "default-value",
@@ -84,38 +118,9 @@ var resettable_text_input_vue_vue_type_script_setup_true_lang_default = /*@__PUR
84
118
  "placeholder",
85
119
  "disabled",
86
120
  "readonly",
87
- "input-class"
88
- ]), showClearButton.value ? (openBlock(), createBlock(button_default, {
89
- key: 0,
90
- "data-slot": "reset",
91
- type: "button",
92
- variant: "ghost",
93
- size: "icon",
94
- class: normalizeClass(unref(cn)("absolute right-1 size-7 text-muted-foreground", hasLabel.value ? "top-6" : "top-1")),
95
- disabled: __props.disabled || __props.readonly || !hasValue.value,
96
- "aria-label": clearLabel.value,
97
- title: clearLabel.value,
98
- tabindex: -1,
99
- onClick: handleClear
100
- }, {
101
- default: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
102
- xmlns: "http://www.w3.org/2000/svg",
103
- class: "size-4",
104
- viewBox: "0 0 24 24",
105
- fill: "none",
106
- stroke: "currentColor",
107
- "stroke-width": "2",
108
- "stroke-linecap": "round",
109
- "stroke-linejoin": "round",
110
- "aria-hidden": "true"
111
- }, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])]),
112
- _: 1
113
- }, 8, [
114
121
  "class",
115
- "disabled",
116
- "aria-label",
117
- "title"
118
- ])) : createCommentVNode("", true)], 2);
122
+ "input-class"
123
+ ]);
119
124
  };
120
125
  }
121
126
  });
@@ -11,7 +11,7 @@ import { toTextValue } from "@chelone/core";
11
11
  var _hoisted_1 = ["data-invalid"];
12
12
  var _hoisted_2 = {
13
13
  key: 0,
14
- class: "text-sm font-medium leading-none"
14
+ class: "mb-3 text-sm font-medium leading-none"
15
15
  };
16
16
  var _hoisted_3 = { key: 0 };
17
17
  var _hoisted_4 = [
@@ -85,7 +85,7 @@ var subscription_plan_picker_vue_vue_type_script_setup_true_lang_default = /*@__
85
85
  createElementVNode("div", {
86
86
  id: unref(id),
87
87
  role: "radiogroup",
88
- class: "grid gap-3 sm:grid-cols-3",
88
+ class: "grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-3",
89
89
  "aria-disabled": __props.disabled || void 0,
90
90
  "aria-invalid": invalid.value || void 0
91
91
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.plans, (plan) => {
@@ -4,6 +4,10 @@
4
4
  * the shadcn `Field` + `Input` primitives. The error is the already-displayable
5
5
  * `string | TranslatableMessage` off `useInput` (rendered through
6
6
  * `<ValidationError>`), never an RHF `error.root.message`.
7
+ *
8
+ * The control sits in a row of its own with the `controlSuffix` slot, so a wrapper
9
+ * can overlay a button on it and have that button centred on the control whatever
10
+ * the field renders above or below the row.
7
11
  */
8
12
  import { type Validator } from "@chelone/core";
9
13
  import type { SourceProp } from "@chelone/core";
@@ -26,6 +30,13 @@ export interface TextInputProps {
26
30
  }
27
31
  declare const _default: typeof __VLS_export;
28
32
  export default _default;
29
- declare const __VLS_export: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {
33
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {
30
34
  label: string | false;
31
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
36
+ controlSuffix?: (props: {}) => any;
37
+ }>;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -3,10 +3,11 @@ import { Field, FieldError, FieldLabel } from "../../ui/field.js";
3
3
  import input_default from "../../ui/input.js";
4
4
  import validation_error_default from "../common/validation-error.js";
5
5
  import { humanizeSource } from "./label-text.js";
6
- import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
6
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
7
7
  import { toTextValue } from "@chelone/core";
8
8
  // src/components/admin/inputs/text-input.vue?vue&type=script&setup=true&lang.ts
9
9
  var _hoisted_1 = { key: 0 };
10
+ var _hoisted_2 = { class: "relative flex items-center" };
10
11
  var text_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
11
12
  __name: "text-input",
12
13
  props: {
@@ -34,6 +35,10 @@ var text_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
34
35
  * the shadcn `Field` + `Input` primitives. The error is the already-displayable
35
36
  * `string | TranslatableMessage` off `useInput` (rendered through
36
37
  * `<ValidationError>`), never an RHF `error.root.message`.
38
+ *
39
+ * The control sits in a row of its own with the `controlSuffix` slot, so a wrapper
40
+ * can overlay a button on it and have that button centred on the control whatever
41
+ * the field renders above or below the row.
37
42
  */
38
43
  const props = __props;
39
44
  const { id, value, setValue, blur, error, touched, isRequired } = useInput({
@@ -58,7 +63,7 @@ var text_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
58
63
  default: withCtx(() => [createTextVNode(toDisplayString(labelText.value), 1), unref(isRequired) ? (openBlock(), createElementBlock("span", _hoisted_1, " *")) : createCommentVNode("", true)]),
59
64
  _: 1
60
65
  }, 8, ["html-for"])) : createCommentVNode("", true),
61
- createVNode(input_default, {
66
+ createElementVNode("div", _hoisted_2, [createVNode(input_default, {
62
67
  id: unref(id),
63
68
  type: __props.type ?? "text",
64
69
  "model-value": unref(value),
@@ -84,13 +89,13 @@ var text_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
84
89
  "class",
85
90
  "onUpdate:modelValue",
86
91
  "onBlur"
87
- ]),
92
+ ]), renderSlot(_ctx.$slots, "controlSuffix")]),
88
93
  invalid.value ? (openBlock(), createBlock(unref(FieldError), { key: 1 }, {
89
94
  default: withCtx(() => [createVNode(validation_error_default, { error: unref(error) }, null, 8, ["error"])]),
90
95
  _: 1
91
96
  })) : createCommentVNode("", true)
92
97
  ]),
93
- _: 1
98
+ _: 3
94
99
  }, 8, ["class", "data-invalid"]);
95
100
  };
96
101
  }
@@ -1,8 +1,9 @@
1
1
  import { useInput } from "../../../form/use-input.js";
2
2
  import { Field, FieldError, FieldLabel } from "../../ui/field.js";
3
+ import { cn } from "../../../lib/utils.js";
3
4
  import input_default from "../../ui/input.js";
4
5
  import validation_error_default from "../common/validation-error.js";
5
- import { formatTime, isValidTime, parseTimeToDate } from "./date-input-format.js";
6
+ import { PICKER_INPUT_CLASS, formatTime, isValidTime, parseTimeToDate } from "./date-input-format.js";
6
7
  import { humanizeSource } from "./label-text.js";
7
8
  import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, toDisplayString, unref, watch, withCtx } from "vue";
8
9
  import { textOf, toDateInputValue, toTextValue } from "@chelone/core";
@@ -82,7 +83,7 @@ var time_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
82
83
  disabled: __props.disabled,
83
84
  readonly: __props.readonly,
84
85
  "aria-invalid": invalid.value,
85
- class: normalizeClass(__props.inputClass),
86
+ class: normalizeClass(unref(cn)(unref(PICKER_INPUT_CLASS), __props.inputClass)),
86
87
  onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
87
88
  "onUpdate:modelValue": onInput,
88
89
  onBlur
@@ -21,9 +21,9 @@
21
21
  * / `resource` / `isFromReference` are stable per context, so they are read once
22
22
  * (parity with the twin's `useState` capture of the reference options).
23
23
  */
24
- import { type ChoiceValueOf, type SourcePath, type SourceProp } from "@chelone/core";
24
+ import { type ChoiceRecord, type ChoiceValueOf, type SourcePath, type SourceProp } from "@chelone/core";
25
25
  import { type ComputedRef } from "vue";
26
- import { type ChoiceRecord, type OptionText } from "../../../choices/use-choices.js";
26
+ import { type OptionText } from "../../../choices/use-choices.js";
27
27
  /** Options for {@link useChoiceInput}. */
28
28
  export interface UseChoiceInputOptions<TChoice extends ChoiceRecord = ChoiceRecord> {
29
29
  /** Component name used in the "must provide the source prop" error. */
@@ -1,12 +1,21 @@
1
1
  /** Props for {@link AppSidebar}. */
2
2
  export interface AppSidebarProps {
3
- /** Brand label in the sidebar header. Defaults to `"Chelone"`. */
3
+ /**
4
+ * Brand label in the sidebar header. Defaults to `"Chelone"`. The `#brand`
5
+ * slot replaces it.
6
+ */
4
7
  brand?: string;
5
8
  /**
6
9
  * Where the brand links to, used as given (not prefixed with the basename).
7
10
  * Defaults to the dashboard under the basename.
8
11
  */
9
12
  brandTo?: string;
13
+ /**
14
+ * Where the brand links to as a plain anchor, with no router and no basename
15
+ * prefix: for a link out of the app, such as the site home. Wins over
16
+ * `brandTo`. A `javascript:` or other unsafe scheme renders no `href`.
17
+ */
18
+ brandHref?: string;
10
19
  }
11
20
  declare const _default: typeof __VLS_export;
12
21
  export default _default;
@@ -14,6 +23,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<AppSid
14
23
  brand: string;
15
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
16
25
  'brand-icon'?: (props: {}) => any;
26
+ } & {
27
+ brand?: (props: {}) => any;
17
28
  } & {
18
29
  default?: (props: {}) => any;
19
30
  }>;
@@ -3,7 +3,8 @@ import sidebar_default from "../../ui/sidebar/sidebar.js";
3
3
  import { SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuItem } from "../../ui/sidebar/sidebar-parts.js";
4
4
  import sidebar_menu_button_default from "../../ui/sidebar/sidebar-menu-button.js";
5
5
  import menu_default from "./menu.js";
6
- import { computed, createBlock, createElementVNode, createVNode, defineComponent, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
6
+ import { computed, createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
7
+ import { isSafeLinkUrl } from "@chelone/core";
7
8
  import { RouterLink } from "vue-router";
8
9
  // src/components/admin/layout/app-sidebar.vue?vue&type=script&setup=true&lang.ts
9
10
  var _hoisted_1 = { class: "text-base font-semibold" };
@@ -11,19 +12,26 @@ var app_sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
11
12
  __name: "app-sidebar",
12
13
  props: {
13
14
  brand: { default: "Chelone" },
14
- brandTo: {}
15
+ brandTo: {},
16
+ brandHref: {}
15
17
  },
16
18
  setup(__props) {
17
19
  /**
18
20
  * `<AppSidebar>` — the navigation sidebar: a brand header, the resource `<Menu>`,
19
21
  * and a footer. The Vue twin of `@chelone/react`'s `layout/app-sidebar.tsx`.
20
22
  * The brand icon defaults to an inline `Shell` glyph (overridable via the
21
- * `#brand-icon` slot); the content defaults to `<Menu>` (overridable via the
23
+ * `#brand-icon` slot, and the label by the `#brand` slot); the content defaults to `<Menu>` (overridable via the
22
24
  * default slot for a fully custom nav tree).
23
25
  */
24
26
  const props = __props;
25
27
  const basename = useBasename();
26
- const to = computed(() => props.brandTo ?? `${basename}/`);
28
+ const link = computed(() => props.brandHref === void 0 ? {
29
+ as: RouterLink,
30
+ to: props.brandTo ?? `${basename}/`
31
+ } : {
32
+ as: "a",
33
+ href: isSafeLinkUrl(props.brandHref) ? props.brandHref : void 0
34
+ });
27
35
  return (_ctx, _cache) => {
28
36
  return openBlock(), createBlock(unref(sidebar_default), {
29
37
  variant: "floating",
@@ -33,11 +41,7 @@ var app_sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
33
41
  createVNode(unref(SidebarHeader), null, {
34
42
  default: withCtx(() => [createVNode(unref(SidebarMenu), null, {
35
43
  default: withCtx(() => [createVNode(unref(SidebarMenuItem), null, {
36
- default: withCtx(() => [createVNode(unref(sidebar_menu_button_default), {
37
- as: unref(RouterLink),
38
- to: to.value,
39
- size: "lg"
40
- }, {
44
+ default: withCtx(() => [createVNode(unref(sidebar_menu_button_default), mergeProps(link.value, { size: "lg" }), {
41
45
  default: withCtx(() => [renderSlot(_ctx.$slots, "brand-icon", {}, () => [_cache[0] || (_cache[0] = createElementVNode("svg", {
42
46
  viewBox: "0 0 24 24",
43
47
  fill: "none",
@@ -47,9 +51,9 @@ var app_sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
47
51
  "stroke-linejoin": "round",
48
52
  class: "size-5",
49
53
  "aria-hidden": "true"
50
- }, [createElementVNode("path", { d: "M14 11a2 2 0 1 1-4 0 4 4 0 0 1 8 0 6 6 0 0 1-12 0 8 8 0 0 1 16 0 10 10 0 1 1-20 0 11.93 11.93 0 0 1 2.42-7.22 2 2 0 1 1 3.16 2.44" })], -1))]), createElementVNode("span", _hoisted_1, toDisplayString(__props.brand), 1)]),
54
+ }, [createElementVNode("path", { d: "M14 11a2 2 0 1 1-4 0 4 4 0 0 1 8 0 6 6 0 0 1-12 0 8 8 0 0 1 16 0 10 10 0 1 1-20 0 11.93 11.93 0 0 1 2.42-7.22 2 2 0 1 1 3.16 2.44" })], -1))]), createElementVNode("span", _hoisted_1, [renderSlot(_ctx.$slots, "brand", {}, () => [createTextVNode(toDisplayString(__props.brand), 1)])])]),
51
55
  _: 3
52
- }, 8, ["as", "to"])]),
56
+ }, 16)]),
53
57
  _: 3
54
58
  })]),
55
59
  _: 3
@@ -155,7 +155,7 @@ var command_menu_content_vue_vue_type_script_setup_true_lang_default = /*@__PURE
155
155
  }
156
156
  return (_ctx, _cache) => {
157
157
  return openBlock(), createElementBlock(Fragment, null, [
158
- createVNode(unref(command_input_default), { placeholder: __props.placeholder ?? unref(translate)("chelone.command_menu.placeholder", { _: "Type a command or search..." }) }, null, 8, ["placeholder"]),
158
+ createVNode(unref(command_input_default), { placeholder: __props.placeholder ?? unref(translate)("chelone.command_menu.placeholder", { _: "Search or run a command..." }) }, null, 8, ["placeholder"]),
159
159
  createVNode(unref(CommandList), null, {
160
160
  default: withCtx(() => [
161
161
  createVNode(unref(CommandEmpty), null, {
@@ -13,7 +13,7 @@ export interface CommandMenuProps {
13
13
  searchFields?: Record<string, string>;
14
14
  /** Most record hits per resource. Default `5`. */
15
15
  perResourceLimit?: number;
16
- /** Most pages kept under Recent. Default `5`. */
16
+ /** Most pages kept under Recent. Default `10`. */
17
17
  recentsLimit?: number;
18
18
  /** Commands to list beside the built-in ones. */
19
19
  actions?: CommandMenuAction[];
@@ -1,13 +1,10 @@
1
1
  import { useCheloneNotifications } from "../../../context.js";
2
2
  import { useTranslate } from "../../../i18n/use-translate.js";
3
- import command_default from "../../ui/command/command.js";
4
3
  import command_dialog_default from "../../ui/command/command-dialog.js";
5
- import sheet_default from "../../ui/sheet.js";
6
- import { useIsMobile } from "../../ui/sidebar/use-is-mobile.js";
7
4
  import command_menu_content_default from "./command-menu-content.js";
8
5
  import { CommandMenuKey } from "./command-menu-context.js";
9
- import { Fragment, computed, createBlock, createElementBlock, createVNode, defineComponent, nextTick, onBeforeUnmount, onMounted, onScopeDispose, openBlock, provide, ref, renderSlot, shallowRef, unref, watch, withCtx } from "vue";
10
- import { createCommandRegistry, shouldHandleHotkey } from "@chelone/core";
6
+ import { Fragment, computed, createElementBlock, createVNode, defineComponent, onBeforeUnmount, onMounted, onScopeDispose, openBlock, provide, ref, renderSlot, shallowRef, unref, withCtx } from "vue";
7
+ import { DEFAULT_RECENTS_LIMIT, DEFAULT_SEARCH_DEBOUNCE_MS, createCommandRegistry, shouldHandleHotkey } from "@chelone/core";
11
8
  // src/components/admin/layout/command-menu.vue?vue&type=script&setup=true&lang.ts
12
9
  var command_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
13
10
  __name: "command-menu",
@@ -19,10 +16,10 @@ var command_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
19
16
  resources: { default: void 0 },
20
17
  searchFields: { default: () => ({}) },
21
18
  perResourceLimit: { default: 5 },
22
- recentsLimit: { default: 5 },
19
+ recentsLimit: { default: DEFAULT_RECENTS_LIMIT },
23
20
  actions: { default: () => [] },
24
21
  placeholder: { default: void 0 },
25
- searchDebounceMs: { default: 250 }
22
+ searchDebounceMs: { default: DEFAULT_SEARCH_DEBOUNCE_MS }
26
23
  },
27
24
  setup(__props) {
28
25
  /**
@@ -32,13 +29,11 @@ var command_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
32
29
  * slot of `<Admin>`): the default slot renders inside the provider and outside
33
30
  * the dialog, so descendants can call `useCommandMenu` and `useRegisterCommand`.
34
31
  *
35
- * It is a `CommandDialog` on a wide screen and a bottom `Sheet` holding a
36
- * `Command` on a narrow one.
32
+ * It is a `CommandDialog` on every screen size.
37
33
  */
38
34
  const props = __props;
39
35
  const translate = useTranslate();
40
36
  const notifications = useCheloneNotifications();
41
- const isMobile = useIsMobile();
42
37
  const isOpen = ref(false);
43
38
  const query = ref("");
44
39
  function open() {
@@ -78,12 +73,6 @@ var command_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
78
73
  }
79
74
  onMounted(() => window.addEventListener("keydown", onKeydown));
80
75
  onBeforeUnmount(() => window.removeEventListener("keydown", onKeydown));
81
- const sheetCommand = ref(null);
82
- watch(isOpen, async (opened) => {
83
- if (!opened || !isMobile.value) return;
84
- await nextTick();
85
- sheetCommand.value?.$el.querySelector("input")?.focus();
86
- });
87
76
  function onOpenChange(next) {
88
77
  if (next) open();
89
78
  else close();
@@ -101,52 +90,9 @@ var command_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
101
90
  }
102
91
  }
103
92
  const title = computed(() => translate("chelone.command_menu.title", { _: "Command menu" }));
104
- const description = computed(() => translate("chelone.command_menu.description", { _: "Search resources and records, or run an action." }));
93
+ const description = computed(() => translate("chelone.command_menu.description", { _: "Jump to a page or record, or run an action." }));
105
94
  return (_ctx, _cache) => {
106
- return openBlock(), createElementBlock(Fragment, null, [renderSlot(_ctx.$slots, "default"), unref(isMobile) ? (openBlock(), createBlock(sheet_default, {
107
- key: 0,
108
- side: "bottom",
109
- open: isOpen.value,
110
- title: title.value,
111
- description: description.value,
112
- "onUpdate:open": onOpenChange
113
- }, {
114
- default: withCtx(() => [createVNode(unref(command_default), {
115
- ref_key: "sheetCommand",
116
- ref: sheetCommand,
117
- class: "-mx-4 h-auto"
118
- }, {
119
- default: withCtx(() => [createVNode(command_menu_content_default, {
120
- query: query.value,
121
- "onUpdate:query": _cache[0] || (_cache[0] = ($event) => query.value = $event),
122
- resources: __props.resources,
123
- "search-fields": __props.searchFields,
124
- "per-resource-limit": __props.perResourceLimit,
125
- "recents-limit": __props.recentsLimit,
126
- "search-debounce-ms": __props.searchDebounceMs,
127
- placeholder: __props.placeholder,
128
- commands: commands.value,
129
- onClose: close,
130
- onRun: run
131
- }, null, 8, [
132
- "query",
133
- "resources",
134
- "search-fields",
135
- "per-resource-limit",
136
- "recents-limit",
137
- "search-debounce-ms",
138
- "placeholder",
139
- "commands"
140
- ])]),
141
- _: 1
142
- }, 512)]),
143
- _: 1
144
- }, 8, [
145
- "open",
146
- "title",
147
- "description"
148
- ])) : (openBlock(), createBlock(unref(command_dialog_default), {
149
- key: 1,
95
+ return openBlock(), createElementBlock(Fragment, null, [renderSlot(_ctx.$slots, "default"), createVNode(unref(command_dialog_default), {
150
96
  open: isOpen.value,
151
97
  title: title.value,
152
98
  description: description.value,
@@ -154,7 +100,7 @@ var command_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
154
100
  }, {
155
101
  default: withCtx(() => [createVNode(command_menu_content_default, {
156
102
  query: query.value,
157
- "onUpdate:query": _cache[1] || (_cache[1] = ($event) => query.value = $event),
103
+ "onUpdate:query": _cache[0] || (_cache[0] = ($event) => query.value = $event),
158
104
  resources: __props.resources,
159
105
  "search-fields": __props.searchFields,
160
106
  "per-resource-limit": __props.perResourceLimit,
@@ -179,7 +125,7 @@ var command_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
179
125
  "open",
180
126
  "title",
181
127
  "description"
182
- ]))], 64);
128
+ ])], 64);
183
129
  };
184
130
  }
185
131
  });
@@ -3,7 +3,7 @@
3
3
  * of a failed call, and its params and result as indented JSON under a
4
4
  * disclosure.
5
5
  */
6
- import type { DataProviderLogEntry } from "@chelone/core";
6
+ import { type DataProviderLogEntry } from "@chelone/core";
7
7
  type __VLS_Props = {
8
8
  entry: DataProviderLogEntry;
9
9
  };