@leavepulse/ui 0.42.0 → 0.43.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 (155) hide show
  1. package/dist/assets/{LpCommandPalette-Esv0a-gS.css → LpCommandPalette-s_kKuCRf.css} +21 -21
  2. package/dist/chunks/{LpAddressInput-CMjaPQVw.js → LpAddressInput-B-Zvxsn7.js} +1 -1
  3. package/dist/chunks/{LpAppShell-Bcv6EhqU.js → LpAppShell-BGQVIY-3.js} +1 -1
  4. package/dist/chunks/{LpConfirmDialog-BNAvOR24.js → LpConfirmDialog-Q-bxff8z.js} +1 -1
  5. package/dist/chunks/{LpDrawer-DgaS2s2i.js → LpDrawer-BZ6k3hvo.js} +3 -3
  6. package/dist/chunks/{LpLightbox-oLqyjOln.js → LpLightbox-2sYVMY-S.js} +12 -4
  7. package/dist/chunks/{LpMediaGallery-Cid7PGYx.js → LpMediaGallery-FF-NquIo.js} +1 -1
  8. package/dist/chunks/{LpModal-8bja5bWS.js → LpModal-Bt0pQCI_.js} +2 -2
  9. package/dist/chunks/{LpModalNav-w9kfwHqO.js → LpModalNav-YaifHrXC.js} +2 -2
  10. package/dist/chunks/{LpSidebar-DlTn5nXc.js → LpSidebar-ClBUwoEz.js} +1 -1
  11. package/dist/components/LpAddressInput.vue.js +1 -1
  12. package/dist/components/LpAppShell.vue.js +1 -1
  13. package/dist/components/LpCommandPalette.vue.js +19 -72
  14. package/dist/components/LpConfirmDialog.vue.js +1 -1
  15. package/dist/components/LpDrawer.vue.js +1 -1
  16. package/dist/components/LpLightbox.vue.js +1 -1
  17. package/dist/components/LpMediaGallery.vue.js +1 -1
  18. package/dist/components/LpModal.vue.js +1 -1
  19. package/dist/components/LpModalNav.vue.js +1 -1
  20. package/dist/components/LpShortcutsDialog.vue.js +1 -1
  21. package/dist/components/LpSidebar.vue.js +1 -1
  22. package/dist/components/commandSearch.js +66 -0
  23. package/dist/components/modalDepth.js +3 -2
  24. package/dist/index.js +13 -9
  25. package/package.json +3 -3
  26. package/src/components/LpCommandPalette.vue +18 -110
  27. package/src/components/LpDrawer.vue +3 -3
  28. package/src/components/LpLightbox.vue +11 -5
  29. package/src/components/LpModal.vue +2 -2
  30. package/src/components/commandSearch.ts +92 -0
  31. package/src/components/modalDepth.ts +4 -48
  32. package/src/index.ts +2 -0
  33. package/src/tokens/tokens.css +13 -19
  34. package/dist/component-names.d.ts +0 -1
  35. package/dist/components/LayoutCanvas.vue.d.ts +0 -28
  36. package/dist/components/LayoutNode.vue.d.ts +0 -40
  37. package/dist/components/LpActionBar.vue.d.ts +0 -84
  38. package/dist/components/LpAddressInput.vue.d.ts +0 -70
  39. package/dist/components/LpAlert.vue.d.ts +0 -44
  40. package/dist/components/LpAppShell.vue.d.ts +0 -123
  41. package/dist/components/LpAutocomplete.vue.d.ts +0 -50
  42. package/dist/components/LpAvatar.vue.d.ts +0 -34
  43. package/dist/components/LpBadge.vue.d.ts +0 -20
  44. package/dist/components/LpBreadcrumbs.vue.d.ts +0 -32
  45. package/dist/components/LpButton.vue.d.ts +0 -113
  46. package/dist/components/LpCalendar.vue.d.ts +0 -29
  47. package/dist/components/LpCard.vue.d.ts +0 -60
  48. package/dist/components/LpChart.vue.d.ts +0 -130
  49. package/dist/components/LpCheckbox.vue.d.ts +0 -32
  50. package/dist/components/LpCodeBlock.vue.d.ts +0 -58
  51. package/dist/components/LpColorPicker.vue.d.ts +0 -124
  52. package/dist/components/LpCommandPalette.vue.d.ts +0 -206
  53. package/dist/components/LpConfirmDialog.vue.d.ts +0 -59
  54. package/dist/components/LpContextMenu.vue.d.ts +0 -44
  55. package/dist/components/LpDatePicker.vue.d.ts +0 -33
  56. package/dist/components/LpDisclosure.vue.d.ts +0 -47
  57. package/dist/components/LpDivider.vue.d.ts +0 -17
  58. package/dist/components/LpDrawer.vue.d.ts +0 -170
  59. package/dist/components/LpDropdownMenu.vue.d.ts +0 -23
  60. package/dist/components/LpDropzone.vue.d.ts +0 -90
  61. package/dist/components/LpEmptyState.vue.d.ts +0 -28
  62. package/dist/components/LpFileTree.vue.d.ts +0 -126
  63. package/dist/components/LpFileTreeNode.vue.d.ts +0 -62
  64. package/dist/components/LpFormField.vue.d.ts +0 -24
  65. package/dist/components/LpIcon.vue.d.ts +0 -8
  66. package/dist/components/LpImageEditor.vue.d.ts +0 -106
  67. package/dist/components/LpInfraNode.vue.d.ts +0 -65
  68. package/dist/components/LpInput.vue.d.ts +0 -80
  69. package/dist/components/LpLaneNode.vue.d.ts +0 -24
  70. package/dist/components/LpLightbox.vue.d.ts +0 -62
  71. package/dist/components/LpLink.vue.d.ts +0 -93
  72. package/dist/components/LpLogViewer.vue.d.ts +0 -153
  73. package/dist/components/LpMapPicker.vue.d.ts +0 -59
  74. package/dist/components/LpMediaGallery.vue.d.ts +0 -80
  75. package/dist/components/LpModal.vue.d.ts +0 -66
  76. package/dist/components/LpModalNav.vue.d.ts +0 -66
  77. package/dist/components/LpNotificationBell.vue.d.ts +0 -85
  78. package/dist/components/LpNumberField.vue.d.ts +0 -21
  79. package/dist/components/LpNumberFlow.vue.d.ts +0 -35
  80. package/dist/components/LpOtpInput.vue.d.ts +0 -39
  81. package/dist/components/LpPagination.vue.d.ts +0 -35
  82. package/dist/components/LpPasswordInput.vue.d.ts +0 -36
  83. package/dist/components/LpPhoneInput.vue.d.ts +0 -49
  84. package/dist/components/LpPie.vue.d.ts +0 -196
  85. package/dist/components/LpPopover.vue.d.ts +0 -34
  86. package/dist/components/LpProgress.vue.d.ts +0 -66
  87. package/dist/components/LpRadio.vue.d.ts +0 -18
  88. package/dist/components/LpRadioGroup.vue.d.ts +0 -26
  89. package/dist/components/LpRollingText.vue.d.ts +0 -33
  90. package/dist/components/LpScrollArea.vue.d.ts +0 -28
  91. package/dist/components/LpSection.vue.d.ts +0 -120
  92. package/dist/components/LpSegmented.vue.d.ts +0 -30
  93. package/dist/components/LpSelect.vue.d.ts +0 -47
  94. package/dist/components/LpServiceNode.vue.d.ts +0 -14
  95. package/dist/components/LpShift.vue.d.ts +0 -36
  96. package/dist/components/LpShortcutsDialog.vue.d.ts +0 -24
  97. package/dist/components/LpSidebar.vue.d.ts +0 -146
  98. package/dist/components/LpSidebarNav.vue.d.ts +0 -54
  99. package/dist/components/LpSkeleton.vue.d.ts +0 -16
  100. package/dist/components/LpSlider.vue.d.ts +0 -30
  101. package/dist/components/LpSparkline.vue.d.ts +0 -48
  102. package/dist/components/LpStat.vue.d.ts +0 -69
  103. package/dist/components/LpStepper.vue.d.ts +0 -36
  104. package/dist/components/LpSwitch.vue.d.ts +0 -42
  105. package/dist/components/LpTable.vue.d.ts +0 -124
  106. package/dist/components/LpTableOfContents.vue.d.ts +0 -19
  107. package/dist/components/LpTabs.vue.d.ts +0 -47
  108. package/dist/components/LpTextarea.vue.d.ts +0 -22
  109. package/dist/components/LpThemeSwitcher.vue.d.ts +0 -47
  110. package/dist/components/LpTilt.vue.d.ts +0 -31
  111. package/dist/components/LpTimeField.vue.d.ts +0 -24
  112. package/dist/components/LpToaster.vue.d.ts +0 -3
  113. package/dist/components/LpTooltip.vue.d.ts +0 -58
  114. package/dist/components/LpTopologyCanvas.vue.d.ts +0 -205
  115. package/dist/components/LpUptimeBar.vue.d.ts +0 -46
  116. package/dist/components/LpWaypointEdge.vue.d.ts +0 -21
  117. package/dist/components/actionBar.d.ts +0 -19
  118. package/dist/components/address.d.ts +0 -107
  119. package/dist/components/chart.d.ts +0 -180
  120. package/dist/components/codeHighlight.d.ts +0 -8
  121. package/dist/components/color.d.ts +0 -65
  122. package/dist/components/countries-data.d.ts +0 -2
  123. package/dist/components/countries.d.ts +0 -20
  124. package/dist/components/dropdown.d.ts +0 -29
  125. package/dist/components/fileTree.d.ts +0 -79
  126. package/dist/components/lightbox.d.ts +0 -24
  127. package/dist/components/modalDepth.d.ts +0 -15
  128. package/dist/components/sidebar.d.ts +0 -42
  129. package/dist/composables/easing.d.ts +0 -46
  130. package/dist/composables/useAsyncTask.d.ts +0 -18
  131. package/dist/composables/useClipboard.d.ts +0 -46
  132. package/dist/composables/useFormDraft.d.ts +0 -67
  133. package/dist/composables/useGlass.d.ts +0 -9
  134. package/dist/composables/useHotkeys.d.ts +0 -101
  135. package/dist/composables/useInputFilter.d.ts +0 -14
  136. package/dist/composables/useMergedClass.d.ts +0 -42
  137. package/dist/composables/usePillTransition.d.ts +0 -21
  138. package/dist/composables/useReveal.d.ts +0 -26
  139. package/dist/composables/useRovingFocus.d.ts +0 -49
  140. package/dist/composables/useSettled.d.ts +0 -26
  141. package/dist/composables/useShift.d.ts +0 -35
  142. package/dist/composables/useTilt.d.ts +0 -23
  143. package/dist/composables/useToast.d.ts +0 -41
  144. package/dist/composables/useZoomPan.d.ts +0 -58
  145. package/dist/icons.d.ts +0 -1
  146. package/dist/index.d.ts +0 -160
  147. package/dist/layout/registry.d.ts +0 -26
  148. package/dist/layout/tree.d.ts +0 -75
  149. package/dist/layout/useLayout.d.ts +0 -39
  150. package/dist/theme/backdrop.d.ts +0 -9
  151. package/dist/theme/config.d.ts +0 -16
  152. package/dist/theme/define.d.ts +0 -12
  153. package/dist/theme/presets.d.ts +0 -20
  154. package/dist/theme/tokens.d.ts +0 -75
  155. package/dist/theme/useTheme.d.ts +0 -46
