@oxy-hq/sdk 2.3.0 → 2.5.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 CHANGED
@@ -98,6 +98,46 @@ Hooks fail loudly if called outside `<OxyAppProvider>`. The default fetcher
98
98
  sends `credentials: "include"` so same-origin (served-by-oxy) calls carry the
99
99
  session cookie automatically.
100
100
 
101
+ ### Workspace shell (`@oxy-hq/sdk/shell`)
102
+
103
+ The Oxygen workspace chrome — the 48px icon rail and universal top bar the
104
+ main web-app renders — as reusable components, so your app reads as part of
105
+ the same product. The main web-app consumes these exact components.
106
+
107
+ ```tsx
108
+ import { OxyAppProvider } from "@oxy-hq/sdk";
109
+ import { OxyShell } from "@oxy-hq/sdk/shell";
110
+ import "@oxy-hq/sdk/shell.css";
111
+
112
+ export function App() {
113
+ return (
114
+ <OxyAppProvider>
115
+ <OxyShell>
116
+ <Dashboard />
117
+ </OxyShell>
118
+ </OxyAppProvider>
119
+ );
120
+ }
121
+ ```
122
+
123
+ `OxyShell` bootstraps from `GET /api/projects/:id/shell-context` (workspace
124
+ identity, sibling apps, host-aware navigation URLs) and degrades gracefully:
125
+ if the endpoint is unavailable (older server), your app renders unchromed.
126
+
127
+ | Export | What it does |
128
+ | --- | --- |
129
+ | `OxyShell` | Wired frame: rail + top bar + content column around your app. Slots: `topBarExtra`, `railBottom`, `hideTopBar`, `pageLabel`. |
130
+ | `useShellContext()` | The raw shell bootstrap payload (`{ data, loading, error }`). |
131
+ | `ShellRail`, `RailItem` | Presentational icon rail — props only, router-free. |
132
+ | `TopBar`, `Breadcrumb`, `SystemIndicator`, `WorkspaceClock` | Presentational top bar pieces. |
133
+ | `WorkspaceTile`, `OxyMark`, `OxygenFactoryMark` | Branding primitives. |
134
+ | `workspaceLogoUrl(apiBaseUrl, wsId, version?)` | Workspace logo endpoint URL builder. |
135
+
136
+ Styling: `shell.css` is namespaced (`oxy-shell-*`) — no Tailwind required, no
137
+ global styles leak into your app. It follows your design tokens when present
138
+ (`--sidebar-background`, `--foreground`, …) and falls back to the Oxygen
139
+ defaults. Dark mode: put a `.dark` class on any ancestor.
140
+
101
141
  ## Docs
102
142
 
103
143
  - Hands-on dev + deploy guide: `docs/local-development.md` in the