@nebutra/ui 0.2.2 → 2.0.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 (43) hide show
  1. package/dist/animate-in-BlvjVh2S.d.ts +250 -0
  2. package/dist/{canonical-CrO71UPO.d.ts → canonical-Bf4czR2u.d.ts} +225 -211
  3. package/dist/chat/index.d.ts +1 -0
  4. package/dist/chat/index.js +3 -0
  5. package/dist/chat/index.js.map +1 -0
  6. package/dist/components/index.d.ts +58 -123
  7. package/dist/components/index.js +504 -203
  8. package/dist/components/index.js.map +1 -1
  9. package/dist/editorial/index.d.ts +404 -0
  10. package/dist/editorial/index.js +868 -0
  11. package/dist/editorial/index.js.map +1 -0
  12. package/dist/icons/index.d.ts +1 -0
  13. package/dist/layout/index.d.ts +2 -2
  14. package/dist/layout/index.js +116 -26
  15. package/dist/layout/index.js.map +1 -1
  16. package/dist/layouts/index.d.ts +80 -2
  17. package/dist/layouts/index.js +13 -11
  18. package/dist/layouts/index.js.map +1 -1
  19. package/dist/patterns/index.d.ts +4 -5
  20. package/dist/patterns/index.js +221 -106
  21. package/dist/patterns/index.js.map +1 -1
  22. package/dist/primitives/canonical.d.ts +4 -3
  23. package/dist/primitives/canonical.js +609 -197
  24. package/dist/primitives/canonical.js.map +1 -1
  25. package/dist/primitives/index.d.ts +213 -21
  26. package/dist/primitives/index.js +2209 -1317
  27. package/dist/primitives/index.js.map +1 -1
  28. package/dist/tailwind.preset.d.ts +2 -2
  29. package/dist/tailwind.preset.js +1 -1
  30. package/dist/tailwind.preset.js.map +1 -1
  31. package/dist/typography/fonts.css +21 -26
  32. package/dist/typography/index.d.ts +4 -4
  33. package/dist/typography/index.js +1 -1
  34. package/dist/typography/index.js.map +1 -1
  35. package/dist/utils/auth-surfaces.d.ts +33 -0
  36. package/dist/utils/auth-surfaces.js +9 -0
  37. package/dist/utils/auth-surfaces.js.map +1 -0
  38. package/dist/utils/index.d.ts +33 -5
  39. package/dist/utils/index.js +15 -3
  40. package/dist/utils/index.js.map +1 -1
  41. package/package.json +43 -9
  42. package/src/styles/sources.css +10 -0
  43. package/src/typography/fonts.css +21 -26
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@nebutra/ui",
3
- "version": "0.2.2",
3
+ "version": "2.0.0",
4
4
  "description": "Nebutra design-system UI primitives, patterns, layouts, and token-integrated components",
5
5
  "private": false,
6
+ "nebutra": {
7
+ "status": "foundation",
8
+ "graph": "core",
9
+ "productionReady": false
10
+ },
6
11
  "license": "MIT",
7
12
  "type": "module",
8
13
  "sideEffects": [
@@ -17,6 +22,10 @@
17
22
  "types": "./dist/components/index.d.ts",
18
23
  "import": "./dist/components/index.js"
19
24
  },
25
+ "./chat": {
26
+ "types": "./dist/chat/index.d.ts",
27
+ "import": "./dist/chat/index.js"
28
+ },
20
29
  "./layout": {
21
30
  "types": "./dist/layout/index.d.ts",
22
31
  "import": "./dist/layout/index.js"
@@ -37,6 +46,10 @@
37
46
  "types": "./dist/theme/index.d.ts",
38
47
  "import": "./dist/theme/index.js"
39
48
  },
49
+ "./editorial": {
50
+ "types": "./dist/editorial/index.d.ts",
51
+ "import": "./dist/editorial/index.js"
52
+ },
40
53
  "./primitives": {
41
54
  "types": "./dist/primitives/index.d.ts",
42
55
  "import": "./dist/primitives/index.js"
@@ -77,6 +90,10 @@
77
90
  "types": "./dist/utils/index.d.ts",
78
91
  "import": "./dist/utils/index.js"
79
92
  },
