@fuzdev/fuz_ui 0.208.0 โ†’ 0.210.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 (61) hide show
  1. package/dist/ApiModulesList.svelte +1 -1
  2. package/dist/ColorSchemeInput.svelte +11 -49
  3. package/dist/ColorSchemeInput.svelte.d.ts +2 -1
  4. package/dist/ColorSchemeInput.svelte.d.ts.map +1 -1
  5. package/dist/CopyToClipboard.svelte +1 -1
  6. package/dist/Dialog.svelte +6 -2
  7. package/dist/DialogContent.svelte +3 -3
  8. package/dist/DialogContent.svelte.d.ts +2 -2
  9. package/dist/DocsFooter.svelte +1 -1
  10. package/dist/EcosystemLinks.svelte +2 -2
  11. package/dist/HueInput.svelte +8 -16
  12. package/dist/LibraryDetail.svelte +4 -4
  13. package/dist/ModuleLink.svelte +1 -1
  14. package/dist/ProjectLinks.svelte +3 -32
  15. package/dist/ProjectLinks.svelte.d.ts.map +1 -1
  16. package/dist/RadioMenu.svelte +97 -0
  17. package/dist/RadioMenu.svelte.d.ts +41 -0
  18. package/dist/RadioMenu.svelte.d.ts.map +1 -0
  19. package/dist/Spiders.svelte +10 -10
  20. package/dist/ThemeInput.svelte +2 -2
  21. package/dist/ThemeInput.svelte.d.ts +1 -1
  22. package/dist/ThemeInput.svelte.d.ts.map +1 -1
  23. package/dist/ThemeRoot.svelte +2 -1
  24. package/dist/ThemeRoot.svelte.d.ts +1 -1
  25. package/dist/ThemeRoot.svelte.d.ts.map +1 -1
  26. package/dist/alert.js +2 -2
  27. package/dist/logos.d.ts +1 -1
  28. package/dist/logos.d.ts.map +1 -1
  29. package/dist/logos.js +14 -12
  30. package/dist/projects.d.ts +0 -3
  31. package/dist/projects.d.ts.map +1 -1
  32. package/dist/projects.js +4 -4
  33. package/dist/sparkline.d.ts +1 -1
  34. package/dist/sparkline.js +1 -1
  35. package/dist/theme_state.svelte.d.ts +2 -1
  36. package/dist/theme_state.svelte.d.ts.map +1 -1
  37. package/package.json +8 -8
  38. package/src/lib/alert.ts +2 -2
  39. package/src/lib/logos.ts +14 -12
  40. package/src/lib/projects.ts +4 -7
  41. package/src/lib/sparkline.ts +1 -1
  42. package/src/lib/theme_state.svelte.ts +2 -1
  43. package/dist/ProjectActivityChart.svelte +0 -137
  44. package/dist/ProjectActivityChart.svelte.d.ts +0 -30
  45. package/dist/ProjectActivityChart.svelte.d.ts.map +0 -1
  46. package/dist/project_stats.d.ts +0 -121
  47. package/dist/project_stats.d.ts.map +0 -1
  48. package/dist/project_stats.js +0 -153
  49. package/dist/project_stats_data.d.ts +0 -3
  50. package/dist/project_stats_data.d.ts.map +0 -1
  51. package/dist/project_stats_data.js +0 -476
  52. package/dist/project_stats_update.task.d.ts +0 -4
  53. package/dist/project_stats_update.task.d.ts.map +0 -1
  54. package/dist/project_stats_update.task.js +0 -50
  55. package/dist/publish.task.d.ts +0 -3
  56. package/dist/publish.task.d.ts.map +0 -1
  57. package/dist/publish.task.js +0 -23
  58. package/src/lib/project_stats.ts +0 -220
  59. package/src/lib/project_stats_data.ts +0 -479
  60. package/src/lib/project_stats_update.task.ts +0 -53
  61. package/src/lib/publish.task.ts +0 -22
@@ -1,9 +1,6 @@
1
1
  import type { SvgData } from './svg.js';
