native-fn 1.0.71 → 1.0.72
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/native.cjs +2 -507
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +2 -507
- package/dist/native.umd.js +2 -507
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +435 -423
- package/dist/plugin/app/index.d.ts +8 -33
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +435 -423
- package/dist/plugin/app/index.umd.js +435 -423
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/app/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/app/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/app/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/app/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/app/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/appearance/index.cjs +30 -16
- package/dist/plugin/appearance/index.min.cjs +1 -1
- package/dist/plugin/appearance/index.min.mjs +1 -1
- package/dist/plugin/appearance/index.mjs +30 -16
- package/dist/plugin/appearance/index.umd.js +30 -16
- package/dist/plugin/appearance/index.umd.min.js +1 -1
- package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/appearance/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/appearance/src/plugin/platform/index.d.ts +11 -0
- package/dist/plugin/appearance/src/plugin/platform/types/index.d.ts +11 -0
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +18 -0
- package/dist/plugin/appearance/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/camera/index.cjs +118 -109
- package/dist/plugin/camera/index.min.cjs +1 -1
- package/dist/plugin/camera/index.min.mjs +1 -1
- package/dist/plugin/camera/index.mjs +118 -109
- package/dist/plugin/camera/index.umd.js +118 -109
- package/dist/plugin/camera/index.umd.min.js +1 -1
- package/dist/plugin/camera/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/camera/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/camera/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/camera/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/camera/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/camera/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/camera/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/camera/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/clipboard/index.cjs +226 -212
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +226 -212
- package/dist/plugin/clipboard/index.umd.js +226 -212
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/clipboard/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/clipboard/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/clipboard/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/fullscreen/index.cjs +34 -20
- package/dist/plugin/fullscreen/index.d.ts +4 -13
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +34 -20
- package/dist/plugin/fullscreen/index.umd.js +34 -20
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/fullscreen/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/fullscreen/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/fullscreen/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/platform/index.cjs +355 -109
- package/dist/plugin/platform/index.d.ts +15 -20
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +355 -109
- package/dist/plugin/platform/index.umd.js +355 -109
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/plugin/app/constants/index.d.ts +12 -0
- package/dist/plugin/platform/src/plugin/app/cores/index.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/app/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/app/types/app.d.ts +11 -2
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/appearance/constants/index.d.ts +11 -0
- package/dist/plugin/platform/src/plugin/appearance/cores/index.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/appearance/index.d.ts +8 -0
- package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +12 -0
- package/dist/plugin/platform/src/plugin/appearance/types/index.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/camera/constants/inedx.d.ts +4 -0
- package/dist/plugin/platform/src/plugin/camera/cores/index.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/camera/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/camera/types/camera.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/camera/types/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/clipboard/cores/index.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/fullscreen/cores/index.d.ts +35 -0
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +5 -5
- package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/platform/src/plugin/theme/constants/index.d.ts +2 -0
- package/dist/plugin/platform/src/plugin/theme/cores/index.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +2 -21
- package/dist/plugin/platform/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/plugin/theme/index.cjs +63 -906
- package/dist/plugin/theme/index.d.ts +4 -87
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +63 -906
- package/dist/plugin/theme/index.umd.js +63 -906
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/theme/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/src/plugin/app/types/app.d.ts +1 -1
- package/dist/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/src/plugin/platform/index.d.ts +2 -2
- package/dist/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/src/plugin/theme/index.d.ts +1 -13
- package/dist/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/src/plugin/theme/types/theme.d.ts +2 -22
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).Theme=r()}(this,(function(){"use strict";function e(e,r){for(var n=e.split("."),o=r.split("."),t=Math.max(n.length,o.length),i=0;i<t;i++){var a=void 0,s=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(s=i<o.length?parseInt(o[i],10):0))return 1;if(a<s)return-1}return 0}var r,n,o,t;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(r||(r={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(o||(o={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(t||(t={}));var i,a=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",s=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,l=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(a),u=void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product,c={device:n.Unknown,os:r.Unknown,osVersion:"",engine:o.Unknown,engineVersion:"",browser:t.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:a,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(a)},d=[[/windows nt (6\.[23]); arm/i,r.Windows,p],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,r.Windows,p],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,r.Windows,p],[/windows nt ?([\d.)]*)(?!.+xbox)/i,r.Windows,p],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,r.Windows,p],[/windows ce\/?([\d.]*)/i,r.Windows,p],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,r.iOS,h],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,r.iOS,h],[/cfnetwork\/.+darwin/i,r.iOS,h],[/mac os x ?([\w. ]*)/i,r.MacOS,h],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,r.MacOS,h],[/droid ([\w.]+)\b.+(android[- ]x86)/i,r.Android],[/android\w*[-\/.; ]?([\d.]*)/i,r.Android]],m=[[/windows.+ edge\/([\w.]+)/i,o.EdgeHTML],[/arkweb\/([\w.]+)/i,o.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,o.Blink],[/presto\/([\w.]+)/i,o.Presto],[/webkit\/([\w.]+)/i,o.WebKit],[/trident\/([\w.]+)/i,o.Trident],[/netfront\/([\w.]+)/i,o.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,o.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,o.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,o.Gecko]],f=[[/\b(?:crmo|crios)\/([\w.]+)/i,t.Chrome],[/webview.+edge\/([\w.]+)/i,t.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,t.Edge],[/opera mini\/([-\w.]+)/i,t.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,t.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,t.Opera],[/opios[\/ ]+([\w.]+)/i,t.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,t.Opera],[/\bopr\/([\w.]+)/i,t.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,t.IE],[/(?:ms|\()ie ([\w.]+)/i,t.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,t.IE],[/\bfocus\/([\w.]+)/i,t.Firefox],[/\bopt\/([\w.]+)/i,t.Opera],[/coast\/([\w.]+)/i,t.Opera],[/fxios\/([\w.-]+)/i,t.Firefox],[/samsungbrowser\/([\w.]+)/i,t.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,t.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,t.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,t.Chrome],[/chrome\/([\w.]+) mobile/i,t.Chrome],[/chrome\/v?([\w.]+)/i,t.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/version\/([\w.,]+) .*safari/i,t.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,t.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,t.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,t.Firefox],[/firefox\/([\w.]+)/i,t.Firefox]];function p(e){if(void 0===e)return"";var r={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==r?r:e}function h(e){return void 0===e?"":e.replace(/_/g,".")}function v(e,r){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":r}function b(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function g(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}for(var w=0;w<d.length;w++){var y=(S=d[w])[0],T=S[1],j=S[2];if(null!==(E=c.userAgent.match(y))){c.os=T,c.osVersion=b(E[1],j);break}}c.os===r.iOS&&0===e(c.osVersion,"18.6")&&(null!==(A=/\) Version\/([\d.]+)/.exec(c.userAgent))&&parseInt(A[1].substring(0,2),10)>=26&&(c.osVersion=A[1]));for(w=0;w<m.length;w++){y=(S=m[w])[0];var k=S[1];j=S[2];if(null!==(E=c.userAgent.match(y))){c.engine=k,c.engineVersion=b(E[1],j);break}}for(w=0;w<f.length;w++){y=(S=f[w])[0];var S,E,x=S[1];j=S[2];if(null!==(E=c.userAgent.match(y))){c.browser=x,c.browserVersion=b(E[1],j);break}}if(u)try{T=(C=require("react-native").Platform).OS;var A=g(M=""+C.Version);switch(T){case"android":c.os=r.Android,c.osVersion=function(e,r){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":r}(A,M);break;case"ios":c.os=r.iOS,c.osVersion=M;break;case"windows":c.os=r.Windows,c.osVersion=v(A,M);break;case"macos":c.os=r.MacOS,c.osVersion=M}}catch(e){}if(s)try{var M,C=(T=require("os")).platform();A=g(M=T.release());switch(C){case"win32":c.os=r.Windows,c.osVersion=v(A,M);break;case"darwin":c.os=r.MacOS,c.osVersion=function(e,r){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:r}(A,M);break;case"android":c.os=r.Android,c.osVersion=M;break;case"linux":/android/i.test(M)&&(c.os=r.Android,c.osVersion=M)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(c.os===r.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":c.os=r.Android;break;case"iOS":c.os=r.iOS}c.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var n,o=e.fullVersionList||e.brands||[],t=e.platformVersion,i=0;i<o.length;i++){var a=null==(n=o[i])?{brand:"",version:""}:"string"==typeof n?{brand:n,version:""}:{brand:n.brand,version:n.version},s=a.brand,l=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(c.engineVersion=l)}"string"==typeof t&&(c.os===r.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?c.osVersion="11":c.osVersion=t)})),c.device=c.os===r.iOS||c.os===r.Android?n.Mobile:c.os===r.Windows||c.os===r.MacOS?n.Desktop:n.Unknown,c.isMobile=c.device===n.Mobile,c.isDesktop=c.device===n.Desktop,c.isStandalone=function(e){return"matchMedia"in globalThis&&(e===r.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(c.os),function(e){e.Unknown="unknown",e.Light="light",e.Dark="dark"}(i||(i={}));var I="matchMedia"in globalThis?globalThis.matchMedia("(prefers-color-scheme: dark)"):{matches:!1,media:"not all",onchange:null,addListener:function(){},removeListener:function(){},addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){return!1}},L="not all"!==I.media,O=c.browser!==t.Chrome||c.isMobile&&e(c.browserVersion,"92")>=0,F="document"in globalThis?globalThis.document.createElement("canvas").getContext("2d",{willReadFrequently:!0}):null,N=/iemobile/i.test(c.userAgent),V=/windows phone/i.test(c.userAgent),U=[];function P(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function W(e,r){function n(o){if(!(this instanceof n))return new n(o);var t=new r(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(t,n.prototype):t.__proto__=n.prototype,t.name=e,void 0!==o&&(t.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(t,n);else if(r.captureStackTrace&&"function"==typeof r.captureStackTrace)r.captureStackTrace(t,n);else try{var i=new r;i.stack&&(t.stack=i.stack)}catch(e){}return t}void 0===r&&(r=Error),n.prototype=Object.create(r.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(r){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}"function"==typeof SuppressedError&&SuppressedError;var D=W("EasingError"),R=W("CubicBezierSyntaxError",D),z=W("LinearSyntaxError",D),q=W("StepSyntaxError",D),H=W("UnsupportedEasingFunctionError",D),B={linear:"linear(0, 1)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)","step-start":"steps(1, jump-start)","step-end":"steps(1, jump-end)"};function _(e,r,n){return e<r?r:e>n?n:e}function G(e){var r=function(e){var r=e.match(/cubic-bezier\((.*)\)/);if(null===r)throw new R("Invalid cubic-bezier syntax");var n=r[1].trim().split(","),o=[];if(4!==n.length)throw new R("Cubic-bezier must have exactly 4 numeric values");for(var t=0;t<4;t++){var i=parseFloat(n[t]);if(isNaN(i))throw new R("Cubic-bezier must have exactly 4 numeric values");if(t%2==0&&(i<0||i>1))throw new R("x1 and x2 must be between 0 and 1");o.push(i)}return{x1:o[0],y1:o[1],x2:o[2],y2:o[3]}}(e),n=r.x1,o=r.x2,t=r.y1,i=r.y2;return function(e){if(0===(e=_(e,0,1))||1===e)return e;var r=function(e,r,t){if(void 0===r&&(r=1e-6),void 0===t&&(t=50),e<=0)return 0;if(e>=1)return 1;for(var i=e,a=0;a<t;a++){var s=3*(1-i)*(1-i)*i*n+3*(1-i)*i*i*o+i*i*i,l=3*(1-i)*(1-i)*n+6*(1-i)*i*(o-n)+3*i*i*(1-o);if(Math.abs(l)<r)break;var u=i-(s-e)/l;if(Math.abs(u-i)<r){i=u;break}i=Math.max(0,Math.min(1,u))}return i}(e);return 3*(1-r)*(1-r)*r*t+3*(1-r)*r*r*i+r*r*r}}function K(e){var r=function(e){var r,n,o=e.match(/linear\((.*)\)/);if(null===o)throw new z("Invalid linear syntax");var t=o[1].trim();if(""===t)throw new z("Linear function must have at least one point");for(var i=t.split(","),a=[],s=0;s<i.length;s++){var l=i[s].trim(),u=l.match(/^([+-]?\d*\.?\d+)((?:\s+[+-]?\d*\.?\d+%){2,})$/);if(null===u){var c=l.match(/^([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)%$/);if(null===c){var d=l.match(/^([+-]?\d*\.?\d+)$/);if(null===d)throw new z('Invalid linear point format: "'+l+'"');a.push({position:1===i.length?0:s/(i.length-1),value:parseFloat(d[1])})}else a.push({position:parseFloat(c[2])/100,value:parseFloat(c[1])})}else{var m=parseFloat(u[1]),f=u[2].trim().split(/\s+/);try{for(var p=(r=void 0,P(f)),h=p.next();!h.done;h=p.next()){var v=h.value;a.push({value:m,position:parseFloat(v)/100})}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}}if(0===a.length)throw new z("No valid points found in linear function");return a.sort((function(e,r){return e.position-r.position})),a[0].position>0&&a.unshift({position:0,value:0}),a[a.length-1].position<1&&a.push({position:1,value:1}),a}(e);return function(e){if((e=_(e,0,1))<=r[0].position)return r[0].value;if(e>=r[r.length-1].position)return r[r.length-1].value;for(var n=0;n<r.length-1;n++){var o=r[n],t=r[n+1];if(e>=o.position&&e<=t.position){if(o.position===t.position)return t.value;var i=(e-o.position)/(t.position-o.position);return o.value+(t.value-o.value)*i}}return r[r.length-1].value}}function Z(e){if(function(e){return!/(linear|cubic-bezier|steps)\((.*)\)/.test(e)}(e)&&(e=B[e]),function(e){return/cubic-bezier\(/.test(e)}(e))return G(e);if(function(e){return/linear\(/.test(e)}(e))return K(e);if(function(e){return/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/.test(e)}(e))return function(e){var r=e.match(/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/);if(null===r)throw new q("Invalid steps syntax");var n=parseInt(r[1],10),o=r[2];if(n<=0)throw new q("Steps count must be a positive integer");if("jump-none"===o&&n<2)throw new q("jump-none requires at least 2 steps");return function(e){switch(e=_(e,0,1),o){case"start":case"jump-start":return 0===e?1/n:1===e?1:Math.ceil(e*n)/n;case void 0:case"end":case"jump-end":return 1===e?1:Math.floor(e*n)/n;case"jump-both":return 0===e?0:1===e?1:Math.round(e*(n+1))/(n+1);case"jump-none":return 0===e?0:1===e?1:Math.floor(e*(n-1))/(n-1);default:throw new q('Unsupported step position: "'+o+'"')}}}(e);throw new H('Unsupported easing function: "'+e+'"')}var $=W("UnsupportedColorError");function X(e){if("undefined"!=typeof CSS&&CSS.supports&&!CSS.supports("color",e))throw new $('Unsupported color: "'+e+'".');if(null!==F)try{F.clearRect(0,0,1,1),F.fillStyle=e,F.fillRect(0,0,1,1);var r=F.getImageData(0,0,1,1).data;return{red:r[0],green:r[1],blue:r[2],alpha:parseFloat((r[3]/255).toFixed(2))}}catch(e){}var n=function(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),r?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}}("div");if(void 0===n)throw new $('Failed to parse color values from: "'+e+'".');n.style.color=e,globalThis.document.body.appendChild(n);try{var o=globalThis.getComputedStyle(n).color,t=o.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/),i=o.match(/rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:\/\s*([\d.]+%?))?\s*\)/),a=t||i;if(null===a)throw new $('Unsupported color: "'+e+'".');var s=parseInt(a[1],10),l=parseInt(a[2],10),u=parseInt(a[3],10),c=1;if(void 0!==a[4]){var d=a[4];c="%"===d.charAt(d.length-1)?parseFloat((parseFloat(d)/100).toFixed(2)):parseFloat(parseFloat(d).toFixed(2))}if(isNaN(s)||isNaN(l)||isNaN(u)||isNaN(c))throw new $('Failed to parse color values from: "'+e+'".');return{red:s,green:l,blue:u,alpha:c}}finally{globalThis.document.body.removeChild(n)}}var Q={},J=null,Y=null,ee=null,re=null,ne={setAppearance:function(e){if(u)return function(e){try{require("react-native").Appearance.setColorScheme(e)}catch(e){}}(e);if(l)return function(e){try{require("electron").nativeTheme.themeSource=e||"system"}catch(e){}}(e)},getAppearance:function(){return u?new Promise((function(e){try{e(require("react-native").Appearance.getColorScheme()||i.Unknown)}catch(r){e(i.Unknown)}})):l?new Promise((function(e){try{e(require("electron").nativeTheme.shouldUseDarkColors?i.Dark:i.Light)}catch(r){e(i.Unknown)}})):c.browser===t.SamsungInternet?ie():Promise.resolve(ae())},removeThemeColor:function(e){void 0===e&&(e="default");var r=Q[e];void 0!==r&&r.remove();Q[e]=void 0},setThemeColor:function(e,r){void 0===r&&(r={duration:0,easingFunction:"linear",appearance:"default"});var n=r.duration,o=Z(r.easingFunction),t=r.appearance;null!==J&&(globalThis.cancelAnimationFrame(J),J=null,null!==Y&&(Y(me()),Y=null));var a=me();void 0===a&&(a=void 0!==r.defaultColor?r.defaultColor:ae()===i.Dark?"#181818ff":"#dcdcdcff");var s=X(a),l=X(e);return new Promise((function(e){Y=e;var r=null;J=globalThis.requestAnimationFrame((function i(a){null===r&&(r=a);var u,c=a-r;u=0===n?1:Math.min(c/n,1);var d=o(u),m={red:Math.round(s.red+(l.red-s.red)*d),green:Math.round(s.green+(l.green-s.green)*d),blue:Math.round(s.blue+(l.blue-s.blue)*d),alpha:+(s.alpha+(l.alpha-s.alpha)*d).toFixed(2)};(function(e){void 0===e&&(e="default");var r;r=!O||!L||N||V?"default":e;var n=Q[r];if(void 0!==n)return n;n=globalThis.document.createElement("meta"),N?n.setAttribute("name","msapplication-navbutton-color"):V?n.setAttribute("name","msapplication-TileColor"):n.setAttribute("name","theme-color");"default"!==e&&n.setAttribute("media","(prefers-color-scheme: "+r+")");return globalThis.document.head.prepend(n),Q[e]=n})(t).setAttribute("content",te(m)),u<1?J=globalThis.requestAnimationFrame(i):(J=null,null!==Y&&(e(me()),J=null))}))}))},getThemeColor:me,onAppearanceChange:function(e,r){void 0===r&&(r=!1);var n={fn:e,capture:!1,once:!1};"boolean"==typeof r&&(r={capture:r});void 0!==r.capture&&(n.capture=r.capture);void 0!==r.once&&(n.once=r.once);void 0!==r.signal&&(n.signal=r.signal);var o=ce(n);-1===o?(U.push(n),1===U.length&&(c.browser===t.SamsungInternet?(ie().then((function(e){ee=e})),re=globalThis.setInterval((function(){ie().then((function(e){e!==ee&&(ee=e,le(e))}))}),2e3)):(i=n.capture,ee=ae(),"function"==typeof I.addEventListener?I.addEventListener("change",se,i):"function"==typeof I.addListener&&I.addListener(se))),this.getAppearance().then(le)):U[o].once&&!n.once&&(U[o].once=!1);var i;void 0!==n.signal&&(n.signal.aborted?ue(n):n.signal.addEventListener("abort",(function e(){void 0!==n.signal&&n.signal.removeEventListener("abort",e),ue(n)})));return function(){ue(n)}}};function oe(e){var r=e.toString(16);switch(r.length){case 0:return"00";case 1:return"0"+r;default:return r}}function te(e){return"#"+oe(e.red)+oe(e.green)+oe(e.blue)+oe(Math.round(255*e.alpha))}function ie(){return new Promise((function(e){var r=new Image;r.onload=function(){if(null===F)return e(i.Light);F.drawImage(r,0,0);var n=F.getImageData(0,0,1,1).data;(n[0]&n[1]&n[2])<255?e(i.Dark):e(i.Light)},r.onerror=function(){e(i.Unknown)},r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IndoaXRlIi8+PC9zdmc+"}))}function ae(){return L?I.matches?i.Dark:i.Light:i.Unknown}function se(e){var r;(r=e.matches?i.Dark:i.Light)!==ee&&le(ee=r)}function le(e){for(var r=0;r<U.length;r++){var n=U[r];n.fn(e),n.once&&ue(n)}}function ue(e){var r,n=ce(e);-1!==n&&U.splice(n,1),0===U.length&&(c.browser===t.SamsungInternet?(ee=null,null!==re&&(clearInterval(re),re=null)):(r=e.capture,ee=null,"function"==typeof I.removeEventListener?I.removeEventListener("change",se,r):"function"==typeof I.removeListener&&I.removeListener(se)))}function ce(e){for(var r=0;r<U.length;r++)if(U[r].fn===e.fn&&U[r].capture===e.capture)return r;return-1}function de(){var e;Q={},e=N?'meta[name="msapplication-navbutton-color"]':V?'meta[name="msapplication-TileColor"]':'meta[name="theme-color"]';var r=globalThis.document.querySelectorAll(e);if(O&&L&&!N&&!V)for(var n=0;n<r.length;n++){var o=r.item(n),t=o.getAttribute("media");if("(prefers-color-scheme: dark)"===t&&void 0===Q.dark?Q.dark=o:"(prefers-color-scheme: light)"===t&&void 0===Q.light?Q.light=o:null===t&&void 0===Q.default&&(Q.default=o),void 0!==Q.dark&&void 0!==Q.light&&void 0!==Q.default)return}else Q.default=r[0]}function me(){if(!u&&!l){var e=function(){if(N)return globalThis.document.querySelector('meta[name="msapplication-navbutton-color"]');if(V)return globalThis.document.querySelector('meta[name="msapplication-TileColor"]');if(!O||!L)return globalThis.document.querySelector('meta[name="theme-color"]');var e,r=globalThis.document.querySelectorAll('meta[name="theme-color"]');e=ae()===i.Dark?"(prefers-color-scheme: dark)":"(prefers-color-scheme: light)";for(var n=0;n<r.length;n++){var o=r.item(n);if(o.hasAttribute("content")){var t=o.getAttribute("media");if(null===t||t===e)return o}}return null}();return null!==e?e.getAttribute("content"):c.browser===t.Safari?c.isStandalone?ae()===i.Dark?"#ffffffff":"#000000ff":te(X(globalThis.getComputedStyle(globalThis.document.body).backgroundColor)):c.browser===t.Chrome?ae()===i.Dark?"#28292cff":"#ffffffff":void 0}}return function(){if(void 0!==globalThis.MutationObserver){var e=new MutationObserver((function(e){for(var r=0;r<e.length;r++){for(var n=e[r],o=n.addedNodes,t=n.removedNodes,i=0;i<o.length;i++)if(o[i]instanceof HTMLMetaElement)return de();for(i=0;i<t.length;i++)if(t[i]instanceof HTMLMetaElement)return de()}}));"function"==typeof I.addEventListener?I.addEventListener("change",de):"function"==typeof I.addListener&&I.addListener(de),e.observe(globalThis.document.head,{childList:!0}),de()}}(),{installed:!1,name:"Theme",module:ne,Constants:{Appearances:i},Errors:{EasingError:D,UnsupportedEasingFunctionError:H,StepSyntaxError:q,LinearSyntaxError:z,CubicBezierSyntaxError:R,UnsupportedColorError:$}}}));
|
|
1
|
+
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(o="undefined"!=typeof globalThis?globalThis:o||self).Theme=e()}(this,(function(){"use strict";var o,e,r,i,n;!function(o){o.Unknown="Unknown",o.Android="Android",o.iOS="iOS",o.Windows="Windows",o.MacOS="MacOS"}(o||(o={})),function(o){o.Unknown="Unknown",o.Mobile="Mobile",o.Desktop="Desktop"}(e||(e={})),function(o){o.Unknown="Unknown",o.EdgeHTML="EdgeHTML",o.ArkWeb="ArkWeb",o.Blink="Blink",o.Presto="Presto",o.WebKit="WebKit",o.Trident="Trident",o.NetFront="NetFront",o.KHTML="KHTML",o.Tasman="Tasman",o.Gecko="Gecko"}(r||(r={})),function(o){o.Unknown="Unknown",o.Chrome="Chrome",o.Safari="Safari",o.Edge="Edge",o.Firefox="Firefox",o.Opera="Opera",o.IE="IE",o.SamsungInternet="SamsungInternet"}(i||(i={})),function(o){o.NotACrossPlatformFramework="NotACrossPlatformFramework",o.ReactNative="ReactNative",o.Electron="Electron",o.Cordova="Cordova"}(n||(n={}));var a=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",t={device:e.Unknown,os:o.Unknown,engine:r.Unknown,browser:i.Unknown,crossPlatformFramework:n.NotACrossPlatformFramework,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var o=globalThis.document.createElement("canvas");if("function"!=typeof o.getContext)return"";var e=o.getContext("webgl2")||o.getContext("experimental-webgl")||o.getContext("webgl");if(null===e)return"";if(e instanceof WebGLRenderingContext||"getParameter"in e&&"function"==typeof e.getParameter){var r=e.getExtension("WEBGL_debug_renderer_info");return null===r?e.getParameter(e.RENDERER):e.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:a,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(a)},s=[[/windows nt (6\.[23]); arm/i,o.Windows,l],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,o.Windows,l],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,o.Windows,l],[/windows nt ?([\d.)]*)(?!.+xbox)/i,o.Windows,l],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,o.Windows,l],[/windows ce\/?([\d.]*)/i,o.Windows,l],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,o.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,o.iOS,c],[/cfnetwork\/.+darwin/i,o.iOS,c],[/mac os x ?([\w. ]*)/i,o.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,o.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,o.Android],[/android\w*[-\/.; ]?([\d.]*)/i,o.Android]],m=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],d=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function l(o){if(void 0===o)return"";var e={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[o];return void 0!==e?e:o}function c(o){return void 0===o?"":o.replace(/_/g,".")}function w(o,e){return 10===o.major&&0===o.minor&&o.build>=22e3?"11":10===o.major&&0===o.minor&&o.build<22e3?"10":6===o.major&&3===o.minor?"8.1":6===o.major&&2===o.minor?"8":6===o.major&&1===o.minor?"7":6===o.major&&0===o.minor?"Vista":5===o.major&&1===o.minor||5===o.major&&2===o.minor?"XP":5===o.major&&0===o.minor?"2000":4===o.major&&90===o.minor?"ME":4===o.major&&0===o.minor?"NT 4.0":3===o.major&&51===o.minor?"NT 3.11":e}function u(o,e){return"function"==typeof e?e(o):"string"==typeof e?e:void 0===o?"":o}function b(o){var e=o.split(".");return{major:parseInt(e[0]||"0"),minor:parseInt(e[1]||"0"),build:parseInt(e[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(a))&&(t.crossPlatformFramework=n.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(t.crossPlatformFramework=n.ReactNative);for(var f=0;f<s.length;f++){var g=(j=s[f])[0],v=j[1],p=j[2];if(null!==(k=t.userAgent.match(g))){t.os=v,t.osVersion=u(k[1],p);break}}t.os===o.iOS&&0===function(o,e){for(var r=o.split("."),i=e.split("."),n=Math.max(r.length,i.length),a=0;a<n;a++){var t=void 0,s=void 0;if((t=a<r.length?parseInt(r[a],10):0)>(s=a<i.length?parseInt(i[a],10):0))return 1;if(t<s)return-1}return 0}(t.osVersion,"18.6")&&(null!==(E=/\) Version\/([\d.]+)/.exec(t.userAgent))&&parseInt(E[1].substring(0,2),10)>=26&&(t.osVersion=E[1]));for(f=0;f<m.length;f++){g=(j=m[f])[0];var h=j[1];p=j[2];if(null!==(k=t.userAgent.match(g))){t.engine=h,t.engineVersion=u(k[1],p);break}}for(f=0;f<d.length;f++){g=(j=d[f])[0];var j,k,T=j[1];p=j[2];if(null!==(k=t.userAgent.match(g))){t.browser=T,t.browserVersion=u(k[1],p);break}}if(t.crossPlatformFramework===n.ReactNative)try{v=(S=require("react-native").Platform).OS;var E=b(A=""+S.Version);switch(v){case"android":t.os=o.Android,t.osVersion=function(o,e){return o.major>=36?"16":35===o.major?"15":34===o.major?"14":33===o.major?"13":32===o.major?"12.1":31===o.major?"12":30===o.major?"11":29===o.major?"10":28===o.major?"9":27===o.major?"8.1":26===o.major?"8.0":25===o.major?"7.1":24===o.major?"7.0":23===o.major?"6.0":22===o.major?"5.1":21===o.major?"5.0":20===o.major||19===o.major?"4.4":18===o.major?"4.3":17===o.major?"4.2":16===o.major?"4.1":15===o.major?"4.0.3":14===o.major?"4.0":13===o.major?"3.2":12===o.major?"3.1":11===o.major?"3.0":10===o.major?"2.3.3":9===o.major?"2.3":8===o.major?"2.2":7===o.major?"2.1":6===o.major?"2.0.1":5===o.major?"2.0":4===o.major?"1.6":3===o.major?"1.5":2===o.major?"1.1":1===o.major?"1.0":e}(E,A);break;case"ios":t.os=o.iOS,t.osVersion=A;break;case"windows":t.os=o.Windows,t.osVersion=w(E,A);break;case"macos":t.os=o.MacOS,t.osVersion=A}}catch(o){}if(t.isNode)try{var A,S=(v=require("os")).platform();E=b(A=v.release());switch(S){case"win32":t.os=o.Windows,t.osVersion=w(E,A);break;case"darwin":t.os=o.MacOS,t.osVersion=function(o,e){return o.major>=24?o.major-9+"."+o.minor+"."+o.build:23===o.major?"14."+o.minor+"."+o.build:22===o.major?"13."+o.minor+"."+o.build:21===o.major?"12."+o.minor+"."+o.build:20===o.major?"11."+o.minor+"."+o.build:19===o.major?"10.15."+o.minor:18===o.major?"10.14."+o.minor:17===o.major?"10.13."+o.minor:16===o.major?"10.12."+o.minor:15===o.major?"10.11."+o.minor:14===o.major?"10.10."+o.minor:13===o.major?"10.9."+o.minor:o.major>=5&&o.major<=12?"10."+(o.major-4)+"."+o.minor:e}(E,A);break;case"android":t.os=o.Android,t.osVersion=A;break;case"linux":/android/i.test(A)&&(t.os=o.Android,t.osVersion=A)}}catch(o){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(t.crossPlatformFramework=n.Cordova,t.os===o.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":t.os=o.Android;break;case"iOS":t.os=o.iOS}t.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var r,i=e.fullVersionList||e.brands||[],n=e.platformVersion,a=0;a<i.length;a++){var s=null==(r=i[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},m=s.brand,d=s.version;/not.a.brand/i.test(m)||"Chromium"===m&&(t.engineVersion=d)}"string"==typeof n&&(t.os===o.Windows&&parseInt(n.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=n)})),t.device=t.os===o.iOS||t.os===o.Android?e.Mobile:t.os===o.Windows||t.os===o.MacOS?e.Desktop:e.Unknown,t.isMobile=t.device===e.Mobile,t.isDesktop=t.device===e.Desktop,t.isStandalone=function(e){return"matchMedia"in globalThis&&(e===o.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var N=/iemobile/i.test(t.userAgent),V=/windows phone/i.test(t.userAgent),x=null;function O(){return N?"msapplication-navbutton-color":V?"msapplication-TileColor":"theme-color"}function M(){return null!==x&&x.isConnected?x:x=globalThis.document.querySelector('meta[name="'+O()+'"]')}return{installed:!1,name:"Theme",module:{get value(){return(o=M())&&o.getAttribute("content")||void 0;var o},set value(o){var e;void 0===o?(e=M())&&(e.remove(),x=null):function(o){var e=M();null===e&&(e=function(){var o=globalThis.document.createElement("meta");return o.setAttribute("name",O()),globalThis.document.head.prepend(o),x=o}());e.setAttribute("content",o)}(o)}},Constants:{},Errors:{}}}));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AppInstance } from "../types";
|
|
2
2
|
declare global {
|
|
3
|
-
var electronBridge: ElectronShell;
|
|
4
3
|
interface Document {
|
|
5
4
|
webkitVisibilityState?: 'hidden' | 'visible';
|
|
6
5
|
mozVisibilityState?: 'hidden' | 'visible';
|
|
@@ -10,8 +9,5 @@ declare global {
|
|
|
10
9
|
msHidden?: boolean;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
|
-
interface ElectronShell {
|
|
14
|
-
openExternal(url: string): Promise<void>;
|
|
15
|
-
}
|
|
16
12
|
declare const App: AppInstance;
|
|
17
13
|
export default App;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CameraInstance } from "../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const Camera: CameraInstance;
|
|
3
|
+
export default Camera;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ClipboardInstance } from "../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const Clipboard: ClipboardInstance;
|
|
3
|
+
export default Clipboard;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FullscreenInstance } from "../types";
|
|
2
|
-
declare const
|
|
2
|
+
declare const Fullscreen: FullscreenInstance;
|
|
3
3
|
declare global {
|
|
4
4
|
interface HTMLVideoElement {
|
|
5
5
|
webkitEnterFullscreen?: () => void;
|
|
@@ -32,4 +32,4 @@ declare global {
|
|
|
32
32
|
msRequestFullscreen?: () => Promise<void>;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
export default
|
|
35
|
+
export default Fullscreen;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
export declare interface FullscreenInstance {
|
|
2
2
|
enabled: boolean;
|
|
3
|
-
element:
|
|
3
|
+
element: any;
|
|
4
4
|
isFullscreen: boolean;
|
|
5
|
-
request(target?:
|
|
5
|
+
request(target?: any, options?: FullscreenOptions): Promise<void>;
|
|
6
6
|
exit(): Promise<void>;
|
|
7
|
-
toggle(target?:
|
|
7
|
+
toggle(target?: any, options?: FullscreenOptions): Promise<void>;
|
|
8
8
|
onchange(handler: (event: Event) => void): () => void;
|
|
9
9
|
onerror(handler: (event: Event) => void): () => void;
|
|
10
10
|
}
|
|
11
|
-
export declare type BrowserWindow = import('electron').BrowserWindow;
|
|
12
|
-
export declare type IsElectron = typeof process extends {
|
|
13
|
-
versions: {
|
|
14
|
-
electron: string;
|
|
15
|
-
};
|
|
16
|
-
} ? true : false;
|
|
17
|
-
export declare type FullscreenTarget = IsElectron extends true ? BrowserWindow : Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare enum OS {
|
|
2
|
+
Unknown = "Unknown",
|
|
3
|
+
Android = "Android",
|
|
4
|
+
iOS = "iOS",
|
|
5
|
+
Windows = "Windows",
|
|
6
|
+
MacOS = "MacOS"
|
|
7
|
+
}
|
|
8
|
+
export declare enum Devices {
|
|
9
|
+
Unknown = "Unknown",
|
|
10
|
+
Mobile = "Mobile",
|
|
11
|
+
Desktop = "Desktop"
|
|
12
|
+
}
|
|
13
|
+
export declare enum Engines {
|
|
14
|
+
Unknown = "Unknown",
|
|
15
|
+
EdgeHTML = "EdgeHTML",
|
|
16
|
+
ArkWeb = "ArkWeb",
|
|
17
|
+
Blink = "Blink",
|
|
18
|
+
Presto = "Presto",
|
|
19
|
+
WebKit = "WebKit",
|
|
20
|
+
Trident = "Trident",
|
|
21
|
+
NetFront = "NetFront",
|
|
22
|
+
KHTML = "KHTML",
|
|
23
|
+
Tasman = "Tasman",
|
|
24
|
+
Gecko = "Gecko"
|
|
25
|
+
}
|
|
26
|
+
export declare enum Browsers {
|
|
27
|
+
Unknown = "Unknown",
|
|
28
|
+
Chrome = "Chrome",
|
|
29
|
+
Safari = "Safari",
|
|
30
|
+
Edge = "Edge",
|
|
31
|
+
Firefox = "Firefox",
|
|
32
|
+
Opera = "Opera",
|
|
33
|
+
IE = "IE",
|
|
34
|
+
SamsungInternet = "SamsungInternet"
|
|
35
|
+
}
|
|
36
|
+
export declare enum CrossPlatformFramework {
|
|
37
|
+
NotACrossPlatformFramework = "NotACrossPlatformFramework",
|
|
38
|
+
ReactNative = "ReactNative",
|
|
39
|
+
Electron = "Electron",
|
|
40
|
+
Cordova = "Cordova"
|
|
41
|
+
}
|
|
42
|
+
export declare const USER_AGENT: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PlatformInstance } from "../types";
|
|
2
|
+
declare global {
|
|
3
|
+
var cordova: string | undefined;
|
|
4
|
+
var device: CordovaDevice | undefined;
|
|
5
|
+
interface Navigator {
|
|
6
|
+
userAgent?: string;
|
|
7
|
+
userAgentData?: UserAgentData;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
interface CordovaDevice {
|
|
11
|
+
platform: string;
|
|
12
|
+
version: string;
|
|
13
|
+
}
|
|
14
|
+
interface ModernUserAgentDataBrand {
|
|
15
|
+
brand: string;
|
|
16
|
+
version: string;
|
|
17
|
+
}
|
|
18
|
+
type UserAgentDataBrand = ModernUserAgentDataBrand | string | null | undefined;
|
|
19
|
+
interface UserAgentDataValues {
|
|
20
|
+
brands?: UserAgentDataBrand[];
|
|
21
|
+
fullVersionList?: UserAgentDataBrand[];
|
|
22
|
+
platformVersion?: string | null | undefined;
|
|
23
|
+
}
|
|
24
|
+
interface UserAgentData {
|
|
25
|
+
getHighEntropyValues?(hints: string[]): Promise<UserAgentDataValues>;
|
|
26
|
+
}
|
|
27
|
+
declare const Platform: PlatformInstance;
|
|
28
|
+
export default Platform;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NativePlugin } from "../../types";
|
|
2
|
-
import
|
|
3
|
-
import { Browsers, Devices, Engines, OS } from "
|
|
2
|
+
import { PlatformInstance } from "./types";
|
|
3
|
+
import { Browsers, Devices, Engines, OS } from "./constants";
|
|
4
4
|
export * from "./types";
|
|
5
5
|
declare const NativePlatformPlugin: NativePlugin<'Platform', PlatformInstance, {
|
|
6
6
|
OS: typeof OS;
|
|
@@ -2,6 +2,10 @@ export * from "./platform";
|
|
|
2
2
|
import type { PlatformInstance } from "./platform";
|
|
3
3
|
declare module 'native-fn' {
|
|
4
4
|
interface NativePlugins {
|
|
5
|
-
|
|
5
|
+
Theme: PlatformInstance;
|
|
6
|
+
}
|
|
7
|
+
interface NativeConstants {
|
|
8
|
+
}
|
|
9
|
+
interface NativeErrors {
|
|
6
10
|
}
|
|
7
11
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { Devices, Engines,
|
|
1
|
+
import { Browsers, CrossPlatformFramework, Devices, Engines, OS } from "../constants";
|
|
2
2
|
export declare interface PlatformInstance {
|
|
3
3
|
os: OS;
|
|
4
4
|
device: Devices;
|
|
5
5
|
engine: Engines;
|
|
6
6
|
browser: Browsers;
|
|
7
|
+
crossPlatformFramework: CrossPlatformFramework;
|
|
7
8
|
osVersion: string;
|
|
8
9
|
engineVersion: string;
|
|
9
10
|
browserVersion: string;
|
|
10
11
|
renderer: string;
|
|
11
|
-
|
|
12
|
+
userAgent: string;
|
|
13
|
+
isNode: boolean;
|
|
12
14
|
isStandalone: boolean;
|
|
13
15
|
isMobile: boolean;
|
|
14
16
|
isDesktop: boolean;
|
|
17
|
+
isWebview: boolean;
|
|
15
18
|
}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import type { ListenerEntry } from "../types";
|
|
2
|
-
export declare enum Appearances {
|
|
3
|
-
Unknown = "unknown",
|
|
4
|
-
Light = "light",
|
|
5
|
-
Dark = "dark"
|
|
6
|
-
}
|
|
7
|
-
export declare const MEDIA_QUERY_LIST: MediaQueryList;
|
|
8
|
-
export declare const SUPPORT_PREFERS_COLOR_SCHEME: boolean;
|
|
9
|
-
export declare const IS_FULL_SUPPORT_THEME_COLOR: boolean;
|
|
10
|
-
export declare const CONTEXT: CanvasRenderingContext2D | null;
|
|
11
|
-
export declare const SVG_PIXEL_DATA_URL: string;
|
|
12
1
|
export declare const IS_IE_MOBILE: boolean;
|
|
13
2
|
export declare const IS_WINDOWS_PHONE: boolean;
|
|
14
|
-
export declare const ENTRIES: ListenerEntry[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ThemeInstance } from "../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const Theme: ThemeInstance;
|
|
3
|
+
export default Theme;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import type { NativePlugin } from "../../types";
|
|
2
2
|
import type { ThemeInstance } from "./types";
|
|
3
|
-
import { Appearances } from "./constants";
|
|
4
|
-
import { EasingError, UnsupportedEasingFunctionError, StepSyntaxError, LinearSyntaxError, CubicBezierSyntaxError } from "./errors/easing-error";
|
|
5
|
-
import { UnsupportedColorError } from "./errors/unsupported-color-error";
|
|
6
3
|
export * from "./types";
|
|
7
|
-
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {
|
|
8
|
-
Appearances: typeof Appearances;
|
|
9
|
-
}, {
|
|
10
|
-
EasingError: typeof EasingError;
|
|
11
|
-
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
12
|
-
StepSyntaxError: typeof StepSyntaxError;
|
|
13
|
-
LinearSyntaxError: typeof LinearSyntaxError;
|
|
14
|
-
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
15
|
-
UnsupportedColorError: typeof UnsupportedColorError;
|
|
16
|
-
}>;
|
|
4
|
+
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {}, {}>;
|
|
17
5
|
export default NativeThemePlugin;
|
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
export * from "./color";
|
|
2
|
-
export * from "./easing-syntax";
|
|
3
1
|
export * from "./theme";
|
|
4
2
|
import type { ThemeInstance } from "./theme";
|
|
5
|
-
import { Appearances } from "../constants";
|
|
6
|
-
import { UnsupportedColorError } from "../errors/unsupported-color-error";
|
|
7
|
-
import { CubicBezierSyntaxError, EasingError, LinearSyntaxError, StepSyntaxError, UnsupportedEasingFunctionError } from "../errors/easing-error";
|
|
8
3
|
declare module 'native-fn' {
|
|
9
4
|
interface NativePlugins {
|
|
10
5
|
Theme: ThemeInstance;
|
|
11
6
|
}
|
|
12
7
|
interface NativeConstants {
|
|
13
|
-
Appearances: typeof Appearances;
|
|
14
8
|
}
|
|
15
9
|
interface NativeErrors {
|
|
16
|
-
EasingError: typeof EasingError;
|
|
17
|
-
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
18
|
-
StepSyntaxError: typeof StepSyntaxError;
|
|
19
|
-
LinearSyntaxError: typeof LinearSyntaxError;
|
|
20
|
-
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
21
|
-
UnsupportedColorError: typeof UnsupportedColorError;
|
|
22
10
|
}
|
|
23
11
|
}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
import { Appearances } from "../constants";
|
|
2
|
-
import type { EasingKeyword, EasingSyntax, Color } from "../types";
|
|
3
|
-
export declare interface ListenerEntry {
|
|
4
|
-
fn: (appearance: Appearances) => any;
|
|
5
|
-
capture: boolean;
|
|
6
|
-
once: boolean;
|
|
7
|
-
signal?: AbortSignal;
|
|
8
|
-
}
|
|
9
|
-
export declare type ThemeColorMetaAppearanceKeys = 'default' | 'dark' | 'light';
|
|
10
|
-
export declare type ThemeColorMetaGroup = Partial<Record<ThemeColorMetaAppearanceKeys, HTMLMetaElement>>;
|
|
11
|
-
export declare interface SetThemeColorOptions {
|
|
12
|
-
appearance?: ThemeColorMetaAppearanceKeys;
|
|
13
|
-
duration?: number;
|
|
14
|
-
easingFunction?: EasingSyntax | EasingKeyword;
|
|
15
|
-
defaultColor?: string;
|
|
16
|
-
}
|
|
17
1
|
export declare interface ThemeInstance {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
removeThemeColor(appearance?: ThemeColorMetaAppearanceKeys): void;
|
|
21
|
-
getAppearance(): Promise<Appearances>;
|
|
22
|
-
setAppearance(appearances?: Exclude<Appearances, Appearances.Unknown>): void;
|
|
23
|
-
onAppearanceChange(listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions): () => void;
|
|
2
|
+
get value(): string | undefined;
|
|
3
|
+
set value(color: string | undefined);
|
|
24
4
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AppInstance } from "../types";
|
|
2
2
|
declare global {
|
|
3
|
-
var electronBridge: ElectronShell;
|
|
4
3
|
interface Document {
|
|
5
4
|
webkitVisibilityState?: 'hidden' | 'visible';
|
|
6
5
|
mozVisibilityState?: 'hidden' | 'visible';
|
|
@@ -10,8 +9,5 @@ declare global {
|
|
|
10
9
|
msHidden?: boolean;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
|
-
interface ElectronShell {
|
|
14
|
-
openExternal(url: string): Promise<void>;
|
|
15
|
-
}
|
|
16
12
|
declare const App: AppInstance;
|
|
17
13
|
export default App;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CameraInstance } from "../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const Camera: CameraInstance;
|
|
3
|
+
export default Camera;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ClipboardInstance } from "../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const Clipboard: ClipboardInstance;
|
|
3
|
+
export default Clipboard;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FullscreenInstance } from "../types";
|
|
2
|
-
declare const
|
|
2
|
+
declare const Fullscreen: FullscreenInstance;
|
|
3
3
|
declare global {
|
|
4
4
|
interface HTMLVideoElement {
|
|
5
5
|
webkitEnterFullscreen?: () => void;
|
|
@@ -32,4 +32,4 @@ declare global {
|
|
|
32
32
|
msRequestFullscreen?: () => Promise<void>;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
export default
|
|
35
|
+
export default Fullscreen;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
export declare interface FullscreenInstance {
|
|
2
2
|
enabled: boolean;
|
|
3
|
-
element:
|
|
3
|
+
element: any;
|
|
4
4
|
isFullscreen: boolean;
|
|
5
|
-
request(target?:
|
|
5
|
+
request(target?: any, options?: FullscreenOptions): Promise<void>;
|
|
6
6
|
exit(): Promise<void>;
|
|
7
|
-
toggle(target?:
|
|
7
|
+
toggle(target?: any, options?: FullscreenOptions): Promise<void>;
|
|
8
8
|
onchange(handler: (event: Event) => void): () => void;
|
|
9
9
|
onerror(handler: (event: Event) => void): () => void;
|
|
10
10
|
}
|
|
11
|
-
export declare type BrowserWindow = import('electron').BrowserWindow;
|
|
12
|
-
export declare type IsElectron = typeof process extends {
|
|
13
|
-
versions: {
|
|
14
|
-
electron: string;
|
|
15
|
-
};
|
|
16
|
-
} ? true : false;
|
|
17
|
-
export declare type FullscreenTarget = IsElectron extends true ? BrowserWindow : Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare enum OS {
|
|
2
|
+
Unknown = "Unknown",
|
|
3
|
+
Android = "Android",
|
|
4
|
+
iOS = "iOS",
|
|
5
|
+
Windows = "Windows",
|
|
6
|
+
MacOS = "MacOS"
|
|
7
|
+
}
|
|
8
|
+
export declare enum Devices {
|
|
9
|
+
Unknown = "Unknown",
|
|
10
|
+
Mobile = "Mobile",
|
|
11
|
+
Desktop = "Desktop"
|
|
12
|
+
}
|
|
13
|
+
export declare enum Engines {
|
|
14
|
+
Unknown = "Unknown",
|
|
15
|
+
EdgeHTML = "EdgeHTML",
|
|
16
|
+
ArkWeb = "ArkWeb",
|
|
17
|
+
Blink = "Blink",
|
|
18
|
+
Presto = "Presto",
|
|
19
|
+
WebKit = "WebKit",
|
|
20
|
+
Trident = "Trident",
|
|
21
|
+
NetFront = "NetFront",
|
|
22
|
+
KHTML = "KHTML",
|
|
23
|
+
Tasman = "Tasman",
|
|
24
|
+
Gecko = "Gecko"
|
|
25
|
+
}
|
|
26
|
+
export declare enum Browsers {
|
|
27
|
+
Unknown = "Unknown",
|
|
28
|
+
Chrome = "Chrome",
|
|
29
|
+
Safari = "Safari",
|
|
30
|
+
Edge = "Edge",
|
|
31
|
+
Firefox = "Firefox",
|
|
32
|
+
Opera = "Opera",
|
|
33
|
+
IE = "IE",
|
|
34
|
+
SamsungInternet = "SamsungInternet"
|
|
35
|
+
}
|
|
36
|
+
export declare enum CrossPlatformFramework {
|
|
37
|
+
NotACrossPlatformFramework = "NotACrossPlatformFramework",
|
|
38
|
+
ReactNative = "ReactNative",
|
|
39
|
+
Electron = "Electron",
|
|
40
|
+
Cordova = "Cordova"
|
|
41
|
+
}
|
|
42
|
+
export declare const USER_AGENT: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PlatformInstance } from "../types";
|
|
2
|
+
declare global {
|
|
3
|
+
var cordova: string | undefined;
|
|
4
|
+
var device: CordovaDevice | undefined;
|
|
5
|
+
interface Navigator {
|
|
6
|
+
userAgent?: string;
|
|
7
|
+
userAgentData?: UserAgentData;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
interface CordovaDevice {
|
|
11
|
+
platform: string;
|
|
12
|
+
version: string;
|
|
13
|
+
}
|
|
14
|
+
interface ModernUserAgentDataBrand {
|
|
15
|
+
brand: string;
|
|
16
|
+
version: string;
|
|
17
|
+
}
|
|
18
|
+
type UserAgentDataBrand = ModernUserAgentDataBrand | string | null | undefined;
|
|
19
|
+
interface UserAgentDataValues {
|
|
20
|
+
brands?: UserAgentDataBrand[];
|
|
21
|
+
fullVersionList?: UserAgentDataBrand[];
|
|
22
|
+
platformVersion?: string | null | undefined;
|
|
23
|
+
}
|
|
24
|
+
interface UserAgentData {
|
|
25
|
+
getHighEntropyValues?(hints: string[]): Promise<UserAgentDataValues>;
|
|
26
|
+
}
|
|
27
|
+
declare const Platform: PlatformInstance;
|
|
28
|
+
export default Platform;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NativePlugin } from "../../types";
|
|
2
|
-
import
|
|
3
|
-
import { Browsers, Devices, Engines, OS } from "
|
|
2
|
+
import { PlatformInstance } from "./types";
|
|
3
|
+
import { Browsers, Devices, Engines, OS } from "./constants";
|
|
4
4
|
export * from "./types";
|
|
5
5
|
declare const NativePlatformPlugin: NativePlugin<'Platform', PlatformInstance, {
|
|
6
6
|
OS: typeof OS;
|
|
@@ -2,6 +2,10 @@ export * from "./platform";
|
|
|
2
2
|
import type { PlatformInstance } from "./platform";
|
|
3
3
|
declare module 'native-fn' {
|
|
4
4
|
interface NativePlugins {
|
|
5
|
-
|
|
5
|
+
Theme: PlatformInstance;
|
|
6
|
+
}
|
|
7
|
+
interface NativeConstants {
|
|
8
|
+
}
|
|
9
|
+
interface NativeErrors {
|
|
6
10
|
}
|
|
7
11
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { Devices, Engines,
|
|
1
|
+
import { Browsers, CrossPlatformFramework, Devices, Engines, OS } from "../constants";
|
|
2
2
|
export declare interface PlatformInstance {
|
|
3
3
|
os: OS;
|
|
4
4
|
device: Devices;
|
|
5
5
|
engine: Engines;
|
|
6
6
|
browser: Browsers;
|
|
7
|
+
crossPlatformFramework: CrossPlatformFramework;
|
|
7
8
|
osVersion: string;
|
|
8
9
|
engineVersion: string;
|
|
9
10
|
browserVersion: string;
|
|
10
11
|
renderer: string;
|
|
11
|
-
|
|
12
|
+
userAgent: string;
|
|
13
|
+
isNode: boolean;
|
|
12
14
|
isStandalone: boolean;
|
|
13
15
|
isMobile: boolean;
|
|
14
16
|
isDesktop: boolean;
|
|
17
|
+
isWebview: boolean;
|
|
15
18
|
}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import type { ListenerEntry } from "../types";
|
|
2
|
-
export declare enum Appearances {
|
|
3
|
-
Unknown = "unknown",
|
|
4
|
-
Light = "light",
|
|
5
|
-
Dark = "dark"
|
|
6
|
-
}
|
|
7
|
-
export declare const MEDIA_QUERY_LIST: MediaQueryList;
|
|
8
|
-
export declare const SUPPORT_PREFERS_COLOR_SCHEME: boolean;
|
|
9
|
-
export declare const IS_FULL_SUPPORT_THEME_COLOR: boolean;
|
|
10
|
-
export declare const CONTEXT: CanvasRenderingContext2D | null;
|
|
11
|
-
export declare const SVG_PIXEL_DATA_URL: string;
|
|
12
1
|
export declare const IS_IE_MOBILE: boolean;
|
|
13
2
|
export declare const IS_WINDOWS_PHONE: boolean;
|
|
14
|
-
export declare const ENTRIES: ListenerEntry[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ThemeInstance } from "../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const Theme: ThemeInstance;
|
|
3
|
+
export default Theme;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import type { NativePlugin } from "../../types";
|
|
2
2
|
import type { ThemeInstance } from "./types";
|
|
3
|
-
import { Appearances } from "./constants";
|
|
4
|
-
import { EasingError, UnsupportedEasingFunctionError, StepSyntaxError, LinearSyntaxError, CubicBezierSyntaxError } from "./errors/easing-error";
|
|
5
|
-
import { UnsupportedColorError } from "./errors/unsupported-color-error";
|
|
6
3
|
export * from "./types";
|
|
7
|
-
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {
|
|
8
|
-
Appearances: typeof Appearances;
|
|
9
|
-
}, {
|
|
10
|
-
EasingError: typeof EasingError;
|
|
11
|
-
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
12
|
-
StepSyntaxError: typeof StepSyntaxError;
|
|
13
|
-
LinearSyntaxError: typeof LinearSyntaxError;
|
|
14
|
-
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
15
|
-
UnsupportedColorError: typeof UnsupportedColorError;
|
|
16
|
-
}>;
|
|
4
|
+
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {}, {}>;
|
|
17
5
|
export default NativeThemePlugin;
|