@rise-x/apps-sdk 0.7.0 → 0.9.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 (72) hide show
  1. package/README.md +104 -1
  2. package/build/rsbuild/index.d.ts +31 -0
  3. package/build/rsbuild/index.js +204 -0
  4. package/build/ui/components/accordion.d.ts +7 -0
  5. package/build/ui/components/app-frame.d.ts +13 -0
  6. package/build/ui/components/aspect-ratio.d.ts +4 -0
  7. package/build/ui/components/button-group.d.ts +7 -0
  8. package/build/ui/components/carousel.d.ts +18 -0
  9. package/build/ui/components/chart.d.ts +45 -94
  10. package/build/ui/components/collapsible.d.ts +6 -0
  11. package/build/ui/components/combobox.d.ts +19 -0
  12. package/build/ui/components/command.d.ts +18 -0
  13. package/build/ui/components/context-menu.d.ts +29 -0
  14. package/build/ui/components/date-picker.d.ts +16 -0
  15. package/build/ui/components/direction.d.ts +6 -0
  16. package/build/ui/components/field.d.ts +25 -0
  17. package/build/ui/components/hover-card.d.ts +6 -0
  18. package/build/ui/components/input-group.d.ts +13 -0
  19. package/build/ui/components/input-otp.d.ts +34 -0
  20. package/build/ui/components/input.d.ts +1 -3
  21. package/build/ui/components/item.d.ts +23 -0
  22. package/build/ui/components/kbd.d.ts +4 -0
  23. package/build/ui/components/menubar.d.ts +26 -0
  24. package/build/ui/components/message-scroller.d.ts +15 -0
  25. package/build/ui/components/nav.d.ts +2 -1
  26. package/build/ui/components/navigation-menu.d.ts +13 -0
  27. package/build/ui/components/page-header.d.ts +7 -1
  28. package/build/ui/index.d.ts +20 -0
  29. package/build/ui/reference/components/accordion.tsx +85 -0
  30. package/build/ui/reference/components/ai.tsx +3 -1
  31. package/build/ui/reference/components/alert-dialog.tsx +10 -16
  32. package/build/ui/reference/components/app-frame.tsx +71 -0
  33. package/build/ui/reference/components/aspect-ratio.tsx +28 -0
  34. package/build/ui/reference/components/button-group.tsx +77 -0
  35. package/build/ui/reference/components/button.tsx +4 -2
  36. package/build/ui/reference/components/carousel.tsx +248 -0
  37. package/build/ui/reference/components/chart.tsx +441 -1131
  38. package/build/ui/reference/components/collapsible.tsx +43 -0
  39. package/build/ui/reference/components/combobox.tsx +146 -0
  40. package/build/ui/reference/components/command.tsx +181 -0
  41. package/build/ui/reference/components/context-menu.tsx +243 -0
  42. package/build/ui/reference/components/data-table.tsx +3 -3
  43. package/build/ui/reference/components/date-picker.tsx +218 -0
  44. package/build/ui/reference/components/dialog.tsx +3 -3
  45. package/build/ui/reference/components/direction.tsx +22 -0
  46. package/build/ui/reference/components/dropdown-menu.tsx +1 -1
  47. package/build/ui/reference/components/field.tsx +252 -0
  48. package/build/ui/reference/components/hover-card.tsx +64 -0
  49. package/build/ui/reference/components/input-group.tsx +157 -0
  50. package/build/ui/reference/components/input-otp.tsx +106 -0
  51. package/build/ui/reference/components/input.tsx +4 -32
  52. package/build/ui/reference/components/item.tsx +188 -0
  53. package/build/ui/reference/components/kbd.tsx +43 -0
  54. package/build/ui/reference/components/label.tsx +1 -1
  55. package/build/ui/reference/components/menubar.tsx +275 -0
  56. package/build/ui/reference/components/message-scroller.tsx +141 -0
  57. package/build/ui/reference/components/message.tsx +12 -6
  58. package/build/ui/reference/components/nav.tsx +14 -3
  59. package/build/ui/reference/components/navigation-menu.tsx +191 -0
  60. package/build/ui/reference/components/page-header.tsx +32 -0
  61. package/build/ui/reference/components/popover.tsx +2 -2
  62. package/build/ui/reference/components/select.tsx +11 -8
  63. package/build/ui/reference/components/sheet.tsx +10 -2
  64. package/build/ui/reference/components/timeline.tsx +7 -0
  65. package/build/ui/reference/components/toggle.tsx +1 -1
  66. package/build/ui/reference/index.ts +20 -0
  67. package/build/ui/standalone.js +167 -28
  68. package/build/ui/styles.css +1 -1
  69. package/package.json +27 -2
  70. package/rsbuild/package.json +8 -0
  71. package/template/AGENTS.md +15 -7
  72. package/template/src/App.tsx +18 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rise-x/apps-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "SDK for building federated apps on top of the Rise-X Diana shell. Includes a CLI for scaffolding new apps.",
