@leavepulse/ui 0.72.5 → 0.73.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 (67) hide show
  1. package/dist/assets/{LpNumberFlow-Chp9pEDe.css → LpNumberFlow-P1balINP.css} +1 -1
  2. package/dist/chunks/{LpAppShell-DMSJg18Q.js → LpAppShell-rr5kqiK3.js} +8 -2
  3. package/dist/chunks/{LpCodeDisplay-AQx-3nNb.js → LpCodeDisplay-CE9TxCA4.js} +1 -1
  4. package/dist/chunks/{LpCommandScope-BlKcgBnK.js → LpCommandScope-CtUhJe8T.js} +1 -1
  5. package/dist/chunks/{LpCountdown-BxE7stYk.js → LpCountdown-DgeY3cLG.js} +1 -1
  6. package/dist/chunks/{LpGauge-BO1PYYqD.js → LpGauge-KZaQ_FDR.js} +1 -1
  7. package/dist/chunks/{LpModalNav-CE3iLnxB.js → LpModalNav-DQpV2kdn.js} +1 -1
  8. package/dist/chunks/{LpNumberFlow-CcxEGUy0.js → LpNumberFlow-Vqj0tP7B.js} +1 -1
  9. package/dist/chunks/{LpPaletteTheme-CdEEMMEF.js → LpPaletteTheme-DiLYKQiZ.js} +1 -1
  10. package/dist/chunks/{LpPie-Mr3EtFEd.js → LpPie-DrZepi0p.js} +1 -1
  11. package/dist/chunks/{LpProgress-rOlyafqp.js → LpProgress-Yr6ONG5t.js} +1 -1
  12. package/dist/chunks/{LpQuota-B12yijdB.js → LpQuota-Dk2MyI2Z.js} +1 -1
  13. package/dist/chunks/{LpSidebar-BciLMBgY.js → LpSidebar-BoNLKgh-.js} +1 -1
  14. package/dist/chunks/{LpSidebarNav-HYcG-ib8.js → LpSidebarNav-Bky8chrv.js} +1 -1
  15. package/dist/chunks/{LpSidebarRow-Di2VYz-Z.js → LpSidebarRow-BRYhNDSo.js} +1 -1
  16. package/dist/chunks/{LpStat-D6V6Fdfc.js → LpStat-BVf2UvEc.js} +1 -1
  17. package/dist/chunks/{LpTableOfContents-CraicEs4.js → LpTableOfContents-BN5zvpnx.js} +2 -2
  18. package/dist/chunks/{LpThemeStudio-BJDKf3_Z.js → LpThemeStudio-BpORDvH6.js} +1 -1
  19. package/dist/chunks/{LpThemeSwitcher-BDrIJswA.js → LpThemeSwitcher-BnEn_mvf.js} +2 -2
  20. package/dist/chunks/{LpUptimeBar-BtkZRwY0.js → LpUptimeBar-DqNvvMBK.js} +1 -1
  21. package/dist/chunks/{palette-Cvxl_1tM.js → palette-Co8tSASo.js} +1 -1
  22. package/dist/components/LpAppShell.vue.d.ts +20 -0
  23. package/dist/components/LpAppShell.vue.js +1 -1
  24. package/dist/components/LpCodeDisplay.vue.js +1 -1
  25. package/dist/components/LpCommandScope.vue.js +1 -1
  26. package/dist/components/LpCountdown.vue.js +1 -1
  27. package/dist/components/LpGauge.vue.js +1 -1
  28. package/dist/components/LpModalNav.vue.js +1 -1
  29. package/dist/components/LpNumberFlow.vue.js +1 -1
  30. package/dist/components/LpPaletteStats.vue.js +1 -1
  31. package/dist/components/LpPaletteTheme.vue.js +1 -1
  32. package/dist/components/LpPie.vue.js +1 -1
  33. package/dist/components/LpProgress.vue.js +1 -1
  34. package/dist/components/LpQuota.vue.js +1 -1
  35. package/dist/components/LpSidebar.vue.js +1 -1
  36. package/dist/components/LpSidebarNav.vue.js +1 -1
  37. package/dist/components/LpSidebarRow.vue.js +1 -1
  38. package/dist/components/LpStat.vue.js +1 -1
  39. package/dist/components/LpTableOfContents.vue.js +1 -1
  40. package/dist/components/LpThemeStudio.vue.js +1 -1
  41. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  42. package/dist/components/LpUptimeBar.vue.js +1 -1
  43. package/dist/components/commandSearch.d.ts +2 -1
  44. package/dist/components/commandSearch.js +15 -6
  45. package/dist/components/format.d.ts +6 -6
  46. package/dist/components/quota.d.ts +1 -1
  47. package/dist/components/timeSpan.d.ts +1 -1
  48. package/dist/composables/scroll.d.ts +2 -0
  49. package/dist/composables/scroll.js +4 -0
  50. package/dist/composables/scrollMemory.d.ts +1 -0
  51. package/dist/composables/scrollMemory.js +111 -0
  52. package/dist/index.js +18 -18
  53. package/dist/theme/palette.d.ts +2 -1
  54. package/package.json +1 -1
  55. package/src/components/LpAppShell.vue +18 -2
  56. package/src/components/LpNumberFlow.vue +3 -3
  57. package/src/components/LpStat.vue +1 -1
  58. package/src/components/LpTableOfContents.vue +4 -2
  59. package/src/components/commandSearch.ts +17 -6
  60. package/src/components/format.ts +9 -9
  61. package/src/components/quota.ts +1 -1
  62. package/src/components/timeSpan.ts +1 -1
  63. package/src/composables/scroll.ts +5 -0
  64. package/src/composables/scrollMemory.ts +145 -0
  65. package/src/composables/useLocale.ts +1 -1
  66. package/src/nuxt.ts +1 -14
  67. package/src/theme/palette.ts +3 -3
