@noobsociety/nsds 0.3.0 → 0.4.1

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 (41) hide show
  1. package/CHANGELOG.md +46 -1
  2. package/CONTRIBUTING.md +43 -2
  3. package/README.md +87 -36
  4. package/SECURITY.md +38 -4
  5. package/dist/client/index.cjs +1 -0
  6. package/dist/client/index.d.cts +6 -0
  7. package/dist/client/index.d.ts +6 -0
  8. package/dist/client/index.js +5 -0
  9. package/dist/components/_card-base.css +99 -0
  10. package/dist/components/hud/HUDBar.d.ts +16 -3
  11. package/dist/components/hud/HUDChat.d.ts +26 -0
  12. package/dist/components/hud/HUDJoystick.d.ts +21 -0
  13. package/dist/components/hud/HUDMinimap.d.ts +14 -0
  14. package/dist/components/hud/HUDPanel.d.ts +25 -0
  15. package/dist/components/hud/HUDTabWindow.d.ts +37 -0
  16. package/dist/components/hud-editor.css +197 -0
  17. package/dist/components/icons/RPGIcon.d.ts +15 -11
  18. package/dist/components/icons/registry.d.ts +37 -0
  19. package/dist/components/primitives.css +50 -20
  20. package/dist/components/react/index.d.ts +12 -2
  21. package/dist/components/scene-builder.css +740 -0
  22. package/dist/components/scene-builder.js +3039 -0
  23. package/dist/components/shared/constants.d.ts +41 -0
  24. package/dist/components/shared/styles.d.ts +1 -42
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +6173 -1821
  27. package/dist/registry-BizUEm6W.js +136 -0
  28. package/dist/registry-Cyq-qspU.cjs +1 -0
  29. package/dist/styles.css +1 -0
  30. package/dist/tailwind/preset.cjs +108 -0
  31. package/dist/tailwind/preset.d.cts +3 -3
  32. package/dist/tokens/base.css +17 -4
  33. package/dist/tokens/colors.css +57 -53
  34. package/dist/tokens/hud.css +119 -78
  35. package/dist/tokens/motion.css +57 -23
  36. package/dist/tokens/spacing.css +39 -39
  37. package/dist/tokens/typography.css +20 -20
  38. package/package.json +41 -12
  39. package/dist/tailwind/package.json +0 -1
  40. package/dist/tailwind/preset.d.ts +0 -4
  41. package/dist/tailwind/preset.js +0 -144
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@noobsociety/nsds",
3
- "version": "0.3.0",
4
- "description": "NoobSociety Design System — Monokai dark tokens, Tailwind preset, and pixel-art React components",
3
+ "version": "0.4.1",
4
+ "description": "NoobSociety Design System — Monokai dark tokens, client registries, Tailwind preset, and pixel-art React components",
5
5
  "keywords": [
6
6
  "design-system",
7
7
  "react",
@@ -13,19 +13,29 @@
13
13
  "author": "NoobSociety",
14
14
  "license": "MIT",
15
15
  "scripts": {
16
- "build": "vite build && tsc -p tsconfig.build.json && node scripts/prepare-types.mjs",
16
+ "build": "vite build && tsc -p tsconfig.build.json && tsc -p tsconfig.tailwind.json && node scripts/prepare-types.mjs",
17
17
  "build:storybook": "storybook build --disable-telemetry",
18
- "changeset": "changeset",
19
- "changeset:publish": "changeset publish",
20
- "changeset:version": "changeset version && node scripts/release-changelog.mjs",
21
- "check": "npm run build && npm run check:package && npm run check:exports && npm run check:install && npm run check:types && npm run check:docs && npm run test:components && npm run test:visual && npm run test:smoke",
18
+ "changeset": "node scripts/create-changeset.mjs",
19
+ "changeset:publish": "npm publish --access public --provenance",
20
+ "changeset:version": "node scripts/changeset-version.mjs && node scripts/release-changelog.mjs",
21
+ "check": "npm run check:commits && npm run check:deps && npm run check:workflows && npm run check:content && npm run check:release && npm run check:markdown && npm run lint && npm run format:check && npm run build && npm run check:package && npm run check:exports && npm run check:install && npm run check:types && npm run check:docs && npm run test:components && npm run test:visual && npm run test:smoke",
22
+ "check:content": "node scripts/check-content.mjs",
23
+ "check:commits": "commitlint --from origin/main --to HEAD --verbose",
24
+ "check:deps": "node scripts/check-deps.mjs",
22
25
  "check:docs": "npm run docs:api && git diff --exit-code docs/reference/api",
23
- "check:exports": "publint run --pack npm --level warning && attw --pack . --profile node16 --entrypoints . ./react ./tailwind --format table --no-emoji",
26
+ "check:exports": "publint run --pack npm --level warning && attw --pack . --profile node16 --entrypoints . ./client ./react ./tailwind --format table --no-emoji",
24
27
  "check:install": "node scripts/check-install.mjs",
28
+ "check:markdown": "markdownlint \"*.md\" \".github/**/*.md\" \"docs/**/*.md\" \".changeset/*.md\"",
25
29
  "check:package": "node scripts/check-package.mjs",
30
+ "check:release": "node scripts/check-release.mjs",
31
+ "check:release:strict": "node scripts/check-release.mjs --strict",
26
32
  "check:types": "tsc --noEmit",
33
+ "check:workflows": "node scripts/check-workflows.mjs",
27
34
  "docs:api": "typedoc --options typedoc.json",
35
+ "format:check": "prettier --check .",
36
+ "lint": "eslint .",
28
37
  "prepublishOnly": "npm run build",
38
+ "prepare": "husky",
29
39
  "storybook": "storybook dev -p 6006 --disable-telemetry",
30
40
  "test": "npm run check",
31
41
  "test:components": "vitest run",
@@ -81,14 +91,24 @@
81
91
  "default": "./dist/index.cjs"
82
92
  }
83
93
  },
