@leavepulse/ui 0.71.1 → 0.71.2

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 (79) hide show
  1. package/dist/assets/{LpCommandPalette-DgPZX0us.css → LpCommandPalette-Rtbg669l.css} +19 -19
  2. package/dist/assets/{LpNumberFlow-rZkwQwlU.css → LpNumberFlow-Chp9pEDe.css} +8 -0
  3. package/dist/assets/LpTabs-DT0XPTc2.css +18 -0
  4. package/dist/chunks/{LpAddressInput-CD0bzrt-.js → LpAddressInput-Bu6ws3Fp.js} +1 -1
  5. package/dist/chunks/{LpAppShell-1RmBp6xQ.js → LpAppShell-C5YW5pI7.js} +1 -1
  6. package/dist/chunks/{LpCodeDisplay-BK2FHbtM.js → LpCodeDisplay-C9pIMF2R.js} +1 -1
  7. package/dist/chunks/{LpCommandScope-ubtWDMa0.js → LpCommandScope-BlKcgBnK.js} +1 -1
  8. package/dist/chunks/{LpCountdown-DTdMF8DL.js → LpCountdown-CXrEK0ev.js} +1 -1
  9. package/dist/chunks/{LpGauge-BdjPGnqw.js → LpGauge-DFdt33x8.js} +1 -1
  10. package/dist/chunks/{LpModalNav-BH4ANQGJ.js → LpModalNav-Cuna8c_3.js} +1 -1
  11. package/dist/chunks/{LpNumberFlow-5khYxsfX.js → LpNumberFlow-Dwb9MV1A.js} +6 -5
  12. package/dist/chunks/{LpPaletteTheme-CqWNRwHE.js → LpPaletteTheme-DkikZ362.js} +5 -3
  13. package/dist/chunks/{LpPie-DdFSTbGE.js → LpPie-C1uIUFxu.js} +1 -1
  14. package/dist/chunks/{LpProgress-BX33EKkN.js → LpProgress-WNaH4emv.js} +1 -1
  15. package/dist/chunks/{LpQuota-DqNv1yjs.js → LpQuota-Cz9PvklM.js} +1 -1
  16. package/dist/chunks/{LpSelect-DYX2-u5A.js → LpSelect-D3pRJfRY.js} +4 -4
  17. package/dist/chunks/{LpSidebar-D44peKq2.js → LpSidebar-Bk7b-K4l.js} +1 -1
  18. package/dist/chunks/{LpSidebarNav--VwkXO_a.js → LpSidebarNav-BR2AW3KT.js} +6 -1
  19. package/dist/chunks/{LpStat-DIsQfbeD.js → LpStat-Dzn6WFzi.js} +4 -4
  20. package/dist/chunks/{LpThemeStudio-B2nPaG-h.js → LpThemeStudio-IupHqP0x.js} +2 -2
  21. package/dist/chunks/{LpThemeSwitcher-C0A5sg_E.js → LpThemeSwitcher-DarPHuX8.js} +4 -3
  22. package/dist/chunks/{LpTopologyCanvas-B0wEvAoq.js → LpTopologyCanvas-Cq-MiJwo.js} +42 -12
  23. package/dist/chunks/{LpUptimeBar-DRadGq4Y.js → LpUptimeBar-BbhVTPnL.js} +1 -1
  24. package/dist/chunks/{palette-BiY7yQZL.js → palette-Cvxl_1tM.js} +1 -1
  25. package/dist/components/LpAddressInput.vue.js +1 -1
  26. package/dist/components/LpAppShell.vue.js +1 -1
  27. package/dist/components/LpChart.vue.js +22 -4
  28. package/dist/components/LpCodeDisplay.vue.js +1 -1
  29. package/dist/components/LpCommandPalette.vue.js +43 -22
  30. package/dist/components/LpCommandScope.vue.js +1 -1
  31. package/dist/components/LpCountdown.vue.js +1 -1
  32. package/dist/components/LpGauge.vue.js +1 -1
  33. package/dist/components/LpModalNav.vue.js +1 -1
  34. package/dist/components/LpNumberFlow.vue.js +1 -1
  35. package/dist/components/LpPaletteStats.vue.js +1 -1
  36. package/dist/components/LpPaletteTheme.vue.d.ts +2 -0
  37. package/dist/components/LpPaletteTheme.vue.js +1 -1
  38. package/dist/components/LpPie.vue.js +1 -1
  39. package/dist/components/LpProgress.vue.js +1 -1
  40. package/dist/components/LpQuota.vue.js +1 -1
  41. package/dist/components/LpSelect.vue.js +1 -1
  42. package/dist/components/LpSidebar.vue.js +1 -1
  43. package/dist/components/LpSidebarNav.vue.js +1 -1
  44. package/dist/components/LpStat.vue.js +1 -1
  45. package/dist/components/LpTabs.vue.d.ts +8 -0
  46. package/dist/components/LpTabs.vue.js +7 -5
  47. package/dist/components/LpThemeStudio.vue.js +1 -1
  48. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  49. package/dist/components/LpTopologyCanvas.vue.d.ts +3 -1
  50. package/dist/components/LpTopologyCanvas.vue.js +1 -1
  51. package/dist/components/LpUptimeBar.vue.js +1 -1
  52. package/dist/components/chart.d.ts +14 -0
  53. package/dist/components/chart.js +13 -0
  54. package/dist/components/format.d.ts +10 -3
  55. package/dist/components/format.js +14 -2
  56. package/dist/composables/usePaletteCommands.js +1 -0
  57. package/dist/composables/useReveal.js +1 -22
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +21 -20
  60. package/dist/theme/palette.d.ts +3 -0
  61. package/package.json +1 -1
  62. package/src/components/LpChart.vue +23 -3
  63. package/src/components/LpCommandPalette.vue +23 -5
  64. package/src/components/LpNumberFlow.vue +19 -7
  65. package/src/components/LpPaletteTheme.vue +3 -3
  66. package/src/components/LpSelect.vue +5 -4
  67. package/src/components/LpSidebarNav.vue +8 -1
  68. package/src/components/LpStat.vue +5 -3
  69. package/src/components/LpTabs.vue +10 -2
  70. package/src/components/LpThemeStudio.vue +1 -1
  71. package/src/components/LpThemeSwitcher.vue +4 -1
  72. package/src/components/LpTopologyCanvas.vue +35 -4
  73. package/src/components/chart.ts +26 -0
  74. package/src/components/format.ts +31 -5
  75. package/src/composables/usePaletteCommands.ts +3 -0
  76. package/src/composables/useReveal.ts +7 -30
  77. package/src/index.ts +1 -1
  78. package/src/theme/palette.ts +4 -2
  79. package/dist/assets/LpTabs-CO3EcsNV.css +0 -18