@@ -81,7 +81,7 @@
81
81
  /* Faded, so a held-open column reads as an empty wheel rather than a zero the
82
82
  number actually has. */
83
83
  /*
84
- * A space separator (ru, fr, …) takes a whole column in a monospaced or
84
+ * A space separator (fr, pl, …) takes a whole column in a monospaced or
85
85
  * tabular face, so "7 271" read as "7 271". It is drawn as the narrow gap
86
86
  * the locale means.
87
87
  */
@@ -1,11 +1,12 @@
1
1
  import { defineComponent, computed, useModel, ref, useId, onMounted, watch, openBlock, createElementBlock, mergeProps, unref, createElementVNode, withModifiers, toDisplayString, createVNode, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, normalizeClass, withDirectives, vShow, createBlock, Teleport, createCommentVNode, mergeModels } from "vue";
2
2
  import { useLabels } from "../composables/useLpConfig.js";
3
+ import { useScrollMemory } from "../composables/scrollMemory.js";
3
4
  import { _ as _sfc_main$6 } from "./LpBottomNav-CbNQQPuL.js";
4
5
  import { _ as _sfc_main$2 } from "./LpButton-CFb44IjC.js";
5
6
  import { _ as _sfc_main$3 } from "./LpIcon--5WSb3jJ.js";
6
7
  import { _ as _sfc_main$5 } from "./LpScrollArea-Hz3-JWUG.js";
7
8
  import { _ as _sfc_main$4 } from "./LpShift-CCq7dofl.js";
8
- import { _ as _sfc_main$1 } from "./LpSidebar-BciLMBgY.js";
9
+ import { _ as _sfc_main$1 } from "./LpSidebar-BoNLKgh-.js";
9
10
  import { useMergedAttrs, mergeClass } from "../composables/useMergedClass.js";
10
11
  const _hoisted_1 = ["href"];
11
12
  const _hoisted_2 = { class: "flex min-w-0 flex-1 flex-col" };
@@ -22,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
23
  autoCollapseAfter: {},
23
24
  modelValue: {},
24
25
  path: {},
26
+ hash: {},
25
27
  isActive: {},
26
28
  title: {},
27
29
  mobileBreakpoint: { default: "lg" },
@@ -88,9 +90,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88
90
  () => props.path,
89
91
  () => {
90
92
  if (drawerOpen.value) drawerOpen.value = false;
91
- scrollArea.value?.viewportEl?.scrollTo({ top: 0, left: 0, behavior: "instant" });
92
93
  }
93
94
  );
95
+ useScrollMemory(
96
+ () => bleeding.value ? null : scrollArea.value?.viewportEl,
97
+ () => props.path,
98
+ () => props.hash
99
+ );
94
100
  function onSelect(item) {
95
101
  emit("select", item);
96
102
  }
@@ -4,7 +4,7 @@ import { useMergedAttrs } from "../composables/useMergedClass.js";
4
4
  import { useNow } from "../composables/useNow.js";
5
5
  import { _ as _sfc_main$6 } from "./LpCheckbox-Cs4SHaHX.js";
6
6
  import { _ as _sfc_main$3 } from "./LpCopyButton-xF7wFVoU.js";
7
- import { _ as _sfc_main$5 } from "./LpCountdown-BxE7stYk.js";
7
+ import { _ as _sfc_main$5 } from "./LpCountdown-DgeY3cLG.js";
8
8
  import { _ as _sfc_main$4 } from "./LpIcon--5WSb3jJ.js";
9
9
  import { _ as _sfc_main$1 } from "./LpRollingText-B54Pje7P.js";
