@wow-two-beta/fe 0.0.33 → 0.0.35

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 (45) hide show
  1. package/dist/chunks/{BackToTopButton.vue_vue_type_script_setup_true_lang-dmN5MH2T.js → BackToTopButton.vue_vue_type_script_setup_true_lang-DHSpEajG.js} +74 -31
  2. package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-DHSpEajG.js.map +1 -0
  3. package/dist/chunks/{KanbanCard.vue_vue_type_script_setup_true_lang-BrQFyOiU.js → KanbanCard.vue_vue_type_script_setup_true_lang-akNFA0JK.js} +545 -312
  4. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-akNFA0JK.js.map +1 -0
  5. package/dist/chunks/{UseTypedConfirmation-CvY2T4Up.js → RowsField.vue_vue_type_script_setup_true_lang-C0L-DjCW.js} +967 -840
  6. package/dist/chunks/RowsField.vue_vue_type_script_setup_true_lang-C0L-DjCW.js.map +1 -0
  7. package/dist/chunks/{TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js → TypedConfirmModal.vue_vue_type_script_setup_true_lang-3Sdgh0cV.js} +26 -13
  8. package/dist/chunks/{TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js.map → TypedConfirmModal.vue_vue_type_script_setup_true_lang-3Sdgh0cV.js.map} +1 -1
  9. package/dist/foundation/device/hooks/UseBreakpointRange.d.ts +21 -0
  10. package/dist/foundation/device/index.d.ts +1 -0
  11. package/dist/foundation/device/index.js +13 -0
  12. package/dist/foundation/device/index.js.map +1 -1
  13. package/dist/foundation/storage/PersistentRef.d.ts +25 -0
  14. package/dist/foundation/storage/index.d.ts +1 -0
  15. package/dist/foundation/storage/index.js +46 -1
  16. package/dist/foundation/storage/index.js.map +1 -1
  17. package/dist/index.js +232 -228
  18. package/dist/presentation/actions/index.d.ts +1 -0
  19. package/dist/presentation/actions/index.js +12 -11
  20. package/dist/presentation/actions/refreshButton/RefreshButton.vue.d.ts +26 -0
  21. package/dist/presentation/actions/refreshButton/index.d.ts +1 -0
  22. package/dist/presentation/display/badge/Badge.variants.d.ts +77 -10
  23. package/dist/presentation/display/badge/Badge.vue.d.ts +18 -1
  24. package/dist/presentation/display/badge/index.d.ts +1 -1
  25. package/dist/presentation/display/card/CardLink.vue.d.ts +19 -0
  26. package/dist/presentation/display/card/index.d.ts +1 -0
  27. package/dist/presentation/display/index.js +152 -150
  28. package/dist/presentation/display/listGroup/ListGroupItem.vue.d.ts +17 -0
  29. package/dist/presentation/display/sparkline/Sparkline.vue.d.ts +32 -2
  30. package/dist/presentation/display/sparkline/index.d.ts +1 -1
  31. package/dist/presentation/feedback/dataRegion/DataRegion.vue.d.ts +1 -1
  32. package/dist/presentation/forms/index.d.ts +1 -0
  33. package/dist/presentation/forms/index.js +59 -58
  34. package/dist/presentation/forms/rowsField/RowsField.vue.d.ts +56 -0
  35. package/dist/presentation/forms/rowsField/index.d.ts +1 -0
  36. package/dist/presentation/overlays/index.js +1 -1
  37. package/dist/presentation/overlays/typedConfirmModal/TypedConfirmModal.vue.d.ts +20 -4
  38. package/dist/router/adapters/vueRouter/hooks/UseListDetailRoute.d.ts +28 -0
  39. package/dist/router/adapters/vueRouter/index.d.ts +1 -0
  40. package/dist/router/index.js +34 -0
  41. package/dist/router/index.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-dmN5MH2T.js.map +0 -1
  44. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-BrQFyOiU.js.map +0 -1
  45. package/dist/chunks/UseTypedConfirmation-CvY2T4Up.js.map +0 -1
@@ -26,9 +26,34 @@ export declare const SparklineTone: {
26
26
  readonly Current: "current";
27
27
  };
28
28
  export type SparklineTone = (typeof SparklineTone)[keyof typeof SparklineTone];