2
2
  /**
3
3
  * Metadata for a project in the fuz.dev ecosystem, rendered by `ProjectLinks`.
4
- *
5
- * `name` doubles as the project's repo directory name, so the
6
- * `project_stats_update` task can locate each repo as a sibling directory.
7
4
  */
8
5
  export interface ProjectItem {
9
6
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAkBxC;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACpB;AAID,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,WAAW,CAa5C,CAAC"}
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAkBxC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACpB;AAID,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,WAAW,CAa5C,CAAC"}
package/dist/projects.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  // TODO when fuz.dev is ready
3
3
  // logo_fuz,
4
- logo_fuz_ui, logo_fuz_code, logo_fuz_blog, logo_fuz_mastodon, logo_fuz_gitops, logo_fuz_template, logo_fuz_css, logo_fuz_util, logo_gro, logo_svelte_docinfo, logo_fuz_app, logo_tsv } from './logos.js';
5
- // TODO ideally this wouldn't duplicate metadata like descriptions, but adding fuz_gitops to this repo is heavy
4
+ logo_fuz_ui, logo_fuz_code, logo_fuz_blog, logo_fuz_mastodon, logo_fuz_repos, logo_fuz_template, logo_fuz_css, logo_fuz_util, logo_gro, logo_svelte_docinfo, logo_fuz_app, logo_tsv } from './logos.js';
5
+ // TODO ideally this wouldn't duplicate metadata like descriptions, but adding fuz_repos to this repo is heavy
6
6
  // prettier-ignore