93
+ "./utils/auth-surfaces": {
94
+ "types": "./dist/utils/auth-surfaces.d.ts",
95
+ "import": "./dist/utils/auth-surfaces.js"
96
+ },
80
97
  "./tailwind.preset": {
81
98
  "types": "./dist/tailwind.preset.d.ts",
82
99
  "import": "./dist/tailwind.preset.js"
@@ -95,11 +112,13 @@
95
112
  "@lobehub/fluent-emoji": "^4.1.0",
96
113
  "@lobehub/icons": "^5.0.1",
97
114
  "@lobehub/ui": "^5.4.0",
98
- "@xyflow/react": "^12.10.2",
99
115
  "@number-flow/react": "^0.5.5",
100
116
  "@paper-design/shaders-react": "^0.0.71",
101
117
  "@phosphor-icons/react": "^2.1.10",
102
118
  "@react-types/shared": "^3.33.1",
119
+ "@tanstack/react-table": "^8.21.3",
120
+ "@tanstack/react-virtual": "^3.13.24",
121
+ "@xyflow/react": "^12.10.2",
103
122
  "antd": "^6.3.1",
104
123
  "antd-style": "^4.1.0",
105
124
  "canvas-confetti": "^1.9.4",
@@ -115,29 +134,32 @@
115
134
  "piri": "^1.3.2",
116
135
  "react": "^19.2.4",
117
136
  "react-ascii-text": "*",
137
+ "react-day-picker": "^10.0.1",
118
138
  "react-dom": "^19.2.4",
119
139
  "react-hook-form": "^7.71.2",
120
140
  "react-markdown": "^10.1.0",
121
141
  "react-resizable-panels": "^4.7.1",
122
142
  "react-syntax-highlighter": "^16.1.1",
123
- "remark-gfm": "^4.0.1",
124
143
  "react-tweet": "^3.3.0",
125
144
  "react-use-measure": "^2.1.7",
126
145
  "recharts": "^3.7.0",
146
+ "remark-gfm": "^4.0.1",
127
147
  "rough-notation": "^0.5.1",
128
148
  "sonner": "^2.0.7",
129
149
  "streamdown": "^2.5.0",
130
150
  "tailwind-merge": "^3.5.0",
131
151
  "usehooks-ts": "^3.1.1",
132
152
  "vaul": "^1.1.2",
133
- "@nebutra/brand": "0.1.2",
134
- "@nebutra/graph-model": "0.2.2",
135
- "@nebutra/icons": "0.1.2",
136
- "@nebutra/tokens": "0.1.2"
153
+ "@nebutra/brand": "2.0.0",
154
+ "@nebutra/graph-model": "2.0.0",
155
+ "@nebutra/icons": "2.0.0",
156
+ "@nebutra/tokens": "2.0.0"
137
157
  },
138
158
  "peerDependencies": {
139
159
  "@clerk/nextjs": ">=5.0.0",
160
+ "driver.js": "^1.4.0",
140
161
  "next": ">=14.0.0",
162
+ "next-intl": "^4.12.0",
141
163
  "react": ">=19.0.0",
142
164
  "react-dom": ">=19.0.0"
143
165
  },
@@ -145,11 +167,18 @@
145
167
  "@clerk/nextjs": {
146
168
  "optional": true
147
169
  },
170
+ "driver.js": {
171
+ "optional": true
172
+ },
148
173
  "next": {
149
174
  "optional": true
175
+ },
176
+ "next-intl": {
177
+ "optional": true
150
178
  }
151
179
  },
152
180
  "devDependencies": {
181
+ "@storybook/react": "8.6.17",
153
182
  "@storybook/test": "^8.6.17",
154
183
  "@testing-library/jest-dom": "^6.9.1",
155
184
  "@testing-library/react": "^16.3.2",
@@ -158,14 +187,17 @@
158
187
  "@types/react": "^19.2.14",
159
188
  "@types/react-syntax-highlighter": "^15.5.13",
160
189
  "@types/three": "^0.183.1",
190
+ "@vitejs/plugin-react-swc": "^4.3.1",
191
+ "driver.js": "^1.4.0",
192
+ "jsdom": "^29.1.1",
161
193
  "next": "^16.2.6",
194
+ "next-intl": "^4.12.0",
162
195
  "storybook": "^8.6.17",
163
- "@vitejs/plugin-react-swc": "^4.3.1",
164
196
  "tsup": "^8.5.1",
165
197
  "tsx": "^4.21.0",
166
198
  "typescript": "^5.9.3",
167
199
  "vitest": "^4.0.18",
168
- "@nebutra/design-tokens": "0.1.2"
200
+ "@nebutra/design-tokens": "2.0.0"
169
201
  },
170
202
  "homepage": "https://github.com/Nebutra/Nebutra-Sailor/tree/main/packages/design/ui#readme",
