@wow-two-beta/fe 0.0.32 → 0.0.34

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 (73) hide show
  1. package/dist/chunks/Alert.vue_vue_type_script_setup_true_lang-CoLxB2dM.js +155 -0
  2. package/dist/chunks/Alert.vue_vue_type_script_setup_true_lang-CoLxB2dM.js.map +1 -0
  3. 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
  4. package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-DHSpEajG.js.map +1 -0
  5. package/dist/chunks/{FieldHelperText.vue_vue_type_script_setup_true_lang-B-G5rNMG.js → ColorSwatchPreview.vue_vue_type_script_setup_true_lang-Btd7KUEw.js} +70 -230
  6. package/dist/chunks/ColorSwatchPreview.vue_vue_type_script_setup_true_lang-Btd7KUEw.js.map +1 -0
  7. package/dist/chunks/{ErrorBoundary.vue_vue_type_script_setup_true_lang-Dv9wOZmk.js → ErrorBoundary.vue_vue_type_script_setup_true_lang-E72RRrNG.js} +87 -233
  8. package/dist/chunks/ErrorBoundary.vue_vue_type_script_setup_true_lang-E72RRrNG.js.map +1 -0
  9. package/dist/chunks/FieldHelperText.vue_vue_type_script_setup_true_lang-2IDI_JgQ.js +216 -0
  10. package/dist/chunks/FieldHelperText.vue_vue_type_script_setup_true_lang-2IDI_JgQ.js.map +1 -0
  11. package/dist/chunks/{KanbanCard.vue_vue_type_script_setup_true_lang-DKgIhFwh.js → KanbanCard.vue_vue_type_script_setup_true_lang-akNFA0JK.js} +390 -203
  12. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-akNFA0JK.js.map +1 -0
  13. package/dist/chunks/MasonryLayout.vue_vue_type_script_setup_true_lang-BmWwoZrv.js.map +1 -1
  14. package/dist/chunks/{MentionInput.vue_vue_type_script_setup_true_lang-D8Ja7QjX.js → RowsField.vue_vue_type_script_setup_true_lang-C0L-DjCW.js} +939 -1063
  15. package/dist/chunks/RowsField.vue_vue_type_script_setup_true_lang-C0L-DjCW.js.map +1 -0
  16. package/dist/chunks/TypedConfirmField.vue_vue_type_script_setup_true_lang-DXCZlnlM.js +447 -0
  17. package/dist/chunks/TypedConfirmField.vue_vue_type_script_setup_true_lang-DXCZlnlM.js.map +1 -0
  18. package/dist/chunks/{LightboxModal.vue_vue_type_script_setup_true_lang-CP7Or4sf.js → TypedConfirmModal.vue_vue_type_script_setup_true_lang-3Sdgh0cV.js} +313 -109
  19. package/dist/chunks/TypedConfirmModal.vue_vue_type_script_setup_true_lang-3Sdgh0cV.js.map +1 -0
  20. package/dist/foundation/device/hooks/UseBreakpointRange.d.ts +21 -0
  21. package/dist/foundation/device/index.d.ts +1 -0
  22. package/dist/foundation/device/index.js +13 -0
  23. package/dist/foundation/device/index.js.map +1 -1
  24. package/dist/foundation/http/ApiDecoderExtensions.d.ts +22 -0
  25. package/dist/foundation/http/ApiFailureExtensions.d.ts +22 -0
  26. package/dist/foundation/http/ProblemDetailsExtensions.d.ts +31 -0
  27. package/dist/foundation/http/index.d.ts +3 -0
  28. package/dist/foundation/http/index.js +93 -2
  29. package/dist/foundation/http/index.js.map +1 -1
  30. package/dist/index.js +642 -633
  31. package/dist/index.js.map +1 -1
  32. package/dist/presentation/actions/index.d.ts +1 -0
  33. package/dist/presentation/actions/index.js +12 -11
  34. package/dist/presentation/actions/refreshButton/RefreshButton.vue.d.ts +26 -0
  35. package/dist/presentation/actions/refreshButton/index.d.ts +1 -0
  36. package/dist/presentation/display/badge/Badge.variants.d.ts +77 -10
  37. package/dist/presentation/display/badge/Badge.vue.d.ts +18 -1
  38. package/dist/presentation/display/badge/index.d.ts +1 -1
  39. package/dist/presentation/display/card/CardLink.vue.d.ts +19 -0
  40. package/dist/presentation/display/card/index.d.ts +1 -0
  41. package/dist/presentation/display/index.js +63 -60
  42. package/dist/presentation/display/index.js.map +1 -1
  43. package/dist/presentation/display/listGroup/ListGroupItem.vue.d.ts +17 -0
  44. package/dist/presentation/display/sparkline/Sparkline.vue.d.ts +32 -2
  45. package/dist/presentation/display/sparkline/index.d.ts +1 -1
  46. package/dist/presentation/feedback/dataRegion/DataRegion.vue.d.ts +1 -1
  47. package/dist/presentation/feedback/index.js +43 -42
  48. package/dist/presentation/feedback/index.js.map +1 -1
  49. package/dist/presentation/forms/index.d.ts +2 -0
  50. package/dist/presentation/forms/index.js +140 -137
  51. package/dist/presentation/forms/rowsField/RowsField.vue.d.ts +56 -0
  52. package/dist/presentation/forms/rowsField/index.d.ts +1 -0
  53. package/dist/presentation/forms/tagsInput/TagsInput.vue.d.ts +1 -1
  54. package/dist/presentation/forms/typedConfirmField/TypedConfirmField.vue.d.ts +61 -0
  55. package/dist/presentation/forms/typedConfirmField/UseTypedConfirmation.d.ts +32 -0
  56. package/dist/presentation/forms/typedConfirmField/index.d.ts +2 -0
  57. package/dist/presentation/overlays/index.d.ts +1 -0
  58. package/dist/presentation/overlays/index.js +6 -5
  59. package/dist/presentation/overlays/typedConfirmModal/TypedConfirmModal.vue.d.ts +80 -0
  60. package/dist/presentation/overlays/typedConfirmModal/index.d.ts +1 -0
  61. package/dist/router/adapters/vueRouter/hooks/UseListDetailRoute.d.ts +28 -0
  62. package/dist/router/adapters/vueRouter/index.d.ts +1 -0
  63. package/dist/router/index.js +34 -0
  64. package/dist/router/index.js.map +1 -1
  65. package/package.json +1 -1
  66. package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-dmN5MH2T.js.map +0 -1
  67. package/dist/chunks/ErrorBoundary.vue_vue_type_script_setup_true_lang-Dv9wOZmk.js.map +0 -1
  68. package/dist/chunks/FieldHelperText.vue_vue_type_script_setup_true_lang-B-G5rNMG.js.map +0 -1
  69. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-DKgIhFwh.js.map +0 -1
  70. package/dist/chunks/LightboxModal.vue_vue_type_script_setup_true_lang-CP7Or4sf.js.map +0 -1
  71. package/dist/chunks/ListboxPicker.variants-hiMcl66_.js +0 -44
  72. package/dist/chunks/ListboxPicker.variants-hiMcl66_.js.map +0 -1
  73. package/dist/chunks/MentionInput.vue_vue_type_script_setup_true_lang-D8Ja7QjX.js.map +0 -1