@@ -1,11 +1,11 @@
1
- import { defineComponent, ref, computed, onMounted, shallowRef, watch, openBlock, createElementBlock, mergeProps, unref, createBlock, createCommentVNode, createElementVNode, toDisplayString, renderSlot, Fragment, renderList, normalizeClass, createVNode, withCtx, normalizeStyle, createSlots, withDirectives, vShow, createTextVNode } from "vue";
1
+ import { defineComponent, ref, computed, onMounted, watch, shallowRef, openBlock, createElementBlock, mergeProps, unref, createBlock, createCommentVNode, createElementVNode, toDisplayString, renderSlot, Fragment, renderList, normalizeClass, createVNode, withCtx, normalizeStyle, createSlots, withDirectives, vShow, createTextVNode } from "vue";
2
2
  import { Motion } from "motion-v";
3
3
  import { useLabels } from "../composables/useLpConfig.js";
4
4
  import { prefersReducedMotion, easeTravel } from "../composables/easing.js";
5
5
  import { usePillTransition } from "../composables/usePillTransition.js";
6
6
  import { useReveal } from "../composables/useReveal.js";
7
7
  import { useTween, lerp, mixValues, resample } from "../composables/useTween.js";
8
- import { normalise, pointCount, resolveLabels, extent, axisTicks, fitScale, plotHeight, plotWidth, xAt, yAt, areaPath, linePath, barPath, markerIndex, chartSummary, niceScale, nearestIndex, formatTick } from "./chart.js";
8
+ import { normalise, pointCount, resolveLabels, extent, axisTicks, fitScale, plotHeight, plotWidth, xLabelIndices, xAt, yAt, areaPath, linePath, barPath, markerIndex, chartSummary, niceScale, nearestIndex, formatTick } from "./chart.js";
9
9
  import { PANEL_SURFACE } from "./dropdown.js";
10
10
  import { _ as _sfc_main$2 } from "../chunks/LegendSwatch-BhRjrtzv.js";
11
11
  import { _ as _sfc_main$3 } from "../chunks/LpContextMenu-DXpFJjlO.js";
@@ -191,6 +191,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
191
191
  () => normalise(source.value).map((s, i) => ({ ...s, id: `${i}:${s.name}` }))
192
192
  );
193
193
  const visible = computed(() => allSeries.value.filter((s) => !hidden.value.has(s.id)));
194
+ const seeded = /* @__PURE__ */ new Set();
195
+ watch(
196
+ () => props.series.map((s, i) => [`${i}:${s.name}`, !!s.hidden]),
197
+ (entries) => {
198
+ let next = null;
199
+ for (const [id, off] of entries) {
200
+ if (seeded.has(id)) continue;
201
+ seeded.add(id);
202
+ if (off) (next ??= new Set(hidden.value)).add(id);
203
+ }
204
+ if (next && next.size < entries.length) hidden.value = next;
205
+ },
206
+ { immediate: true }
207
+ );
194
208
  const SETTLE_MS = 260;
