@namiml/web-sdk 3.4.7-dev.202607230244 → 3.4.7-dev.202607230341
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/legacy-support-_commonjsHelpers-lGe4XDVY.mjs +1 -0
- package/dist/legacy-support-cjs.d.ts +1 -0
- package/dist/legacy-support-custom-elements-es5-adapter-E4qWtv8B.mjs +1 -0
- package/dist/legacy-support-polyfill-tg58WEdk.mjs +1 -0
- package/dist/legacy-support-url-polyfill.min-BgySTWoi.mjs +1 -0
- package/dist/legacy-support-webcomponents-bundle-DJRe-tdq.mjs +1 -0
- package/dist/legacy-support.cjs +1 -3091
- package/dist/legacy-support.mjs +1 -3089
- package/dist/nami-web.cjs +1 -1
- package/dist/nami-web.mjs +17 -17
- package/dist/nami-web.umd.js +2 -2
- package/dist/polyfills.cjs +1 -1967
- package/dist/polyfills.js +1 -1965
- package/dist/utils/polyfill-loader.d.ts +36 -0
- package/package.json +2 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature-detected polyfill loading for the legacy-support entry.
|
|
3
|
+
*
|
|
4
|
+
* The consumer's `isLegacyBrowser()` gate is coarse: a browser needing core-js
|
|
5
|
+
* language polyfills often still has native Custom Elements, Shadow DOM, fetch,
|
|
6
|
+
* URL, and AbortController. We detect what is genuinely missing and load only
|
|
7
|
+
* that — capable browsers skip them, most importantly the ~135KB Web Components
|
|
8
|
+
* bundle.
|
|
9
|
+
*
|
|
10
|
+
* Invariant (NAM-2271): native present -> skip; native absent -> load exactly
|
|
11
|
+
* the polyfill shipped before this change. No browser loses capability.
|
|
12
|
+
*/
|
|
13
|
+
export type PolyfillKind = "webcomponents" | "es5adapter" | "fetch" | "url" | "abortcontroller";
|
|
14
|
+
/**
|
|
15
|
+
* Returns the polyfills a browser genuinely needs. Ordering within the returned
|
|
16
|
+
* list is not significant (it is enforced in `applyPolyfills`). Pure and
|
|
17
|
+
* side-effect free so the no-regression invariant is unit-testable without a
|
|
18
|
+
* device.
|
|
19
|
+
*/
|
|
20
|
+
export declare function detectMissingPolyfills(g?: typeof globalThis): PolyfillKind[];
|
|
21
|
+
type Importer = () => Promise<unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* Default dynamic importers. Each is a separate `import()` so a capable browser
|
|
24
|
+
* never fetches the chunk. `url` points at the *minified* build; `core-js` and
|
|
25
|
+
* `whatwg-fetch` stay external (customer-provided).
|
|
26
|
+
*/
|
|
27
|
+
export declare const polyfillImporters: Record<PolyfillKind, Importer>;
|
|
28
|
+
/**
|
|
29
|
+
* Loads the given polyfills. The Web Components pair is ordered (the bundle must
|
|
30
|
+
* apply before the ES5 adapter patches `customElements.define`); the rest are
|
|
31
|
+
* independent and run concurrently. Resolves only after every needed polyfill
|
|
32
|
+
* has applied, so a top-level `await` in legacy-support blocks the consumer's
|
|
33
|
+
* `await import(...)` until the environment is ready.
|
|
34
|
+
*/
|
|
35
|
+
export declare function applyPolyfills(kinds: PolyfillKind[], importers?: Record<PolyfillKind, Importer>): Promise<void>;
|
|
36
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@namiml/web-sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.4.7-dev.
|
|
4
|
+
"version": "3.4.7-dev.202607230341",
|
|
5
5
|
"source": "src/nami-web.ts",
|
|
6
6
|
"description": "Subscription monetization infrastructure — drop-in SDK with no-code paywalls, onboarding flows, A/B testing for web",
|
|
7
7
|
"scripts": {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"@lit-labs/ssr-dom-shim": "^1.2.1",
|
|
107
107
|
"@lit/context": "^1.1.3",
|
|
108
|
-
"@namiml/sdk-core": "3.4.7-dev.
|
|
108
|
+
"@namiml/sdk-core": "3.4.7-dev.202607230341",
|
|
109
109
|
"bowser": "^2.11.0",
|
|
110
110
|
"hls.js": "^1.5.18",
|
|
111
111
|
"lit": "^3.3.1",
|