@xeonr/renderer-sdk 1.0.4

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { RendererClient } from '../client.js';
2
+ import type { RendererClientOptions } from '../client.js';
3
+ import type { RendererApiAdapter, RendererConfig, RendererScope, RenderingType } from '../types.js';
4
+ export interface UseRendererClientOptions extends RendererClientOptions {
5
+ }
6
+ export interface UseRendererClientResult {
7
+ /** Whether the host has sent the init message. */
8
+ connected: boolean;
9
+ /** What resource the renderer is scoped to. */
10
+ scope: RendererScope | null;
11
+ /** How the renderer is being displayed. */
12
+ renderingType: RenderingType | null;
13
+ /** The current integration access token. */
14
+ token: string | null;
15
+ /** Unix timestamp (ms) when the token expires. */
16
+ tokenExpiresAt: number | null;
17
+ /** The current host theme. */
18
+ theme: 'light' | 'dark';
19
+ /** The parsed config.json from the renderer archive. */
20
+ config: RendererConfig | null;
21
+ /** Which entrypoint was loaded (dashboard or portal). */
22
+ entrypoint: 'dashboard' | 'portal' | null;
23
+ /** Base URL for upl.im API calls. */
24
+ apiBaseUrl: string | null;
25
+ /** Pre-configured API adapter for use with `getUploadClientWithEnv()`. */
26
+ apiAdapter: RendererApiAdapter;
27
+ /** Current hash path within the renderer (e.g. '/settings'). Updated reactively on hash changes. */
28
+ path: string;
29
+ /** Request the host to open a specific upload. */
30
+ openUpload: (uploadId: string) => void;
31
+ /** Request a fresh integration access token. */
32
+ requestToken: () => void;
33
+ /** Request the host to close this renderer (modal mode). */
34
+ close: () => void;
35
+ /** The underlying RendererClient instance for advanced use. */
36
+ client: RendererClient;
37
+ }
38
+ /**
39
+ * React hook for building custom renderers.
40
+ *
41
+ * Creates a `RendererClient` instance, manages its lifecycle, and exposes
42
+ * reactive state that triggers re-renders when the host sends messages.
43
+ *
44
+ * ```tsx
45
+ * import { useRendererClient } from '@xeonr/renderer-sdk/react';
46
+ *
47
+ * function App() {
48
+ * const { connected, scope, renderingType, theme, token } = useRendererClient();
49
+ *
50
+ * if (!connected) return <div>Connecting...</div>;
51
+ *
52
+ * return (
53
+ * <div data-theme={theme}>
54
+ * <pre>{JSON.stringify(scope, null, 2)}</pre>
55
+ * </div>
56
+ * );
57
+ * }
58
+ * ```
59
+ */
60
+ export declare function useRendererClient(options?: UseRendererClientOptions): UseRendererClientResult;
61
+ //# sourceMappingURL=useRendererClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRendererClient.d.ts","sourceRoot":"","sources":["../../src/react/useRendererClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AAEjH,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;CAAG;AAE1E,MAAM,WAAW,uBAAuB;IACvC,kDAAkD;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,2CAA2C;IAC3C,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,kDAAkD;IAClD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,8BAA8B;IAC9B,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,wDAAwD;IACxD,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,yDAAyD;IACzD,UAAU,EAAE,WAAW,GAAG,QAAQ,GAAG,IAAI,CAAC;IAC1C,qCAAqC;IACrC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,0EAA0E;IAC1E,UAAU,EAAE,kBAAkB,CAAC;IAC/B,oGAAoG;IACpG,IAAI,EAAE,MAAM,CAAC;IAEb,kDAAkD;IAClD,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB,+DAA+D;IAC/D,MAAM,EAAE,cAAc,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,uBAAuB,CAgF7F"}
@@ -0,0 +1,96 @@
1
+ import { useState, useRef, useEffect, useMemo } from 'react';
2
+ import { RendererClient } from '../client.js';
3
+ /**
4
+ * React hook for building custom renderers.
5
+ *
6
+ * Creates a `RendererClient` instance, manages its lifecycle, and exposes
7
+ * reactive state that triggers re-renders when the host sends messages.
8
+ *
9
+ * ```tsx
10
+ * import { useRendererClient } from '@xeonr/renderer-sdk/react';
11
+ *
12
+ * function App() {
13
+ * const { connected, scope, renderingType, theme, token } = useRendererClient();
14
+ *
15
+ * if (!connected) return <div>Connecting...</div>;
16
+ *
17
+ * return (
18
+ * <div data-theme={theme}>
19
+ * <pre>{JSON.stringify(scope, null, 2)}</pre>
20
+ * </div>
21
+ * );
22
+ * }
23
+ * ```
24
+ */
25
+ export function useRendererClient(options) {
26
+ const clientRef = useRef(null);
27
+ // Lazy-init the client (only once)
28
+ if (clientRef.current === null) {
29
+ clientRef.current = new RendererClient(options);
30
+ }
31
+ const client = clientRef.current;
32
+ const [connected, setConnected] = useState(false);
33
+ const [scope, setScope] = useState(null);
34
+ const [renderingType, setRenderingType] = useState(null);
35
+ const [token, setToken] = useState(null);
36
+ const [tokenExpiresAt, setTokenExpiresAt] = useState(null);
37
+ const [theme, setTheme] = useState('light');
38
+ const [config, setConfig] = useState(null);
39
+ const [entrypoint, setEntrypoint] = useState(null);
40
+ const [apiBaseUrl, setApiBaseUrl] = useState(null);
41
+ const [path, setPath] = useState('/');
42
+ useEffect(() => {
43
+ const unsubInit = client.onInit((payload) => {
44
+ setConnected(true);
45
+ setScope(payload.scope);
46
+ setRenderingType(payload.renderingType);
47
+ setToken(payload.token);
48
+ setTokenExpiresAt(payload.tokenExpiresAt);
49
+ setTheme(payload.theme);
50
+ setConfig(payload.config);
51
+ setEntrypoint(payload.entrypoint);
52
+ setApiBaseUrl(payload.apiBaseUrl);
53
+ setPath(client.getPath());
54
+ document.documentElement.dataset.theme = payload.theme;
55
+ });
56
+ const unsubTheme = client.onThemeChange((newTheme) => {
57
+ setTheme(newTheme);
58
+ document.documentElement.dataset.theme = newTheme;
59
+ });
60
+ const unsubToken = client.onTokenRefresh((newToken, newExpiresAt) => {
61
+ setToken(newToken);
62
+ setTokenExpiresAt(newExpiresAt);
63
+ });
64
+ const unsubNavigate = client.onNavigate((newPath) => {
65
+ setPath(newPath);
66
+ });
67
+ return () => {
68
+ unsubInit();
69
+ unsubTheme();
70
+ unsubToken();
71
+ unsubNavigate();
72
+ client.destroy();
73
+ };
74
+ }, [client]);
75
+ const methods = useMemo(() => ({
76
+ openUpload: (uploadId) => client.openUpload(uploadId),
77
+ requestToken: () => client.requestToken(),
78
+ close: () => client.close(),
79
+ apiAdapter: client.getApiAdapter(),
80
+ }), [client]);
81
+ return {
82
+ connected,
83
+ scope,
84
+ renderingType,
85
+ token,
86
+ tokenExpiresAt,
87
+ theme,
88
+ config,
89
+ entrypoint,
90
+ apiBaseUrl,
91
+ path,
92
+ client,
93
+ ...methods,
94
+ };
95
+ }
96
+ //# sourceMappingURL=useRendererClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRendererClient.js","sourceRoot":"","sources":["../../src/react/useRendererClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ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AAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACX,SAAS,EAAE,CAAC;YACZ,UAAU,EAAE,CAAC;YACb,UAAU,EAAE,CAAC;YACb,aAAa,EAAE,CAAC;YAChB,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAC9B,UAAU,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC;QAC7D,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE;QACzC,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;QAC3B,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE;KAClC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEd,OAAO;QACN,SAAS;QACT,KAAK;QACL,aAAa;QACb,KAAK;QACL,cAAc;QACd,KAAK;QACL,MAAM;QACN,UAAU;QACV,UAAU;QACV,IAAI;QACJ,MAAM;QACN,GAAG,OAAO;KACV,CAAC;AACH,CAAC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * config.json schema — lives at the root of a renderer archive.
3
+ * Validated server-side on upload; provided to the renderer in the init message.
4
+ */
5
+ export interface RendererConfig {
6
+ version: 1;
7
+ /** Permissions the renderer requests from the host. */
8
+ permissions?: RendererPermission[];
9
+ sandbox?: {
10
+ allowPopups?: boolean;
11
+ allowForms?: boolean;
12
+ allowDownloads?: boolean;
13
+ };
14
+ }
15
+ export type RendererPermission = 'createFolder' | 'openUpload';
16
+ /**
17
+ * What resource the renderer is scoped to.
18
+ * Sent from host to iframe in the init message.
19
+ */
20
+ export type RendererScope = RendererBucketScope | RendererFolderScope | RendererUploadScope | RendererVirtualFileScope;
21
+ export interface RendererBucketScope {
22
+ type: 'bucket';
23
+ bucketId: string;
24
+ }
25
+ export interface RendererFolderScope {
26
+ type: 'folder';
27
+ bucketId: string;
28
+ folderId: string;
29
+ path: string;
30
+ }
31
+ export interface RendererUploadScope {
32
+ type: 'upload';
33
+ bucketId: string;
34
+ uploadId: string;
35
+ }
36
+ export interface RendererVirtualFileScope {
37
+ type: 'virtual-file';
38
+ bucketId: string;
39
+ folderId?: string;
40
+ path: string;
41
+ }
42
+ /**
43
+ * How the renderer is being displayed within the dashboard entrypoint.
44
+ * A single renderer may handle multiple rendering types.
45
+ */
46
+ export type RenderingType = 'bucket-renderer' | 'folder-renderer' | 'preview-modal';
47
+ /**
48
+ * API adapter compatible with `IUploadAdapterEnv` from `@xeonr/uploads-sdk`.
49
+ * Pass this to `getUploadClientWithEnv()` to get a pre-configured API client
50
+ * that handles authentication and token refresh automatically.
51
+ */
52
+ export interface RendererApiAdapter {
53
+ hostname?: string;
54
+ tokenHelper?: () => Promise<string | null>;
55
+ onAuthenticationExpired?: (retryCount: number) => Promise<boolean>;
56
+ onAuthenticationFailed?: () => Promise<any>;
57
+ }
58
+ /** Payload received by the renderer on initialization. */
59
+ export interface InitPayload {
60
+ /** Protocol version. */
61
+ version: 1;
62
+ /** Integration access token scoped to the integration's client. */
63
+ token: string;
64
+ /** Unix timestamp (ms) when the token expires. */
65
+ tokenExpiresAt: number;
66
+ /** Current host theme. */
67
+ theme: 'light' | 'dark';
68
+ /** Which entrypoint was loaded. */
69
+ entrypoint: 'dashboard' | 'portal';
70
+ /** What resource the renderer is scoped to. */
71
+ scope: RendererScope;
72
+ /** How the renderer is being displayed (dashboard only). */
73
+ renderingType: RenderingType;
74
+ /** Base URL for upl.im API calls. */
75
+ apiBaseUrl: string;
76
+ /** The parsed config.json from the renderer archive. */
77
+ config: RendererConfig;
78
+ /** Initial hash path to navigate to, derived from the host URL fragment. */
79
+ initialPath?: string;
80
+ }
81
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot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C3C,uBAAuB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5C;AAED,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC3B,wBAAwB;IACxB,OAAO,EAAE,CAAC,CAAC;IACX,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,cAAc,EAAE,MAAM,CAAC;IACvB,0BAA0B;IAC1B,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,mCAAmC;IACnC,UAAU,EAAE,WAAW,GAAG,QAAQ,CAAC;IACnC,+CAA+C;IAC/C,KAAK,EAAE,aAAa,CAAC;IACrB,4DAA4D;IAC5D,aAAa,EAAE,aAAa,CAAC;IAC7B,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,MAAM,EAAE,cAAc,CAAC;IACvB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@xeonr/renderer-sdk",
3
+ "version": "1.0.4",
4
+ "type": "module",
5
+ "license": "ISC",
6
+ "description": "SDK for building custom renderers for upl.im integrations",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "default": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./react": {
15
+ "default": "./dist/react/index.js",
16
+ "types": "./dist/react/index.d.ts"
17
+ },
18
+ "./protocol": {
19
+ "default": "./dist/protocol.js",
20
+ "types": "./dist/protocol.d.ts"
21
+ },
22
+ "./*": {
23
+ "default": "./dist/*.js",
24
+ "types": "./dist/*.d.ts"
25
+ }
26
+ },
27
+ "peerDependencies": {
28
+ "react": ">=18.0.0"
29
+ },
30
+ "peerDependenciesMeta": {
31
+ "react": {
32
+ "optional": true
33
+ }
34
+ },
35
+ "devDependencies": {
36
+ "@types/react": "^19.0.0",
37
+ "react": "^19.0.0",
38
+ "typescript": "^5.8.3"
39
+ },
40
+ "scripts": {
41
+ "build": "tsc"
42
+ }
43
+ }