10
10
  import { _ as _sfc_main$2 } from "./RevealToggle-BEit1n6Z.js";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, renderSlot } from "vue";
2
2
  import { usePaletteScope, createPaletteRegistry, providePaletteScope, usePaletteCommands, bindPaletteScopeElement } from "../composables/usePaletteCommands.js";
3
- import { u as usePaletteTheme } from "./palette-Cvxl_1tM.js";
3
+ import { u as usePaletteTheme } from "./palette-Co8tSASo.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "LpCommandScope",
6
6
  props: {
@@ -2,7 +2,7 @@ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, m
2
2
  import { useLabels } from "../composables/useLpConfig.js";
3
3
  import { useMergedAttrs } from "../composables/useMergedClass.js";
4
4
  import { useNow } from "../composables/useNow.js";
5
- import { _ as _sfc_main$1 } from "./LpProgress-rOlyafqp.js";
5
+ import { _ as _sfc_main$1 } from "./LpProgress-Yr6ONG5t.js";
6
6
  import { _ as _sfc_main$3 } from "./LpRollingText-B54Pje7P.js";
7
7
  import { _ as _sfc_main$2 } from "./LpShift-CCq7dofl.js";
8
8
  import { DEFAULT_UNIT_LABELS, toEpoch, ceilToSecond, timeParts, resolveFormat, padPart, formatTime, DEFAULT_MILESTONES, crossedMilestone, msToNextSecond } from "../components/timeSpan.js";
@@ -3,7 +3,7 @@ import { useLabels } from "../composables/useLpConfig.js";
3
3
  import { useLocale } from "../composables/useLocale.js";
4
4
  import { useMergedAttrs } from "../composables/useMergedClass.js";
5
5
  import { useRevealedValue } from "../composables/useRevealedValue.js";
6
- import { _ as _sfc_main$1 } from "./LpNumberFlow-CcxEGUy0.js";
6
+ import { _ as _sfc_main$1 } from "./LpNumberFlow-Vqj0tP7B.js";
7
7
  import { _ as _sfc_main$2 } from "./LpRollingText-B54Pje7P.js";
8
8
  import { capacityThresholds, toneAt, GAUGE_SWEEP, arcPath, meterFraction, polar } from "../components/meter.js";
9
9
  import { toneLook } from "../components/tone.js";
@@ -4,7 +4,7 @@ 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
6
  import { _ as _sfc_main$1 } from "./LpModal-BnjZ2iem.js";
7
- import { _ as _sfc_main$4 } from "./LpSidebar-BciLMBgY.js";
7
+ import { _ as _sfc_main$4 } from "./LpSidebar-BoNLKgh-.js";
8
8
  const _hoisted_1 = { class: "flex items-center gap-2" };
9
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  __name: "LpModalNav",
@@ -3,7 +3,7 @@ import { prefersReducedMotion, easeOut } from "../composables/easing.js";
3
3
  import { useLocale } from "../composables/useLocale.js";
4
4
  import { decimalMark, compactNumber } from "../components/format.js";
5
5
  import { useRevealedValue } from "../composables/useRevealedValue.js";
6
- import '../assets/LpNumberFlow-Chp9pEDe.css';const _hoisted_1 = { class: "sr-only" };
6
+ import '../assets/LpNumberFlow-P1balINP.css';const _hoisted_1 = { class: "sr-only" };
7
7
  const _hoisted_2 = {
8
8
  key: 0,
9
9
  "aria-hidden": "true",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString, unref } from "vue";
2
2
  import { useLabels } from "../composables/useLpConfig.js";
3
3
  import { suppressPaletteDiscovery } from "../composables/usePaletteCommands.js";
4
- import { _ as _sfc_main$4 } from "./LpThemeStudio-BJDKf3_Z.js";
4
+ import { _ as _sfc_main$4 } from "./LpThemeStudio-BpORDvH6.js";
5
5
  import { _ as _sfc_main$2 } from "./LpThemeProvider-8MG6yqU9.js";
6
6
  import { _ as _sfc_main$1 } from "./LpButton-CFb44IjC.js";
7
7
  import { _ as _sfc_main$3 } from "./LpInput-Tw-yxT4I.js";
@@ -6,7 +6,7 @@ import { resolveSlices, arcPath, calloutLabels, formatTick } from "../components
6
6
  import { _ as _sfc_main$9 } from "./LegendSwatch-BhRjrtzv.js";
7
7
  import { _ as _sfc_main$4 } from "./LpContextMenu-rx2tCjwk.js";
8
8
  import { _ as _sfc_main$3 } from "./LpEmptyState-EQHiRYhG.js";
9
- import { _ as _sfc_main$6 } from "./LpNumberFlow-CcxEGUy0.js";
9
+ import { _ as _sfc_main$6 } from "./LpNumberFlow-Vqj0tP7B.js";
10
10
  import { _ as _sfc_main$7 } from "./LpRollingText-B54Pje7P.js";
11
11
  import { _ as _sfc_main$8 } from "./LpShift-CCq7dofl.js";
12
12
  import { _ as _sfc_main$2 } from "./LpSkeleton-BB6XIV-w.js";
@@ -2,7 +2,7 @@ import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, w
2
2
  import { ProgressRoot, ProgressIndicator } from "reka-ui";
3
3
  import { useMergedAttrs } from "../composables/useMergedClass.js";
4
4
  import { useRevealedValue } from "../composables/useRevealedValue.js";
5
- import { _ as _sfc_main$1 } from "./LpNumberFlow-CcxEGUy0.js";
5
+ import { _ as _sfc_main$1 } from "./LpNumberFlow-Vqj0tP7B.js";
6
6
  import { meterFraction, toneAt, capacityThresholds, METER_HEADER, METER_TRACK } from "../components/meter.js";
7
7
  import { toneLook } from "../components/tone.js";
8
8
  const _hoisted_1 = ["width", "height"];
@@ -4,7 +4,7 @@ import { useLocale } from "../composables/useLocale.js";
4
4
  import { useMergedAttrs } from "../composables/useMergedClass.js";
5
5
  import { useRevealedValue } from "../composables/useRevealedValue.js";
6
6
  import { _ as _sfc_main$2 } from "./LpIcon--5WSb3jJ.js";
7
- import { _ as _sfc_main$1 } from "./LpNumberFlow-CcxEGUy0.js";
7
+ import { _ as _sfc_main$1 } from "./LpNumberFlow-Vqj0tP7B.js";
8
8
  import { _ as _sfc_main$3 } from "./LpRollingText-B54Pje7P.js";
9
9
  import { METER_HEADER, METER_TRACK } from "../components/meter.js";
10
10
  import { quotaState, quotaSegments, formatAmount } from "../components/quota.js";
@@ -6,7 +6,7 @@ import { _ as _sfc_main$5 } from "./LpDrawer-RRamxbLV.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-HYcG-ib8.js";
9
+ import { _ as _sfc_main$4 } from "./LpSidebarNav-Bky8chrv.js";
10
10
  const _hoisted_1 = ["data-compact", "aria-label"];
11
11
  const _hoisted_2 = {
12
12
  key: 0,
@@ -10,7 +10,7 @@ import '../assets/MenuShortcut-Cyub0frr.css';import '../assets/LpKeys-C5VMcBOW.c
10
10
  /* empty css */
11
11
  import { _ as _sfc_main$2 } from "./LpScrollArea-Hz3-JWUG.js";
12
12
  import { _ as _sfc_main$1 } from "./LpSkeleton-BB6XIV-w.js";
13
- import { _ as _sfc_main$3 } from "./LpSidebarRow-Di2VYz-Z.js";
13
+ import { _ as _sfc_main$3 } from "./LpSidebarRow-BRYhNDSo.js";
14
14
  import { waiting } from "../components/sidebar.js";
15
15
  import { useMergedAttrs } from "../composables/useMergedClass.js";
16
16
  const _hoisted_1 = {
@@ -8,7 +8,7 @@ import { _ as _sfc_main$4 } from "./LpContextMenu-rx2tCjwk.js";
8
8
  import { _ as _sfc_main$1 } from "./LpHoverCard-spGxyw7T.js";
9
9
  import { _ as _sfc_main$3 } from "./LpIcon--5WSb3jJ.js";
10
10
  import LpKeys from "../components/LpKeys.vue.js";
11
- import { _ as _sfc_main$5 } from "./LpNumberFlow-CcxEGUy0.js";
11
+ import { _ as _sfc_main$5 } from "./LpNumberFlow-Vqj0tP7B.js";
12
12
  import { waiting } from "../components/sidebar.js";
13
13
  import { resolveLink } from "../components/link.js";
14
14
  const _hoisted_1 = { class: "relative flex flex-col" };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, mergeProps, unref, createElementVNode, createBlock, createCommentVNode, createVNode, Transition, normalizeProps, guardReactiveProps, withCtx, toDisplayString, Fragment, createTextVNode, normalizeClass, renderSlot } from "vue";
2
2
  import { _ as _sfc_main$2 } from "./LpIcon--5WSb3jJ.js";
3
- import { _ as _sfc_main$4 } from "./LpNumberFlow-CcxEGUy0.js";
3
+ import { _ as _sfc_main$4 } from "./LpNumberFlow-Vqj0tP7B.js";
4
4
  import { _ as _sfc_main$3 } from "./LpSkeleton-BB6XIV-w.js";
5
5
  import { _ as _sfc_main$1 } from "./LpStatus-DglxttQ7.js";
6
6
  import { useMergedAttrs } from "../composables/useMergedClass.js";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, useId, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, normalizeStyle, normalizeClass, createBlock, unref, createCommentVNode, createTextVNode } from "vue";
2
2
  import { Motion } from "motion-v";
3
3
  import { useLabels } from "../composables/useLpConfig.js";
4
- import { scrollParent, atScrollEnd } from "../composables/scroll.js";
4
+ import { scrollParent, scrollToElement, scrollMarginTop, atScrollEnd } from "../composables/scroll.js";
5
5
  import { usePillTransition } from "../composables/usePillTransition.js";
6
6
  const _hoisted_1 = ["aria-label"];
7
7
  const _hoisted_2 = { class: "mb-2.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted" };
@@ -103,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
103
  ev.preventDefault();
104
104
  activeId.value = id;
105
105
  suppressSpyUntilScrollEnds(el);
106
- el.scrollIntoView({ behavior: "smooth", block: "start" });
106
+ scrollToElement(el, { block: "start", behavior: "smooth", margin: scrollMarginTop(el) });
107
107
  history.replaceState(history.state, "", `#${id}`);
108
108
  }
