@coxwave/tap-sdk 2.11.0 → 2.11.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/dist/index.global.js +1 -1
- package/package.json +3 -3
package/dist/index.global.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var TapKit=(function(){'use strict';var
|
|
1
|
+
var TapKit=(function(){'use strict';var I=Object.defineProperty,v=e=>{throw TypeError(e)},E=(e,t,n)=>t in e?I(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n,A=(e,t,n)=>E(e,t+"",n),m=(e,t,n)=>t.has(e)||v("Cannot "+n),i=(e,t,n)=>(m(e,t,"read from private field"),n?n.call(e):t.get(e)),w=(e,t,n)=>t.has(e)?v("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),d=(e,t,n,r)=>(m(e,t,"write to private field"),t.set(e,n),n),D="https://files.edutap.ai/tap-sdk/loader.js";function y(){return window?.__TAP_KIT_LOADER_URL__?window.__TAP_KIT_LOADER_URL__:D}function K(){return typeof window<"u"&&!!window.__TAP_KIT_CORE_URL__}function g(){return window.__TAP_KIT_CORE_URL__||""}function f(e,t,n){let r=Date.now(),a=()=>{if(window.TapKit&&window.TapKitLoaded===true){window.__TAP_KIT_LOADER_LOADED__=true,window.__TAP_KIT_LOADER_LOADING__=void 0,e();return}if(Date.now()-r>n){window.__TAP_KIT_LOADER_LOADING__=void 0,t(new Error(`TapKit loader timeout: SDK not available after ${n}ms`));return}typeof requestIdleCallback<"u"?requestIdleCallback(a,{timeout:500}):setTimeout(a,500);};return a}function R(e=4e3){if(window.__TAP_KIT_LOADER_LOADED__&&window.TapKit)return Promise.resolve();if(window.__TAP_KIT_LOADER_LOADING__)return window.__TAP_KIT_LOADER_LOADING__;let t=new Promise((n,r)=>{if(typeof document>"u"){r(new Error("TapKit requires browser environment (document is undefined)"));return}if(K()){if(window.TapKit&&window.TapKitLoaded===true){window.__TAP_KIT_LOADER_LOADED__=true,window.__TAP_KIT_LOADER_LOADING__=void 0,n();return}let T=g(),h=document.createElement("script");h.src=T,h.async=true,h.onload=()=>{window.TapKit?(window.TapKitLoaded=true,window.__TAP_KIT_LOADER_LOADED__=true,window.__TAP_KIT_LOADER_LOADING__=void 0,n()):(window.__TAP_KIT_LOADER_LOADING__=void 0,r(new Error("TapKit not available after loading local core")));},h.onerror=()=>{window.__TAP_KIT_LOADER_LOADING__=void 0,r(new Error(`Failed to load local TapKit core: ${T}`));},document.head.appendChild(h);return}let a=y(),c=document.createElement("script");c.src=a,c.async=true,c.onload=()=>{f(n,r,e)();},c.onerror=()=>{window.__TAP_KIT_LOADER_LOADING__=void 0,r(new Error(`Failed to load TapKit CDN loader: ${a}`));};let p=document.querySelector(`script[src="${a}"]`);p?(p.addEventListener("load",()=>{f(n,r,e)();}),p.addEventListener("error",()=>r(new Error(`Failed to load TapKit CDN loader: ${a}`)))):document.head.appendChild(c);});return window.__TAP_KIT_LOADER_LOADING__=t,t}var s,l,o,_,u,L=class{constructor(e){A(this,"instance",null),w(this,s),w(this,l),w(this,o,null),w(this,_),w(this,u),d(this,l,e),d(this,s,this.load());}async load(){try{if(await R(),!window.TapKit)throw new Error("TapKit not available after loading CDN loader");this.instance=new window.TapKit(i(this,l));}catch(e){throw d(this,o,e instanceof Error?e:new Error(String(e))),i(this,o)}}get loaded(){return i(this,s).then(()=>{if(i(this,o))throw i(this,o);if(!this.instance)throw new Error(`TapKit instance not initialized after loading. This may indicate a CDN loading failure for apiKey: ${i(this,l).apiKey}`)})}get ready(){return i(this,s).then(()=>{if(i(this,o))throw i(this,o);if(!this.instance)throw new Error(`TapKit instance not initialized after loading. This may indicate a CDN loading failure for apiKey: ${i(this,l).apiKey}`);return this.instance.ready})}createVideoProxy(){return {bind:(e,t)=>{this.ready.then(()=>{this.instance?.video.bind(e,t);});},unbind:()=>{this.instance?.video?.unbind();}}}createEventsProxy(){return {seekTimeline:e=>{this.ready.then(()=>{this.instance?.events.seekTimeline(e);});},onTimelineSeek:e=>{let t,n=false;return this.ready.then(()=>{n||(t=this.instance?.events.onTimelineSeek(e));}),()=>{n=true,t?.();}},onAlarmFadeIn:e=>{let t,n=false;return this.ready.then(()=>{n||(t=this.instance?.events.onAlarmFadeIn(e));}),()=>{n=true,t?.();}}}}get events(){return i(this,_)||d(this,_,this.createEventsProxy()),i(this,_)}get isOpen(){return this.instance?.isOpen??false}get isInitialized(){return this.instance?.isInitialized??false}get video(){return i(this,u)||d(this,u,this.createVideoProxy()),i(this,u)}async init(e){if(await i(this,s),!this.instance)throw new Error("TapKit instance not available after loading");return await this.instance.init(e)}destroy(){this.instance&&(this.instance.destroy(),this.instance=null),d(this,_,void 0),d(this,u,void 0);}show(){this.instance&&this.instance.show();}hide(){this.instance&&this.instance.hide();}setCourse(e){this.instance&&this.instance.setCourse(e);}setExternalReferenceId(e){this.instance&&this.instance.setExternalReferenceId(e);}setExternalReferenceData(e){this.instance&&this.instance.setExternalReferenceData(e);}sendContext(e,t){this.instance&&this.instance.sendContext(e,t);}get[Symbol.toStringTag](){return "TapKit"}};s=new WeakMap,l=new WeakMap,o=new WeakMap,_=new WeakMap,u=new WeakMap;typeof window<"u"&&!window.__TAP_SDK_DEPRECATION_WARNED__&&(window.__TAP_SDK_DEPRECATION_WARNED__=true,window.__TAP_SDK_IMPORTED__=true);
|
|
2
2
|
return L;})();//# sourceMappingURL=index.global.js.map
|
|
3
3
|
//# sourceMappingURL=index.global.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coxwave/tap-sdk",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "[더 이상 사용되지 않음] @coxwave/tap-kit을 사용해 주세요",
|
|
6
6
|
"deprecated": "⚠️ 이 패키지는 더 이상 사용되지 않습니다. @coxwave/tap-kit으로 마이그레이션해 주세요. 설치 방법: npm install @coxwave/tap-kit",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"src"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@coxwave/tap-kit": "3.9.
|
|
35
|
-
"@coxwave/tap-kit-types": "2.12.
|
|
34
|
+
"@coxwave/tap-kit": "3.9.1",
|
|
35
|
+
"@coxwave/tap-kit-types": "2.12.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"tsup": "^8.5.0",
|