@@ -1,101 +0,0 @@
1
- import { MaybeRefOrGetter } from 'vue';
2
- export interface HotkeyBinding {
3
- /** Layout-produced key, compared case-insensitively ("l", "f2", "escape"). */
4
- key: string;
5
- /**
6
- * Physical key position ("KeyL", "F2", "Digit1"). Matches on its own, which
7
- * is what makes non-Latin layouts work.
8
- */
9
- code?: string;
10
- /** Ctrl on Windows/Linux, ⌘ on macOS — the two are treated as one. */
11
- ctrl?: boolean;
12
- shift?: boolean;
13
- alt?: boolean;
14
- /**
15
- * Runs even while a text field has focus. Only for shortcuts that mean
16
- * something there — Escape, and the palette the user reaches from anywhere.
17
- */
18
- allowInInput?: boolean;
19
- /**
20
- * How the key reference lists this binding while it is mounted. Bindings
21
- * without it still work, they just stay out of `activeShortcuts`.
22
- */
23
- help?: HotkeyHelp;
24
- /**
25
- * Returning `false` declines the key: the event keeps its default and the
26
- * search moves on. This is what lets a binding defer to a layer that owns the
27
- * key better than it does — Escape belongs to whichever overlay is on top,
28
- * and swallowing it here would close all of them. The event is passed for
29
- * the checks only it can answer: where the focus is, whether an inner
30
- * control already took the key.
31
- */
32
- handler: (event: KeyboardEvent) => void | boolean;
33
- }
34
- export interface HotkeyHelp {
35
- /** Section of the reference the entry goes under. */
36
- group: string;
37
- label: string;
38
- /**
39
- * Written the way it reads, "+"-separated. Defaults to one built from the
40
- * binding; set it where the binding is not the whole story, such as the
41
- * second key of a chord ("G+D") or a key that needs Shift to type ("?").
42
- */
43
- combo?: string;
44
- }
45
- export interface ShortcutEntry {
46
- /** Rendered one <kbd> per "+"-separated key, so write it the way it reads. */
47
- combo: string;
48
- label: string;
49
- }
50
- export interface ShortcutGroup {
51
- title: string;
52
- entries: ShortcutEntry[];
53
- }
54
- /**
55
- * Whether this machine prints ⌘ where the rest print Ctrl. Read once: the
56
- * keyboard does not change under a running window, and the check is only ever
57
- * used to pick a label.
58
- */
59
- export declare const isAppleKeyboard: boolean;
60
- /**
61
- * The symbol to print for a modifier on this platform. Bindings treat Ctrl and
62
- * Meta as one modifier, so only the label may differ — never the binding.
63
- */
64
- export declare function appleModifierLabel(key: string): string;
65
- /**
66
- * Bind a list of hotkeys for as long as the calling component is mounted.
67
- *
68
- * The list is read on every keystroke rather than captured once, so bindings
69
- * may come and go with the state that owns them — a getter is the point, not a
70
- * formality.
71
- */
72
- export interface UseHotkeysOptions {
73
- enabled?: MaybeRefOrGetter<boolean>;
74
- priority?: MaybeRefOrGetter<number>;
75
- /**
76
- * Only act while the focus is inside this element.
77
- *
78
- * The default is the whole window, which is right for a command palette and
79
- * wrong for a control: two of the same component on one page would both
80
- * answer the same key, and a control beside a form would answer keys aimed
81
- * at the form. Scoping it here rather than in each component because every
82
- * one of them was about to write the same `document.activeElement` check and
83
- * decline by hand.
84
- *
85
- * Undefined or null means the window, so the palette case stays the default.
86
- */
87
- scope?: MaybeRefOrGetter<HTMLElement | null | undefined>;
88
- }
89
- export declare function useHotkeys(bindings: MaybeRefOrGetter<HotkeyBinding[]>, options?: UseHotkeysOptions): void;
90
- /**
91
- * The shortcuts that work right now, grouped for `LpShortcutsDialog`: every
92
- * binding with `help` from every mounted `useHotkeys`. A screen that binds its
93
- * own keys adds its section while it is open, so the reference never lists a
94
- * key that does nothing here or misses one that does.
95
- */
96
- export declare const activeShortcuts: import('vue').ComputedRef<ShortcutGroup[]>;
97
- /**
98
- * Groups merged by title, entries kept once per combo: what a reference shows
99
- * when it lists both its own entries and the live ones.
100
- */
101
- export declare function mergeShortcutGroups(...lists: ShortcutGroup[][]): ShortcutGroup[];
@@ -1,14 +0,0 @@
1
- import { MaybeRefOrGetter } from 'vue';
2
- export interface UseInputFilterOptions {
3
- /** One-char RegExp of allowed characters. Disallowed input is blocked. */
4
- restrict?: MaybeRefOrGetter<RegExp | undefined>;
5
- /** RegExp/string the full value must match to be valid. Validation only. */
6
- pattern?: MaybeRefOrGetter<RegExp | string | undefined>;
7
- }
8
- export declare function useInputFilter(options?: UseInputFilterOptions): {
9
- isInvalid: (value: string | undefined) => boolean;
10
- onBeforeInput: (event: InputEvent) => void;
11
- onPaste: (event: ClipboardEvent) => void;
12
- patternRe: import('vue').ComputedRef<RegExp | undefined>;
13
- restrict: import('vue').ComputedRef<RegExp | undefined>;
14
- };
@@ -1,42 +0,0 @@
1
- import { ComputedRef, MaybeRefOrGetter } from 'vue';
2
- /**
3
- * Merges the component's own classes with the `class` attribute the consumer
4
- * passed, resolving Tailwind conflicts in the consumer's favour.
5
- *
6
- * ```ts
7
- * const rootClass = useMergedClass(() => shell({ size: props.size }))
8
- * ```
9
- * ```vue
10
- * <div :class="rootClass">
11
- * ```
12
- *
13
- * Pair it with `inheritAttrs: false` (and bind the rest of `$attrs` yourself)
14
- * so the raw `class` does not land on the element a second time, unmerged.
15
- */
16
- export declare function useMergedClass(own: MaybeRefOrGetter<string | undefined>): ComputedRef<string>;
17
- /**
18
- * `useMergedClass` plus the rest of `$attrs`, for the common `inheritAttrs:
19
- * false` shape: bind `class` and `attrs` and the consumer's `class` lands once,
20
- * merged, while ids, handlers and aria-* still reach the element.
21
- *
22
- * ```ts
23
- * const { class: rootClass, attrs: rest } = useMergedAttrs(() => card({ padded }))
24
- * ```
25
- * ```vue
26
- * <div :class="rootClass" v-bind="rest">
27
- * ```
28
- *
29
- * Binding the raw `$attrs` alongside a merged class is the bug this avoids:
30
- * Vue appends that second `class` to the merged one, and stylesheet order —
31
- * not the caller — decides which wins.
32
- */
33
- export declare function useMergedAttrs(own: MaybeRefOrGetter<string | undefined>): {
34
- class: ComputedRef<string>;
35
- attrs: ComputedRef<Record<string, unknown>>;
36
- };
37
- /**
38
- * The same merge as a plain function, for the places that already have both
39
- * strings in hand and do not need the attrs lookup — a render helper, or a
40
- * component merging a class onto a child rather than its own root.
41
- */
42
- export declare function mergeClass(...classes: (string | undefined | null | false)[]): string;
@@ -1,21 +0,0 @@
1
- import { ComputedRef } from 'vue';
2
- export type PillTransition = {
3
- duration: number;
4
- } | {
5
- type: "spring";
6
- stiffness: number;
7
- damping: number;
8
- };
9
- export type PillFeel = "pill" | "float";
10
- export declare function usePillTransition(feel?: PillFeel): ComputedRef<PillTransition>;
11
- export interface SpringState {
12
- /** Current position; seed it with the start value. */
13
- value: number;
14
- /** Current velocity; seed with 0. */
15
- velocity: number;
16
- }
17
- export declare function springStep(state: SpringState, target: number, feel?: PillFeel,
18
- /** Frame time in seconds; clamped so a backgrounded tab can't explode it. */
19
- dt?: number): SpringState;
20
- /** True once a spring is close enough to its target to stop animating. */
21
- export declare const springSettled: (state: SpringState, target: number) => boolean;
@@ -1,26 +0,0 @@
1
- import { MaybeRefOrGetter, Ref } from 'vue';
2
- export interface UseRevealOptions {
3
- /**
4
- * Skip the wait and reveal at once. For a caller that has switched its
5
- * entrance off — there is nothing to gate, and holding content back for an
6
- * observer that no longer guards anything only delays the first paint.
7
- */
8
- immediate?: MaybeRefOrGetter<boolean | undefined>;
9
- /**
10
- * Fraction of the element that must be on screen. A sliver of a tall chart
11
- * scrolling into view is not yet an arrival; a quarter of it is.
12
- */
13
- threshold?: number;
14
- /**
15
- * Grow the viewport for the test, so an element just past the fold starts
16
- * drawing as it is scrolled toward rather than after it lands.
17
- */
18
- rootMargin?: string;
19
- }
20
- export interface UseReveal {
21
- /** Attach to the element whose appearance starts the animation. */
22
- el: Ref<Element | null>;
23
- /** False until that element has been seen; true forever after. */
24
- revealed: Ref<boolean>;
25
- }
26
- export declare function useReveal(options?: UseRevealOptions): UseReveal;
@@ -1,49 +0,0 @@
1
- import { MaybeRefOrGetter } from 'vue';
2
- export interface RovingItem {
3
- /** Stable identity of the row. */
4
- id: string;
5
- /**
6
- * What typeahead matches against. Omit to opt this row out of typeahead —
7
- * a separator, say.
8
- */
9
- label?: string;
10
- disabled?: boolean;
11
- }
12
- export interface UseRovingFocusOptions {
13
- /**
14
- * Which axis the arrows follow. `vertical` (default) uses ↑↓, `horizontal`
15
- * uses ←→, `both` accepts either — for a grid whose wrapping the caller
16
- * cannot describe here.
17
- */
18
- orientation?: "vertical" | "horizontal" | "both";
19
- /** Wrap around at the ends instead of stopping. Default true. */
20
- loop?: boolean;
21
- /** Jump to an item by typing its first letters. Default true. */
22
- typeahead?: boolean;
23
- /** Called when the user activates the current item (Enter or Space). */
24
- onActivate?: (id: string) => void;
25
- /**
26
- * Called when focus should leave the list without activating anything —
27
- * Escape. Lets a dialog close, or a filter field take focus back.
28
- */
29
- onEscape?: () => void;
30
- }
31
- export declare function useRovingFocus(items: MaybeRefOrGetter<RovingItem[]>, options?: UseRovingFocusOptions): {
32
- activeId: import('vue').Ref<string | undefined, string | undefined>;
33
- focus: (id: string | undefined) => void;
34
- move: (delta: number) => void;
35
- first: () => void;
36
- last: () => void;
37
- onKeydown: (event: KeyboardEvent) => void;
38
- setContainer: (el: HTMLElement | null) => void;
39
- containerProps: import('vue').ComputedRef<{
40
- ref: (el: unknown) => void;
41
- onKeydown: (event: KeyboardEvent) => void;
42
- }>;
43
- itemProps: (id: string) => {
44
- tabindex: number;
45
- "data-active": string | undefined;
46
- "data-roving-id": string;
47
- onFocus: () => void;
48
- };
49
- };
@@ -1,26 +0,0 @@
1
- import { MaybeRefOrGetter } from 'vue';
2
- export interface UseSettledOptions {
3
- /** Override the wait. Defaults to the kit's overlay animation duration. */
4
- delay?: MaybeRefOrGetter<number>;
5
- }
6
- /**
7
- * Returns a ref that flips true once `open` has been truthy for the length of
8
- * the overlay's opening animation. Gate expensive content on it:
9
- *
10
- * ```ts
11
- * const settled = useSettled(() => isOpen.value)
12
- * ```
13
- * ```vue
14
- * <RowList v-if="settled" :rows="rows" />
15
- * <RowSkeletons v-else />
16
- * ```
17
- *
18
- * Anything truthy counts as open, so an id can be passed instead of a boolean.
19
- * That is the useful form when the same panel is reused for different subjects:
20
- * the wait restarts when the id changes, because the panel is mounting a whole
21
- * new body without ever having closed.
22
- *
23
- * With reduced motion there is no animation to protect, so it resolves on the
24
- * next tick rather than making the user wait for a delay that buys nothing.
25
- */
26
- export declare function useSettled(open: MaybeRefOrGetter<unknown>, options?: UseSettledOptions): import('vue').Ref<boolean, boolean>;
@@ -1,35 +0,0 @@
1
- import { MaybeRefOrGetter, Ref } from 'vue';
2
- export type ShiftAxis = "height" | "width" | "both";
3
- export interface UseShiftOptions {
4
- /** Which dimension is content-derived. Default `"height"`. */
5
- axis?: MaybeRefOrGetter<ShiftAxis | undefined>;
6
- /** Tween length. Defaults to the kit's `--duration-fast` (160ms). */
7
- duration?: MaybeRefOrGetter<number | undefined>;
8
- /**
9
- * Gate: while falsy the element is left entirely alone — no observers, no
10
- * pinning. Use it for a box that only exists while something is open, so a
11
- * remounted element starts measuring from scratch rather than easing in from
12
- * a size it held in a previous life. Default: always active.
13
- */
14
- enabled?: MaybeRefOrGetter<unknown>;
15
- }
16
- export interface UseShift {
17
- /** Attach to the element whose content-derived size should ease. */
18
- el: Ref<HTMLElement | null>;
19
- /**
20
- * True while a tween owns the size. Bind the transition utilities off this,
21
- * so the element is only transition-enabled once it has a size to ease FROM
22
- * (otherwise the very first pin animates in from zero).
23
- */
24
- tweening: Ref<boolean>;
25
- /**
26
- * True while the element is still catching up to its new size. During the
27
- * tween the box is briefly smaller than the content it already holds, so any
28
- * scroll region inside it would raise a bar for an overflow that resolves
29
- * itself as the tween lands — hide the bar (not the scrolling) on this.
30
- */
31
- resizing: Ref<boolean>;
32
- /** Re-measure and ease to the current natural size. Rarely needed by hand. */
33
- retune: () => void;
34
- }
35
- export declare function useShift(options?: UseShiftOptions): UseShift;
@@ -1,23 +0,0 @@
1
- import { ComputedRef, CSSProperties, Ref } from 'vue';
2
- export interface UseTiltOptions {
3
- /** Max rotation toward the pointer, in degrees (per axis). Default 10. */
4
- max?: number;
5
- /** Upward lift on hover, in px. Default 8. */
6
- lift?: number;
7
- /** Scale on hover. Default 1.03. */
8
- scale?: number;
9
- /** Glare highlight following the pointer. Default false. */
10
- glare?: boolean;
11
- }
12
- export interface UseTilt {
13
- /** Bind to the tilting element's style. */
14
- style: ComputedRef<CSSProperties>;
15
- /** Radial-gradient background for an optional glare overlay (0 when idle). */
16
- glareStyle: ComputedRef<CSSProperties>;
17
- onPointerMove: (e: PointerEvent) => void;
18
- onPointerEnter: () => void;
19
- onPointerLeave: () => void;
20
- /** True while the pointer is over the element (drives lift/scale). */
21
- active: Ref<boolean>;
22
- }
23
- export declare function useTilt(options?: UseTiltOptions): UseTilt;
@@ -1,41 +0,0 @@
1
- export type ToastVariant = "info" | "success" | "warning" | "error";
2
- export interface ToastAction {
3
- label: string;
4
- /** Optional leading icon (any name LpIcon accepts, e.g. "lucide:copy"). */
5
- icon?: string;
6
- onClick: () => void | Promise<void>;
7
- }
8
- export interface ToastItem {
9
- id: number;
10
- title?: string;
11
- message: string;
12
- variant: ToastVariant;
13
- duration: number;
14
- /** Epoch ms when this toast auto-dismisses, or null if it never does. */
15
- dismissAt: number | null;
16
- actions?: ToastAction[];
17
- /** Whole-toast click handler (UAProject-style clickable toast). */
18
- onClick?: () => void | Promise<void>;
19
- }
20
- export interface ToastOptions {
21
- title?: string;
22
- duration?: number;
23
- actions?: ToastAction[];
24
- onClick?: () => void | Promise<void>;
25
- }
26
- declare function push(variant: ToastVariant, message: string, options?: ToastOptions): number;
27
- declare function dismiss(id: number): void;
28
- declare function clear(): void;
29
- export declare function useToast(): {
30
- queue: ToastItem[];
31
- toast: (message: string, o?: ToastOptions) => number;
32
- info: (message: string, o?: ToastOptions) => number;
33
- success: (message: string, o?: ToastOptions) => number;
34
- warning: (message: string, o?: ToastOptions) => number;
35
- error: (message: string, o?: ToastOptions) => number;
36
- /** Low-level push for bridges (e.g. @leavepulse/ui-sdk apiError). */
37
- push: typeof push;
38
- dismiss: typeof dismiss;
39
- clear: typeof clear;
40
- };
41
- export {};
@@ -1,58 +0,0 @@
1
- import { ComputedRef, CSSProperties, Ref } from 'vue';
2
- export interface UseZoomPanOptions {
3
- /** Smallest allowed scale. Default 1 (fit — never shrink past the viewport). */
4
- min?: number;
5
- /** Largest allowed scale. Default 8. */
6
- max?: number;
7
- /** Multiplier per wheel notch. Default 1.15. */
8
- step?: number;
9
- /** Scale that a double-click/tap toggles to, from `min`. Default 2. */
10
- zoomedScale?: number;
11
- }
12
- export interface UseZoomPan {
13
- scale: Ref<number>;
14
- /**
15
- * Pan offset in CONTENT pixels — what `style` puts inside `translate()`,
16
- * before the scale magnifies it. Exposed because anything that has to know
17
- * *which part* is visible needs the number, not the CSS string: an exporter
18
- * writing the cropped region, a minimap drawing the viewport rectangle, a
19
- * caller restoring a saved position. Parsing it back out of `transform` is
20
- * the alternative, and that breaks the moment this composable changes how it
21
- * composes the transform.
22
- */
23
- offset: ComputedRef<{
24
- x: number;
25
- y: number;
26
- }>;
27
- /**
28
- * Put the view somewhere — restoring a saved position, or carrying one
29
- * through a change that re-frames the content. Clamped like any other pan,
30
- * so a caller cannot place the content off the viewport. Omitting `scale`
31
- * keeps the current one.
32
- */
33
- setView: (view: {
34
- x: number;
35
- y: number;
36
- scale?: number;
37
- }) => void;
38
- /** True once zoomed past the minimum — the point at which panning matters. */
39
- zoomed: ComputedRef<boolean>;
40
- /** True while a drag is in flight, so the caller can swap the cursor. */
41
- panning: Ref<boolean>;
42
- style: ComputedRef<CSSProperties>;
43
- onWheel: (e: WheelEvent) => void;
44
- onPointerDown: (e: PointerEvent) => void;
45
- onPointerMove: (e: PointerEvent) => void;
46
- onPointerUp: (e: PointerEvent) => void;
47
- /** Zoom about the viewport centre (buttons, keyboard). */
48
- zoomBy: (factor: number) => void;
49
- /** Toggle between fit and `zoomedScale`, optionally about a point. */
50
- toggleZoom: (origin?: {
51
- x: number;
52
- y: number;
53
- }) => void;
54
- reset: () => void;
55
- /** Call with the viewport element so pointer coords can be made relative. */
56
- setViewport: (el: HTMLElement | null) => void;
57
- }
58
- export declare function useZoomPan(options?: UseZoomPanOptions): UseZoomPan;
package/dist/icons.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/index.d.ts DELETED
@@ -1,160 +0,0 @@
1
- export { default as LayoutCanvas } from './components/LayoutCanvas.vue';
2
- export { default as LpAddressInput } from './components/LpAddressInput.vue';
3
- export { default as LpMapPicker } from './components/LpMapPicker.vue';
4
- export { OSM_TILES, createNominatimProvider, emptyAddress, formatAddress, project, tileUrl, unproject, } from './components/address';
5
- export type { AddressField, AddressLabels, AddressSuggestion, AddressValue, GeocodeProvider, GeocodeQuery, LatLon, NominatimOptions, TileSource, } from './components/address';
6
- export { default as LpActionBar } from './components/LpActionBar.vue';
7
- export type { ActionBarAction } from './components/LpActionBar.vue';
8
- export { default as LpAlert } from './components/LpAlert.vue';
9
- export { default as LpAppShell } from './components/LpAppShell.vue';
10
- export { default as LpAutocomplete } from './components/LpAutocomplete.vue';
11
- export type { AutocompleteOption } from './components/LpAutocomplete.vue';
12
- export { default as LpAvatar } from './components/LpAvatar.vue';
13
- export { default as LpBadge } from './components/LpBadge.vue';
14
- export { default as LpBreadcrumbs } from './components/LpBreadcrumbs.vue';
15
- export type { Crumb } from './components/LpBreadcrumbs.vue';
16
- export { default as LpButton } from './components/LpButton.vue';
17
- export { default as LpCalendar } from './components/LpCalendar.vue';
18
- export { default as LpCard } from './components/LpCard.vue';
19
- export { default as LpChart } from './components/LpChart.vue';
20
- export type { ChartPointEvent } from './components/LpChart.vue';
21
- export { CHART_PALETTE, axisTicks, formatTick, niceScale, } from './components/chart';
22
- export type { ChartAxis, ChartPoint, ChartSeries } from './components/chart';
23
- export { default as LpCheckbox } from './components/LpCheckbox.vue';
24
- export { default as LpCodeBlock } from './components/LpCodeBlock.vue';
25
- export type { CodeLang } from './components/codeHighlight';
26
- export { default as LpColorPicker } from './components/LpColorPicker.vue';
27
- export type { ColorPickerLabels } from './components/LpColorPicker.vue';
28
- export { clampHsv, DEFAULT_SWATCHES, formatColor, hsvToHsl, hsvToRgb, isLight, normalizeHue, opaqueCss, parseColor, parseHex, rgbToHex, rgbToHsv, } from './components/color';
29
- export type { ColorFormat, Hsv, Rgb } from './components/color';
30
- export { default as LpCommandPalette } from './components/LpCommandPalette.vue';
31
- export type { Command, PaletteLabels } from './components/LpCommandPalette.vue';
32
- export { default as LpConfirmDialog } from './components/LpConfirmDialog.vue';
33
- export { default as LpContextMenu } from './components/LpContextMenu.vue';
34
- export type { ContextMenuItemDef } from './components/LpContextMenu.vue';
35
- export { default as LpDatePicker } from './components/LpDatePicker.vue';
36
- export { default as LpDisclosure } from './components/LpDisclosure.vue';
37
- export { default as LpDivider } from './components/LpDivider.vue';
38
- export { default as LpDrawer } from './components/LpDrawer.vue';
39
- export { default as LpDropdownMenu } from './components/LpDropdownMenu.vue';
40
- export type { MenuItem } from './components/LpDropdownMenu.vue';
41
- export { default as LpDropzone } from './components/LpDropzone.vue';
42
- export { default as LpEmptyState } from './components/LpEmptyState.vue';
43
- export { default as LpFileTree } from './components/LpFileTree.vue';
44
- export type { FileTreeSummary } from './components/LpFileTree.vue';
45
- export type { CheckState, FileNode, NodeStats } from './components/fileTree';
46
- export { ancestorIds, checkedCount, checkStateOf, computeStats, fileIcon, formatModified, formatSize, sortNodes, subtreeIds, subtreeSize, } from './components/fileTree';
47
- export { default as LpFormField } from './components/LpFormField.vue';
48
- export { default as LpIcon } from './components/LpIcon.vue';
49
- export { default as LpImageEditor } from './components/LpImageEditor.vue';
50
- export { default as LpInfraNode } from './components/LpInfraNode.vue';
51
- export type { InfraNodeData } from './components/LpInfraNode.vue';
52
- export { default as LpInput } from './components/LpInput.vue';
53
- export { default as LpLightbox } from './components/LpLightbox.vue';
54
- export type { LightboxItem } from './components/lightbox';
55
- export { fileNameOf } from './components/lightbox';
56
- export { default as LpLink } from './components/LpLink.vue';
57
- export { default as LpLogViewer } from './components/LpLogViewer.vue';
58
- export type { LogLevel, LogLine } from './components/LpLogViewer.vue';
59
- export { default as LpMediaGallery } from './components/LpMediaGallery.vue';
60
- export { default as LpModal } from './components/LpModal.vue';
61
- export { default as LpModalNav } from './components/LpModalNav.vue';
62
- export { default as LpNotificationBell } from './components/LpNotificationBell.vue';
63
- export type { NotificationItem, NotificationLabels, } from './components/LpNotificationBell.vue';
64
- export { default as LpNumberField } from './components/LpNumberField.vue';
65
- export { default as LpTimeField } from './components/LpTimeField.vue';
66
- export { default as LpNumberFlow } from './components/LpNumberFlow.vue';
67
- export { default as LpOtpInput } from './components/LpOtpInput.vue';
68
- export { default as LpPagination } from './components/LpPagination.vue';
69
- export { default as LpPasswordInput } from './components/LpPasswordInput.vue';
70
- export { default as LpPie } from './components/LpPie.vue';
71
- export type { SliceEvent } from './components/LpPie.vue';
72
- export { resolveSlices } from './components/chart';
73
- export type { PieSlice, ResolvedSlice } from './components/chart';
74
- export { default as LpPhoneInput } from './components/LpPhoneInput.vue';
75
- export type { PhoneDetail } from './components/LpPhoneInput.vue';
76
- export { flagEmoji, loadCountries, matchCountryByValue } from './components/countries';
77
- export type { Country } from './components/countries';
78
- export { default as LpPopover } from './components/LpPopover.vue';
79
- export { default as LpProgress } from './components/LpProgress.vue';
80
- export { default as LpRadio } from './components/LpRadio.vue';
81
- export { default as LpRadioGroup } from './components/LpRadioGroup.vue';
82
- export type { RadioOption } from './components/LpRadioGroup.vue';
83
- export { default as LpRollingText } from './components/LpRollingText.vue';
84
- export { default as LpScrollArea } from './components/LpScrollArea.vue';
85
- export { default as LpSegmented } from './components/LpSegmented.vue';
86
- export type { SegmentedOption } from './components/LpSegmented.vue';
87
- export { default as LpSection } from './components/LpSection.vue';
88
- export { default as LpSelect } from './components/LpSelect.vue';
89
- export type { SelectOption, SelectValue } from './components/LpSelect.vue';
90
- export { default as LpServiceNode } from './components/LpServiceNode.vue';
91
- export type { ServiceNodeData } from './components/LpServiceNode.vue';
92
- export { default as LpShift } from './components/LpShift.vue';
93
- export { default as LpShortcutsDialog } from './components/LpShortcutsDialog.vue';
94
- export { default as LpSidebar } from './components/LpSidebar.vue';
95
- export type { SidebarItem, SidebarSection } from './components/LpSidebar.vue';
96
- export { default as LpSkeleton } from './components/LpSkeleton.vue';
97
- export { default as LpSlider } from './components/LpSlider.vue';
98
- export { default as LpSparkline } from './components/LpSparkline.vue';
99
- export { default as LpStat } from './components/LpStat.vue';
100
- export { default as LpStepper } from './components/LpStepper.vue';
101
- export type { Step } from './components/LpStepper.vue';
102
- export { default as LpSwitch } from './components/LpSwitch.vue';
103
- export { default as LpTable } from './components/LpTable.vue';
104
- export type { SortState, TableColumn, TablePage, TableQuery } from './components/LpTable.vue';
105
- export { default as LpTableOfContents } from './components/LpTableOfContents.vue';
106
- export type { TocLink } from './components/LpTableOfContents.vue';
107
- export { default as LpTabs } from './components/LpTabs.vue';
108
- export type { TabItem } from './components/LpTabs.vue';
109
- export { default as LpTextarea } from './components/LpTextarea.vue';
110
- export { default as LpThemeSwitcher } from './components/LpThemeSwitcher.vue';
111
- export { default as LpTilt } from './components/LpTilt.vue';
112
- export { default as LpToaster } from './components/LpToaster.vue';
113
- export { default as LpTooltip } from './components/LpTooltip.vue';
114
- export { default as LpTopologyCanvas } from './components/LpTopologyCanvas.vue';
115
- export type { CanvasViewport, EdgeCategory, EdgeObserved, TopologyEdge, TopologyLane, TopologyNode, } from './components/LpTopologyCanvas.vue';
116
- export { default as LpUptimeBar } from './components/LpUptimeBar.vue';
117
- export type { UptimeSegment, UptimeStatus } from './components/LpUptimeBar.vue';
118
- export { addLeaf, addTab, countBlocks, countLeaves, deserializeLayout, makeLayout, moveLeaf, removeBlock, removeLeaf, reorderTab, resizeAt, setActiveTab, serializeLayout, } from './layout/tree';
119
- export type { Dir, LayoutNode, Leaf, Side, Split } from './layout/tree';
120
- export { blockTitle, defineBlocks } from './layout/registry';
121
- export type { BlockDef, BlockRegistry } from './layout/registry';
122
- export { useLayout } from './layout/useLayout';
123
- export type { UseLayout, UseLayoutOptions } from './layout/useLayout';
124
- export { applyTheme, applyThemeWithTransition, bootstrapTheme, parseTheme, serializeTheme, THEME_COOKIE, themeFromCookie, themeToCssRule, themeToCssVars, useTheme, } from './theme/useTheme';
125
- export type { RevealOrigin } from './theme/useTheme';
126
- export { detectBackdropFilter, isBrokenBackdropEngine, NO_BACKDROP_ATTR } from './theme/backdrop';
127
- export { DEFAULT_SURFACE } from './theme/tokens';
128
- export { defineTheme } from './theme/define';
129
- export type { ThemeOverrides } from './theme/define';
130
- export type { ColorTokens, DensityTokens, FontTokens, ShapeTokens, SurfaceTokens, TokenSet, } from './theme/tokens';
131
- export { amber, dark, leavepulse, light, lime, nord, presets, rose, violet } from './theme/presets';
132
- export type { PresetName } from './theme/presets';
133
- export { parseConfig, serializeConfig, UI_CONFIG_VERSION } from './theme/config';
134
- export type { UiConfig } from './theme/config';
135
- export { useClipboard } from './composables/useClipboard';
136
- export type { CopyOptions, UseClipboard } from './composables/useClipboard';
137
- export { useHotkeys, isAppleKeyboard, appleModifierLabel, activeShortcuts, mergeShortcutGroups, } from './composables/useHotkeys';
138
- export type { HotkeyBinding, HotkeyHelp, ShortcutEntry, ShortcutGroup } from './composables/useHotkeys';
139
- export { provideGlass, useGlass } from './composables/useGlass';
140
- export { useMergedClass, useMergedAttrs, mergeClass } from './composables/useMergedClass';
141
- export { useInputFilter } from './composables/useInputFilter';
142
- export type { UseInputFilterOptions } from './composables/useInputFilter';
143
- export { easeOut, easeTravel, easingToken, prefersReducedMotion } from './composables/easing';
144
- export { useReveal } from './composables/useReveal';
145
- export type { UseReveal, UseRevealOptions } from './composables/useReveal';
146
- export { useAsyncTask } from './composables/useAsyncTask';
147
- export { useRovingFocus } from './composables/useRovingFocus';
148
- export type { RovingItem, UseRovingFocusOptions } from './composables/useRovingFocus';
149
- export { useFormDraft } from './composables/useFormDraft';
150
- export type { UseFormDraft, UseFormDraftOptions } from './composables/useFormDraft';
151
- export { useSettled } from './composables/useSettled';
152
- export type { UseSettledOptions } from './composables/useSettled';
153
- export { useShift } from './composables/useShift';
154
- export type { ShiftAxis, UseShift, UseShiftOptions } from './composables/useShift';
155
- export { useTilt } from './composables/useTilt';
156
- export type { UseTilt, UseTiltOptions } from './composables/useTilt';
157
- export { useZoomPan } from './composables/useZoomPan';
158
- export type { UseZoomPan, UseZoomPanOptions } from './composables/useZoomPan';
159
- export { useToast } from './composables/useToast';
160
- export type { ToastAction, ToastItem, ToastOptions, ToastVariant, } from './composables/useToast';
@@ -1,26 +0,0 @@
1
- import { Component } from 'vue';
2
- export interface BlockDef {
3
- /**
4
- * Content component for this block. Optional: when the consumer renders block
5
- * content via the canvas's #block slot (keyed by id), the registry is used
6
- * only for tab chrome (title/icon) and no component is needed here.
7
- */
8
- component?: Component;
9
- /** Human label shown on the tab / cell header. Defaults to the id. */
10
- title?: string;
11
- /** Optional iconify name (e.g. "lucide:activity") for the tab. */
12
- icon?: string;
13
- /** Whether the user may close this block. Defaults to true. */
14
- closable?: boolean;
15
- /** Props passed to the component. */
16
- props?: Record<string, unknown>;
17
- }
18
- export type BlockRegistry = Record<string, BlockDef>;
19
- /**
20
- * Identity helper that pins the key type so callers get autocomplete on block
21
- * ids elsewhere (e.g. when seeding a layout). Purely for inference — it returns
22
- * the object unchanged.
23
- */
24
- export declare function defineBlocks<const T extends BlockRegistry>(blocks: T): T;
25
- /** Resolve a block's display title, falling back to its id. */
26
- export declare function blockTitle(registry: BlockRegistry, id: string): string;