@wick-charts/vue 0.4.2 → 0.5.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 (144) hide show
  1. package/README.md +5 -3
  2. package/dist/BarSeries.vue.js +44 -0
  3. package/dist/BarSeries.vue2.js +4 -0
  4. package/dist/CandlestickSeries.vue.js +45 -0
  5. package/dist/CandlestickSeries.vue2.js +4 -0
  6. package/dist/ChartContainer.vue.js +168 -0
  7. package/dist/ChartContainer.vue2.js +4 -0
  8. package/dist/LineSeries.vue.js +44 -0
  9. package/dist/LineSeries.vue2.js +4 -0
  10. package/dist/PieSeries.vue.js +34 -0
  11. package/dist/PieSeries.vue2.js +4 -0
  12. package/dist/composables.js +44 -0
  13. package/dist/context.js +25 -0
  14. package/dist/core/dist/animation/animator.js +72 -0
  15. package/dist/core/dist/animation/config.js +145 -0
  16. package/dist/core/dist/animation/easing.js +4 -0
  17. package/dist/core/dist/animation/scalar-spring.js +57 -0
  18. package/dist/core/dist/animation/spring.js +11 -0
  19. package/dist/core/dist/animation/time.js +19 -0
  20. package/dist/core/dist/animation/viewport-engine.js +174 -0
  21. package/dist/core/dist/animation/visible-range-spring.js +64 -0
  22. package/dist/core/dist/animation/y-range-hermite.js +72 -0
  23. package/dist/core/dist/animation/y-range-snap.js +31 -0
  24. package/dist/core/dist/animation/y-range-spring.js +59 -0
  25. package/dist/core/dist/axis/dom-labels.js +60 -0
  26. package/dist/core/dist/canvas-manager.js +109 -0
  27. package/dist/core/dist/chart/edge-indicators.js +26 -0
  28. package/dist/core/dist/chart/fit-to-data.js +9 -0
  29. package/dist/core/dist/chart/last-value.js +31 -0
  30. package/dist/core/dist/chart/options.js +35 -0
  31. package/dist/core/dist/chart/pan-zoom-math.js +66 -0
  32. package/dist/core/dist/chart/streaming-cadence.js +70 -0
  33. package/dist/core/dist/chart/streaming-target.js +22 -0
  34. package/dist/core/dist/chart/viewport-padding.js +6 -0
  35. package/dist/core/dist/chart/y-target.js +24 -0
  36. package/dist/core/dist/chart.js +1495 -0
  37. package/dist/core/dist/components/crosshair.js +9 -0
  38. package/dist/core/dist/components/edge-indicator.js +36 -0
  39. package/dist/core/dist/components/grid.js +22 -0
  40. package/dist/core/dist/components/marker.js +41 -0
  41. package/dist/core/dist/components/reference-line.js +48 -0
  42. package/dist/core/dist/components/time-region.js +35 -0
  43. package/dist/core/dist/data/decimation.js +54 -0
  44. package/dist/core/dist/data/store.js +76 -0
  45. package/dist/core/dist/data/sync.js +47 -0
  46. package/dist/core/dist/events.js +19 -0
  47. package/dist/core/dist/interactions/handler.js +84 -0
  48. package/dist/core/dist/interactions/pan.js +26 -0
  49. package/dist/core/dist/interactions/zoom.js +21 -0
  50. package/dist/core/dist/navigator/controller.js +374 -0
  51. package/dist/core/dist/navigator/decimate.js +44 -0
  52. package/dist/core/dist/navigator/interactions.js +28 -0
  53. package/dist/core/dist/navigator/render.js +68 -0
  54. package/dist/core/dist/perf/counting-context.js +19 -0
  55. package/dist/core/dist/perf/perf-hud.js +453 -0
  56. package/dist/core/dist/perf/perf-monitor.js +132 -0
  57. package/dist/core/dist/render-scheduler.js +31 -0
  58. package/dist/core/dist/scales/tick-tracker.js +110 -0
  59. package/dist/core/dist/scales/x-scale.js +145 -0
  60. package/dist/core/dist/scales/y-scale.js +156 -0
  61. package/dist/core/dist/series/bar.js +341 -0
  62. package/dist/core/dist/series/base-multi-layer.js +438 -0
  63. package/dist/core/dist/series/candlestick.js +481 -0
  64. package/dist/core/dist/series/definition.js +11 -0
  65. package/dist/core/dist/series/line.js +446 -0
  66. package/dist/core/dist/series/painters/builtins.js +36 -0
  67. package/dist/core/dist/series/painters/canvas-path.js +79 -0
  68. package/dist/core/dist/series/painters/resolve.js +32 -0
  69. package/dist/core/dist/series/pie.js +545 -0
  70. package/dist/core/dist/series/register-builtins.js +11 -0
  71. package/dist/core/dist/series/stack-math.js +17 -0
  72. package/dist/core/dist/snapshots.js +107 -0
  73. package/dist/core/dist/theme/create.js +176 -0
  74. package/dist/core/dist/theme/resolve.js +14 -0
  75. package/dist/core/dist/theme/themes/andromeda.js +33 -0
  76. package/dist/core/dist/theme/themes/ayu-mirage.js +33 -0
  77. package/dist/core/dist/theme/themes/catppuccin.js +33 -0
  78. package/dist/core/dist/theme/themes/dracula.js +35 -0
  79. package/dist/core/dist/theme/themes/github-light.js +34 -0
  80. package/dist/core/dist/theme/themes/gruvbox.js +33 -0
  81. package/dist/core/dist/theme/themes/handwritten.js +101 -0
  82. package/dist/core/dist/theme/themes/high-contrast.js +33 -0
  83. package/dist/core/dist/theme/themes/lavender-mist.js +33 -0
  84. package/dist/core/dist/theme/themes/light-pink.js +34 -0
  85. package/dist/core/dist/theme/themes/material-palenight.js +33 -0
  86. package/dist/core/dist/theme/themes/minimal-light.js +34 -0
  87. package/dist/core/dist/theme/themes/mint-breeze.js +33 -0
  88. package/dist/core/dist/theme/themes/monokai-pro.js +33 -0
  89. package/dist/core/dist/theme/themes/night-owl.js +35 -0
  90. package/dist/core/dist/theme/themes/one-dark-pro.js +33 -0
  91. package/dist/core/dist/theme/themes/panda.js +33 -0
  92. package/dist/core/dist/theme/themes/peach-cream.js +33 -0
  93. package/dist/core/dist/theme/themes/quiet-light.js +37 -0
  94. package/dist/core/dist/theme/themes/rose-pine-dawn.js +33 -0
  95. package/dist/core/dist/theme/themes/sand-dune.js +33 -0
  96. package/dist/core/dist/theme/themes/solarized-light.js +34 -0
  97. package/dist/core/dist/tooltip-position.js +10 -0
  98. package/dist/core/dist/utils/color.js +37 -0
  99. package/dist/core/dist/utils/format.js +29 -0
  100. package/dist/core/dist/utils/math.js +26 -0
  101. package/dist/core/dist/utils/poisoned-data-reporter.js +15 -0
  102. package/dist/core/dist/utils/time.js +41 -0
  103. package/dist/index.d.ts +827 -63
  104. package/dist/index.js +142 -8025
  105. package/dist/ui/Crosshair.vue.js +53 -0
  106. package/dist/ui/Crosshair.vue2.js +4 -0
  107. package/dist/ui/InfoBar.vue.js +143 -0
  108. package/dist/ui/InfoBar.vue2.js +4 -0
  109. package/dist/ui/Legend.vue.js +212 -0
  110. package/dist/ui/Legend.vue2.js +4 -0
  111. package/dist/ui/Marker.vue.js +47 -0
  112. package/dist/ui/Marker.vue2.js +4 -0
  113. package/dist/ui/Navigator.vue.js +58 -0
  114. package/dist/ui/Navigator.vue2.js +4 -0
  115. package/dist/ui/NumberFlow.vue.js +69 -0
  116. package/dist/ui/NumberFlow.vue2.js +4 -0
  117. package/dist/ui/PieLegend.vue.js +132 -0
  118. package/dist/ui/PieLegend.vue2.js +4 -0
  119. package/dist/ui/PieTooltip.vue.js +135 -0
  120. package/dist/ui/PieTooltip.vue2.js +4 -0
  121. package/dist/ui/ReferenceLine.vue.js +44 -0
  122. package/dist/ui/ReferenceLine.vue2.js +4 -0
  123. package/dist/ui/TimeAxis.vue.js +43 -0
  124. package/dist/ui/TimeAxis.vue2.js +4 -0
  125. package/dist/ui/TimeRegion.vue.js +41 -0
  126. package/dist/ui/TimeRegion.vue2.js +4 -0
  127. package/dist/ui/Title.vue.js +54 -0
  128. package/dist/ui/Title.vue2.js +4 -0
  129. package/dist/ui/Tooltip.vue.js +195 -0
  130. package/dist/ui/Tooltip.vue2.js +4 -0
  131. package/dist/ui/YAxis.vue.js +42 -0
  132. package/dist/ui/YAxis.vue2.js +4 -0
  133. package/dist/ui/YLabel.vue.js +105 -0
  134. package/dist/ui/YLabel.vue2.js +4 -0
  135. package/package.json +2 -2
  136. package/src/BarSeries.vue +12 -13
  137. package/src/CandlestickSeries.vue +17 -6
  138. package/src/LineSeries.vue +12 -13
  139. package/src/PieSeries.vue +2 -1
  140. package/src/index.ts +23 -0
  141. package/src/ui/Legend.vue +1 -2
  142. package/src/ui/Marker.vue +62 -0
  143. package/src/ui/ReferenceLine.vue +58 -0
  144. package/src/ui/TimeRegion.vue +54 -0
