@sudobility/consumables_pages 0.0.2

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 (2) hide show
  1. package/CLAUDE.md +29 -0
  2. package/package.json +64 -0
package/CLAUDE.md ADDED
@@ -0,0 +1,29 @@
1
+ # Consumables Pages
2
+
3
+ Web-only UI components for consumable credits system.
4
+
5
+ **npm**: `@sudobility/consumables_pages` (public)
6
+
7
+ ## Tech Stack
8
+
9
+ - **Language**: TypeScript (strict mode, JSX)
10
+ - **Runtime**: Bun
11
+ - **Build**: TypeScript compiler (ESM)
12
+ - **Styling**: Tailwind CSS classes (consumer provides Tailwind)
13
+
14
+ ## Components
15
+
16
+ - **CreditStorePage** — Balance display + grid of credit packages with buy buttons
17
+ - **PurchaseHistoryPage** — Table of purchase records (responsive: table on desktop, cards on mobile)
18
+ - **UsageHistoryPage** — Table of usage records (responsive)
19
+ - **CreditBalanceBadge** — Small inline badge for topbar integration
20
+
21
+ All components are props-driven with labels/formatters for i18n support.
22
+
23
+ ## Commands
24
+
25
+ ```bash
26
+ bun run build # Build ESM
27
+ bun run dev # Watch mode
28
+ bun run typecheck # TypeScript check
29
+ ```
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@sudobility/consumables_pages",
3
+ "version": "0.0.2",
4
+ "description": "Web UI components for consumable credits (credit store, purchase history, usage history)",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "CLAUDE.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "dev": "tsc --watch",
22
+ "clean": "rm -rf dist",
23
+ "typecheck": "bunx tsc --noEmit",
24
+ "lint": "bunx eslint src",
25
+ "lint:fix": "bunx eslint src --fix",
26
+ "format": "bunx prettier --write \"src/**/*.{ts,tsx}\"",
27
+ "test": "vitest run",
28
+ "test:watch": "vitest",
29
+ "prepublishOnly": "bun run build"
30
+ },
31
+ "peerDependencies": {
32
+ "react": "^18.0.0 || ^19.0.0",
33
+ "react-dom": "^18.0.0 || ^19.0.0"
34
+ },
35
+ "devDependencies": {
36
+ "@sudobility/consumables_client": "^0.0.2",
37
+ "@testing-library/jest-dom": "^6.9.1",
38
+ "@testing-library/react": "^16.3.2",
39
+ "@types/bun": "^1.2.8",
40
+ "@types/node": "^25.3.0",
41
+ "@types/react": "^19.2.5",
42
+ "@types/react-dom": "^19.0.0",
43
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
44
+ "@typescript-eslint/parser": "^8.0.0",
45
+ "@vitejs/plugin-react": "^5.1.4",
46
+ "eslint": "^9.0.0",
47
+ "eslint-plugin-react-hooks": "^7.0.1",
48
+ "eslint-plugin-react-refresh": "^0.5.0",
49
+ "globals": "^17.3.0",
50
+ "jsdom": "^28.1.0",
51
+ "prettier": "^3.0.0",
52
+ "react": "^19.0.0",
53
+ "react-dom": "^19.0.0",
54
+ "typescript": "~5.9.3",
55
+ "typescript-eslint": "^8.56.0",
56
+ "vite": "^7.3.1",
57
+ "vite-plugin-dts": "^4.5.4",
58
+ "vitest": "^4.0.4"
59
+ },
60
+ "publishConfig": {
61
+ "access": "public"
62
+ },
63
+ "license": "BUSL-1.1"
64
+ }