195
209
  const settle = {
196
210
  duration: SETTLE_MS,
@@ -409,7 +423,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
409
423
  return Math.max(1, Math.ceil(count.value * (longest * 6.5 + 16) / w));
410
424
  });
411
425
  const xLabels = computed(
412
- () => labels.value.map((label, i) => ({ label, i, x: xAt(i, count.value, box.value, banded.value) })).filter(({ i }) => i % xLabelStride.value === 0 || i === count.value - 1)
426
+ () => xLabelIndices(labels.value.length, xLabelStride.value).map((i) => ({
427
+ label: labels.value[i],
428
+ i,
429
+ x: xAt(i, count.value, box.value, banded.value)
430
+ }))
413
431
  );
414
432
  const baseY = computed(
415
433
  () => yAt(
@@ -1198,7 +1216,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1198
1216
  };
1199
1217
  }
1200
1218
  });
1201
- const LpChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7a64e158"]]);
1219
+ const LpChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-21ad716e"]]);
1202
1220
  export {
1203
1221
  LpChart as default
1204
1222
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpCodeDisplay-BK2FHbtM.js";
1
+ import { _ as _sfc_main } from "../chunks/LpCodeDisplay-C9pIMF2R.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -23,7 +23,7 @@ import { parseCommandQuery, searchCommandItems, applyQueryFilters, parsePaletteQ
23
23
  import { PALETTE_MODES, fallbackRows, readRecent, resolveRecentItems, recentVisible, commandHasPreview, matchModePrefix, modeChipLabel, pushRecent, toRecentItem } from "./commandPalette.js";
24
24
  import { usePortalTarget, useOutsideGuard } from "../composables/useView.js";
25
25
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
26
- import '../assets/LpCommandPalette-DgPZX0us.css';const _hoisted_1 = { class: "flex shrink-0 items-center gap-2.5 border-b border-line px-4" };
26
+ import '../assets/LpCommandPalette-Rtbg669l.css';const _hoisted_1 = { class: "flex shrink-0 items-center gap-2.5 border-b border-line px-4" };
27
27
  const _hoisted_2 = ["title", "onClick"];
28
28
  const _hoisted_3 = ["readonly", "aria-activedescendant", "placeholder", "onKeydown"];
29
29
  const _hoisted_4 = { class: "shrink-0 rounded-small border border-line px-1.5 py-0.5 text-[10px] text-muted" };
@@ -45,7 +45,7 @@ const _hoisted_9 = {
45
45
  };
46
46
  const _hoisted_10 = {
47
47
  key: 2,
48
- class: "flex items-center justify-end gap-2 border-b border-line px-3 py-1"
48
+ class: "hidden items-center justify-end gap-2 border-b border-line px-3 py-1 [@media(hover:none)_and_(pointer:coarse)]:flex"
49
49
  };
50
50
  const _hoisted_11 = {
51
51
  key: 0,
@@ -92,12 +92,14 @@ const _hoisted_25 = {
92
92
  const _hoisted_26 = { class: "flex shrink-0 items-center gap-4 border-t border-line px-4 py-2.5 text-[11px] text-muted [@media(hover:none)_and_(pointer:coarse)]:hidden" };
93
93
  const _hoisted_27 = { class: "flex items-center gap-1" };
94
94
  const _hoisted_28 = { class: "flex items-center gap-1" };
95
- const _hoisted_29 = {
96
- key: 1,
95
+ const _hoisted_29 = ["aria-label"];
96
+ const _hoisted_30 = ["aria-label", "aria-pressed"];
97
+ const _hoisted_31 = {
98
+ key: 2,
97
99
  class: "flex items-center gap-1"
98
100
  };
99
- const _hoisted_30 = { class: "ml-auto flex items-center gap-1" };
100
- const _hoisted_31 = { class: "rounded-small border border-line px-1 text-[10px]" };
101
+ const _hoisted_32 = { class: "ml-auto flex items-center gap-1" };
102
+ const _hoisted_33 = { class: "rounded-small border border-line px-1 text-[10px]" };
101
103
  const PALETTE_ACTIONS_AFTER = 3;
102
104
  const RECENT_KEEP = 20;
103
105
  const PANE_LINGER_MS = 160;
@@ -825,7 +827,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
825
827
  return (_ctx, _cache) => {
826
828
  return openBlock(), createBlock(unref(DialogRoot), {
827
829
  open: __props.open,
828
- "onUpdate:open": _cache[9] || (_cache[9] = (v) => emit("update:open", v))
830
+ "onUpdate:open": _cache[11] || (_cache[11] = (v) => emit("update:open", v))
829
831
  }, {
830
832
  default: withCtx(() => [
831
833
  createVNode(unref(DialogPortal), { to: unref(portalTo) }, {
@@ -836,7 +838,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
836
838
  }, null, 8, ["class", "style"]),
837
839
  createVNode(unref(DialogContent), {
838
840
  onInteractOutside: unref(guardOutside),
839
- onEscapeKeyDown: _cache[7] || (_cache[7] = (event) => {
841
+ onEscapeKeyDown: _cache[9] || (_cache[9] = (event) => {
840
842
  unref(guardOutside)(event);
841
843
  if (!event.defaultPrevented) onEscape(event);
842
844
  }),
@@ -847,7 +849,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
847
849
  style: normalizeStyle({ zIndex: unref(layer).panel }),
848
850
  "data-pane": paneOpen.value ? "open" : void 0,
849
851
  "data-editing": editing.value ? "" : void 0,
850
- onOpenAutoFocus: _cache[8] || (_cache[8] = withModifiers(() => {
852
+ onOpenAutoFocus: _cache[10] || (_cache[10] = withModifiers(() => {
851
853
  }, ["prevent"])),
852
854
  onKeydownCapture: onPaletteKeydown
853
855
  }, {
@@ -960,7 +962,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
960
962
  }, {
961
963
  default: withCtx(() => [
962
964
  createTextVNode(toDisplayString(unref(text).actions) + " ", 1),
963
- _cache[10] || (_cache[10] = createElementVNode("span", { class: "text-muted" }, "Tab", -1))
965
+ _cache[12] || (_cache[12] = createElementVNode("span", { class: "text-muted" }, "Tab", -1))
964
966
  ]),
965
967
  _: 1
966
968
  })) : createCommentVNode("", true),
@@ -978,7 +980,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
978
980
  size: 14
979
981
  }),
980
982
  createTextVNode(toDisplayString(isPinned(active.value) ? unref(text).unpin : unref(text).pin) + " ", 1),
981
- _cache[11] || (_cache[11] = createElementVNode("span", { class: "text-muted" }, "Alt+P", -1))
983
+ _cache[13] || (_cache[13] = createElementVNode("span", { class: "text-muted" }, "Alt+P", -1))
982
984
  ]),
983
985
  _: 1
984
986
  }, 8, ["aria-label", "aria-pressed"])) : createCommentVNode("", true)
@@ -1232,29 +1234,48 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1232
1234
  ], 32),
1233
1235
  createElementVNode("div", _hoisted_26, [
1234
1236
  createElementVNode("span", _hoisted_27, [
1235
- _cache[12] || (_cache[12] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↑", -1)),
1236
- _cache[13] || (_cache[13] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↓", -1)),
1237
+ _cache[14] || (_cache[14] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↑", -1)),
1238
+ _cache[15] || (_cache[15] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↓", -1)),
1237
1239
  createTextVNode(" " + toDisplayString(unref(text).navigate), 1)
1238
1240
  ]),
1239
1241
  createElementVNode("span", _hoisted_28, [
1240
- _cache[14] || (_cache[14] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↵", -1)),
1242
+ _cache[16] || (_cache[16] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↵", -1)),
1241
1243
  createTextVNode(" " + toDisplayString(unref(text).select), 1)
1242
1244
  ]),
1243
- selectedActions.value.length ? (openBlock(), createElementBlock("span", {
1245
+ selectedActions.value.length && active.value ? (openBlock(), createElementBlock("button", {
1244
1246
  key: 0,
1245
- class: normalizeClass(["flex items-center gap-1 transition-colors", showActionsKey.value && "font-medium text-brand"])
1247
+ type: "button",
1248
+ class: normalizeClass(["flex items-center gap-1 rounded-small outline-none transition-colors hover:text-ink focus-visible:ring-2 focus-visible:ring-ring", showActionsKey.value && "font-medium text-brand"]),
1249
+ "aria-label": unref(text).actions,
1250
+ onClick: _cache[7] || (_cache[7] = ($event) => openActions(active.value))
1246
1251
  }, [
1247
1252
  createElementVNode("kbd", {
1248
1253
  class: normalizeClass(["rounded-small border px-1 text-[10px] transition-colors", showActionsKey.value ? "border-brand" : "border-line"])
1249
1254
  }, toDisplayString(unref(text).tab), 3),
1250
1255
  createTextVNode(" " + toDisplayString(unref(text).actions), 1)
1251
- ], 2)) : createCommentVNode("", true),
1252
- trail.value.length ? (openBlock(), createElementBlock("span", _hoisted_29, [
1253
- _cache[15] || (_cache[15] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "⌫", -1)),
1256
+ ], 10, _hoisted_29)) : createCommentVNode("", true),
1257
+ canPin.value && active.value && !promptCommand.value ? (openBlock(), createElementBlock("button", {
1258
+ key: 1,
1259
+ type: "button",
1260
+ class: "flex items-center gap-1 rounded-small outline-none transition-colors hover:text-ink focus-visible:ring-2 focus-visible:ring-ring",
1261
+ "aria-label": isPinned(active.value) ? unref(text).unpin : unref(text).pin,
1262
+ "aria-pressed": isPinned(active.value),
1263
+ onClick: _cache[8] || (_cache[8] = ($event) => togglePin(active.value))
1264
+ }, [
1265
+ _cache[17] || (_cache[17] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "Alt+P", -1)),
1266
+ createVNode(_sfc_main$1, {
1267
+ name: "lucide:star",
1268
+ size: 11,
1269
+ class: normalizeClass(isPinned(active.value) && "fill-current text-brand")
1270
+ }, null, 8, ["class"]),
1271
+ createTextVNode(" " + toDisplayString(isPinned(active.value) ? unref(text).unpin : unref(text).pin), 1)
1272
+ ], 8, _hoisted_30)) : createCommentVNode("", true),
1273
+ trail.value.length ? (openBlock(), createElementBlock("span", _hoisted_31, [
1274
+ _cache[18] || (_cache[18] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "⌫", -1)),
1254
1275
  createTextVNode(" " + toDisplayString(unref(text).back), 1)
1255
1276
  ])) : createCommentVNode("", true),
1256
- createElementVNode("span", _hoisted_30, [
1257
- createElementVNode("kbd", _hoisted_31, toDisplayString(unref(text).esc), 1),
1277
+ createElementVNode("span", _hoisted_32, [
1278
+ createElementVNode("kbd", _hoisted_33, toDisplayString(unref(text).esc), 1),
1258
1279
  createTextVNode(" " + toDisplayString(unref(text).close), 1)
1259
1280
  ])
1260
1281
  ])
@@ -1270,7 +1291,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1270
1291
  };
1271
1292
  }
1272
1293
  });
1273
- const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e9366efe"]]);
1294
+ const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8d42f8db"]]);
1274
1295
  export {
1275
1296
  LpCommandPalette as default
1276
1297
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpCommandScope-ubtWDMa0.js";
1
+ import { _ as _sfc_main } from "../chunks/LpCommandScope-BlKcgBnK.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpCountdown-DTdMF8DL.js";
1
+ import { _ as _sfc_main } from "../chunks/LpCountdown-CXrEK0ev.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpGauge-BdjPGnqw.js";
1
+ import { _ as _sfc_main } from "../chunks/LpGauge-DFdt33x8.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpModalNav-BH4ANQGJ.js";
1
+ import { _ as _sfc_main } from "../chunks/LpModalNav-Cuna8c_3.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpNumberFlow-5khYxsfX.js";
1
+ import { _ as _sfc_main } from "../chunks/LpNumberFlow-Dwb9MV1A.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-5khYxsfX.js";
2
+ import { _ as _sfc_main$2 } from "../chunks/LpNumberFlow-Dwb9MV1A.js";
3
3
  import { _ as _sfc_main$3 } from "../chunks/LpRollingText-DiL717LK.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,6 +1,8 @@
1
1
  import type { PreviewableThemeStudio } from "../theme/studio";
2
+ import { type ThemeStudioPart } from "./LpThemeStudio.vue";
2
3
  type __VLS_Props = {
3
4
  studio: PreviewableThemeStudio;
5
+ hide?: ThemeStudioPart[];
4
6
  };
5
7
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpPaletteTheme-CqWNRwHE.js";
1
+ import { _ as _sfc_main } from "../chunks/LpPaletteTheme-DkikZ362.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpPie-DdFSTbGE.js";
1
+ import { _ as _sfc_main } from "../chunks/LpPie-C1uIUFxu.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpProgress-BX33EKkN.js";
1
+ import { _ as _sfc_main } from "../chunks/LpProgress-WNaH4emv.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpQuota-DqNv1yjs.js";
1
+ import { _ as _sfc_main } from "../chunks/LpQuota-Cz9PvklM.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpSelect-DYX2-u5A.js";
1
+ import { _ as _sfc_main } from "../chunks/LpSelect-D3pRJfRY.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpSidebar-D44peKq2.js";
1
+ import { _ as _sfc_main } from "../chunks/LpSidebar-Bk7b-K4l.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpSidebarNav--VwkXO_a.js";
1
+ import { _ as _sfc_main } from "../chunks/LpSidebarNav-BR2AW3KT.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpStat-DIsQfbeD.js";
1
+ import { _ as _sfc_main } from "../chunks/LpStat-Dzn6WFzi.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -45,6 +45,13 @@ type __VLS_Props = {
45
45
  * where the pointer crosses the bar on its way elsewhere.
46
46
  */
47
47
  hoverFollow?: boolean;
48
+ /**
49
+ * Icons only, the label kept for screen readers and shown on hover. For a
50
+ * header that cannot fit every label: a tab cut off at the edge, or hidden
51
+ * under the actions beside it, cannot be reached at all. Tabs without an
52
+ * icon keep their label.
53
+ */
54
+ compact?: boolean;
48
55
  };
49
56
  declare var __VLS_111: {
50
57
  value: string;
@@ -62,6 +69,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
62
69
  block: boolean;
63
70
  variant: "contained" | "plain" | "underline" | "bottom";
64
71
  accent: boolean;
72
+ compact: boolean;
65
73
  hoverFollow: boolean;
66
74
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
67
75
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -12,7 +12,7 @@ import { _ as _sfc_main$5 } from "../chunks/LpRollingText-DiL717LK.js";
12
12
  import { _ as _sfc_main$6 } from "../chunks/LpSkeleton-BB6XIV-w.js";
13
13
  import { pickTab } from "./tabs.js";
14
14
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
15
- import '../assets/LpTabs-CO3EcsNV.css';const _hoisted_1 = {
15
+ import '../assets/LpTabs-DT0XPTc2.css';const _hoisted_1 = {
16
16
  key: 1,
17
17
  class: "relative z-10 inline-flex"
18
18
  };
@@ -26,7 +26,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
26
  accent: { type: Boolean, default: false },
27
27
  block: { type: Boolean, default: false },
28
28
  label: {},
29
- hoverFollow: { type: Boolean, default: true }
29
+ hoverFollow: { type: Boolean, default: true },
30
+ compact: { type: Boolean, default: false }
30
31
  },
31
32
  emits: ["update:modelValue"],
32
33
  setup(__props, { emit: __emit }) {
@@ -114,6 +115,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
114
115
  createVNode(unref(TabsTrigger), {
115
116
  value: item.value,
116
117
  disabled: item.disabled,
118
+ title: __props.compact && item.icon && !bottom.value ? item.label : void 0,
117
119
  class: normalizeClass(["relative inline-flex items-center justify-center outline-none transition-[color,opacity] duration-[var(--duration-fast)] focus-visible:ring-2 focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45", [
118
120
  bottom.value ? "min-h-14 min-w-0 flex-col gap-0.5 px-1 py-1.5 text-[11px] font-medium focus-visible:ring-inset" : "shrink-0 gap-1.5 whitespace-nowrap text-sm",
119
121
  __props.block && !bottom.value ? "flex-1" : "",
@@ -170,7 +172,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
170
172
  }, 1024)
171
173
  ])) : createCommentVNode("", true),
172
174
  createElementVNode("span", {
173
- class: normalizeClass(["relative z-10", bottom.value ? "max-w-full truncate" : ""])
175
+ class: normalizeClass(["relative z-10", bottom.value ? "max-w-full truncate" : __props.compact && item.icon ? "sr-only" : ""])
174
176
  }, toDisplayString(item.label), 3),
175
177
  item.dot && !item.icon ? (openBlock(), createBlock(_sfc_main$3, { key: 2 })) : createCommentVNode("", true),
176
178
  createVNode(Transition, { name: "lp-tab-badge" }, {
@@ -193,7 +195,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
193
195
  }, 1024)
194
196
  ]),
195
197
  _: 2
196
- }, 1032, ["value", "disabled", "class", "onPointerenter"])
198
+ }, 1032, ["value", "disabled", "title", "class", "onPointerenter"])
197
199
  ]),
198
200
  _: 2
199
201
  }, 1032, ["items", "title", "title-icon"]);
