nanoplot 0.0.27 → 0.0.29

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 (93) hide show
  1. package/CONTRIBUTIONS.md +3 -20
  2. package/README.md +4 -3
  3. package/bun.lock +1031 -0
  4. package/bun.lockb +0 -0
  5. package/dist/index.css +2 -2
  6. package/dist/src/components/Area/Area.d.ts +19 -0
  7. package/dist/src/components/Area/Area.js +55 -0
  8. package/dist/src/components/Bars/Bars.d.ts +2 -2
  9. package/dist/src/components/Bars/Bars.js +15 -3
  10. package/dist/src/components/Bars/components/HorizontalBars.d.ts +6 -1
  11. package/dist/src/components/Bars/components/HorizontalBars.js +34 -8
  12. package/dist/src/components/Bars/components/Rect.js +10 -5
  13. package/dist/src/components/Bars/components/VerticalBars.d.ts +5 -1
  14. package/dist/src/components/Bars/components/VerticalBars.js +26 -13
  15. package/dist/src/components/Graph/Graph.js +6 -20
  16. package/dist/src/components/GridLines/GridLines.js +4 -2
  17. package/dist/src/components/Heatmap/Heatmap.d.ts +14 -0
  18. package/dist/src/components/Heatmap/Heatmap.js +75 -0
  19. package/dist/src/components/Legend/Legend.d.ts +1 -1
  20. package/dist/src/components/Legend/Legend.js +13 -4
  21. package/dist/src/components/LinearGradient/LinearGradient.d.ts +2 -2
  22. package/dist/src/components/LinearGradient/LinearGradient.js +19 -18
  23. package/dist/src/components/Lines/Lines.d.ts +5 -4
  24. package/dist/src/components/Lines/Lines.js +25 -7
  25. package/dist/src/components/Lines/components/Line.d.ts +9 -0
  26. package/dist/src/components/Lines/components/Line.js +13 -0
  27. package/dist/src/components/Lines/components/LinesLoading.js +1 -1
  28. package/dist/src/components/Lines/components/LinesTooltip.d.ts +5 -5
  29. package/dist/src/components/Lines/components/LinesTooltip.js +68 -19
  30. package/dist/src/components/Pie/Pie.d.ts +7 -1
  31. package/dist/src/components/Pie/Pie.js +13 -10
  32. package/dist/src/components/Portal/Portal.d.ts +7 -0
  33. package/dist/src/components/Portal/Portal.js +11 -0
  34. package/dist/src/components/Radar/Radar.js +4 -9
  35. package/dist/src/components/Scatter/Scatter.d.ts +33 -1
  36. package/dist/src/components/Scatter/Scatter.js +28 -8
  37. package/dist/src/components/Scatter/components/ScatterLabels.d.ts +1 -0
  38. package/dist/src/components/Scatter/components/ScatterLabels.js +63 -0
  39. package/dist/src/components/Scatter/components/ScatterQuadrant.d.ts +9 -0
  40. package/dist/src/components/Scatter/components/ScatterQuadrant.js +10 -0
  41. package/dist/src/components/Scatter/components/ScatterTooltip.d.ts +14 -0
  42. package/dist/src/components/Scatter/components/ScatterTooltip.js +50 -0
  43. package/dist/src/components/Tooltip/Popup.js +2 -21
  44. package/dist/src/components/Tooltip/Tooltip.d.ts +25 -0
  45. package/dist/src/components/Tooltip/Tooltip.js +121 -0
  46. package/dist/src/components/Worldmap/Worldmap.d.ts +3 -3
  47. package/dist/src/components/Worldmap/Worldmap.js +39 -10
  48. package/dist/src/components/XAxis/XAxis.d.ts +3 -10
  49. package/dist/src/components/XAxis/XAxis.js +21 -13
  50. package/dist/src/components/YAxis/YAxis.d.ts +2 -2
  51. package/dist/src/components/YAxis/YAxis.js +2 -2
  52. package/dist/src/export/index.d.ts +3 -1
  53. package/dist/src/export/index.js +2 -0
  54. package/dist/src/hooks/use-bounding-box.d.ts +2 -0
  55. package/dist/src/hooks/use-bounding-box.js +13 -0
  56. package/dist/src/hooks/use-graph/use-graph.d.ts +7 -9
  57. package/dist/src/hooks/use-graph/use-graph.js +2 -4
  58. package/dist/src/hooks/use-mounted.d.ts +1 -0
  59. package/dist/src/hooks/use-mounted.js +6 -0
  60. package/dist/src/hooks/use-on-click-outside.d.ts +2 -0
  61. package/dist/src/hooks/use-on-click-outside.js +12 -0
  62. package/dist/src/models/domain/domain.d.ts +12 -0
  63. package/dist/src/models/domain/domain.js +0 -0
  64. package/dist/src/utils/color/to-rgb.d.ts +1 -0
  65. package/dist/src/utils/color/to-rgb.js +63 -0
  66. package/dist/src/utils/cx/cx.d.ts +1 -0
  67. package/dist/src/utils/cx/cx.js +9 -0
  68. package/dist/src/utils/domain/date-domain.d.ts +3 -0
  69. package/dist/src/utils/domain/date-domain.js +42 -18
  70. package/dist/src/utils/domain/domain.d.ts +5 -4
  71. package/dist/src/utils/domain/domain.js +8 -247
  72. package/dist/src/utils/domain/utils/auto-max.d.ts +1 -0
  73. package/dist/src/utils/domain/utils/auto-max.js +16 -0
  74. package/dist/src/utils/domain/utils/auto-min.d.ts +1 -0
  75. package/dist/src/utils/domain/utils/auto-min.js +19 -0
  76. package/dist/src/utils/domain/utils/range.d.ts +6 -0
  77. package/dist/src/utils/domain/utils/range.js +140 -0
  78. package/dist/src/utils/gradient/gradient.d.ts +37 -0
  79. package/dist/src/utils/gradient/gradient.js +149 -0
  80. package/dist/src/utils/graph/graph.d.ts +3 -3
  81. package/dist/src/utils/path/curve.js +3 -2
  82. package/dist/src/utils/path/path.js +104 -4
  83. package/dist/src/utils/scalars/scalars.d.ts +12 -0
  84. package/dist/src/utils/scalars/scalars.js +25 -0
  85. package/dist/tsconfig.typings.tsbuildinfo +1 -1
  86. package/matchers.d.ts +5 -7
  87. package/package.json +14 -4
  88. package/tsconfig.typings.json +2 -1
  89. package/dist/src/hooks/use-graph/use-client-graph.d.ts +0 -7
  90. package/dist/src/hooks/use-graph/use-client-graph.js +0 -12
  91. package/dist/src/hooks/use-graph/use-server-graph.d.ts +0 -7
  92. package/dist/src/hooks/use-graph/use-server-graph.js +0 -11
  93. package/tsconfig.tsbuildinfo +0 -1
