@gospore/theme 1.0.81 → 1.0.82
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/theme.es.js +14 -14
- package/dist/theme.umd.js +2 -2
- package/package.json +2 -2
package/dist/theme.es.js
CHANGED
|
@@ -3,7 +3,7 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
|
|
|
3
3
|
var whatInput = { exports: {} };
|
|
4
4
|
/**
|
|
5
5
|
* what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
|
|
6
|
-
* @version v5.2.
|
|
6
|
+
* @version v5.2.11
|
|
7
7
|
* @link https://github.com/ten1seven/what-input
|
|
8
8
|
* @license MIT
|
|
9
9
|
*/
|
|
@@ -103,27 +103,27 @@ var whatInput = { exports: {} };
|
|
|
103
103
|
addListeners();
|
|
104
104
|
};
|
|
105
105
|
var addListeners = function addListeners2() {
|
|
106
|
-
var options = supportsPassive ? { passive: true } :
|
|
107
|
-
document.addEventListener("DOMContentLoaded", setPersist);
|
|
106
|
+
var options = supportsPassive ? { passive: true, capture: true } : true;
|
|
107
|
+
document.addEventListener("DOMContentLoaded", setPersist, true);
|
|
108
108
|
if (window.PointerEvent) {
|
|
109
|
-
window.addEventListener("pointerdown", setInput);
|
|
110
|
-
window.addEventListener("pointermove", setIntent);
|
|
109
|
+
window.addEventListener("pointerdown", setInput, true);
|
|
110
|
+
window.addEventListener("pointermove", setIntent, true);
|
|
111
111
|
} else if (window.MSPointerEvent) {
|
|
112
|
-
window.addEventListener("MSPointerDown", setInput);
|
|
113
|
-
window.addEventListener("MSPointerMove", setIntent);
|
|
112
|
+
window.addEventListener("MSPointerDown", setInput, true);
|
|
113
|
+
window.addEventListener("MSPointerMove", setIntent, true);
|
|
114
114
|
} else {
|
|
115
|
-
window.addEventListener("mousedown", setInput);
|
|
116
|
-
window.addEventListener("mousemove", setIntent);
|
|
115
|
+
window.addEventListener("mousedown", setInput, true);
|
|
116
|
+
window.addEventListener("mousemove", setIntent, true);
|
|
117
117
|
if ("ontouchstart" in window) {
|
|
118
118
|
window.addEventListener("touchstart", setInput, options);
|
|
119
|
-
window.addEventListener("touchend", setInput);
|
|
119
|
+
window.addEventListener("touchend", setInput, true);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
window.addEventListener(detectWheel(), setIntent, options);
|
|
123
|
-
window.addEventListener("keydown", setInput);
|
|
124
|
-
window.addEventListener("keyup", setInput);
|
|
125
|
-
window.addEventListener("focusin", setElement);
|
|
126
|
-
window.addEventListener("focusout", clearElement);
|
|
123
|
+
window.addEventListener("keydown", setInput, true);
|
|
124
|
+
window.addEventListener("keyup", setInput, true);
|
|
125
|
+
window.addEventListener("focusin", setElement, true);
|
|
126
|
+
window.addEventListener("focusout", clearElement, true);
|
|
127
127
|
};
|
|
128
128
|
var setPersist = function setPersist2() {
|
|
129
129
|
shouldPersist = !(docElem.getAttribute("data-whatpersist") || document.body.getAttribute("data-whatpersist") === "false");
|
package/dist/theme.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(t,f){typeof exports=="object"&&typeof module!="undefined"?f(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],f):(t=typeof globalThis!="undefined"?globalThis:t||self,f(t.theme={},t.Vue))})(this,function(t,f){"use strict";var A=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},K={exports:{}};/**
|
|
2
2
|
* what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
|
|
3
|
-
* @version v5.2.
|
|
3
|
+
* @version v5.2.11
|
|
4
4
|
* @link https://github.com/ten1seven/what-input
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/(function(a,E){(function(l,
|
|
6
|
+
*/(function(a,E){(function(l,i){a.exports=i()})(A,function(){return function(d){var l={};function i(u){if(l[u])return l[u].exports;var s=l[u]={exports:{},id:u,loaded:!1};return d[u].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}return i.m=d,i.c=l,i.p="",i(0)}([function(d,l){d.exports=function(){if(typeof document=="undefined"||typeof window=="undefined")return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var i=document.documentElement,u=null,s="initial",c=s,T=Date.now(),b="false",Ne=["button","input","select","textarea"],h=[],O=[16,17,18,91,93],v=[],k={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},g=!1,y={x:null,y:null},Me={2:"touch",3:"touch",4:"mouse"},B=!1;try{var Ee=Object.defineProperty({},"passive",{get:function(){B=!0}});window.addEventListener("test",null,Ee)}catch{}var be=function(){k[D()]="mouse",ke()},ke=function(){var e=B?{passive:!0,capture:!0}:!0;document.addEventListener("DOMContentLoaded",Le,!0),window.PointerEvent?(window.addEventListener("pointerdown",p,!0),window.addEventListener("pointermove",N,!0)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",p,!0),window.addEventListener("MSPointerMove",N,!0)):(window.addEventListener("mousedown",p,!0),window.addEventListener("mousemove",N,!0),"ontouchstart"in window&&(window.addEventListener("touchstart",p,e),window.addEventListener("touchend",p,!0))),window.addEventListener(D(),N,e),window.addEventListener("keydown",p,!0),window.addEventListener("keyup",p,!0),window.addEventListener("focusin",Se,!0),window.addEventListener("focusout",P,!0)},Le=function(){if(b=!(i.getAttribute("data-whatpersist")||document.body.getAttribute("data-whatpersist")==="false"),b)try{window.sessionStorage.getItem("what-input")&&(s=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(c=window.sessionStorage.getItem("what-intent"))}catch{}m("input"),m("intent")},p=function(e){var n=e.which,r=k[e.type];r==="pointer"&&(r=C(e));var Pe=!v.length&&O.indexOf(n)===-1,Ce=v.length&&v.indexOf(n)!==-1,S=r==="keyboard"&&n&&(Pe||Ce)||r==="mouse"||r==="touch";if(I(r)&&(S=!1),S&&s!==r&&(s=r,L("input",s),m("input")),S&&c!==r){var w=document.activeElement,Ie=w&&w.nodeName&&(Ne.indexOf(w.nodeName.toLowerCase())===-1||w.nodeName.toLowerCase()==="button"&&!Be(w,"form"));Ie&&(c=r,L("intent",c),m("intent"))}},m=function(e){i.setAttribute("data-what"+e,e==="input"?s:c),_e(e)},N=function(e){var n=k[e.type];n==="pointer"&&(n=C(e)),Oe(e),(!g&&!I(n)||g&&e.type==="wheel"||e.type==="mousewheel"||e.type==="DOMMouseScroll")&&c!==n&&(c=n,L("intent",c),m("intent"))},Se=function(e){if(!e.target.nodeName){P();return}u=e.target.nodeName.toLowerCase(),i.setAttribute("data-whatelement",u),e.target.classList&&e.target.classList.length&&i.setAttribute("data-whatclasses",e.target.classList.toString().replace(" ",","))},P=function(){u=null,i.removeAttribute("data-whatelement"),i.removeAttribute("data-whatclasses")},L=function(e,n){if(b)try{window.sessionStorage.setItem("what-"+e,n)}catch{}},C=function(e){return typeof e.pointerType=="number"?Me[e.pointerType]:e.pointerType==="pen"?"touch":e.pointerType},I=function(e){var n=Date.now(),r=e==="mouse"&&s==="touch"&&n-T<200;return T=n,r},D=function(){var e=null;return"onwheel"in document.createElement("div")?e="wheel":e=document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",e},_e=function(e){for(var n=0,r=h.length;n<r;n++)h[n].type===e&&h[n].fn.call(void 0,e==="input"?s:c)},Te=function(e){for(var n=0,r=h.length;n<r;n++)if(h[n].fn===e)return n},Oe=function(e){y.x!==e.screenX||y.y!==e.screenY?(g=!1,y.x=e.screenX,y.y=e.screenY):g=!0},Be=function(e,n){var r=window.Element.prototype;if(r.matches||(r.matches=r.msMatchesSelector||r.webkitMatchesSelector),r.closest)return e.closest(n);do{if(e.matches(n))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null};return"addEventListener"in window&&Array.prototype.indexOf&&be(),{ask:function(e){return e==="intent"?c:s},element:function(){return u},ignoreKeys:function(e){O=e},specificKeys:function(e){v=e},registerOnChange:function(e,n){h.push({fn:e,type:n||"input"})},unRegisterOnChange:function(e){var n=Te(e);(n||n===0)&&h.splice(n,1)},clearStorage:function(){window.sessionStorage.clear()}}}()}])})})(K);var De="",R=(a,E)=>{const d=a.__vccOpts||a;for(const[l,i]of E)d[l]=i;return d};const U={name:"Theme",provide(){return{theme:this.theme}},data(){return{theme:{darkMode:window.matchMedia("(prefers-color-scheme: dark)").matches}}},watch:{theme:{handler(){document.documentElement.setAttribute("dark-mode",this.theme.darkMode)},deep:!0,immediate:!0}},created(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.updateDarkMode);var a=document.createElement("meta");a.name="color-scheme",a.setAttribute("content","light dark"),document.getElementsByTagName("head")[0].appendChild(a)},beforeUnmount(){window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",this.updateDarkMode)},methods:{updateDarkMode(a){!a||(this.theme.darkMode=a.matches)}}},j={class:"theme"};function Y(a,E,d,l,i,u){return f.openBlock(),f.createElementBlock("div",j,[f.renderSlot(a.$slots,"default")])}var G=R(U,[["render",Y]]);const $="hsl(225, 90%, 16%)",q="#061f80",M="hsl(225, 94%, 35%)",F="#06c",V="hsl(210, 100%, 50%)",W="hsl(210, 100%, 93%)",X="hsl(225, 100%, 96%)",z="hsl(12, 91%, 46%)",H="hsl(11, 100%, 59%)",J="hsl(40, 100%, 50%)",Q="hsl(46, 100%, 50%)",Z="hsl(120, 100%, 25%)",x="#36b37e",ee="hsl(0, 0%, 0%)",te="hsl(218, 76%, 15%)",ne="hsla(0,0%,10%,.9)",oe="hsla(0,0%,10%,.6)",re="hsl(218, 20%, 39%)",ie="hsl(218, 17%, 44%)",se="hsl(218, 14%, 49%)",ae="hsl(218, 14%, 54%)",ue="hsl(218, 13%, 59%)",ce="hsl(218, 13%, 64%)",de="hsl(217, 13%, 69%)",le="hsl(223, 12%, 89%)",fe="hsl(228, 14%, 93%)",he="hsl(210, 7%, 95%)",pe="hsl(220, 16%, 96%)",me="hsl(210, 25%, 98%)",we="hsl(0, 0%, 98%)",_="hsl(0, 0%, 100%)",ve=M,ge=M,ye=_;t.B100=X,t.B200=W,t.B300=V,t.B400=F,t.B500=M,t.B600=q,t.B900=$,t.G300=x,t.G500=Z,t.N0=_,t.N10=me,t.N100=ae,t.N1000=ee,t.N20=pe,t.N200=se,t.N25=he,t.N30=fe,t.N300=ie,t.N40=le,t.N400=re,t.N5=we,t.N500=oe,t.N70=de,t.N80=ce,t.N800=ne,t.N90=ue,t.N900=te,t.R300=H,t.R400=z,t.Y200=Q,t.Y300=J,t.default=G,t.primary1=ve,t.primary2=ge,t.primary3=ye,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gospore/theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.82",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Gospore",
|
|
6
6
|
"files": [
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@vitejs/plugin-vue": "^2.2.2",
|
|
25
25
|
"vite": "^2.8.4"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "a6b16cd62df4ff02a5a387e5548e11f56c57ec35"
|
|
28
28
|
}
|