109
109
  onMounted(setup);
@@ -1,5 +1,5 @@
1
1
  import { shallowRef, computed, ref, watch, watchEffect, defineComponent, openBlock, createElementBlock, unref, createElementVNode, toDisplayString, createBlock, withCtx, createVNode, createTextVNode, createCommentVNode, renderSlot, normalizeClass, Fragment, renderList, normalizeStyle, h } from "vue";
2
- import { u as usePaletteTheme } from "./palette-Cvxl_1tM.js";
2
+ import { u as usePaletteTheme } from "./palette-Co8tSASo.js";
3
3
  import { useLabels } from "../composables/useLpConfig.js";
4
4
  import { usePersisted } from "../composables/usePersisted.js";
5
5
  import { parseColor, rgbToHex } from "../components/color.js";
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, ref, useId, computed, onMounted, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, normalizeClass, createElementBlock, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps } from "vue";
2
- import { u as usePaletteTheme } from "./palette-Cvxl_1tM.js";
2
+ import { u as usePaletteTheme } from "./palette-Co8tSASo.js";
3
3
  import { PopoverRoot, PopoverAnchor, PopoverPortal, PopoverContent } from "reka-ui";
4
4
  import { useLabels } from "../composables/useLpConfig.js";
5
5
  import { usePortalTarget, useOutsideGuard } from "../composables/useView.js";
