@myop/sdk 0.4.0-beta.3 → 0.4.0-beta.5
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 +43 -2
- package/dist/cjs/_IframeSDK.47f37ec9.min.js +1 -0
- package/dist/cjs/{_IframeSDK.c2e3efb9.js → _IframeSDK.ac4c28cf.js} +87 -7
- package/dist/cjs/_IframeSDK.ac4c28cf.js.map +7 -0
- package/dist/cjs/{_WebComponentSDK.3728ca8b.js → _WebComponentSDK.4085389a.js} +87 -7
- package/dist/cjs/_WebComponentSDK.4085389a.js.map +7 -0
- package/dist/cjs/_WebComponentSDK.4ca43f0a.min.js +1 -0
- package/dist/cjs/_hostSDK.0443afcd.min.js +1 -0
- package/dist/cjs/{_hostSDK.94744d97.js → _hostSDK.46b85afc.js} +87 -7
- package/dist/cjs/_hostSDK.46b85afc.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 +88 -8
- package/dist/cjs-bundled/myop_sdk.bundled.js.map +2 -2
- package/dist/cjs-bundled/myop_sdk.bundled.min.js +1 -1
- package/dist/module/Iframe/index.js +88 -8
- package/dist/module/Iframe/index.js.map +2 -2
- package/dist/module/SDK.js +88 -8
- package/dist/module/SDK.js.map +2 -2
- package/dist/module/embeddedSDK.js +1 -1
- package/dist/module/host/components/myopExtractedWebComponent.d.ts +24 -1
- package/dist/module/host/embeddedSDK.js +1 -1
- package/dist/module/host/index.js +88 -8
- package/dist/module/host/index.js.map +2 -2
- package/dist/module/host/loaders/HTMLComponentLoader.d.ts +19 -1
- package/dist/module/webcomponent/index.js +88 -8
- package/dist/module/webcomponent/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/cjs/_IframeSDK.3faa31eb.min.js +0 -1
- package/dist/cjs/_IframeSDK.c2e3efb9.js.map +0 -7
- package/dist/cjs/_WebComponentSDK.3728ca8b.js.map +0 -7
- package/dist/cjs/_WebComponentSDK.e517f1a4.min.js +0 -1
- package/dist/cjs/_hostSDK.48b3ff7a.min.js +0 -1
- package/dist/cjs/_hostSDK.94744d97.js.map +0 -7
|
@@ -7,7 +7,25 @@ import { MyopIframeComponent } from "../components/myopIframeComponent.ts";
|
|
|
7
7
|
export declare class HTMLComponentLoader extends BaseMyopLoader {
|
|
8
8
|
type: "HTMLLoader";
|
|
9
9
|
/**
|
|
10
|
-
* Detect if HTML is a Myop Web Component
|
|
10
|
+
* Detect if HTML is a Myop Web Component.
|
|
11
|
+
*
|
|
12
|
+
* THE MARKER COMMENT ALONE IS NOT A SAFE SIGNAL, BECAUSE MINIFIERS DELETE COMMENTS.
|
|
13
|
+
*
|
|
14
|
+
* This used to be `startsWith(MYOP_WEB_COMPONENT_MARKER)` and nothing else. The
|
|
15
|
+
* delivery lane minifies with `removeComments: true` (myop-server derive.ts MIN_CFG),
|
|
16
|
+
* so the stored `min` artifact of every v2 web component loses its leading
|
|
17
|
+
* `<!-- myop-web-component -->`. Detection then returned false, the component fell
|
|
18
|
+
* back to plain iframe rendering, and the whole authored document was shown --
|
|
19
|
+
* including the v2 authoring wrapper, so Pic-Time's production dashboard displayed the
|
|
20
|
+
* preview chrome ("Web Component v2", a tag-name badge reading `loading...`, SIZE /
|
|
21
|
+
* OVERFLOW / BG controls) instead of their component. Reported 2026-10-18; the served
|
|
22
|
+
* HTML measured 328,071 bytes against 951,130 at origin, with zero `<!--` left in it.
|
|
23
|
+
*
|
|
24
|
+
* The script id is the signal that survives, and it is the one `extractWebComponentScript`
|
|
25
|
+
* already depends on: if that element is present, extraction works, so detection
|
|
26
|
+
* should agree. Checked with a regex rather than DOMParser -- this runs for every
|
|
27
|
+
* HTML component, and parsing a 300 KB document to answer a yes/no question is not
|
|
28
|
+
* worth it.
|
|
11
29
|
*/
|
|
12
30
|
private isMyopWebComponent;
|
|
13
31
|
/**
|