@@ -247,7 +249,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
247
249
  };
248
250
  }
249
251
  });
250
- const LpTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2c920d5a"]]);
252
+ const LpTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-848e78d1"]]);
251
253
  export {
252
254
  LpTabs as default
253
255
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpThemeStudio-B2nPaG-h.js";
1
+ import { _ as _sfc_main } from "../chunks/LpThemeStudio-IupHqP0x.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpThemeSwitcher-C0A5sg_E.js";
1
+ import { _ as _sfc_main } from "../chunks/LpThemeSwitcher-DarPHuX8.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -120,13 +120,15 @@ type __VLS_Props = {
120
120
  minimap?: boolean;
121
121
  controls?: boolean;
122
122
  };
123
+ declare const fitView: import("@vue-flow/core").FitView;
124
+ declare function fitFramed(params?: Parameters<typeof fitView>[0]): Promise<boolean>;
123
125
  declare function applyViewport(v: CanvasViewport): Promise<void>;
124
126
  declare var __VLS_29: {};
125
127
  type __VLS_Slots = {} & {
126
128
  'legend-extra'?: (props: typeof __VLS_29) => any;
127
129
  };
128
130
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
129
- fitView: import("@vue-flow/core").FitView;
131
+ fitView: typeof fitFramed;
130
132
  setViewport: typeof applyViewport;