5
5
  "author": {
6
6
  "name": "Rise-X",
@@ -43,13 +43,18 @@
43
43
  "default": "./build/ui/index.js"
44
44
  },
45
45
  "./ui/standalone": "./build/ui/standalone.js",
46
- "./ui/standalone-stub": "./build/ui/standalone-stub.js"
46
+ "./ui/standalone-stub": "./build/ui/standalone-stub.js",
47
+ "./rsbuild": {
48
+ "types": "./build/rsbuild/index.d.ts",
49
+ "default": "./build/rsbuild/index.js"
50
+ }
47
51
  },
48
52
  "files": [
49
53
  "build",
50
54
  "shell",
51
55
  "connectors",
52
56
  "query",
57
+ "rsbuild",
53
58
  "template",
54
59
  "ui"
55
60
  ],
@@ -65,12 +70,24 @@
65
70
  "prepack": "pnpm --filter @rise-x/ui build && pnpm build:package"
66
71
  },
67
72
  "peerDependencies": {
73
+ "@rsbuild/core": "^1.7.6",
74
+ "@rsbuild/plugin-react": "^1.4.6",
75
+ "@rsbuild/plugin-type-check": "^1.3.6",
68
76
  "@tanstack/react-query": "^5.0.0",
69
77
  "axios": "^1.0.0",
70
78
  "react": "^18.0.0 || ^19.0.0",
71
79
  "react-router-dom": "^6.0.0"
72
80
  },
73
81
  "peerDependenciesMeta": {
82
+ "@rsbuild/core": {
83
+ "optional": true
84
+ },
85
+ "@rsbuild/plugin-react": {
86
+ "optional": true
87
+ },
88
+ "@rsbuild/plugin-type-check": {
89
+ "optional": true
90
+ },
74
91
  "@tanstack/react-query": {
75
92
  "optional": true
76
93
  },
@@ -82,15 +99,23 @@
82
99
  }
83
100
  },
84
101
  "dependencies": {
102
+ "@tanstack/react-table": "^8.21.3",
85
103
  "@types/leaflet": "^1.9.12",
86
104
  "class-variance-authority": "^0.7.1",
87
105
  "clsx": "^2.1.1",
106
+ "cmdk": "^1.1.1",
107
+ "embla-carousel-react": "^8.6.0",
108
+ "input-otp": "^1.4.2",
88
109
  "radix-ui": "^1.6.2",
89
110
  "react-resizable-panels": "^4.12.2",
111
+ "recharts": "^3.8.0",
90
112
  "sonner": "^2.0.7"
91
113
  },
92
114
  "devDependencies": {
93
115
  "@fontsource-variable/inter": "^5.3.0",
116
+ "@rsbuild/core": "^1.7.6",
117
+ "@rsbuild/plugin-react": "^1.4.6",
118
+ "@rsbuild/plugin-type-check": "^1.3.6",
94
119
  "@tanstack/react-query": "^5.59.20",
95
120
  "@testing-library/dom": "^10.4.0",
96
121
  "@testing-library/react": "^16.1.0",
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@rise-x/apps-sdk/rsbuild",
3
+ "description": "Legacy-resolution stub for the rsbuild subpath. See parent package.json `exports` for the canonical wiring.",
4
+ "main": "../build/rsbuild/index.js",
5
+ "module": "../build/rsbuild/index.js",
6
+ "types": "../build/rsbuild/index.d.ts",
7
+ "private": true
8
+ }
@@ -37,13 +37,21 @@ Rise-X host (the Diana app):
37
37
  (`@rise-x/apps-sdk/query`). Never instantiate your own axios, wire your own
38
38
  auth, or call backend services directly.