package/CONTRIBUTIONS.md CHANGED
@@ -1,24 +1,7 @@
1
- ### Get started
2
- Step 1: Fork the Repository
3
-
4
- Click the Fork Button: In the upper right corner of the repository page, click on the Fork button. This will create a copy of the repository under your GitHub account.
5
- Step 2: Clone your Forked Repository
6
-
7
- Go to Your Forked Repository:
8
- Navigate to your GitHub profile and find the newly forked repository.
9
- Copy the Clone URL:
10
- Click on the green Code button.
11
- Choose either HTTPS, SSH, or GitHub CLI based on your preference and copy the URL.
12
- Open Your Terminal: Open a terminal or command prompt on your local machine.
13
- Run the Clone Command: Use the git clone https//xxxx.git command to clone your forked repository:
14
-
15
- Step 3:
16
- Navigate into Your Cloned Repository and install bun packages cd nanoplot
17
-
18
1
  ```bash
19
2
  bun i
3
+ bun run build:library
20
4
  bun run dev
21
5
  ```
22
- The application should run locally on your machine on port: 3000
23
-
24
- Step 4: Start Implementing
6
+ build:library, dogfoods the library so our examples are always reflective of a real library installation.
7
+ i.e website examples actually import from "nanoplot" (the package).
package/README.md CHANGED
@@ -7,10 +7,11 @@
7
7
 
8
8
 
9
9
  ## Design Philosophy
10
- - Smallest possible bundle size (10KB per graph on AVG)
10
+ - Smallest possible bundle size (10KB per graph on AVG) and zero dependencies.
11
11
  - React First, React Only, RSC First.
12
12
  - Fully responsive without javascript
13
13
 
14
+
14
15
  ## Getting Started
15
16
  ```shell
16
17
  npm install nanoplot
@@ -24,8 +25,8 @@ The world's smallest companies use our software to plot their data.
24
25
  ## Usage
25
26
  ```javascript
26
27
  import "nanoplot/styles.css";
27
- import { Graph } from "";
28
- import { Pie } from "";
28
+ import { Graph } from "nanoplot/Graph";
29
+ import { Pie } from "nanoplot/Pie";
29
30
 
30
31
  <Graph data={[{name: "Male", value: 50}, {name: "Female", value: 50}]}>
31
32
  <Pie />