6
6
  import { u as useTheme, p as presets } from "./LpThemeProvider-8MG6yqU9.js";
7
- import { u as useThemeStudio, S as STUDIO_SYSTEM, _ as _sfc_main$5 } from "./LpThemeStudio-BJDKf3_Z.js";
7
+ import { u as useThemeStudio, S as STUDIO_SYSTEM, _ as _sfc_main$5 } from "./LpThemeStudio-BpORDvH6.js";
8
8
  import { POPOVER_PANEL } from "../components/dropdown.js";
9
9
  import { _ as _sfc_main$1 } from "./LpContextMenu-rx2tCjwk.js";
10
10
  import { _ as _sfc_main$2 } from "./LpIcon--5WSb3jJ.js";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, ref, openBlock, createElementBlock, mergeProps, unref, toDisplayString, createCommentVNode, createElementVNode, createVNode, withCtx, createBlock, Fragment, renderList, normalizeStyle, createTextVNode } from "vue";
2
- import { _ as _sfc_main$6 } from "./LpNumberFlow-CcxEGUy0.js";
2
+ import { _ as _sfc_main$6 } from "./LpNumberFlow-Vqj0tP7B.js";
3
3
  import { _ as _sfc_main$5 } from "./LpRollingText-B54Pje7P.js";
4
4
  import { _ as _sfc_main$4 } from "./LpShift-CCq7dofl.js";
5
5
  import { _ as _sfc_main$2 } from "./LpSkeleton-BB6XIV-w.js";
@@ -18,7 +18,7 @@ function usePaletteTheme(studio, options = {}) {
18
18
  label: options.label ?? text.value.title,
19
19
  icon: "lucide:palette",
20
20
  description: current.theme.value.name,
21
- keywords: ["theme", "appearance", "accent", "density", "тема", "цвет", "плотность"],
21
+ keywords: ["theme", "appearance", "accent", "density", ...options.keywords ?? []],
22
22
  previewComponent: preview,
23
23
  editInPreview: true
24
24
  }];