39
39
  - UI is built exclusively from `@rise-x/apps-sdk/ui` (the Rise-X design
40
- system). App navigation is a left rail built from the `Nav` primitives,
41
- directly on the page background — never inside a Card, never a top bar;
42
- the host renders its own above the app. **No user/account UI in the app**
43
- (no avatar, name, or sign-out) — the host top bar owns identity. On mobile
44
- widths a bottom tab bar is the native pattern (see `APP.md` for this app's
45
- mobile UX level). This app scaffolded from the canonical layout — it lives
46
- in `src/App.tsx`; preserve its chrome composition as you build.
40
+ system). The root layout is the `AppFrame` primitives: `AppRail` (fixed
41
+ left rail of `Nav` items, directly on the page background — never inside a
42
+ Card, never a top bar; the host renders its own above the app) beside
43
+ `AppContent` (the app's ONE scroll container — it slides under the host's
44
+ floating top bar by padding with the host-published `--topbar-h` CSS
45
+ variable; never hardcode a bar height or add another page scroller).
46
+ Rendering an `AppFrame` is also the signal that the app owns its layout —
47
+ the next-gen shell detects it and hands over the full-bleed region
48
+ (apps without one get a host-padded scroller instead), so keep it at the
49
+ app root, always mounted.
50
+ **No user/account UI in the app** (no avatar, name, or sign-out) — the
51
+ host top bar owns identity. On mobile widths a bottom tab bar is the
52
+ native pattern (see `APP.md` for this app's mobile UX level). This app
53
+ scaffolded from the canonical layout — it lives in `src/App.tsx`; preserve
54
+ its chrome composition as you build.
47
55
 
48
56
  ## Stack
49
57
 
@@ -10,6 +10,9 @@ import {
10
10
  } from "lucide-react";
11
11
  import { AppQueryProvider } from "@rise-x/apps-sdk/query";
12
12
  import {
13
+ AppContent,
14
+ AppFrame,
15
+ AppRail,
13
16
  Badge,
14
17
  Button,
15
18
  Nav,
@@ -28,7 +31,11 @@ import {
28
31
  * · The HOST renders the top bar above the app (navigation, user menu,
29
32
  * ecosystem switcher). Never render a top bar and NEVER any user/account
30
33
  * UI in the app — no avatar, no user name, no sign-out.
31
- * · App navigation is a LEFT RAIL built from the Nav primitives, sitting
34
+ * · The AppFrame primitives ARE the layout contract: AppRail stays fixed on
35
+ * the left while AppContent owns the scroll and slides under the host's
36
+ * floating top bar (they pad by the host-published --topbar-h variable —
37
+ * never hardcode a bar height, and never add another page scroller).
38
+ * · App navigation is the LEFT RAIL (AppRail + Nav primitives), sitting
32
39
  * directly on the page background — never wrapped in a Card or Panel.
33
40
  * Cards are for content, not chrome.
34
41
  * · No app logo or name in the rail — the host already identifies the app;
@@ -68,13 +75,13 @@ function Shell() {
68
75
  const current = SCREENS.find((s) => s.id === screen) ?? SCREENS[0];
69
76
 
70
77
  return (
71
- // The host paints the page background and owns page height — the app
72
- // fills its outlet. NOTE: the host ships only the utility classes used
73
- // inside the design system itself; app-specific values (like the rail
74
- // width below) go in inline styles or your own CSS.
75
- <div className="flex text-foreground">
78
+ // The host paints the page background and hands the app a full-height
79
+ // region. NOTE: the host ships only the utility classes used inside the
80
+ // design system itself; app-specific values go in inline styles or your
81
+ // own CSS — the AppFrame primitives carry their own classes.
82
+ <AppFrame>
76
83
  {/* Left rail: a borderless list on the page background — NOT a Card. */}
77
- <aside className="flex shrink-0 flex-col p-3" style={{ width: 180 }}>
84
+ <AppRail>
78
85
  <Nav>
79
86
  <NavItem
80
87
  current={screen === "home"}
@@ -115,9 +122,9 @@ function Shell() {
115
122
  </NavItem>
116
123
  </Nav>
117
124
  {/* Nothing below the nav — the host top bar owns user identity. */}
118
- </aside>
125
+ </AppRail>
119
126
 
120
- <main className="min-w-0 flex-1 p-6">
127
+ <AppContent>
121
128
  <PageHeader variant="bare">
122
129
  <PageHeaderRow>
123
130
  <div>
@@ -174,7 +181,7 @@ function Shell() {
174
181
  stubs with your app.
175
182
  </div>
176
183
  </div>
177
- </main>
178
- </div>
184
+ </AppContent>
185
+ </AppFrame>
179
186
  );
180
187
  }