@glomex/integration-web-component 1.1557.0 → 1.1562.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from '@turbo-player/integration-web-component';
2
- import type { SharedContext } from '@turbo-player/integration-web-component';
2
+ import type { HostContext } from '@turbo-player/integration-web-component';
3
3
  import { ComponentName as BaseComponentName } from '@turbo-player/integration-web-component';
4
4
  export declare const ComponentName: {
5
5
  readonly INTEGRATION: "glomex-integration";
@@ -30,7 +30,7 @@ export declare function loadIntegrationComponent(): void;
30
30
  */
31
31
  export declare function loadIntegrationStyles(integrationId: string, doc?: Document | ShadowRoot): void;
32
32
  /**
33
- * Returns the {@link SharedContext} singleton from the loaded integration.
33
+ * Returns the {@link HostContext} singleton from the loaded integration.
34
34
  *
35
35
  * Waits for the integration custom element to be defined, then
36
36
  * reads the singleton from its static property — guaranteeing the same
@@ -38,10 +38,10 @@ export declare function loadIntegrationStyles(integrationId: string, doc?: Docum
38
38
  *
39
39
  * @example
40
40
  * ```ts
41
- * import { getSharedContext } from '@glomex/integration-web-component';
41
+ * import { getHostContext } from '@glomex/integration-web-component';
42
42
  *
43
- * const sharedContext = await getSharedContext();
44
- * sharedContext.set({
43
+ * const hostContext = await getHostContext();
44
+ * hostContext.set({
45
45
  * appVersion: '2.3.0',
46
46
  * providers: {
47
47
  * 'my-provider': async () => ({ token: await myAuth.getFreshToken() }),
@@ -49,4 +49,4 @@ export declare function loadIntegrationStyles(integrationId: string, doc?: Docum
49
49
  * });
50
50
  * ```
51
51
  */
52
- export declare function getSharedContext(): Promise<SharedContext>;
52
+ export declare function getHostContext(): Promise<HostContext>;
package/dist/index.js CHANGED
@@ -43,7 +43,7 @@ export function loadIntegrationStyles(integrationId, doc) {
43
43
  glomexClient.loadStyles(integrationId, doc);
44
44
  }
45
45
  /**
46
- * Returns the {@link SharedContext} singleton from the loaded integration.
46
+ * Returns the {@link HostContext} singleton from the loaded integration.
47
47
  *
48
48
  * Waits for the integration custom element to be defined, then
49
49
  * reads the singleton from its static property — guaranteeing the same
@@ -51,10 +51,10 @@ export function loadIntegrationStyles(integrationId, doc) {
51
51
  *
52
52
  * @example
53
53
  * ```ts
54
- * import { getSharedContext } from '@glomex/integration-web-component';
54
+ * import { getHostContext } from '@glomex/integration-web-component';
55
55
  *
56
- * const sharedContext = await getSharedContext();
57
- * sharedContext.set({
56
+ * const hostContext = await getHostContext();
57
+ * hostContext.set({
58
58
  * appVersion: '2.3.0',
59
59
  * providers: {
60
60
  * 'my-provider': async () => ({ token: await myAuth.getFreshToken() }),
@@ -62,12 +62,12 @@ export function loadIntegrationStyles(integrationId, doc) {
62
62
  * });
63
63
  * ```
64
64
  */
65
- export async function getSharedContext() {
65
+ export async function getHostContext() {
66
66
  const componentName = glomexClient.getComponentName();
67
67
  await customElements.whenDefined(componentName);
68
68
  const ctor = customElements.get(componentName);
69
- if (!ctor?.sharedContext) {
70
- throw new Error(`sharedContext not available on ${componentName} element`);
69
+ if (!ctor?.hostContext) {
70
+ throw new Error(`hostContext not available on ${componentName} element`);
71
71
  }
72
- return ctor.sharedContext;
72
+ return ctor.hostContext;
73
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glomex/integration-web-component",
3
- "version": "1.1557.0",
3
+ "version": "1.1562.0",
4
4
  "description": "Web component and types to integrate the glomex player",
5
5
  "documentation": "https://docs.glomex.com",
6
6
  "homepage": "https://glomex.com",
@@ -29,7 +29,7 @@
29
29
  "watch": "tsc --build --watch"
30
30
  },
31
31
  "dependencies": {
32
- "@turbo-player/integration-web-component": "1.1557.0"
32
+ "@turbo-player/integration-web-component": "1.1562.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@biomejs/biome": "catalog:",
@@ -39,5 +39,5 @@
39
39
  "access": "public"
40
40
  },
41
41
  "license": "MIT",
42
- "gitHead": "f7041d733e8d4fee55b058589d2b97d1ac9cab34"
42
+ "gitHead": "8cf3de56e6bae8d2636bf8a68fabe92550c2b3ce"
43
43
  }