@leavepulse/ui 0.55.0 → 0.57.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.
- package/dist/chunks/{LpActionBar-CnfFVIwC.js → LpActionBar-C3hkVsFz.js} +1 -1
- package/dist/chunks/{LpAddressInput-iOJhmRzy.js → LpAddressInput-NUHmplCd.js} +1 -1
- package/dist/chunks/{LpAppShell-DcSXik4a.js → LpAppShell-Bl1Ch68N.js} +2 -2
- package/dist/chunks/{LpButton-CKSwC6Mu.js → LpButton-BdfZFNqi.js} +31 -7
- package/dist/chunks/{LpConfirmDialog-Ca-CTlxT.js → LpConfirmDialog-CrbUZgJE.js} +1 -1
- package/dist/chunks/{LpConfirmHost-BAaSaT2b.js → LpConfirmHost-BgMIV8r9.js} +1 -1
- package/dist/chunks/{LpDateRangePicker-Drd7EbIz.js → LpDateRangePicker-CxV5jW7p.js} +4 -13
- package/dist/chunks/{LpDrawer-CBFVD624.js → LpDrawer-D9lLOC0C.js} +4 -6
- package/dist/chunks/LpHintLayer-CI1oZ9Pd.js +154 -0
- package/dist/chunks/{LpModalNav-aWwc_5CD.js → LpModalNav-DXyAyhQl.js} +2 -2
- package/dist/chunks/{LpNotificationBell-wZ3meeim.js → LpNotificationBell-DEL-RoHS.js} +1 -1
- package/dist/chunks/{LpPie-B7ti5qCH.js → LpPie-CXka8Jvx.js} +1 -1
- package/dist/chunks/{LpSidebar-C2oolgwy.js → LpSidebar-hZ8D1cVr.js} +1 -1
- package/dist/chunks/{LpTableOfContents-BUcAfGPQ.js → LpTableOfContents-DYuqkByy.js} +2 -8
- package/dist/chunks/{LpTooltip-CXVKcOXT.js → LpTooltip-suFCM34F.js} +2 -2
- package/dist/chunks/LpTour-C1TC2GyY.js +315 -0
- package/dist/chunks/{LpUptimeBar-ugcv25xj.js → LpUptimeBar-B4ltCfno.js} +1 -1
- package/dist/chunks/TourCard-BQS3ztqj.js +100 -0
- package/dist/component-names.d.ts +1 -1
- package/dist/components/LpActionBar.vue.js +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpButton.vue.d.ts +10 -0
- package/dist/components/LpButton.vue.js +1 -1
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpDateRangePicker.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpHintLayer.vue.d.ts +33 -0
- package/dist/components/LpHintLayer.vue.js +4 -0
- package/dist/components/LpImageEditor.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpTable.vue.js +1 -1
- package/dist/components/LpTableOfContents.vue.js +1 -1
- package/dist/components/LpTooltip.vue.js +1 -1
- package/dist/components/LpTour.vue.d.ts +98 -0
- package/dist/components/LpTour.vue.js +4 -0
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/TourCard.vue.d.ts +28 -0
- package/dist/components/TourCard.vue.js +4 -0
- package/dist/components/tour.d.ts +21 -0
- package/dist/components/tour.js +38 -0
- package/dist/composables/scroll.d.ts +17 -0
- package/dist/composables/scroll.js +29 -0
- package/dist/composables/useGamepadNav.js +2 -7
- package/dist/composables/useHints.d.ts +18 -0
- package/dist/composables/useHints.js +120 -0
- package/dist/composables/useMediaQuery.d.ts +2 -0
- package/dist/composables/useMediaQuery.js +18 -0
- package/dist/composables/usePaintSelect.js +1 -7
- package/dist/index.d.ts +10 -0
- package/dist/index.js +38 -22
- package/package.json +1 -1
- package/src/component-names.ts +2 -0
- package/src/components/LpButton.vue +28 -1
- package/src/components/LpDateRangePicker.vue +3 -12
- package/src/components/LpDrawer.vue +4 -7
- package/src/components/LpHintLayer.vue +148 -0
- package/src/components/LpTableOfContents.vue +2 -14
- package/src/components/LpTooltip.vue +2 -4
- package/src/components/LpTour.vue +338 -0
- package/src/components/TourCard.vue +41 -0
- package/src/components/tour.ts +57 -0
- package/src/composables/scroll.ts +54 -0
- package/src/composables/useGamepadNav.ts +2 -7
- package/src/composables/useHints.ts +151 -0
- package/src/composables/useMediaQuery.ts +20 -0
- package/src/composables/usePaintSelect.ts +1 -8
- package/src/index.ts +10 -0
- package/src/tokens/tokens.css +1 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { onBeforeUnmount, onMounted, readonly, ref, toValue, type MaybeRefOrGetter, type Ref } from "vue"
|
|
2
2
|
import { useHotkeys, type HotkeyHelp } from "./useHotkeys"
|
|
3
|
+
import { scrollParent } from "./scroll"
|
|
3
4
|
|
|
4
5
|
/*
|
|
5
6
|
* Paint selection: press on one item's tick and sweep across the others, and
|
|
@@ -53,14 +54,6 @@ interface Stroke<K> {
|
|
|
53
54
|
scroller: HTMLElement | null
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
function scrollParent(el: HTMLElement | null): HTMLElement | null {
|
|
57
|
-
for (let node = el?.parentElement; node; node = node.parentElement) {
|
|
58
|
-
const { overflowY } = getComputedStyle(node)
|
|
59
|
-
if ((overflowY === "auto" || overflowY === "scroll") && node.scrollHeight > node.clientHeight) return node
|
|
60
|
-
}
|
|
61
|
-
return null
|
|
62
|
-
}
|
|
63
|
-
|
|
64
57
|
export function usePaintSelect<K = string>(options: UsePaintSelectOptions<K>) {
|
|
65
58
|
const resolve = options.resolve ?? ((raw: string) => raw as unknown as K)
|
|
66
59
|
let stroke: Stroke<K> | null = null
|
package/src/index.ts
CHANGED
|
@@ -207,6 +207,11 @@ export { default as LpThemeSwitcher } from "./components/LpThemeSwitcher.vue"
|
|
|
207
207
|
export { default as LpTilt } from "./components/LpTilt.vue"
|
|
208
208
|
export { default as LpToaster } from "./components/LpToaster.vue"
|
|
209
209
|
export { default as LpTooltip } from "./components/LpTooltip.vue"
|
|
210
|
+
export { default as LpTour } from "./components/LpTour.vue"
|
|
211
|
+
export type { TourContext, TourStep } from "./components/LpTour.vue"
|
|
212
|
+
export { holeOf, openContextMenu, panelsAround } from "./components/tour"
|
|
213
|
+
export { default as LpHintLayer } from "./components/LpHintLayer.vue"
|
|
214
|
+
export type { HintNote } from "./components/LpHintLayer.vue"
|
|
210
215
|
export { default as LpTooltipProvider } from "./components/LpTooltipProvider.vue"
|
|
211
216
|
export { default as LpTopologyCanvas } from "./components/LpTopologyCanvas.vue"
|
|
212
217
|
export type {
|
|
@@ -313,6 +318,11 @@ export type { FieldContext, FieldControlState } from "./composables/useField"
|
|
|
313
318
|
export type { UseInputFilterOptions } from "./composables/useInputFilter"
|
|
314
319
|
export { easeOut, easeTravel, easingToken, prefersReducedMotion } from "./composables/easing"
|
|
315
320
|
export { useReveal } from "./composables/useReveal"
|
|
321
|
+
export { hints, vHint } from "./composables/useHints"
|
|
322
|
+
export type { HintEvent } from "./composables/useHints"
|
|
323
|
+
export { scrollParent, scrollToElement } from "./composables/scroll"
|
|
324
|
+
export type { ScrollParentOptions, ScrollToElementOptions } from "./composables/scroll"
|
|
325
|
+
export { useMediaQuery } from "./composables/useMediaQuery"
|
|
316
326
|
export type { UseReveal, UseRevealOptions } from "./composables/useReveal"
|
|
317
327
|
export { useAsyncTask } from "./composables/useAsyncTask"
|
|
318
328
|
export { useRovingFocus } from "./composables/useRovingFocus"
|