131
133
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
132
134
  connect: (value: Connection) => any;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTopologyCanvas-B0wEvAoq.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTopologyCanvas-Cq-MiJwo.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpUptimeBar-DRadGq4Y.js";
1
+ import { _ as _sfc_main } from "../chunks/LpUptimeBar-BbhVTPnL.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -19,6 +19,13 @@ export interface ChartSeries {
19
19
  * own scale and its own ticks.
20
20
  */
21
21
  axis?: "left" | "right";
22
+ /**
23
+ * Start with this series switched off, the legend turning it back on. For a
24
+ * series worth having but loud next to the rest: messages in thousands beside
25
+ * people in tens flatten the people line on a shared axis until they are
26
+ * hidden, so the chart opens on the readable view.
27
+ */
28
+ hidden?: boolean;
22
29
  }
23
30
  export type ChartAxis = "left" | "right";
24
31
  /**
@@ -45,6 +52,13 @@ export interface ChartMarker {
45
52
  label?: string;
46
53
  color?: string;
47
54
  }
55
+ /**
56
+ * Which x labels to print with every `stride`-th one shown. The last point is
57
+ * always labelled (it is usually "now"), and when it lands within half a
58
+ * stride to the previous shown label that one gives way: "20 22 23" read as
59
+ * one smudge at the end of an hourly axis.
60
+ */
61
+ export declare function xLabelIndices(count: number, stride: number): number[];
48
62
  /** The x index a marker points at, or -1 when it names nothing on the axis. */
