@myop/sdk 0.3.31 → 0.3.33
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/bundled-declarations.d.ts +141 -48
- package/dist/cjs/_IframeSDK.c7a53057.min.js +1 -0
- package/dist/cjs/{_IframeSDK.01a61f0b.js → _IframeSDK.e5b2bc49.js} +209 -27
- package/dist/cjs/_IframeSDK.e5b2bc49.js.map +7 -0
- package/dist/cjs/_MyopHelpers.95610381.js.map +2 -2
- package/dist/cjs/{_MyopHelpers.172384f4.min.js → _MyopHelpers.ca1b3a3c.min.js} +1 -1
- package/dist/cjs/_WebComponentSDK.3a72ed95.min.js +1 -0
- package/dist/cjs/{_WebComponentSDK.82b7afdf.js → _WebComponentSDK.a7e660ab.js} +209 -27
- package/dist/cjs/_WebComponentSDK.a7e660ab.js.map +7 -0
- package/dist/cjs/_hostSDK.0529d5ed.min.js +1 -0
- package/dist/cjs/{_hostSDK.aee4f072.js → _hostSDK.1905850e.js} +209 -27
- package/dist/cjs/_hostSDK.1905850e.js.map +7 -0
- package/dist/cjs/myop_sdk.js +11 -11
- package/dist/cjs/myop_sdk.js.map +1 -1
- package/dist/cjs/myop_sdk.min.js +1 -1
- package/dist/cjs-bundled/myop_sdk.bundled.js +211 -28
- package/dist/cjs-bundled/myop_sdk.bundled.js.map +3 -3
- package/dist/cjs-bundled/myop_sdk.bundled.min.js +1 -1
- package/dist/module/Iframe/index.js +267 -28
- package/dist/module/Iframe/index.js.map +2 -2
- package/dist/module/SDK.js +268 -28
- package/dist/module/SDK.js.map +3 -3
- package/dist/module/common/index.d.ts +26 -0
- package/dist/module/common/index.js +1 -1
- package/dist/module/common/index.js.map +2 -2
- package/dist/module/embeddedSDK.js +1 -1
- package/dist/module/helpers/index.js +1 -1
- package/dist/module/helpers/index.js.map +2 -2
- package/dist/module/host/components/myopExtractedWebComponent.d.ts +1 -0
- package/dist/module/host/components/myopIframeComponent.d.ts +17 -0
- package/dist/module/host/embeddedSDK.js +1 -1
- package/dist/module/host/hostSDK.d.ts +21 -0
- package/dist/module/host/index.d.ts +1 -1
- package/dist/module/host/index.js +267 -28
- package/dist/module/host/index.js.map +2 -2
- package/dist/module/host/loaders/HTMLComponentLoader.d.ts +29 -1
- package/dist/module/webcomponent/index.js +267 -28
- package/dist/module/webcomponent/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/cjs/_IframeSDK.01a61f0b.js.map +0 -7
- package/dist/cjs/_IframeSDK.79b8258f.min.js +0 -1
- package/dist/cjs/_WebComponentSDK.2ac55fb8.min.js +0 -1
- package/dist/cjs/_WebComponentSDK.82b7afdf.js.map +0 -7
- package/dist/cjs/_hostSDK.aee4f072.js.map +0 -7
- package/dist/cjs/_hostSDK.ec7b5c9a.min.js +0 -1
|
@@ -10,6 +10,34 @@ export declare class HTMLComponentLoader extends BaseMyopLoader {
|
|
|
10
10
|
* Detect if HTML is a Myop Web Component (starts with marker comment)
|
|
11
11
|
*/
|
|
12
12
|
private isMyopWebComponent;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve how this component should render, applying the host render policy.
|
|
15
|
+
* Precedence: options.renderPolicy (per-call) fully replaces the global
|
|
16
|
+
* hostSDK.setRenderPolicy — so an app can restrict globally and allow specifics.
|
|
17
|
+
* With no policy set, behavior is unchanged from before (marker ⇒ web component).
|
|
18
|
+
*/
|
|
19
|
+
private resolveRenderMode;
|
|
20
|
+
/**
|
|
21
|
+
* The in-frame bridge for isolated components. Runs inside the sandboxed
|
|
22
|
+
* (opaque-origin) iframe, translating the same author-facing contract to/from
|
|
23
|
+
* postMessage since the host has no same-origin access:
|
|
24
|
+
* • data-in : parent posts {type:'myop:init'} → calls window.myop_init_interface
|
|
25
|
+
* (plus a baked initial value for the first render)
|
|
26
|
+
* • data-out: window.myop_cta_handler → parent.postMessage({type:'myop:cta'})
|
|
27
|
+
* • resize : ResizeObserver → parent.postMessage({type:'myop:size'})
|
|
28
|
+
*
|
|
29
|
+
* TODO(dev-extension): the isolated path deliberately skips the same-origin
|
|
30
|
+
* dataScript, so it never posts the `MYOP_PREINJECTED_INIT` message the Myop dev
|
|
31
|
+
* extension listens for to log the INITIAL render (`init*`). Later init updates and
|
|
32
|
+
* all CTAs are still tracked (the extension wraps `comp.props`, which our isolated
|
|
33
|
+
* connectProps branch routes through), so only the first-render payload is missing
|
|
34
|
+
* from the extension's activity log for isolated components. Closing this would be a
|
|
35
|
+
* ~1-line `parent.postMessage({type:'MYOP_PREINJECTED_INIT', payload:{data}})` inside
|
|
36
|
+
* flushInitial() below — intentionally NOT done for now to avoid adding extension-only
|
|
37
|
+
* traffic to the component runtime. Web components have the same initial-init gap
|
|
38
|
+
* (initWithData is called on the element, not via comp.props) and it predates this.
|
|
39
|
+
*/
|
|
40
|
+
private buildIsolationBridge;
|
|
13
41
|
/**
|
|
14
42
|
* Extract the web component script content from HTML
|
|
15
43
|
*/
|
|
@@ -22,5 +50,5 @@ export declare class HTMLComponentLoader extends BaseMyopLoader {
|
|
|
22
50
|
* Load a Myop Web Component (extracted and run on host document)
|
|
23
51
|
*/
|
|
24
52
|
private loadExtractedWebComponent;
|
|
25
|
-
load: (componentDefinition: IComponentDefinitionConfig, skin: ISkinConfig, container: HTMLElement, options?: loaderOptions) => Promise<
|
|
53
|
+
load: (componentDefinition: IComponentDefinitionConfig, skin: ISkinConfig, container: HTMLElement, options?: loaderOptions) => Promise<MyopIframeComponent | MyopExtractedWebComponent | MyopWebComponent>;
|
|
26
54
|
}
|