29
+ /** Defines one reading of a time-based series. */
30
+ export interface SparklinePoint {
31
+ /** The reading's instant, in epoch milliseconds. */
32
+ readonly at: number;
33
+ /** The reading's value. */
34
+ readonly value: number;
35
+ }
36
+ /** Defines a horizontal reference line — a warning or danger level. */
37
+ export interface SparklineThreshold {
38
+ /** The level, on the same scale as the series. */
39
+ readonly value: number;
40
+ /** The line's color tone. Default `muted`. */
41
+ readonly tone?: SparklineTone;
42
+ }
29
43
  export interface SparklineProps {
30
- /** The series to plot, in order. */
31
- readonly data: ReadonlyArray<number>;
44
+ /** The series to plot, evenly spaced in order. Ignored when `points` is set. */
45
+ readonly data?: ReadonlyArray<number>;
46
+ /**
47
+ * The time-based series, oldest first — each reading placed by its instant inside `since`…`until`, so a short history
48
+ * sits at the right end instead of stretching across the chart.
49
+ */
50
+ readonly points?: ReadonlyArray<SparklinePoint>;
51
+ /** The time window's start, in epoch milliseconds. Defaults to the first point's instant. */
52
+ readonly since?: number;
53
+ /** The time window's end, in epoch milliseconds. Defaults to the last point's instant. */
54
+ readonly until?: number;
55
+ /** The reference lines drawn dashed across the chart — levels on the series' scale. */
56
+ readonly thresholds?: ReadonlyArray<SparklineThreshold>;
32
57
  /** The render style. Default `line`. */
33
58
  readonly variant?: SparklineVariant;
34
59
  /** The px width of the viewBox. Default `120`. */
@@ -53,11 +78,16 @@ declare const _default: import('vue').DefineComponent<SparklineProps, {
53
78
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SparklineProps> & Readonly<{}>, {
54
79
  readonly variant: SparklineVariant;
55
80
  readonly tone: SparklineTone;
81
+ readonly data: ReadonlyArray<number>;
56
82
  readonly height: number;
57
83
  readonly max: number;
58
84
  readonly min: number;
59
85
  readonly width: number;
86
+ readonly points: ReadonlyArray<SparklinePoint>;
60
87
  readonly isSkeleton: boolean;
88
+ readonly since: number;
89
+ readonly until: number;
90
+ readonly thresholds: ReadonlyArray<SparklineThreshold>;
61
91
  readonly hasLast: boolean;
62
92
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
63
93
  export default _default;
@@ -1 +1 @@
1
- export { default as Sparkline, SparklineTone, SparklineVariant, type SparklineProps } from './Sparkline.vue';
1
+ export { default as Sparkline, SparklineTone, SparklineVariant, type SparklinePoint, type SparklineProps, type SparklineThreshold, } from './Sparkline.vue';
@@ -47,9 +47,9 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<DataRegion
47
47
  onRetry?: (() => any) | undefined;
48
48
  }>, {
49
49
  readonly error: DataRegionError | null;
50
+ readonly isRefreshing: boolean;
50
51
  readonly isEmpty: boolean;
51
52
  readonly isFirstLoad: boolean;
52
- readonly isRefreshing: boolean;
53
53
  readonly hasData: boolean;
54
54
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
55
55
  /** The region's real layout — rendered as component skeletons on the first load. */
@@ -87,3 +87,4 @@ export * from './imageCropEditor';
87
87
  export * from './imageEditor';
88
88
  export * from './mentionInput';
89
89
  export * from './typedConfirmField';
90
+ export * from './rowsField';
@@ -1,6 +1,6 @@
1
1
  import { _, _ as _2, I, a, b, c, L, d, e } from "../../chunks/TypedConfirmField.vue_vue_type_script_setup_true_lang-DXCZlnlM.js";
2
2
  import { _ as _3 } from "../../chunks/PointControl.vue_vue_type_script_setup_true_lang-akWl2-sE.js";
3
- import { A, _ as _4, B, a as a2, b as b2, C, c as c2, d as d2, e as e2, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, D, E, F, G, H, I as I2, J, K, L as L2, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, $, a0, a1, a2 as a22, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2 as b22, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV } from "../../chunks/UseTypedConfirmation-CvY2T4Up.js";
3
+ import { A, _ as _4, B, a as a2, b as b2, C, c as c2, d as d2, e as e2, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, D, E, F, G, H, I as I2, J, K, L as L2, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, $, a0, a1, a2 as a22, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2 as b22, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW } from "../../chunks/RowsField.vue_vue_type_script_setup_true_lang-C0L-DjCW.js";
4
4
  import { _ as _5, C as C2 } from "../../chunks/ColorSwatchPreview.vue_vue_type_script_setup_true_lang-Btd7KUEw.js";
5
5
  import { ImageEditRecipeExtensions } from "../../domain/imageEditing/index.js";
6
6
  export {
@@ -134,64 +134,65 @@ export {
134
134
  a_ as RecurrenceEndMode,
135
135
  a$ as RecurrenceFreq,
136
136
  b0 as RecurrenceWeekday,
137
- b1 as SearchInput,
138
- b22 as SegmentedPicker,
139
- b3 as SelectPicker,
140
- b4 as SelectPickerContent,
141
- b5 as SelectPickerItem,
142
- b6 as SelectPickerSize,
143
- b7 as SelectPickerTrigger,
144
- b8 as SelectPickerValue,
145
- b9 as SignatureFormat,
146
- ba as SignatureInput,
147
- bb as SliderInput,
148
- bc as SortableGroup,
149
- bd as SortableGroupHandle,
150
- be as SortableGroupItem,
151
- bf as SortableGroupMoveButton,
152
- bg as SubmitTrigger,
153
- bh as SwitchField,
154
- bi as SwitchInput,
155
- bj as TagsInput,
156
- bk as TelInput,
157
- bl as TextAreaInput,
137
+ b1 as RowsField,
138
+ b22 as SearchInput,
139
+ b3 as SegmentedPicker,
140
+ b4 as SelectPicker,
141
+ b5 as SelectPickerContent,
142
+ b6 as SelectPickerItem,
143
+ b7 as SelectPickerSize,
144
+ b8 as SelectPickerTrigger,
145
+ b9 as SelectPickerValue,
146
+ ba as SignatureFormat,
147
+ bb as SignatureInput,
148
+ bc as SliderInput,
149
+ bd as SortableGroup,
150
+ be as SortableGroupHandle,
151
+ bf as SortableGroupItem,
152
+ bg as SortableGroupMoveButton,
153
+ bh as SubmitTrigger,
154
+ bi as SwitchField,
155
+ bj as SwitchInput,
156
+ bk as TagsInput,
157
+ bl as TelInput,
158
+ bm as TextAreaInput,
158
159
  d as TextInput,
159
- bm as TimeInput,
160
- bn as TimePicker,
161
- bo as TimezonePicker,
162
- bp as ToggleGroup,
163
- bq as ToggleGroupKey,
164
- br as ToggleGroupVariant,
165
- bs as ToggleInput,
166
- bt as ToggleInputElement,
167
- bu as ToggleInputVariant,
168
- bv as ToggleItemRole,
169
- bw as ToggleMode,
170
- bx as TransferPicker,
171
- by as TreeSelectPicker,
160
+ bn as TimeInput,
161
+ bo as TimePicker,
162
+ bp as TimezonePicker,
163
+ bq as ToggleGroup,
164
+ br as ToggleGroupKey,
165
+ bs as ToggleGroupVariant,
166
+ bt as ToggleInput,
167
+ bu as ToggleInputElement,
168
+ bv as ToggleInputVariant,
169
+ bw as ToggleItemRole,
170
+ bx as ToggleMode,
171
+ by as TransferPicker,
172
+ bz as TreeSelectPicker,
172
173
  e as TypedConfirmField,
173
- bz as UrlInput,
174
- bA as WizardForm,
175
- bB as WizardFormFooter,
176
- bC as WizardFormStep,
177
- bD as WizardFormSteps,
178
- bE as YearPicker,
179
- bF as controlGroupVariants,
180
- bG as gradientToCss,
181
- bH as optionTileGroupVariants,
182
- bI as optionTileVariants,
183
- bJ as resolveElementSize,
184
- bK as selectTriggerVariants,
185
- bL as toggleButtonVariants,
186
- bM as useCheckboxGroup,
187
- bN as useComboboxContext,
188
- bO as useEditableContext,
189
- bP as useEmojiPicker,
190
- bQ as useMultiSelectContext,
191
- bR as useRadioGroup,
192
- bS as useSortableItem,
193
- bT as useSortableRoot,
194
- bU as useTypedConfirmation,
195
- bV as useWizard
174
+ bA as UrlInput,
175
+ bB as WizardForm,
176
+ bC as WizardFormFooter,
177
+ bD as WizardFormStep,
178
+ bE as WizardFormSteps,
179
+ bF as YearPicker,
180
+ bG as controlGroupVariants,
181
+ bH as gradientToCss,
182
+ bI as optionTileGroupVariants,
183
+ bJ as optionTileVariants,
184
+ bK as resolveElementSize,
185
+ bL as selectTriggerVariants,
186
+ bM as toggleButtonVariants,
187
+ bN as useCheckboxGroup,
188
+ bO as useComboboxContext,
189
+ bP as useEditableContext,
190
+ bQ as useEmojiPicker,
191
+ bR as useMultiSelectContext,
192
+ bS as useRadioGroup,
193
+ bT as useSortableItem,
194
+ bU as useSortableRoot,
195
+ bV as useTypedConfirmation,
196
+ bW as useWizard
196
197
  };
197
198
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,56 @@
1
+ /** Defines one column of a rows field: the record key its cells edit and the heading over them. */
2
+ export interface RowsFieldColumn {
3
+ /** The record key the column's cells edit; it keys the cell slot. */
4
+ readonly key: string;
5
+ /** The heading over the column, and the label over each cell on phones. */
6
+ readonly label: string;
7
+ }
8
+ /** Defines one rendered row — a stable `key` for identity through reorder plus its live index (`FieldArrayRow`). */
9
+ export interface RowsFieldRow {
10
+ /** The row's stable identity. */
11
+ readonly key: string;
12
+ /** The row's current position in the list. */
13
+ readonly index: number;
14
+ }
15
+ /** Defines props for the field that edits a list of records, a row of cells each. */
16
+ export interface RowsFieldProps {
17
+ /** The list's legend. */
18
+ readonly label: string;
19
+ /** The columns, left to right. */
20
+ readonly columns: ReadonlyArray<RowsFieldColumn>;
21
+ /** The rows to render — `useFieldArray(form, path).rows` in a form. */
22
+ readonly rows: ReadonlyArray<RowsFieldRow>;
23
+ /** The add control's text. Default `"Add row"`, localized. */
24
+ readonly addLabel?: string;
25
+ /** The remove control's name; `{row}` marks the row's 1-based number. Default `"Remove row {row}"`, localized. */
26
+ readonly removeLabel?: string;
27
+ /** The list's own refusals — too few rows, a duplicate — shown under the rows. */
28
+ readonly errors?: ReadonlyArray<string>;
29
+ /** Disables the add and remove controls. */
30
+ readonly isDisabled?: boolean;
31
+ }
32
+ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<RowsFieldProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
33
+ add: () => any;
34
+ remove: (index: number) => any;
35
+ }, string, import('vue').PublicProps, Readonly<RowsFieldProps> & Readonly<{
36
+ onAdd?: (() => any) | undefined;
37
+ onRemove?: ((index: number) => any) | undefined;
38
+ }>, {
39
+ readonly errors: ReadonlyArray<string>;
40
+ readonly isDisabled: boolean;
41
+ readonly removeLabel: string;
42
+ readonly addLabel: string;
43
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
44
+ /** One cell's input; `label` is its accessible name, the column heading plus the row number. */
45
+ cell(props: {
46
+ row: RowsFieldRow;
47
+ column: RowsFieldColumn;
48
+ label: string;
49
+ }): unknown;
50
+ }>;
51
+ export default _default;
52
+ type __VLS_WithSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
@@ -0,0 +1 @@
1
+ export { default as RowsField, type RowsFieldColumn, type RowsFieldProps, type RowsFieldRow } from './RowsField.vue';
@@ -1,5 +1,5 @@
1
1
  import { P, _ } from "../../chunks/TourPopover.vue_vue_type_script_setup_true_lang-BlajHcdp.js";
2
- import { _ as _2, a, b, c, d, e, f, c as c2, d as d2, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p, q, r, h as h2, s, t, u, r as r2, h as h3, s as s2, t as t2, v, w, x, y, z, A, r as r3, h as h4, s as s3, t as t3, u as u2, B, C, D, E, F, G } from "../../chunks/TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js";
2
+ import { _ as _2, a, b, c, d, e, f, c as c2, d as d2, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p, q, r, h as h2, s, t, u, r as r2, h as h3, s as s2, t as t2, v, w, x, y, z, A, r as r3, h as h4, s as s3, t as t3, u as u2, B, C, D, E, F, G } from "../../chunks/TypedConfirmModal.vue_vue_type_script_setup_true_lang-3Sdgh0cV.js";
3
3
  import { _ as _3, B as B2 } from "../../chunks/BackdropOverlay.vue_vue_type_script_setup_true_lang-BsjQoWDM.js";
4
4
  import { _ as _4, a as a2, b as b2, c as c3, _ as _5, b as b3, _ as _6, a as a3, b as b4, c as c4, M, d as d3, e as e3, _ as _7 } from "../../chunks/OverlayCloseButton.vue_vue_type_script_setup_true_lang-D0f_usZ9.js";
5
5
  import { _ as _8, a as a4, D as D2 } from "../../chunks/DrawerContent.vue_vue_type_script_setup_true_lang-ClhduLMN.js";
@@ -1,5 +1,8 @@
1
1
  import { ColorTone } from '../../../foundation/styles';
2
- /** Defines props for the blocking dialog that runs a dangerous action once the reader types its target's ID. */
2
+ /**
3
+ * Defines props for the blocking dialog that runs a dangerous action once the reader confirms it — by typing its
4
+ * target's ID when `expected` is set, by pressing the action alone when it is not.
5
+ */
3
6
  export interface TypedConfirmModalProps {
4
7
  /** The open state, controlled. The `v-model:open` binding target. */
5
8
  readonly open?: boolean;
@@ -9,8 +12,16 @@ export interface TypedConfirmModalProps {
9
12
  readonly title: string;
10
13
  /** The consequence spelled out under the title. The `description` slot is the rich override. */
11
14
  readonly description?: string;
12
- /** The exact text the reader types to enable the action — the target's ID or name. */
13
- readonly expected: string;
15
+ /**
16
+ * The exact text the reader types to enable the action — the target's ID or name. Omit it for a plain confirm with
17
+ * no typed field: the same dialog asks once, so one call site serves a guarded and an unguarded target.
18
+ */
19
+ readonly expected?: string;
20
+ /**
21
+ * Whether the action may run, beside the typed match — `false` while a required input in the default slot, such as
22
+ * a reason, is still empty. Default `true`.
23
+ */
24
+ readonly canConfirm?: boolean;
14
25
  /** The field's label template; `{expected}` marks the expected text. Default `TypedConfirmField`'s. */
15
26
  readonly label?: string;
16
27
  /** The helper beneath the field. */
@@ -24,7 +35,8 @@ export interface TypedConfirmModalProps {
24
35
  /** The confirm button tone. Default `danger`. */
25
36
  readonly tone?: ColorTone;
26
37
  /**
27
- * Runs with the typed text once the reader confirms — send it as the API's `confirm`. Returning a promise keeps the
38
+ * Runs with the typed text once the reader confirms — send it as the API's `confirm`; the text is empty without
39
+ * `expected`. Returning a promise keeps the
28
40
  * dialog open with a busy confirm button until it settles. The dialog closes on success and stays open, emitting
29
41
  * `error`, when it throws, rejects or settles to a failed `Result`.
30
42
  *
@@ -50,11 +62,15 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<TypedConfi
50
62
  readonly description: string;
51
63
  readonly defaultOpen: boolean;
52
64
  readonly onConfirm: (typed: string) => unknown;
65
+ readonly expected: string;
66
+ readonly canConfirm: boolean;
53
67
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
54
68
  /** What the reader weighs before confirming — facts, risks, a reason field — above the typed field. */
55
69
  default?(): unknown;
56
70
  /** The rich override for the `description` prop. */
57
71
  description?(): unknown;
72
+ /** The confirm button's leading icon. */
73
+ 'confirm-icon'?(): unknown;
58
74
  }>;
59
75
  export default _default;
60
76
  type __VLS_WithSlots<T, S> = T & {
@@ -0,0 +1,28 @@
1
+ import { ComputedRef, MaybeRefOrGetter } from 'vue';
2
+ /** Defines a list-detail page's selection, held in URL query keys so the browser's back button closes the detail. */
3
+ export interface ListDetailRoute {
4
+ /** True while any of the detail keys is in the URL — bind it to `ListDetailLayout`'s `isDetailOpen`. */
5
+ readonly isDetailOpen: ComputedRef<boolean>;
6
+ /** Reads one query key's value — a repeated key's first — or `null` when the URL has none. */
7
+ readonly read: (key: string) => string | null;
8
+ /**
9
+ * Writes query keys, keeping every other parameter; `null` removes a key. Opening a detail adds a history entry,
10
+ * so Back returns to the list; switching between details replaces it, so Back never walks through them.
11
+ */
12
+ readonly select: (values: Readonly<Record<string, string | null>>) => Promise<unknown>;
13
+ /**
14
+ * Returns to the list — bind it to `ListDetailLayout`'s `back`. It steps back when the list is the previous history
15
+ * entry, so a later Forward reopens the detail; otherwise, after a deep link, it navigates to the list.
16
+ */
17
+ readonly back: () => void;
18
+ }
19
+ /**
20
+ * Drives a `ListDetailLayout` from the route's query: `keys` are the parameters that name the open detail, such as
21
+ * `['vault', 'namespace']`. The layout's back control, the browser's Back and a deep link then all agree.
22
+ * ```ts
23
+ * const selection = useListDetailRoute(['namespace']);
24
+ * // <ListDetailLayout :is-detail-open="selection.isDetailOpen.value" @back="selection.back">
25
+ * selection.select({ namespace: slug });
26
+ * ```
27
+ */
28
+ export declare function useListDetailRoute(keys: MaybeRefOrGetter<ReadonlyArray<string>>): ListDetailRoute;
@@ -16,6 +16,7 @@ export { useRouteNavigating } from './hooks/UseRouteNavigating';
16
16
  export { definePath } from '../../Paths';
17
17
  export type { PathBuilder, PathBuilderArgs, PathParamName, PathParams } from '../../Paths';
18
18
  export { useTypedSearchParams, type TypedSearchParams } from './hooks/UseTypedSearchParams';
19
+ export { useListDetailRoute, type ListDetailRoute } from './hooks/UseListDetailRoute';
19
20
  export { requireAuth, buildReturnTo, resolveReturnTo, useReturnTo, signInRedirect, type ReturnToSource, } from './Guards';
20
21
  export { default as AppLink, type AppLinkProps } from './appLink/AppLink.vue';
21
22
  export { default as AppNavLink, type AppNavLinkProps } from './appNavLink/AppNavLink.vue';
@@ -723,6 +723,39 @@ function useTypedSearchParams(defaults) {
723
723
  };
724
724
  return { values, setValues };
725
725
  }
726
+ function useListDetailRoute(keys) {
727
+ const route = useRoute();
728
+ const router = useRouter();
729
+ function read(key) {
730
+ const raw = route.query[key];
731
+ const value = Array.isArray(raw) ? raw[0] : raw;
732
+ return typeof value === "string" ? value : null;
733
+ }
734
+ const isDetailOpen = computed(() => toValue(keys).some((key) => read(key) !== null));
735
+ function queryWith(values) {
736
+ const query = { ...route.query };
737
+ for (const [key, value] of Object.entries(values)) {
738
+ if (value === null) delete query[key];
739
+ else query[key] = value;
740
+ }
741
+ return query;
742
+ }
743
+ function select(values) {
744
+ const location = { path: route.path, query: queryWith(values), hash: route.hash };
745
+ return isDetailOpen.value ? router.replace(location) : router.push(location);
746
+ }
747
+ function back() {
748
+ const list = {
749
+ path: route.path,
750
+ query: queryWith(Object.fromEntries(toValue(keys).map((key) => [key, null]))),
751
+ hash: route.hash
752
+ };
753
+ const previous = router.options.history.state["back"];
754
+ if (typeof previous === "string" && previous === router.resolve(list).fullPath) router.back();
755
+ else void router.push(list);
756
+ }
757
+ return { isDetailOpen, read, select, back };
758
+ }
726
759
  const prefetched = /* @__PURE__ */ new WeakSet();
727
760
  function prefetch(importer) {
728
761
  if (prefetched.has(importer)) return;
@@ -943,6 +976,7 @@ export {
943
976
  resolveReturnTo,
944
977
  signInRedirect,
945
978
  useBreadcrumbs,
979
+ useListDetailRoute,
946
980
  useNavigationBlocker,
947
981
  u as useNavigationProgress,
948
982
  usePrefetch,