49
63
  export declare const markerIndex: (at: number | string, labels: string[], count: number) => number;
50
64
  /**
@@ -1,4 +1,16 @@
1
1
  import { compactNumber } from "./format.js";
2
+ function xLabelIndices(count, stride) {
3
+ if (count <= 0) return [];
4
+ const step = Math.max(1, Math.floor(stride));
5
+ const out = [];
6
+ for (let i = 0; i < count; i += step) out.push(i);
7
+ const last = count - 1;
8
+ if (out[out.length - 1] !== last) {
9
+ if (out.length > 1 && last - out[out.length - 1] <= step / 2) out.pop();
10
+ out.push(last);
11
+ }
12
+ return out;
13
+ }
2
14
  const markerIndex = (at, labels, count) => {
3
15
  if (typeof at === "number") return Number.isInteger(at) && at >= 0 && at < count ? at : -1;
4
16
  return labels.indexOf(at);
@@ -383,5 +395,6 @@ export {
383
395
  resolveLabels,
384
396
  resolveSlices,
385
397
  xAt,
398
+ xLabelIndices,
386
399
  yAt
387
400
  };
@@ -17,10 +17,16 @@ export interface CompactNumberOptions {
17
17
  /**
18
18
  * Writes the decimal separator the locale's way ("1,2k" in Russian). 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 or a rolling
21
- * counter cannot absorb. Unset keeps a plain "." whatever the browser says.
20
+ * the figure per locale ("1,2 тыс."), which a tick label cannot absorb.
21
+ * Unset keeps a plain "." whatever the browser says.
22
22
  */
