@octonodes/ui-extensions 0.2.13 → 0.2.26
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 +105 -8
- package/dist/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.d.ts +3 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.d.ts.map +1 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.js +17 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.js.map +1 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.types.d.ts +4 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.types.d.ts.map +1 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.types.js +2 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.types.js.map +1 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/constants.d.ts +3 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/constants.d.ts.map +1 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/constants.js +14 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/constants.js.map +1 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/index.d.ts +3 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/index.d.ts.map +1 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/index.js +3 -0
- package/dist/app/OctonodeAppProvider/AppAccessScreen/index.js.map +1 -0
- package/dist/app/OctonodeAppProvider/OctonodeAppProvider.d.ts +5 -0
- package/dist/app/OctonodeAppProvider/OctonodeAppProvider.d.ts.map +1 -0
- package/dist/app/OctonodeAppProvider/OctonodeAppProvider.js +72 -0
- package/dist/app/OctonodeAppProvider/OctonodeAppProvider.js.map +1 -0
- package/dist/app/OctonodeAppProvider/OctonodeAppProvider.types.d.ts +12 -0
- package/dist/app/OctonodeAppProvider/OctonodeAppProvider.types.d.ts.map +1 -0
- package/dist/app/OctonodeAppProvider/OctonodeAppProvider.types.js +2 -0
- package/dist/app/OctonodeAppProvider/OctonodeAppProvider.types.js.map +1 -0
- package/dist/app/OctonodeAppProvider/index.d.ts +3 -0
- package/dist/app/OctonodeAppProvider/index.d.ts.map +1 -0
- package/dist/app/OctonodeAppProvider/index.js +3 -0
- package/dist/app/OctonodeAppProvider/index.js.map +1 -0
- package/dist/app/constants.d.ts +2 -0
- package/dist/app/constants.d.ts.map +1 -0
- package/dist/app/constants.js +3 -0
- package/dist/app/constants.js.map +1 -0
- package/dist/app/hosted.d.ts +6 -0
- package/dist/app/hosted.d.ts.map +1 -0
- package/dist/app/hosted.js +174 -0
- package/dist/app/hosted.js.map +1 -0
- package/dist/app/index.d.ts +5 -1
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +6 -4
- package/dist/app/index.js.map +1 -1
- package/dist/app/project.d.ts +1 -1
- package/dist/app/project.d.ts.map +1 -1
- package/dist/app/server.d.ts +4 -0
- package/dist/app/server.d.ts.map +1 -1
- package/dist/app/server.js +15 -3
- package/dist/app/server.js.map +1 -1
- package/dist/app/types.d.ts +24 -3
- package/dist/app/types.d.ts.map +1 -1
- package/dist/contributions.d.ts +5 -0
- package/dist/contributions.d.ts.map +1 -0
- package/dist/contributions.js +71 -0
- package/dist/contributions.js.map +1 -0
- package/dist/contributions.types.d.ts +93 -0
- package/dist/contributions.types.d.ts.map +1 -0
- package/dist/contributions.types.js +2 -0
- package/dist/contributions.types.js.map +1 -0
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/locales/de.json +22 -0
- package/dist/locales/en.json +22 -0
- package/dist/locales/es.json +22 -0
- package/dist/locales/fr.json +22 -0
- package/dist/locales/index.d.ts +113 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/index.js +8 -0
- package/dist/locales/index.js.map +1 -0
- package/dist/locales/ja.json +22 -0
- package/dist/react.d.ts +2 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +16 -4
- package/dist/react.js.map +1 -1
- package/dist/targets.d.ts +2 -0
- package/dist/targets.d.ts.map +1 -0
- package/dist/targets.js +46 -0
- package/dist/targets.js.map +1 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -41,6 +41,59 @@ ui: {
|
|
|
41
41
|
|
|
42
42
|
The first public target is `node.inspector.inputs`. Undeclared or omitted inputs fall back to the standard inspector form.
|
|
43
43
|
|
|
44
|
+
## Native app contributions (v3)
|
|
45
|
+
|
|
46
|
+
Installed apps can add navbar/navigation/search launchers, panels, Octonode tabs,
|
|
47
|
+
workflow node bodies and context-menu actions, task badges/details, document and
|
|
48
|
+
editor operations, Git/table/execution views, and settings sections. A hosted app
|
|
49
|
+
page or backend is optional. These changes require the SDK and CLI built from the
|
|
50
|
+
accompanying branch; they are not published yet.
|
|
51
|
+
|
|
52
|
+
Views use `defineExtension(target, Component)` and `useExtension(target)` from
|
|
53
|
+
`@octonodes/ui-extensions/react`. Actions use `defineAction(target, handler)` from
|
|
54
|
+
`@octonodes/ui-extensions`. The CLI bundles and hashes each immutable browser entry.
|
|
55
|
+
The generated runtime checks the definition's target and action/view kind at startup,
|
|
56
|
+
then calls `startExtension` or `startAction`.
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
import { defineExtension, useExtension, Section, Button } from "@octonodes/ui-extensions/react";
|
|
60
|
+
export default defineExtension("shell.panel", function Assistant() {
|
|
61
|
+
const api = useExtension("shell.panel");
|
|
62
|
+
return (
|
|
63
|
+
<Section title="Claude Code">
|
|
64
|
+
<Button onPress={() => void api.ui.openAssistant("Help with this resource.")}>Open assistant</Button>
|
|
65
|
+
</Section>
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import { defineAction } from "@octonodes/ui-extensions";
|
|
72
|
+
export default defineAction("node.action", async (api) => {
|
|
73
|
+
if (!api.signal.aborted) await api.ui.openAssistant(`Explain node ${api.context.nodeId}`);
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The target context contains resource IDs, revisions, selection ranges, and bounded
|
|
78
|
+
metadata batches, never automatic document/file/task bodies. `ui.openPanel`
|
|
79
|
+
opens an own declared view; `ui.openAssistant` hands off to the existing native
|
|
80
|
+
assistant and its authorized tools. `tabs.list/update/undo` operate on registered
|
|
81
|
+
personal layout groups with revision checks. `edits.propose` opens native review
|
|
82
|
+
for a captured file/document draft; native Save owns persistence. Mutating host
|
|
83
|
+
commands require recent native user interaction. No raw filesystem/process or
|
|
84
|
+
private Studio API access is granted.
|
|
85
|
+
|
|
86
|
+
Node views and task badges return display-only sections named for captured IDs,
|
|
87
|
+
using one sandbox per canvas/task view and at most 100 resources. Other views can
|
|
88
|
+
use host-owned controls. An action has a captured invocation ID and abort signal;
|
|
89
|
+
it completes automatically and has a sixty-second deadline. Legacy node input
|
|
90
|
+
extensions still use protocol v1; native app contributions use protocol v2.
|
|
91
|
+
|
|
92
|
+
The full target catalog, runnable example, permissions, limits, and actual native
|
|
93
|
+
screenshots are in the engine's native extensions guide (`docs/app-extensions/README.md` in the engine checkout).
|
|
94
|
+
When using a local engine checkout, open `docs/app-extensions/README.md` for the
|
|
95
|
+
branch version. The older examples below describe the separate v1/v2 contracts.
|
|
96
|
+
|
|
44
97
|
## Extension-only apps
|
|
45
98
|
|
|
46
99
|
Apps can contribute only a workspace block; a page and backend are optional. Use the same
|
|
@@ -57,9 +110,9 @@ See `examples/workspace-notice-app` and `docs/plugins.md` in the engine reposito
|
|
|
57
110
|
|
|
58
111
|
## Self-hosted apps
|
|
59
112
|
|
|
60
|
-
This is also the SDK selected for Octonode's developer-authored app extensions. The engine owns its source in `packages/ui-extensions`; `scripts/sync
|
|
113
|
+
This is also the SDK selected for Octonode's developer-authored app extensions. The engine owns its source in `packages/ui-extensions`; `scripts/sync/plugin/sdk.mjs` synchronizes the public package into `octonode-devtools`. Do not create a second app UI SDK.
|
|
61
114
|
|
|
62
|
-
|
|
115
|
+
Legacy self-hosted app targets are `app.page` and `workspace.block`. Register an app in Partner → Apps, publish its HTTPS application URL and extension bundle digests, then install it from Studio → App marketplace. Plugin marketplace remains dedicated to executable node plugins.
|
|
63
116
|
|
|
64
117
|
App controls use the same host design system: `NodeForm`, `Section`, `Button`, and `TextField`. `InputField` is only for node inspectors. Bundle your entry as a browser IIFE, including React and this SDK, and call `startExtension`:
|
|
65
118
|
|
|
@@ -102,7 +155,51 @@ Host the compiled JavaScript with CORS enabled for the Studio origin. Hash the e
|
|
|
102
155
|
|
|
103
156
|
The five-minute `octo_app_` bearer is specific to the app installation, approved version, and opening user. Your backend must verify it on **every request** with `GET https://octonodes.com/api/apps/runtime/session`, then check that the returned `appId` equals your registered app ID. Use the verified workspace/user identity rather than values supplied by the browser. Never log the bearer or cache verification. Uninstall, consent changes, session expiry, and removed membership revoke subsequent access.
|
|
104
157
|
|
|
105
|
-
|
|
158
|
+
## Hosted pages and routing
|
|
159
|
+
|
|
160
|
+
Use `connectHostedApp()` once when the page mounts, subscribe to its snapshot, and
|
|
161
|
+
call `dispose()` on unmount. Studio displays the hosted page inline and delivers
|
|
162
|
+
short-lived sessions through an origin-checked, window-bound handshake. Tokens stay
|
|
163
|
+
in memory. `app.fetch("/api/projects")` sends the bearer only to your own backend;
|
|
164
|
+
that backend must still verify it with `connectAppServer` on every request.
|
|
165
|
+
|
|
166
|
+
For React apps, wrap the workspace UI in `OctonodeAppProvider` from
|
|
167
|
+
`@octonodes/ui-extensions/app/react`. It verifies `/api/context` before rendering
|
|
168
|
+
children. Pass every page route in `navigation`, including the overview (`/`), to
|
|
169
|
+
display them in Studio's app sidebar. Studio does not discover routes from your
|
|
170
|
+
hosting provider or browser router. An app can render its own top navbar inside
|
|
171
|
+
the provider; this does not replace sidebar registration. The generated React
|
|
172
|
+
app keeps its navbar off by default; render `<App showNavbar />` to enable it.
|
|
173
|
+
The generated server verifies this route with `connectAppServer`. A direct visit
|
|
174
|
+
without a session shows a translated access landing screen and no workspace UI.
|
|
175
|
+
The provider also shows connecting, expired-session, and verification-error states.
|
|
176
|
+
Customizing this UI does not replace backend session and installation checks.
|
|
177
|
+
|
|
178
|
+
In the Octonode source checkout, preview the screen with
|
|
179
|
+
`yarn workspace @octonode/ui-extensions dev` on port 5185, then open `/dev/` in your browser.
|
|
180
|
+
Use `?state=expired`, `?state=connecting`, or `?state=error` to preview the other states.
|
|
181
|
+
With that preview running, run `node --test packages/ui-extensions/tests/app/access.test.mjs`
|
|
182
|
+
to check mobile reflow, private-content protection, and recovery after a refreshed token.
|
|
183
|
+
|
|
184
|
+
```ts
|
|
185
|
+
import { connectHostedApp } from "@octonodes/ui-extensions/app";
|
|
186
|
+
const app = connectHostedApp();
|
|
187
|
+
const unsubscribe = app.subscribe(() => render(app.getSnapshot()));
|
|
188
|
+
app.navigate("/products?sort=name");
|
|
189
|
+
// On unmount: unsubscribe(); app.dispose();
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Normal `history.pushState`, `replaceState`, and back/forward navigation work with
|
|
193
|
+
browser routers. Embedded paths appear in Studio’s `appPath` query parameter;
|
|
194
|
+
standalone pages use their own URL. Serve your app shell for nested page routes.
|
|
195
|
+
Do not use Studio’s `/studio/apps/...` path as your app router basename.
|
|
196
|
+
|
|
197
|
+
Development starts with zero data grants. Explicit administrator consent selects
|
|
198
|
+
actions and projects for one hour; heartbeats extend only the ten-minute idle
|
|
199
|
+
session, not the consent. Source edits on the same host retain consent; host or
|
|
200
|
+
action changes clear it. See the [development guide](https://playbook.octonodes.com/docs/apps/development).
|
|
201
|
+
|
|
202
|
+
The hosted page's HTML and static assets must be loadable before the iframe session handoff. Keep private workspace content behind the provider and private backend routes behind bearer verification. App backends can use `POST /api/apps/runtime/data` for consented project/table/row operations, and `POST /api/apps/runtime/executions` on the cloud gateway for workflow execution. Neither credential works as a general Octonode login. See the engine’s `docs/plugins.md` for request examples.
|
|
106
203
|
|
|
107
204
|
For legacy self-hosted v1 apps, developers host app backends and versioned extension assets themselves. Octonode-managed app hosting is reserved for a future paid service. App release metadata pins extension URLs and SHA-256 digests; publishing metadata does not deploy a backend.
|
|
108
205
|
|
|
@@ -139,9 +236,9 @@ The backend helper verifies the bearer on each `connectAppServer` call and uses
|
|
|
139
236
|
## End-to-end app guides
|
|
140
237
|
|
|
141
238
|
The public Playbook is the source for the complete authoring path:
|
|
142
|
-
[quickstart](https://playbook.octonodes.com/docs/apps
|
|
143
|
-
[project configuration](https://playbook.octonodes.com/docs/apps
|
|
144
|
-
[SDK imports and permissions](https://playbook.octonodes.com/docs/apps
|
|
145
|
-
[hosting](https://playbook.octonodes.com/docs/apps
|
|
146
|
-
[publishing and updates](https://playbook.octonodes.com/docs/apps
|
|
239
|
+
[quickstart](https://playbook.octonodes.com/docs/apps/quickstart),
|
|
240
|
+
[project configuration](https://playbook.octonodes.com/docs/apps/configuration),
|
|
241
|
+
[SDK imports and permissions](https://playbook.octonodes.com/docs/apps/sdk),
|
|
242
|
+
[hosting](https://playbook.octonodes.com/docs/apps/hosting), and
|
|
243
|
+
[publishing and updates](https://playbook.octonodes.com/docs/apps/publishing).
|
|
147
244
|
The CLI scaffold supplies a runnable extension-only or full app example.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppAccessScreen.d.ts","sourceRoot":"","sources":["../../../../src/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,+BA+I/D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
// Generated from packages/ui-extensions/src/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.tsx. Do not edit; run the Octonode SDK sync.
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { locales } from "../../../locales/index.js";
|
|
5
|
+
import { ACCESS_SCREEN_CSS, OCTONODE_LOGO } from "./constants.js";
|
|
6
|
+
export function AppAccessScreen({ status }) {
|
|
7
|
+
const [language, setLanguage] = useState("en");
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const lang = (document.documentElement.lang || navigator.language).split("-")[0];
|
|
10
|
+
if (Object.prototype.hasOwnProperty.call(locales, lang))
|
|
11
|
+
setLanguage(lang);
|
|
12
|
+
}, []);
|
|
13
|
+
const t = locales[language];
|
|
14
|
+
const connecting = status === "connecting";
|
|
15
|
+
return (_jsxs("div", { className: `octo-access octo-access-${status}`, lang: language, children: [_jsx("style", { children: ACCESS_SCREEN_CSS }), _jsxs("header", { className: "octo-access-header", children: [_jsxs("a", { className: "octo-access-brand", href: "https://octonodes.com", target: "_blank", rel: "noopener noreferrer", children: [_jsx("img", { src: OCTONODE_LOGO, alt: "" }), "octonode"] }), _jsxs("a", { className: "octo-access-guide", href: "https://playbook.octonodes.com/docs/apps", target: "_blank", rel: "noopener noreferrer", children: [t.guide, _jsx("span", { "aria-hidden": "true", children: "\u2197" })] })] }), _jsxs("main", { className: "octo-access-main", children: [_jsxs("section", { className: "octo-access-copy", "aria-labelledby": "octo-access-title", children: [_jsxs("p", { className: "octo-access-status", role: status === "expired" || status === "error" ? "alert" : "status", children: [_jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.7", "aria-hidden": "true", children: connecting ? (_jsx("path", { d: "M20 12a8 8 0 1 1-8-8" })) : (_jsxs(_Fragment, { children: [_jsx("rect", { x: "6", y: "10", width: "12", height: "10", rx: "2" }), _jsx("path", { d: "M9 10V7a3 3 0 0 1 6 0v3" })] })) }), t[`${status}Status`]] }), _jsx("h1", { id: "octo-access-title", children: t[`${status}Title`] }), _jsx("p", { className: "octo-access-description", children: t[`${status}Description`] }), !connecting && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "octo-access-actions", children: [_jsxs("a", { className: "octo-access-primary", href: "https://octonodes.com/studio", target: "_blank", rel: "noopener noreferrer", children: [t.open, _jsx("span", { "aria-hidden": "true", children: "\u2197" })] }), _jsx("a", { className: "octo-access-secondary", href: "https://playbook.octonodes.com/docs/apps", target: "_blank", rel: "noopener noreferrer", children: t.about })] }), _jsxs("p", { className: "octo-access-hint", children: [_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: [_jsx("path", { d: "m12 3 8 3v6c0 5-8 9-8 9s-8-4-8-9V6Z" }), _jsx("path", { d: "m8 12 3 3 5-6" })] }), t.hint] })] }))] }), _jsxs("div", { className: "octo-access-visual", "aria-hidden": "true", children: [_jsx("div", { className: "octo-access-orbit" }), _jsxs("div", { className: "octo-access-workspace", children: [_jsxs("div", { className: "octo-access-window", children: [_jsx("i", {}), _jsx("i", {}), _jsx("i", {}), _jsx("span", { children: "octonode / workspace" }), _jsx("b", {})] }), _jsxs("div", { className: "octo-access-body", children: [_jsxs("div", { className: "octo-access-workspace-title", children: [_jsx("img", { src: OCTONODE_LOGO, alt: "" }), t.workspace] }), _jsx("div", { className: "octo-access-skeleton" }), _jsxs("div", { className: "octo-access-flow", children: [_jsx("div", { className: "octo-access-node", children: _jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("rect", { x: "3", y: "3", width: "7", height: "7", rx: "2" }), _jsx("rect", { x: "14", y: "3", width: "7", height: "7", rx: "2" }), _jsx("rect", { x: "3", y: "14", width: "7", height: "7", rx: "2" }), _jsx("rect", { x: "14", y: "14", width: "7", height: "7", rx: "2" })] }) }), _jsx("div", { className: "octo-access-wire" }), _jsx("div", { className: "octo-access-node active", children: _jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("path", { d: "m12 3 8 5v8l-8 5-8-5V8Z" }), _jsx("path", { d: "m4 8 8 5 8-5M12 13v8" })] }) }), _jsx("div", { className: "octo-access-wire" }), _jsx("div", { className: "octo-access-node", children: _jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("ellipse", { cx: "12", cy: "5", rx: "8", ry: "3" }), _jsx("path", { d: "M4 5v14c0 4 16 4 16 0V5M4 12c0 4 16 4 16 0" })] }) })] }), _jsxs("div", { className: "octo-access-placeholder", children: [_jsx("i", {}), _jsx("i", {})] }), _jsxs("div", { className: "octo-access-placeholder", children: [_jsx("i", {}), _jsx("i", {})] })] })] }), _jsx("div", { className: "octo-access-lock", children: _jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("rect", { x: "5", y: "10", width: "14", height: "11", rx: "3" }), _jsx("path", { d: "M8 10V7a4 4 0 0 1 8 0v3M12 14v3" })] }) }), _jsx("p", { className: "octo-access-caption", children: t.caption })] })] }), _jsxs("footer", { className: "octo-access-footer", children: [_jsx("p", { children: t.footer }), _jsx("a", { href: "https://playbook.octonodes.com/docs/apps", target: "_blank", rel: "noopener noreferrer", children: t.help })] })] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=AppAccessScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppAccessScreen.js","sourceRoot":"","sources":["../../../../src/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.tsx"],"names":[],"mappings":";AAAA,iJAAiJ;AACjJ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGlE,MAAM,UAAU,eAAe,CAAC,EAAE,MAAM,EAAwB;IAC9D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AAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppAccessScreen.types.d.ts","sourceRoot":"","sources":["../../../../src/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,CAAC;CAC3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppAccessScreen.types.js","sourceRoot":"","sources":["../../../../src/app/OctonodeAppProvider/AppAccessScreen/AppAccessScreen.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const ACCESS_SCREEN_CSS = "\n.octo-access{--octo-ink:#252536;--octo-muted:#636374;--octo-coral:#ff765f;box-sizing:border-box;min-height:100svh;background:#f7f8fc;color:var(--octo-ink);font-family:\"Avenir Next\",Avenir,\"Segoe UI\",sans-serif;font-size:16px;line-height:1.5;padding:0 48px;isolation:isolate}\n.octo-access *{box-sizing:border-box}.octo-access a{color:inherit;text-decoration:none}.octo-access a:focus-visible{outline:3px solid #af3e29;outline-offset:5px}.octo-access a:hover{text-decoration:underline}\n.octo-access-header,.octo-access-footer{max-width:1120px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:24px}.octo-access-header{height:100px;border-bottom:1px solid #e3e5ee}.octo-access-brand{display:flex;align-items:center;gap:10px;font-size:23px;font-weight:750;letter-spacing:-1px}.octo-access-brand img{width:36px;height:36px}.octo-access a.octo-access-guide{font-size:14px;color:var(--octo-muted);display:flex;align-items:center;gap:8px}\n.octo-access-main{max-width:1120px;min-height:calc(100svh - 185px);margin:auto;display:grid;grid-template-columns:1.05fr 1fr;align-items:center;gap:70px;padding:72px 0}.octo-access-copy{max-width:520px}.octo-access-status{display:inline-flex;align-items:center;gap:8px;margin:0 0 24px;padding:6px 11px;border:1px solid #dedeea;background:#eeeff6;border-radius:6px;font-size:12px;font-weight:600;color:#515164}.octo-access-status svg{width:14px;height:14px}.octo-access h1{margin:0;font-size:clamp(40px,4.3vw,62px);font-weight:650;letter-spacing:-2.8px;line-height:1.09;text-wrap:balance}.octo-access-description{max-width:430px;margin:24px 0 30px;font-size:17px;line-height:1.75;color:var(--octo-muted)}.octo-access-actions{display:flex;align-items:center;gap:23px;flex-wrap:wrap}.octo-access a.octo-access-primary{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:50px;padding:13px 21px;border-radius:9px;background:var(--octo-ink);color:#fff;font-size:14px;font-weight:650;box-shadow:0 4px 0 #25253612}.octo-access a.octo-access-primary:hover{background:#404056;text-decoration:none}.octo-access-secondary{font-size:14px;font-weight:600}.octo-access-hint{display:flex;align-items:flex-start;gap:9px;max-width:415px;margin:27px 0 0;color:var(--octo-muted);font-size:12px;line-height:1.65}.octo-access-hint svg{flex:none;width:15px;height:15px;margin-top:2px}\n.octo-access-visual{position:relative;aspect-ratio:1;display:grid;place-items:center}.octo-access-orbit{position:absolute;width:87%;aspect-ratio:1;border:1px solid #dfe2ee;border-radius:50%}.octo-access-orbit::before{content:\"\";position:absolute;inset:42px;border:1px dashed #dfe2ee;border-radius:50%}.octo-access-orbit::after{content:\"\";position:absolute;width:10px;height:10px;border-radius:50%;background:#b2b7cf;top:13%;left:13%;box-shadow:285px 240px 0 #ffb7a8}.octo-access-workspace{position:relative;transform:rotate(-5deg);width:90%;max-width:405px;background:#fff;border:1px solid #dee1ed;border-radius:14px;box-shadow:0 24px 65px #373e6510;overflow:hidden}.octo-access-window{height:39px;border-bottom:1px solid #eceef4;display:flex;align-items:center;gap:5px;padding:0 16px;background:#fafbfe}.octo-access-window i{width:6px;height:6px;border-radius:50%;background:#d3d7e3}.octo-access-window span{margin:auto;color:#888d9f;font-size:10px}.octo-access-window b{width:22px}.octo-access-body{padding:25px 24px 22px}.octo-access-workspace-title{font-size:13px;font-weight:650;display:flex;align-items:center;gap:9px}.octo-access-workspace-title img{width:23px;height:23px;border-radius:6px}.octo-access-skeleton{height:6px;width:42%;margin-top:11px;border-radius:3px;background:#eceef5}.octo-access-flow{display:flex;align-items:center;margin:29px 0}.octo-access-node{width:62px;height:61px;display:grid;place-items:center;background:#f4f5fa;border:1px solid #e1e4ef;border-radius:11px}.octo-access-node svg{width:23px;height:23px;color:#9ca3bc}.octo-access-node.active{background:#fff0eb;border-color:#ffc4b7}.octo-access-node.active svg{color:#bd4832}.octo-access-wire{height:1px;background:#d9ddec;flex:1}.octo-access-placeholder{display:flex;gap:8px;margin-top:12px}.octo-access-placeholder i{height:6px;width:35%;border-radius:3px;background:#eceef5}.octo-access-placeholder i+ i{width:20%}.octo-access-lock{position:absolute;bottom:10%;right:0;width:76px;height:76px;display:grid;place-items:center;border:7px solid #f7f8fc;border-radius:22px;background:#fff0eb;transform:rotate(7deg);box-shadow:0 8px 25px #373e650a}.octo-access-lock svg{width:29px;height:29px;color:#bd4832}.octo-access-caption{position:absolute;bottom:0;margin:0;font-size:12px;color:#73788e;text-align:center}\n.octo-access-footer{min-height:85px;border-top:1px solid #e3e5ee;color:#737383;font-size:12px}.octo-access-footer p{margin:0}.octo-access-footer a{padding:10px 0}.octo-access-connecting .octo-access-status svg{animation:octo-turn 2s linear infinite}@keyframes octo-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.octo-access-connecting .octo-access-status svg{animation:none}}\n@media(max-width:850px){.octo-access{padding:0 28px}.octo-access-main{gap:25px}.octo-access h1{font-size:44px}.octo-access-visual{min-width:0}.octo-access-body{padding:18px}.octo-access-orbit::after{box-shadow:none}}@media(max-width:650px){.octo-access{padding:0 24px}.octo-access-header{height:80px}.octo-access-brand{font-size:21px}.octo-access-main{grid-template-columns:1fr;gap:45px;padding:48px 0 40px}.octo-access-copy{max-width:480px}.octo-access h1{font-size:clamp(38px,8vw,46px);letter-spacing:-2px}.octo-access-description{font-size:16px}.octo-access-visual{width:100%;max-width:390px;margin:auto;aspect-ratio:auto;min-height:340px;padding-bottom:40px}.octo-access-footer{align-items:flex-start;padding:22px 0;min-height:80px;font-size:11px}.octo-access a.octo-access-guide{font-size:12px}.octo-access-caption{font-size:11px}.octo-access-lock{right:4%}}\n";
|
|
2
|
+
export declare const OCTONODE_LOGO: string;
|
|
3
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/app/OctonodeAppProvider/AppAccessScreen/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,8yLAQ7B,CAAC;AACF,eAAO,MAAM,aAAa,QAIvB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated from packages/ui-extensions/src/app/OctonodeAppProvider/AppAccessScreen/constants.ts. Do not edit; run the Octonode SDK sync.
|
|
2
|
+
// Inline, scoped styles keep the public React SDK independent of host CSS and asset loaders.
|
|
3
|
+
export const ACCESS_SCREEN_CSS = `
|
|
4
|
+
.octo-access{--octo-ink:#252536;--octo-muted:#636374;--octo-coral:#ff765f;box-sizing:border-box;min-height:100svh;background:#f7f8fc;color:var(--octo-ink);font-family:"Avenir Next",Avenir,"Segoe UI",sans-serif;font-size:16px;line-height:1.5;padding:0 48px;isolation:isolate}
|
|
5
|
+
.octo-access *{box-sizing:border-box}.octo-access a{color:inherit;text-decoration:none}.octo-access a:focus-visible{outline:3px solid #af3e29;outline-offset:5px}.octo-access a:hover{text-decoration:underline}
|
|
6
|
+
.octo-access-header,.octo-access-footer{max-width:1120px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:24px}.octo-access-header{height:100px;border-bottom:1px solid #e3e5ee}.octo-access-brand{display:flex;align-items:center;gap:10px;font-size:23px;font-weight:750;letter-spacing:-1px}.octo-access-brand img{width:36px;height:36px}.octo-access a.octo-access-guide{font-size:14px;color:var(--octo-muted);display:flex;align-items:center;gap:8px}
|
|
7
|
+
.octo-access-main{max-width:1120px;min-height:calc(100svh - 185px);margin:auto;display:grid;grid-template-columns:1.05fr 1fr;align-items:center;gap:70px;padding:72px 0}.octo-access-copy{max-width:520px}.octo-access-status{display:inline-flex;align-items:center;gap:8px;margin:0 0 24px;padding:6px 11px;border:1px solid #dedeea;background:#eeeff6;border-radius:6px;font-size:12px;font-weight:600;color:#515164}.octo-access-status svg{width:14px;height:14px}.octo-access h1{margin:0;font-size:clamp(40px,4.3vw,62px);font-weight:650;letter-spacing:-2.8px;line-height:1.09;text-wrap:balance}.octo-access-description{max-width:430px;margin:24px 0 30px;font-size:17px;line-height:1.75;color:var(--octo-muted)}.octo-access-actions{display:flex;align-items:center;gap:23px;flex-wrap:wrap}.octo-access a.octo-access-primary{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:50px;padding:13px 21px;border-radius:9px;background:var(--octo-ink);color:#fff;font-size:14px;font-weight:650;box-shadow:0 4px 0 #25253612}.octo-access a.octo-access-primary:hover{background:#404056;text-decoration:none}.octo-access-secondary{font-size:14px;font-weight:600}.octo-access-hint{display:flex;align-items:flex-start;gap:9px;max-width:415px;margin:27px 0 0;color:var(--octo-muted);font-size:12px;line-height:1.65}.octo-access-hint svg{flex:none;width:15px;height:15px;margin-top:2px}
|
|
8
|
+
.octo-access-visual{position:relative;aspect-ratio:1;display:grid;place-items:center}.octo-access-orbit{position:absolute;width:87%;aspect-ratio:1;border:1px solid #dfe2ee;border-radius:50%}.octo-access-orbit::before{content:"";position:absolute;inset:42px;border:1px dashed #dfe2ee;border-radius:50%}.octo-access-orbit::after{content:"";position:absolute;width:10px;height:10px;border-radius:50%;background:#b2b7cf;top:13%;left:13%;box-shadow:285px 240px 0 #ffb7a8}.octo-access-workspace{position:relative;transform:rotate(-5deg);width:90%;max-width:405px;background:#fff;border:1px solid #dee1ed;border-radius:14px;box-shadow:0 24px 65px #373e6510;overflow:hidden}.octo-access-window{height:39px;border-bottom:1px solid #eceef4;display:flex;align-items:center;gap:5px;padding:0 16px;background:#fafbfe}.octo-access-window i{width:6px;height:6px;border-radius:50%;background:#d3d7e3}.octo-access-window span{margin:auto;color:#888d9f;font-size:10px}.octo-access-window b{width:22px}.octo-access-body{padding:25px 24px 22px}.octo-access-workspace-title{font-size:13px;font-weight:650;display:flex;align-items:center;gap:9px}.octo-access-workspace-title img{width:23px;height:23px;border-radius:6px}.octo-access-skeleton{height:6px;width:42%;margin-top:11px;border-radius:3px;background:#eceef5}.octo-access-flow{display:flex;align-items:center;margin:29px 0}.octo-access-node{width:62px;height:61px;display:grid;place-items:center;background:#f4f5fa;border:1px solid #e1e4ef;border-radius:11px}.octo-access-node svg{width:23px;height:23px;color:#9ca3bc}.octo-access-node.active{background:#fff0eb;border-color:#ffc4b7}.octo-access-node.active svg{color:#bd4832}.octo-access-wire{height:1px;background:#d9ddec;flex:1}.octo-access-placeholder{display:flex;gap:8px;margin-top:12px}.octo-access-placeholder i{height:6px;width:35%;border-radius:3px;background:#eceef5}.octo-access-placeholder i+ i{width:20%}.octo-access-lock{position:absolute;bottom:10%;right:0;width:76px;height:76px;display:grid;place-items:center;border:7px solid #f7f8fc;border-radius:22px;background:#fff0eb;transform:rotate(7deg);box-shadow:0 8px 25px #373e650a}.octo-access-lock svg{width:29px;height:29px;color:#bd4832}.octo-access-caption{position:absolute;bottom:0;margin:0;font-size:12px;color:#73788e;text-align:center}
|
|
9
|
+
.octo-access-footer{min-height:85px;border-top:1px solid #e3e5ee;color:#737383;font-size:12px}.octo-access-footer p{margin:0}.octo-access-footer a{padding:10px 0}.octo-access-connecting .octo-access-status svg{animation:octo-turn 2s linear infinite}@keyframes octo-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.octo-access-connecting .octo-access-status svg{animation:none}}
|
|
10
|
+
@media(max-width:850px){.octo-access{padding:0 28px}.octo-access-main{gap:25px}.octo-access h1{font-size:44px}.octo-access-visual{min-width:0}.octo-access-body{padding:18px}.octo-access-orbit::after{box-shadow:none}}@media(max-width:650px){.octo-access{padding:0 24px}.octo-access-header{height:80px}.octo-access-brand{font-size:21px}.octo-access-main{grid-template-columns:1fr;gap:45px;padding:48px 0 40px}.octo-access-copy{max-width:480px}.octo-access h1{font-size:clamp(38px,8vw,46px);letter-spacing:-2px}.octo-access-description{font-size:16px}.octo-access-visual{width:100%;max-width:390px;margin:auto;aspect-ratio:auto;min-height:340px;padding-bottom:40px}.octo-access-footer{align-items:flex-start;padding:22px 0;min-height:80px;font-size:11px}.octo-access a.octo-access-guide{font-size:12px}.octo-access-caption{font-size:11px}.octo-access-lock{right:4%}}
|
|
11
|
+
`;
|
|
12
|
+
export const OCTONODE_LOGO = "data:image/svg+xml," +
|
|
13
|
+
encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">\n <title>Octonode</title>\n <rect width="64" height="64" rx="16" fill="#181721"/>\n <path d="M24 10h16l14 14v16L40 54H24L10 40V24Z" stroke="#FF765F" stroke-linejoin="round" stroke-width="3.5"/>\n <path d="m21 24 11 8 11-8M32 32v13" stroke="#FF765F" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>\n <g fill="#FF765F"><circle cx="21" cy="24" r="3"/><circle cx="43" cy="24" r="3"/><circle cx="32" cy="32" r="4"/><circle cx="32" cy="45" r="3"/></g>\n</svg>\n');
|
|
14
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/app/OctonodeAppProvider/AppAccessScreen/constants.ts"],"names":[],"mappings":"AAAA,0IAA0I;AAC1I,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;CAQhC,CAAC;AACF,MAAM,CAAC,MAAM,aAAa,GACxB,qBAAqB;IACrB,kBAAkB,CAChB,yiBAAyiB,CAC1iB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app/OctonodeAppProvider/AppAccessScreen/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app/OctonodeAppProvider/AppAccessScreen/index.ts"],"names":[],"mappings":"AAAA,sIAAsI;AACtI,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OctonodeAppContext, OctonodeAppProviderProps } from "./OctonodeAppProvider.types.js";
|
|
2
|
+
/** Render app content only after the hosted backend verifies the workspace session. */
|
|
3
|
+
export declare function OctonodeAppProvider({ children, navigation }: OctonodeAppProviderProps): import("react").JSX.Element;
|
|
4
|
+
export declare function useOctonodeApp(): OctonodeAppContext;
|
|
5
|
+
//# sourceMappingURL=OctonodeAppProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OctonodeAppProvider.d.ts","sourceRoot":"","sources":["../../../src/app/OctonodeAppProvider/OctonodeAppProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAKnG,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,UAA8B,EAAE,EAAE,wBAAwB,+BAoDzG;AAED,wBAAgB,cAAc,IAAI,kBAAkB,CAInD"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Generated from packages/ui-extensions/src/app/OctonodeAppProvider/OctonodeAppProvider.tsx. Do not edit; run the Octonode SDK sync.
|
|
3
|
+
import { createContext, useContext, useEffect, useState } from "react";
|
|
4
|
+
import { AppAccessScreen } from "./AppAccessScreen/index.js";
|
|
5
|
+
import { connectHostedApp } from "../hosted.js";
|
|
6
|
+
const Context = createContext(null);
|
|
7
|
+
const defaultNavigation = [];
|
|
8
|
+
/** Render app content only after the hosted backend verifies the workspace session. */
|
|
9
|
+
export function OctonodeAppProvider({ children, navigation = defaultNavigation }) {
|
|
10
|
+
const [bridge, setBridge] = useState();
|
|
11
|
+
const [session, setSession] = useState();
|
|
12
|
+
const [verified, setVerified] = useState();
|
|
13
|
+
const [error, setError] = useState(false);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
try {
|
|
16
|
+
const app = connectHostedApp();
|
|
17
|
+
setBridge(app);
|
|
18
|
+
setSession(app.getSnapshot());
|
|
19
|
+
const unsubscribe = app.subscribe(() => setSession(app.getSnapshot()));
|
|
20
|
+
return () => {
|
|
21
|
+
unsubscribe();
|
|
22
|
+
app.dispose();
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
setError(true);
|
|
27
|
+
}
|
|
28
|
+
}, []);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
bridge?.setNavigation(navigation);
|
|
31
|
+
}, [bridge, navigation]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (!bridge || session?.status !== "ready" || !session.token)
|
|
34
|
+
return;
|
|
35
|
+
const token = session.token;
|
|
36
|
+
const controller = new AbortController();
|
|
37
|
+
bridge
|
|
38
|
+
.fetch("/api/context", { signal: controller.signal })
|
|
39
|
+
.then(async (response) => {
|
|
40
|
+
if (!response.ok)
|
|
41
|
+
throw new Error("Workspace access could not be verified");
|
|
42
|
+
const context = (await response.json());
|
|
43
|
+
if (!context.workspace?.kind || !context.workspace.id)
|
|
44
|
+
throw new Error("Missing workspace scope");
|
|
45
|
+
if (!controller.signal.aborted) {
|
|
46
|
+
setVerified({ token, workspace: context.workspace });
|
|
47
|
+
setError(false);
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
.catch(() => {
|
|
51
|
+
if (!controller.signal.aborted)
|
|
52
|
+
setError(true);
|
|
53
|
+
});
|
|
54
|
+
return () => controller.abort();
|
|
55
|
+
}, [bridge, session?.status, session?.token]);
|
|
56
|
+
if (session?.status === "expired")
|
|
57
|
+
return _jsx(AppAccessScreen, { status: "expired" });
|
|
58
|
+
if (error)
|
|
59
|
+
return _jsx(AppAccessScreen, { status: "error" });
|
|
60
|
+
if (session?.status === "standalone")
|
|
61
|
+
return _jsx(AppAccessScreen, { status: "standalone" });
|
|
62
|
+
if (!bridge || !session || !verified || verified.token !== session.token)
|
|
63
|
+
return _jsx(AppAccessScreen, { status: "connecting" });
|
|
64
|
+
return _jsx(Context.Provider, { value: { bridge, session, workspace: verified.workspace }, children: children });
|
|
65
|
+
}
|
|
66
|
+
export function useOctonodeApp() {
|
|
67
|
+
const context = useContext(Context);
|
|
68
|
+
if (!context)
|
|
69
|
+
throw new Error("useOctonodeApp requires OctonodeAppProvider");
|
|
70
|
+
return context;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=OctonodeAppProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OctonodeAppProvider.js","sourceRoot":"","sources":["../../../src/app/OctonodeAppProvider/OctonodeAppProvider.tsx"],"names":[],"mappings":";AAAA,qIAAqI;AACrI,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIhD,MAAM,OAAO,GAAG,aAAa,CAA4B,IAAI,CAAC,CAAC;AAC/D,MAAM,iBAAiB,GAAwD,EAAE,CAAC;AAElF,uFAAuF;AACvF,MAAM,UAAU,mBAAmB,CAAC,EAAE,QAAQ,EAAE,UAAU,GAAG,iBAAiB,EAA4B;IACxG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,EAAa,CAAC;IAClD,MAAM,CAAC,OAAO,EAAE,UAAU,CA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,GAAG,CAAC;IACjD,OAAO,KAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,YAAG,QAAQ,GAAoB,CAAC;AACpH,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IAC7E,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { AppContext, HostedApp, HostedAppNavigationItem, HostedAppState } from "../types.js";
|
|
3
|
+
export type OctonodeAppProviderProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
navigation?: HostedAppNavigationItem[];
|
|
6
|
+
};
|
|
7
|
+
export type OctonodeAppContext = {
|
|
8
|
+
bridge: HostedApp;
|
|
9
|
+
session: HostedAppState;
|
|
10
|
+
workspace: AppContext["workspace"];
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=OctonodeAppProvider.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OctonodeAppProvider.types.d.ts","sourceRoot":"","sources":["../../../src/app/OctonodeAppProvider/OctonodeAppProvider.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElG,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,SAAS,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OctonodeAppProvider.types.js","sourceRoot":"","sources":["../../../src/app/OctonodeAppProvider/OctonodeAppProvider.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app/OctonodeAppProvider/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/E,YAAY,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/OctonodeAppProvider/index.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/app/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/app/constants.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,MAAM,mBAAmB,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HostedApp } from "./types.js";
|
|
2
|
+
/** Only app-relative routes may cross the Studio boundary. */
|
|
3
|
+
export declare function appRoute(value: unknown): string | null;
|
|
4
|
+
/** Browser history remains the router. The bridge mirrors it into the Studio URL. */
|
|
5
|
+
export declare function connectHostedApp(): HostedApp;
|
|
6
|
+
//# sourceMappingURL=hosted.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted.d.ts","sourceRoot":"","sources":["../../src/app/hosted.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAA2C,MAAM,YAAY,CAAC;AAGrF,8DAA8D;AAC9D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAWtD;AAED,qFAAqF;AACrF,wBAAgB,gBAAgB,IAAI,SAAS,CA6J5C"}
|