@cxxi-lab/hubbyware-sdk 3.4.0 → 3.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cxxi-lab/hubbyware-sdk",
3
- "version": "3.4.0",
3
+ "version": "3.5.1",
4
4
  "description": "The contract of Hubbyware's hubbies: the SDK a hubby builds on (provided by the host app at run time), and the SDK of the hubbies running isolated in their frame. Formerly @cxxi-lab/hub-sdk.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // @cxxi-lab/hubbyware-sdk 3.4.0: generated by app/scripts/emit-sdk-types.mjs from app/src/sdk — do not edit.
1
+ // @cxxi-lab/hubbyware-sdk 3.5.1: generated by app/scripts/emit-sdk-types.mjs from app/src/sdk — do not edit.
2
2
  import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
3
3
  import { ComponentType, HTMLInputTypeAttribute, MouseEventHandler, ReactNode, TdHTMLAttributes, ThHTMLAttributes } from 'react';
4
4
 
@@ -357,6 +357,12 @@ export interface PlatformCapabilities {
357
357
  companion: boolean;
358
358
  /** integrated WireGuard tunnel controllable from the UI */
359
359
  vpn: boolean;
360
+ /**
361
+ * the tunnel carries only the webviews of the hubby using it (desktop: per session), the rest of
362
+ * the app going direct; false: it carries the whole app while it runs (Android: the WebView's
363
+ * proxy is the process's), so the hubby waits for it
364
+ */
365
+ vpnPerWebview?: boolean;
360
366
  /** hubbies hidden behind a reveal shortcut (Privacy) */
361
367
  privateMode: boolean;
362
368
  /** in-app self-update */
@@ -672,6 +678,13 @@ export interface HubbyInfo {
672
678
  requiresCapabilities?: string[];
673
679
  /** shared features (HubbySupport) */
674
680
  supports?: string[];
681
+ /**
682
+ * its way out (server docs/plan-reseau-vpn.md): `{"egress": "vpn"}`, its webviews and players
683
+ * through the user's VPN (the platform's 'vpn' support then; formerly `supports: ['vpn']`)
684
+ */
685
+ network?: {
686
+ egress?: string;
687
+ } | string;
675
688
  }
676
689
  export type Described = Pick<HubbyManifest, "label" | "description" | "local" | "requires" | "requiresCapabilities" | "supports">;
677
690
  /** The manifest's descriptive part, from its hubby.json (one source for both). */
@@ -1046,6 +1059,18 @@ export declare function apiStream(path: string, options: RequestInit, onEvent: S
1046
1059
  * The same for every path (`path`: kept for the hubbies passing it).
1047
1060
  */
1048
1061
  export declare function getApiBaseUrl(_path?: string): string;
1062
+ /**
1063
+ * The partition of the hubby's <webview>s (desktop): its own session, its sites' cookies and storage
1064
+ * apart from the other hubbies', going out through the VPN when it declares so (server
1065
+ * docs/plan-reseau-vpn.md). `<webview partition={webviewPartition} …>`. A webview outside its
1066
+ * hubby's partition is refused (an SDK imported without a hubby: none).
1067
+ */
1068
+ export declare const webviewPartition: string;
1069
+ /**
1070
+ * For a hubby going out through the VPN: whether its tunnel is up, so its webviews and players can
1071
+ * load (until then the shell blocks them: render them once this is true).
1072
+ */
1073
+ export declare function useTunnelReady(): boolean;
1049
1074
  /** Applies the website integration (cookies, CDN referer) of a URL's site before a webview or the native player loads it. */
1050
1075
  export declare function ensureIntegrationForUrl(rawUrl: string): Promise<void>;
1051
1076
  /**
package/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "3.4.0",
2
+ "version": "3.5.1",
3
3
  "compatible": []
4
4
  }