23
23
  locale?: string;
24
+ /**
25
+ * With a locale, write the unit as that locale does: "11,9 тыс." in Russian.
26
+ * For a figure read on its own (a stat tile, a counter), where "11,9k" looks
27
+ * foreign; not for axis ticks, where the longer word crowds the axis.
28
+ */
29
+ words?: boolean;
24
30
  /** Places for a figure below a thousand (12.25). Default 2. */
25
31
  plainDecimals?: number;
26
32
  /** Places once a unit is in play (1.2k). Default 1. */
@@ -32,7 +38,8 @@ export interface CompactNumberOptions {
32
38
  fixed?: boolean;
33
39
  }
34
40
  /**
35
- * A figure shortened with k/M/B/T: 1 200 → "1.2k", 3 400 000 → "3.4M".
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.
36
43
  *
37
44
  * The unit is picked by what will PRINT, not by the raw size: 999 950 at one
38
45
  * place rounds to "1000k", which reads as the next unit up, so it becomes
@@ -39,9 +39,21 @@ const COMPACT_UNITS = [
39
39
  [1e9, "B"],
40
40
  [1e12, "T"]
41
41
  ];
42
+ const compactSuffixes = /* @__PURE__ */ new Map();
43
+ function compactSuffix(locale, step) {
44
+ const key = `${locale}|${step}`;
45
+ let found = compactSuffixes.get(key);
46
+ if (found === void 0) {
47
+ const parts = numberFormat(locale, { notation: "compact", compactDisplay: "short" }).formatToParts(COMPACT_UNITS[step][0]);
48
+ const at = parts.findIndex((p) => p.type === "compact");
49
+ found = at < 0 ? COMPACT_UNITS[step][1] : (parts[at - 1]?.type === "literal" ? parts[at - 1].value : "") + parts[at].value;
50
+ compactSuffixes.set(key, found);
51
+ }
52
+ return found;
53
+ }
42
54
  function compactNumber(value, options = {}) {
43
55
  if (!Number.isFinite(value)) return String(value);
44
- const { locale, plainDecimals = 2, decimals = 1, fixed = false } = options;
56
+ const { locale, plainDecimals = 2, decimals = 1, fixed = false, words = false } = options;
45
57
  const abs = Math.abs(value);
46
58
  let i = COMPACT_UNITS.length - 1;
47
59
  while (i > 0 && abs < COMPACT_UNITS[i][0]) i--;
@@ -59,7 +71,7 @@ function compactNumber(value, options = {}) {
59
71
  maximumFractionDigits: places,
60
72
  useGrouping: false
61
73
  }).format(scaled);
