@danielwh2/contribution-graph 1.0.14 → 1.0.15

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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # contribution-graph
2
2
 
3
3
  <p>
4
- <a href="https://www.npmjs.com/package/contribution-graph"><img src="https://img.shields.io/npm/v/contribution-graph?color=cb3837&label=npm" alt="npm version"></a>
4
+ <a href="https://www.npmjs.com/package/@danielwh2/contribution-graph"><img src="https://img.shields.io/npm/v/@danielwh2/contribution-graph?color=cb3837&label=npm" alt="npm version"></a>
5
5
  <img src="https://img.shields.io/badge/framework-agnostic-22c55e" alt="framework agnostic">
6
6
  <img src="https://img.shields.io/badge/bundle-7kB-8b5cf6" alt="bundle size">
7
7
  <img src="https://img.shields.io/badge/react-✓-61dafb" alt="react">
@@ -20,26 +20,26 @@ slot-text tooltips, custom cell colors, and click handlers.
20
20
  ## 📦 Install
21
21
 
22
22
  ```bash
23
- npm install contribution-graph
23
+ npm install @danielwh2/contribution-graph
24
24
  ```
25
25
 
26
26
  ```bash
27
- pnpm add contribution-graph
27
+ pnpm add @danielwh2/contribution-graph
28
28
  ```
29
29
 
30
30
  ```bash
31
- bun add contribution-graph
31
+ bun add @danielwh2/contribution-graph
32
32
  ```
33
33
 
34
34
  ```bash
35
- yarn add contribution-graph
35
+ yarn add @danielwh2/contribution-graph
36
36
  ```
37
37
 
38
38
  ## 🚀 Quick start
39
39
 
40
40
  ```ts
41
- import "contribution-graph/style.css";
42
- import { contributionGraph } from "contribution-graph";
41
+ import "@danielwh2/contribution-graph/style.css";
42
+ import { contributionGraph } from "@danielwh2/contribution-graph";
43
43
 
44
44
  const data = [
45
45
  { date: "2026-06-01", count: 3 },
@@ -88,8 +88,8 @@ function contributionGraph(
88
88
  ## ⚛️ React
89
89
 
90
90
  ```tsx
91
- import "contribution-graph/style.css";
92
- import { ContributionGraph } from "contribution-graph/react";
91
+ import "@danielwh2/contribution-graph/style.css";
92
+ import { ContributionGraph } from "@danielwh2/contribution-graph/react";
93
93
 
94
94
  <ContributionGraph
95
95
  data={data}
@@ -101,8 +101,8 @@ import { ContributionGraph } from "contribution-graph/react";
101
101
 
102
102
  ```vue
103
103
  <script setup lang="ts">
104
- import "contribution-graph/style.css";
105
- import { ContributionGraph } from "contribution-graph/vue";
104
+ import "@danielwh2/contribution-graph/style.css";
105
+ import { ContributionGraph } from "@danielwh2/contribution-graph/vue";
106
106
  </script>
107
107
 
108
108
  <template>
@@ -113,8 +113,8 @@ import { ContributionGraph } from "contribution-graph/vue";
113
113
  ## 🔷 Solid
114
114
 
115
115
  ```tsx
116
- import "contribution-graph/style.css";
117
- import { contributionGraph } from "contribution-graph/solid";
116
+ import "@danielwh2/contribution-graph/style.css";
117
+ import { contributionGraph } from "@danielwh2/contribution-graph/solid";
118
118
 
119
119
  <div use:contributionGraph={{ data, options: { until: "2026-06-22" } }} />
120
120
  ```
@@ -123,8 +123,8 @@ import { contributionGraph } from "contribution-graph/solid";
123
123
 
124
124
  ```svelte
125
125
  <script lang="ts">
126
- import "contribution-graph/style.css";
127
- import { contributionGraph } from "contribution-graph/svelte";
126
+ import "@danielwh2/contribution-graph/style.css";
127
+ import { contributionGraph } from "@danielwh2/contribution-graph/svelte";
128
128
  </script>
129
129
 
130
130
  <div use:contributionGraph={{ data, options: { until: "2026-06-22" } }} />
@@ -160,7 +160,7 @@ import { contributionGraph } from "contribution-graph/solid";
160
160
  Set `profile: { username: "yourname" }` to wrap the component in a stunning dark-mode GitHub profile card. It mimics the classic GitHub UI but elevates it with a deep `#0d1117` background, floating drop shadows, a smooth glowing effect on the activity cells, and a bold activity count.
161
161
 
