@leavepulse/ui 0.24.0 → 0.25.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 (104) hide show
  1. package/dist/assets/LpNumberFlow-rZkwQwlU.css +116 -0
  2. package/dist/assets/LpRollingText-CR1mb0Vt.css +74 -0
  3. package/dist/assets/LpSparkline-0mKTq7pb.css +51 -0
  4. package/dist/assets/LpTooltip-B61SYd4K.css +17 -0
  5. package/dist/assets/LpUptimeBar-B98o9krI.css +18 -0
  6. package/dist/chunks/{LpAppShell-CaQYQKZV.js → LpAppShell-B5k0J3Cf.js} +1 -1
  7. package/dist/chunks/LpChart-tNXs1ttr.js +671 -0
  8. package/dist/chunks/{LpCodeBlock-CSiOSPs8.js → LpCodeBlock-rS_6mO3D.js} +1 -1
  9. package/dist/chunks/{LpConfirmDialog-CObRah9c.js → LpConfirmDialog-CjOGcj1e.js} +32 -4
  10. package/dist/chunks/{LpDisclosure-DP6yfgfM.js → LpDisclosure-BnwP4Q-b.js} +1 -1
  11. package/dist/chunks/{LpFileTree-nU1wRRxZ.js → LpFileTree-BaV7f0O7.js} +1 -1
  12. package/dist/chunks/{LpFileTreeNode-D7WgUPcJ.js → LpFileTreeNode-BzpBa7R7.js} +6 -8
  13. package/dist/chunks/{LpLogViewer-B1aLUVdz.js → LpLogViewer-CcQ3s3Fp.js} +2 -1
  14. package/dist/chunks/{LpMapPicker-DFKrd1Ne.js → LpMapPicker-CXvoTrAe.js} +2 -4
  15. package/dist/chunks/{LpNotificationBell-X1M30e0X.js → LpNotificationBell-Dvu-b6Vn.js} +56 -27
  16. package/dist/chunks/LpNumberFlow-amWYaeuA.js +221 -0
  17. package/dist/chunks/LpPie-BkjWlfSw.js +525 -0
  18. package/dist/chunks/LpProgress-DoIP4jQR.js +198 -0
  19. package/dist/chunks/LpRollingText-CM5gkSeF.js +50 -0
  20. package/dist/chunks/{LpSidebar-D3GGLSE7.js → LpSidebar-7Vpy2IJc.js} +1 -1
  21. package/dist/chunks/{LpSidebarNav-X14xMdPa.js → LpSidebarNav-CFX5NxGs.js} +1 -1
  22. package/dist/chunks/LpSparkline-C6xQ2dwv.js +175 -0
  23. package/dist/chunks/{LpStat-CdbEFOvn.js → LpStat-CDanpzU0.js} +43 -5
  24. package/dist/chunks/{LpThemeSwitcher-BgpJgrnP.js → LpThemeSwitcher-7mAK6bI7.js} +2 -4
  25. package/dist/chunks/LpTooltip-hCLPAqMG.js +131 -0
  26. package/dist/chunks/LpUptimeBar-DcQ8HikG.js +152 -0
  27. package/dist/component-names.d.ts +1 -1
  28. package/dist/components/LpAppShell.vue.js +1 -1
  29. package/dist/components/LpChart.vue.d.ts +88 -0
  30. package/dist/components/LpChart.vue.js +4 -0
  31. package/dist/components/LpCodeBlock.vue.js +1 -1
  32. package/dist/components/LpConfirmDialog.vue.d.ts +18 -2
  33. package/dist/components/LpConfirmDialog.vue.js +1 -1
  34. package/dist/components/LpDisclosure.vue.js +1 -1
  35. package/dist/components/LpFileTree.vue.d.ts +1 -1
  36. package/dist/components/LpFileTree.vue.js +1 -1
  37. package/dist/components/LpFileTreeNode.vue.js +1 -1
  38. package/dist/components/LpLightbox.vue.d.ts +1 -1
  39. package/dist/components/LpLogViewer.vue.d.ts +1 -1
  40. package/dist/components/LpLogViewer.vue.js +1 -1
  41. package/dist/components/LpMapPicker.vue.js +1 -1
  42. package/dist/components/LpNotificationBell.vue.d.ts +12 -0
  43. package/dist/components/LpNotificationBell.vue.js +1 -1
  44. package/dist/components/LpNumberFlow.vue.d.ts +35 -0
  45. package/dist/components/LpNumberFlow.vue.js +4 -0
  46. package/dist/components/LpPie.vue.d.ts +134 -0
  47. package/dist/components/LpPie.vue.js +4 -0
  48. package/dist/components/LpProgress.vue.d.ts +56 -2
  49. package/dist/components/LpProgress.vue.js +1 -1
  50. package/dist/components/LpRollingText.vue.d.ts +33 -0
  51. package/dist/components/LpRollingText.vue.js +4 -0
  52. package/dist/components/LpSidebar.vue.js +1 -1
  53. package/dist/components/LpSidebarNav.vue.js +1 -1
  54. package/dist/components/LpSparkline.vue.d.ts +48 -0
  55. package/dist/components/LpSparkline.vue.js +4 -0
  56. package/dist/components/LpStat.vue.d.ts +25 -2
  57. package/dist/components/LpStat.vue.js +1 -1
  58. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  59. package/dist/components/LpTooltip.vue.d.ts +24 -3
  60. package/dist/components/LpTooltip.vue.js +1 -1
  61. package/dist/components/LpUptimeBar.vue.js +1 -1
  62. package/dist/components/chart.d.ts +180 -0
  63. package/dist/components/chart.js +353 -0
  64. package/dist/composables/easing.d.ts +46 -0
  65. package/dist/composables/easing.js +23 -0
  66. package/dist/composables/usePillTransition.d.ts +13 -1
  67. package/dist/composables/usePillTransition.js +22 -2
  68. package/dist/composables/useReveal.d.ts +26 -0
  69. package/dist/composables/useReveal.js +45 -0
  70. package/dist/composables/useSettled.js +2 -2
  71. package/dist/composables/useShift.js +2 -4
  72. package/dist/index.d.ts +14 -0
  73. package/dist/index.js +126 -103
  74. package/package.json +2 -1
  75. package/src/component-names.ts +5 -0
  76. package/src/components/LpChart.vue +846 -0
  77. package/src/components/LpCodeBlock.vue +1 -1
  78. package/src/components/LpConfirmDialog.vue +49 -0
  79. package/src/components/LpDisclosure.vue +1 -1
  80. package/src/components/LpFileTreeNode.vue +9 -10
  81. package/src/components/LpLogViewer.vue +2 -3
  82. package/src/components/LpMapPicker.vue +2 -5
  83. package/src/components/LpNotificationBell.vue +76 -15
  84. package/src/components/LpNumberFlow.vue +524 -0
  85. package/src/components/LpPie.vue +778 -0
  86. package/src/components/LpProgress.vue +283 -6
  87. package/src/components/LpRollingText.vue +157 -0
  88. package/src/components/LpSidebarNav.vue +1 -1
  89. package/src/components/LpSparkline.vue +312 -0
  90. package/src/components/LpStat.vue +52 -4
  91. package/src/components/LpTooltip.vue +185 -3
  92. package/src/components/LpUptimeBar.vue +150 -53
  93. package/src/components/chart.ts +686 -0
  94. package/src/composables/easing.ts +88 -0
  95. package/src/composables/usePillTransition.ts +71 -6
  96. package/src/composables/useReveal.ts +113 -0
  97. package/src/composables/useSettled.ts +2 -4
  98. package/src/composables/useShift.ts +2 -8
  99. package/src/index.ts +19 -0
  100. package/src/theme/useTheme.ts +2 -8
  101. package/src/tokens/tokens.css +36 -0
  102. package/dist/chunks/LpProgress-BhI0IbjC.js +0 -37
  103. package/dist/chunks/LpTooltip-D1hbjQWG.js +0 -63
  104. package/dist/chunks/LpUptimeBar-CB366k0O.js +0 -127
