@cxxi-lab/hubbyware-sdk 3.2.0 → 3.2.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.2.0",
3
+ "version": "3.2.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.2.0: generated by app/scripts/emit-sdk-types.mjs from app/src/sdk — do not edit.
1
+ // @cxxi-lab/hubbyware-sdk 3.2.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
 
@@ -19,6 +19,19 @@ export type StreamEventHandler = (event: string, data: unknown) => void;
19
19
  * JSON-decoded data. Comments, empty blocks and undecodable data are skipped.
20
20
  */
21
21
  export declare function readEventStream(body: ReadableStream<Uint8Array>, onEvent: StreamEventHandler): Promise<void>;
22
+ /** A site's player scripts, served by the back (the web socle, Resources/<host>/). */
23
+ export interface PlayerScripts {
24
+ /** run on the video page (page mode) to isolate the player */
25
+ page: string | null;
26
+ /** run on a bare embed player (embed mode) */
27
+ embed: string | null;
28
+ pause: string | null;
29
+ }
30
+ export interface PlayerConfig {
31
+ /** the host whose scripts apply to the requested domain */
32
+ host: string;
33
+ scripts: PlayerScripts;
34
+ }
22
35
  /**
23
36
  * The platform contract: everything the shared UI needs from its host shell.
24
37
  *
@@ -700,37 +713,11 @@ export interface PaginatedResponse<T> {
700
713
  pages: number;
701
714
  };
702
715
  }
703
- export declare function ensureIntegrationForUrl(rawUrl: string): Promise<void>;
704
716
  /**
705
717
  * Sync probe — true if the domain has already been checked (positive or
706
718
  * negative). Lets call-sites skip the async await on hot paths.
707
719
  */
708
720
  export declare function isIntegrationKnownSync(rawUrl: string): boolean;
709
- /** A site's player scripts, served by the back (the web socle, Resources/<host>/). */
710
- export interface PlayerScripts {
711
- /** run on the video page (page mode) to isolate the player */
712
- page: string | null;
713
- /** run on a bare embed player (embed mode) */
714
- embed: string | null;
715
- pause: string | null;
716
- }
717
- export interface PlayerConfig {
718
- /** the host whose scripts apply to the requested domain */
719
- host: string;
720
- scripts: PlayerScripts;
721
- }
722
- /**
723
- * The player config for a domain, null when the back has no scripts for the
724
- * site (it is then loaded as-is). A failed lookup resolves null too, and is
725
- * retried next time.
726
- */
727
- export declare function getPlayerConfig(domain: string): Promise<PlayerConfig | null>;
728
- /**
729
- * Makes sure the shell holds the back's current player blocklist before a
730
- * player loads a site: once per session, a 304 when nothing changed. A failure
731
- * leaves the shell's previous list in place and is retried next time.
732
- */
733
- export declare function syncPlayerBlocklist(): Promise<void>;
734
721
  export type ButtonColor = "primary" | "secondary" | "danger";
735
722
  export interface ButtonProps {
736
723
  label?: ReactNode;
@@ -1010,6 +997,16 @@ export declare function api<T>(path: string, options?: RequestInit, retry?: bool
1010
997
  * body and carry the token — and resolves once the server closes it.
1011
998
  */
1012
999
  export declare function apiStream(path: string, options: RequestInit, onEvent: StreamEventHandler, retry?: boolean): Promise<void>;
1000
+ /** Applies the website integration (cookies, CDN referer) of a URL's site before a webview or the native player loads it. */
1001
+ export declare function ensureIntegrationForUrl(rawUrl: string): Promise<void>;
1002
+ /**
1003
+ * The player config for a domain, null when the back has no scripts for the
1004
+ * site (it is then loaded as-is). A failed lookup resolves null too, and is
1005
+ * retried next time.
1006
+ */
1007
+ export declare function getPlayerConfig(domain: string): Promise<PlayerConfig | null>;
1008
+ /** Makes sure the shell holds the back's current player blocklist before a player loads a site (once per session). */
1009
+ export declare function syncPlayerBlocklist(): Promise<void>;
1013
1010
 
1014
1011
  export {
1015
1012
  FormData$1 as FormData,
package/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "3.2.0",
2
+ "version": "3.2.1",
3
3
  "compatible": []
4
4
  }