62
- return `${number}${COMPACT_UNITS[i][1]}`;
74
+ return `${number}${words && locale !== void 0 && i > 0 ? compactSuffix(locale, i) : COMPACT_UNITS[i][1]}`;
63
75
  }
64
76
  function decimalMark(locale) {
65
77
  return numberFormat(locale, {}).formatToParts(1.5).find((p) => p.type === "decimal")?.value ?? ".";
@@ -13,6 +13,7 @@ function numbered(entries) {
13
13
  for (const entry of entries) {
14
14
  for (const command of entry.commands()) {
15
15
  if (!entry.automatic) {
16
+ if (manual.has(command.id)) continue;
16
17
  manual.add(command.id);
17
18
  out.push(command);
18
19
  continue;
@@ -1,20 +1,13 @@
1
1
  import { ref, watch, toValue, onBeforeUnmount } from "vue";
2
2
  import { prefersReducedMotion } from "./easing.js";
3
- import { atScrollEnd } from "./scroll.js";
4
3
  function useReveal(options = {}) {
5
- const { threshold = 0.25, rootMargin = "0px 0px -10% 0px" } = options;
4
+ const { threshold = 0.25, rootMargin = "0px" } = options;
6
5
  const el = ref(null);
7
6
  const revealed = ref(typeof window === "undefined");
8
7
  let observer = null;
9
- let edge = null;
10
- let onScroll = null;
11
8
  function stop() {
12
9
  observer?.disconnect();
13
10
  observer = null;
14
- edge?.disconnect();
15
- edge = null;
16
- if (onScroll) window.removeEventListener("scroll", onScroll, true);
17
- onScroll = null;
18
11
  }
19
12
  function reveal() {
20
13
  revealed.value = true;
@@ -41,20 +34,6 @@ function useReveal(options = {}) {
41
34
  { threshold, rootMargin }
42
35
  );
43
36
  observer.observe(node);
44
- let onScreen = false;
45
- const check = () => {
46
- if (onScreen && atScrollEnd(node)) reveal();
47
- };
48
- edge = new IntersectionObserver(
49
- (entries) => {
50
- onScreen = entries.some((entry) => entry.isIntersecting);
51
- check();
52
- },
53
- { threshold }
54
- );
55
- edge.observe(node);
56
- onScroll = check;
57
- window.addEventListener("scroll", onScroll, { capture: true, passive: true });
58
37
  },
59
38
  { immediate: true, flush: "post" }
60
39
  );
package/dist/index.d.ts CHANGED
@@ -192,7 +192,7 @@ export type { RevealOrigin } from "./theme/useTheme";
192
192
  export { detectBackdropFilter, GLASS_BACKDROP_ATTR, isBrokenBackdropEngine, NO_BACKDROP_ATTR, setGlassBackdrop } from "./theme/backdrop";
193
193
  export { DEFAULT_SURFACE } from "./theme/tokens";
194
194
  export { defineTheme, withBrand } from "./theme/define";
195
- export { STUDIO_BRANDS, STUDIO_CORNERS, STUDIO_MOTION, STUDIO_SIZES, useThemeStudio } from "./theme/studio";
195
+ export { STUDIO_BRANDS, STUDIO_CORNERS, STUDIO_MOTION, STUDIO_SIZES, STUDIO_SYSTEM, useThemeStudio } from "./theme/studio";
196
196
  export type { StudioState, ThemeStudio, ThemeStudioOptions } from "./theme/studio";
197
197
  export type { ThemeOverrides } from "./theme/define";
198
198
  export type { ColorTokens, DensityTokens, FontTokens, ShapeTokens, SurfaceTokens, TokenSet, } from "./theme/tokens";