171
203
  "repository": {
@@ -183,6 +215,8 @@
183
215
  "@react-three/fiber": "^9.5.0",
184
216
  "three": "^0.183.2"
185
217
  },
218
+ "main": "./dist/index.js",
219
+ "types": "./dist/index.d.ts",
186
220
  "scripts": {
187
221
  "test": "vitest run",
188
222
  "typecheck": "tsc --noEmit",
@@ -25,3 +25,13 @@
25
25
 
26
26
  /* Icon components often appear in class strings next to UI primitives */
27
27
  @source "../../../icons/src/**/*.{ts,tsx,js,jsx}";
28
+
29
+ /*
30
+ * @nebutra/i18n ships rendered components (locale-switcher, market-locale-picker),
31
+ * so its class strings need compiling too. Without this the utilities silently
32
+ * do not exist: the locale switcher asked for `bg-neutral-1` to opt out of the
33
+ * translucent popover surface and got nothing, so the DS default `bg-popover/95`
34
+ * kept winning and the panel stayed see-through — a fix that was correct in the
35
+ * source and absent from the stylesheet.
36
+ */
37
+ @source "../../../../platform/i18n/src/**/*.{ts,tsx,js,jsx}";
@@ -1,42 +1,37 @@
1
1
  /**
2
- * Font CSS Variables — SSOT for typography across Nebutra packages.
3
- * "Precision Stack" — Geist × Geist Mono × Noto Sans SC
2
+ * Font rules — the typography BEHAVIOUR layer (which element gets which stack).
3
+ * The STACKS themselves are owned by @nebutra/tokens, generated from
4
+ * packages/design/design-tokens/tokens/core.json → fontFamily.*.
4
5
  *
5
- * Font loading strategy (Next.js apps):
6
- * Each app's layout.tsx loads Latin fonts via geist/font:
7
- * GeistSans → injects --font-geist-sans (variable font, 100–900)
8
- * GeistMono → injects --font-geist-mono (variable font, 100–900)
6
+ * Font loading (Next.js apps): each app's layout.tsx applies the loader classes
7
+ * GeistSans → --font-geist-sans (variable, 100–900) Latin + numerals
8
+ * GeistMono → --font-geist-mono (variable, 100–900) code
9
+ * cjkFontClassName → --font-noto-sans-sc (@nebutra/fonts/next/cjk) CJK
10
+ * and the token stacks reference those variables in that order, so Geist keeps
11
+ * Latin and only CJK falls through to Noto Sans SC.
9
12
  *
10
- * The CSS custom properties below reference those injected variables and
11
- * fall back gracefully when font loaders are unavailable (e.g., Storybook, tests).
12
- * CJK uses local/system font fallback to avoid build-time Google font fetches.
13
+ * IMPORT ORDER MATTERS: this file must come AFTER @nebutra/tokens/styles.css
14
+ * (see ../styles/preset.css). It used to re-declare --font-sans / --font-heading /
15
+ * --font-mono here as Geist-only literals; being the later import, those copies
16
+ * won, and the CJK half of every token stack was silently discarded. Declare
17
+ * stacks in the tokens, never here.
13
18
  */
14
19
 
15
20
  /* ============================================
16
- CSS Custom Properties (SSOT)
21
+ CSS Custom Properties — derived aliases only
17
22
  ============================================ */
18
23
 
19
24
  :root {
20
- /* Primary font stack — Geist Sans (geometric precision, variable) */
21
- --font-primary:
22
- var(--font-geist-sans), "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
23
- sans-serif;
25
+ /* Legacy alias for the body/UI stack — the stack lives in the tokens. */
26
+ --font-primary: var(--font-sans);
24
27
 
25
- /* Heading font stack — matches primary for Precision Stack */
26
- --font-heading:
27
- var(--font-geist-sans), "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
28
- sans-serif;
29
-
30
- /* Monospace — Geist Mono */
31
- --font-mono:
32
- var(--font-geist-mono), "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
33
-
34
- /* CJK — local/system fallback, no build-time font fetch */
28
+ /* CJK — appended as a fallback on the rules below (see the note there). The
29
+ token already leads with the self-hosted face; the system families repeat
30
+ here so this alias still degrades on its own. */
35
31
  --font-cjk:
36
32
  var(--font-cn), "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
37
33
 
38
- /* Aliases for Tailwind/shadcn compatibility */
39
- --font-sans: var(--font-primary);
34
+ /* Not a token: no Nebutra surface uses a serif, this exists for shadcn parity. */
40
35
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
41
36
  }
42
37