@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.
- package/README.md +104 -1
- package/build/rsbuild/index.d.ts +31 -0
- package/build/rsbuild/index.js +204 -0
- package/build/ui/components/accordion.d.ts +7 -0
- package/build/ui/components/app-frame.d.ts +13 -0
- package/build/ui/components/aspect-ratio.d.ts +4 -0
- package/build/ui/components/button-group.d.ts +7 -0
- package/build/ui/components/carousel.d.ts +18 -0
- package/build/ui/components/chart.d.ts +45 -94
- package/build/ui/components/collapsible.d.ts +6 -0
- package/build/ui/components/combobox.d.ts +19 -0
- package/build/ui/components/command.d.ts +18 -0
- package/build/ui/components/context-menu.d.ts +29 -0
- package/build/ui/components/date-picker.d.ts +16 -0
- package/build/ui/components/direction.d.ts +6 -0
- package/build/ui/components/field.d.ts +25 -0
- package/build/ui/components/hover-card.d.ts +6 -0
- package/build/ui/components/input-group.d.ts +13 -0
- package/build/ui/components/input-otp.d.ts +34 -0
- package/build/ui/components/input.d.ts +1 -3
- package/build/ui/components/item.d.ts +23 -0
- package/build/ui/components/kbd.d.ts +4 -0
- package/build/ui/components/menubar.d.ts +26 -0
- package/build/ui/components/message-scroller.d.ts +15 -0
- package/build/ui/components/nav.d.ts +2 -1
- package/build/ui/components/navigation-menu.d.ts +13 -0
- package/build/ui/components/page-header.d.ts +7 -1
- package/build/ui/index.d.ts +20 -0
- package/build/ui/reference/components/accordion.tsx +85 -0
- package/build/ui/reference/components/ai.tsx +3 -1
- package/build/ui/reference/components/alert-dialog.tsx +10 -16
- package/build/ui/reference/components/app-frame.tsx +71 -0
- package/build/ui/reference/components/aspect-ratio.tsx +28 -0
- package/build/ui/reference/components/button-group.tsx +77 -0
- package/build/ui/reference/components/button.tsx +4 -2
- package/build/ui/reference/components/carousel.tsx +248 -0
- package/build/ui/reference/components/chart.tsx +441 -1131
- package/build/ui/reference/components/collapsible.tsx +43 -0
- package/build/ui/reference/components/combobox.tsx +146 -0
- package/build/ui/reference/components/command.tsx +181 -0
- package/build/ui/reference/components/context-menu.tsx +243 -0
- package/build/ui/reference/components/data-table.tsx +3 -3
- package/build/ui/reference/components/date-picker.tsx +218 -0
- package/build/ui/reference/components/dialog.tsx +3 -3
- package/build/ui/reference/components/direction.tsx +22 -0
- package/build/ui/reference/components/dropdown-menu.tsx +1 -1
- package/build/ui/reference/components/field.tsx +252 -0
- package/build/ui/reference/components/hover-card.tsx +64 -0
- package/build/ui/reference/components/input-group.tsx +157 -0
- package/build/ui/reference/components/input-otp.tsx +106 -0
- package/build/ui/reference/components/input.tsx +4 -32
- package/build/ui/reference/components/item.tsx +188 -0
- package/build/ui/reference/components/kbd.tsx +43 -0
- package/build/ui/reference/components/label.tsx +1 -1
- package/build/ui/reference/components/menubar.tsx +275 -0
- package/build/ui/reference/components/message-scroller.tsx +141 -0
- package/build/ui/reference/components/message.tsx +12 -6
- package/build/ui/reference/components/nav.tsx +14 -3
- package/build/ui/reference/components/navigation-menu.tsx +191 -0
- package/build/ui/reference/components/page-header.tsx +32 -0
- package/build/ui/reference/components/popover.tsx +2 -2
- package/build/ui/reference/components/select.tsx +11 -8
- package/build/ui/reference/components/sheet.tsx +10 -2
- package/build/ui/reference/components/timeline.tsx +7 -0
- package/build/ui/reference/components/toggle.tsx +1 -1
- package/build/ui/reference/index.ts +20 -0
- package/build/ui/standalone.js +167 -28
- package/build/ui/styles.css +1 -1
- package/package.json +27 -2
- package/rsbuild/package.json +8 -0
- package/template/AGENTS.md +15 -7
- 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.
|
|
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
|
+
}
|
package/template/AGENTS.md
CHANGED
|
@@ -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).
|
|
41
|
-
directly on the page background — never inside a
|
|
42
|
-
the host renders its own above the app
|
|
43
|
-
(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
|
package/template/src/App.tsx
CHANGED
|
@@ -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
|
-
* ·
|
|
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
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
<
|
|
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
|
-
<
|
|
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
|
-
</
|
|
125
|
+
</AppRail>
|
|
119
126
|
|
|
120
|
-
<
|
|
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
|
-
</
|
|
178
|
-
</
|
|
184
|
+
</AppContent>
|
|
185
|
+
</AppFrame>
|
|
179
186
|
);
|
|
180
187
|
}
|