@shiinasaku/github-card 2.0.0 → 4.1.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.
@@ -0,0 +1,37 @@
1
+ export interface UserProfile {
2
+ login: string;
3
+ name: string | null;
4
+ avatarUrl: string;
5
+ bio: string | null;
6
+ pronouns: string | null;
7
+ twitter: string | null;
8
+ }
9
+ export interface UserStats {
10
+ stars: number;
11
+ repos: number;
12
+ prs: number;
13
+ issues: number;
14
+ commits: number;
15
+ }
16
+ export interface LanguageStat {
17
+ name: string;
18
+ size: number;
19
+ color: string;
20
+ }
21
+ export interface ProfileData {
22
+ user: UserProfile;
23
+ stats: UserStats;
24
+ languages: LanguageStat[];
25
+ }
26
+ export interface CardOptions {
27
+ theme?: string;
28
+ title_color?: string;
29
+ text_color?: string;
30
+ icon_color?: string;
31
+ bg_color?: string;
32
+ border_color?: string;
33
+ hide_border?: boolean;
34
+ compact?: boolean;
35
+ hide?: string[];
36
+ animate?: boolean;
37
+ }
@@ -0,0 +1,2 @@
1
+ export declare const twColors: Record<string, string>;
2
+ export declare function resolveTw(token: string, property: "fill" | "stroke"): string;
@@ -0,0 +1,2 @@
1
+ export declare const FONT_FAMILY = "ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"";
2
+ export declare const FONT_FACE = "";
@@ -0,0 +1,3 @@
1
+ export declare function kFormat(num: number): string;
2
+ export declare function escapeXml(str: string): string;
3
+ export declare function wrapText(input: string, maxLen: number, maxLines: number): string[];
@@ -0,0 +1,9 @@
1
+ export declare const icons: {
2
+ star: string;
3
+ commit: string;
4
+ pr: string;
5
+ issue: string;
6
+ repo: string;
7
+ x: string;
8
+ };
9
+ export declare function icon(name: keyof typeof icons, color: string, size?: number): string;
@@ -0,0 +1,6 @@
1
+ export { resolveColors, themes, type Theme } from "./themes";
2
+ export { kFormat, escapeXml, wrapText } from "./format";
3
+ export { getLangColor } from "./languages";
4
+ export { icons, icon } from "./icons";
5
+ export { FONT_FACE, FONT_FAMILY } from "./font";
6
+ export * from "./colors";
@@ -0,0 +1,2 @@
1
+ export declare const langColors: Record<string, string>;
2
+ export declare function getLangColor(lang: string): string;
@@ -0,0 +1,16 @@
1
+ export type Theme = {
2
+ bg: string;
3
+ title: string;
4
+ text: string;
5
+ icon: string;
6
+ border: string;
7
+ };
8
+ export declare const themes: Record<string, Theme>;
9
+ export declare function resolveColors(opts: {
10
+ theme?: string;
11
+ bg_color?: string;
12
+ title_color?: string;
13
+ text_color?: string;
14
+ icon_color?: string;
15
+ border_color?: string;
16
+ }): Theme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shiinasaku/github-card",
3
- "version": "2.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "Beautiful GitHub stats SVG cards. Embed in README, use as API, or render programmatically.",
5
5
  "keywords": [
6
6
  "badge",
@@ -26,28 +26,37 @@
26
26
  "url": "https://github.com/ShiinaSaku/Github-Card.git"
27
27
  },
28
28
  "files": [
29
+ "dist",
29
30
  "src",
30
31
  "fonts",
31
32
  "README.md",
32
33
  "LICENSE"
33
34
  ],
34
35
  "type": "module",
35
- "main": "./src/lib.ts",
36
- "module": "./src/lib.ts",
37
- "types": "./src/lib.ts",
36
+ "main": "./dist/lib.js",
37
+ "module": "./dist/lib.js",
38
+ "types": "./dist/lib.d.ts",
38
39
  "exports": {
39
40
  ".": {
40
- "types": "./src/lib.ts",
41
- "import": "./src/lib.ts"
41
+ "types": "./dist/lib.d.ts",
42
+ "bun": "./src/lib.ts",
43
+ "import": "./dist/lib.js",
44
+ "default": "./dist/lib.js"
42
45
  },
43
46
  "./server": {
44
47
  "types": "./src/index.ts",
45
48
  "import": "./src/index.ts"
46
- }
49
+ },
50
+ "./package.json": "./package.json"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public",
54
+ "provenance": true
47
55
  },
48
56
  "scripts": {
49
57
  "dev": "bun run --watch src/index.ts",
50
- "build": "bun build src/index.ts --target bun --outdir dist",
58
+ "build": "bun build src/lib.ts --outfile dist/lib.js --format esm --target node && tsc -p tsconfig.build.json",
59
+ "prepublishOnly": "bun run build",
51
60
  "fmt": "oxfmt",
52
61
  "fmt:check": "oxfmt --check",
53
62
  "lint": "oxlint",
@@ -57,16 +66,18 @@
57
66
  "test:coverage": "bun test --coverage"
58
67
  },
59
68
  "dependencies": {
60
- "@elysiajs/cors": "^1.4.1",
61
- "@elysiajs/openapi": "^1.4.14",
62
- "@elysiajs/server-timing": "^1.4.0",
63
- "@upstash/redis": "^1.36.2",
64
- "elysia": "latest"
69
+ "@elysia/cors": "^1.4.2",
70
+ "@elysia/openapi": "^1.4.15",
71
+ "@elysia/server-timing": "^1.4.1",
72
+ "elysia": "^1.4.29"
65
73
  },
66
74
  "devDependencies": {
67
- "@types/bun": "latest",
68
- "oxfmt": "0.33.0",
69
- "oxlint": "1.48.0",
70
- "typescript": "5.9.3"
71
- }
75
+ "@tailwindcss/cli": "^4.3.3",
76
+ "@types/bun": "^1.3.14",
77
+ "oxfmt": "0.60.0",
78
+ "oxlint": "1.75.0",
79
+ "tailwindcss": "^4.3.3",
80
+ "typescript": "^7.0.2"
81
+ },
82
+ "packageManager": "bun@1.3.14"
72
83
  }