7
7
  export const project_items = [
8
8
  { name: 'fuz_app', url: 'https://app.fuz.dev/', logo: logo_fuz_app, description: '[pre-alpha] fullstack app library', glyph: '๐Ÿ—', color_class: 'color_j_50' },
9
9
  { name: 'fuz_css', url: 'https://css.fuz.dev/', logo: logo_fuz_css, description: 'semantic-first CSS framework and design system', glyph: '๐ŸŒฟ', color_class: 'color_b_50' },
10
10
  { name: 'fuz_ui', url: 'https://ui.fuz.dev/', logo: logo_fuz_ui, description: 'Svelte UI library', glyph: '๐Ÿงถ', color_class: 'color_c_50' },
11
- { name: 'fuz_template', url: 'https://template.fuz.dev/', logo: logo_fuz_template, description: 'a static web app and Node library template with TypeScript, Svelte, SvelteKit, Vite, esbuild, Gro, and Fuz', glyph: 'โ„', color_class: 'color_h_50' },
11
+ { name: 'fuz_template', url: 'https://template.fuz.dev/', logo: logo_fuz_template, description: 'a web app template with TypeScript + SvelteKit + optional Rust for the fuz-stack', glyph: 'โ„', color_class: 'color_h_50' },
12
12
  { name: 'fuz_blog', url: 'https://blog.fuz.dev/', logo: logo_fuz_blog, description: 'blog software from scratch with SvelteKit', glyph: '๐Ÿ–Š๏ธ', color_class: 'color_e_50' },
13
13
  { name: 'fuz_code', url: 'https://code.fuz.dev/', logo: logo_fuz_code, description: 'syntax styling utilities and components for TypeScript, Svelte, Markdown, and more', glyph: '๐ŸŽจ', color_class: 'color_g_50' },
14
14
  { name: 'fuz_mastodon', url: 'https://mastodon.fuz.dev/', logo: logo_fuz_mastodon, description: 'Mastodon components and helpers for Svelte, SvelteKit, and Fuz', glyph: '๐Ÿฆฃ', color_class: 'color_d_50' },
15
- { name: 'fuz_gitops', url: 'https://gitops.fuz.dev/', logo: logo_fuz_gitops, description: 'a tool for managing many repos', glyph: '๐Ÿช„', color_class: 'color_a_50' },
15
+ { name: 'fuz_repos', url: 'https://repos.fuz.dev/', logo: logo_fuz_repos, description: 'a tool for managing many repos', glyph: '๐Ÿช„', color_class: 'color_a_50' },
16
16
  { name: 'svelte-docinfo', url: 'https://svelte-docinfo.fuz.dev/', logo: logo_svelte_docinfo, description: 'static analysis for TypeScript and Svelte', glyph: '๐Ÿ“œ', color_class: 'color_i_50' },
17
17
  { name: 'fuz_util', url: 'https://util.fuz.dev/', logo: logo_fuz_util, description: 'utility belt for JS', glyph: '๐Ÿฆ•', color_class: 'color_f_50' },
18
18
  { name: 'gro', url: 'https://github.com/fuzdev/gro', logo: logo_gro, description: 'task runner and toolkit extending SvelteKit', glyph: '๐ŸŒฐ', color_class: 'color_f_50' },
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Pure geometry helpers behind `Sparkline` and `ProjectActivityChart`.
2
+ * Pure geometry helpers behind `Sparkline`.
3
3
  *
4
4
  * Computes polyline points, alpha-fade gradient stops, and the end-dot
5
5
  * position for a series of values, so components stay thin and the math is
package/dist/sparkline.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Pure geometry helpers behind `Sparkline` and `ProjectActivityChart`.
2
+ * Pure geometry helpers behind `Sparkline`.
3
3
  *
4
4
  * Computes polyline points, alpha-fade gradient stops, and the end-dot
5
5
  * position for a series of values, so components stay thin and the math is
@@ -1,4 +1,5 @@
1
- import { type ColorScheme, type Theme } from '@fuzdev/fuz_css/theme.ts';
1
+ import { type ColorScheme } from '@fuzdev/fuz_css/theme.ts';
2
+ import type { Theme } from '@fuzdev/fuz_css/variable.ts';
2
3
  export interface ThemeStateJson {
3
4
  theme: Theme;
4
5
  color_scheme: ColorScheme;
@@ -1 +1 @@
1
- {"version":3,"file":"theme_state.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/theme_state.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAOvF,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAExD,qBAAa,UAAU;IACtB,KAAK,EAAE,KAAK,CAAiB;IAC7B,YAAY,EAAE,WAAW,CAAiB;gBAE9B,OAAO,CAAC,EAAE,iBAAiB;IAUvC,MAAM,IAA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,GAAI,cAAc,WAAW,GAAG,IAAI,KAAG,IAOpE,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAE7C,eAAO,MAAM,iBAAiB,GAC7B,cAAc,WAAW,GAAG,IAAI,EAChC,YAA8B,KAC5B,IAEF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC7B,WAAU,WAAoB,EAC9B,YAA8B,KAC5B,WAA4E,CAAC;AAEhF,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,GAAG,IAAI,EAAE,YAAuB,KAAG,IAEzE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,WAAU,KAA0B,EAAE,YAAuB,KAAG,KAC3C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_ui",
3
- "version": "0.208.0",
3
+ "version": "0.210.0",
4
4
  "description": "Svelte UI library",
5
5
  "tagline": "friendly user zystem",
6
6
  "glyph": "๐Ÿงถ",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@fuzdev/fuz_code": ">=0.46.0",
37
- "@fuzdev/fuz_css": ">=0.62.0",
37
+ "@fuzdev/fuz_css": ">=0.65.0",
38
38
  "@fuzdev/fuz_util": ">=0.65.1",
39
39
  "@fuzdev/gro": ">=0.204.0",
40
40
  "@fuzdev/mdz": ">=0.2.0",
@@ -62,11 +62,11 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@changesets/changelog-git": "^0.2.1",
65
- "@fuzdev/blake3_wasm": "^0.1.1",
66
- "@fuzdev/fuz_code": "^0.48.0",
67
- "@fuzdev/fuz_css": "^0.63.2",
68
- "@fuzdev/fuz_util": "^0.68.0",
69
- "@fuzdev/gro": "^0.209.0",
65
+ "@fuzdev/blake3-wasm": "^0.2.0",
66
+ "@fuzdev/fuz_code": "^0.50.0",
67
+ "@fuzdev/fuz_css": "^0.65.0",
68
+ "@fuzdev/fuz_util": "^0.69.0",
69
+ "@fuzdev/gro": "^0.213.0",
70
70
  "@fuzdev/mdz": "^0.3.0",
71
71
  "@ryanatkn/eslint-config": "^0.12.2",
72
72
  "@sveltejs/adapter-static": "^3.0.10",
@@ -86,7 +86,7 @@
86
86
  "typescript": "^5.9.3",
87
87
  "typescript-eslint": "^8.60.0",
88
88
  "vite": "^7.3.6",
89
- "vitest": "^4.0.15",
89
+ "vitest": "^5.0.0",
90
90
  "zod": "^4.3.6"
91
91
  },
92
92
  "sideEffects": [
package/src/lib/alert.ts CHANGED
@@ -9,6 +9,6 @@ export interface AlertStatusOptions {
9
9
 
10
10
  export const alert_status_options: Record<AlertStatus, AlertStatusOptions> = {
11
11
  inform: { color: 'var(--text_70)', icon: 'โœป' },
12
- help: { color: 'var(--color_b_50)', icon: 'โžบ' },
13
- error: { color: 'var(--color_c_50)', icon: '!?' }
12
+ help: { color: 'var(--palette_b_50)', icon: 'โžบ' },
13
+ error: { color: 'var(--negative_50)', icon: '!?' }
14
14
  };
package/src/lib/logos.ts CHANGED
@@ -4,18 +4,20 @@ import type { SvgData } from './svg.ts';
4
4
 
5
5
  /*
6
6
 
7
- Logo colors are the midpoint between the light and dark versions of color variant 5:
7
+ Logo colors are frozen brand values, originally derived as the midpoint
8
+ between the light and dark mid-stops of fuz_css's pre-OKLCH palette
9
+ (today's `--palette_X_50`), and deliberately not re-derived since:
8
10
 
9
11
  ```css
10
- --color_a: #6199d1;
11
- --color_b: #3db33d;
12
- --color_c: #d93636;
13
- --color_d: #8866cc;
14
- --color_e: #d8bc31;
15
- --color_f: #84522a; // TODO this one isn't the midpoint bc fuz_css's color needs tweaking, too light in dark mode
16
- --color_g: #e55d95;
17
- --color_h: #f4672f;
18
- --color_i: #36e2e2;
12
+ #6199d1 (blue, a)
13
+ #3db33d (green, b)
14
+ #d93636 (red, c)
15
+ #8866cc (purple, d)
16
+ #d8bc31 (yellow, e)
17
+ #84522a (brown, f)
18
+ #e55d95 (pink, g)
19
+ #f4672f (orange, h)
20
+ #36e2e2 (cyan, i)
19
21
  ```
20
22
  */
21
23
 
@@ -100,7 +102,7 @@ export const logo_fuz_mastodon = {
100
102
  paths: logo_fuz.paths
101
103
  } satisfies SvgData;
102
104
 
103
- export const logo_fuz_gitops = {
105
+ export const logo_fuz_repos = {
104
106
  label: 'a friendly blue spider facing you',
105
107
  fill: '#6199d1',
106
108
  paths: logo_fuz.paths
@@ -159,7 +161,7 @@ export const logo_fuz_util = {
159
161
  } satisfies SvgData;
160
162
 
161
163
  export const logo_tsv = {
162
- label: 'a pixelated orange quill drawing a straight line',
164
+ label: 'a pixelated orange quill drawing a precise line',
163
165
  fill: '#f4672f',
164
166
  paths: [
165
167
  {
@@ -6,7 +6,7 @@ import {
6
6
  logo_fuz_code,
7
7
  logo_fuz_blog,
8
8
  logo_fuz_mastodon,
9
- logo_fuz_gitops,
9
+ logo_fuz_repos,
10
10
  logo_fuz_template,
11
11
  logo_fuz_css,
12
12
  logo_fuz_util,
@@ -18,9 +18,6 @@ import {
18
18
 
19
19
  /**
20
20
  * Metadata for a project in the fuz.dev ecosystem, rendered by `ProjectLinks`.
21
- *
22
- * `name` doubles as the project's repo directory name, so the
23
- * `project_stats_update` task can locate each repo as a sibling directory.
24
21
  */
25
22
  export interface ProjectItem {
26
23
  name: string;
@@ -31,17 +28,17 @@ export interface ProjectItem {
31
28
  color_class: string;
32
29
  }
33
30
 
34
- // TODO ideally this wouldn't duplicate metadata like descriptions, but adding fuz_gitops to this repo is heavy
31
+ // TODO ideally this wouldn't duplicate metadata like descriptions, but adding fuz_repos to this repo is heavy
35
32
  // prettier-ignore
36
33
  export const project_items: Array<ProjectItem> = [
37
34
  {name: 'fuz_app', url: 'https://app.fuz.dev/', logo: logo_fuz_app, description: '[pre-alpha] fullstack app library', glyph: '๐Ÿ—', color_class: 'color_j_50'},
38
35
  {name: 'fuz_css', url: 'https://css.fuz.dev/', logo: logo_fuz_css, description: 'semantic-first CSS framework and design system', glyph: '๐ŸŒฟ', color_class: 'color_b_50'},
39
36
  {name: 'fuz_ui', url: 'https://ui.fuz.dev/', logo: logo_fuz_ui, description: 'Svelte UI library', glyph: '๐Ÿงถ', color_class: 'color_c_50'},
40
- {name: 'fuz_template', url: 'https://template.fuz.dev/', logo: logo_fuz_template, description: 'a static web app and Node library template with TypeScript, Svelte, SvelteKit, Vite, esbuild, Gro, and Fuz', glyph: 'โ„', color_class: 'color_h_50'},
37
+ {name: 'fuz_template', url: 'https://template.fuz.dev/', logo: logo_fuz_template, description: 'a web app template with TypeScript + SvelteKit + optional Rust for the fuz-stack', glyph: 'โ„', color_class: 'color_h_50'},
41
38
  {name: 'fuz_blog', url: 'https://blog.fuz.dev/', logo: logo_fuz_blog, description: 'blog software from scratch with SvelteKit', glyph: '๐Ÿ–Š๏ธ', color_class: 'color_e_50'},
42
39
  {name: 'fuz_code', url: 'https://code.fuz.dev/', logo: logo_fuz_code, description: 'syntax styling utilities and components for TypeScript, Svelte, Markdown, and more', glyph: '๐ŸŽจ', color_class: 'color_g_50'},
43
40
  {name: 'fuz_mastodon', url: 'https://mastodon.fuz.dev/', logo: logo_fuz_mastodon, description: 'Mastodon components and helpers for Svelte, SvelteKit, and Fuz', glyph: '๐Ÿฆฃ', color_class: 'color_d_50'},
44
- {name: 'fuz_gitops', url: 'https://gitops.fuz.dev/', logo: logo_fuz_gitops, description: 'a tool for managing many repos', glyph: '๐Ÿช„', color_class: 'color_a_50'},
41
+ {name: 'fuz_repos', url: 'https://repos.fuz.dev/', logo: logo_fuz_repos, description: 'a tool for managing many repos', glyph: '๐Ÿช„', color_class: 'color_a_50'},
45
42
  {name: 'svelte-docinfo', url: 'https://svelte-docinfo.fuz.dev/', logo: logo_svelte_docinfo, description: 'static analysis for TypeScript and Svelte', glyph: '๐Ÿ“œ', color_class: 'color_i_50'},
46
43
  {name: 'fuz_util', url: 'https://util.fuz.dev/', logo: logo_fuz_util, description: 'utility belt for JS', glyph: '๐Ÿฆ•', color_class: 'color_f_50'},
47
44
  {name: 'gro', url: 'https://github.com/fuzdev/gro', logo: logo_gro, description: 'task runner and toolkit extending SvelteKit', glyph: '๐ŸŒฐ', color_class: 'color_f_50'},
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Pure geometry helpers behind `Sparkline` and `ProjectActivityChart`.
2
+ * Pure geometry helpers behind `Sparkline`.
3
3
  *
4
4
  * Computes polyline points, alpha-fade gradient stops, and the end-dot
5
5
  * position for a series of values, so components stay thin and the math is
@@ -1,4 +1,5 @@
1
- import { color_schemes, type ColorScheme, type Theme } from '@fuzdev/fuz_css/theme.ts';
1
+ import { color_schemes, type ColorScheme } from '@fuzdev/fuz_css/theme.ts';
2
+ import type { Theme } from '@fuzdev/fuz_css/variable.ts';
2
3
  import { default_themes } from '@fuzdev/fuz_css/themes.ts';
3
4
  import { BROWSER } from 'esm-env';
4
5
 
@@ -1,137 +0,0 @@
1
- <script lang="ts">
2
- import type { OmitStrict } from '@fuzdev/fuz_util/types.ts';
3
- import type { SvelteHTMLElements } from 'svelte/elements';
4
-
5
- import { project_items } from './projects.js';
6
- import { project_stats_data } from './project_stats_data.js';
7
- import { project_stats_label, project_stats_to_weekly_series } from './project_stats.js';
8
- import { sparkline_geometry, type SparklineScale } from './sparkline.js';
9
-
10
- /**
11
- * A large line chart of weekly commit activity with every fuz.dev project
12
- * drawn over one another, sharing one time window and one scale.
13
- *
14
- * Each project's line uses its `color_class` from `project_items` (the
15
- * `ProjectLinks` grid doubles as the legend), with the same per-point alpha
16
- * fade and end dot as `Sparkline`. Hovering a line shows the project's
17
- * stats via a native `title`. The svg scales to its container's width.
18
- *
19
- * The background is a light wash of `currentColor` (the inherited text
20
- * color), overridable with the `--sparkline_bg` custom property.
21
- *
22
- * @module
23
- */
24
-
25
- const {
26
- width = 800,
27
- height = 160,
28
- scale = 1 / 3,
29
- stroke_width = 2,
30
- alpha_floor = 0.4,
31
- label = 'weekly commit activity for all projects, drawn over one another at a shared scale',
32
- ...rest
33
- }: OmitStrict<SvelteHTMLElements['svg'], 'width' | 'height' | 'scale'> & {
34
- /**
35
- * Width of the svg's coordinate space in px; rendering stretches to the container.
36
- */
37
- width?: number;
38
- /**
39
- * Height of the svg's coordinate space in px.
40
- */
41
- height?: number;
42
- /**
43
- * Vertical scale for the lines' geometry โ€” see `SparklineScale`.
44
- */
45
- scale?: SparklineScale;
46
- stroke_width?: number;
47
- /**
48
- * Stroke alpha at a value of 0, scaling linearly to 1 at the shared max.
49
- */
50
- alpha_floor?: number;
51
- /**
52
- * Accessible label for the chart.
53
- */
54
- label?: string;
55
- } = $props();
56
-
57
- const chart_id = $props.id();
58
-
59
- const { series, max } = project_stats_to_weekly_series(project_stats_data);
60
- const color_class_by_name = new Map(project_items.map((p) => [p.name, p.color_class]));
61
- const label_by_name = new Map(
62
- project_stats_data.projects.map((p) => [p.name, project_stats_label(p)])
63
- );
64
-
65
- const lines = $derived(
66
- series.flatMap(({ name, counts }) => {
67
- const geometry = sparkline_geometry(counts, {
68
- width,
69
- height,
70
- max,
71
- scale,
72
- stroke_width,
73
- alpha_floor,
74
- end_dot: true
75
- });
76
- return geometry
77
- ? [
78
- {
79
- name,
80
- geometry,
81
- color_class: color_class_by_name.get(name),
82
- title: label_by_name.get(name)
83
- }
84
- ]
85
- : [];
86
- })
87
- );
88
- </script>
89
-
90
- <svg {...rest} viewBox="0 0 {width} {height}" role="img" aria-label={label}>
91
- <defs>
92
- {#each lines as line, index (line.name)}
93
- <linearGradient
94
- id="{chart_id}-{index}"
95
- class={line.color_class}
96
- gradientUnits="userSpaceOnUse"
97
- x1="0"
98
- y1="0"
99
- x2={width}
100
- y2="0"
101
- >
102
- {#each line.geometry.stops as stop, stop_index (stop_index)}
103
- <stop offset={stop.offset} stop-color="currentColor" stop-opacity={stop.opacity} />
104
- {/each}
105
- </linearGradient>
106
- {/each}
107
- </defs>
108
- {#each lines as line, index (line.name)}
109
- <g class={line.color_class}>
110
- <title>{line.title}</title>
111
- <polyline
112
- points={line.geometry.points}
113
- fill="none"
114
- stroke="url(#{chart_id}-{index})"
115
- stroke-width={stroke_width}
116
- stroke-linejoin="round"
117
- stroke-linecap="round"
118
- />
119
- <circle
120
- cx={line.geometry.end_x}
121
- cy={line.geometry.end_y}
122
- r={line.geometry.dot_radius}
123
- fill="currentColor"
124
- fill-opacity={line.geometry.end_alpha}
125
- />
126
- </g>
127
- {/each}
128
- </svg>
129
-
130
- <style>
131
- svg {
132
- width: 100%;
133
- height: auto;
134
- background: var(--sparkline_bg, color-mix(in hsl, currentColor 8%, transparent));
135
- border-radius: var(--border_radius_xs);
136
- }
137
- </style>
@@ -1,30 +0,0 @@
1
- import type { OmitStrict } from '@fuzdev/fuz_util/types.ts';
2
- import type { SvelteHTMLElements } from 'svelte/elements';
3
- import { type SparklineScale } from './sparkline.js';
4
- type $$ComponentProps = OmitStrict<SvelteHTMLElements['svg'], 'width' | 'height' | 'scale'> & {
5
- /**
6
- * Width of the svg's coordinate space in px; rendering stretches to the container.
7
- */
8
- width?: number;
9
- /**
10
- * Height of the svg's coordinate space in px.
11
- */
12
- height?: number;
13
- /**
14
- * Vertical scale for the lines' geometry โ€” see `SparklineScale`.
15
- */
16
- scale?: SparklineScale;
17
- stroke_width?: number;
18
- /**
19
- * Stroke alpha at a value of 0, scaling linearly to 1 at the shared max.
20
- */
21
- alpha_floor?: number;
22
- /**
23
- * Accessible label for the chart.
24
- */
25
- label?: string;
26
- };
27
- declare const ProjectActivityChart: import("svelte").Component<$$ComponentProps, {}, "">;
28
- type ProjectActivityChart = ReturnType<typeof ProjectActivityChart>;
29
- export default ProjectActivityChart;
30
- //# sourceMappingURL=ProjectActivityChart.svelte.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProjectActivityChart.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ProjectActivityChart.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAK1D,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAExE,KAAK,gBAAgB,GAAI,UAAU,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,GAAG;IAC9F;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AA2FH,QAAA,MAAM,oBAAoB,sDAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}
@@ -1,121 +0,0 @@
1
- /**
2
- * Types and pure helpers for project commit-activity stats.
3
- *
4
- * The committed dataset (`project_stats_data.ts`, written by the
5
- * `project_stats_update` task) stores daily commit counts per project as the
6
- * master granularity; coarser scopes like monthly are derived at runtime by
7
- * rebucketing. All date handling is UTC โ€” `YYYY-MM-DD` strings and "epoch
8
- * days" (days since the Unix epoch) โ€” so results are deterministic across
9
- * machines.
10
- *
11
- * @module
12
- */
13
- /**
14
- * Daily commit counts for one project.
15
- */
16
- export interface ProjectCommitStats {
17
- /**
18
- * Project name, matching `project_items`.
19
- */
20
- name: string;
21
- /**
22
- * UTC date (`YYYY-MM-DD`) of the first day bucket, the day of the first commit.
23
- */
24
- start_date: string;
25
- /**
26
- * Commits per UTC day from `start_date` through the snapshot's `end_date`, inclusive.
27
- */
28
- daily_counts: Array<number>;
29
- }
30
- /**
31
- * A snapshot of commit stats across projects, sharing a single `end_date`.
32
- */
33
- export interface ProjectStatsSnapshot {
34
- /**
35
- * ISO datetime when the snapshot was collected.
36
- */
37
- generated_at: string;
38
- /**
39
- * UTC date (`YYYY-MM-DD`) of the final day bucket, shared by every project.
40
- */
41
- end_date: string;
42
- projects: Array<ProjectCommitStats>;
43
- }
44
- /**
45
- * A derived series of bucketed counts for one project.
46
- */
47
- export interface ProjectStatsSeries {
48
- name: string;
49
- counts: Array<number>;
50
- }
51
- /**
52
- * Converts a UTC `YYYY-MM-DD` date to days since the Unix epoch.
53
- */
54
- export declare const epoch_day_from_date: (date: string) => number;
55
- /**
56
- * Converts days since the Unix epoch to a UTC `YYYY-MM-DD` date.
57
- */
58
- export declare const date_from_epoch_day: (epoch_day: number) => string;
59
- /**
60
- * Buckets commit timestamps into daily counts from the earliest commit's UTC
61
- * day through `end_date`, inclusive.
62
- *
63
- * @param timestamps - commit times as Unix epoch seconds
64
- * @param end_date - UTC date (`YYYY-MM-DD`) of the final bucket; later timestamps clamp into it
65
- * @returns the start date and daily counts, or `null` if `timestamps` is empty
66
- */
67
- export declare const daily_counts_from_timestamps: (timestamps: Array<number>, end_date: string) => {
68
- start_date: string;
69
- daily_counts: Array<number>;
70
- } | null;
71
- /**
72
- * Pads `daily_counts` with leading zeros so the series starts at
73
- * `padded_start_date` instead of `start_date`.
74
- *
75
- * Returns the input array unchanged when `padded_start_date` is not earlier
76
- * than `start_date`.
77
- */
78
- export declare const daily_counts_pad_start: (daily_counts: Array<number>, start_date: string, padded_start_date: string) => Array<number>;
79
- /**
80
- * Rebuckets daily counts into calendar-month (UTC) counts.
81
- *
82
- * The first and last buckets may cover partial months.
83
- */
84
- export declare const monthly_counts_from_daily: (daily_counts: Array<number>, start_date: string) => Array<number>;
85
- /**
86
- * Rebuckets daily counts into 7-day counts, anchored at the end of the series
87
- * so the newest bucket always covers a full 7 days.
88
- *
89
- * The first bucket may cover fewer days when the length isn't a multiple of 7.
90
- */
91
- export declare const weekly_counts_from_daily: (daily_counts: Array<number>) => Array<number>;
92
- /**
93
- * Derives aligned monthly series for every project in `snapshot`, sharing one
94
- * time window and one scale.
95
- *
96
- * Each series spans from the earliest project's `start_date` through the
97
- * snapshot's `end_date` (younger projects are zero-padded at the front), so
98
- * all series have the same length and bucket boundaries. `max` is the largest
99
- * monthly count across all projects, for rendering every series at the same
100
- * vertical scale.
101
- */
102
- export declare const project_stats_to_monthly_series: (snapshot: ProjectStatsSnapshot) => {
103
- series: Array<ProjectStatsSeries>;
104
- max: number;
105
- };
106
- /**
107
- * Derives aligned weekly series for every project in `snapshot`, sharing one
108
- * time window and one scale โ€” the weekly sibling of
109
- * `project_stats_to_monthly_series`.
110
- */
111
- export declare const project_stats_to_weekly_series: (snapshot: ProjectStatsSnapshot) => {
112
- series: Array<ProjectStatsSeries>;
113
- max: number;
114
- };
115
- /**
116
- * Formats a one-line human-readable summary of a project's commit stats,
117
- * e.g. `"gro โ€” 2,386 commits since August 7, 2019"`. Used for accessible
118
- * labels and tooltips.
119
- */
120
- export declare const project_stats_label: (project: ProjectCommitStats) => string;
121
- //# sourceMappingURL=project_stats.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project_stats.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/project_stats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,CAAC,MAAM,C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