@leavepulse/ui 0.76.0 → 0.77.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/README.md +4 -1
- package/dist/chunks/{LpAddressInput-De_LTYM7.js → LpAddressInput-sYMvYzcY.js} +1 -1
- package/dist/chunks/{LpAppShell-Cpy_t1U_.js → LpAppShell-Dgejipzz.js} +2 -2
- package/dist/chunks/{LpConfirmDialog-CphJR6Q9.js → LpConfirmDialog-DlD45Bi_.js} +1 -1
- package/dist/chunks/{LpConfirmHost-QSJ0zl63.js → LpConfirmHost-BIWjBLmI.js} +1 -1
- package/dist/chunks/{LpDrawer-DQZixOqJ.js → LpDrawer-CrG8t_KP.js} +1 -1
- package/dist/chunks/{LpFileTree-zIFEgo3I.js → LpFileTree-CooHinsC.js} +1 -1
- package/dist/chunks/{LpLogViewer-D25jM2_I.js → LpLogViewer-ngqkns4m.js} +1 -1
- package/dist/chunks/{LpModal-C0tGg_D_.js → LpModal-CoGhLTyH.js} +1 -1
- package/dist/chunks/{LpModalNav-iDDtT9c1.js → LpModalNav-BGvs2y5Q.js} +2 -2
- package/dist/chunks/{LpNotificationBell-3244LUVc.js → LpNotificationBell-B0034Lk-.js} +1 -1
- package/dist/chunks/{LpScrollArea-Hz3-JWUG.js → LpScrollArea-MyEnVB_5.js} +9 -8
- package/dist/chunks/{LpSidebar-D6zO8vLm.js → LpSidebar-DzE1783C.js} +2 -2
- package/dist/chunks/{LpSidebarNav-Bky8chrv.js → LpSidebarNav-DE3PhXVP.js} +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.js +1 -1
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpScrollArea.vue.d.ts +2 -0
- package/dist/components/LpScrollArea.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpTable.vue.js +1 -1
- package/dist/composables/overlayHistory.js +13 -0
- package/dist/index.js +12 -12
- package/package.json +1 -1
- package/src/components/LpScrollArea.vue +14 -7
- package/src/composables/overlayHistory.ts +22 -0
package/README.md
CHANGED
|
@@ -113,7 +113,10 @@ provideOverlayHistory(true, { router })
|
|
|
113
113
|
`update:open` true while the overlay is still mounted.
|
|
114
114
|
- `history` on a single overlay wins over the app-wide mode: `false` keeps an
|
|
115
115
|
overlay out of history, for one the app already opens from its route query
|
|
116
|
-
(it would otherwise take two entries for one dialog).
|
|
116
|
+
(it would otherwise take two entries for one dialog). An overlay the app
|
|
117
|
+
writes into the query with `router.replace` needs nothing: when it closes,
|
|
118
|
+
the address the app left is kept, and the overlay does not open again from
|
|
119
|
+
the entry under it.
|
|
117
120
|
- A real navigation (a link, `router.push` to another path) closes the open
|
|
118
121
|
overlays, and the entries they leave under the new page are skipped, so Back
|
|
119
122
|
from it lands on the page in one press. A push that keeps the path (a query
|
|
@@ -7,7 +7,7 @@ import { _ as _sfc_main$3 } from "./LpButton-CFb44IjC.js";
|
|
|
7
7
|
import { _ as _sfc_main$1 } from "./LpFormField-Ch69Jd-X.js";
|
|
8
8
|
import { _ as _sfc_main$4 } from "./LpIcon--5WSb3jJ.js";
|
|
9
9
|
import { _ as _sfc_main$5 } from "./LpInput-Tw-yxT4I.js";
|
|
10
|
-
import { _ as _sfc_main$7 } from "./LpModal-
|
|
10
|
+
import { _ as _sfc_main$7 } from "./LpModal-CoGhLTyH.js";
|
|
11
11
|
import { _ as _sfc_main$6 } from "./LpSelect-Cxq4yBGd.js";
|
|
12
12
|
import { useFieldControl } from "../composables/useField.js";
|
|
13
13
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
@@ -5,9 +5,9 @@ import { _ as _sfc_main$7 } from "./LpBottomNav-CbNQQPuL.js";
|
|
|
5
5
|
import { _ as _sfc_main$2 } from "./LpContextSwitcher-Dwh6dyID.js";
|
|
6
6
|
import { _ as _sfc_main$3 } from "./LpButton-CFb44IjC.js";
|
|
7
7
|
import { _ as _sfc_main$4 } from "./LpIcon--5WSb3jJ.js";
|
|
8
|
-
import { _ as _sfc_main$6 } from "./LpScrollArea-
|
|
8
|
+
import { _ as _sfc_main$6 } from "./LpScrollArea-MyEnVB_5.js";
|
|
9
9
|
import { _ as _sfc_main$5 } from "./LpShift-CCq7dofl.js";
|
|
10
|
-
import { _ as _sfc_main$1 } from "./LpSidebar-
|
|
10
|
+
import { _ as _sfc_main$1 } from "./LpSidebar-DzE1783C.js";
|
|
11
11
|
import { useMergedAttrs, mergeClass } from "../composables/useMergedClass.js";
|
|
12
12
|
const _hoisted_1 = ["href"];
|
|
13
13
|
const _hoisted_2 = { class: "flex min-w-0 flex-1 flex-col" };
|
|
@@ -2,7 +2,7 @@ import { defineComponent, computed, ref, watch, openBlock, createBlock, createSl
|
|
|
2
2
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
3
3
|
import { _ as _sfc_main$2 } from "./LpButton-CFb44IjC.js";
|
|
4
4
|
import { _ as _sfc_main$3 } from "./LpIcon--5WSb3jJ.js";
|
|
5
|
-
import { _ as _sfc_main$1 } from "./LpModal-
|
|
5
|
+
import { _ as _sfc_main$1 } from "./LpModal-CoGhLTyH.js";
|
|
6
6
|
const _hoisted_1 = { class: "inline-flex items-center gap-2.5" };
|
|
7
7
|
const _hoisted_2 = {
|
|
8
8
|
key: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, watch, openBlock, createBlock, createCommentVNode } from "vue";
|
|
2
2
|
import { confirmQueue, settleConfirm } from "../components/confirm.js";
|
|
3
|
-
import { _ as _sfc_main$1 } from "./LpConfirmDialog-
|
|
3
|
+
import { _ as _sfc_main$1 } from "./LpConfirmDialog-DlD45Bi_.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "LpConfirmHost",
|
|
6
6
|
props: {
|
|
@@ -8,7 +8,7 @@ import { useOverlayHistory } from "../composables/useOverlayHistory.js";
|
|
|
8
8
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
9
9
|
import { usePersisted } from "../composables/usePersisted.js";
|
|
10
10
|
import { _ as _sfc_main$1 } from "./LpIcon--5WSb3jJ.js";
|
|
11
|
-
import { _ as _sfc_main$2 } from "./LpScrollArea-
|
|
11
|
+
import { _ as _sfc_main$2 } from "./LpScrollArea-MyEnVB_5.js";
|
|
12
12
|
import { useModalLayer, anyModalOpen } from "../components/modalDepth.js";
|
|
13
13
|
import { usePortalTarget, useOutsideGuard } from "../composables/useView.js";
|
|
14
14
|
const _hoisted_1 = { class: "text-base font-semibold text-ink" };
|
|
@@ -3,7 +3,7 @@ import { useLocale } from "../composables/useLocale.js";
|
|
|
3
3
|
import { computeStats, formatSize, sortNodes, subtreeIds, ancestorIds } from "../components/fileTree.js";
|
|
4
4
|
import { _ as _sfc_main$2 } from "./LpEmptyState-EQHiRYhG.js";
|
|
5
5
|
import { _ as _sfc_main$4 } from "./LpFileTreeNode-cT6BIWvz.js";
|
|
6
|
-
import { _ as _sfc_main$3 } from "./LpScrollArea-
|
|
6
|
+
import { _ as _sfc_main$3 } from "./LpScrollArea-MyEnVB_5.js";
|
|
7
7
|
import { _ as _sfc_main$1 } from "./LpSkeleton-BB6XIV-w.js";
|
|
8
8
|
import { usePersisted } from "../composables/usePersisted.js";
|
|
9
9
|
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
@@ -9,7 +9,7 @@ import { _ as _sfc_main$4 } from "./LpEmptyState-EQHiRYhG.js";
|
|
|
9
9
|
import { _ as _sfc_main$2 } from "./LpIcon--5WSb3jJ.js";
|
|
10
10
|
import { _ as _sfc_main$5 } from "./LpLoader-DVwkOmt9.js";
|
|
11
11
|
import { _ as _sfc_main$1 } from "./LpInput-Tw-yxT4I.js";
|
|
12
|
-
import { _ as _sfc_main$3 } from "./LpScrollArea-
|
|
12
|
+
import { _ as _sfc_main$3 } from "./LpScrollArea-MyEnVB_5.js";
|
|
13
13
|
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
14
14
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
15
15
|
import { useResizeObserver } from "../composables/useResizeObserver.js";
|
|
@@ -8,7 +8,7 @@ import { useShift } from "../composables/useShift.js";
|
|
|
8
8
|
import { useModalLayer } from "../components/modalDepth.js";
|
|
9
9
|
import { CLOSE_ICON } from "../components/dropdown.js";
|
|
10
10
|
import { _ as _sfc_main$1 } from "./LpIcon--5WSb3jJ.js";
|
|
11
|
-
import { _ as _sfc_main$2 } from "./LpScrollArea-
|
|
11
|
+
import { _ as _sfc_main$2 } from "./LpScrollArea-MyEnVB_5.js";
|
|
12
12
|
import { usePortalTarget, useOutsideGuard } from "../composables/useView.js";
|
|
13
13
|
const _hoisted_1 = {
|
|
14
14
|
key: 0,
|
|
@@ -3,8 +3,8 @@ import { useGlass } from "../composables/useGlass.js";
|
|
|
3
3
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
4
4
|
import { _ as _sfc_main$2 } from "./LpButton-CFb44IjC.js";
|
|
5
5
|
import { _ as _sfc_main$3 } from "./LpIcon--5WSb3jJ.js";
|
|
6
|
-
import { _ as _sfc_main$1 } from "./LpModal-
|
|
7
|
-
import { _ as _sfc_main$4 } from "./LpSidebar-
|
|
6
|
+
import { _ as _sfc_main$1 } from "./LpModal-CoGhLTyH.js";
|
|
7
|
+
import { _ as _sfc_main$4 } from "./LpSidebar-DzE1783C.js";
|
|
8
8
|
const _hoisted_1 = { class: "flex items-center gap-2" };
|
|
9
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
10
|
__name: "LpModalNav",
|
|
@@ -9,7 +9,7 @@ import { _ as _sfc_main$7 } from "./LpIcon--5WSb3jJ.js";
|
|
|
9
9
|
import { _ as _sfc_main$1 } from "./LpPopover-DmZ3wUtP.js";
|
|
10
10
|
import { _ as _sfc_main$8 } from "./LpRelativeTime-DwgCb5-8.js";
|
|
11
11
|
import { _ as _sfc_main$b } from "./LpRollingText-B54Pje7P.js";
|
|
12
|
-
import { _ as _sfc_main$5 } from "./LpScrollArea-
|
|
12
|
+
import { _ as _sfc_main$5 } from "./LpScrollArea-MyEnVB_5.js";
|
|
13
13
|
import { _ as _sfc_main$3 } from "./LpSkeleton-BB6XIV-w.js";
|
|
14
14
|
import { _ as _sfc_main$2 } from "./LpShift-CCq7dofl.js";
|
|
15
15
|
import { toneLook } from "../components/tone.js";
|
|
@@ -8,6 +8,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
8
|
props: {
|
|
9
9
|
fade: { type: Boolean, default: true },
|
|
10
10
|
instant: { type: Boolean, default: false },
|
|
11
|
+
floating: { type: Boolean, default: false },
|
|
11
12
|
contentClass: {},
|
|
12
13
|
barInsetTop: {}
|
|
13
14
|
},
|
|
@@ -119,33 +120,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
119
120
|
createVNode(unref(ScrollAreaScrollbar), {
|
|
120
121
|
orientation: "vertical",
|
|
121
122
|
"force-mount": "",
|
|
122
|
-
class: normalizeClass(["group z-1 flex
|
|
123
|
+
class: normalizeClass(["group z-1 flex touch-none select-none justify-end pl-2.5", [barFade, __props.floating ? "w-4 py-1 pr-1" : "w-3.5 py-px pr-px"]]),
|
|
123
124
|
style: normalizeStyle(__props.barInsetTop ? { marginTop: __props.barInsetTop } : void 0),
|
|
124
125
|
onPointerdownCapture: _cache[0] || (_cache[0] = ($event) => onTrackPointerDown($event, "y"))
|
|
125
126
|
}, {
|
|
126
127
|
default: withCtx(() => [
|
|
127
128
|
createVNode(unref(ScrollAreaThumb), {
|
|
128
129
|
"data-lp-thumb": "",
|
|
129
|
-
class: "relative min-w-1
|
|
130
|
+
class: normalizeClass(["relative min-w-1 bg-brand/40 before:absolute before:inset-y-0 before:right-0 before:-left-2.5 before:content-[''] transition-[min-width,background-color] duration-[var(--duration-fast)] group-hover:min-w-1.5 group-hover:bg-brand", __props.floating ? "rounded-pill" : "rounded-l-pill"]),
|
|
130
131
|
onPointerdown: onThumbPointerDown
|
|
131
|
-
})
|
|
132
|
+
}, null, 8, ["class"])
|
|
132
133
|
]),
|
|
133
134
|
_: 1
|
|
134
|
-
}, 8, ["style"]),
|
|
135
|
+
}, 8, ["class", "style"]),
|
|
135
136
|
createVNode(unref(ScrollAreaScrollbar), {
|
|
136
137
|
orientation: "horizontal",
|
|
137
|
-
class: normalizeClass(["group z-1 flex
|
|
138
|
+
class: normalizeClass(["group z-1 flex flex-col touch-none select-none justify-end pt-2.5", [barFade, __props.floating ? "h-4 px-1 pb-1" : "h-3.5 px-px pb-px"]]),
|
|
138
139
|
onPointerdownCapture: _cache[1] || (_cache[1] = ($event) => onTrackPointerDown($event, "x"))
|
|
139
140
|
}, {
|
|
140
141
|
default: withCtx(() => [
|
|
141
142
|
createVNode(unref(ScrollAreaThumb), {
|
|
142
143
|
"data-lp-thumb": "",
|
|
143
|
-
class: "relative min-h-1
|
|
144
|
+
class: normalizeClass(["relative min-h-1 bg-brand/40 before:absolute before:inset-x-0 before:bottom-0 before:-top-2.5 before:content-[''] transition-[min-height,background-color] duration-[var(--duration-fast)] group-hover:min-h-1.5 group-hover:bg-brand", __props.floating ? "rounded-pill" : "rounded-t-pill"]),
|
|
144
145
|
onPointerdown: onThumbPointerDown
|
|
145
|
-
})
|
|
146
|
+
}, null, 8, ["class"])
|
|
146
147
|
]),
|
|
147
148
|
_: 1
|
|
148
|
-
}),
|
|
149
|
+
}, 8, ["class"]),
|
|
149
150
|
createVNode(unref(ScrollAreaViewport), {
|
|
150
151
|
ref_key: "viewportRef",
|
|
151
152
|
ref: viewportRef,
|
|
@@ -2,11 +2,11 @@ import { defineComponent, computed, ref, useId, openBlock, createElementBlock, F
|
|
|
2
2
|
import { useHotkeys, parseCombo } from "../composables/useHotkeys.js";
|
|
3
3
|
import { usePersisted } from "../composables/usePersisted.js";
|
|
4
4
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
5
|
-
import { _ as _sfc_main$5 } from "./LpDrawer-
|
|
5
|
+
import { _ as _sfc_main$5 } from "./LpDrawer-CrG8t_KP.js";
|
|
6
6
|
import { _ as _sfc_main$2 } from "./LpIcon--5WSb3jJ.js";
|
|
7
7
|
import { _ as _sfc_main$3 } from "./LpInput-Tw-yxT4I.js";
|
|
8
8
|
import { _ as _sfc_main$1 } from "./LpTooltip-BcBvIx4z.js";
|
|
9
|
-
import { _ as _sfc_main$4 } from "./LpSidebarNav-
|
|
9
|
+
import { _ as _sfc_main$4 } from "./LpSidebarNav-DE3PhXVP.js";
|
|
10
10
|
const _hoisted_1 = ["data-compact", "aria-label"];
|
|
11
11
|
const _hoisted_2 = {
|
|
12
12
|
key: 0,
|
|
@@ -8,7 +8,7 @@ import { _ as _sfc_main$4 } from "./LpIcon--5WSb3jJ.js";
|
|
|
8
8
|
import "../composables/useHotkeys.js";
|
|
9
9
|
import '../assets/MenuShortcut-Cyub0frr.css';import '../assets/LpKeys-C5VMcBOW.css';/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
|
-
import { _ as _sfc_main$2 } from "./LpScrollArea-
|
|
11
|
+
import { _ as _sfc_main$2 } from "./LpScrollArea-MyEnVB_5.js";
|
|
12
12
|
import { _ as _sfc_main$1 } from "./LpSkeleton-BB6XIV-w.js";
|
|
13
13
|
import { _ as _sfc_main$3 } from "./LpSidebarRow-BRYhNDSo.js";
|
|
14
14
|
import { waiting } from "../components/sidebar.js";
|
|
@@ -7,7 +7,7 @@ import { _ as _sfc_main$6 } from "../chunks/PalettePreviewBoundary-B0Hhu3Yw.js";
|
|
|
7
7
|
import { _ as _sfc_main$5 } from "../chunks/LpAvatar-Cg6Az3wz.js";
|
|
8
8
|
import { _ as _sfc_main$1 } from "../chunks/LpIcon--5WSb3jJ.js";
|
|
9
9
|
import { _ as _sfc_main$2 } from "../chunks/LpLoader-DVwkOmt9.js";
|
|
10
|
-
import { _ as _sfc_main$4 } from "../chunks/LpScrollArea-
|
|
10
|
+
import { _ as _sfc_main$4 } from "../chunks/LpScrollArea-MyEnVB_5.js";
|
|
11
11
|
import MenuShortcut from "./MenuShortcut.vue.js";
|
|
12
12
|
import { staggerDelay } from "./reveal.js";
|
|
13
13
|
import { usePersisted } from "../composables/usePersisted.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
fade?: boolean;
|
|
3
3
|
instant?: boolean;
|
|
4
|
+
floating?: boolean;
|
|
4
5
|
contentClass?: string;
|
|
5
6
|
barInsetTop?: string;
|
|
6
7
|
};
|
|
@@ -17,6 +18,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
17
18
|
}>, {
|
|
18
19
|
fade: boolean;
|
|
19
20
|
instant: boolean;
|
|
21
|
+
floating: boolean;
|
|
20
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
24
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString, createTextVNode, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import LpKeys from "./LpKeys.vue.js";
|
|
3
|
-
import { _ as _sfc_main$1 } from "../chunks/LpModal-
|
|
3
|
+
import { _ as _sfc_main$1 } from "../chunks/LpModal-CoGhLTyH.js";
|
|
4
4
|
import { mergeShortcutGroups, activeShortcuts, useHotkeys } from "../composables/useHotkeys.js";
|
|
5
5
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
6
6
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
@@ -10,7 +10,7 @@ import { _ as _sfc_main$3 } from "../chunks/LpIcon--5WSb3jJ.js";
|
|
|
10
10
|
import { _ as _sfc_main$c } from "../chunks/LpSkeleton-BB6XIV-w.js";
|
|
11
11
|
import { _ as _sfc_main$e } from "../chunks/LpPagination-BIIiYHXR.js";
|
|
12
12
|
import { _ as _sfc_main$a } from "../chunks/LpPopover-DmZ3wUtP.js";
|
|
13
|
-
import { _ as _sfc_main$7 } from "../chunks/LpScrollArea-
|
|
13
|
+
import { _ as _sfc_main$7 } from "../chunks/LpScrollArea-MyEnVB_5.js";
|
|
14
14
|
import { _ as _sfc_main$6 } from "../chunks/LpRollingText-B54Pje7P.js";
|
|
15
15
|
import { _ as _sfc_main$4 } from "../chunks/LpShift-CCq7dofl.js";
|
|
16
16
|
import { _ as _sfc_main$b } from "../chunks/LpTableFilter-CiVBpaq0.js";
|
|
@@ -11,6 +11,7 @@ const fresh = {
|
|
|
11
11
|
closed: /* @__PURE__ */ new Map(),
|
|
12
12
|
dead: /* @__PURE__ */ new Map(),
|
|
13
13
|
silent: 0,
|
|
14
|
+
keep: null,
|
|
14
15
|
waiting: [],
|
|
15
16
|
href: "",
|
|
16
17
|
serial: 0,
|
|
@@ -75,6 +76,9 @@ function handlePop(event) {
|
|
|
75
76
|
s.href = location.href;
|
|
76
77
|
if (s.silent > 0) {
|
|
77
78
|
s.silent--;
|
|
79
|
+
const keep = s.silent === 0 ? s.keep : null;
|
|
80
|
+
if (s.silent === 0) s.keep = null;
|
|
81
|
+
if (keep && keep.href !== location.href) restore(keep, event);
|
|
78
82
|
if (before === location.href) event.stopImmediatePropagation();
|
|
79
83
|
flushWaiting();
|
|
80
84
|
return;
|
|
@@ -121,6 +125,14 @@ function handlePop(event) {
|
|
|
121
125
|
leavePage();
|
|
122
126
|
}
|
|
123
127
|
}
|
|
128
|
+
function restore(keep, event) {
|
|
129
|
+
const mark = markOf(event.state);
|
|
130
|
+
const base = keep.state && typeof keep.state === "object" ? { ...keep.state } : {};
|
|
131
|
+
delete base[KEY];
|
|
132
|
+
own(() => history.replaceState(mark ? { ...base, [KEY]: mark } : base, "", keep.href));
|
|
133
|
+
s.href = location.href;
|
|
134
|
+
event.stopImmediatePropagation();
|
|
135
|
+
}
|
|
124
136
|
const DEAD_LIMIT = 200;
|
|
125
137
|
function bury(item) {
|
|
126
138
|
s.dead.set(item.token, item);
|
|
@@ -217,6 +229,7 @@ function dropEntry(entry) {
|
|
|
217
229
|
const positioned = onTop();
|
|
218
230
|
const removed = s.live.splice(at);
|
|
219
231
|
if (positioned) {
|
|
232
|
+
s.keep = { href: location.href, state: history.state };
|
|
220
233
|
silentGo(-removed.length);
|
|
221
234
|
return;
|
|
222
235
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _ } from "./chunks/LayoutCanvas-CNOAUk7D.js";
|
|
2
|
-
import { _ as _2 } from "./chunks/LpAddressInput-
|
|
2
|
+
import { _ as _2 } from "./chunks/LpAddressInput-sYMvYzcY.js";
|
|
3
3
|
import { _ as _3 } from "./chunks/LpMapPicker-DRGgh89B.js";
|
|
4
4
|
import { OSM_TILES, createNominatimProvider, emptyAddress, formatAddress, project, tileUrl, unproject } from "./components/address.js";
|
|
5
5
|
import { _ as _4 } from "./chunks/LpActionBar-BP1ld7-S.js";
|
|
6
6
|
import { _ as _5 } from "./chunks/LpAlert-n5XPAZfv.js";
|
|
7
|
-
import { _ as _6 } from "./chunks/LpAppShell-
|
|
7
|
+
import { _ as _6 } from "./chunks/LpAppShell-Dgejipzz.js";
|
|
8
8
|
import { _ as _7 } from "./chunks/LpAutocomplete-DOu7FN5P.js";
|
|
9
9
|
import { _ as _8 } from "./chunks/LpAvatar-Cg6Az3wz.js";
|
|
10
10
|
import { _ as _9 } from "./chunks/LpBadge-wUYLN4U9.js";
|
|
@@ -30,8 +30,8 @@ import { default as default6 } from "./components/LpPaletteStats.vue.js";
|
|
|
30
30
|
import { default as default7 } from "./components/LpPaletteSwatches.vue.js";
|
|
31
31
|
import { default as default8 } from "./components/LpKeys.vue.js";
|
|
32
32
|
import { comboKeys, comboSteps } from "./components/keys.js";
|
|
33
|
-
import { _ as _18 } from "./chunks/LpConfirmDialog-
|
|
34
|
-
import { _ as _19 } from "./chunks/LpConfirmHost-
|
|
33
|
+
import { _ as _18 } from "./chunks/LpConfirmDialog-DlD45Bi_.js";
|
|
34
|
+
import { _ as _19 } from "./chunks/LpConfirmHost-BIWjBLmI.js";
|
|
35
35
|
import { confirm, useConfirm } from "./components/confirm.js";
|
|
36
36
|
import { _ as _20 } from "./chunks/LpContextMenu-rx2tCjwk.js";
|
|
37
37
|
import { _ as _21 } from "./chunks/LpDatePicker-CA0QTfBC.js";
|
|
@@ -40,11 +40,11 @@ import { _ as _23 } from "./chunks/LpRangeCalendar-CYYUYqJ7.js";
|
|
|
40
40
|
import { clampRange, dayAllowed, defaultDatePresets, defaultRangePresets, formatRange, normalizeRange, sameRange } from "./components/dateRange.js";
|
|
41
41
|
import { _ as _24 } from "./chunks/LpDisclosure-Cpa7Hc5T.js";
|
|
42
42
|
import { _ as _25 } from "./chunks/LpDivider-CUX46KR0.js";
|
|
43
|
-
import { _ as _26 } from "./chunks/LpDrawer-
|
|
43
|
+
import { _ as _26 } from "./chunks/LpDrawer-CrG8t_KP.js";
|
|
44
44
|
import { _ as _27 } from "./chunks/LpDropdownMenu-Dl7Z4ZhS.js";
|
|
45
45
|
import { default as default9 } from "./components/LpDropzone.vue.js";
|
|
46
46
|
import { _ as _28 } from "./chunks/LpEmptyState-EQHiRYhG.js";
|
|
47
|
-
import { _ as _29 } from "./chunks/LpFileTree-
|
|
47
|
+
import { _ as _29 } from "./chunks/LpFileTree-CooHinsC.js";
|
|
48
48
|
import { ancestorIds, checkStateOf, checkedCount, computeStats, fileIcon, formatModified, formatSize, sortNodes, subtreeIds, subtreeSize } from "./components/fileTree.js";
|
|
49
49
|
import { _ as _30 } from "./chunks/LpFieldNotice-CzQ2_5rQ.js";
|
|
50
50
|
import { _ as _31 } from "./chunks/LpFormField-Ch69Jd-X.js";
|
|
@@ -56,12 +56,12 @@ import { _ as _34 } from "./chunks/LpInput-Tw-yxT4I.js";
|
|
|
56
56
|
import { _ as _35 } from "./chunks/LpLightbox-B95yu22B.js";
|
|
57
57
|
import { fileNameOf } from "./components/lightbox.js";
|
|
58
58
|
import { _ as _36 } from "./chunks/LpLink-Krkjhe_y.js";
|
|
59
|
-
import { _ as _37 } from "./chunks/LpLogViewer-
|
|
59
|
+
import { _ as _37 } from "./chunks/LpLogViewer-ngqkns4m.js";
|
|
60
60
|
import { countLevels, matchPositions, matchesTerm, ringWindow, stepMatch } from "./components/logSearch.js";
|
|
61
61
|
import { _ as _38 } from "./chunks/LpMediaGallery-Bkram-MO.js";
|
|
62
|
-
import { _ as _39 } from "./chunks/LpModal-
|
|
63
|
-
import { _ as _40 } from "./chunks/LpModalNav-
|
|
64
|
-
import { _ as _41 } from "./chunks/LpNotificationBell-
|
|
62
|
+
import { _ as _39 } from "./chunks/LpModal-CoGhLTyH.js";
|
|
63
|
+
import { _ as _40 } from "./chunks/LpModalNav-BGvs2y5Q.js";
|
|
64
|
+
import { _ as _41 } from "./chunks/LpNotificationBell-B0034Lk-.js";
|
|
65
65
|
import { _ as _42 } from "./chunks/LpNumberField-e0IBkWU1.js";
|
|
66
66
|
import { _ as _43 } from "./chunks/LpTimeField-BawSVsmt.js";
|
|
67
67
|
import { _ as _44 } from "./chunks/LpNumberFlow-Vqj0tP7B.js";
|
|
@@ -76,7 +76,7 @@ import { _ as _51 } from "./chunks/LpProgress-Yr6ONG5t.js";
|
|
|
76
76
|
import { _ as _52 } from "./chunks/LpRadio-CWA5Eb3M.js";
|
|
77
77
|
import { _ as _53 } from "./chunks/LpRadioGroup-ggaPL92T.js";
|
|
78
78
|
import { _ as _54 } from "./chunks/LpRollingText-B54Pje7P.js";
|
|
79
|
-
import { _ as _55 } from "./chunks/LpScrollArea-
|
|
79
|
+
import { _ as _55 } from "./chunks/LpScrollArea-MyEnVB_5.js";
|
|
80
80
|
import { _ as _56 } from "./chunks/LpSegmented-CeACsMMA.js";
|
|
81
81
|
import { _ as _57 } from "./chunks/LpSection-DFK_uoJE.js";
|
|
82
82
|
import { _ as _58 } from "./chunks/LpSelect-Cxq4yBGd.js";
|
|
@@ -86,7 +86,7 @@ import { _ as _60 } from "./chunks/LpShift-CCq7dofl.js";
|
|
|
86
86
|
import { _ as _61 } from "./chunks/LpSwap-C96c0LWh.js";
|
|
87
87
|
import { _ as _62 } from "./chunks/LpHintExample-9Py0wc-L.js";
|
|
88
88
|
import { default as default11 } from "./components/LpShortcutsDialog.vue.js";
|
|
89
|
-
import { _ as _63 } from "./chunks/LpSidebar-
|
|
89
|
+
import { _ as _63 } from "./chunks/LpSidebar-DzE1783C.js";
|
|
90
90
|
import { _ as _64 } from "./chunks/LpContextSwitcher-Dwh6dyID.js";
|
|
91
91
|
import { _ as _65 } from "./chunks/LpSkeleton-BB6XIV-w.js";
|
|
92
92
|
import { _ as _66 } from "./chunks/LpSlider-DxYoCJJO.js";
|
package/package.json
CHANGED
|
@@ -23,6 +23,10 @@ import { prefersReducedMotion } from "../composables/easing"
|
|
|
23
23
|
// `contentClass` styles the scrollable CONTENT container (the viewport's inner
|
|
24
24
|
// wrapper) — put list layout here (display:grid / gap / padding), not on the
|
|
25
25
|
// component root, since items live inside reka's viewport.
|
|
26
|
+
// `floating` is for a region that sits inside a card or a panel rather than
|
|
27
|
+
// against a wall: the bar keeps a gap from the edge and its thumb is rounded at
|
|
28
|
+
// both ends. Flush to a wall, a half-rounded thumb reads as part of the frame;
|
|
29
|
+
// in the middle of a card the same thumb looks sliced off.
|
|
26
30
|
// `barInsetTop` (any CSS length) pulls the vertical scrollbar down by that much,
|
|
27
31
|
// so it doesn't run under a sticky header pinned at the top of the viewport.
|
|
28
32
|
// Wheel and keyboard scrolling ease by default. `instant` opts back out, and
|
|
@@ -35,10 +39,11 @@ const props = withDefaults(
|
|
|
35
39
|
defineProps<{
|
|
36
40
|
fade?: boolean
|
|
37
41
|
instant?: boolean
|
|
42
|
+
floating?: boolean
|
|
38
43
|
contentClass?: string
|
|
39
44
|
barInsetTop?: string
|
|
40
45
|
}>(),
|
|
41
|
-
{ fade: true, instant: false },
|
|
46
|
+
{ fade: true, instant: false, floating: false },
|
|
42
47
|
)
|
|
43
48
|
|
|
44
49
|
// Re-emit the native scroll event of the underlying viewport so consumers that
|
|
@@ -251,8 +256,8 @@ function onThumbPointerDown() {
|
|
|
251
256
|
<ScrollAreaScrollbar
|
|
252
257
|
orientation="vertical"
|
|
253
258
|
force-mount
|
|
254
|
-
class="group z-1 flex
|
|
255
|
-
:class="barFade"
|
|
259
|
+
class="group z-1 flex touch-none select-none justify-end pl-2.5"
|
|
260
|
+
:class="[barFade, floating ? 'w-4 py-1 pr-1' : 'w-3.5 py-px pr-px']"
|
|
256
261
|
:style="barInsetTop ? { marginTop: barInsetTop } : undefined"
|
|
257
262
|
@pointerdown.capture="onTrackPointerDown($event, 'y')"
|
|
258
263
|
>
|
|
@@ -264,20 +269,22 @@ function onThumbPointerDown() {
|
|
|
264
269
|
the positioning reka owns. -->
|
|
265
270
|
<ScrollAreaThumb
|
|
266
271
|
data-lp-thumb
|
|
267
|
-
class="relative min-w-1
|
|
272
|
+
class="relative min-w-1 bg-brand/40 before:absolute before:inset-y-0 before:right-0 before:-left-2.5 before:content-[''] transition-[min-width,background-color] duration-[var(--duration-fast)] group-hover:min-w-1.5 group-hover:bg-brand"
|
|
273
|
+
:class="floating ? 'rounded-pill' : 'rounded-l-pill'"
|
|
268
274
|
@pointerdown="onThumbPointerDown"
|
|
269
275
|
/>
|
|
270
276
|
</ScrollAreaScrollbar>
|
|
271
277
|
|
|
272
278
|
<ScrollAreaScrollbar
|
|
273
279
|
orientation="horizontal"
|
|
274
|
-
class="group z-1 flex
|
|
275
|
-
:class="barFade"
|
|
280
|
+
class="group z-1 flex flex-col touch-none select-none justify-end pt-2.5"
|
|
281
|
+
:class="[barFade, floating ? 'h-4 px-1 pb-1' : 'h-3.5 px-px pb-px']"
|
|
276
282
|
@pointerdown.capture="onTrackPointerDown($event, 'x')"
|
|
277
283
|
>
|
|
278
284
|
<ScrollAreaThumb
|
|
279
285
|
data-lp-thumb
|
|
280
|
-
class="relative min-h-1
|
|
286
|
+
class="relative min-h-1 bg-brand/40 before:absolute before:inset-x-0 before:bottom-0 before:-top-2.5 before:content-[''] transition-[min-height,background-color] duration-[var(--duration-fast)] group-hover:min-h-1.5 group-hover:bg-brand"
|
|
287
|
+
:class="floating ? 'rounded-pill' : 'rounded-t-pill'"
|
|
281
288
|
@pointerdown="onThumbPointerDown"
|
|
282
289
|
/>
|
|
283
290
|
</ScrollAreaScrollbar>
|
|
@@ -31,6 +31,11 @@
|
|
|
31
31
|
* entries keep working once Back returns past it.
|
|
32
32
|
* - Someone else's `replaceState` on a kit entry keeps the kit's key, so a
|
|
33
33
|
* router saving its scroll position does not orphan the entry.
|
|
34
|
+
* - An app that keeps an overlay in its query through `replace` rewrites the
|
|
35
|
+
* address of the kit's entry when the overlay closes, and the entry under it
|
|
36
|
+
* still holds the old one. Taking the entry out lands there, so the address
|
|
37
|
+
* the app left is put back on it and the step never reaches the router:
|
|
38
|
+
* handed over, it would navigate to the old query and open the overlay again.
|
|
34
39
|
*/
|
|
35
40
|
|
|
36
41
|
const KEY = "__lpOverlay"
|
|
@@ -79,6 +84,8 @@ interface EngineState {
|
|
|
79
84
|
dead: Map<string, Tracked>
|
|
80
85
|
/** Pops the kit started itself and swallows on arrival. */
|
|
81
86
|
silent: number
|
|
87
|
+
/** What the page showed before the kit took entries out, to be kept where the step lands. */
|
|
88
|
+
keep: { href: string; state: unknown } | null
|
|
82
89
|
waiting: Array<() => void>
|
|
83
90
|
href: string
|
|
84
91
|
serial: number
|
|
@@ -98,6 +105,7 @@ const fresh: EngineState = {
|
|
|
98
105
|
closed: new Map(),
|
|
99
106
|
dead: new Map(),
|
|
100
107
|
silent: 0,
|
|
108
|
+
keep: null,
|
|
101
109
|
waiting: [],
|
|
102
110
|
href: "",
|
|
103
111
|
serial: 0,
|
|
@@ -174,6 +182,9 @@ function handlePop(event: PopStateEvent) {
|
|
|
174
182
|
s.href = location.href
|
|
175
183
|
if (s.silent > 0) {
|
|
176
184
|
s.silent--
|
|
185
|
+
const keep = s.silent === 0 ? s.keep : null
|
|
186
|
+
if (s.silent === 0) s.keep = null
|
|
187
|
+
if (keep && keep.href !== location.href) restore(keep, event)
|
|
177
188
|
if (before === location.href) event.stopImmediatePropagation()
|
|
178
189
|
flushWaiting()
|
|
179
190
|
return
|
|
@@ -229,6 +240,16 @@ function handlePop(event: PopStateEvent) {
|
|
|
229
240
|
}
|
|
230
241
|
}
|
|
231
242
|
|
|
243
|
+
/* The address the app left on the entry the kit took out, put back where the step landed. */
|
|
244
|
+
function restore(keep: { href: string; state: unknown }, event: PopStateEvent) {
|
|
245
|
+
const mark = markOf(event.state)
|
|
246
|
+
const base = keep.state && typeof keep.state === "object" ? { ...(keep.state as Record<string, unknown>) } : {}
|
|
247
|
+
delete base[KEY]
|
|
248
|
+
own(() => history.replaceState(mark ? { ...base, [KEY]: mark } : base, "", keep.href))
|
|
249
|
+
s.href = location.href
|
|
250
|
+
event.stopImmediatePropagation()
|
|
251
|
+
}
|
|
252
|
+
|
|
232
253
|
/* Buried entries are kept by token; the oldest go first, history this deep is never walked back. */
|
|
233
254
|
const DEAD_LIMIT = 200
|
|
234
255
|
function bury(item: Tracked) {
|
|
@@ -364,6 +385,7 @@ export function dropEntry(entry: HistoryEntry): void {
|
|
|
364
385
|
const positioned = onTop()
|
|
365
386
|
const removed = s.live.splice(at)
|
|
366
387
|
if (positioned) {
|
|
388
|
+
s.keep = { href: location.href, state: history.state }
|
|
367
389
|
silentGo(-removed.length)
|
|
368
390
|
return
|
|
369
391
|
}
|