@@ -16,8 +16,18 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
16
16
  * The current route path. Enables the built-in prefix-match active test and
17
17
  * the derived page title without the host wiring its own `isActive`. Pass
18
18
  * `route.path`. Ignored when a custom `isActive` is provided.
19
+ *
20
+ * A new path also places the page in the shell's scroll region: back and
21
+ * forward return to where it was left, a `hash` lands on that anchor
22
+ * (honouring its `scroll-margin-top`), anything else starts at the top.
19
23
  */
20
24
  path?: string;
25
+ /**
26
+ * The current route hash (`route.hash`). With `path` it lands a page on
27
+ * its anchor; a new hash on the same path glides there, after a dialog
28
+ * that started the jump has closed.
29
+ */
30
+ hash?: string;
21
31
  /**
22
32
  * Custom active test (router-driven nav). Overrides `path`/`modelValue`.
23
33
  */
@@ -97,8 +107,18 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
97
107
  * The current route path. Enables the built-in prefix-match active test and
98
108
  * the derived page title without the host wiring its own `isActive`. Pass
99
109
  * `route.path`. Ignored when a custom `isActive` is provided.
110
+ *
111
+ * A new path also places the page in the shell's scroll region: back and
112
+ * forward return to where it was left, a `hash` lands on that anchor
113
+ * (honouring its `scroll-margin-top`), anything else starts at the top.
100
114
  */
101
115
  path?: string;
116
+ /**
117
+ * The current route hash (`route.hash`). With `path` it lands a page on
118
+ * its anchor; a new hash on the same path glides there, after a dialog
119
+ * that started the jump has closed.
120
+ */
121
+ hash?: string;
102
122
  /**
103
123
  * Custom active test (router-driven nav). Overrides `path`/`modelValue`.
104
124
  */
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpAppShell-DMSJg18Q.js";
1
+ import { _ as _sfc_main } from "../chunks/LpAppShell-rr5kqiK3.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpCodeDisplay-AQx-3nNb.js";
1
+ import { _ as _sfc_main } from "../chunks/LpCodeDisplay-CE9TxCA4.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpCommandScope-BlKcgBnK.js";
1
+ import { _ as _sfc_main } from "../chunks/LpCommandScope-CtUhJe8T.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpCountdown-BxE7stYk.js";
1
+ import { _ as _sfc_main } from "../chunks/LpCountdown-DgeY3cLG.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpGauge-BO1PYYqD.js";
1
+ import { _ as _sfc_main } from "../chunks/LpGauge-KZaQ_FDR.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpModalNav-CE3iLnxB.js";
1
+ import { _ as _sfc_main } from "../chunks/LpModalNav-DQpV2kdn.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpNumberFlow-CcxEGUy0.js";
1
+ import { _ as _sfc_main } from "../chunks/LpNumberFlow-Vqj0tP7B.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, Fragment, renderList, createElementVNode, createBlock, createTextVNode, toDisplayString, createCommentVNode, normalizeClass } from "vue";
2
- import { _ as _sfc_main$2 } from "../chunks/LpNumberFlow-CcxEGUy0.js";
2
+ import { _ as _sfc_main$2 } from "../chunks/LpNumberFlow-Vqj0tP7B.js";
3
3
  import { _ as _sfc_main$3 } from "../chunks/LpRollingText-B54Pje7P.js";
4
4
  import { _ as _sfc_main$1 } from "../chunks/LpSkeleton-BB6XIV-w.js";
5
5
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpPaletteTheme-CdEEMMEF.js";
1
+ import { _ as _sfc_main } from "../chunks/LpPaletteTheme-DiLYKQiZ.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpPie-Mr3EtFEd.js";
1
+ import { _ as _sfc_main } from "../chunks/LpPie-DrZepi0p.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpProgress-rOlyafqp.js";
1
+ import { _ as _sfc_main } from "../chunks/LpProgress-Yr6ONG5t.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpQuota-B12yijdB.js";
1
+ import { _ as _sfc_main } from "../chunks/LpQuota-Dk2MyI2Z.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpSidebar-BciLMBgY.js";
1
+ import { _ as _sfc_main } from "../chunks/LpSidebar-BoNLKgh-.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpSidebarNav-HYcG-ib8.js";
1
+ import { _ as _sfc_main } from "../chunks/LpSidebarNav-Bky8chrv.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpSidebarRow-Di2VYz-Z.js";
1
+ import { _ as _sfc_main } from "../chunks/LpSidebarRow-BRYhNDSo.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpStat-D6V6Fdfc.js";
1
+ import { _ as _sfc_main } from "../chunks/LpStat-BVf2UvEc.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTableOfContents-CraicEs4.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTableOfContents-BN5zvpnx.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpThemeStudio-BJDKf3_Z.js";
1
+ import { _ as _sfc_main } from "../chunks/LpThemeStudio-BpORDvH6.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpThemeSwitcher-BDrIJswA.js";
1
+ import { _ as _sfc_main } from "../chunks/LpThemeSwitcher-BnEn_mvf.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpUptimeBar-BtkZRwY0.js";
1
+ import { _ as _sfc_main } from "../chunks/LpUptimeBar-DqNvvMBK.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -10,7 +10,8 @@ export interface CommandSearchTerms {
10
10
  groups: string[];