@@ -0,0 +1,80 @@
1
+ import { ColorTone } from '../../../foundation/styles';
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
+ */
6
+ export interface TypedConfirmModalProps {
7
+ /** The open state, controlled. The `v-model:open` binding target. */
8
+ readonly open?: boolean;
9
+ /** The initial open state when uncontrolled. Default `false`. */
10
+ readonly defaultOpen?: boolean;
11
+ /** The question the dialog asks — it names the dialog. */
12
+ readonly title: string;
13
+ /** The consequence spelled out under the title. The `description` slot is the rich override. */
14
+ readonly description?: 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;
25
+ /** The field's label template; `{expected}` marks the expected text. Default `TypedConfirmField`'s. */
26
+ readonly label?: string;
27
+ /** The helper beneath the field. */
28
+ readonly helper?: string;
29
+ /** The refusal shown under the field — the reason the API gave for the last failed confirm. */
30
+ readonly error?: string;
31
+ /** The confirm button text. Default `"Confirm"`, localized. */
32
+ readonly confirmLabel?: string;
33
+ /** The cancel button text. Default `"Cancel"`, localized. */
34
+ readonly cancelLabel?: string;
35
+ /** The confirm button tone. Default `danger`. */
36
+ readonly tone?: ColorTone;
37
+ /**
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
40
+ * dialog open with a busy confirm button until it settles. The dialog closes on success and stays open, emitting
41
+ * `error`, when it throws, rejects or settles to a failed `Result`.
42
+ *
43
+ * Kept a PROP, not an emit: the dialog awaits what it RETURNS, which an emit cannot carry. `@confirm` binds it all
44
+ * the same.
45
+ */
46
+ readonly onConfirm?: (typed: string) => unknown;
47
+ }
48
+ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<TypedConfirmModalProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
49
+ error: (error: unknown) => any;
50
+ cancel: () => any;
51
+ "update:open": (open: boolean) => any;
52
+ }, string, import('vue').PublicProps, Readonly<TypedConfirmModalProps> & Readonly<{
53
+ onError?: ((error: unknown) => any) | undefined;
54
+ onCancel?: (() => any) | undefined;
55
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
56
+ }>, {
57
+ readonly open: boolean;
58
+ readonly tone: ColorTone;
59
+ readonly label: string;
60
+ readonly error: string;
61
+ readonly helper: string;
62
+ readonly description: string;
63
+ readonly defaultOpen: boolean;
64
+ readonly onConfirm: (typed: string) => unknown;
65
+ readonly expected: string;
66
+ readonly canConfirm: boolean;
67
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
68
+ /** What the reader weighs before confirming — facts, risks, a reason field — above the typed field. */
69
+ default?(): unknown;
70
+ /** The rich override for the `description` prop. */
71
+ description?(): unknown;
72
+ /** The confirm button's leading icon. */
73
+ 'confirm-icon'?(): unknown;
74
+ }>;
75
+ export default _default;
76
+ type __VLS_WithSlots<T, S> = T & {
77
+ new (): {
78
+ $slots: S;
79
+ };
80
+ };
@@ -0,0 +1 @@
1
+ export { default as TypedConfirmModal, type TypedConfirmModalProps } from './TypedConfirmModal.vue';
@@ -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,