@@ -0,0 +1,116 @@
1
+
2
+ /*
3
+ * Unscoped: TransitionGroup applies its classes to elements Vue moves and
4
+ * clones, which a scoped attribute selector doesn't reliably reach. Everything
5
+ * is namespaced under .lp-nf.
6
+ */
7
+ /*
8
+ * Fades the top and bottom of every column, so a digit rolls in and out of a
9
+ * window rather than appearing at a hard edge.
10
+ *
11
+ * In PIXELS, not percentages. A percentage fade scales with the row: at 18% it
12
+ * ate 2.4px off a 13.2px line, which on small text read as a shadow lying over
13
+ * the digits rather than as a window they pass through. A fixed 2px looks the
14
+ * same at every size, and only ever touches the sliver where a digit is
15
+ * genuinely entering or leaving.
16
+ */
17
+ .lp-nf__track {
18
+ --lp-nf-fade: 2px;
19
+ -webkit-mask-image: linear-gradient(
20
+ to bottom,
21
+ transparent 0,
22
+ #000 var(--lp-nf-fade),
23
+ #000 calc(100% - var(--lp-nf-fade)),
24
+ transparent 100%
25
+ );
26
+ mask-image: linear-gradient(
27
+ to bottom,
28
+ transparent 0,
29
+ #000 var(--lp-nf-fade),
30
+ #000 calc(100% - var(--lp-nf-fade)),
31
+ transparent 100%
32
+ );
33
+ }
34
+
35
+ /*
36
+ * The cell INHERITS its line box rather than declaring one. A fixed 1.1 made
37
+ * the digits 13.2px tall next to 16px text in the same row, so the two sat on
38
+ * different baselines and the number read as floating above the words beside
39
+ * it. Sharing the inherited line-height puts them on one baseline at any size.
40
+ */
41
+ .lp-nf__cell {
42
+ position: relative;
43
+ display: inline-block;
44
+ overflow: hidden;
45
+ /* A formatter may put a space before its unit ("412 GB"); inline-flex would
46
+ collapse it away, gluing the unit to the number. */
47
+ white-space: pre;
48
+ }
49
+
50
+ /*
51
+ * The strip is as tall as its 20 entries and hangs from the top of the cell —
52
+ * NOT stretched to the cell's height, or each entry would be a twentieth of a
53
+ * line tall. Percentages on `translateY` resolve against the strip's own
54
+ * height, so one entry is 5% of it: digit N sits at -N × 5%.
55
+ */
56
+ .lp-nf__strip {
57
+ position: absolute;
58
+ top: 0;
59
+ left: 0;
60
+ right: 0;
61
+ display: flex;
62
+ flex-direction: column;
63
+ /* Per-instance, so a counter whose VALUE is already being animated from
64
+ outside can shorten the wheel's own spin and stop lagging behind it. */
65
+ /* Settles rather than stops: the wheel carries a hair past its digit and
66
+ drifts back, so a column reads as a mechanism coming to rest. */
67
+ transition: transform var(--lp-nf-spin, var(--duration-slow, 320ms))
68
+ var(--ease-settle);
69
+ will-change: transform;
70
+ }
71
+
72
+ /* Each strip entry is exactly one line box tall, so translating by -N × 5%
73
+ (one twentieth of the 20-entry strip) lands digit N in the window. */
74
+ .lp-nf__digit {
75
+ line-height: inherit;
76
+ }
77
+ .lp-nf__ghost {
78
+ visibility: hidden;
79
+ }
80
+
81
+ /* Faded, so a held-open column reads as an empty wheel rather than a zero the
82
+ number actually has. */
83
+ .lp-nf__cell--pad {
84
+ opacity: 0.18;
85
+ transition: opacity var(--duration-fast, 160ms) linear;
86
+ }
87
+
88
+ /*
89
+ * Columns fade rather than grow. Animating `max-width` here was the cause of
90
+ * the row jittering whenever the digit count changed: the width tween fought
91
+ * the layout while the value was still climbing, so the whole number shuffled
92
+ * sideways and every wheel restarted. The padding above now reserves the space
93
+ * up front, which leaves these transitions with only the appearance of a
94
+ * column to handle — and that is a fade.
95
+ */
96
+ .lp-nf-cell-enter-active,
97
+ .lp-nf-cell-leave-active {
98
+ transition: opacity var(--duration-fast, 160ms) linear;
99
+ }
100
+ .lp-nf-cell-enter-from,
101
+ .lp-nf-cell-leave-to {
102
+ opacity: 0;
103
+ }
104
+
105
+ /* Out of flow while leaving, so the settled row closes up without a reflow
106
+ jump at the end of the transition. */
107
+ .lp-nf-cell-leave-active {
108
+ position: absolute;
109
+ }
110
+ @media (prefers-reduced-motion: reduce) {
111
+ .lp-nf__strip,
112
+ .lp-nf-cell-enter-active,
113
+ .lp-nf-cell-leave-active {
114
+ transition: none;
115
+ }
116
+ }
@@ -0,0 +1,74 @@
1
+
2
+ /*
3
+ * Unscoped on purpose: the transition classes are applied to the element Vue
4
+ * clones during the leave phase, which a scoped attribute selector doesn't
5
+ * reliably reach. Everything is namespaced under .lp-roll instead.
6
+ */
7
+ .lp-roll {
8
+ perspective: var(--lp-roll-perspective);
9
+ }
10
+ .lp-roll__item {
11
+ display: inline-block;
12
+ white-space: nowrap;
13
+ backface-visibility: hidden;
14
+ }
15
+
16
+ /* The outgoing copy leaves the flow so the incoming one keeps the baseline. */
17
+ .lp-roll-up-leave-active,
18
+ .lp-roll-down-leave-active,
19
+ .lp-roll-flip-leave-active {
20
+ position: absolute;
21
+ inset: 0;
22
+ }
23
+ .lp-roll-up-enter-active,
24
+ .lp-roll-up-leave-active,
25
+ .lp-roll-down-enter-active,
26
+ .lp-roll-down-leave-active {
27
+ transition:
28
+ transform var(--lp-roll-duration) var(--ease-emphasized),
29
+ opacity var(--lp-roll-duration) var(--ease-emphasized);
30
+ }
31
+ .lp-roll-up-enter-from {
32
+ transform: translateY(100%);
33
+ opacity: 0;
34
+ }
35
+ .lp-roll-up-leave-to {
36
+ transform: translateY(-100%);
37
+ opacity: 0;
38
+ }
39
+ .lp-roll-down-enter-from {
40
+ transform: translateY(-100%);
41
+ opacity: 0;
42
+ }
43
+ .lp-roll-down-leave-to {
44
+ transform: translateY(100%);
45
+ opacity: 0;
46
+ }
47
+ .lp-roll-flip-enter-active,
48
+ .lp-roll-flip-leave-active {
49
+ transition:
50
+ transform var(--lp-roll-duration) var(--ease-emphasized),
51
+ opacity calc(var(--lp-roll-duration) * 0.6) linear;
52
+ transform-origin: center center;
53
+ }
54
+
55
+ /* Quarter turns, not halves: the two faces meet edge-on at the midpoint, so
56
+ the box reads as turning rather than as one label briefly vanishing. */
57
+ .lp-roll-flip-enter-from {
58
+ transform: rotateX(-90deg);
59
+ opacity: 0;
60
+ }
61
+ .lp-roll-flip-leave-to {
62
+ transform: rotateX(90deg);
63
+ opacity: 0;
64
+ }
65
+ @media (prefers-reduced-motion: reduce) {
66
+ .lp-roll-up-enter-active,
67
+ .lp-roll-up-leave-active,
68
+ .lp-roll-down-enter-active,
69
+ .lp-roll-down-leave-active,
70
+ .lp-roll-flip-enter-active,
71
+ .lp-roll-flip-leave-active {
72
+ transition: none;
73
+ }
74
+ }
@@ -0,0 +1,51 @@
1
+
2
+ /*
3
+ * Unscoped and namespaced: the reveal is driven by CSS variables the component
4
+ * sets inline, and keyframes cannot live in a scoped block that the animated
5
+ * element may not carry the attribute for.
6
+ *
7
+ * Only elements that were given the variables animate — `animate: false` omits
8
+ * them, the `var()` fallbacks resolve to a finished state, and nothing moves.
9
+ *
10
+ * `--waiting` is the third state: the element is on the page but has not been
11
+ * scrolled to, so it is held at the animation's first frame. It cannot simply
12
+ * be left un-animated, because that is indistinguishable from finished.
13
+ */
14
+ .lp-spark__line {
15
+ stroke-dasharray: var(--lp-spark-len, none);
16
+ stroke-dashoffset: 0;
17
+ animation: lp-spark-draw var(--lp-spark-dur, 0ms) var(--ease-travel) both;
18
+ }
19
+ .lp-spark__area,
20
+ .lp-spark__dot {
21
+ /* Behind the line: the fill and the end marker belong to a line that has
22
+ already been drawn, so they fade in over its last third. */
23
+ animation: lp-spark-fade var(--lp-spark-dur, 0ms) ease both;
24
+ }
25
+ .lp-spark--waiting.lp-spark__line {
26
+ stroke-dashoffset: var(--lp-spark-len, 0);
27
+ animation: none;
28
+ }
29
+ .lp-spark--waiting.lp-spark__area,
30
+ .lp-spark--waiting.lp-spark__dot {
31
+ opacity: 0;
32
+ animation: none;
33
+ }
34
+ @keyframes lp-spark-draw {
35
+ from {
36
+ stroke-dashoffset: var(--lp-spark-len, 0);
37
+ }
38
+ }
39
+ @keyframes lp-spark-fade {
40
+ 0%,
41
+ 60% {
42
+ opacity: 0;
43
+ }
44
+ }
45
+ @media (prefers-reduced-motion: reduce) {
46
+ .lp-spark__line,
47
+ .lp-spark__area,
48
+ .lp-spark__dot {
49
+ animation: none;
50
+ }
51
+ }
@@ -0,0 +1,17 @@
1
+
2
+ /*
3
+ * Unscoped: the element that has to be made transparent is reka's own
4
+ * positioning wrapper, which this component never renders and a scoped
5
+ * attribute therefore never reaches.
6
+ *
7
+ * In follow mode the tip is placed AT the cursor, so both the panel and that
8
+ * wrapper sit under the pointer. The panel alone being transparent was not
9
+ * enough — the wrapper still took the events, the trigger never received its
10
+ * pointerleave, and the tip stayed open: it lingered after the pointer left,
11
+ * a second chart could open its own on top, and a scroll left them stranded
12
+ * because the trigger had never been told the pointer had gone.
13
+ */
14
+ :has(> [data-lp-follow]),
15
+ [data-lp-follow] {
16
+ pointer-events: none;
17
+ }
@@ -0,0 +1,18 @@
1
+
2
+ /*
3
+ * The slot is the full share of the row; the mark inside it is narrowed to a
4
+ * FRACTION of that share, which is what produces the space between days.
5
+ * Because the inset scales with the slot, the mark-to-gap ratio holds at any
6
+ * width and any number of slices, and both round to device pixels together
7
+ * instead of drifting apart.
8
+ *
9
+ * A horizontal scale, not padding. Percentage padding resolves against the
10
+ * PARENT's width, never the element's own — so `padding-inline: 18%` on a slot
11
+ * of a 384px bar asked for 69px of padding on each side of a 3.2px slice. The
12
+ * marks collapsed to zero width and the bar vanished, while flex stretched the
13
+ * slots to fit the padding. `scale` is one of the few things that is genuinely
14
+ * relative to the box itself.
15
+ */
16
+ .lp-uptime__mark {
17
+ scale: 0.64 1;
18
+ }
@@ -3,7 +3,7 @@ import { _ as _sfc_main$2 } from "./LpButton-5VXXCjwF.js";
3
3
  import { _ as _sfc_main$3 } from "./LpIcon-CCnX5_2j.js";
4
4
  import { _ as _sfc_main$5 } from "./LpScrollArea-D8xyKXcF.js";
5
5
  import { _ as _sfc_main$4 } from "./LpShift-DXNsauQZ.js";
6
- import { _ as _sfc_main$1 } from "./LpSidebar-D3GGLSE7.js";
6
+ import { _ as _sfc_main$1 } from "./LpSidebar-7Vpy2IJc.js";
7
7
  const _hoisted_1 = { class: "flex h-dvh overflow-hidden bg-surface text-ink" };
8
8
  const _hoisted_2 = { class: "flex min-w-0 flex-1 flex-col" };
9
9
  const _hoisted_3 = { class: "flex h-16 shrink-0 items-center gap-3 border-b border-line bg-surface px-4 md:px-6" };