@@ -0,0 +1,33 @@
1
+ import { createTheme as o, SPACE_MONO_URL as e, SPACE_MONO as r, autoGradient as a } from "../create.js";
2
+ const d = o({
3
+ name: "Mint Breeze",
4
+ background: "#f6f5ee",
5
+ candlestick: {
6
+ up: { body: a("#2e9070"), wick: "#2e9070" },
7
+ down: { body: a("#d04848"), wick: "#d04848" }
8
+ },
9
+ line: { color: "#2a8a80" },
10
+ seriesColors: [
11
+ "#2a8a80",
12
+ "#d0884a",
13
+ "#2e9070",
14
+ "#7a68b0",
15
+ "#d04848",
16
+ "#a09040",
17
+ "#3a7a9a",
18
+ "#d04848",
19
+ "#2a8a80",
20
+ "#7a68b0"
21
+ ],
22
+ bands: { upper: "#3a7a9a", lower: "#d04848" },
23
+ grid: { color: "rgba(100,150,140,0.1)" },
24
+ axis: { textColor: "#80a098" },
25
+ crosshair: { color: "rgba(55,80,70,0.45)", labelBackground: "#ece8de" },
26
+ tooltip: { background: "rgba(246,245,238,0.95)", textColor: "#2a3530", borderColor: "rgba(130,140,115,0.2)" },
27
+ typography: { fontFamily: r },
28
+ fontUrl: e,
29
+ chartGradient: ["#f8f7f0", "#f6f5ee"]
30
+ });
31
+ export {
32
+ d as mintBreeze
33
+ };
@@ -0,0 +1,33 @@
1
+ import { createTheme as r, FIRA_URL as a, FIRA as c, autoGradient as o } from "../create.js";
2
+ const b = r({
3
+ name: "Monokai Pro",
4
+ description: "Bold syntax colors on dark gray",
5
+ background: "#2d2a2e",
6
+ grid: { color: "rgba(104,100,102,0.2)" },
7
+ candlestick: {
8
+ up: { body: o("#8ab862"), wick: "#8ab862" },
9
+ down: { body: o("#d05470"), wick: "#d05470" }
10
+ },
11
+ line: { color: "#62b8c8" },
12
+ seriesColors: [
13
+ "#62b8c8",
14
+ "#d08050",
15
+ "#8ab862",
16
+ "#9080c8",
17
+ "#d05470",
18
+ "#d0b850",
19
+ "#62b8c8",
20
+ "#d05470",
21
+ "#8ab862",
22
+ "#9080c8"
23
+ ],
24
+ bands: { upper: "#62b8c8", lower: "#d05470" },
25
+ crosshair: { color: "rgba(114,112,114,0.7)", labelBackground: "#403e42" },
26
+ axis: { textColor: "#727072" },
27
+ tooltip: { background: "rgba(45,42,46,0.92)", textColor: "#fcfcfa", borderColor: "rgba(64,60,62,0.6)" },
28
+ typography: { fontFamily: c },
29
+ fontUrl: a
30
+ });
31
+ export {
32
+ b as monokaiPro
33
+ };
@@ -0,0 +1,35 @@
1
+ import { createTheme as a, MONO_URL as e, MONO as r, autoGradient as o } from "../create.js";
2
+ const c = a({
3
+ name: "Night Owl",
4
+ description: "Crafted for late-night coding",
5
+ background: "#011627",
6
+ grid: { color: "rgba(71,92,118,0.2)" },
7
+ candlestick: {
8
+ up: { body: o("#7ec699"), wick: "#7ec699" },
9
+ down: { body: o("#e06c75"), wick: "#e06c75" }
10
+ },
11
+ line: { color: "#82aaff" },
12
+ seriesColors: [
13
+ "#82aaff",
14
+ "#d49a6a",
15
+ "#7ec699",
16
+ "#b48ead",
17
+ "#e06c75",
18
+ "#d4b568",
19
+ "#5fb3a1",
20
+ "#d47084",
21
+ "#6bc5e0",
22
+ "#b48ead"
23
+ ],
24
+ bands: { upper: "#6bc5e0", lower: "#d47084" },
25
+ crosshair: { color: "rgba(99,119,119,0.7)", labelBackground: "#1d3b53" },
26
+ // Hue nudged from cyan (`#495a5a`) toward navy so the muted text shares
27
+ // the page bg's blue family instead of reading as a separate teal-grey.
28
+ axis: { textColor: "#4d5a6c" },
29
+ tooltip: { background: "rgba(1,22,39,0.92)", textColor: "#d6deeb", borderColor: "rgba(31,52,72,0.6)" },
30
+ typography: { fontFamily: r },
31
+ fontUrl: e
32
+ });
33
+ export {
34
+ c as nightOwl
35
+ };
@@ -0,0 +1,33 @@
1
+ import { createTheme as r, MONO_URL as a, MONO as e, autoGradient as o } from "../create.js";
2
+ const d = r({
3
+ name: "One Dark Pro",
4
+ description: "Atom editor's iconic dark palette",
5
+ background: "#282c34",
6
+ grid: { color: "rgba(99,104,116,0.2)" },
7
+ candlestick: {
8
+ up: { body: o("#98c379"), wick: "#98c379" },
9
+ down: { body: o("#e06c75"), wick: "#e06c75" }
10
+ },
11
+ line: { color: "#61afef" },
12
+ seriesColors: [
13
+ "#61afef",
14
+ "#e5c07b",
15
+ "#98c379",
16
+ "#c678dd",
17
+ "#e06c75",
18
+ "#56b6c2",
19
+ "#d19a66",
20
+ "#be5046",
21
+ "#61afef",
22
+ "#c678dd"
23
+ ],
24
+ bands: { upper: "#56b6c2", lower: "#c678dd" },
25
+ crosshair: { color: "rgba(99,110,123,0.7)", labelBackground: "#3e4451" },
26
+ axis: { textColor: "#5c6370" },
27
+ tooltip: { background: "rgba(40,44,52,0.92)", textColor: "#abb2bf", borderColor: "rgba(59,64,72,0.6)" },
28
+ typography: { fontFamily: e },
29
+ fontUrl: a
30
+ });
31
+ export {
32
+ d as oneDarkPro
33
+ };
@@ -0,0 +1,33 @@
1
+ import { createTheme as a, FIRA_URL as r, FIRA as f, autoGradient as o } from "../create.js";
2
+ const b = a({
3
+ name: "Panda",
4
+ description: "Playful neons on charcoal",
5
+ background: "#292a2b",
6
+ grid: { color: "rgba(98,98,100,0.2)" },
7
+ candlestick: {
8
+ up: { body: o("#19f9d8"), wick: "#19f9d8" },
9
+ down: { body: o("#ff75b5"), wick: "#ff75b5" }
10
+ },
11
+ line: { color: "#6fc1ff" },
12
+ seriesColors: [
13
+ "#6fc1ff",
14
+ "#ffb86c",
15
+ "#19f9d8",
16
+ "#b084eb",
17
+ "#ff75b5",
18
+ "#ffcc95",
19
+ "#19f9d8",
20
+ "#ff4b82",
21
+ "#45a9f9",
22
+ "#b084eb"
23
+ ],
24
+ bands: { upper: "#45a9f9", lower: "#ff75b5" },
25
+ crosshair: { color: "rgba(117,117,117,0.7)", labelBackground: "#3a3a3c" },
26
+ axis: { textColor: "#757575" },
27
+ tooltip: { background: "rgba(41,42,43,0.92)", textColor: "#e6e6e6", borderColor: "rgba(58,58,60,0.6)" },
28
+ typography: { fontFamily: f },
29
+ fontUrl: r
30
+ });
31
+ export {
32
+ b as panda
33
+ };
@@ -0,0 +1,33 @@
1
+ import { createTheme as o, JAKARTA_URL as r, JAKARTA as e, autoGradient as a } from "../create.js";
2
+ const t = o({
3
+ name: "Peach Cream",
4
+ background: "#fef6f0",
5
+ candlestick: {
6
+ up: { body: a("#5a9a68"), wick: "#5a9a68" },
7
+ down: { body: a("#d06848"), wick: "#d06848" }
8
+ },
9
+ line: { color: "#d07040" },
10
+ seriesColors: [
11
+ "#d07040",
12
+ "#5a9a68",
13
+ "#8a6aaa",
14
+ "#c0884a",
15
+ "#d06848",
16
+ "#4a8a9a",
17
+ "#9a7a4a",
18
+ "#d06848",
19
+ "#d07040",
20
+ "#8a6aaa"
21
+ ],
22
+ bands: { upper: "#4a8a9a", lower: "#d06848" },
23
+ grid: { color: "rgba(180,140,120,0.12)" },
24
+ axis: { textColor: "#b09080" },
25
+ crosshair: { color: "rgba(100,70,55,0.45)", labelBackground: "#f0e4d8" },
26
+ tooltip: { background: "rgba(254,246,240,0.95)", textColor: "#4a3028", borderColor: "rgba(180,140,120,0.25)" },
27
+ typography: { fontFamily: e },
28
+ fontUrl: r,
29
+ chartGradient: ["#fff8f2", "#fef6f0"]
30
+ });
31
+ export {
32
+ t as peachCream
33
+ };
@@ -0,0 +1,37 @@
1
+ import { createTheme as o, IBM_URL as r, IBM as e, autoGradient as a } from "../create.js";
2
+ const t = o({
3
+ name: "Quiet Light",
4
+ description: "Subdued and easy on the eyes",
5
+ background: "#f5f5f5",
6
+ // Pin the gradient top stop instead of letting `createTheme` derive it
7
+ // from `lightenHex(bg, 0.06)` — that landed at `#ffffff`, which read as
8
+ // a hard white seam against the rest of the chrome.
9
+ chartGradient: ["#fdfdfd", "#f5f5f5"],
10
+ grid: { color: "rgba(200,200,200,0.4)" },
11
+ candlestick: {
12
+ up: { body: a("#448c27"), wick: "#448c27" },
13
+ down: { body: a("#aa3731"), wick: "#aa3731" }
14
+ },
15
+ line: { color: "#4b69c6" },
16
+ seriesColors: [
17
+ "#4b69c6",
18
+ "#c47820",
19
+ "#448c27",
20
+ "#7a3e9d",
21
+ "#aa3731",
22
+ "#c47820",
23
+ "#2d8fa1",
24
+ "#aa3731",
25
+ "#448c27",
26
+ "#7a3e9d"
27
+ ],
28
+ bands: { upper: "#2d8fa1", lower: "#aa3731" },
29
+ crosshair: { color: "rgba(80,80,80,0.5)", labelBackground: "#e8e8e8" },
30
+ axis: { textColor: "#aaaaaa" },
31
+ tooltip: { background: "rgba(245,245,245,0.95)", textColor: "#333333", borderColor: "rgba(200,200,200,0.5)" },
32
+ typography: { fontFamily: e },
33
+ fontUrl: r
34
+ });
35
+ export {
36
+ t as quietLight
37
+ };
@@ -0,0 +1,33 @@
1
+ import { createTheme as o, SOURCE_CODE_URL as r, SOURCE_CODE as e, autoGradient as a } from "../create.js";
2
+ const d = o({
3
+ name: "Rosé Pine Dawn",
4
+ description: "Dawn-inspired warm neutrals",
5
+ background: "#faf4ed",
6
+ grid: { color: "rgba(152,147,165,0.2)" },
7
+ candlestick: {
8
+ up: { body: a("#56949f"), wick: "#56949f" },
9
+ down: { body: a("#b4637a"), wick: "#b4637a" }
10
+ },
11
+ line: { color: "#907aa9" },
12
+ seriesColors: [
13
+ "#907aa9",
14
+ "#ea9d34",
15
+ "#56949f",
16
+ "#d7827e",
17
+ "#b4637a",
18
+ "#ea9d34",
19
+ "#286983",
20
+ "#b4637a",
21
+ "#907aa9",
22
+ "#d7827e"
23
+ ],
24
+ bands: { upper: "#286983", lower: "#b4637a" },
25
+ crosshair: { color: "rgba(80,72,98,0.5)", labelBackground: "#f2e9e1" },
26
+ axis: { textColor: "#9893a5" },
27
+ tooltip: { background: "rgba(250,244,237,0.95)", textColor: "#575279", borderColor: "rgba(152,147,165,0.2)" },
28
+ typography: { fontFamily: e },
29
+ fontUrl: r
30
+ });
31
+ export {
32
+ d as rosePineDawn
33
+ };
@@ -0,0 +1,33 @@
1
+ import { createTheme as o, SOURCE_CODE_URL as r, SOURCE_CODE as e, autoGradient as a } from "../create.js";
2
+ const t = o({
3
+ name: "Sand Dune",
4
+ background: "#f4f0e8",
5
+ candlestick: {
6
+ up: { body: a("#5a8a50"), wick: "#5a8a50" },
7
+ down: { body: a("#b85040"), wick: "#b85040" }
8
+ },
9
+ line: { color: "#8a6a3a" },
10
+ seriesColors: [
11
+ "#8a6a3a",
12
+ "#b87a40",
13
+ "#5a8a50",
14
+ "#7a5a70",
15
+ "#b85040",
16
+ "#a09030",
17
+ "#4a7a7a",
18
+ "#b85040",
19
+ "#8a6a3a",
20
+ "#7a5a70"
21
+ ],
22
+ bands: { upper: "#4a7a7a", lower: "#b85040" },
23
+ grid: { color: "rgba(150,130,100,0.15)" },
24
+ axis: { textColor: "#9a8a70" },
25
+ crosshair: { color: "rgba(85,65,45,0.45)", labelBackground: "#e8e0d0" },
26
+ tooltip: { background: "rgba(244,240,232,0.95)", textColor: "#3a3020", borderColor: "rgba(150,130,100,0.3)" },
27
+ typography: { fontFamily: e },
28
+ fontUrl: r,
29
+ chartGradient: ["#f8f4ec", "#f4f0e8"]
30
+ });
31
+ export {
32
+ t as sandDune
33
+ };
@@ -0,0 +1,34 @@
1
+ import { createTheme as r, MONO_URL as a, MONO as e, autoGradient as o } from "../create.js";
2
+ const d = r({
3
+ name: "Solarized Light",
4
+ description: "Ethan Schoonover's precision palette",
5
+ background: "#fdf6e3",
6
+ chartGradient: ["#fef8e8", "#fdf6e3"],
7
+ grid: { color: "rgba(200,193,170,0.4)" },
8
+ candlestick: {
9
+ up: { body: o("#859900"), wick: "#859900" },
10
+ down: { body: o("#dc322f"), wick: "#dc322f" }
11
+ },
12
+ line: { color: "#268bd2" },
13
+ seriesColors: [
14
+ "#268bd2",
15
+ "#cb4b16",
16
+ "#859900",
17
+ "#6c71c4",
18
+ "#dc322f",
19
+ "#b58900",
20
+ "#2aa198",
21
+ "#d33682",
22
+ "#268bd2",
23
+ "#6c71c4"
24
+ ],
25
+ bands: { upper: "#2aa198", lower: "#d33682" },
26
+ crosshair: { color: "rgba(80,100,100,0.55)", labelBackground: "#eee8d5" },
27
+ axis: { textColor: "#93a1a1" },
28
+ tooltip: { background: "rgba(253,246,227,0.95)", textColor: "#586e75", borderColor: "rgba(238,232,213,0.6)" },
29
+ typography: { fontFamily: e },
30
+ fontUrl: a
31
+ });
32
+ export {
33
+ d as solarizedLight
34
+ };
@@ -0,0 +1,10 @@
1
+ function s(m) {
2
+ const { x: t, y: o, chartWidth: n, chartHeight: f, tooltipWidth: a, tooltipHeight: h, offsetX: i = 16, offsetY: e = 16 } = m, p = t + i + a > n ? t - i - a : t + i, x = o + e + h > f ? o - e - h : o + e, c = Math.max(0, n - a), r = Math.max(0, f - h);
3
+ return {
4
+ left: Math.max(0, Math.min(c, p)),
5
+ top: Math.max(0, Math.min(r, x))
6
+ };
7
+ }
8
+ export {
9
+ s as computeTooltipPosition
10
+ };
@@ -0,0 +1,37 @@
1
+ function p(n, r) {
2
+ return typeof n == "function" ? n(r) : n;
3
+ }
4
+ const u = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
5
+ function c(n) {
6
+ return [parseInt(n.slice(1, 3), 16), parseInt(n.slice(3, 5), 16), parseInt(n.slice(5, 7), 16)];
7
+ }
8
+ function g(n) {
9
+ return !n.startsWith("#") || n.length !== 4 ? n : `#${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`;
10
+ }
11
+ function f(n, r, e) {
12
+ return `#${n.toString(16).padStart(2, "0")}${r.toString(16).padStart(2, "0")}${e.toString(16).padStart(2, "0")}`;
13
+ }
14
+ function h(n, r) {
15
+ if (n.startsWith("rgba")) return n.replace(/[\d.]+\)\s*$/, `${r})`);
16
+ if (n.startsWith("rgb(")) return n.replace(/^rgb\((.*)\)$/i, `rgba($1, ${r})`);
17
+ const e = n + r, t = u.get(e);
18
+ if (t) return t;
19
+ const [a, i, s] = c(g(n)), o = Number.isNaN(a) || Number.isNaN(i) || Number.isNaN(s) ? n : `rgba(${a}, ${i}, ${s}, ${r})`;
20
+ return u.set(e, o), o;
21
+ }
22
+ function b(n, r) {
23
+ const e = n + r;
24
+ let t = $.get(e);
25
+ if (t) return t;
26
+ const [a, i, s] = c(n);
27
+ return t = f(
28
+ Math.min(255, Math.round(a + (255 - a) * r)),
29
+ Math.min(255, Math.round(i + (255 - i) * r)),
30
+ Math.min(255, Math.round(s + (255 - s) * r))
31
+ ), $.set(e, t), t;
32
+ }
33
+ export {
34
+ h as hexToRgba,
35
+ b as lighten,
36
+ p as resolveColor
37
+ };
@@ -0,0 +1,29 @@
1
+ function u(t) {
2
+ const a = Math.abs(t);
3
+ if (a === 0) return "0";
4
+ if (a < 1e-12) return t.toExponential(2);
5
+ const n = Math.max(0, Math.ceil(-Math.log10(a)) - 1), o = Math.min(12, n + 4), i = t.toFixed(o);
6
+ return i.includes(".") ? i.replace(/\.?0+$/, "") : i;
7
+ }
8
+ function l(t) {
9
+ return Number.isNaN(t) ? "—" : t === 1 / 0 ? "∞" : t === -1 / 0 ? "−∞" : null;
10
+ }
11
+ function F(t, a) {
12
+ const n = l(t);
13
+ if (n !== null) return n;
14
+ const o = Math.abs(t), i = a?.decimals ?? 2, r = (c, s, x) => {
15
+ const e = c / s, d = Number.parseFloat(e.toFixed(i));
16
+ return Math.abs(d) >= 1e3 ? null : `${e.toFixed(i)}${x}`;
17
+ };
18
+ return o >= 1e15 ? t.toExponential(2) : o >= 1e12 ? r(t, 1e12, "T") ?? t.toExponential(2) : o >= 1e9 ? r(t, 1e9, "B") ?? `${(t / 1e12).toFixed(i)}T` : o >= 1e6 ? r(t, 1e6, "M") ?? `${(t / 1e9).toFixed(i)}B` : o >= 1e3 ? r(t, 1e3, "K") ?? `${(t / 1e6).toFixed(i)}M` : o < 1 ? u(t) : o < 100 ? t.toFixed(2) : t.toFixed(0);
19
+ }
20
+ function f(t) {
21
+ const a = l(t);
22
+ if (a !== null) return a;
23
+ const n = Math.abs(t);
24
+ return n === 0 ? "0" : n < 1 ? u(t) : n < 100 ? t.toFixed(4) : n >= 1e7 ? F(t) : n < 1e4 ? t.toFixed(2) : t.toFixed(0);
25
+ }
26
+ export {
27
+ F as formatCompact,
28
+ f as formatPriceAdaptive
29
+ };
@@ -0,0 +1,26 @@
1
+ function u(t, r, n) {
2
+ return Math.max(r, Math.min(n, t));
3
+ }
4
+ function c(t, r, n) {
5
+ return t + (r - t) * n;
6
+ }
7
+ function s(t, r, n, e) {
8
+ const a = Math.exp(-n * e);
9
+ return r + (t - r) * a;
10
+ }
11
+ function f(t, r, n) {
12
+ let e = 0, a = t.length - 1;
13
+ for (; e <= a; ) {
14
+ const o = e + a >>> 1, i = n(t[o]);
15
+ if (i < r) e = o + 1;
16
+ else if (i > r) a = o - 1;
17
+ else return o;
18
+ }
19
+ return e;
20
+ }
21
+ export {
22
+ f as binarySearch,
23
+ u as clamp,
24
+ c as lerp,
25
+ s as smoothToward
26
+ };
@@ -0,0 +1,15 @@
1
+ function s(e) {
2
+ return typeof e == "number" && !Number.isFinite(e);
3
+ }
4
+ const r = /* @__PURE__ */ (() => {
5
+ const e = /* @__PURE__ */ new WeakSet();
6
+ return (n, i, t, o) => {
7
+ t.length === 0 || e.has(n) || (e.add(n), console.warn(
8
+ `[wick-charts] ${i}: skipping ${t.length} row${t.length === 1 ? "" : "s"} with NaN / Infinity values (indices ${t.join(", ")}; first offending row: ${o}). Filter upstream data; the renderer drops poisoned rows to keep the rest of the chart alive.`
9
+ ));
10
+ };
11
+ })();
12
+ export {
13
+ s as isPoisonedNumber,
14
+ r as reportPoisonedData
15
+ };
@@ -0,0 +1,41 @@
1
+ function a(e) {
2
+ return e instanceof Date ? e.getTime() : e;
3
+ }
4
+ function m(e) {
5
+ return e.length === 0 || !e.some((t) => t.time instanceof Date) ? e : e.map((t) => ({ ...t, time: a(t.time) }));
6
+ }
7
+ function u(e) {
8
+ return e.length === 0 || !e.some((t) => t.time instanceof Date) ? e : e.map((t) => ({ ...t, time: a(t.time) }));
9
+ }
10
+ function c(e) {
11
+ if (e.length < 2) return 864e5;
12
+ const t = [];
13
+ for (let n = 1; n < Math.min(e.length, 20); n++)
14
+ t.push(e[n] - e[n - 1]);
15
+ return t.sort((n, i) => n - i), t[Math.floor(t.length / 2)];
16
+ }
17
+ function s(e, t) {
18
+ const n = new Date(e);
19
+ return t >= 31536e6 ? n.toLocaleDateString("en-US", { year: "numeric" }) : t >= 864e5 ? n.toLocaleDateString("en-US", { month: "short", day: "numeric" }) : t >= 36e5 ? n.toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit", hour12: !1 }) : n.toLocaleTimeString("en-US", {
20
+ hour: "2-digit",
21
+ minute: "2-digit",
22
+ second: "2-digit",
23
+ hour12: !1
24
+ });
25
+ }
26
+ function l(e) {
27
+ return new Date(e).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
28
+ }
29
+ function f(e) {
30
+ const t = [1e3, 5e3, 1e4, 15e3, 3e4], n = [6e4, 5 * 6e4, 10 * 6e4, 15 * 6e4, 30 * 6e4], i = [36e5, 2 * 36e5, 4 * 36e5, 6 * 36e5, 12 * 36e5], o = [864e5, 7 * 864e5, 30 * 864e5, 90 * 864e5], r = [31536e6, 2 * 31536e6, 5 * 31536e6, 10 * 31536e6, 25 * 31536e6, 50 * 31536e6, 100 * 31536e6];
31
+ return e < 6e4 ? [...t, ...n, ...i, ...o, ...r] : e < 36e5 ? [...n, ...i, ...o, ...r] : e < 864e5 ? [...i, ...o, ...r] : e < 31536e6 ? [...o, ...r] : r;
32
+ }
33
+ export {
34
+ c as detectInterval,
35
+ l as formatDate,
36
+ s as formatTime,
37
+ f as niceTimeIntervals,
38
+ m as normalizeOHLCArray,
39
+ a as normalizeTime,
40
+ u as normalizeTimePointArray
41
+ };