162
162
  ```ts
163
- import "contribution-graph/style.css";
163
+ import "@danielwh2/contribution-graph/style.css";
164
164
 
165
165
  contributionGraph(el, data, {
166
166
  profile: { username: "zzzzshawn" },
@@ -176,7 +176,7 @@ auto-computed week stats and commit streak rolling in via
176
176
  [slot-text](https://www.npmjs.com/package/slot-text).
177
177
 
178
178
  ```ts
179
- import "contribution-graph/style.css";
179
+ import "@danielwh2/contribution-graph/style.css";
180
180
  import "slot-text/style.css"; // required — powers the rolling numbers
181
181
 
182
182
  contributionGraph(el, data, { hud: true, until: "2026-06-22" });
@@ -216,7 +216,7 @@ const data = [
216
216
  GitHub's contribution calendar is available through the official GraphQL API. Use the exported helper to fetch and normalize it into `ContributionDay[]`:
217
217
 
218
218
  ```ts
219
- import { contributionGraph, fetchGitHubContributions } from "contribution-graph";
219
+ import { contributionGraph, fetchGitHubContributions } from "@danielwh2/contribution-graph";
220
220
 
221
221
  const result = await fetchGitHubContributions({
222
222
  username: "octocat",
@@ -274,9 +274,9 @@ stay hidden by default for compact graphs. Add `countFontSize` to show animated
274
274
  in-cell count labels powered by [slot-text](https://www.npmjs.com/package/slot-text).
275
275
 
276
276
  ```ts
277
- import "contribution-graph/style.css";
277
+ import "@danielwh2/contribution-graph/style.css";
278
278
  import "slot-text/style.css";
279
- import { contributionGraph } from "contribution-graph";
279
+ import { contributionGraph } from "@danielwh2/contribution-graph";
280
280
 
281
281
  const graph = contributionGraph(el, data, {
282
282
  showCounts: true,
@@ -315,7 +315,7 @@ in UTC mode via the exported `formatHumanDate` helper.
315
315
  - Smooth tooltips and optional in-cell count labels are powered by `slot-text`.
316
316
  - React, Vue, Solid, and Svelte are optional peer dependencies — plain JS users
317
317
  don't need them.
318
- - Import `contribution-graph/style.css` once before rendering. Import
318
+ - Import `@danielwh2/contribution-graph/style.css` once before rendering. Import
319
319
  `slot-text/style.css` when you use the animated tooltip or count label styles.
320
320
  - Low-level helpers also exported: `buildGraph`, `clearGraph`, `buildHtmlGraph`,
321
321
  `clearHtmlGraph`, `buildHudGraph`, `clearHudGraph`, `computeGrid`,
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * contribution-graph — GitHub-style contribution heatmap for any framework.
3
3
  *
4
- * Import `contribution-graph/style.css` once in your app, then:
4
+ * Import `@danielwh2/contribution-graph/style.css` once in your app, then:
5
5
  *
6
- * import { contributionGraph } from "contribution-graph";
6
+ * import { contributionGraph } from "@danielwh2/contribution-graph";
7
7
  *
8
8
  * const graph = contributionGraph(element, data, {
9
9
  * until: "2026-06-22",
@@ -16,7 +16,7 @@
16
16
  * For HTML cells and optional animated count labels, set `showCounts: true`
17
17
  * and import `slot-text/style.css` with the graph stylesheet:
18
18
  *
19
- * import "contribution-graph/style.css";
19
+ * import "@danielwh2/contribution-graph/style.css";
20
20
  * import "slot-text/style.css";
21
21
  *
22
22
  * contributionGraph(element, data, { showCounts: true, countFontSize: 9 });
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * contribution-graph — GitHub-style contribution heatmap for any framework.
3
3
  *
4
- * Import `contribution-graph/style.css` once in your app, then:
4
+ * Import `@danielwh2/contribution-graph/style.css` once in your app, then:
5
5
  *
6
- * import { contributionGraph } from "contribution-graph";
6
+ * import { contributionGraph } from "@danielwh2/contribution-graph";
7
7
  *
8
8
  * const graph = contributionGraph(element, data, {
9
9
  * until: "2026-06-22",
@@ -16,7 +16,7 @@
16
16
  * For HTML cells and optional animated count labels, set `showCounts: true`
17
17
  * and import `slot-text/style.css` with the graph stylesheet:
18
18
  *
19
- * import "contribution-graph/style.css";
19
+ * import "@danielwh2/contribution-graph/style.css";
20
20
  * import "slot-text/style.css";
21
21
  *
22
22
  * contributionGraph(element, data, { showCounts: true, countFontSize: 9 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielwh2/contribution-graph",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Framework-agnostic GitHub-style contribution heatmap for any app.",
5
5
  "type": "module",
6
6
  "license": "MIT",