94
+ "./client": {
95
+ "import": {
96
+ "types": "./dist/client/index.d.ts",
97
+ "default": "./dist/client/index.js"
98
+ },
99
+ "require": {
100
+ "types": "./dist/client/index.d.cts",
101
+ "default": "./dist/client/index.cjs"
102
+ }
103
+ },
84
104
  "./tailwind": {
85
105
  "import": {
86
- "types": "./dist/tailwind/preset.d.ts",
87
- "default": "./dist/tailwind/preset.js"
106
+ "types": "./dist/tailwind/preset.d.cts",
107
+ "default": "./dist/tailwind/preset.cjs"
88
108
  },
89
109
  "require": {
90
110
  "types": "./dist/tailwind/preset.d.cts",
91
- "default": "./dist/tailwind/preset.js"
111
+ "default": "./dist/tailwind/preset.cjs"
92
112
  }
93
113
  },
94
114
  "./styles": "./dist/styles.css",
@@ -104,15 +124,23 @@
104
124
  },
105
125
  "devDependencies": {
106
126
  "@arethetypeswrong/cli": "^0.18.3",
107
- "@changesets/cli": "^2.31.0",
127
+ "@commitlint/cli": "^21.0.2",
128
+ "@commitlint/config-conventional": "^21.0.2",
129
+ "@eslint/js": "^10.0.1",
108
130
  "@playwright/test": "^1.61.0",
109
131
  "@storybook/addon-docs": "^10.4.6",
110
132
  "@storybook/react-vite": "^10.4.6",
111
133
  "@testing-library/jest-dom": "^6.9.1",
112
134
  "@testing-library/react": "^16.3.2",
135
+ "@types/node": "^22.20.0",
113
136
  "@types/react": "^19.2.17",
114
137
  "@vitejs/plugin-react": "^6.0.2",
138
+ "actionlint": "^2.0.6",
139
+ "eslint": "^10.5.0",
140
+ "husky": "^9.1.7",
115
141
  "jsdom": "^29.1.1",
142
+ "markdownlint-cli": "^0.49.0",
143
+ "prettier": "^3.8.4",
116
144
  "publint": "^0.3.21",
117
145
  "react": "^19.2.7",
118
146
  "react-dom": "^19.2.7",
@@ -121,6 +149,7 @@
121
149
  "typedoc": "^0.28.19",
122
150
  "typedoc-plugin-markdown": "^4.12.0",
123
151
  "typescript": "^6.0.3",
152
+ "typescript-eslint": "^8.61.1",
124
153
  "vite": "^8.0.16",
125
154
  "vitest": "^4.1.9"
126
155
  }