11
11
  }
12
12
  export declare function parseCommandQuery(value: string): CommandSearchTerms;
13
- export declare function swapCommandLayout(value: string): string;
13
+ /** The query as if typed on the other layout: Latin to Ukrainian by default, `layout` 1 for the other Cyrillic one. */
14
+ export declare function swapCommandLayout(value: string, layout?: number): string;
14
15
  export declare function searchCommandItems<T extends SearchableCommand>(items: T[], terms: CommandSearchTerms): {
15
16
  items: T[];
16
17
  terms: string[];
@@ -48,19 +48,28 @@ function rankExact(items, terms) {
48
48
  return items.map((command) => ({ command, score: score(command, terms) })).filter((entry) => entry.score > 0).sort((a, b) => b.score - a.score || a.command.label.localeCompare(b.command.label)).map((entry) => entry.command);
49
49
  }
50
50
  const LATIN_KEYS = "`qwertyuiop[]asdfghjkl;'zxcvbnm,.";
51
- const CYRILLIC_KEYS = "ёйцукенгшщзхъфывапролджэячсмитьбю";
52
- const LAYOUT_KEYS = new Map([...LATIN_KEYS].flatMap((key, i) => [[key, CYRILLIC_KEYS[i]], [CYRILLIC_KEYS[i], key]]));
53
- function swapCommandLayout(value) {
51
+ const CYRILLIC_LAYOUTS = ["ґйцукенгшщзхїфівапролджєячсмитьбю", "ёйцукенгшщзхъфывапролджэячсмитьбю"];
52
+ const LAYOUT_MAPS = CYRILLIC_LAYOUTS.map((keys) => new Map([...LATIN_KEYS].flatMap((key, i) => [[key, keys[i]], [keys[i], key]])));
53
+ function swapWith(value, keys) {
54
54
  return [...value].map((char) => {
55
- const replacement = LAYOUT_KEYS.get(char.toLowerCase());
55
+ const replacement = keys.get(char.toLowerCase());
56
56
  return replacement ? char === char.toUpperCase() ? replacement.toUpperCase() : replacement : char;
57
57
  }).join("");
58
58
  }
59
+ function swapCommandLayout(value, layout = 0) {
60
+ return swapWith(value, LAYOUT_MAPS[layout] ?? LAYOUT_MAPS[0]);
61
+ }
59
62
  function searchCommandItems(items, terms) {
60
63
  const exact = rankExact(items, terms);
61
64
  if (exact.length || !terms.include.length) return { items: exact, terms: terms.include };
62
- const alternate = { include: terms.include.map(swapCommandLayout), exclude: terms.exclude, groups: terms.groups };
63
- return { items: rankExact(items, alternate), terms: alternate.include };
65
+ let fallback = terms.include;
66
+ for (const keys of LAYOUT_MAPS) {
67
+ const alternate = { include: terms.include.map((term) => swapWith(term, keys)), exclude: terms.exclude, groups: terms.groups };
68
+ const found = rankExact(items, alternate);
69
+ if (found.length) return { items: found, terms: alternate.include };
70
+ if (fallback === terms.include) fallback = alternate.include;
71
+ }
72
+ return { items: [], terms: fallback };
64
73
  }
65
74
  function rankCommandItems(items, terms) {
66
75
  return searchCommandItems(items, terms).items;
@@ -8,21 +8,21 @@ export interface FormatBytesOptions {
8
8
  /**
9
9
  * A byte count in the largest unit that keeps it readable: 1 536 → "1.5 kB".
10
10
  * Binary steps, the way file managers and storage limits show sizes. Unit
11
- * names come from Intl, so a Russian app reads "1,5 МБ" without a table of
11
+ * names come from Intl, so a French app reads "1,5 Mo" without a table of
12
12
  * its own. One decimal under 10 (2.4 MB), none above (240 MB). Negative or
13
13
  * non-finite input is "—": there is no size to show.
14
14
  */
15
15
  export declare function formatBytes(bytes: number, locale?: string, options?: FormatBytesOptions): string;
16
16
  export interface CompactNumberOptions {
17
17
  /**
18
- * Writes the decimal separator the locale's way ("1,2k" in Russian). The
18
+ * Writes the decimal separator the locale's way ("1,2k" in French). The
19
19
  * k/M/B/T suffixes stay: Intl's own compact notation changes the shape of
20
- * the figure per locale ("1,2 тыс."), which a tick label cannot absorb.
20
+ * the figure per locale ("1,2 k" in French), which a tick label cannot absorb.
21
21
  * Unset keeps a plain "." whatever the browser says.
22
22
  */
23
23
  locale?: string;
24
24
  /**
25
- * With a locale, write the unit as that locale does: "11,9 тыс." in Russian.
25
+ * With a locale, write the unit as that locale does: "13,1 Md" in French.
26
26
  * For a figure read on its own (a stat tile, a counter), where "11,9k" looks
27
27
  * foreign; not for axis ticks, where the longer word crowds the axis.
28
28
  */
@@ -39,7 +39,7 @@ export interface CompactNumberOptions {
39
39
  }
40
40
  /**
41
41
  * A figure shortened with k/M/B/T: 1 200 → "1.2k", 3 400 000 → "3.4M"; with
42
- * `words` and a locale in that locale's own words, "1,2 тыс." in Russian.
42
+ * `words` and a locale in that locale's own words, "13,1 Md" in French.
43
43
  *
44
44
  * The unit is picked by what will PRINT, not by the raw size: 999 950 at one
45
45
  * place rounds to "1000k", which reads as the next unit up, so it becomes
@@ -48,7 +48,7 @@ export interface CompactNumberOptions {
48
48
  export declare function compactNumber(value: number, options?: CompactNumberOptions): string;
49
49
  /**
50
50
  * The character a locale writes between the whole and the fractional part:
51
- * "." in English, "," in Russian and German. A counter that splits a grouped
51
+ * "." in English, "," in French and German. A counter that splits a grouped
52
52
  * figure into columns has to find the fraction by this mark, not by ".",
53
53
  * because in German "." is the thousands separator.
54
54
  */
@@ -34,7 +34,7 @@ export interface QuotaState {
34
34
  export declare function quotaState(used: number, limit: number | null | undefined, warnAt?: number, dangerAt?: number): QuotaState;
35
35
  /**
36
36
  * An amount in its unit, locale-aware. Bytes go through `formatBytes`, whose
37
- * unit names come from Intl, so a Russian app reads "1,5 ГБ" without a
37
+ * unit names come from Intl, so a French app reads "1,5 Go" without a
38
38
  * translation table of its own.
39
39
  */
40
40
  export declare function formatAmount(value: number, unit?: QuotaUnit, locale?: string): string;
@@ -7,7 +7,7 @@ export interface TimeSplit {
7
7
  ms: number;
8
8
  }
9
9
  export type TimeUnit = "d" | "h" | "m" | "s";
10
- /** Unit suffixes, so an app can write "2 д 3 ч" without reformatting. */
10
+ /** Unit suffixes, so an app can write "2 j 3 h" without reformatting. */
11
11
  export type TimeUnitLabels = Record<TimeUnit, string>;
12
12
  export declare const DEFAULT_UNIT_LABELS: TimeUnitLabels;
13
13
  /**
@@ -19,4 +19,6 @@ export interface ScrollToElementOptions {
19
19
  margin?: number;
20
20
  }
21
21
  /** Scroll the nearest scroller, and only it, so that `el` is in view. */
22
+ /** The element's own `scroll-margin-top`, the gap it asks to keep above it when scrolled to. */
23
+ export declare function scrollMarginTop(el: Element): number;
22
24
  export declare function scrollToElement(el: Element | null | undefined, { block, behavior, margin }?: ScrollToElementOptions): void;
@@ -15,6 +15,9 @@ function atScrollEnd(el, slack = 2) {
15
15
  if (!box) return true;
16
16
  return box.scrollTop + box.clientHeight >= box.scrollHeight - slack;
17
17
  }
18
+ function scrollMarginTop(el) {
19
+ return Number.parseFloat(getComputedStyle(el).scrollMarginTop) || 0;
20
+ }
18
21
  function scrollToElement(el, { block = "nearest", behavior = "auto", margin = 0 } = {}) {
19
22
  if (!el) return;
20
23
  const doc = el.ownerDocument;
@@ -33,6 +36,7 @@ function scrollToElement(el, { block = "nearest", behavior = "auto", margin = 0
33
36
  }
34
37
  export {
35
38
  atScrollEnd,
39
+ scrollMarginTop,
36
40
  scrollParent,
37
41
  scrollToElement
38
42
  };
@@ -0,0 +1 @@
1
+ export declare function useScrollMemory(viewport: () => HTMLElement | null | undefined, path: () => string | undefined, hash: () => string | undefined): void;