@@ -1 +0,0 @@
1
- { "type": "commonjs" }
@@ -1,4 +0,0 @@
1
- import type { Config } from 'tailwindcss';
2
-
3
- declare const preset: Config;
4
- export = preset;
@@ -1,144 +0,0 @@
1
- /**
2
- * NoobSociety Design System — Tailwind CSS preset
3
- *
4
- * Usage in tailwind.config.js / tailwind.config.ts:
5
- *
6
- * import nsdPreset from '@noobsociety/nsds/tailwind';
7
- *
8
- * export default {
9
- * presets: [nsdPreset],
10
- * content: ['./src/**\/*.{ts,tsx}'],
11
- * };
12
- *
13
- * All values reference CSS custom properties so they stay in sync with
14
- * styles.css at runtime — change a token once, Tailwind classes update too.
15
- */
16
-
17
- /** @type {import('tailwindcss').Config} */
18
- const nsdPreset = {
19
- darkMode: ['class', '[data-theme="dark"]'],
20
- theme: {
21
- extend: {
22
-
23
- /* ── Colors ──────────────────────────────────────────────── */
24
- colors: {
25
- ns: {
26
- /* Surfaces */
27
- bg: {
28
- 0: 'var(--ns-bg-0)',
29
- 1: 'var(--ns-bg-1)',
30
- 2: 'var(--ns-bg-2)',
31
- glass: 'var(--ns-glass)',
32
- },
33
- /* Ink */
34
- ink: {
35
- DEFAULT: 'var(--ns-ink)',
36
- dim: 'var(--ns-ink-dim)',
37
- faint: 'var(--ns-ink-faint)',
38
- },
39
- /* Gold — primary accent */
40
- gold: {
41
- DEFAULT: 'var(--ns-gold)',
42
- pale: 'var(--ns-gold-pale)',
43
- deep: 'var(--ns-gold-deep)',
44
- shadow: 'var(--ns-gold-shadow)',
45
- fg: 'var(--ns-gold-btn-fg)',
46
- },
47
- /* Monokai accents */
48
- green: 'var(--ns-green)',
49
- cyan: 'var(--ns-cyan)',
50
- orange: 'var(--ns-orange)',
51
- pink: 'var(--ns-pink)',
52
- purple: 'var(--ns-purple)',
53
- /* Semantic */
54
- accent: 'var(--ns-accent)',
55
- line: 'var(--ns-line)',
56
- },
57
- },
58
-
59
- /* ── Typography ──────────────────────────────────────────── */
60
- fontFamily: {
61
- body: ['var(--ns-font-body)', { fallback: ['system-ui', 'sans-serif'] }],
62
- pixel: ['var(--ns-font-pixel)', { fallback: ['monospace'] }],
63
- },
64
- fontSize: {
65
- 'ns-xs': ['var(--ns-text-xs)', { lineHeight: 'var(--ns-leading-normal)' }],
66
- 'ns-sm': ['var(--ns-text-sm)', { lineHeight: 'var(--ns-leading-normal)' }],
67
- 'ns-base': ['var(--ns-text-base)', { lineHeight: 'var(--ns-leading-normal)' }],
68
- 'ns-lg': ['var(--ns-text-lg)', { lineHeight: 'var(--ns-leading-snug)' }],
69
- 'ns-xl': ['var(--ns-text-xl)', { lineHeight: 'var(--ns-leading-snug)' }],
70
- 'ns-2xl': ['var(--ns-text-2xl)', { lineHeight: 'var(--ns-leading-tight)' }],
71
- 'ns-3xl': ['var(--ns-text-3xl)', { lineHeight: 'var(--ns-leading-tight)' }],
72
- 'ns-4xl': ['var(--ns-text-4xl)', { lineHeight: 'var(--ns-leading-tight)' }],
73
- },
74
- fontWeight: {
75
- 'ns-normal': 'var(--ns-weight-normal)',
76
- 'ns-medium': 'var(--ns-weight-medium)',
77
- 'ns-semibold': 'var(--ns-weight-semibold)',
78
- 'ns-bold': 'var(--ns-weight-bold)',
79
- },
80
- lineHeight: {
81
- 'ns-tight': 'var(--ns-leading-tight)',
82
- 'ns-snug': 'var(--ns-leading-snug)',
83
- 'ns-normal': 'var(--ns-leading-normal)',
84
- 'ns-relaxed': 'var(--ns-leading-relaxed)',
85
- },
86
-
87
- /* ── Spacing ─────────────────────────────────────────────── */
88
- spacing: {
89
- 'ns-1': 'var(--ns-space-1)',
90
- 'ns-2': 'var(--ns-space-2)',
91
- 'ns-3': 'var(--ns-space-3)',
92
- 'ns-4': 'var(--ns-space-4)',
93
- 'ns-5': 'var(--ns-space-5)',
94
- 'ns-6': 'var(--ns-space-6)',
95
- 'ns-8': 'var(--ns-space-8)',
96
- 'ns-10': 'var(--ns-space-10)',
97
- 'ns-12': 'var(--ns-space-12)',
98
- 'ns-16': 'var(--ns-space-16)',
99
- 'ns-20': 'var(--ns-space-20)',
100
- },
101
- maxWidth: {
102
- 'ns-container': 'var(--ns-container)',
103
- },
104
- height: {
105
- 'ns-header': 'var(--ns-header-h)',
106
- },
107
-
108
- /* ── Border radius ───────────────────────────────────────── */
109
- borderRadius: {
110
- 'ns-sm': 'var(--ns-radius-sm)',
111
- 'ns-md': 'var(--ns-radius-md)',
112
- 'ns-lg': 'var(--ns-radius-lg)',
113
- 'ns-xl': 'var(--ns-radius-xl)',
114
- 'ns-full': 'var(--ns-radius-full)',
115
- },
116
-
117
- /* ── Box shadow ──────────────────────────────────────────── */
118
- boxShadow: {
119
- 'ns-card-hover': 'var(--ns-shadow-card-hover)',
120
- 'ns-btn': 'var(--ns-shadow-btn)',
121
- },
122
-
123
- /* ── Transitions ─────────────────────────────────────────── */
124
- transitionDuration: {
125
- 'ns-fast': 'var(--ns-dur-fast)',
126
- 'ns-base': 'var(--ns-dur-base)',
127
- 'ns-slow': 'var(--ns-dur-slow)',
128
- },
129
- transitionTimingFunction: {
130
- 'ns-out': 'var(--ns-ease-out)',
131
- 'ns-spring': 'var(--ns-ease-spring)',
132
- },
133
-
134
- /* ── Ring / focus ────────────────────────────────────────── */
135
- ringColor: {
136
- 'ns-focus': 'var(--ns-focus-ring)',
137
- },
138
- },
139
- },
140
-
141
- plugins: [],
142
- };
143
-
144
- module.exports = nsdPreset;