diff --git a/assets/htmx.min.js b/assets/htmx.min.js new file mode 100644 index 0000000..47eb70f --- /dev/null +++ b/assets/htmx.min.js @@ -0,0 +1 @@ +(function(e,t){if(typeof define==="function"&&define.amd){define([],t)}else if(typeof module==="object"&&module.exports){module.exports=t()}else{e.htmx=e.htmx||t()}})(typeof self!=="undefined"?self:this,function(){return function(){"use strict";var Q={onLoad:F,process:zt,on:de,off:ge,trigger:ce,ajax:Nr,find:C,findAll:f,closest:v,values:function(e,t){var r=dr(e,t||"post");return r.values},remove:_,addClass:z,removeClass:n,toggleClass:$,takeClass:W,defineExtension:Ur,removeExtension:Br,logAll:V,logNone:j,logger:null,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,allowScriptTags:true,inlineScriptNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:false,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",useTemplateFragments:false,scrollBehavior:"smooth",defaultFocusScroll:false,getCacheBusterParam:false,globalViewTransitions:false,methodsThatUseUrlParams:["get"],selfRequestsOnly:false,ignoreTitle:false,scrollIntoViewOnBoost:true,triggerSpecsCache:null},parseInterval:d,_:t,createEventSource:function(e){return new EventSource(e,{withCredentials:true})},createWebSocket:function(e){var t=new WebSocket(e,[]);t.binaryType=Q.config.wsBinaryType;return t},version:"1.9.10"};var r={addTriggerHandler:Lt,bodyContains:se,canAccessLocalStorage:U,findThisElement:xe,filterValues:yr,hasAttribute:o,getAttributeValue:te,getClosestAttributeValue:ne,getClosestMatch:c,getExpressionVars:Hr,getHeaders:xr,getInputValues:dr,getInternalData:ae,getSwapSpecification:wr,getTriggerSpecs:it,getTarget:ye,makeFragment:l,mergeObjects:le,makeSettleInfo:T,oobSwap:Ee,querySelectorExt:ue,selectAndSwap:je,settleImmediately:nr,shouldCancel:ut,triggerEvent:ce,triggerErrorEvent:fe,withExtensions:R};var w=["get","post","put","delete","patch"];var i=w.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");var S=e("head"),q=e("title"),H=e("svg",true);function e(e,t=false){return new RegExp(`<${e}(\\s[^>]*>|>)([\\s\\S]*?)<\\/${e}>`,t?"gim":"im")}function d(e){if(e==undefined){return undefined}let t=NaN;if(e.slice(-2)=="ms"){t=parseFloat(e.slice(0,-2))}else if(e.slice(-1)=="s"){t=parseFloat(e.slice(0,-1))*1e3}else if(e.slice(-1)=="m"){t=parseFloat(e.slice(0,-1))*1e3*60}else{t=parseFloat(e)}return isNaN(t)?undefined:t}function ee(e,t){return e.getAttribute&&e.getAttribute(t)}function o(e,t){return e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function te(e,t){return ee(e,t)||ee(e,"data-"+t)}function u(e){return e.parentElement}function re(){return document}function c(e,t){while(e&&!t(e)){e=u(e)}return e?e:null}function L(e,t,r){var n=te(t,r);var i=te(t,"hx-disinherit");if(e!==t&&i&&(i==="*"||i.split(" ").indexOf(r)>=0)){return"unset"}else{return n}}function ne(t,r){var n=null;c(t,function(e){return n=L(t,e,r)});if(n!=="unset"){return n}}function h(e,t){var r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return r&&r.call(e,t)}function A(e){var t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var r=t.exec(e);if(r){return r[1].toLowerCase()}else{return""}}function a(e,t){var r=new DOMParser;var n=r.parseFromString(e,"text/html");var i=n.body;while(t>0){t--;i=i.firstChild}if(i==null){i=re().createDocumentFragment()}return i}function N(e){return/",0);return i.querySelector("template").content}switch(r){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return a(""+n+"
",1);case"col":return a(""+n+"
",2);case"tr":return a(""+n+"
",2);case"td":case"th":return a(""+n+"
",3);case"script":case"style":return a("
"+n+"
",1);default:return a(n,0)}}function ie(e){if(e){e()}}function I(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function k(e){return I(e,"Function")}function P(e){return I(e,"Object")}function ae(e){var t="htmx-internal-data";var r=e[t];if(!r){r=e[t]={}}return r}function M(e){var t=[];if(e){for(var r=0;r=0}function se(e){if(e.getRootNode&&e.getRootNode()instanceof window.ShadowRoot){return re().body.contains(e.getRootNode().host)}else{return re().body.contains(e)}}function D(e){return e.trim().split(/\s+/)}function le(e,t){for(var r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e}function E(e){try{return JSON.parse(e)}catch(e){b(e);return null}}function U(){var e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function B(t){try{var e=new URL(t);if(e){t=e.pathname+e.search}if(!/^\/$/.test(t)){t=t.replace(/\/+$/,"")}return t}catch(e){return t}}function t(e){return Tr(re().body,function(){return eval(e)})}function F(t){var e=Q.on("htmx:load",function(e){t(e.detail.elt)});return e}function V(){Q.logger=function(e,t,r){if(console){console.log(t,e,r)}}}function j(){Q.logger=null}function C(e,t){if(t){return e.querySelector(t)}else{return C(re(),e)}}function f(e,t){if(t){return e.querySelectorAll(t)}else{return f(re(),e)}}function _(e,t){e=g(e);if(t){setTimeout(function(){_(e);e=null},t)}else{e.parentElement.removeChild(e)}}function z(e,t,r){e=g(e);if(r){setTimeout(function(){z(e,t);e=null},r)}else{e.classList&&e.classList.add(t)}}function n(e,t,r){e=g(e);if(r){setTimeout(function(){n(e,t);e=null},r)}else{if(e.classList){e.classList.remove(t);if(e.classList.length===0){e.removeAttribute("class")}}}}function $(e,t){e=g(e);e.classList.toggle(t)}function W(e,t){e=g(e);oe(e.parentElement.children,function(e){n(e,t)});z(e,t)}function v(e,t){e=g(e);if(e.closest){return e.closest(t)}else{do{if(e==null||h(e,t)){return e}}while(e=e&&u(e));return null}}function s(e,t){return e.substring(0,t.length)===t}function G(e,t){return e.substring(e.length-t.length)===t}function J(e){var t=e.trim();if(s(t,"<")&&G(t,"/>")){return t.substring(1,t.length-2)}else{return t}}function Z(e,t){if(t.indexOf("closest ")===0){return[v(e,J(t.substr(8)))]}else if(t.indexOf("find ")===0){return[C(e,J(t.substr(5)))]}else if(t==="next"){return[e.nextElementSibling]}else if(t.indexOf("next ")===0){return[K(e,J(t.substr(5)))]}else if(t==="previous"){return[e.previousElementSibling]}else if(t.indexOf("previous ")===0){return[Y(e,J(t.substr(9)))]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else if(t==="body"){return[document.body]}else{return re().querySelectorAll(J(t))}}var K=function(e,t){var r=re().querySelectorAll(t);for(var n=0;n=0;n--){var i=r[n];if(i.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING){return i}}};function ue(e,t){if(t){return Z(e,t)[0]}else{return Z(re().body,e)[0]}}function g(e){if(I(e,"String")){return C(e)}else{return e}}function ve(e,t,r){if(k(t)){return{target:re().body,event:e,listener:t}}else{return{target:g(e),event:t,listener:r}}}function de(t,r,n){jr(function(){var e=ve(t,r,n);e.target.addEventListener(e.event,e.listener)});var e=k(r);return e?r:n}function ge(t,r,n){jr(function(){var e=ve(t,r,n);e.target.removeEventListener(e.event,e.listener)});return k(r)?r:n}var me=re().createElement("output");function pe(e,t){var r=ne(e,t);if(r){if(r==="this"){return[xe(e,t)]}else{var n=Z(e,r);if(n.length===0){b('The selector "'+r+'" on '+t+" returned no matches!");return[me]}else{return n}}}}function xe(e,t){return c(e,function(e){return te(e,t)!=null})}function ye(e){var t=ne(e,"hx-target");if(t){if(t==="this"){return xe(e,"hx-target")}else{return ue(e,t)}}else{var r=ae(e);if(r.boosted){return re().body}else{return e}}}function be(e){var t=Q.config.attributesToSettle;for(var r=0;r0){o=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{o=e}var r=re().querySelectorAll(t);if(r){oe(r,function(e){var t;var r=i.cloneNode(true);t=re().createDocumentFragment();t.appendChild(r);if(!Se(o,e)){t=r}var n={shouldSwap:true,target:e,fragment:t};if(!ce(e,"htmx:oobBeforeSwap",n))return;e=n.target;if(n["shouldSwap"]){Fe(o,e,e,t,a)}oe(a.elts,function(e){ce(e,"htmx:oobAfterSwap",n)})});i.parentNode.removeChild(i)}else{i.parentNode.removeChild(i);fe(re().body,"htmx:oobErrorNoTarget",{content:i})}return e}function Ce(e,t,r){var n=ne(e,"hx-select-oob");if(n){var i=n.split(",");for(var a=0;a0){var r=t.replace("'","\\'");var n=e.tagName.replace(":","\\:");var i=o.querySelector(n+"[id='"+r+"']");if(i&&i!==o){var a=e.cloneNode();we(e,i);s.tasks.push(function(){we(e,a)})}}})}function Oe(e){return function(){n(e,Q.config.addedClass);zt(e);Nt(e);qe(e);ce(e,"htmx:load")}}function qe(e){var t="[autofocus]";var r=h(e,t)?e:e.querySelector(t);if(r!=null){r.focus()}}function m(e,t,r,n){Te(e,r,n);while(r.childNodes.length>0){var i=r.firstChild;z(i,Q.config.addedClass);e.insertBefore(i,t);if(i.nodeType!==Node.TEXT_NODE&&i.nodeType!==Node.COMMENT_NODE){n.tasks.push(Oe(i))}}}function He(e,t){var r=0;while(r-1){var t=e.replace(H,"");var r=t.match(q);if(r){return r[2]}}}function je(e,t,r,n,i,a){i.title=Ve(n);var o=l(n);if(o){Ce(r,o,i);o=Be(r,o,a);Re(o);return Fe(e,r,t,o,i)}}function _e(e,t,r){var n=e.getResponseHeader(t);if(n.indexOf("{")===0){var i=E(n);for(var a in i){if(i.hasOwnProperty(a)){var o=i[a];if(!P(o)){o={value:o}}ce(r,a,o)}}}else{var s=n.split(",");for(var l=0;l0){var o=t[0];if(o==="]"){n--;if(n===0){if(a===null){i=i+"true"}t.shift();i+=")})";try{var s=Tr(e,function(){return Function(i)()},function(){return true});s.source=i;return s}catch(e){fe(re().body,"htmx:syntax:error",{error:e,source:i});return null}}}else if(o==="["){n++}if(Qe(o,a,r)){i+="(("+r+"."+o+") ? ("+r+"."+o+") : (window."+o+"))"}else{i=i+o}a=t.shift()}}}function y(e,t){var r="";while(e.length>0&&!t.test(e[0])){r+=e.shift()}return r}function tt(e){var t;if(e.length>0&&Ze.test(e[0])){e.shift();t=y(e,Ke).trim();e.shift()}else{t=y(e,x)}return t}var rt="input, textarea, select";function nt(e,t,r){var n=[];var i=Ye(t);do{y(i,Je);var a=i.length;var o=y(i,/[,\[\s]/);if(o!==""){if(o==="every"){var s={trigger:"every"};y(i,Je);s.pollInterval=d(y(i,/[,\[\s]/));y(i,Je);var l=et(e,i,"event");if(l){s.eventFilter=l}n.push(s)}else if(o.indexOf("sse:")===0){n.push({trigger:"sse",sseEvent:o.substr(4)})}else{var u={trigger:o};var l=et(e,i,"event");if(l){u.eventFilter=l}while(i.length>0&&i[0]!==","){y(i,Je);var f=i.shift();if(f==="changed"){u.changed=true}else if(f==="once"){u.once=true}else if(f==="consume"){u.consume=true}else if(f==="delay"&&i[0]===":"){i.shift();u.delay=d(y(i,x))}else if(f==="from"&&i[0]===":"){i.shift();if(Ze.test(i[0])){var c=tt(i)}else{var c=y(i,x);if(c==="closest"||c==="find"||c==="next"||c==="previous"){i.shift();var h=tt(i);if(h.length>0){c+=" "+h}}}u.from=c}else if(f==="target"&&i[0]===":"){i.shift();u.target=tt(i)}else if(f==="throttle"&&i[0]===":"){i.shift();u.throttle=d(y(i,x))}else if(f==="queue"&&i[0]===":"){i.shift();u.queue=y(i,x)}else if(f==="root"&&i[0]===":"){i.shift();u[f]=tt(i)}else if(f==="threshold"&&i[0]===":"){i.shift();u[f]=y(i,x)}else{fe(e,"htmx:syntax:error",{token:i.shift()})}}n.push(u)}}if(i.length===a){fe(e,"htmx:syntax:error",{token:i.shift()})}y(i,Je)}while(i[0]===","&&i.shift());if(r){r[t]=n}return n}function it(e){var t=te(e,"hx-trigger");var r=[];if(t){var n=Q.config.triggerSpecsCache;r=n&&n[t]||nt(e,t,n)}if(r.length>0){return r}else if(h(e,"form")){return[{trigger:"submit"}]}else if(h(e,'input[type="button"], input[type="submit"]')){return[{trigger:"click"}]}else if(h(e,rt)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function at(e){ae(e).cancelled=true}function ot(e,t,r){var n=ae(e);n.timeout=setTimeout(function(){if(se(e)&&n.cancelled!==true){if(!ct(r,e,Wt("hx:poll:trigger",{triggerSpec:r,target:e}))){t(e)}ot(e,t,r)}},r.pollInterval)}function st(e){return location.hostname===e.hostname&&ee(e,"href")&&ee(e,"href").indexOf("#")!==0}function lt(t,r,e){if(t.tagName==="A"&&st(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"){r.boosted=true;var n,i;if(t.tagName==="A"){n="get";i=ee(t,"href")}else{var a=ee(t,"method");n=a?a.toLowerCase():"get";if(n==="get"){}i=ee(t,"action")}e.forEach(function(e){ht(t,function(e,t){if(v(e,Q.config.disableSelector)){p(e);return}he(n,i,e,t)},r,e,true)})}}function ut(e,t){if(e.type==="submit"||e.type==="click"){if(t.tagName==="FORM"){return true}if(h(t,'input[type="submit"], button')&&v(t,"form")!==null){return true}if(t.tagName==="A"&&t.href&&(t.getAttribute("href")==="#"||t.getAttribute("href").indexOf("#")!==0)){return true}}return false}function ft(e,t){return ae(e).boosted&&e.tagName==="A"&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function ct(e,t,r){var n=e.eventFilter;if(n){try{return n.call(t,r)!==true}catch(e){fe(re().body,"htmx:eventFilter:error",{error:e,source:n.source});return true}}return false}function ht(a,o,e,s,l){var u=ae(a);var t;if(s.from){t=Z(a,s.from)}else{t=[a]}if(s.changed){t.forEach(function(e){var t=ae(e);t.lastValue=e.value})}oe(t,function(n){var i=function(e){if(!se(a)){n.removeEventListener(s.trigger,i);return}if(ft(a,e)){return}if(l||ut(e,a)){e.preventDefault()}if(ct(s,a,e)){return}var t=ae(e);t.triggerSpec=s;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(a)<0){t.handledFor.push(a);if(s.consume){e.stopPropagation()}if(s.target&&e.target){if(!h(e.target,s.target)){return}}if(s.once){if(u.triggeredOnce){return}else{u.triggeredOnce=true}}if(s.changed){var r=ae(n);if(r.lastValue===n.value){return}r.lastValue=n.value}if(u.delayed){clearTimeout(u.delayed)}if(u.throttle){return}if(s.throttle>0){if(!u.throttle){o(a,e);u.throttle=setTimeout(function(){u.throttle=null},s.throttle)}}else if(s.delay>0){u.delayed=setTimeout(function(){o(a,e)},s.delay)}else{ce(a,"htmx:trigger");o(a,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:s.trigger,listener:i,on:n});n.addEventListener(s.trigger,i)})}var vt=false;var dt=null;function gt(){if(!dt){dt=function(){vt=true};window.addEventListener("scroll",dt);setInterval(function(){if(vt){vt=false;oe(re().querySelectorAll("[hx-trigger='revealed'],[data-hx-trigger='revealed']"),function(e){mt(e)})}},200)}}function mt(t){if(!o(t,"data-hx-revealed")&&X(t)){t.setAttribute("data-hx-revealed","true");var e=ae(t);if(e.initHash){ce(t,"revealed")}else{t.addEventListener("htmx:afterProcessNode",function(e){ce(t,"revealed")},{once:true})}}}function pt(e,t,r){var n=D(r);for(var i=0;i=0){var t=wt(n);setTimeout(function(){xt(s,r,n+1)},t)}};t.onopen=function(e){n=0};ae(s).webSocket=t;t.addEventListener("message",function(e){if(yt(s)){return}var t=e.data;R(s,function(e){t=e.transformResponse(t,null,s)});var r=T(s);var n=l(t);var i=M(n.children);for(var a=0;a0){ce(u,"htmx:validation:halted",i);return}t.send(JSON.stringify(l));if(ut(e,u)){e.preventDefault()}})}else{fe(u,"htmx:noWebSocketSourceError")}}function wt(e){var t=Q.config.wsReconnectDelay;if(typeof t==="function"){return t(e)}if(t==="full-jitter"){var r=Math.min(e,6);var n=1e3*Math.pow(2,r);return n*Math.random()}b('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"')}function St(e,t,r){var n=D(r);for(var i=0;i0){setTimeout(i,n)}else{i()}}function Ht(t,i,e){var a=false;oe(w,function(r){if(o(t,"hx-"+r)){var n=te(t,"hx-"+r);a=true;i.path=n;i.verb=r;e.forEach(function(e){Lt(t,e,i,function(e,t){if(v(e,Q.config.disableSelector)){p(e);return}he(r,n,e,t)})})}});return a}function Lt(n,e,t,r){if(e.sseEvent){Rt(n,r,e.sseEvent)}else if(e.trigger==="revealed"){gt();ht(n,r,t,e);mt(n)}else if(e.trigger==="intersect"){var i={};if(e.root){i.root=ue(n,e.root)}if(e.threshold){i.threshold=parseFloat(e.threshold)}var a=new IntersectionObserver(function(e){for(var t=0;t0){t.polling=true;ot(n,r,e)}else{ht(n,r,t,e)}}function At(e){if(Q.config.allowScriptTags&&(e.type==="text/javascript"||e.type==="module"||e.type==="")){var t=re().createElement("script");oe(e.attributes,function(e){t.setAttribute(e.name,e.value)});t.textContent=e.textContent;t.async=false;if(Q.config.inlineScriptNonce){t.nonce=Q.config.inlineScriptNonce}var r=e.parentElement;try{r.insertBefore(t,e)}catch(e){b(e)}finally{if(e.parentElement){e.parentElement.removeChild(e)}}}}function Nt(e){if(h(e,"script")){At(e)}oe(f(e,"script"),function(e){At(e)})}function It(e){var t=e.attributes;for(var r=0;r0){var o=n.shift();var s=o.match(/^\s*([a-zA-Z:\-\.]+:)(.*)/);if(a===0&&s){o.split(":");i=s[1].slice(0,-1);r[i]=s[2]}else{r[i]+=o}a+=Bt(o)}for(var l in r){Ft(e,l,r[l])}}}function jt(e){Ae(e);for(var t=0;tQ.config.historyCacheSize){i.shift()}while(i.length>0){try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){fe(re().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function Yt(e){if(!U()){return null}e=B(e);var t=E(localStorage.getItem("htmx-history-cache"))||[];for(var r=0;r=200&&this.status<400){ce(re().body,"htmx:historyCacheMissLoad",o);var e=l(this.response);e=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;var t=Zt();var r=T(t);var n=Ve(this.response);if(n){var i=C("title");if(i){i.innerHTML=n}else{window.document.title=n}}Ue(t,e,r);nr(r.tasks);Jt=a;ce(re().body,"htmx:historyRestore",{path:a,cacheMiss:true,serverResponse:this.response})}else{fe(re().body,"htmx:historyCacheMissLoadError",o)}};e.send()}function ar(e){er();e=e||location.pathname+location.search;var t=Yt(e);if(t){var r=l(t.content);var n=Zt();var i=T(n);Ue(n,r,i);nr(i.tasks);document.title=t.title;setTimeout(function(){window.scrollTo(0,t.scroll)},0);Jt=e;ce(re().body,"htmx:historyRestore",{path:e,item:t})}else{if(Q.config.refreshOnHistoryMiss){window.location.reload(true)}else{ir(e)}}}function or(e){var t=pe(e,"hx-indicator");if(t==null){t=[e]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.classList["add"].call(e.classList,Q.config.requestClass)});return t}function sr(e){var t=pe(e,"hx-disabled-elt");if(t==null){t=[]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.setAttribute("disabled","")});return t}function lr(e,t){oe(e,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.classList["remove"].call(e.classList,Q.config.requestClass)}});oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.removeAttribute("disabled")}})}function ur(e,t){for(var r=0;r=0}function wr(e,t){var r=t?t:ne(e,"hx-swap");var n={swapStyle:ae(e).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ae(e).boosted&&!br(e)){n["show"]="top"}if(r){var i=D(r);if(i.length>0){for(var a=0;a0?l.join(":"):null;n["scroll"]=u;n["scrollTarget"]=f}else if(o.indexOf("show:")===0){var c=o.substr(5);var l=c.split(":");var h=l.pop();var f=l.length>0?l.join(":"):null;n["show"]=h;n["showTarget"]=f}else if(o.indexOf("focus-scroll:")===0){var v=o.substr("focus-scroll:".length);n["focusScroll"]=v=="true"}else if(a==0){n["swapStyle"]=o}else{b("Unknown modifier in hx-swap: "+o)}}}}return n}function Sr(e){return ne(e,"hx-encoding")==="multipart/form-data"||h(e,"form")&&ee(e,"enctype")==="multipart/form-data"}function Er(t,r,n){var i=null;R(r,function(e){if(i==null){i=e.encodeParameters(t,n,r)}});if(i!=null){return i}else{if(Sr(r)){return pr(n)}else{return mr(n)}}}function T(e){return{tasks:[],elts:[e]}}function Cr(e,t){var r=e[0];var n=e[e.length-1];if(t.scroll){var i=null;if(t.scrollTarget){i=ue(r,t.scrollTarget)}if(t.scroll==="top"&&(r||i)){i=i||r;i.scrollTop=0}if(t.scroll==="bottom"&&(n||i)){i=i||n;i.scrollTop=i.scrollHeight}}if(t.show){var i=null;if(t.showTarget){var a=t.showTarget;if(t.showTarget==="window"){a="body"}i=ue(r,a)}if(t.show==="top"&&(r||i)){i=i||r;i.scrollIntoView({block:"start",behavior:Q.config.scrollBehavior})}if(t.show==="bottom"&&(n||i)){i=i||n;i.scrollIntoView({block:"end",behavior:Q.config.scrollBehavior})}}}function Rr(e,t,r,n){if(n==null){n={}}if(e==null){return n}var i=te(e,t);if(i){var a=i.trim();var o=r;if(a==="unset"){return null}if(a.indexOf("javascript:")===0){a=a.substr(11);o=true}else if(a.indexOf("js:")===0){a=a.substr(3);o=true}if(a.indexOf("{")!==0){a="{"+a+"}"}var s;if(o){s=Tr(e,function(){return Function("return ("+a+")")()},{})}else{s=E(a)}for(var l in s){if(s.hasOwnProperty(l)){if(n[l]==null){n[l]=s[l]}}}}return Rr(u(e),t,r,n)}function Tr(e,t,r){if(Q.config.allowEval){return t()}else{fe(e,"htmx:evalDisallowedError");return r}}function Or(e,t){return Rr(e,"hx-vars",true,t)}function qr(e,t){return Rr(e,"hx-vals",false,t)}function Hr(e){return le(Or(e),qr(e))}function Lr(t,r,n){if(n!==null){try{t.setRequestHeader(r,n)}catch(e){t.setRequestHeader(r,encodeURIComponent(n));t.setRequestHeader(r+"-URI-AutoEncoded","true")}}}function Ar(t){if(t.responseURL&&typeof URL!=="undefined"){try{var e=new URL(t.responseURL);return e.pathname+e.search}catch(e){fe(re().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function O(e,t){return t.test(e.getAllResponseHeaders())}function Nr(e,t,r){e=e.toLowerCase();if(r){if(r instanceof Element||I(r,"String")){return he(e,t,null,null,{targetOverride:g(r),returnPromise:true})}else{return he(e,t,g(r.source),r.event,{handler:r.handler,headers:r.headers,values:r.values,targetOverride:g(r.target),swapOverride:r.swap,select:r.select,returnPromise:true})}}else{return he(e,t,null,null,{returnPromise:true})}}function Ir(e){var t=[];while(e){t.push(e);e=e.parentElement}return t}function kr(e,t,r){var n;var i;if(typeof URL==="function"){i=new URL(t,document.location.href);var a=document.location.origin;n=a===i.origin}else{i=t;n=s(t,document.location.origin)}if(Q.config.selfRequestsOnly){if(!n){return false}}return ce(e,"htmx:validateUrl",le({url:i,sameHost:n},r))}function he(t,r,n,i,a,e){var o=null;var s=null;a=a!=null?a:{};if(a.returnPromise&&typeof Promise!=="undefined"){var l=new Promise(function(e,t){o=e;s=t})}if(n==null){n=re().body}var M=a.handler||Mr;var X=a.select||null;if(!se(n)){ie(o);return l}var u=a.targetOverride||ye(n);if(u==null||u==me){fe(n,"htmx:targetError",{target:te(n,"hx-target")});ie(s);return l}var f=ae(n);var c=f.lastButtonClicked;if(c){var h=ee(c,"formaction");if(h!=null){r=h}var v=ee(c,"formmethod");if(v!=null){if(v.toLowerCase()!=="dialog"){t=v}}}var d=ne(n,"hx-confirm");if(e===undefined){var D=function(e){return he(t,r,n,i,a,!!e)};var U={target:u,elt:n,path:r,verb:t,triggeringEvent:i,etc:a,issueRequest:D,question:d};if(ce(n,"htmx:confirm",U)===false){ie(o);return l}}var g=n;var m=ne(n,"hx-sync");var p=null;var x=false;if(m){var B=m.split(":");var F=B[0].trim();if(F==="this"){g=xe(n,"hx-sync")}else{g=ue(n,F)}m=(B[1]||"drop").trim();f=ae(g);if(m==="drop"&&f.xhr&&f.abortable!==true){ie(o);return l}else if(m==="abort"){if(f.xhr){ie(o);return l}else{x=true}}else if(m==="replace"){ce(g,"htmx:abort")}else if(m.indexOf("queue")===0){var V=m.split(" ");p=(V[1]||"last").trim()}}if(f.xhr){if(f.abortable){ce(g,"htmx:abort")}else{if(p==null){if(i){var y=ae(i);if(y&&y.triggerSpec&&y.triggerSpec.queue){p=y.triggerSpec.queue}}if(p==null){p="last"}}if(f.queuedRequests==null){f.queuedRequests=[]}if(p==="first"&&f.queuedRequests.length===0){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(p==="all"){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(p==="last"){f.queuedRequests=[];f.queuedRequests.push(function(){he(t,r,n,i,a)})}ie(o);return l}}var b=new XMLHttpRequest;f.xhr=b;f.abortable=x;var w=function(){f.xhr=null;f.abortable=false;if(f.queuedRequests!=null&&f.queuedRequests.length>0){var e=f.queuedRequests.shift();e()}};var j=ne(n,"hx-prompt");if(j){var S=prompt(j);if(S===null||!ce(n,"htmx:prompt",{prompt:S,target:u})){ie(o);w();return l}}if(d&&!e){if(!confirm(d)){ie(o);w();return l}}var E=xr(n,u,S);if(t!=="get"&&!Sr(n)){E["Content-Type"]="application/x-www-form-urlencoded"}if(a.headers){E=le(E,a.headers)}var _=dr(n,t);var C=_.errors;var R=_.values;if(a.values){R=le(R,a.values)}var z=Hr(n);var $=le(R,z);var T=yr($,n);if(Q.config.getCacheBusterParam&&t==="get"){T["org.htmx.cache-buster"]=ee(u,"id")||"true"}if(r==null||r===""){r=re().location.href}var O=Rr(n,"hx-request");var W=ae(n).boosted;var q=Q.config.methodsThatUseUrlParams.indexOf(t)>=0;var H={boosted:W,useUrlParams:q,parameters:T,unfilteredParameters:$,headers:E,target:u,verb:t,errors:C,withCredentials:a.credentials||O.credentials||Q.config.withCredentials,timeout:a.timeout||O.timeout||Q.config.timeout,path:r,triggeringEvent:i};if(!ce(n,"htmx:configRequest",H)){ie(o);w();return l}r=H.path;t=H.verb;E=H.headers;T=H.parameters;C=H.errors;q=H.useUrlParams;if(C&&C.length>0){ce(n,"htmx:validation:halted",H);ie(o);w();return l}var G=r.split("#");var J=G[0];var L=G[1];var A=r;if(q){A=J;var Z=Object.keys(T).length!==0;if(Z){if(A.indexOf("?")<0){A+="?"}else{A+="&"}A+=mr(T);if(L){A+="#"+L}}}if(!kr(n,A,H)){fe(n,"htmx:invalidPath",H);ie(s);return l}b.open(t.toUpperCase(),A,true);b.overrideMimeType("text/html");b.withCredentials=H.withCredentials;b.timeout=H.timeout;if(O.noHeaders){}else{for(var N in E){if(E.hasOwnProperty(N)){var K=E[N];Lr(b,N,K)}}}var I={xhr:b,target:u,requestConfig:H,etc:a,boosted:W,select:X,pathInfo:{requestPath:r,finalRequestPath:A,anchor:L}};b.onload=function(){try{var e=Ir(n);I.pathInfo.responsePath=Ar(b);M(n,I);lr(k,P);ce(n,"htmx:afterRequest",I);ce(n,"htmx:afterOnLoad",I);if(!se(n)){var t=null;while(e.length>0&&t==null){var r=e.shift();if(se(r)){t=r}}if(t){ce(t,"htmx:afterRequest",I);ce(t,"htmx:afterOnLoad",I)}}ie(o);w()}catch(e){fe(n,"htmx:onLoadError",le({error:e},I));throw e}};b.onerror=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendError",I);ie(s);w()};b.onabort=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendAbort",I);ie(s);w()};b.ontimeout=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:timeout",I);ie(s);w()};if(!ce(n,"htmx:beforeRequest",I)){ie(o);w();return l}var k=or(n);var P=sr(n);oe(["loadstart","loadend","progress","abort"],function(t){oe([b,b.upload],function(e){e.addEventListener(t,function(e){ce(n,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});ce(n,"htmx:beforeSend",I);var Y=q?null:Er(b,n,T);b.send(Y);return l}function Pr(e,t){var r=t.xhr;var n=null;var i=null;if(O(r,/HX-Push:/i)){n=r.getResponseHeader("HX-Push");i="push"}else if(O(r,/HX-Push-Url:/i)){n=r.getResponseHeader("HX-Push-Url");i="push"}else if(O(r,/HX-Replace-Url:/i)){n=r.getResponseHeader("HX-Replace-Url");i="replace"}if(n){if(n==="false"){return{}}else{return{type:i,path:n}}}var a=t.pathInfo.finalRequestPath;var o=t.pathInfo.responsePath;var s=ne(e,"hx-push-url");var l=ne(e,"hx-replace-url");var u=ae(e).boosted;var f=null;var c=null;if(s){f="push";c=s}else if(l){f="replace";c=l}else if(u){f="push";c=o||a}if(c){if(c==="false"){return{}}if(c==="true"){c=o||a}if(t.pathInfo.anchor&&c.indexOf("#")===-1){c=c+"#"+t.pathInfo.anchor}return{type:f,path:c}}else{return{}}}function Mr(l,u){var f=u.xhr;var c=u.target;var e=u.etc;var t=u.requestConfig;var h=u.select;if(!ce(l,"htmx:beforeOnLoad",u))return;if(O(f,/HX-Trigger:/i)){_e(f,"HX-Trigger",l)}if(O(f,/HX-Location:/i)){er();var r=f.getResponseHeader("HX-Location");var v;if(r.indexOf("{")===0){v=E(r);r=v["path"];delete v["path"]}Nr("GET",r,v).then(function(){tr(r)});return}var n=O(f,/HX-Refresh:/i)&&"true"===f.getResponseHeader("HX-Refresh");if(O(f,/HX-Redirect:/i)){location.href=f.getResponseHeader("HX-Redirect");n&&location.reload();return}if(n){location.reload();return}if(O(f,/HX-Retarget:/i)){if(f.getResponseHeader("HX-Retarget")==="this"){u.target=l}else{u.target=ue(l,f.getResponseHeader("HX-Retarget"))}}var d=Pr(l,u);var i=f.status>=200&&f.status<400&&f.status!==204;var g=f.response;var a=f.status>=400;var m=Q.config.ignoreTitle;var o=le({shouldSwap:i,serverResponse:g,isError:a,ignoreTitle:m},u);if(!ce(c,"htmx:beforeSwap",o))return;c=o.target;g=o.serverResponse;a=o.isError;m=o.ignoreTitle;u.target=c;u.failed=a;u.successful=!a;if(o.shouldSwap){if(f.status===286){at(l)}R(l,function(e){g=e.transformResponse(g,f,l)});if(d.type){er()}var s=e.swapOverride;if(O(f,/HX-Reswap:/i)){s=f.getResponseHeader("HX-Reswap")}var v=wr(l,s);if(v.hasOwnProperty("ignoreTitle")){m=v.ignoreTitle}c.classList.add(Q.config.swappingClass);var p=null;var x=null;var y=function(){try{var e=document.activeElement;var t={};try{t={elt:e,start:e?e.selectionStart:null,end:e?e.selectionEnd:null}}catch(e){}var r;if(h){r=h}if(O(f,/HX-Reselect:/i)){r=f.getResponseHeader("HX-Reselect")}if(d.type){ce(re().body,"htmx:beforeHistoryUpdate",le({history:d},u));if(d.type==="push"){tr(d.path);ce(re().body,"htmx:pushedIntoHistory",{path:d.path})}else{rr(d.path);ce(re().body,"htmx:replacedInHistory",{path:d.path})}}var n=T(c);je(v.swapStyle,c,l,g,n,r);if(t.elt&&!se(t.elt)&&ee(t.elt,"id")){var i=document.getElementById(ee(t.elt,"id"));var a={preventScroll:v.focusScroll!==undefined?!v.focusScroll:!Q.config.defaultFocusScroll};if(i){if(t.start&&i.setSelectionRange){try{i.setSelectionRange(t.start,t.end)}catch(e){}}i.focus(a)}}c.classList.remove(Q.config.swappingClass);oe(n.elts,function(e){if(e.classList){e.classList.add(Q.config.settlingClass)}ce(e,"htmx:afterSwap",u)});if(O(f,/HX-Trigger-After-Swap:/i)){var o=l;if(!se(l)){o=re().body}_e(f,"HX-Trigger-After-Swap",o)}var s=function(){oe(n.tasks,function(e){e.call()});oe(n.elts,function(e){if(e.classList){e.classList.remove(Q.config.settlingClass)}ce(e,"htmx:afterSettle",u)});if(u.pathInfo.anchor){var e=re().getElementById(u.pathInfo.anchor);if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}if(n.title&&!m){var t=C("title");if(t){t.innerHTML=n.title}else{window.document.title=n.title}}Cr(n.elts,v);if(O(f,/HX-Trigger-After-Settle:/i)){var r=l;if(!se(l)){r=re().body}_e(f,"HX-Trigger-After-Settle",r)}ie(p)};if(v.settleDelay>0){setTimeout(s,v.settleDelay)}else{s()}}catch(e){fe(l,"htmx:swapError",u);ie(x);throw e}};var b=Q.config.globalViewTransitions;if(v.hasOwnProperty("transition")){b=v.transition}if(b&&ce(l,"htmx:beforeTransition",u)&&typeof Promise!=="undefined"&&document.startViewTransition){var w=new Promise(function(e,t){p=e;x=t});var S=y;y=function(){document.startViewTransition(function(){S();return w})}}if(v.swapDelay>0){setTimeout(y,v.swapDelay)}else{y()}}if(a){fe(l,"htmx:responseError",le({error:"Response Status Error Code "+f.status+" from "+u.pathInfo.requestPath},u))}}var Xr={};function Dr(){return{init:function(e){return null},onEvent:function(e,t){return true},transformResponse:function(e,t,r){return e},isInlineSwap:function(e){return false},handleSwap:function(e,t,r,n){return false},encodeParameters:function(e,t,r){return null}}}function Ur(e,t){if(t.init){t.init(r)}Xr[e]=le(Dr(),t)}function Br(e){delete Xr[e]}function Fr(e,r,n){if(e==undefined){return r}if(r==undefined){r=[]}if(n==undefined){n=[]}var t=te(e,"hx-ext");if(t){oe(t.split(","),function(e){e=e.replace(/ /g,"");if(e.slice(0,7)=="ignore:"){n.push(e.slice(7));return}if(n.indexOf(e)<0){var t=Xr[e];if(t&&r.indexOf(t)<0){r.push(t)}}})}return Fr(u(e),r,n)}var Vr=false;re().addEventListener("DOMContentLoaded",function(){Vr=true});function jr(e){if(Vr||re().readyState==="complete"){e()}else{re().addEventListener("DOMContentLoaded",e)}}function _r(){if(Q.config.includeIndicatorStyles!==false){re().head.insertAdjacentHTML("beforeend","")}}function zr(){var e=re().querySelector('meta[name="htmx-config"]');if(e){return E(e.content)}else{return null}}function $r(){var e=zr();if(e){Q.config=le(Q.config,e)}}jr(function(){$r();_r();var e=re().body;zt(e);var t=re().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){var t=e.target;var r=ae(t);if(r&&r.xhr){r.xhr.abort()}});const r=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){if(e.state&&e.state.htmx){ar();oe(t,function(e){ce(e,"htmx:restored",{document:re(),triggerEvent:ce})})}else{if(r){r(e)}}};setTimeout(function(){ce(e,"htmx:load",{});e=null},0)});return Q}()}); \ No newline at end of file diff --git a/assets/main.css b/assets/main.css index 8860da1..34a6349 100644 --- a/assets/main.css +++ b/assets/main.css @@ -444,6 +444,201 @@ video { display: none; } +[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + border-color: #6b7280; + border-width: 1px; + border-radius: 0px; + padding-top: 0.5rem; + padding-right: 0.75rem; + padding-bottom: 0.5rem; + padding-left: 0.75rem; + font-size: 1rem; + line-height: 1.5rem; + --tw-shadow: 0 0 #0000; +} + +[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #2563eb; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + border-color: #2563eb; +} + +input::-moz-placeholder, textarea::-moz-placeholder { + color: #6b7280; + opacity: 1; +} + +input::placeholder,textarea::placeholder { + color: #6b7280; + opacity: 1; +} + +::-webkit-datetime-edit-fields-wrapper { + padding: 0; +} + +::-webkit-date-and-time-value { + min-height: 1.5em; + text-align: inherit; +} + +::-webkit-datetime-edit { + display: inline-flex; +} + +::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field { + padding-top: 0; + padding-bottom: 0; +} + +select { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); + background-position: right 0.5rem center; + background-repeat: no-repeat; + background-size: 1.5em 1.5em; + padding-right: 2.5rem; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[multiple],[size]:where(select:not([size="1"])) { + background-image: initial; + background-position: initial; + background-repeat: unset; + background-size: initial; + padding-right: 0.75rem; + -webkit-print-color-adjust: unset; + print-color-adjust: unset; +} + +[type='checkbox'],[type='radio'] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding: 0; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + display: inline-block; + vertical-align: middle; + background-origin: border-box; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + flex-shrink: 0; + height: 1rem; + width: 1rem; + color: #2563eb; + background-color: #fff; + border-color: #6b7280; + border-width: 1px; + --tw-shadow: 0 0 #0000; +} + +[type='checkbox'] { + border-radius: 0px; +} + +[type='radio'] { + border-radius: 100%; +} + +[type='checkbox']:focus,[type='radio']:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 2px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #2563eb; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); +} + +[type='checkbox']:checked,[type='radio']:checked { + border-color: transparent; + background-color: currentColor; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; +} + +[type='checkbox']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); +} + +@media (forced-colors: active) { + [type='checkbox']:checked { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; + } +} + +[type='radio']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); +} + +@media (forced-colors: active) { + [type='radio']:checked { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; + } +} + +[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus { + border-color: transparent; + background-color: currentColor; +} + +[type='checkbox']:indeterminate { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); + border-color: transparent; + background-color: currentColor; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; +} + +@media (forced-colors: active) { + [type='checkbox']:indeterminate { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; + } +} + +[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus { + border-color: transparent; + background-color: currentColor; +} + +[type='file'] { + background: unset; + border-color: inherit; + border-width: 0; + border-radius: 0; + padding: 0; + font-size: unset; + line-height: inherit; +} + +[type='file']:focus { + outline: 1px solid ButtonText; + outline: 1px auto -webkit-focus-ring-color; +} + *, ::before, ::after { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; @@ -544,11 +739,413 @@ video { --tw-backdrop-sepia: ; } +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.absolute { + position: absolute; +} + +.relative { + position: relative; +} + +.-inset-0 { + inset: -0px; +} + +.-inset-0\.5 { + inset: -0.125rem; +} + +.inset-y-0 { + top: 0px; + bottom: 0px; +} + +.left-0 { + left: 0px; +} + +.left-4 { + left: 1rem; +} + +.top-4 { + top: 1rem; +} + +.mx-72 { + margin-left: 18rem; + margin-right: 18rem; +} + +.mx-auto { + margin-left: auto; + margin-right: auto; +} + +.-mb-8 { + margin-bottom: -2rem; +} + +.-ml-px { + margin-left: -1px; +} + +.block { + display: block; +} + +.flex { + display: flex; +} + +.inline-flex { + display: inline-flex; +} + +.flow-root { + display: flow-root; +} + +.hidden { + display: none; +} + +.h-16 { + height: 4rem; +} + +.h-6 { + height: 1.5rem; +} + +.h-5 { + height: 1.25rem; +} + +.h-8 { + height: 2rem; +} + +.h-full { + height: 100%; +} + +.w-6 { + width: 1.5rem; +} + +.w-0 { + width: 0px; +} + +.w-0\.5 { + width: 0.125rem; +} + +.w-5 { + width: 1.25rem; +} + +.w-8 { + width: 2rem; +} + +.min-w-0 { + min-width: 0px; +} + +.max-w-7xl { + max-width: 80rem; +} + +.flex-1 { + flex: 1 1 0%; +} + +.items-center { + align-items: center; +} + +.justify-center { + justify-content: center; +} + +.justify-between { + justify-content: space-between; +} + +.space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); +} + +.space-y-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); +} + +.space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); +} + +.whitespace-nowrap { + white-space: nowrap; +} + +.rounded-md { + border-radius: 0.375rem; +} + +.rounded-full { + border-radius: 9999px; +} + +.bg-gray-900 { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +.bg-stone-400 { + --tw-bg-opacity: 1; + background-color: rgb(168 162 158 / var(--tw-bg-opacity)); +} + +.bg-stone-800 { + --tw-bg-opacity: 1; + background-color: rgb(41 37 36 / var(--tw-bg-opacity)); +} + +.bg-stone-900 { + --tw-bg-opacity: 1; + background-color: rgb(28 25 23 / var(--tw-bg-opacity)); +} + +.bg-blue-500 { + --tw-bg-opacity: 1; + background-color: rgb(59 130 246 / var(--tw-bg-opacity)); +} + +.bg-gray-200 { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); +} + +.bg-gray-400 { + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity)); +} + +.bg-green-500 { + --tw-bg-opacity: 1; + background-color: rgb(34 197 94 / var(--tw-bg-opacity)); +} + +.p-2 { + padding: 0.5rem; +} + +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} + +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.pb-3 { + padding-bottom: 0.75rem; +} + +.pb-6 { + padding-bottom: 1.5rem; +} + +.pt-2 { + padding-top: 0.5rem; +} + +.pt-6 { + padding-top: 1.5rem; +} + +.pb-8 { + padding-bottom: 2rem; +} + +.pt-1 { + padding-top: 0.25rem; +} + +.pt-1\.5 { + padding-top: 0.375rem; +} + +.text-right { + text-align: right; +} + +.text-4xl { + font-size: 2.25rem; + line-height: 2.5rem; +} + +.text-base { + font-size: 1rem; + line-height: 1.5rem; +} + +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + .font-extrabold { font-weight: 800; } -.text-red-500 { +.font-medium { + font-weight: 500; +} + +.text-gray-300 { --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +.text-stone-100 { + --tw-text-opacity: 1; + color: rgb(245 245 244 / var(--tw-text-opacity)); +} + +.text-stone-300 { + --tw-text-opacity: 1; + color: rgb(214 211 209 / var(--tw-text-opacity)); +} + +.text-stone-400 { + --tw-text-opacity: 1; + color: rgb(168 162 158 / var(--tw-text-opacity)); +} + +.text-stone-900 { + --tw-text-opacity: 1; + color: rgb(28 25 23 / var(--tw-text-opacity)); +} + +.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.text-gray-500 { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +.text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.ring-8 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.ring-white { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); +} + +.hover\:bg-gray-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +.hover\:bg-stone-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(68 64 60 / var(--tw-bg-opacity)); +} + +.hover\:text-white:hover { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.focus\:outline-none:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.focus\:ring-2:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-inset:focus { + --tw-ring-inset: inset; +} + +.focus\:ring-white:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); +} + +@media (min-width: 640px) { + .sm\:ml-6 { + margin-left: 1.5rem; + } + + .sm\:block { + display: block; + } + + .sm\:hidden { + display: none; + } + + .sm\:items-stretch { + align-items: stretch; + } + + .sm\:justify-start { + justify-content: flex-start; + } + + .sm\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } +} + +@media (min-width: 1024px) { + .lg\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } } \ No newline at end of file diff --git a/node_modules/.modules.yaml b/node_modules/.modules.yaml index ee9f277..1ca15d7 100644 --- a/node_modules/.modules.yaml +++ b/node_modules/.modules.yaml @@ -103,12 +103,20 @@ hoistedDependencies: lilconfig: private /lines-and-columns/1.2.4: lines-and-columns: private + /lodash.castarray/4.4.0: + lodash.castarray: private + /lodash.isplainobject/4.0.6: + lodash.isplainobject: private + /lodash.merge/4.6.2: + lodash.merge: private /lru-cache/10.2.0: lru-cache: private /merge2/1.4.1: merge2: private /micromatch/4.0.5: micromatch: private + /mini-svg-data-uri/1.4.4: + mini-svg-data-uri: private /minimatch/9.0.3: minimatch: private /minipass/7.0.4: @@ -145,7 +153,7 @@ hoistedDependencies: postcss-load-config: private /postcss-nested/6.0.1(postcss@8.4.35): postcss-nested: private - /postcss-selector-parser/6.0.15: + /postcss-selector-parser/6.0.10: postcss-selector-parser: private /postcss-value-parser/4.2.0: postcss-value-parser: private diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/.github/ISSUE_TEMPLATE/1.bug_report.yml b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/.github/ISSUE_TEMPLATE/1.bug_report.yml new file mode 100644 index 0000000..1b499e8 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/.github/ISSUE_TEMPLATE/1.bug_report.yml @@ -0,0 +1,38 @@ +name: Bug Report +description: Create a bug report for @tailwindcss/aspect-ratio. +labels: [] +body: + - type: input + attributes: + label: What version of @tailwindcss/aspect-ratio are you using? + description: 'For example: v0.2.0' + validations: + required: true + - type: input + attributes: + label: What version of Node.js are you using? + description: 'For example: v12.0.0' + validations: + required: true + - type: input + attributes: + label: What browser are you using? + description: 'For example: Chrome, Safari, or N/A' + validations: + required: true + - type: input + attributes: + label: What operating system are you using? + description: 'For example: macOS, Windows' + validations: + required: true + - type: input + attributes: + label: Reproduction repository + description: A public GitHub repo that includes a minimal reproduction of the bug. Unfortunately we can't provide support without a reproduction, and your issue will be closed and locked with no comment if this is not provided. + validations: + required: true + - type: textarea + attributes: + label: Describe your issue + description: Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/.github/ISSUE_TEMPLATE/config.yml b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..127f537 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Feature Request + url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=ideas + about: 'Suggest any ideas you have using our discussion forums.' + - name: Help + url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=help + about: 'If you have a question or need help, ask a question on the discussion forums.' + - name: Kind Words + url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=kind-words + about: "Have something nice to say about @tailwindcss/aspect-ratio or Tailwind CSS in general? We'd love to hear it!" diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/.github/workflows/release-insiders.yml b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/.github/workflows/release-insiders.yml new file mode 100644 index 0000000..5255dc5 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/.github/workflows/release-insiders.yml @@ -0,0 +1,50 @@ +name: Release Insiders + +on: + push: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12] + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + + - name: Use cached node_modules + id: cache + uses: actions/cache@v2 + with: + path: node_modules + key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }} + restore-keys: | + nodeModules- + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: npm install + env: + CI: true + + - name: Resolve version + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: "Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}" + run: npm version 0.0.0-insiders.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version + + - name: Publish + run: npm publish --tag insiders + env: + CI: true + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/CHANGELOG.md b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/CHANGELOG.md new file mode 100644 index 0000000..03eee30 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/CHANGELOG.md @@ -0,0 +1,95 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +- Nothing yet! + +## [0.4.2] - 2022-09-02 + +### Fixed + +- Update TypeScript types ([#34](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/pull/34)) + +## [0.4.1] - 2022-09-01 + +### Added + +- Remove `dist` folder and related dependencies ([#29](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/pull/29)) +- Add typescript types ([#33](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/pull/33)) + +## [0.4.0] - 2021-12-09 + +### Added + +- Make sure that Tailwind CSS v3 is in peerDependencies ([ae97a25](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/commit/ae97a25)) + +## [0.3.0] - 2021-10-05 + +### Added + +- Support arbitrary values in Tailwind CSS v3.0.0-alpha.1, via the new `matchComponents` API + +## [0.2.2] - 2021-10-02 + +### Fixed + +- Fix compatibility with Tailwind CSS v3.0.0-alpha.1 + +## [0.2.1] - 2021-05-24 + +### Fixed + +- Mark `tailwindcss` as peer-dependency for better monorepo support ([#14](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/pull/14)) + +## [0.2.0] - 2020-11-16 + +### Changed + +- Prefix custom properties with `tw-` to match Tailwind CSS v2.0 convention ([6802588](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/commit/6802588)) + +## [0.1.4] - 2020-11-06 + +### Added + +- Add `aspect-none` clas ([73b57ef](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/commit/73b57ef)) + +## [0.1.3] - 2020-11-06 + +### Fixed + +- Remove debugging statements ([32d68f5](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/commit/32d68f5)) + +## [0.1.2] - 2020-11-06 + +### Fixed + +- Remove incorrect peer dependencies ([d46bf8f](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/commit/d46bf8f)) + +## [0.1.1] - 2020-11-06 + +### Fixed + +- Fix entry point so it even works at all ([88fd2f1](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/commit/88fd2f1)) + +## [0.1.0] - 2020-11-06 + +Initial release! + +[unreleased]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.4.2...HEAD +[0.4.2]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.4.1...v0.4.2 +[0.4.1]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.2.2...v0.3.0 +[0.2.2]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.2.1...v0.2.2 +[0.2.1]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.1.4...v0.2.0 +[0.1.4]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.1.3...v0.1.4 +[0.1.3]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.1.2...v0.1.3 +[0.1.2]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/tailwindlabs/tailwindcss-aspect-ratio/releases/tag/v0.1.0 diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/README.md b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/README.md new file mode 100644 index 0000000..338e047 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/README.md @@ -0,0 +1,141 @@ +# @tailwindcss/aspect-ratio + +A plugin that provides a composable API for giving elements a fixed aspect ratio. + + +## Installation + +Install the plugin from npm: + +```sh +npm install -D @tailwindcss/aspect-ratio +``` + +Then add the plugin to your `tailwind.config.js` file, and disable the `aspectRatio` core plugin to avoid conflicts with the native `aspect-ratio` utilities included in Tailwind CSS v3.0: + +```js +// tailwind.config.js +module.exports = { + theme: { + // ... + }, + corePlugins: { + aspectRatio: false, + }, + plugins: [ + require('@tailwindcss/aspect-ratio'), + // ... + ], +} +``` + +## Usage + +Combine the `aspect-w-{n}` and `aspect-h-{n}` classes to specify the aspect ratio for an element: + +```html +
+ +
+``` + +Use `aspect-none` to remove any aspect ratio behavior: + +```html +
+ +
+``` + +When removing aspect ratio behavior, if nested elements have `w-{n}` or `h-{n}` classes, ensure they are re-declared with a matching breakpoint prefix: + +```html +
+ ... +
+``` + +Note that due to the way this currently needs to be implemented ([the old padding-bottom trick](https://css-tricks.com/aspect-ratio-boxes/)) you need to assign the aspect ratio to a _parent_ element, and make the actual element you are trying to size the only child of that parent. + +Once the [`aspect-ratio` property](https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio) is supported in modern browsers, we'll add official support to Tailwind CSS itself and deprecate this plugin. + +Aspect ratio classes up to 16 are generated by default: + +| Width | Height | +| --- | --- | +| `aspect-w-1` | `aspect-h-1` | +| `aspect-w-2` | `aspect-h-2` | +| `aspect-w-3` | `aspect-h-3` | +| `aspect-w-4` | `aspect-h-4` | +| `aspect-w-5` | `aspect-h-5` | +| `aspect-w-6` | `aspect-h-6` | +| `aspect-w-7` | `aspect-h-7` | +| `aspect-w-8` | `aspect-h-8` | +| `aspect-w-9` | `aspect-h-9` | +| `aspect-w-10` | `aspect-h-10` | +| `aspect-w-11` | `aspect-h-11` | +| `aspect-w-12` | `aspect-h-12` | +| `aspect-w-13` | `aspect-h-13` | +| `aspect-w-14` | `aspect-h-14` | +| `aspect-w-15` | `aspect-h-15` | +| `aspect-w-16` | `aspect-h-16` | + +## Configuration + +You can configure which values and variants are generated by this plugin under the `aspectRatio` key in your `tailwind.config.js` file: + +```js +// tailwind.config.js +module.exports = { + theme: { + aspectRatio: { + 1: '1', + 2: '2', + 3: '3', + 4: '4', + } + }, + variants: { + aspectRatio: ['responsive', 'hover'] + } +} +``` + +## Compatibility with default aspect-ratio utilities + +Tailwind CSS v3.0 shipped with [native aspect-ratio](https://tailwindcss.com/docs/aspect-ratio) support, and while these new utilities are great, the `aspect-ratio` property isn't supported in Safari 14, which still has [significant global usage](https://caniuse.com/mdn-css_properties_aspect-ratio). If you need to support Safari 14, this plugin is still the best way to do that. + +While it's technically possible to use the new native `aspect-ratio` utilities as well as this plugin in the same project, it doesn't really make a lot of sense to do so. If you're able to use the new native aspect-ratio utilities, just use them instead of this plugin, as they are a lot simpler and work much better. + +However, if you do want to use both approaches in your project, maybe as a way of transitioning slowly from the plugin approach to the new native utilities, you'll need to add the following values to your `tailwind.config.js` file: + +```js +module.exports = { + // ... + theme: { + aspectRatio: { + auto: 'auto', + square: '1 / 1', + video: '16 / 9', + 1: '1', + 2: '2', + 3: '3', + 4: '4', + 5: '5', + 6: '6', + 7: '7', + 8: '8', + 9: '9', + 10: '10', + 11: '11', + 12: '12', + 13: '13', + 14: '14', + 15: '15', + 16: '16', + }, + }, +} +``` + +This is necessary, as the default `aspectRatio` values are overwritten by this plugin's values. diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/node_modules/.bin/tailwind b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/node_modules/.bin/tailwind new file mode 100755 index 0000000..28c833e --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/node_modules/.bin/tailwind @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +else + exec node "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +fi diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/node_modules/.bin/tailwindcss b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/node_modules/.bin/tailwindcss new file mode 100755 index 0000000..28c833e --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/node_modules/.bin/tailwindcss @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +else + exec node "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +fi diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/package.json b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/package.json new file mode 100644 index 0000000..f9fab69 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/package.json @@ -0,0 +1,29 @@ +{ + "name": "@tailwindcss/aspect-ratio", + "version": "0.4.2", + "main": "src/index.js", + "types": "src/index.d.ts", + "license": "MIT", + "repository": "https://github.com/tailwindlabs/tailwindcss-aspect-ratio", + "publishConfig": { + "access": "public" + }, + "prettier": { + "printWidth": 100, + "semi": false, + "singleQuote": true, + "trailingComma": "es5" + }, + "scripts": { + "test": "jest" + }, + "peerDependencies": { + "tailwindcss": ">=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1" + }, + "devDependencies": { + "jest": "^27.2.4", + "postcss": "^8.2.4", + "tailwindcss": "^3.0.0", + "tailwindcss-v2": "npm:tailwindcss@^2.2.16" + } +} diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/src/index.d.ts b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/src/index.d.ts new file mode 100644 index 0000000..c23a9a3 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/src/index.d.ts @@ -0,0 +1,2 @@ +declare const plugin: { handler: () => void } +export = plugin diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/src/index.js b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/src/index.js new file mode 100644 index 0000000..a217a70 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/src/index.js @@ -0,0 +1,124 @@ +const plugin = require('tailwindcss/plugin') + +const baseStyles = { + position: 'relative', + paddingBottom: `calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%)`, +} + +const childStyles = { + position: 'absolute', + height: '100%', + width: '100%', + top: '0', + right: '0', + bottom: '0', + left: '0', +} + +const noneComponent = { + '.aspect-none': { + position: 'static', + paddingBottom: '0', + }, + '.aspect-none > *': { + position: 'static', + height: 'auto', + width: 'auto', + top: 'auto', + right: 'auto', + bottom: 'auto', + left: 'auto', + }, +} + +const aspectRatio = plugin( + function ({ addComponents, matchComponents, theme, variants, e }) { + const values = theme('aspectRatio') + + if (matchComponents) { + matchComponents( + { + 'aspect-w': (value) => [ + { + ...baseStyles, + '--tw-aspect-w': value, + }, + { + '> *': childStyles, + }, + ], + 'aspect-h': (value) => ({ '--tw-aspect-h': value }), + }, + { values } + ) + + addComponents(noneComponent) + + return + } + + const baseSelectors = Object.entries(values) + .map(([key, value]) => { + return `.${e(`aspect-w-${key}`)}` + }) + .join(',\n') + + const childSelectors = Object.entries(values) + .map(([key, value]) => { + return `.${e(`aspect-w-${key}`)} > *` + }) + .join(',\n') + + addComponents( + [ + { + [baseSelectors]: baseStyles, + [childSelectors]: childStyles, + }, + noneComponent, + Object.entries(values).map(([key, value]) => { + return { + [`.${e(`aspect-w-${key}`)}`]: { + '--tw-aspect-w': value, + }, + } + }), + Object.entries(values).map(([key, value]) => { + return { + [`.${e(`aspect-h-${key}`)}`]: { + '--tw-aspect-h': value, + }, + } + }), + ], + variants('aspectRatio') + ) + }, + { + theme: { + aspectRatio: { + 1: '1', + 2: '2', + 3: '3', + 4: '4', + 5: '5', + 6: '6', + 7: '7', + 8: '8', + 9: '9', + 10: '10', + 11: '11', + 12: '12', + 13: '13', + 14: '14', + 15: '15', + 16: '16', + }, + }, + variants: { + aspectRatio: ['responsive'], + }, + } +) + +module.exports = aspectRatio diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/tests/test.js b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/tests/test.js new file mode 100644 index 0000000..0142395 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio/tests/test.js @@ -0,0 +1,157 @@ +const postcss = require('postcss') + +let expectedV3 = ` +.aspect-w-1 { + position: relative; + padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%); + --tw-aspect-w: 1 +} +.aspect-w-1 > * { + position: absolute; + height: 100%; + width: 100%; + top: 0; + right: 0; + bottom: 0; + left: 0 +} +.aspect-w-2 { + position: relative; + padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%); + --tw-aspect-w: 2 +} +.aspect-w-2 > * { + position: absolute; + height: 100%; + width: 100%; + top: 0; + right: 0; + bottom: 0; + left: 0 +} +.aspect-h-2 { + --tw-aspect-h: 2 +} +.aspect-w-\\[123\\] { + position: relative; + padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%); + --tw-aspect-w: 123 +} +.aspect-w-\\[123\\] > * { + position: absolute; + height: 100%; + width: 100%; + top: 0; + right: 0; + bottom: 0; + left: 0 +} +.aspect-w-\\[var\\(--width\\)\\] { + position: relative; + padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%); + --tw-aspect-w: var(--width) +} +.aspect-w-\\[var\\(--width\\)\\] > * { + position: absolute; + height: 100%; + width: 100%; + top: 0; + right: 0; + bottom: 0; + left: 0 +} +.aspect-h-\\[123\\] { + --tw-aspect-h: 123 +} +.aspect-h-\\[var\\(--height\\)\\] { + --tw-aspect-h: var(--height) +} +.aspect-none { + position: static; + padding-bottom: 0 +} +.aspect-none > * { + position: static; + height: auto; + width: auto; + top: auto; + right: auto; + bottom: auto; + left: auto +} +` + +it('v3', () => { + let css = postcss([ + require('tailwindcss')({ + content: [ + { + raw: 'aspect-none aspect-w-1 aspect-w-2 aspect-h-2 aspect-w-[123] aspect-w-[var(--width)] aspect-h-[123] aspect-h-[var(--height)]', + }, + ], + plugins: [require('../')], + }), + ]).process('@tailwind components').css + + expect(css).toBe(expectedV3.trim()) +}) + +let expectedV2 = ` +.aspect-w-1, +.aspect-w-2 { + position: relative; + padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%) +} + +.aspect-w-1 > *, +.aspect-w-2 > * { + position: absolute; + height: 100%; + width: 100%; + top: 0; + right: 0; + bottom: 0; + left: 0 +} + +.aspect-none { + position: static; + padding-bottom: 0 +} + +.aspect-none > * { + position: static; + height: auto; + width: auto; + top: auto; + right: auto; + bottom: auto; + left: auto +} + +.aspect-w-1 { + --tw-aspect-w: 1 +} + +.aspect-w-2 { + --tw-aspect-w: 2 +} + +.aspect-h-2 { + --tw-aspect-h: 2 +} +` + +it('v2', () => { + postcss([ + require('tailwindcss-v2')({ + purge: { enabled: true, content: [{ raw: 'aspect-none aspect-w-1 aspect-w-2 aspect-h-2' }] }, + variants: [], + plugins: [require('../')], + }), + ]) + .process('@tailwind components', { from: undefined }) + .then(({ css }) => { + expect(css).toBe(expectedV2.trim()) + }) +}) diff --git a/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/tailwindcss b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/tailwindcss new file mode 120000 index 0000000..7fdeea1 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/tailwindcss @@ -0,0 +1 @@ +../../tailwindcss@3.4.1/node_modules/tailwindcss \ No newline at end of file diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/1.bug_report.yml b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/1.bug_report.yml new file mode 100644 index 0000000..72207f7 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/1.bug_report.yml @@ -0,0 +1,38 @@ +name: Bug Report +description: Create a bug report for @tailwindcss/forms. +labels: [] +body: + - type: input + attributes: + label: What version of @tailwindcss/forms are you using? + description: 'For example: v0.1.4' + validations: + required: true + - type: input + attributes: + label: What version of Node.js are you using? + description: 'For example: v12.0.0' + validations: + required: true + - type: input + attributes: + label: What browser are you using? + description: 'For example: Chrome, Safari, or N/A' + validations: + required: true + - type: input + attributes: + label: What operating system are you using? + description: 'For example: macOS, Windows' + validations: + required: true + - type: input + attributes: + label: Reproduction repository + description: A public GitHub repo that includes a minimal reproduction of the bug. Unfortunately we can't provide support without a reproduction, and your issue will be closed and locked with no comment if this is not provided. + validations: + required: true + - type: textarea + attributes: + label: Describe your issue + description: Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/config.yml b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..2376581 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Feature Request + url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=ideas + about: 'Suggest any ideas you have using our discussion forums.' + - name: Help + url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=help + about: 'If you have a question or need help, ask a question on the discussion forums.' + - name: Kind Words + url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=kind-words + about: "Have something nice to say about @tailwindcss/forms or Tailwind CSS in general? We'd love to hear it!" diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/.github/workflows/release-insiders.yml b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/.github/workflows/release-insiders.yml new file mode 100644 index 0000000..5255dc5 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/.github/workflows/release-insiders.yml @@ -0,0 +1,50 @@ +name: Release Insiders + +on: + push: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12] + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + + - name: Use cached node_modules + id: cache + uses: actions/cache@v2 + with: + path: node_modules + key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }} + restore-keys: | + nodeModules- + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: npm install + env: + CI: true + + - name: Resolve version + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: "Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}" + run: npm version 0.0.0-insiders.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version + + - name: Publish + run: npm publish --tag insiders + env: + CI: true + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/CHANGELOG.md b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/CHANGELOG.md new file mode 100644 index 0000000..921c2b7 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/CHANGELOG.md @@ -0,0 +1,173 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +- Nothing yet! + +## [0.5.7] - 2023-11-10 + +### Fixed + +- Use normal `checkbox` and `radio` appearance in `forced-colors` mode ([#152](https://github.com/tailwindlabs/tailwindcss-forms/pull/152)) + +## [0.5.6] - 2023-08-28 + +### Fixed + +- Fix date time bottom spacing on MacOS Safari ([#146](https://github.com/tailwindlabs/tailwindcss-forms/pull/146)) + +## [0.5.5] - 2023-08-22 + +### Fixed + +- Fix text alignment on date and time inputs on iOS ([#144](https://github.com/tailwindlabs/tailwindcss-forms/pull/144)) + +## [0.5.4] - 2023-07-13 + +### Fixed + +- Remove chevron for selects with a non-default size ([#137](https://github.com/tailwindlabs/tailwindcss-forms/pull/137)) +- Allow for without `type` ([#141](https://github.com/tailwindlabs/tailwindcss-forms/pull/141)) + +## [0.5.3] - 2022-09-02 + +### Fixed + +- Update TypeScript types ([#126](https://github.com/tailwindlabs/tailwindcss-forms/pull/126)) + +## [0.5.2] - 2022-05-18 + +### Added + +- Add TypeScript type declarations ([#118](https://github.com/tailwindlabs/tailwindcss-forms/pull/118)) + +## [0.5.1] - 2022-05-03 + +### Fixed + +- Remove duplicate `outline` property ([#116](https://github.com/tailwindlabs/tailwindcss-forms/pull/116)) +- Fix autoprefixer warning about `color-adjust` ([#115](https://github.com/tailwindlabs/tailwindcss-forms/pull/115)) + +## [0.5.0] - 2022-03-02 + +### Changed + +- Generate both global styles and classes by default ([#71](https://github.com/tailwindlabs/tailwindcss-forms/pull/71)) + +## [0.4.1] - 2022-03-02 + +### Added + +- Remove `dist` folder and related dependencies ([#96](https://github.com/tailwindlabs/tailwindcss-forms/pull/96)) + +### Fixed + +- Use `addComponents` for class strategy ([#91](https://github.com/tailwindlabs/tailwindcss-forms/pull/91)) +- Fix extra height on Safari date/time inputs ([#109](https://github.com/tailwindlabs/tailwindcss-forms/pull/109)) + +## [0.4.0] - 2021-12-09 + +### Changed + +- Update color palette references for v3 ([#83](https://github.com/tailwindlabs/tailwindcss-forms/pull/83)) +- Don't read outline.none value from config ([#89](https://github.com/tailwindlabs/tailwindcss-forms/pull/89)) + +## [0.3.4] - 2021-09-28 + +### Fixed + +- Fix compatibility with `optimizeUniversalDefaults` experimental feature in Tailwind CSS v2.2 ([#81](https://github.com/tailwindlabs/tailwindcss-forms/pull/81)) + +## [0.3.3] - 2021-06-03 + +### Fixed + +- Fix typo in selector when using `class` strategy that breaks background colors on checkboxes and radio buttons ([#72](https://github.com/tailwindlabs/tailwindcss-forms/pull/72)) + +## [0.3.2] - 2021-03-26 + +### Fixed + +- Filter `null` rules for JIT compatibility ([b4c4e03](https://github.com/tailwindlabs/tailwindcss-forms/commit/b4c4e039337c3a5599f5b6d9eabbcc8ab9e8c8d9)) + +## [0.3.1] - 2021-03-26 + +### Fixed + +- Use `base` as default strategy, not `class` ([#61](https://github.com/tailwindlabs/tailwindcss-forms/pull/61)) + +## [0.3.0] - 2021-03-25 + +### Added + +- Add `class` strategy for you babies and your custom select and date picker libraries ;) ([#39](https://github.com/tailwindlabs/tailwindcss-forms/pull/39)) + +## [0.2.1] - 2020-11-17 + +### Fixed + +- Fix issue where default checkbox/radio border color took precedence over user border color on focus ([d0b9fd9](https://github.com/tailwindlabs/tailwindcss-forms/commit/d0b9fd9)) + +## [0.2.0] - 2020-11-16 + +### Changed + +- Update form styles to be less opinionated and encourage custom styling ([3288709](https://github.com/tailwindlabs/tailwindcss-forms/commit/3288709b59f4101511ec19f30cb2dafe7738251e)) +- Update custom property names to match namespaced variables in Tailwind CSS v2.0 ([adb9807](https://github.com/tailwindlabs/tailwindcss-forms/commit/adb98078fc830d0416cb5ea2c895e997d5f0a5ec), [bbd8510](https://github.com/tailwindlabs/tailwindcss-forms/commit/bbd85102ef4a402b3c39d997c025208a33694cc4)) + +## [0.1.4] - 2020-11-12 + +### Fixed + +- Fix SVG background images not rendering properly in all browsers ([#5](https://github.com/tailwindlabs/tailwindcss-forms/pull/5)) + +## [0.1.3] - 2020-11-12 + +### Changed + +- Update focus styles to account for changes to `ring` API in latest Tailwind CSS 2.0 alpha ([5c16689](https://github.com/tailwindlabs/tailwindcss-forms/commit/5c166896b06475832bd8364f9f3ef5c4baec585f)) + +## [0.1.2] - 2020-11-11 + +### Fixed + +- Work around iOS Safari bug that causes date inputs to render with no height when empty ([b98365b](https://github.com/tailwindlabs/tailwindcss-forms/commit/b98365b903b586bfbe7a6ae745ba64b5d87e23e3)) + +## [0.1.1] - 2020-11-11 + +### Changed + +- Move `tailwindcss` to dependencies, hoping to get it working with Tailwind Play ([d625ea1](https://github.com/tailwindlabs/tailwindcss-forms/commit/d625ea11bd111a4d8cde937e36f3d229ecdf7c6a)) + +## [0.1.0] - 2020-11-11 + +Initial release! + +[unreleased]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.7...HEAD +[0.5.7]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.6...v0.5.7 +[0.5.6]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.5...v0.5.6 +[0.5.5]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.4...v0.5.5 +[0.5.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.3...v0.5.4 +[0.5.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.2...v0.5.3 +[0.5.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.1...v0.5.2 +[0.5.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.0...v0.5.1 +[0.5.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.4.1...v0.5.0 +[0.4.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.3...v0.4.0 +[0.3.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.3...v0.3.4 +[0.3.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.2...v0.3.3 +[0.3.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.1...v0.3.2 +[0.3.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.0...v0.3.1 +[0.3.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.2.1...v0.3.0 +[0.2.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.4...v0.2.0 +[0.1.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.3...v0.1.4 +[0.1.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.2...v0.1.3 +[0.1.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/tailwindlabs/tailwindcss-forms/releases/tag/v0.1.0 diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/LICENSE b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/README.md b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/README.md new file mode 100644 index 0000000..56395c9 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/README.md @@ -0,0 +1,122 @@ +# @tailwindcss/forms + +A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities. + +## Installation + +Install the plugin from npm: + +```sh +npm install -D @tailwindcss/forms +``` + +Then add the plugin to your `tailwind.config.js` file: + +```js +// tailwind.config.js +module.exports = { + theme: { + // ... + }, + plugins: [ + require('@tailwindcss/forms'), + // ... + ], +} +``` + +## Basic usage + +[**View the live demo**](https://tailwindcss-forms.vercel.app/) + +All of the basic form elements you use will now have some simple default styles that are easy to override with utilities. + +Currently we add basic utility-friendly form styles for the following form element types: + +- `input[type='text']` +- `input[type='password']` +- `input[type='email']` +- `input[type='number']` +- `input[type='url']` +- `input[type='date']` +- `input[type='datetime-local']` +- `input[type='month']` +- `input[type='week']` +- `input[type='time']` +- `input[type='search']` +- `input[type='tel']` +- `input[type='checkbox']` +- `input[type='radio']` +- `select` +- `select[multiple]` +- `textarea` + +Every element has been normalized/reset to a simple visually consistent style that is easy to customize with utilities, even elements like `` that normally need to be reset with `appearance: none` and customized using custom CSS: + +```html + + + + + +``` + +More customization examples and best practices coming soon. + +### Using classes to style + +In addition to the global styles, we also generate a set of corresponding classes which can be used to explicitly apply the form styles to an element. This can be useful in situations where you need to make a non-form element, such as a `
`, look like a form element. + +```html + + + + + +``` + +Here is a complete table of the provided `form-*` classes for reference: + +| Base | Class | +| ------------------------- | ------------------ | +| `[type='text']` | `form-input` | +| `[type='email']` | `form-input` | +| `[type='url']` | `form-input` | +| `[type='password']` | `form-input` | +| `[type='number']` | `form-input` | +| `[type='date']` | `form-input` | +| `[type='datetime-local']` | `form-input` | +| `[type='month']` | `form-input` | +| `[type='search']` | `form-input` | +| `[type='tel']` | `form-input` | +| `[type='time']` | `form-input` | +| `[type='week']` | `form-input` | +| `textarea` | `form-textarea` | +| `select` | `form-select` | +| `select[multiple]` | `form-multiselect` | +| `[type='checkbox']` | `form-checkbox` | +| `[type='radio']` | `form-radio` | + +### Using only global styles or only classes + +Although we recommend thinking of this plugin as a "form reset" rather than a collection of form component styles, in some cases our default approach may be too heavy-handed, especially when integrating this plugin into existing projects. + +If generating both the global (base) styles and classes doesn't work well with your project, you can use the `strategy` option to limit the plugin to just one of these approaches. + +```js +// tailwind.config.js +plugins: [ + require("@tailwindcss/forms")({ + strategy: 'base', // only generate global styles + strategy: 'class', // only generate classes + }), +], +``` + +When using the `base` strategy, form elements are styled globally, and no `form-{name}` classes are generated. + +When using the `class` strategy, form elements are not styled globally, and instead must be styled using the generated `form-{name}` classes. diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/index.html b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/index.html new file mode 100644 index 0000000..4ed5c0e --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/index.html @@ -0,0 +1,255 @@ + + + + + + @tailwindcss/forms examples + + + +
+
+
+

@tailwindcss/forms examples

+

+ An opinionated form reset designed to make form elements easy to style with utility + classes. +

+ +
+
+

Unstyled

+

This is how form elements look out of the box.

+
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+

Simple

+
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+

Underline

+
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+

Solid

+
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+
+ + diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/kitchen-sink.html b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/kitchen-sink.html new file mode 100644 index 0000000..656835c --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/kitchen-sink.html @@ -0,0 +1,222 @@ + + + + + + @tailwindcss/forms Kitchen Sink + + + +
+
+

Reset styles

+

+ These are form elements this plugin styles by default. +

+
+
+ + + + + + + + + + + +
+
+ + + + + + + +
+ Checkboxes +
+
+ +
+
+ +
+
+ +
+
+
+
+ Radio Buttons +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+

Untouched

+

+ These are form elements we don't handle (yet?), but we use this to make sure we haven't + accidentally styled them by mistake. +

+
+
+ + + + +
+
+
+
+ + diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/node_modules/.bin/mini-svg-data-uri b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/node_modules/.bin/mini-svg-data-uri new file mode 100755 index 0000000..5bcdf79 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/node_modules/.bin/mini-svg-data-uri @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../../../../../../mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/cli.js" "$@" +else + exec node "$basedir/../../../../../../mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/cli.js" "$@" +fi diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/node_modules/.bin/tailwind b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/node_modules/.bin/tailwind new file mode 100755 index 0000000..28c833e --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/node_modules/.bin/tailwind @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +else + exec node "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +fi diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/node_modules/.bin/tailwindcss b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/node_modules/.bin/tailwindcss new file mode 100755 index 0000000..28c833e --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/node_modules/.bin/tailwindcss @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +else + exec node "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +fi diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/package.json b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/package.json new file mode 100644 index 0000000..c34c6da --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/package.json @@ -0,0 +1,36 @@ +{ + "name": "@tailwindcss/forms", + "version": "0.5.7", + "main": "src/index.js", + "types": "src/index.d.ts", + "license": "MIT", + "repository": "https://github.com/tailwindlabs/tailwindcss-forms", + "publishConfig": { + "access": "public" + }, + "prettier": { + "printWidth": 100, + "semi": false, + "singleQuote": true, + "trailingComma": "es5" + }, + "scripts": { + "dev": "concurrently \"npm run serve\" \"npm run watch\"", + "serve": "live-server .", + "watch": "npm run build -- -w", + "build": "tailwindcss -o dist/tailwind.css" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1" + }, + "devDependencies": { + "autoprefixer": "^10.4.6", + "concurrently": "^5.3.0", + "live-server": "^1.2.2", + "postcss": "^8.4.13", + "tailwindcss": "^3.0.24" + }, + "dependencies": { + "mini-svg-data-uri": "^1.2.3" + } +} diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/src/index.d.ts b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/src/index.d.ts new file mode 100644 index 0000000..1918866 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/src/index.d.ts @@ -0,0 +1,7 @@ +declare function plugin(options?: Partial<{ strategy: 'base' | 'class' }>): { handler: () => void } + +declare namespace plugin { + const __isOptionsFunction: true +} + +export = plugin diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/src/index.js b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/src/index.js new file mode 100644 index 0000000..dd2953f --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/src/index.js @@ -0,0 +1,358 @@ +const svgToDataUri = require('mini-svg-data-uri') +const plugin = require('tailwindcss/plugin') +const defaultTheme = require('tailwindcss/defaultTheme') +const colors = require('tailwindcss/colors') +const [baseFontSize, { lineHeight: baseLineHeight }] = defaultTheme.fontSize.base +const { spacing, borderWidth, borderRadius } = defaultTheme + +function resolveColor(color, opacityVariableName) { + return color.replace('', `var(${opacityVariableName}, 1)`) +} + +const forms = plugin.withOptions(function (options = { strategy: undefined }) { + return function ({ addBase, addComponents, theme }) { + const strategy = options.strategy === undefined ? ['base', 'class'] : [options.strategy] + + const rules = [ + { + base: [ + "[type='text']", + 'input:where(:not([type]))', + "[type='email']", + "[type='url']", + "[type='password']", + "[type='number']", + "[type='date']", + "[type='datetime-local']", + "[type='month']", + "[type='search']", + "[type='tel']", + "[type='time']", + "[type='week']", + '[multiple]', + 'textarea', + 'select', + ], + class: ['.form-input', '.form-textarea', '.form-select', '.form-multiselect'], + styles: { + appearance: 'none', + 'background-color': '#fff', + 'border-color': resolveColor( + theme('colors.gray.500', colors.gray[500]), + '--tw-border-opacity' + ), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.none, + 'padding-top': spacing[2], + 'padding-right': spacing[3], + 'padding-bottom': spacing[2], + 'padding-left': spacing[3], + 'font-size': baseFontSize, + 'line-height': baseLineHeight, + '--tw-shadow': '0 0 #0000', + '&:focus': { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '0px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': resolveColor( + theme('colors.blue.600', colors.blue[600]), + '--tw-ring-opacity' + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + 'border-color': resolveColor( + theme('colors.blue.600', colors.blue[600]), + '--tw-border-opacity' + ), + }, + }, + }, + { + base: ['input::placeholder', 'textarea::placeholder'], + class: ['.form-input::placeholder', '.form-textarea::placeholder'], + styles: { + color: resolveColor(theme('colors.gray.500', colors.gray[500]), '--tw-text-opacity'), + opacity: '1', + }, + }, + { + base: ['::-webkit-datetime-edit-fields-wrapper'], + class: ['.form-input::-webkit-datetime-edit-fields-wrapper'], + styles: { + padding: '0', + }, + }, + { + // Unfortunate hack until https://bugs.webkit.org/show_bug.cgi?id=198959 is fixed. + // This sucks because users can't change line-height with a utility on date inputs now. + // Reference: https://github.com/twbs/bootstrap/pull/31993 + base: ['::-webkit-date-and-time-value'], + class: ['.form-input::-webkit-date-and-time-value'], + styles: { + 'min-height': '1.5em', + }, + }, + { + // In Safari on iOS date and time inputs are centered instead of left-aligned and can't be + // changed with `text-align` utilities on the input by default. Resetting this to `inherit` + // makes them left-aligned by default and makes it possible to override the alignment with + // utility classes without using an arbitrary variant to target the pseudo-elements. + base: ['::-webkit-date-and-time-value'], + class: ['.form-input::-webkit-date-and-time-value'], + styles: { + 'text-align': 'inherit', + }, + }, + { + // In Safari on macOS date time inputs that are set to `display: block` have unexpected + // extra bottom spacing. This can be corrected by setting the `::-webkit-datetime-edit` + // pseudo-element to `display: inline-flex`, instead of the browser default of + // `display: inline-block`. + base: ['::-webkit-datetime-edit'], + class: ['.form-input::-webkit-datetime-edit'], + styles: { + display: 'inline-flex', + }, + }, + { + // In Safari on macOS date time inputs are 4px taller than normal inputs + // This is because there is extra padding on the datetime-edit and datetime-edit-{part}-field pseudo elements + // See https://github.com/tailwindlabs/tailwindcss-forms/issues/95 + base: [ + '::-webkit-datetime-edit', + '::-webkit-datetime-edit-year-field', + '::-webkit-datetime-edit-month-field', + '::-webkit-datetime-edit-day-field', + '::-webkit-datetime-edit-hour-field', + '::-webkit-datetime-edit-minute-field', + '::-webkit-datetime-edit-second-field', + '::-webkit-datetime-edit-millisecond-field', + '::-webkit-datetime-edit-meridiem-field', + ], + class: [ + '.form-input::-webkit-datetime-edit', + '.form-input::-webkit-datetime-edit-year-field', + '.form-input::-webkit-datetime-edit-month-field', + '.form-input::-webkit-datetime-edit-day-field', + '.form-input::-webkit-datetime-edit-hour-field', + '.form-input::-webkit-datetime-edit-minute-field', + '.form-input::-webkit-datetime-edit-second-field', + '.form-input::-webkit-datetime-edit-millisecond-field', + '.form-input::-webkit-datetime-edit-meridiem-field', + ], + styles: { + 'padding-top': 0, + 'padding-bottom': 0, + }, + }, + { + base: ['select'], + class: ['.form-select'], + styles: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-position': `right ${spacing[2]} center`, + 'background-repeat': `no-repeat`, + 'background-size': `1.5em 1.5em`, + 'padding-right': spacing[10], + 'print-color-adjust': `exact`, + }, + }, + { + base: ['[multiple]', '[size]:where(select:not([size="1"]))'], + class: ['.form-select:where([size]:not([size="1"]))'], + styles: { + 'background-image': 'initial', + 'background-position': 'initial', + 'background-repeat': 'unset', + 'background-size': 'initial', + 'padding-right': spacing[3], + 'print-color-adjust': 'unset', + }, + }, + { + base: [`[type='checkbox']`, `[type='radio']`], + class: ['.form-checkbox', '.form-radio'], + styles: { + appearance: 'none', + padding: '0', + 'print-color-adjust': 'exact', + display: 'inline-block', + 'vertical-align': 'middle', + 'background-origin': 'border-box', + 'user-select': 'none', + 'flex-shrink': '0', + height: spacing[4], + width: spacing[4], + color: resolveColor(theme('colors.blue.600', colors.blue[600]), '--tw-text-opacity'), + 'background-color': '#fff', + 'border-color': resolveColor( + theme('colors.gray.500', colors.gray[500]), + '--tw-border-opacity' + ), + 'border-width': borderWidth['DEFAULT'], + '--tw-shadow': '0 0 #0000', + }, + }, + { + base: [`[type='checkbox']`], + class: ['.form-checkbox'], + styles: { + 'border-radius': borderRadius['none'], + }, + }, + { + base: [`[type='radio']`], + class: ['.form-radio'], + styles: { + 'border-radius': '100%', + }, + }, + { + base: [`[type='checkbox']:focus`, `[type='radio']:focus`], + class: ['.form-checkbox:focus', '.form-radio:focus'], + styles: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '2px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': resolveColor( + theme('colors.blue.600', colors.blue[600]), + '--tw-ring-opacity' + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + }, + }, + { + base: [`[type='checkbox']:checked`, `[type='radio']:checked`], + class: ['.form-checkbox:checked', '.form-radio:checked'], + styles: { + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `100% 100%`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + }, + }, + { + base: [`[type='checkbox']:checked`], + class: ['.form-checkbox:checked'], + styles: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + + '@media (forced-colors: active) ': { + appearance: 'auto', + }, + }, + }, + { + base: [`[type='radio']:checked`], + class: ['.form-radio:checked'], + styles: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + + '@media (forced-colors: active) ': { + appearance: 'auto', + }, + }, + }, + { + base: [ + `[type='checkbox']:checked:hover`, + `[type='checkbox']:checked:focus`, + `[type='radio']:checked:hover`, + `[type='radio']:checked:focus`, + ], + class: [ + '.form-checkbox:checked:hover', + '.form-checkbox:checked:focus', + '.form-radio:checked:hover', + '.form-radio:checked:focus', + ], + styles: { + 'border-color': 'transparent', + 'background-color': 'currentColor', + }, + }, + { + base: [`[type='checkbox']:indeterminate`], + class: ['.form-checkbox:indeterminate'], + styles: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `100% 100%`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + + '@media (forced-colors: active) ': { + appearance: 'auto', + }, + }, + }, + { + base: [`[type='checkbox']:indeterminate:hover`, `[type='checkbox']:indeterminate:focus`], + class: ['.form-checkbox:indeterminate:hover', '.form-checkbox:indeterminate:focus'], + styles: { + 'border-color': 'transparent', + 'background-color': 'currentColor', + }, + }, + { + base: [`[type='file']`], + class: null, + styles: { + background: 'unset', + 'border-color': 'inherit', + 'border-width': '0', + 'border-radius': '0', + padding: '0', + 'font-size': 'unset', + 'line-height': 'inherit', + }, + }, + { + base: [`[type='file']:focus`], + class: null, + styles: { + outline: [`1px solid ButtonText`, `1px auto -webkit-focus-ring-color`], + }, + }, + ] + + const getStrategyRules = (strategy) => + rules + .map((rule) => { + if (rule[strategy] === null) return null + + return { [rule[strategy]]: rule.styles } + }) + .filter(Boolean) + + if (strategy.includes('base')) { + addBase(getStrategyRules('base')) + } + + if (strategy.includes('class')) { + addComponents(getStrategyRules('class')) + } + } +}) + +module.exports = forms diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/tailwind.config.js b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/tailwind.config.js new file mode 100644 index 0000000..5ef17d5 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms/tailwind.config.js @@ -0,0 +1,9 @@ +module.exports = { + content: ['./index.html', './kitchen-sink.html'], + theme: { + extend: { + // + }, + }, + plugins: [require('./src')], +} diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/mini-svg-data-uri b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/mini-svg-data-uri new file mode 120000 index 0000000..6128e72 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/mini-svg-data-uri @@ -0,0 +1 @@ +../../mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri \ No newline at end of file diff --git a/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/tailwindcss b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/tailwindcss new file mode 120000 index 0000000..7fdeea1 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/tailwindcss @@ -0,0 +1 @@ +../../tailwindcss@3.4.1/node_modules/tailwindcss \ No newline at end of file diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/LICENSE b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/README.md b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/README.md new file mode 100644 index 0000000..70970ca --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/README.md @@ -0,0 +1,27 @@ +

+ + + + + Tailwind CSS Typography + + +

+ +A plugin that provides a set of `prose` classes you can use to add beautiful typographic defaults to any vanilla HTML you don't control, like HTML rendered from Markdown, or pulled from a CMS. + +--- + +## Documentation + +For full documentation, visit [tailwindcss.com/docs/typography-plugin](https://tailwindcss.com/docs/typography-plugin). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss the Tailwind CSS Typography plugin on GitHub](https://github.com/tailwindlabs/tailwindcss/discussions) + +For casual chit-chat with others using the framework: + +[Join the Tailwind CSS Discord Server](https://tailwindcss.com/discord) diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/node_modules/.bin/tailwind b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/node_modules/.bin/tailwind new file mode 100755 index 0000000..28c833e --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/node_modules/.bin/tailwind @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +else + exec node "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +fi diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/node_modules/.bin/tailwindcss b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/node_modules/.bin/tailwindcss new file mode 100755 index 0000000..28c833e --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/node_modules/.bin/tailwindcss @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/lib/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules/tailwindcss/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/tailwindcss@3.4.1/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +else + exec node "$basedir/../../../../../../tailwindcss@3.4.1/node_modules/tailwindcss/lib/cli.js" "$@" +fi diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/package.json b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/package.json new file mode 100644 index 0000000..9ef4605 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/package.json @@ -0,0 +1,59 @@ +{ + "name": "@tailwindcss/typography", + "version": "0.5.10", + "description": "A Tailwind CSS plugin for automatically styling plain HTML content with beautiful typographic defaults.", + "main": "src/index.js", + "types": "src/index.d.ts", + "files": [ + "src/*.js", + "src/*.d.ts", + "dist/" + ], + "repository": "https://github.com/tailwindcss/typography", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "prettier": { + "printWidth": 100, + "semi": false, + "singleQuote": true, + "trailingComma": "es5" + }, + "scripts": { + "test": "jest", + "dev": "next dev demo", + "build": "next build demo", + "export": "next export demo", + "start": "next start demo" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders" + }, + "devDependencies": { + "@mdx-js/loader": "^1.0.19", + "@mdx-js/mdx": "^1.6.6", + "@next/mdx": "^8.1.0", + "autoprefixer": "^10.2.1", + "highlight.js": "^10.4.1", + "jest": "^26.6.1", + "jest-diff": "^27.3.1", + "next": "^12.0.1", + "postcss": "^8.2.3", + "prettier": "^2.1.2", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "tailwindcss": "^3.2.2" + }, + "dependencies": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "postcss-selector-parser": "6.0.10" + }, + "jest": { + "setupFilesAfterEnv": [ + "/jest/customMatchers.js" + ] + } +} diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/index.d.ts b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/index.d.ts new file mode 100644 index 0000000..5c38097 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/index.d.ts @@ -0,0 +1,9 @@ +declare function plugin(options?: Partial<{ className: string; target: 'modern' | 'legacy' }>): { + handler: () => void +} + +declare namespace plugin { + const __isOptionsFunction: true +} + +export = plugin diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/index.js b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/index.js new file mode 100644 index 0000000..7b32ca7 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/index.js @@ -0,0 +1,139 @@ +const plugin = require('tailwindcss/plugin') +const merge = require('lodash.merge') +const castArray = require('lodash.castarray') +const styles = require('./styles') +const { commonTrailingPseudos } = require('./utils') + +const computed = { + // Reserved for future "magic properties", for example: + // bulletColor: (color) => ({ 'ul > li::before': { backgroundColor: color } }), +} + +function inWhere(selector, { className, modifier, prefix }) { + let prefixedNot = prefix(`.not-${className}`).slice(1) + let selectorPrefix = selector.startsWith('>') + ? `${modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`} ` + : '' + + // Parse the selector, if every component ends in the same pseudo element(s) then move it to the end + let [trailingPseudo, rebuiltSelector] = commonTrailingPseudos(selector) + + if (trailingPseudo) { + return `:where(${selectorPrefix}${rebuiltSelector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))${trailingPseudo}` + } + + return `:where(${selectorPrefix}${selector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))` +} + +function isObject(value) { + return typeof value === 'object' && value !== null +} + +function configToCss(config = {}, { target, className, modifier, prefix }) { + function updateSelector(k, v) { + if (target === 'legacy') { + return [k, v] + } + + if (Array.isArray(v)) { + return [k, v] + } + + if (isObject(v)) { + let nested = Object.values(v).some(isObject) + if (nested) { + return [ + inWhere(k, { className, modifier, prefix }), + v, + Object.fromEntries(Object.entries(v).map(([k, v]) => updateSelector(k, v))), + ] + } + + return [inWhere(k, { className, modifier, prefix }), v] + } + + return [k, v] + } + + return Object.fromEntries( + Object.entries( + merge( + {}, + ...Object.keys(config) + .filter((key) => computed[key]) + .map((key) => computed[key](config[key])), + ...castArray(config.css || {}) + ) + ).map(([k, v]) => updateSelector(k, v)) + ) +} + +module.exports = plugin.withOptions( + ({ className = 'prose', target = 'modern' } = {}) => { + return function ({ addVariant, addComponents, theme, prefix }) { + let modifiers = theme('typography') + + let options = { className, prefix } + + for (let [name, ...selectors] of [ + ['headings', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'th'], + ['h1'], + ['h2'], + ['h3'], + ['h4'], + ['h5'], + ['h6'], + ['p'], + ['a'], + ['blockquote'], + ['figure'], + ['figcaption'], + ['strong'], + ['em'], + ['code'], + ['pre'], + ['ol'], + ['ul'], + ['li'], + ['table'], + ['thead'], + ['tr'], + ['th'], + ['td'], + ['img'], + ['video'], + ['hr'], + ['lead', '[class~="lead"]'], + ]) { + selectors = selectors.length === 0 ? [name] : selectors + + let selector = + target === 'legacy' ? selectors.map((selector) => `& ${selector}`) : selectors.join(', ') + + addVariant( + `${className}-${name}`, + target === 'legacy' ? selector : `& :is(${inWhere(selector, options)})` + ) + } + + addComponents( + Object.keys(modifiers).map((modifier) => ({ + [modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`]: configToCss( + modifiers[modifier], + { + target, + className, + modifier, + prefix, + } + ), + })) + ) + } + }, + () => { + return { + theme: { typography: styles }, + } + } +) diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/index.test.js b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/index.test.js new file mode 100644 index 0000000..94e3552 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/index.test.js @@ -0,0 +1,1413 @@ +const path = require('path') +const tailwind = require('tailwindcss') +const postcss = require('postcss') +const typographyPlugin = require('.') + +let html = String.raw +let css = String.raw + +let vars = ` + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +` +let defaults = css` + *, + ::before, + ::after { + ${vars} + } + ::backdrop { + ${vars} + } +` + +function run(config, plugin = tailwind) { + let { currentTestName } = expect.getState() + config = { + ...{ plugins: [typographyPlugin], corePlugins: { preflight: false } }, + ...config, + } + + return postcss(plugin(config)).process( + ['@tailwind base;', '@tailwind components;', '@tailwind utilities'].join('\n'), + { + from: `${path.resolve(__filename)}?test=${currentTestName}`, + } + ) +} + +test('specificity is reduced with :where', async () => { + let config = { + content: [{ raw: html`
` }], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + maxWidth: '65ch', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'ol[type="A"]': { + listStyleType: 'upper-alpha', + }, + 'blockquote p:first-of-type::before': { + content: 'open-quote', + }, + 'blockquote p:last-of-type::after': { + content: 'close-quote', + }, + 'h4 strong': { + fontWeight: '700', + }, + 'figure > *': { + margin: 0, + }, + 'ol > li::marker': { + fontWeight: '400', + color: 'var(--tw-prose-counters)', + }, + '> ul > li p': { + marginTop: '16px', + marginBottom: '16px', + }, + 'code::before': { + content: '"`"', + }, + 'code::after': { + content: '"`"', + }, + }, + ], + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + color: var(--tw-prose-body); + max-width: 65ch; + } + .prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-lead); + } + .prose :where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .prose :where(ol[type='A']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + list-style-type: upper-alpha; + } + .prose + :where(blockquote p:first-of-type):not(:where([class~='not-prose'], [class~='not-prose'] + *))::before { + content: open-quote; + } + .prose + :where(blockquote p:last-of-type):not(:where([class~='not-prose'], [class~='not-prose'] + *))::after { + content: close-quote; + } + .prose :where(h4 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-weight: 700; + } + .prose :where(figure > *):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin: 0; + } + .prose :where(ol > li):not(:where([class~='not-prose'], [class~='not-prose'] *))::marker { + font-weight: 400; + color: var(--tw-prose-counters); + } + .prose + :where(.prose > ul > li p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin-top: 16px; + margin-bottom: 16px; + } + .prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))::before { + content: '`'; + } + .prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))::after { + content: '`'; + } + ` + ) + }) +}) + +test('variants', async () => { + let config = { + content: [{ raw: html`
` }], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'red', + p: { + color: 'lime', + }, + '> ul > li': { + color: 'purple', + }, + }, + ], + }, + lg: { + css: { + color: 'green', + p: { + color: 'tomato', + }, + '> ul > li': { + color: 'blue', + }, + }, + }, + xl: { + css: { + color: 'yellow', + '> ul > li': { + color: 'hotpink', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .hover\:prose-lg:hover { + color: green; + } + .hover\:prose-lg:hover :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: tomato; + } + .hover\:prose-lg:hover + :where(.hover\:prose-lg:hover + > ul + > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: blue; + } + @media (min-width: 640px) { + .sm\:prose { + color: red; + } + .sm\:prose :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: lime; + } + .sm\:prose + :where(.sm\:prose > ul > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: purple; + } + } + @media (min-width: 1024px) { + .lg\:prose-lg { + color: green; + } + .lg\:prose-lg :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: tomato; + } + .lg\:prose-lg + :where(.lg\:prose-lg > ul > li):not(:where([class~='not-prose'], [class~='not-prose'] + *)) { + color: blue; + } + } + ` + ) + }) +}) + +test('modifiers', async () => { + let config = { + content: [{ raw: html`
` }], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + maxWidth: '65ch', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'ol[type="A"]': { + listStyleType: 'upper-alpha', + }, + 'blockquote p:first-of-type::before': { + content: 'open-quote', + }, + 'blockquote p:last-of-type::after': { + content: 'close-quote', + }, + 'h4 strong': { + fontWeight: '700', + }, + 'figure > *': { + margin: 0, + }, + 'ol > li::marker': { + fontWeight: '400', + color: 'var(--tw-prose-counters)', + }, + 'code::before': { + content: '"`"', + }, + 'code::after': { + content: '"`"', + }, + }, + ], + }, + lg: { + css: [ + { + fontSize: '18px', + lineHeight: '1.75', + p: { + marginTop: '24px', + marginBottom: '24px', + }, + '[class~="lead"]': { + fontSize: '22px', + }, + blockquote: { + marginTop: '40px', + marginBottom: '40px', + }, + '> ul > li': { + paddingLeft: '12px', + }, + h1: { + fontSize: '48px', + marginTop: '0', + marginBottom: '40px', + }, + h2: { + fontSize: '30px', + marginTop: '56px', + marginBottom: '32px', + }, + h3: { + fontSize: '24px', + marginTop: '40px', + marginBottom: '16px', + }, + }, + ], + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + color: var(--tw-prose-body); + max-width: 65ch; + } + .prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-lead); + } + .prose :where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .prose :where(ol[type='A']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + list-style-type: upper-alpha; + } + .prose + :where(blockquote p:first-of-type):not(:where([class~='not-prose'], [class~='not-prose'] + *))::before { + content: open-quote; + } + .prose + :where(blockquote p:last-of-type):not(:where([class~='not-prose'], [class~='not-prose'] + *))::after { + content: close-quote; + } + .prose :where(h4 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-weight: 700; + } + .prose :where(figure > *):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin: 0; + } + .prose :where(ol > li):not(:where([class~='not-prose'], [class~='not-prose'] *))::marker { + font-weight: 400; + color: var(--tw-prose-counters); + } + .prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))::before { + content: '`'; + } + .prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))::after { + content: '`'; + } + .prose-lg { + font-size: 18px; + line-height: 1.75; + } + .prose-lg :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin-top: 24px; + margin-bottom: 24px; + } + .prose-lg + :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-size: 22px; + } + .prose-lg :where(blockquote):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin-top: 40px; + margin-bottom: 40px; + } + .prose-lg + :where(.prose-lg > ul > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + padding-left: 12px; + } + .prose-lg :where(h1):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-size: 48px; + margin-top: 0; + margin-bottom: 40px; + } + .prose-lg :where(h2):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-size: 30px; + margin-top: 56px; + margin-bottom: 32px; + } + .prose-lg :where(h3):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-size: 24px; + margin-top: 40px; + margin-bottom: 16px; + } + ` + ) + }) +}) + +test('legacy target', async () => { + let config = { + plugins: [typographyPlugin({ target: 'legacy' })], + content: [ + { raw: html`
` }, + ], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + maxWidth: '65ch', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'ol[type="A"]': { + listStyleType: 'upper-alpha', + }, + 'blockquote p:first-of-type::before': { + content: 'open-quote', + }, + 'blockquote p:last-of-type::after': { + content: 'close-quote', + }, + 'h4 strong': { + fontWeight: '700', + }, + 'figure > *': { + margin: 0, + }, + 'ol > li::marker': { + fontWeight: '400', + color: 'var(--tw-prose-counters)', + }, + 'code::before': { + content: '"`"', + }, + 'code::after': { + content: '"`"', + }, + }, + ], + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + color: var(--tw-prose-body); + max-width: 65ch; + } + .prose [class~='lead'] { + color: var(--tw-prose-lead); + } + .prose strong { + color: var(--tw-prose-bold); + font-weight: 600; + } + .prose ol[type='A'] { + list-style-type: upper-alpha; + } + .prose blockquote p:first-of-type::before { + content: open-quote; + } + .prose blockquote p:last-of-type::after { + content: close-quote; + } + .prose h4 strong { + font-weight: 700; + } + .prose figure > * { + margin: 0; + } + .prose ol > li::marker { + font-weight: 400; + color: var(--tw-prose-counters); + } + .prose code::before { + content: '`'; + } + .prose code::after { + content: '`'; + } + .prose-headings\:text-ellipsis h1 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h2 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h3 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h4 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h5 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h6 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis th { + text-overflow: ellipsis; + } + .prose-h1\:text-center h1 { + text-align: center; + } + ` + ) + }) +}) + +test('custom class name', async () => { + let config = { + plugins: [typographyPlugin({ className: 'markdown' })], + content: [{ raw: html`
` }], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + maxWidth: '65ch', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'ol[type="A"]': { + listStyleType: 'upper-alpha', + }, + 'blockquote p:first-of-type::before': { + content: 'open-quote', + }, + 'blockquote p:last-of-type::after': { + content: 'close-quote', + }, + 'h4 strong': { + fontWeight: '700', + }, + 'figure > *': { + margin: 0, + }, + 'ol > li::marker': { + fontWeight: '400', + color: 'var(--tw-prose-counters)', + }, + 'code::before': { + content: '"`"', + }, + 'code::after': { + content: '"`"', + }, + }, + ], + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .markdown { + color: var(--tw-prose-body); + max-width: 65ch; + } + .markdown + :where([class~='lead']):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + color: var(--tw-prose-lead); + } + .markdown :where(strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .markdown + :where(ol[type='A']):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + list-style-type: upper-alpha; + } + .markdown + :where(blockquote + p:first-of-type):not(:where([class~='not-markdown'], [class~='not-markdown'] + *))::before { + content: open-quote; + } + .markdown + :where(blockquote + p:last-of-type):not(:where([class~='not-markdown'], [class~='not-markdown'] *))::after { + content: close-quote; + } + .markdown + :where(h4 strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + font-weight: 700; + } + .markdown + :where(figure > *):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + margin: 0; + } + .markdown + :where(ol > li):not(:where([class~='not-markdown'], [class~='not-markdown'] *))::marker { + font-weight: 400; + color: var(--tw-prose-counters); + } + .markdown + :where(code):not(:where([class~='not-markdown'], [class~='not-markdown'] *))::before { + content: '`'; + } + .markdown + :where(code):not(:where([class~='not-markdown'], [class~='not-markdown'] *))::after { + content: '`'; + } + ` + ) + }) +}) + +test('element variants', async () => { + let config = { + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'h4 strong': { + fontWeight: '700', + }, + }, + ], + }, + }, + }, + } + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + color: var(--tw-prose-body); + } + .prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-lead); + } + .prose :where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .prose :where(h4 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-weight: 700; + } + .prose-headings\:underline + :is(:where(h1, h2, h3, h4, h5, h6, th):not(:where([class~='not-prose'], [class~='not-prose'] + *))) { + text-decoration-line: underline; + } + .prose-h1\:text-3xl + :is(:where(h1):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.875rem; + line-height: 2.25rem; + } + .prose-h2\:text-2xl + :is(:where(h2):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.5rem; + line-height: 2rem; + } + .prose-h3\:text-xl + :is(:where(h3):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.25rem; + line-height: 1.75rem; + } + .prose-h4\:text-lg + :is(:where(h4):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.125rem; + line-height: 1.75rem; + } + .prose-p\:text-gray-700 + :is(:where(p):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); + } + .prose-a\:font-bold + :is(:where(a):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-weight: 700; + } + .prose-blockquote\:italic + :is(:where(blockquote):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-style: italic; + } + .prose-figure\:mx-auto + :is(:where(figure):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + margin-left: auto; + margin-right: auto; + } + .prose-figcaption\:opacity-75 + :is(:where(figcaption):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + opacity: 0.75; + } + .prose-strong\:font-medium + :is(:where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-weight: 500; + } + .prose-em\:italic + :is(:where(em):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-style: italic; + } + .prose-code\:font-mono + :is(:where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; + } + .prose-pre\:font-mono + :is(:where(pre):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; + } + .prose-ol\:pl-6 :is(:where(ol):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + padding-left: 1.5rem; + } + .prose-ul\:pl-8 :is(:where(ul):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + padding-left: 2rem; + } + .prose-li\:my-4 :is(:where(li):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + margin-top: 1rem; + margin-bottom: 1rem; + } + .prose-table\:my-8 + :is(:where(table):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + margin-top: 2rem; + margin-bottom: 2rem; + } + .prose-thead\:border-red-300 + :is(:where(thead):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + --tw-border-opacity: 1; + border-color: rgb(252 165 165 / var(--tw-border-opacity)); + } + .prose-tr\:border-red-200 + :is(:where(tr):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + --tw-border-opacity: 1; + border-color: rgb(254 202 202 / var(--tw-border-opacity)); + } + .prose-th\:text-left + :is(:where(th):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + text-align: left; + } + .prose-img\:rounded-lg + :is(:where(img):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + border-radius: 0.5rem; + } + .prose-video\:my-12 + :is(:where(video):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + margin-top: 3rem; + margin-bottom: 3rem; + } + .prose-hr\:border-t-2 + :is(:where(hr):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + border-top-width: 2px; + } + .prose-lead\:italic + :is(:where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-style: italic; + } + ` + ) + }) +}) + +test('element variants with custom class name', async () => { + let config = { + plugins: [typographyPlugin({ className: 'markdown' })], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'h4 strong': { + fontWeight: '700', + }, + }, + ], + }, + }, + }, + } + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .markdown { + color: var(--tw-prose-body); + } + .markdown + :where([class~='lead']):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + color: var(--tw-prose-lead); + } + .markdown :where(strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .markdown + :where(h4 strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + font-weight: 700; + } + .markdown-headings\:underline + :is(:where(h1, h2, h3, h4, h5, h6, th):not(:where([class~='not-markdown'], [class~='not-markdown'] + *))) { + text-decoration-line: underline; + } + .markdown-h1\:text-3xl + :is(:where(h1):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-size: 1.875rem; + line-height: 2.25rem; + } + .markdown-h2\:text-2xl + :is(:where(h2):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-size: 1.5rem; + line-height: 2rem; + } + .markdown-h3\:text-xl + :is(:where(h3):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-size: 1.25rem; + line-height: 1.75rem; + } + .markdown-h4\:text-lg + :is(:where(h4):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-size: 1.125rem; + line-height: 1.75rem; + } + .markdown-p\:text-gray-700 + :is(:where(p):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); + } + .markdown-a\:font-bold + :is(:where(a):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-weight: 700; + } + .markdown-blockquote\:italic + :is(:where(blockquote):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-style: italic; + } + .markdown-figure\:mx-auto + :is(:where(figure):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + margin-left: auto; + margin-right: auto; + } + .markdown-figcaption\:opacity-75 + :is(:where(figcaption):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + opacity: 0.75; + } + .markdown-strong\:font-medium + :is(:where(strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-weight: 500; + } + .markdown-em\:italic + :is(:where(em):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-style: italic; + } + .markdown-code\:font-mono + :is(:where(code):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; + } + .markdown-pre\:font-mono + :is(:where(pre):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; + } + .markdown-ol\:pl-6 + :is(:where(ol):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + padding-left: 1.5rem; + } + .markdown-ul\:pl-8 + :is(:where(ul):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + padding-left: 2rem; + } + .markdown-li\:my-4 + :is(:where(li):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + margin-top: 1rem; + margin-bottom: 1rem; + } + .markdown-table\:my-8 + :is(:where(table):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + margin-top: 2rem; + margin-bottom: 2rem; + } + .markdown-thead\:border-red-300 + :is(:where(thead):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + --tw-border-opacity: 1; + border-color: rgb(252 165 165 / var(--tw-border-opacity)); + } + .markdown-tr\:border-red-200 + :is(:where(tr):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + --tw-border-opacity: 1; + border-color: rgb(254 202 202 / var(--tw-border-opacity)); + } + .markdown-th\:text-left + :is(:where(th):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + text-align: left; + } + .markdown-img\:rounded-lg + :is(:where(img):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + border-radius: 0.5rem; + } + .markdown-video\:my-12 + :is(:where(video):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + margin-top: 3rem; + margin-bottom: 3rem; + } + .markdown-hr\:border-t-2 + :is(:where(hr):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + border-top-width: 2px; + } + .markdown-lead\:italic + :is(:where([class~='lead']):not(:where([class~='not-markdown'], [class~='not-markdown'] + *))) { + font-style: italic; + } + ` + ) + }) +}) + +test('customizing defaults with multiple values does not result in invalid css', async () => { + let config = { + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + textAlign: ['-webkit-match-parent', 'match-parent'], + }, + }, + }, + }, + } + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + text-align: -webkit-match-parent; + text-align: match-parent; + } + ` + ) + }) +}) + +it('should be possible to use nested syntax (&) when extending the config', () => { + let config = { + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + extend: { + typography: { + DEFAULT: { + css: { + color: '#000', + a: { + color: '#888', + '&:hover': { + color: '#ff0000', + }, + }, + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose { + color: #000; + max-width: 65ch; + } + `) + + expect(result.css).toIncludeCss(css` + .prose :where(a):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: #888; + text-decoration: underline; + font-weight: 500; + } + `) + + expect(result.css).toIncludeCss(css` + .prose :where(a):not(:where([class~='not-prose'], [class~='not-prose'] *)):hover { + color: #ff0000; + } + `) + }) +}) + +it('should be possible to specify custom h5 and h6 styles', () => { + let config = { + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose-h5\:text-sm :is(:where(h5):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 0.875rem; + line-height: 1.25rem; + } + .prose-h6\:text-xl :is(:where(h6):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.25rem; + line-height: 1.75rem; + } + `) + }) +}) + +it('should not break with multiple selectors with pseudo elements using variants', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::before, ul li::before': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] *))::before { + color: red; + } + `) + }) +}) + +it('lifts all common, trailing pseudo elements when the same across all selectors', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::marker::before, ul li::marker::before': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] + *))::marker::before { + color: red; + } + `) + + // TODO: The output here is a bug in tailwindcss variant selector rewriting + // IT should be ::marker::before + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] + *))::before::marker { + color: red; + } + `) + }) +}) + +it('does not modify selectors with differing pseudo elements', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::before, ul li::after': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose + :where(ol li::before, ul li::after):not(:where([class~='not-prose'], [class~='not-prose'] + *)) { + color: red; + } + `) + + // TODO: The output here is a bug in tailwindcss variant selector rewriting + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] *))::before, + ::after { + color: red; + } + `) + }) +}) + +it('lifts only the common, trailing pseudo elements from selectors', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::scroll-thumb::before, ul li::scroll-track::before': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose + :where(ol li::scroll-thumb, ul + li::scroll-track):not(:where([class~='not-prose'], [class~='not-prose'] *))::before { + color: red; + } + `) + + // TODO: The output here is a bug in tailwindcss variant selector rewriting + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] + *))::scroll-thumb, + ::scroll-track, + ::before { + color: red; + } + `) + }) +}) + +it('ignores common non-trailing pseudo-elements in selectors', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::before::scroll-thumb, ul li::before::scroll-track': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose + :where(ol li::before::scroll-thumb, ul + li::before::scroll-track):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: red; + } + `) + + // TODO: The output here is a bug in tailwindcss variant selector rewriting + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li::scroll-thumb, ul + li::scroll-track):not(:where([class~='not-prose'], [class~='not-prose'] *))::before, + ::before { + color: red; + } + `) + }) +}) + +test('lead styles are inserted after paragraph styles', async () => { + let config = { + content: [{ raw: html`
` }], + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss( + css` + .prose { + color: var(--tw-prose-body); + max-width: 65ch; + } + .prose :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-lead); + font-size: 1.25em; + line-height: 1.6; + margin-top: 1.2em; + margin-bottom: 1.2em; + } + ` + ) + }) +}) diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/styles.js b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/styles.js new file mode 100644 index 0000000..faa1af8 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/styles.js @@ -0,0 +1,1629 @@ +const colors = require('tailwindcss/colors') + +const round = (num) => + num + .toFixed(7) + .replace(/(\.[0-9]+?)0+$/, '$1') + .replace(/\.0$/, '') +const rem = (px) => `${round(px / 16)}rem` +const em = (px, base) => `${round(px / base)}em` +const hexToRgb = (hex) => { + hex = hex.replace('#', '') + hex = hex.length === 3 ? hex.replace(/./g, '$&$&') : hex + const r = parseInt(hex.substring(0, 2), 16) + const g = parseInt(hex.substring(2, 4), 16) + const b = parseInt(hex.substring(4, 6), 16) + return `${r} ${g} ${b}` +} + +let defaultModifiers = { + sm: { + css: [ + { + fontSize: rem(14), + lineHeight: round(24 / 14), + p: { + marginTop: em(16, 14), + marginBottom: em(16, 14), + }, + '[class~="lead"]': { + fontSize: em(18, 14), + lineHeight: round(28 / 18), + marginTop: em(16, 18), + marginBottom: em(16, 18), + }, + blockquote: { + marginTop: em(24, 18), + marginBottom: em(24, 18), + paddingLeft: em(20, 18), + }, + h1: { + fontSize: em(30, 14), + marginTop: '0', + marginBottom: em(24, 30), + lineHeight: round(36 / 30), + }, + h2: { + fontSize: em(20, 14), + marginTop: em(32, 20), + marginBottom: em(16, 20), + lineHeight: round(28 / 20), + }, + h3: { + fontSize: em(18, 14), + marginTop: em(28, 18), + marginBottom: em(8, 18), + lineHeight: round(28 / 18), + }, + h4: { + marginTop: em(20, 14), + marginBottom: em(8, 14), + lineHeight: round(20 / 14), + }, + img: { + marginTop: em(24, 14), + marginBottom: em(24, 14), + }, + picture: { + marginTop: em(24, 14), + marginBottom: em(24, 14), + }, + 'picture > img': { + marginTop: '0', + marginBottom: '0', + }, + video: { + marginTop: em(24, 14), + marginBottom: em(24, 14), + }, + kbd: { + fontSize: em(12, 14), + borderRadius: rem(5), + paddingTop: em(2, 14), + paddingRight: em(5, 14), + paddingBottom: em(2, 14), + paddingLeft: em(5, 14), + }, + code: { + fontSize: em(12, 14), + }, + 'h2 code': { + fontSize: em(18, 20), + }, + 'h3 code': { + fontSize: em(16, 18), + }, + pre: { + fontSize: em(12, 14), + lineHeight: round(20 / 12), + marginTop: em(20, 12), + marginBottom: em(20, 12), + borderRadius: rem(4), + paddingTop: em(8, 12), + paddingRight: em(12, 12), + paddingBottom: em(8, 12), + paddingLeft: em(12, 12), + }, + ol: { + marginTop: em(16, 14), + marginBottom: em(16, 14), + paddingLeft: em(22, 14), + }, + ul: { + marginTop: em(16, 14), + marginBottom: em(16, 14), + paddingLeft: em(22, 14), + }, + li: { + marginTop: em(4, 14), + marginBottom: em(4, 14), + }, + 'ol > li': { + paddingLeft: em(6, 14), + }, + 'ul > li': { + paddingLeft: em(6, 14), + }, + '> ul > li p': { + marginTop: em(8, 14), + marginBottom: em(8, 14), + }, + '> ul > li > *:first-child': { + marginTop: em(16, 14), + }, + '> ul > li > *:last-child': { + marginBottom: em(16, 14), + }, + '> ol > li > *:first-child': { + marginTop: em(16, 14), + }, + '> ol > li > *:last-child': { + marginBottom: em(16, 14), + }, + 'ul ul, ul ol, ol ul, ol ol': { + marginTop: em(8, 14), + marginBottom: em(8, 14), + }, + dl: { + marginTop: em(16, 14), + marginBottom: em(16, 14), + }, + dt: { + marginTop: em(16, 14), + }, + dd: { + marginTop: em(4, 14), + paddingLeft: em(22, 14), + }, + hr: { + marginTop: em(40, 14), + marginBottom: em(40, 14), + }, + 'hr + *': { + marginTop: '0', + }, + 'h2 + *': { + marginTop: '0', + }, + 'h3 + *': { + marginTop: '0', + }, + 'h4 + *': { + marginTop: '0', + }, + table: { + fontSize: em(12, 14), + lineHeight: round(18 / 12), + }, + 'thead th': { + paddingRight: em(12, 12), + paddingBottom: em(8, 12), + paddingLeft: em(12, 12), + }, + 'thead th:first-child': { + paddingLeft: '0', + }, + 'thead th:last-child': { + paddingRight: '0', + }, + 'tbody td, tfoot td': { + paddingTop: em(8, 12), + paddingRight: em(12, 12), + paddingBottom: em(8, 12), + paddingLeft: em(12, 12), + }, + 'tbody td:first-child, tfoot td:first-child': { + paddingLeft: '0', + }, + 'tbody td:last-child, tfoot td:last-child': { + paddingRight: '0', + }, + figure: { + marginTop: em(24, 14), + marginBottom: em(24, 14), + }, + 'figure > *': { + marginTop: '0', + marginBottom: '0', + }, + figcaption: { + fontSize: em(12, 14), + lineHeight: round(16 / 12), + marginTop: em(8, 12), + }, + }, + { + '> :first-child': { + marginTop: '0', + }, + '> :last-child': { + marginBottom: '0', + }, + }, + ], + }, + base: { + css: [ + { + fontSize: rem(16), + lineHeight: round(28 / 16), + p: { + marginTop: em(20, 16), + marginBottom: em(20, 16), + }, + '[class~="lead"]': { + fontSize: em(20, 16), + lineHeight: round(32 / 20), + marginTop: em(24, 20), + marginBottom: em(24, 20), + }, + blockquote: { + marginTop: em(32, 20), + marginBottom: em(32, 20), + paddingLeft: em(20, 20), + }, + h1: { + fontSize: em(36, 16), + marginTop: '0', + marginBottom: em(32, 36), + lineHeight: round(40 / 36), + }, + h2: { + fontSize: em(24, 16), + marginTop: em(48, 24), + marginBottom: em(24, 24), + lineHeight: round(32 / 24), + }, + h3: { + fontSize: em(20, 16), + marginTop: em(32, 20), + marginBottom: em(12, 20), + lineHeight: round(32 / 20), + }, + h4: { + marginTop: em(24, 16), + marginBottom: em(8, 16), + lineHeight: round(24 / 16), + }, + img: { + marginTop: em(32, 16), + marginBottom: em(32, 16), + }, + picture: { + marginTop: em(32, 16), + marginBottom: em(32, 16), + }, + 'picture > img': { + marginTop: '0', + marginBottom: '0', + }, + video: { + marginTop: em(32, 16), + marginBottom: em(32, 16), + }, + kbd: { + fontSize: em(14, 16), + borderRadius: rem(5), + paddingTop: em(3, 16), + paddingRight: em(6, 16), + paddingBottom: em(3, 16), + paddingLeft: em(6, 16), + }, + code: { + fontSize: em(14, 16), + }, + 'h2 code': { + fontSize: em(21, 24), + }, + 'h3 code': { + fontSize: em(18, 20), + }, + pre: { + fontSize: em(14, 16), + lineHeight: round(24 / 14), + marginTop: em(24, 14), + marginBottom: em(24, 14), + borderRadius: rem(6), + paddingTop: em(12, 14), + paddingRight: em(16, 14), + paddingBottom: em(12, 14), + paddingLeft: em(16, 14), + }, + ol: { + marginTop: em(20, 16), + marginBottom: em(20, 16), + paddingLeft: em(26, 16), + }, + ul: { + marginTop: em(20, 16), + marginBottom: em(20, 16), + paddingLeft: em(26, 16), + }, + li: { + marginTop: em(8, 16), + marginBottom: em(8, 16), + }, + 'ol > li': { + paddingLeft: em(6, 16), + }, + 'ul > li': { + paddingLeft: em(6, 16), + }, + '> ul > li p': { + marginTop: em(12, 16), + marginBottom: em(12, 16), + }, + '> ul > li > *:first-child': { + marginTop: em(20, 16), + }, + '> ul > li > *:last-child': { + marginBottom: em(20, 16), + }, + '> ol > li > *:first-child': { + marginTop: em(20, 16), + }, + '> ol > li > *:last-child': { + marginBottom: em(20, 16), + }, + 'ul ul, ul ol, ol ul, ol ol': { + marginTop: em(12, 16), + marginBottom: em(12, 16), + }, + dl: { + marginTop: em(20, 16), + marginBottom: em(20, 16), + }, + dt: { + marginTop: em(20, 16), + }, + dd: { + marginTop: em(8, 16), + paddingLeft: em(26, 16), + }, + hr: { + marginTop: em(48, 16), + marginBottom: em(48, 16), + }, + 'hr + *': { + marginTop: '0', + }, + 'h2 + *': { + marginTop: '0', + }, + 'h3 + *': { + marginTop: '0', + }, + 'h4 + *': { + marginTop: '0', + }, + table: { + fontSize: em(14, 16), + lineHeight: round(24 / 14), + }, + 'thead th': { + paddingRight: em(8, 14), + paddingBottom: em(8, 14), + paddingLeft: em(8, 14), + }, + 'thead th:first-child': { + paddingLeft: '0', + }, + 'thead th:last-child': { + paddingRight: '0', + }, + 'tbody td, tfoot td': { + paddingTop: em(8, 14), + paddingRight: em(8, 14), + paddingBottom: em(8, 14), + paddingLeft: em(8, 14), + }, + 'tbody td:first-child, tfoot td:first-child': { + paddingLeft: '0', + }, + 'tbody td:last-child, tfoot td:last-child': { + paddingRight: '0', + }, + figure: { + marginTop: em(32, 16), + marginBottom: em(32, 16), + }, + 'figure > *': { + marginTop: '0', + marginBottom: '0', + }, + figcaption: { + fontSize: em(14, 16), + lineHeight: round(20 / 14), + marginTop: em(12, 14), + }, + }, + { + '> :first-child': { + marginTop: '0', + }, + '> :last-child': { + marginBottom: '0', + }, + }, + ], + }, + lg: { + css: [ + { + fontSize: rem(18), + lineHeight: round(32 / 18), + p: { + marginTop: em(24, 18), + marginBottom: em(24, 18), + }, + '[class~="lead"]': { + fontSize: em(22, 18), + lineHeight: round(32 / 22), + marginTop: em(24, 22), + marginBottom: em(24, 22), + }, + blockquote: { + marginTop: em(40, 24), + marginBottom: em(40, 24), + paddingLeft: em(24, 24), + }, + h1: { + fontSize: em(48, 18), + marginTop: '0', + marginBottom: em(40, 48), + lineHeight: round(48 / 48), + }, + h2: { + fontSize: em(30, 18), + marginTop: em(56, 30), + marginBottom: em(32, 30), + lineHeight: round(40 / 30), + }, + h3: { + fontSize: em(24, 18), + marginTop: em(40, 24), + marginBottom: em(16, 24), + lineHeight: round(36 / 24), + }, + h4: { + marginTop: em(32, 18), + marginBottom: em(8, 18), + lineHeight: round(28 / 18), + }, + img: { + marginTop: em(32, 18), + marginBottom: em(32, 18), + }, + picture: { + marginTop: em(32, 18), + marginBottom: em(32, 18), + }, + 'picture > img': { + marginTop: '0', + marginBottom: '0', + }, + video: { + marginTop: em(32, 18), + marginBottom: em(32, 18), + }, + kbd: { + fontSize: em(16, 18), + borderRadius: rem(5), + paddingTop: em(4, 18), + paddingRight: em(8, 18), + paddingBottom: em(4, 18), + paddingLeft: em(8, 18), + }, + code: { + fontSize: em(16, 18), + }, + 'h2 code': { + fontSize: em(26, 30), + }, + 'h3 code': { + fontSize: em(21, 24), + }, + pre: { + fontSize: em(16, 18), + lineHeight: round(28 / 16), + marginTop: em(32, 16), + marginBottom: em(32, 16), + borderRadius: rem(6), + paddingTop: em(16, 16), + paddingRight: em(24, 16), + paddingBottom: em(16, 16), + paddingLeft: em(24, 16), + }, + ol: { + marginTop: em(24, 18), + marginBottom: em(24, 18), + paddingLeft: em(28, 18), + }, + ul: { + marginTop: em(24, 18), + marginBottom: em(24, 18), + paddingLeft: em(28, 18), + }, + li: { + marginTop: em(12, 18), + marginBottom: em(12, 18), + }, + 'ol > li': { + paddingLeft: em(8, 18), + }, + 'ul > li': { + paddingLeft: em(8, 18), + }, + '> ul > li p': { + marginTop: em(16, 18), + marginBottom: em(16, 18), + }, + '> ul > li > *:first-child': { + marginTop: em(24, 18), + }, + '> ul > li > *:last-child': { + marginBottom: em(24, 18), + }, + '> ol > li > *:first-child': { + marginTop: em(24, 18), + }, + '> ol > li > *:last-child': { + marginBottom: em(24, 18), + }, + 'ul ul, ul ol, ol ul, ol ol': { + marginTop: em(16, 18), + marginBottom: em(16, 18), + }, + dl: { + marginTop: em(24, 18), + marginBottom: em(24, 18), + }, + dt: { + marginTop: em(24, 18), + }, + dd: { + marginTop: em(12, 18), + paddingLeft: em(28, 18), + }, + hr: { + marginTop: em(56, 18), + marginBottom: em(56, 18), + }, + 'hr + *': { + marginTop: '0', + }, + 'h2 + *': { + marginTop: '0', + }, + 'h3 + *': { + marginTop: '0', + }, + 'h4 + *': { + marginTop: '0', + }, + table: { + fontSize: em(16, 18), + lineHeight: round(24 / 16), + }, + 'thead th': { + paddingRight: em(12, 16), + paddingBottom: em(12, 16), + paddingLeft: em(12, 16), + }, + 'thead th:first-child': { + paddingLeft: '0', + }, + 'thead th:last-child': { + paddingRight: '0', + }, + 'tbody td, tfoot td': { + paddingTop: em(12, 16), + paddingRight: em(12, 16), + paddingBottom: em(12, 16), + paddingLeft: em(12, 16), + }, + 'tbody td:first-child, tfoot td:first-child': { + paddingLeft: '0', + }, + 'tbody td:last-child, tfoot td:last-child': { + paddingRight: '0', + }, + figure: { + marginTop: em(32, 18), + marginBottom: em(32, 18), + }, + 'figure > *': { + marginTop: '0', + marginBottom: '0', + }, + figcaption: { + fontSize: em(16, 18), + lineHeight: round(24 / 16), + marginTop: em(16, 16), + }, + }, + { + '> :first-child': { + marginTop: '0', + }, + '> :last-child': { + marginBottom: '0', + }, + }, + ], + }, + xl: { + css: [ + { + fontSize: rem(20), + lineHeight: round(36 / 20), + p: { + marginTop: em(24, 20), + marginBottom: em(24, 20), + }, + '[class~="lead"]': { + fontSize: em(24, 20), + lineHeight: round(36 / 24), + marginTop: em(24, 24), + marginBottom: em(24, 24), + }, + blockquote: { + marginTop: em(48, 30), + marginBottom: em(48, 30), + paddingLeft: em(32, 30), + }, + h1: { + fontSize: em(56, 20), + marginTop: '0', + marginBottom: em(48, 56), + lineHeight: round(56 / 56), + }, + h2: { + fontSize: em(36, 20), + marginTop: em(56, 36), + marginBottom: em(32, 36), + lineHeight: round(40 / 36), + }, + h3: { + fontSize: em(30, 20), + marginTop: em(48, 30), + marginBottom: em(20, 30), + lineHeight: round(40 / 30), + }, + h4: { + marginTop: em(36, 20), + marginBottom: em(12, 20), + lineHeight: round(32 / 20), + }, + img: { + marginTop: em(40, 20), + marginBottom: em(40, 20), + }, + picture: { + marginTop: em(40, 20), + marginBottom: em(40, 20), + }, + 'picture > img': { + marginTop: '0', + marginBottom: '0', + }, + video: { + marginTop: em(40, 20), + marginBottom: em(40, 20), + }, + kbd: { + fontSize: em(18, 20), + borderRadius: rem(5), + paddingTop: em(5, 20), + paddingRight: em(8, 20), + paddingBottom: em(5, 20), + paddingLeft: em(8, 20), + }, + code: { + fontSize: em(18, 20), + }, + 'h2 code': { + fontSize: em(31, 36), + }, + 'h3 code': { + fontSize: em(27, 30), + }, + pre: { + fontSize: em(18, 20), + lineHeight: round(32 / 18), + marginTop: em(36, 18), + marginBottom: em(36, 18), + borderRadius: rem(8), + paddingTop: em(20, 18), + paddingRight: em(24, 18), + paddingBottom: em(20, 18), + paddingLeft: em(24, 18), + }, + ol: { + marginTop: em(24, 20), + marginBottom: em(24, 20), + paddingLeft: em(32, 20), + }, + ul: { + marginTop: em(24, 20), + marginBottom: em(24, 20), + paddingLeft: em(32, 20), + }, + li: { + marginTop: em(12, 20), + marginBottom: em(12, 20), + }, + 'ol > li': { + paddingLeft: em(8, 20), + }, + 'ul > li': { + paddingLeft: em(8, 20), + }, + '> ul > li p': { + marginTop: em(16, 20), + marginBottom: em(16, 20), + }, + '> ul > li > *:first-child': { + marginTop: em(24, 20), + }, + '> ul > li > *:last-child': { + marginBottom: em(24, 20), + }, + '> ol > li > *:first-child': { + marginTop: em(24, 20), + }, + '> ol > li > *:last-child': { + marginBottom: em(24, 20), + }, + 'ul ul, ul ol, ol ul, ol ol': { + marginTop: em(16, 20), + marginBottom: em(16, 20), + }, + dl: { + marginTop: em(24, 20), + marginBottom: em(24, 20), + }, + dt: { + marginTop: em(24, 20), + }, + dd: { + marginTop: em(12, 20), + paddingLeft: em(32, 20), + }, + hr: { + marginTop: em(56, 20), + marginBottom: em(56, 20), + }, + 'hr + *': { + marginTop: '0', + }, + 'h2 + *': { + marginTop: '0', + }, + 'h3 + *': { + marginTop: '0', + }, + 'h4 + *': { + marginTop: '0', + }, + table: { + fontSize: em(18, 20), + lineHeight: round(28 / 18), + }, + 'thead th': { + paddingRight: em(12, 18), + paddingBottom: em(16, 18), + paddingLeft: em(12, 18), + }, + 'thead th:first-child': { + paddingLeft: '0', + }, + 'thead th:last-child': { + paddingRight: '0', + }, + 'tbody td, tfoot td': { + paddingTop: em(16, 18), + paddingRight: em(12, 18), + paddingBottom: em(16, 18), + paddingLeft: em(12, 18), + }, + 'tbody td:first-child, tfoot td:first-child': { + paddingLeft: '0', + }, + 'tbody td:last-child, tfoot td:last-child': { + paddingRight: '0', + }, + figure: { + marginTop: em(40, 20), + marginBottom: em(40, 20), + }, + 'figure > *': { + marginTop: '0', + marginBottom: '0', + }, + figcaption: { + fontSize: em(18, 20), + lineHeight: round(28 / 18), + marginTop: em(18, 18), + }, + }, + { + '> :first-child': { + marginTop: '0', + }, + '> :last-child': { + marginBottom: '0', + }, + }, + ], + }, + '2xl': { + css: [ + { + fontSize: rem(24), + lineHeight: round(40 / 24), + p: { + marginTop: em(32, 24), + marginBottom: em(32, 24), + }, + '[class~="lead"]': { + fontSize: em(30, 24), + lineHeight: round(44 / 30), + marginTop: em(32, 30), + marginBottom: em(32, 30), + }, + blockquote: { + marginTop: em(64, 36), + marginBottom: em(64, 36), + paddingLeft: em(40, 36), + }, + h1: { + fontSize: em(64, 24), + marginTop: '0', + marginBottom: em(56, 64), + lineHeight: round(64 / 64), + }, + h2: { + fontSize: em(48, 24), + marginTop: em(72, 48), + marginBottom: em(40, 48), + lineHeight: round(52 / 48), + }, + h3: { + fontSize: em(36, 24), + marginTop: em(56, 36), + marginBottom: em(24, 36), + lineHeight: round(44 / 36), + }, + h4: { + marginTop: em(40, 24), + marginBottom: em(16, 24), + lineHeight: round(36 / 24), + }, + img: { + marginTop: em(48, 24), + marginBottom: em(48, 24), + }, + picture: { + marginTop: em(48, 24), + marginBottom: em(48, 24), + }, + 'picture > img': { + marginTop: '0', + marginBottom: '0', + }, + video: { + marginTop: em(48, 24), + marginBottom: em(48, 24), + }, + kbd: { + fontSize: em(20, 24), + borderRadius: rem(6), + paddingTop: em(6, 24), + paddingRight: em(8, 24), + paddingBottom: em(6, 24), + paddingLeft: em(8, 24), + }, + code: { + fontSize: em(20, 24), + }, + 'h2 code': { + fontSize: em(42, 48), + }, + 'h3 code': { + fontSize: em(32, 36), + }, + pre: { + fontSize: em(20, 24), + lineHeight: round(36 / 20), + marginTop: em(40, 20), + marginBottom: em(40, 20), + borderRadius: rem(8), + paddingTop: em(24, 20), + paddingRight: em(32, 20), + paddingBottom: em(24, 20), + paddingLeft: em(32, 20), + }, + ol: { + marginTop: em(32, 24), + marginBottom: em(32, 24), + paddingLeft: em(38, 24), + }, + ul: { + marginTop: em(32, 24), + marginBottom: em(32, 24), + paddingLeft: em(38, 24), + }, + li: { + marginTop: em(12, 24), + marginBottom: em(12, 24), + }, + 'ol > li': { + paddingLeft: em(10, 24), + }, + 'ul > li': { + paddingLeft: em(10, 24), + }, + '> ul > li p': { + marginTop: em(20, 24), + marginBottom: em(20, 24), + }, + '> ul > li > *:first-child': { + marginTop: em(32, 24), + }, + '> ul > li > *:last-child': { + marginBottom: em(32, 24), + }, + '> ol > li > *:first-child': { + marginTop: em(32, 24), + }, + '> ol > li > *:last-child': { + marginBottom: em(32, 24), + }, + 'ul ul, ul ol, ol ul, ol ol': { + marginTop: em(16, 24), + marginBottom: em(16, 24), + }, + dl: { + marginTop: em(32, 24), + marginBottom: em(32, 24), + }, + dt: { + marginTop: em(32, 24), + }, + dd: { + marginTop: em(12, 24), + paddingLeft: em(38, 24), + }, + hr: { + marginTop: em(72, 24), + marginBottom: em(72, 24), + }, + 'hr + *': { + marginTop: '0', + }, + 'h2 + *': { + marginTop: '0', + }, + 'h3 + *': { + marginTop: '0', + }, + 'h4 + *': { + marginTop: '0', + }, + table: { + fontSize: em(20, 24), + lineHeight: round(28 / 20), + }, + 'thead th': { + paddingRight: em(12, 20), + paddingBottom: em(16, 20), + paddingLeft: em(12, 20), + }, + 'thead th:first-child': { + paddingLeft: '0', + }, + 'thead th:last-child': { + paddingRight: '0', + }, + 'tbody td, tfoot td': { + paddingTop: em(16, 20), + paddingRight: em(12, 20), + paddingBottom: em(16, 20), + paddingLeft: em(12, 20), + }, + 'tbody td:first-child, tfoot td:first-child': { + paddingLeft: '0', + }, + 'tbody td:last-child, tfoot td:last-child': { + paddingRight: '0', + }, + figure: { + marginTop: em(48, 24), + marginBottom: em(48, 24), + }, + 'figure > *': { + marginTop: '0', + marginBottom: '0', + }, + figcaption: { + fontSize: em(20, 24), + lineHeight: round(32 / 20), + marginTop: em(20, 20), + }, + }, + { + '> :first-child': { + marginTop: '0', + }, + '> :last-child': { + marginBottom: '0', + }, + }, + ], + }, + + // Gray color themes + + slate: { + css: { + '--tw-prose-body': colors.slate[700], + '--tw-prose-headings': colors.slate[900], + '--tw-prose-lead': colors.slate[600], + '--tw-prose-links': colors.slate[900], + '--tw-prose-bold': colors.slate[900], + '--tw-prose-counters': colors.slate[500], + '--tw-prose-bullets': colors.slate[300], + '--tw-prose-hr': colors.slate[200], + '--tw-prose-quotes': colors.slate[900], + '--tw-prose-quote-borders': colors.slate[200], + '--tw-prose-captions': colors.slate[500], + '--tw-prose-kbd': colors.slate[900], + '--tw-prose-kbd-shadows': hexToRgb(colors.slate[900]), + '--tw-prose-code': colors.slate[900], + '--tw-prose-pre-code': colors.slate[200], + '--tw-prose-pre-bg': colors.slate[800], + '--tw-prose-th-borders': colors.slate[300], + '--tw-prose-td-borders': colors.slate[200], + '--tw-prose-invert-body': colors.slate[300], + '--tw-prose-invert-headings': colors.white, + '--tw-prose-invert-lead': colors.slate[400], + '--tw-prose-invert-links': colors.white, + '--tw-prose-invert-bold': colors.white, + '--tw-prose-invert-counters': colors.slate[400], + '--tw-prose-invert-bullets': colors.slate[600], + '--tw-prose-invert-hr': colors.slate[700], + '--tw-prose-invert-quotes': colors.slate[100], + '--tw-prose-invert-quote-borders': colors.slate[700], + '--tw-prose-invert-captions': colors.slate[400], + '--tw-prose-invert-kbd': colors.white, + '--tw-prose-invert-kbd-shadows': hexToRgb(colors.white), + '--tw-prose-invert-code': colors.white, + '--tw-prose-invert-pre-code': colors.slate[300], + '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)', + '--tw-prose-invert-th-borders': colors.slate[600], + '--tw-prose-invert-td-borders': colors.slate[700], + }, + }, + + gray: { + css: { + '--tw-prose-body': colors.gray[700], + '--tw-prose-headings': colors.gray[900], + '--tw-prose-lead': colors.gray[600], + '--tw-prose-links': colors.gray[900], + '--tw-prose-bold': colors.gray[900], + '--tw-prose-counters': colors.gray[500], + '--tw-prose-bullets': colors.gray[300], + '--tw-prose-hr': colors.gray[200], + '--tw-prose-quotes': colors.gray[900], + '--tw-prose-quote-borders': colors.gray[200], + '--tw-prose-captions': colors.gray[500], + '--tw-prose-kbd': colors.gray[900], + '--tw-prose-kbd-shadows': hexToRgb(colors.gray[900]), + '--tw-prose-code': colors.gray[900], + '--tw-prose-pre-code': colors.gray[200], + '--tw-prose-pre-bg': colors.gray[800], + '--tw-prose-th-borders': colors.gray[300], + '--tw-prose-td-borders': colors.gray[200], + '--tw-prose-invert-body': colors.gray[300], + '--tw-prose-invert-headings': colors.white, + '--tw-prose-invert-lead': colors.gray[400], + '--tw-prose-invert-links': colors.white, + '--tw-prose-invert-bold': colors.white, + '--tw-prose-invert-counters': colors.gray[400], + '--tw-prose-invert-bullets': colors.gray[600], + '--tw-prose-invert-hr': colors.gray[700], + '--tw-prose-invert-quotes': colors.gray[100], + '--tw-prose-invert-quote-borders': colors.gray[700], + '--tw-prose-invert-captions': colors.gray[400], + '--tw-prose-invert-kbd': colors.white, + '--tw-prose-invert-kbd-shadows': hexToRgb(colors.white), + '--tw-prose-invert-code': colors.white, + '--tw-prose-invert-pre-code': colors.gray[300], + '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)', + '--tw-prose-invert-th-borders': colors.gray[600], + '--tw-prose-invert-td-borders': colors.gray[700], + }, + }, + + zinc: { + css: { + '--tw-prose-body': colors.zinc[700], + '--tw-prose-headings': colors.zinc[900], + '--tw-prose-lead': colors.zinc[600], + '--tw-prose-links': colors.zinc[900], + '--tw-prose-bold': colors.zinc[900], + '--tw-prose-counters': colors.zinc[500], + '--tw-prose-bullets': colors.zinc[300], + '--tw-prose-hr': colors.zinc[200], + '--tw-prose-quotes': colors.zinc[900], + '--tw-prose-quote-borders': colors.zinc[200], + '--tw-prose-captions': colors.zinc[500], + '--tw-prose-kbd': colors.zinc[900], + '--tw-prose-kbd-shadows': hexToRgb(colors.zinc[900]), + '--tw-prose-code': colors.zinc[900], + '--tw-prose-pre-code': colors.zinc[200], + '--tw-prose-pre-bg': colors.zinc[800], + '--tw-prose-th-borders': colors.zinc[300], + '--tw-prose-td-borders': colors.zinc[200], + '--tw-prose-invert-body': colors.zinc[300], + '--tw-prose-invert-headings': colors.white, + '--tw-prose-invert-lead': colors.zinc[400], + '--tw-prose-invert-links': colors.white, + '--tw-prose-invert-bold': colors.white, + '--tw-prose-invert-counters': colors.zinc[400], + '--tw-prose-invert-bullets': colors.zinc[600], + '--tw-prose-invert-hr': colors.zinc[700], + '--tw-prose-invert-quotes': colors.zinc[100], + '--tw-prose-invert-quote-borders': colors.zinc[700], + '--tw-prose-invert-captions': colors.zinc[400], + '--tw-prose-invert-kbd': colors.white, + '--tw-prose-invert-kbd-shadows': hexToRgb(colors.white), + '--tw-prose-invert-code': colors.white, + '--tw-prose-invert-pre-code': colors.zinc[300], + '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)', + '--tw-prose-invert-th-borders': colors.zinc[600], + '--tw-prose-invert-td-borders': colors.zinc[700], + }, + }, + + neutral: { + css: { + '--tw-prose-body': colors.neutral[700], + '--tw-prose-headings': colors.neutral[900], + '--tw-prose-lead': colors.neutral[600], + '--tw-prose-links': colors.neutral[900], + '--tw-prose-bold': colors.neutral[900], + '--tw-prose-counters': colors.neutral[500], + '--tw-prose-bullets': colors.neutral[300], + '--tw-prose-hr': colors.neutral[200], + '--tw-prose-quotes': colors.neutral[900], + '--tw-prose-quote-borders': colors.neutral[200], + '--tw-prose-captions': colors.neutral[500], + '--tw-prose-kbd': colors.neutral[900], + '--tw-prose-kbd-shadows': hexToRgb(colors.neutral[900]), + '--tw-prose-code': colors.neutral[900], + '--tw-prose-pre-code': colors.neutral[200], + '--tw-prose-pre-bg': colors.neutral[800], + '--tw-prose-th-borders': colors.neutral[300], + '--tw-prose-td-borders': colors.neutral[200], + '--tw-prose-invert-body': colors.neutral[300], + '--tw-prose-invert-headings': colors.white, + '--tw-prose-invert-lead': colors.neutral[400], + '--tw-prose-invert-links': colors.white, + '--tw-prose-invert-bold': colors.white, + '--tw-prose-invert-counters': colors.neutral[400], + '--tw-prose-invert-bullets': colors.neutral[600], + '--tw-prose-invert-hr': colors.neutral[700], + '--tw-prose-invert-quotes': colors.neutral[100], + '--tw-prose-invert-quote-borders': colors.neutral[700], + '--tw-prose-invert-captions': colors.neutral[400], + '--tw-prose-invert-kbd': colors.white, + '--tw-prose-invert-kbd-shadows': hexToRgb(colors.white), + '--tw-prose-invert-code': colors.white, + '--tw-prose-invert-pre-code': colors.neutral[300], + '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)', + '--tw-prose-invert-th-borders': colors.neutral[600], + '--tw-prose-invert-td-borders': colors.neutral[700], + }, + }, + + stone: { + css: { + '--tw-prose-body': colors.stone[700], + '--tw-prose-headings': colors.stone[900], + '--tw-prose-lead': colors.stone[600], + '--tw-prose-links': colors.stone[900], + '--tw-prose-bold': colors.stone[900], + '--tw-prose-counters': colors.stone[500], + '--tw-prose-bullets': colors.stone[300], + '--tw-prose-hr': colors.stone[200], + '--tw-prose-quotes': colors.stone[900], + '--tw-prose-quote-borders': colors.stone[200], + '--tw-prose-captions': colors.stone[500], + '--tw-prose-kbd': colors.stone[900], + '--tw-prose-kbd-shadows': hexToRgb(colors.stone[900]), + '--tw-prose-code': colors.stone[900], + '--tw-prose-pre-code': colors.stone[200], + '--tw-prose-pre-bg': colors.stone[800], + '--tw-prose-th-borders': colors.stone[300], + '--tw-prose-td-borders': colors.stone[200], + '--tw-prose-invert-body': colors.stone[300], + '--tw-prose-invert-headings': colors.white, + '--tw-prose-invert-lead': colors.stone[400], + '--tw-prose-invert-links': colors.white, + '--tw-prose-invert-bold': colors.white, + '--tw-prose-invert-counters': colors.stone[400], + '--tw-prose-invert-bullets': colors.stone[600], + '--tw-prose-invert-hr': colors.stone[700], + '--tw-prose-invert-quotes': colors.stone[100], + '--tw-prose-invert-quote-borders': colors.stone[700], + '--tw-prose-invert-captions': colors.stone[400], + '--tw-prose-invert-kbd': colors.white, + '--tw-prose-invert-kbd-shadows': hexToRgb(colors.white), + '--tw-prose-invert-code': colors.white, + '--tw-prose-invert-pre-code': colors.stone[300], + '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)', + '--tw-prose-invert-th-borders': colors.stone[600], + '--tw-prose-invert-td-borders': colors.stone[700], + }, + }, + + // Link-only themes (for backward compatibility) + + red: { + css: { + '--tw-prose-links': colors.red[600], + '--tw-prose-invert-links': colors.red[500], + }, + }, + + orange: { + css: { + '--tw-prose-links': colors.orange[600], + '--tw-prose-invert-links': colors.orange[500], + }, + }, + + amber: { + css: { + '--tw-prose-links': colors.amber[600], + '--tw-prose-invert-links': colors.amber[500], + }, + }, + + yellow: { + css: { + '--tw-prose-links': colors.yellow[600], + '--tw-prose-invert-links': colors.yellow[500], + }, + }, + + lime: { + css: { + '--tw-prose-links': colors.lime[600], + '--tw-prose-invert-links': colors.lime[500], + }, + }, + + green: { + css: { + '--tw-prose-links': colors.green[600], + '--tw-prose-invert-links': colors.green[500], + }, + }, + + emerald: { + css: { + '--tw-prose-links': colors.emerald[600], + '--tw-prose-invert-links': colors.emerald[500], + }, + }, + + teal: { + css: { + '--tw-prose-links': colors.teal[600], + '--tw-prose-invert-links': colors.teal[500], + }, + }, + + cyan: { + css: { + '--tw-prose-links': colors.cyan[600], + '--tw-prose-invert-links': colors.cyan[500], + }, + }, + + sky: { + css: { + '--tw-prose-links': colors.sky[600], + '--tw-prose-invert-links': colors.sky[500], + }, + }, + + blue: { + css: { + '--tw-prose-links': colors.blue[600], + '--tw-prose-invert-links': colors.blue[500], + }, + }, + + indigo: { + css: { + '--tw-prose-links': colors.indigo[600], + '--tw-prose-invert-links': colors.indigo[500], + }, + }, + + violet: { + css: { + '--tw-prose-links': colors.violet[600], + '--tw-prose-invert-links': colors.violet[500], + }, + }, + + purple: { + css: { + '--tw-prose-links': colors.purple[600], + '--tw-prose-invert-links': colors.purple[500], + }, + }, + + fuchsia: { + css: { + '--tw-prose-links': colors.fuchsia[600], + '--tw-prose-invert-links': colors.fuchsia[500], + }, + }, + + pink: { + css: { + '--tw-prose-links': colors.pink[600], + '--tw-prose-invert-links': colors.pink[500], + }, + }, + + rose: { + css: { + '--tw-prose-links': colors.rose[600], + '--tw-prose-invert-links': colors.rose[500], + }, + }, + + // Invert (for dark mode) + invert: { + css: { + '--tw-prose-body': 'var(--tw-prose-invert-body)', + '--tw-prose-headings': 'var(--tw-prose-invert-headings)', + '--tw-prose-lead': 'var(--tw-prose-invert-lead)', + '--tw-prose-links': 'var(--tw-prose-invert-links)', + '--tw-prose-bold': 'var(--tw-prose-invert-bold)', + '--tw-prose-counters': 'var(--tw-prose-invert-counters)', + '--tw-prose-bullets': 'var(--tw-prose-invert-bullets)', + '--tw-prose-hr': 'var(--tw-prose-invert-hr)', + '--tw-prose-quotes': 'var(--tw-prose-invert-quotes)', + '--tw-prose-quote-borders': 'var(--tw-prose-invert-quote-borders)', + '--tw-prose-captions': 'var(--tw-prose-invert-captions)', + '--tw-prose-kbd': 'var(--tw-prose-invert-kbd)', + '--tw-prose-kbd-shadows': 'var(--tw-prose-invert-kbd-shadows)', + '--tw-prose-code': 'var(--tw-prose-invert-code)', + '--tw-prose-pre-code': 'var(--tw-prose-invert-pre-code)', + '--tw-prose-pre-bg': 'var(--tw-prose-invert-pre-bg)', + '--tw-prose-th-borders': 'var(--tw-prose-invert-th-borders)', + '--tw-prose-td-borders': 'var(--tw-prose-invert-td-borders)', + }, + }, +} + +module.exports = { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + maxWidth: '65ch', + p: {}, // Required to maintain correct order when merging + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + a: { + color: 'var(--tw-prose-links)', + textDecoration: 'underline', + fontWeight: '500', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'a strong': { + color: 'inherit', + }, + 'blockquote strong': { + color: 'inherit', + }, + 'thead th strong': { + color: 'inherit', + }, + ol: { + listStyleType: 'decimal', + }, + 'ol[type="A"]': { + listStyleType: 'upper-alpha', + }, + 'ol[type="a"]': { + listStyleType: 'lower-alpha', + }, + 'ol[type="A" s]': { + listStyleType: 'upper-alpha', + }, + 'ol[type="a" s]': { + listStyleType: 'lower-alpha', + }, + 'ol[type="I"]': { + listStyleType: 'upper-roman', + }, + 'ol[type="i"]': { + listStyleType: 'lower-roman', + }, + 'ol[type="I" s]': { + listStyleType: 'upper-roman', + }, + 'ol[type="i" s]': { + listStyleType: 'lower-roman', + }, + 'ol[type="1"]': { + listStyleType: 'decimal', + }, + ul: { + listStyleType: 'disc', + }, + 'ol > li::marker': { + fontWeight: '400', + color: 'var(--tw-prose-counters)', + }, + 'ul > li::marker': { + color: 'var(--tw-prose-bullets)', + }, + dt: { + color: 'var(--tw-prose-headings)', + fontWeight: '600', + }, + hr: { + borderColor: 'var(--tw-prose-hr)', + borderTopWidth: 1, + }, + blockquote: { + fontWeight: '500', + fontStyle: 'italic', + color: 'var(--tw-prose-quotes)', + borderLeftWidth: '0.25rem', + borderLeftColor: 'var(--tw-prose-quote-borders)', + quotes: '"\\201C""\\201D""\\2018""\\2019"', + }, + 'blockquote p:first-of-type::before': { + content: 'open-quote', + }, + 'blockquote p:last-of-type::after': { + content: 'close-quote', + }, + h1: { + color: 'var(--tw-prose-headings)', + fontWeight: '800', + }, + 'h1 strong': { + fontWeight: '900', + color: 'inherit', + }, + h2: { + color: 'var(--tw-prose-headings)', + fontWeight: '700', + }, + 'h2 strong': { + fontWeight: '800', + color: 'inherit', + }, + h3: { + color: 'var(--tw-prose-headings)', + fontWeight: '600', + }, + 'h3 strong': { + fontWeight: '700', + color: 'inherit', + }, + h4: { + color: 'var(--tw-prose-headings)', + fontWeight: '600', + }, + 'h4 strong': { + fontWeight: '700', + color: 'inherit', + }, + img: {}, // Required to maintain correct order when merging + picture: { + display: 'block', + }, + kbd: { + fontWeight: '500', + fontFamily: 'inherit', + color: 'var(--tw-prose-kbd)', + boxShadow: + '0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%)', + }, + code: { + color: 'var(--tw-prose-code)', + fontWeight: '600', + }, + 'code::before': { + content: '"`"', + }, + 'code::after': { + content: '"`"', + }, + 'a code': { + color: 'inherit', + }, + 'h1 code': { + color: 'inherit', + }, + 'h2 code': { + color: 'inherit', + }, + 'h3 code': { + color: 'inherit', + }, + 'h4 code': { + color: 'inherit', + }, + 'blockquote code': { + color: 'inherit', + }, + 'thead th code': { + color: 'inherit', + }, + pre: { + color: 'var(--tw-prose-pre-code)', + backgroundColor: 'var(--tw-prose-pre-bg)', + overflowX: 'auto', + fontWeight: '400', + }, + 'pre code': { + backgroundColor: 'transparent', + borderWidth: '0', + borderRadius: '0', + padding: '0', + fontWeight: 'inherit', + color: 'inherit', + fontSize: 'inherit', + fontFamily: 'inherit', + lineHeight: 'inherit', + }, + 'pre code::before': { + content: 'none', + }, + 'pre code::after': { + content: 'none', + }, + table: { + width: '100%', + tableLayout: 'auto', + textAlign: 'left', + marginTop: em(32, 16), + marginBottom: em(32, 16), + }, + thead: { + borderBottomWidth: '1px', + borderBottomColor: 'var(--tw-prose-th-borders)', + }, + 'thead th': { + color: 'var(--tw-prose-headings)', + fontWeight: '600', + verticalAlign: 'bottom', + }, + 'tbody tr': { + borderBottomWidth: '1px', + borderBottomColor: 'var(--tw-prose-td-borders)', + }, + 'tbody tr:last-child': { + borderBottomWidth: '0', + }, + 'tbody td': { + verticalAlign: 'baseline', + }, + tfoot: { + borderTopWidth: '1px', + borderTopColor: 'var(--tw-prose-th-borders)', + }, + 'tfoot td': { + verticalAlign: 'top', + }, + 'figure > *': {}, // Required to maintain correct order when merging + figcaption: { + color: 'var(--tw-prose-captions)', + }, + }, + defaultModifiers.gray.css, + ...defaultModifiers.base.css, + ], + }, + ...defaultModifiers, +} diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/utils.js b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/utils.js new file mode 100644 index 0000000..085f72e --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography/src/utils.js @@ -0,0 +1,62 @@ +const isPlainObject = require('lodash.isplainobject') + +const parser = require('postcss-selector-parser') +const parseSelector = parser() + +module.exports = { + isUsableColor(color, values) { + return isPlainObject(values) && color !== 'gray' && values[600] + }, + + /** + * @param {string} selector + */ + commonTrailingPseudos(selector) { + let ast = parseSelector.astSync(selector) + + /** @type {import('postcss-selector-parser').Pseudo[][]} */ + let matrix = [] + + // Put the pseudo elements in reverse order in a sparse, column-major 2D array + for (let [i, sel] of ast.nodes.entries()) { + for (const [j, child] of [...sel.nodes].reverse().entries()) { + // We only care about pseudo elements + if (child.type !== 'pseudo' || !child.value.startsWith('::')) { + break + } + + matrix[j] = matrix[j] || [] + matrix[j][i] = child + } + } + + let trailingPseudos = parser.selector() + + // At this point the pseudo elements are in a column-major 2D array + // This means each row contains one "column" of pseudo elements from each selector + // We can compare all the pseudo elements in a row to see if they are the same + for (const pseudos of matrix) { + // It's a sparse 2D array so there are going to be holes in the rows + // We skip those + if (!pseudos) { + continue + } + + let values = new Set([...pseudos.map((p) => p.value)]) + + // The pseudo elements are not the same + if (values.size > 1) { + break + } + + pseudos.forEach((pseudo) => pseudo.remove()) + trailingPseudos.prepend(pseudos[0]) + } + + if (trailingPseudos.nodes.length) { + return [trailingPseudos.toString(), ast.toString()] + } + + return [null, selector] + }, +} diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/lodash.castarray b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/lodash.castarray new file mode 120000 index 0000000..dffeaa2 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/lodash.castarray @@ -0,0 +1 @@ +../../lodash.castarray@4.4.0/node_modules/lodash.castarray \ No newline at end of file diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/lodash.isplainobject b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/lodash.isplainobject new file mode 120000 index 0000000..7b27e38 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/lodash.isplainobject @@ -0,0 +1 @@ +../../lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject \ No newline at end of file diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/lodash.merge b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/lodash.merge new file mode 120000 index 0000000..7759ff8 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/lodash.merge @@ -0,0 +1 @@ +../../lodash.merge@4.6.2/node_modules/lodash.merge \ No newline at end of file diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/postcss-selector-parser b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/postcss-selector-parser new file mode 120000 index 0000000..7efa294 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/postcss-selector-parser @@ -0,0 +1 @@ +../../postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser \ No newline at end of file diff --git a/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/tailwindcss b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/tailwindcss new file mode 120000 index 0000000..7fdeea1 --- /dev/null +++ b/node_modules/.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/tailwindcss @@ -0,0 +1 @@ +../../tailwindcss@3.4.1/node_modules/tailwindcss \ No newline at end of file diff --git a/node_modules/.pnpm/lock.yaml b/node_modules/.pnpm/lock.yaml index ca95d26..f34154d 100644 --- a/node_modules/.pnpm/lock.yaml +++ b/node_modules/.pnpm/lock.yaml @@ -5,6 +5,15 @@ settings: excludeLinksFromLockfile: false devDependencies: + '@tailwindcss/aspect-ratio': + specifier: ^0.4.2 + version: 0.4.2(tailwindcss@3.4.1) + '@tailwindcss/forms': + specifier: ^0.5.7 + version: 0.5.7(tailwindcss@3.4.1) + '@tailwindcss/typography': + specifier: ^0.5.10 + version: 0.5.10(tailwindcss@3.4.1) prettier: specifier: ^3.2.5 version: 3.2.5 @@ -92,6 +101,35 @@ packages: dev: true optional: true + /@tailwindcss/aspect-ratio@0.4.2(tailwindcss@3.4.1): + resolution: {integrity: sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==} + peerDependencies: + tailwindcss: '>=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1' + dependencies: + tailwindcss: 3.4.1 + dev: true + + /@tailwindcss/forms@0.5.7(tailwindcss@3.4.1): + resolution: {integrity: sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==} + peerDependencies: + tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1' + dependencies: + mini-svg-data-uri: 1.4.4 + tailwindcss: 3.4.1 + dev: true + + /@tailwindcss/typography@0.5.10(tailwindcss@3.4.1): + resolution: {integrity: sha512-Pe8BuPJQJd3FfRnm6H0ulKIGoMEQS+Vq01R6M5aCrFB/ccR/shT+0kXLjouGC1gFLm9hopTFN+DMP0pfwRWzPw==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + dependencies: + lodash.castarray: 4.4.0 + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + postcss-selector-parser: 6.0.10 + tailwindcss: 3.4.1 + dev: true + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -367,6 +405,18 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true + /lodash.castarray@4.4.0: + resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==} + dev: true + + /lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + dev: true + + /lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + /lru-cache@10.2.0: resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} engines: {node: 14 || >=16.14} @@ -385,6 +435,11 @@ packages: picomatch: 2.3.1 dev: true + /mini-svg-data-uri@1.4.4: + resolution: {integrity: sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==} + hasBin: true + dev: true + /minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} @@ -511,6 +566,14 @@ packages: postcss-selector-parser: 6.0.15 dev: true + /postcss-selector-parser@6.0.10: + resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: true + /postcss-selector-parser@6.0.15: resolution: {integrity: sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==} engines: {node: '>=4'} diff --git a/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/LICENSE b/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/LICENSE new file mode 100644 index 0000000..bcbe13d --- /dev/null +++ b/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright 2012-2016 The Dojo Foundation +Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/README.md b/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/README.md new file mode 100644 index 0000000..3a7f57f --- /dev/null +++ b/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/README.md @@ -0,0 +1,18 @@ +# lodash.castarray v4.4.0 + +The [lodash](https://lodash.com/) method `_.castArray` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.castarray +``` + +In Node.js: +```js +var castArray = require('lodash.castarray'); +``` + +See the [documentation](https://lodash.com/docs#castArray) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.castarray) for more details. diff --git a/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/index.js b/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/index.js new file mode 100644 index 0000000..16acf28 --- /dev/null +++ b/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/index.js @@ -0,0 +1,75 @@ +/** + * lodash 4.4.0 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ +function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @type {Function} + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = castArray; diff --git a/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/package.json b/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/package.json new file mode 100644 index 0000000..aa514b4 --- /dev/null +++ b/node_modules/.pnpm/lodash.castarray@4.4.0/node_modules/lodash.castarray/package.json @@ -0,0 +1,17 @@ +{ + "name": "lodash.castarray", + "version": "4.4.0", + "description": "The lodash method `_.castArray` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "keywords": "lodash-modularized, castarray", + "author": "John-David Dalton (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton (http://allyoucanleet.com/)", + "Blaine Bublitz (https://github.com/phated)", + "Mathias Bynens (https://mathiasbynens.be/)" + ], + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/LICENSE b/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/LICENSE new file mode 100644 index 0000000..e0c69d5 --- /dev/null +++ b/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/README.md b/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/README.md new file mode 100644 index 0000000..aeefd74 --- /dev/null +++ b/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/README.md @@ -0,0 +1,18 @@ +# lodash.isplainobject v4.0.6 + +The [lodash](https://lodash.com/) method `_.isPlainObject` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.isplainobject +``` + +In Node.js: +```js +var isPlainObject = require('lodash.isplainobject'); +``` + +See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.isplainobject) for more details. diff --git a/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js b/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js new file mode 100644 index 0000000..0f820ee --- /dev/null +++ b/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js @@ -0,0 +1,139 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || + objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); +} + +module.exports = isPlainObject; diff --git a/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/package.json b/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/package.json new file mode 100644 index 0000000..86f6a07 --- /dev/null +++ b/node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/package.json @@ -0,0 +1,17 @@ +{ + "name": "lodash.isplainobject", + "version": "4.0.6", + "description": "The lodash method `_.isPlainObject` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "keywords": "lodash-modularized, isplainobject", + "author": "John-David Dalton (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton (http://allyoucanleet.com/)", + "Blaine Bublitz (https://github.com/phated)", + "Mathias Bynens (https://mathiasbynens.be/)" + ], + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/LICENSE b/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/LICENSE new file mode 100644 index 0000000..77c42f1 --- /dev/null +++ b/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/LICENSE @@ -0,0 +1,47 @@ +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/README.md b/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/README.md new file mode 100644 index 0000000..91b7538 --- /dev/null +++ b/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/README.md @@ -0,0 +1,18 @@ +# lodash.merge v4.6.2 + +The [Lodash](https://lodash.com/) method `_.merge` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.merge +``` + +In Node.js: +```js +var merge = require('lodash.merge'); +``` + +See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/4.6.2-npm-packages/lodash.merge) for more details. diff --git a/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/index.js b/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/index.js new file mode 100644 index 0000000..8e75d95 --- /dev/null +++ b/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/index.js @@ -0,0 +1,1977 @@ +/** + * Lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeMax = Math.max, + nativeNow = Date.now; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +/** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; +} + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = merge; diff --git a/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/package.json b/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/package.json new file mode 100644 index 0000000..3130fc8 --- /dev/null +++ b/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/package.json @@ -0,0 +1,16 @@ +{ + "name": "lodash.merge", + "version": "4.6.2", + "description": "The Lodash method `_.merge` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "keywords": "lodash-modularized, merge", + "author": "John-David Dalton ", + "contributors": [ + "John-David Dalton ", + "Mathias Bynens " + ], + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/LICENSE b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/LICENSE new file mode 100644 index 0000000..bf23b14 --- /dev/null +++ b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Taylor Hunt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/README.md b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/README.md new file mode 100644 index 0000000..c6a109c --- /dev/null +++ b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/README.md @@ -0,0 +1,109 @@ +Mini SVG `data:` URI +==================== + +This tool converts SVGs into the most compact, compressible `data:` URI that SVG-supporting browsers tolerate. The results look like this (169 bytes): + +```url +data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' +%3e%3cpath d='M22 38V51L32 32l19-19v12C44 26 43 10 38 0 52 15 49 39 22 38z'/%3e +%3c/svg%3e +``` + +Compare to the Base64 version (210 bytes): + +```url +data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIH +ZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTTIyIDM4VjUxTDMyIDMybDE5LTE5djEyQzQ0IDI2ID +QzIDEwIDM4IDAgNTIgMTUgNDkgMzkgMjIgMzh6Ii8+PC9zdmc+ +``` + +Or the URL-encoded version other tools produce (256 bytes): + +```url +data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org% +2F2000%2Fsvg%22%20viewBox%3D%220%200%2050%2050%22%3E%3Cpath%20d%3D%22M22%2038V51 +L32%2032l19-19v12C44%2026%2043%2010%2038%200%2052%2015%2049%2039%2022%2038z%22%2 +F%3E%3C%2Fsvg%3E +``` + +For a more realistic example, I inlined the icons from the [Open Iconic](https://useiconic.com/open) project into CSS files with the 3 above methods: + +| Compression | Base64 | Basic %-encoding | `mini-svg-data-uri` | +|-------------|----------:|-----------------:|--------------------:| +| None | 96.459 kB | 103.268 kB | 76.583 kB | +| `gzip -9` | 17.902 kB | 13.780 kB | 12.974 kB | +| `brotli -Z` | 15.797 kB | 11.693 kB | 10.976 kB | + +Roughly 6% smaller compressed, but don't write off the ≈20% uncompressed savings either. [Some browser caches decompress before store](https://blogs.msdn.microsoft.com/ieinternals/2014/10/21/compressing-the-web/), and parsing time/memory usage scale linearly with uncompressed filesize. + + +Usage +----- + +```js +var svgToMiniDataURI = require('mini-svg-data-uri'); + +var svg = ''; + +var optimizedSVGDataURI = svgToMiniDataURI(svg); +// "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3e%3cpath d='M22 38V51L32 32l19-19v12C44 26 43 10 38 0 52 15 49 39 22 38z'/%3e%3c/svg%3e" +``` + +You can also [try it in your browser at RunKit](https://npm.runkit.com/mini-svg-data-uri). + +### CLI + +If you have it installed globally, or as some kind of dependency inside your project’s directory: + +```sh +mini-svg-data-uri file.svg # writes to stdout +mini-svg-data-uri file.svg file.svg.uri # writes to the given output filename +``` + +Use `--help` for more info. + +### Warning + +* This **does not optimize the SVG source file**. You’ll want [svgo](https://github.com/svg/svgo) or its brother [SVGOMG](https://jakearchibald.github.io/svgomg/) for that. + +* The default output **does not work inside `srcset` attributes**. Use the `.toSrcset` method for that: + + ```js + var srcsetExample = html` + + + + `; + ``` + +* The resulting Data URI should be wrapped with double quotes: `url("…")`, ``, etc. + +* This might change or break SVGs that use `"` in character data, like inside `` or `aria-label` or something. Try curly quotes (`“”`) or `"` instead. + + +FAQ +--- + +### Don’t you need a `charset` in the MIME Type? + +`charset` does nothing for Data URIs. The URI can only be the encoding of its parent file — it’s included in it! + +### Why lowercase the URL-encoded hex pairs? + +It compresses slightly better. No, really. Using the same files from earlier: + +| Compression | Uppercase (`%AF`) | Lowercase (`%af`) | +|-------------|------------------:|------------------:| +| `gzip -9` | 12.978 kB | 12.974 kB | +| `brotli -Z` | 10.988 kB | 10.976 kB | + +I did say *slightly*. + + +Browser support +--------------- + +* Internet Explorer 9 and up, including Edge +* Firefox, Safari, Chrome, whatever else uses their engines +* Android WebKit 3+ +* Opera Mini’s server-side Presto diff --git a/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/cli.js b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/cli.js new file mode 100755 index 0000000..c5a47dd --- /dev/null +++ b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/cli.js @@ -0,0 +1,41 @@ +#!/usr/bin/env node + +let help = ` +Usage: mini-svg-data-uri [dest] + +Options: +-v, --version Output the version number +-h, --help Display help for command + +Examples: + mini-svg-data-uri file.svg Write to stdout + mini-svg-data-uri icon.svg icon.uri Write to file +`; + +let [source, dest] = process.argv.slice(2); + +switch (source) { + case '-h': + case '--help': + case undefined: + console.log(help); + process.exit(); + + case '-v': + case '--version': + console.log(require('./package').version); + process.exit(); +} + +const fs = require('fs'); +const svgToMiniDataURI = require('.'); + +fs.readFile(source, 'utf8', (err, data) => { + if (err) { + console.error(err.message); + console.log(help); + process.exit(1); + } + const out = svgToMiniDataURI(data); + dest ? fs.writeFileSync(dest, out) : console.log(out); +}); diff --git a/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/index.d.ts b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/index.d.ts new file mode 100644 index 0000000..e1f2686 --- /dev/null +++ b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/index.d.ts @@ -0,0 +1,7 @@ +declare function svgToTinyDataUri(svgString: string): string; + +declare namespace svgToTinyDataUri { + function toSrcset(svgString: string): string; +} + +export = svgToTinyDataUri; \ No newline at end of file diff --git a/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/index.js b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/index.js new file mode 100644 index 0000000..971cc38 --- /dev/null +++ b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/index.js @@ -0,0 +1,55 @@ +var shorterNames = require('./shorter-css-color-names'); +var REGEX = { + whitespace: /\s+/g, + urlHexPairs: /%[\dA-F]{2}/g, + quotes: /"/g, +} + +function collapseWhitespace(str) { + return str.trim().replace(REGEX.whitespace, ' '); +} + +function dataURIPayload(string) { + return encodeURIComponent(string) + .replace(REGEX.urlHexPairs, specialHexEncode); +} + +// `#` gets converted to `%23`, so quite a few CSS named colors are shorter than +// their equivalent URL-encoded hex codes. +function colorCodeToShorterNames(string) { + Object.keys(shorterNames).forEach(function(key) { + if (shorterNames[key].test(string)) { + string = string.replace(shorterNames[key], key); + } + }); + + return string; +} + +function specialHexEncode(match) { + switch (match) { // Browsers tolerate these characters, and they're frequent + case '%20': return ' '; + case '%3D': return '='; + case '%3A': return ':'; + case '%2F': return '/'; + default: return match.toLowerCase(); // compresses better + } +} + +function svgToTinyDataUri(svgString) { + if (typeof svgString !== 'string') { + throw new TypeError('Expected a string, but received ' + typeof svgString); + } + // Strip the Byte-Order Mark if the SVG has one + if (svgString.charCodeAt(0) === 0xfeff) { svgString = svgString.slice(1) } + + var body = colorCodeToShorterNames(collapseWhitespace(svgString)) + .replace(REGEX.quotes, "'"); + return 'data:image/svg+xml,' + dataURIPayload(body); +} + +svgToTinyDataUri.toSrcset = function toSrcset(svgString) { + return svgToTinyDataUri(svgString).replace(/ /g, '%20'); +} + +module.exports = svgToTinyDataUri; diff --git a/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/index.test-d.ts b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/index.test-d.ts new file mode 100644 index 0000000..740b215 --- /dev/null +++ b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/index.test-d.ts @@ -0,0 +1,5 @@ +import svgToTinyDataUri from "."; + +svgToTinyDataUri('xx'); + +svgToTinyDataUri.toSrcset('xxx'); \ No newline at end of file diff --git a/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/node_modules/.bin/mini-svg-data-uri b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/node_modules/.bin/mini-svg-data-uri new file mode 100755 index 0000000..d727cd1 --- /dev/null +++ b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/node_modules/.bin/mini-svg-data-uri @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../../cli.js" "$@" +else + exec node "$basedir/../../cli.js" "$@" +fi diff --git a/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/package.json b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/package.json new file mode 100644 index 0000000..da3b9cc --- /dev/null +++ b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/package.json @@ -0,0 +1,26 @@ +{ + "name": "mini-svg-data-uri", + "version": "1.4.4", + "description": "Small, efficient encoding of SVG data URIs for CSS, HTML, etc.", + "main": "index.js", + "types": "index.d.ts", + "bin": "cli.js", + "repository": { + "type": "git", + "url": "git+https://github.com/tigt/mini-svg-data-uri.git" + }, + "keywords": [ + "svg", + "url", + "data", + "uri", + "minification", + "url encoding" + ], + "author": "Taylor “Tigt” Hunt (https://ti.gt/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/tigt/mini-svg-data-uri/issues" + }, + "homepage": "https://github.com/tigt/mini-svg-data-uri#readme" +} diff --git a/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/shorter-css-color-names.js b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/shorter-css-color-names.js new file mode 100644 index 0000000..5e93f5d --- /dev/null +++ b/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/shorter-css-color-names.js @@ -0,0 +1,56 @@ +module.exports = { + aqua: /#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi, + azure: /#f0ffff(ff)?(?!\w)/gi, + beige: /#f5f5dc(ff)?(?!\w)/gi, + bisque: /#ffe4c4(ff)?(?!\w)/gi, + black: /#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi, + blue: /#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi, + brown: /#a52a2a(ff)?(?!\w)/gi, + coral: /#ff7f50(ff)?(?!\w)/gi, + cornsilk: /#fff8dc(ff)?(?!\w)/gi, + crimson: /#dc143c(ff)?(?!\w)/gi, + cyan: /#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi, + darkblue: /#00008b(ff)?(?!\w)/gi, + darkcyan: /#008b8b(ff)?(?!\w)/gi, + darkgrey: /#a9a9a9(ff)?(?!\w)/gi, + darkred: /#8b0000(ff)?(?!\w)/gi, + deeppink: /#ff1493(ff)?(?!\w)/gi, + dimgrey: /#696969(ff)?(?!\w)/gi, + gold: /#ffd700(ff)?(?!\w)/gi, + green: /#008000(ff)?(?!\w)/gi, + grey: /#808080(ff)?(?!\w)/gi, + honeydew: /#f0fff0(ff)?(?!\w)/gi, + hotpink: /#ff69b4(ff)?(?!\w)/gi, + indigo: /#4b0082(ff)?(?!\w)/gi, + ivory: /#fffff0(ff)?(?!\w)/gi, + khaki: /#f0e68c(ff)?(?!\w)/gi, + lavender: /#e6e6fa(ff)?(?!\w)/gi, + lime: /#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi, + linen: /#faf0e6(ff)?(?!\w)/gi, + maroon: /#800000(ff)?(?!\w)/gi, + moccasin: /#ffe4b5(ff)?(?!\w)/gi, + navy: /#000080(ff)?(?!\w)/gi, + oldlace: /#fdf5e6(ff)?(?!\w)/gi, + olive: /#808000(ff)?(?!\w)/gi, + orange: /#ffa500(ff)?(?!\w)/gi, + orchid: /#da70d6(ff)?(?!\w)/gi, + peru: /#cd853f(ff)?(?!\w)/gi, + pink: /#ffc0cb(ff)?(?!\w)/gi, + plum: /#dda0dd(ff)?(?!\w)/gi, + purple: /#800080(ff)?(?!\w)/gi, + red: /#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi, + salmon: /#fa8072(ff)?(?!\w)/gi, + seagreen: /#2e8b57(ff)?(?!\w)/gi, + seashell: /#fff5ee(ff)?(?!\w)/gi, + sienna: /#a0522d(ff)?(?!\w)/gi, + silver: /#c0c0c0(ff)?(?!\w)/gi, + skyblue: /#87ceeb(ff)?(?!\w)/gi, + snow: /#fffafa(ff)?(?!\w)/gi, + tan: /#d2b48c(ff)?(?!\w)/gi, + teal: /#008080(ff)?(?!\w)/gi, + thistle: /#d8bfd8(ff)?(?!\w)/gi, + tomato: /#ff6347(ff)?(?!\w)/gi, + violet: /#ee82ee(ff)?(?!\w)/gi, + wheat: /#f5deb3(ff)?(?!\w)/gi, + white: /#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi, +}; diff --git a/node_modules/.pnpm/node_modules/.bin/mini-svg-data-uri b/node_modules/.pnpm/node_modules/.bin/mini-svg-data-uri new file mode 100755 index 0000000..aaa27c7 --- /dev/null +++ b/node_modules/.pnpm/node_modules/.bin/mini-svg-data-uri @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/mini-svg-data-uri@1.4.4/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../mini-svg-data-uri/cli.js" "$@" +else + exec node "$basedir/../mini-svg-data-uri/cli.js" "$@" +fi diff --git a/node_modules/.pnpm/node_modules/lodash.castarray b/node_modules/.pnpm/node_modules/lodash.castarray new file mode 120000 index 0000000..e8731a3 --- /dev/null +++ b/node_modules/.pnpm/node_modules/lodash.castarray @@ -0,0 +1 @@ +../lodash.castarray@4.4.0/node_modules/lodash.castarray \ No newline at end of file diff --git a/node_modules/.pnpm/node_modules/lodash.isplainobject b/node_modules/.pnpm/node_modules/lodash.isplainobject new file mode 120000 index 0000000..199fd00 --- /dev/null +++ b/node_modules/.pnpm/node_modules/lodash.isplainobject @@ -0,0 +1 @@ +../lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject \ No newline at end of file diff --git a/node_modules/.pnpm/node_modules/lodash.merge b/node_modules/.pnpm/node_modules/lodash.merge new file mode 120000 index 0000000..f91ba40 --- /dev/null +++ b/node_modules/.pnpm/node_modules/lodash.merge @@ -0,0 +1 @@ +../lodash.merge@4.6.2/node_modules/lodash.merge \ No newline at end of file diff --git a/node_modules/.pnpm/node_modules/mini-svg-data-uri b/node_modules/.pnpm/node_modules/mini-svg-data-uri new file mode 120000 index 0000000..c154829 --- /dev/null +++ b/node_modules/.pnpm/node_modules/mini-svg-data-uri @@ -0,0 +1 @@ +../mini-svg-data-uri@1.4.4/node_modules/mini-svg-data-uri \ No newline at end of file diff --git a/node_modules/.pnpm/node_modules/postcss-selector-parser b/node_modules/.pnpm/node_modules/postcss-selector-parser index 9cb25e2..bfdcd2f 120000 --- a/node_modules/.pnpm/node_modules/postcss-selector-parser +++ b/node_modules/.pnpm/node_modules/postcss-selector-parser @@ -1 +1 @@ -../postcss-selector-parser@6.0.15/node_modules/postcss-selector-parser \ No newline at end of file +../postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/cssesc b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/cssesc new file mode 120000 index 0000000..bce5358 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/cssesc @@ -0,0 +1 @@ +../../cssesc@3.0.0/node_modules/cssesc \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/API.md b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/API.md new file mode 100644 index 0000000..6aa1f14 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/API.md @@ -0,0 +1,873 @@ +# API Documentation + +*Please use only this documented API when working with the parser. Methods +not documented here are subject to change at any point.* + +## `parser` function + +This is the module's main entry point. + +```js +const parser = require('postcss-selector-parser'); +``` + +### `parser([transform], [options])` + +Creates a new `processor` instance + +```js +const processor = parser(); +``` + +Or, with optional transform function + +```js +const transform = selectors => { + selectors.walkUniversals(selector => { + selector.remove(); + }); +}; + +const processor = parser(transform) + +// Example +const result = processor.processSync('*.class'); +// => .class +``` + +[See processor documentation](#processor) + +Arguments: + +* `transform (function)`: Provide a function to work with the parsed AST. +* `options (object)`: Provide default options for all calls on the returned `Processor`. + +### `parser.attribute([props])` + +Creates a new attribute selector. + +```js +parser.attribute({attribute: 'href'}); +// => [href] +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.className([props])` + +Creates a new class selector. + +```js +parser.className({value: 'button'}); +// => .button +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.combinator([props])` + +Creates a new selector combinator. + +```js +parser.combinator({value: '+'}); +// => + +``` + +Arguments: + +* `props (object)`: The new node's properties. + +Notes: +* **Descendant Combinators** The value of descendant combinators created by the + parser always just a single space (`" "`). For descendant selectors with no + comments, additional space is now stored in `node.spaces.before`. Depending + on the location of comments, additional spaces may be stored in + `node.raws.spaces.before`, `node.raws.spaces.after`, or `node.raws.value`. +* **Named Combinators** Although, nonstandard and unlikely to ever become a standard, + named combinators like `/deep/` and `/for/` are parsed as combinators. The + `node.value` is name after being unescaped and normalized as lowercase. The + original value for the combinator name is stored in `node.raws.value`. + + +### `parser.comment([props])` + +Creates a new comment. + +```js +parser.comment({value: '/* Affirmative, Dave. I read you. */'}); +// => /* Affirmative, Dave. I read you. */ +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.id([props])` + +Creates a new id selector. + +```js +parser.id({value: 'search'}); +// => #search +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.nesting([props])` + +Creates a new nesting selector. + +```js +parser.nesting(); +// => & +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.pseudo([props])` + +Creates a new pseudo selector. + +```js +parser.pseudo({value: '::before'}); +// => ::before +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.root([props])` + +Creates a new root node. + +```js +parser.root(); +// => (empty) +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.selector([props])` + +Creates a new selector node. + +```js +parser.selector(); +// => (empty) +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.string([props])` + +Creates a new string node. + +```js +parser.string(); +// => (empty) +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.tag([props])` + +Creates a new tag selector. + +```js +parser.tag({value: 'button'}); +// => button +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.universal([props])` + +Creates a new universal selector. + +```js +parser.universal(); +// => * +``` + +Arguments: + +* `props (object)`: The new node's properties. + +## Node types + +### `node.type` + +A string representation of the selector type. It can be one of the following; +`attribute`, `class`, `combinator`, `comment`, `id`, `nesting`, `pseudo`, +`root`, `selector`, `string`, `tag`, or `universal`. Note that for convenience, +these constants are exposed on the main `parser` as uppercased keys. So for +example you can get `id` by querying `parser.ID`. + +```js +parser.attribute({attribute: 'href'}).type; +// => 'attribute' +``` + +### `node.parent` + +Returns the parent node. + +```js +root.nodes[0].parent === root; +``` + +### `node.toString()`, `String(node)`, or `'' + node` + +Returns a string representation of the node. + +```js +const id = parser.id({value: 'search'}); +console.log(String(id)); +// => #search +``` + +### `node.next()` & `node.prev()` + +Returns the next/previous child of the parent node. + +```js +const next = id.next(); +if (next && next.type !== 'combinator') { + throw new Error('Qualified IDs are not allowed!'); +} +``` + +### `node.replaceWith(node)` + +Replace a node with another. + +```js +const attr = selectors.first.first; +const className = parser.className({value: 'test'}); +attr.replaceWith(className); +``` + +Arguments: + +* `node`: The node to substitute the original with. + +### `node.remove()` + +Removes the node from its parent node. + +```js +if (node.type === 'id') { + node.remove(); +} +``` + +### `node.clone()` + +Returns a copy of a node, detached from any parent containers that the +original might have had. + +```js +const cloned = parser.id({value: 'search'}); +String(cloned); + +// => #search +``` + +### `node.isAtPosition(line, column)` + +Return a `boolean` indicating whether this node includes the character at the +position of the given line and column. Returns `undefined` if the nodes lack +sufficient source metadata to determine the position. + +Arguments: + +* `line`: 1-index based line number relative to the start of the selector. +* `column`: 1-index based column number relative to the start of the selector. + +### `node.spaces` + +Extra whitespaces around the node will be moved into `node.spaces.before` and +`node.spaces.after`. So for example, these spaces will be moved as they have +no semantic meaning: + +```css + h1 , h2 {} +``` + +For descendent selectors, the value is always a single space. + +```css +h1 h2 {} +``` + +Additional whitespace is found in either the `node.spaces.before` and `node.spaces.after` depending on the presence of comments or other whitespace characters. If the actual whitespace does not start or end with a single space, the node's raw value is set to the actual space(s) found in the source. + +### `node.source` + +An object describing the node's start/end, line/column source position. + +Within the following CSS, the `.bar` class node ... + +```css +.foo, + .bar {} +``` + +... will contain the following `source` object. + +```js +source: { + start: { + line: 2, + column: 3 + }, + end: { + line: 2, + column: 6 + } +} +``` + +### `node.sourceIndex` + +The zero-based index of the node within the original source string. + +Within the following CSS, the `.baz` class node will have a `sourceIndex` of `12`. + +```css +.foo, .bar, .baz {} +``` + +## Container types + +The `root`, `selector`, and `pseudo` nodes have some helper methods for working +with their children. + +### `container.nodes` + +An array of the container's children. + +```js +// Input: h1 h2 +selectors.at(0).nodes.length // => 3 +selectors.at(0).nodes[0].value // => 'h1' +selectors.at(0).nodes[1].value // => ' ' +``` + +### `container.first` & `container.last` + +The first/last child of the container. + +```js +selector.first === selector.nodes[0]; +selector.last === selector.nodes[selector.nodes.length - 1]; +``` + +### `container.at(index)` + +Returns the node at position `index`. + +```js +selector.at(0) === selector.first; +selector.at(0) === selector.nodes[0]; +``` + +Arguments: + +* `index`: The index of the node to return. + +### `container.atPosition(line, column)` + +Returns the node at the source position `index`. + +```js +selector.at(0) === selector.first; +selector.at(0) === selector.nodes[0]; +``` + +Arguments: + +* `index`: The index of the node to return. + +### `container.index(node)` + +Return the index of the node within its container. + +```js +selector.index(selector.nodes[2]) // => 2 +``` + +Arguments: + +* `node`: A node within the current container. + +### `container.length` + +Proxy to the length of the container's nodes. + +```js +container.length === container.nodes.length +``` + +### `container` Array iterators + +The container class provides proxies to certain Array methods; these are: + +* `container.map === container.nodes.map` +* `container.reduce === container.nodes.reduce` +* `container.every === container.nodes.every` +* `container.some === container.nodes.some` +* `container.filter === container.nodes.filter` +* `container.sort === container.nodes.sort` + +Note that these methods only work on a container's immediate children; recursive +iteration is provided by `container.walk`. + +### `container.each(callback)` + +Iterate the container's immediate children, calling `callback` for each child. +You may return `false` within the callback to break the iteration. + +```js +let className; +selectors.each((selector, index) => { + if (selector.type === 'class') { + className = selector.value; + return false; + } +}); +``` + +Note that unlike `Array#forEach()`, this iterator is safe to use whilst adding +or removing nodes from the container. + +Arguments: + +* `callback (function)`: A function to call for each node, which receives `node` + and `index` arguments. + +### `container.walk(callback)` + +Like `container#each`, but will also iterate child nodes as long as they are +`container` types. + +```js +selectors.walk((selector, index) => { + // all nodes +}); +``` + +Arguments: + +* `callback (function)`: A function to call for each node, which receives `node` + and `index` arguments. + +This iterator is safe to use whilst mutating `container.nodes`, +like `container#each`. + +### `container.walk` proxies + +The container class provides proxy methods for iterating over types of nodes, +so that it is easier to write modules that target specific selectors. Those +methods are: + +* `container.walkAttributes` +* `container.walkClasses` +* `container.walkCombinators` +* `container.walkComments` +* `container.walkIds` +* `container.walkNesting` +* `container.walkPseudos` +* `container.walkTags` +* `container.walkUniversals` + +### `container.split(callback)` + +This method allows you to split a group of nodes by returning `true` from +a callback. It returns an array of arrays, where each inner array corresponds +to the groups that you created via the callback. + +```js +// (input) => h1 h2>>h3 +const list = selectors.first.split(selector => { + return selector.type === 'combinator'; +}); + +// (node values) => [['h1', ' '], ['h2', '>>'], ['h3']] +``` + +Arguments: + +* `callback (function)`: A function to call for each node, which receives `node` + as an argument. + +### `container.prepend(node)` & `container.append(node)` + +Add a node to the start/end of the container. Note that doing so will set +the parent property of the node to this container. + +```js +const id = parser.id({value: 'search'}); +selector.append(id); +``` + +Arguments: + +* `node`: The node to add. + +### `container.insertBefore(old, new)` & `container.insertAfter(old, new)` + +Add a node before or after an existing node in a container: + +```js +selectors.walk(selector => { + if (selector.type !== 'class') { + const className = parser.className({value: 'theme-name'}); + selector.parent.insertAfter(selector, className); + } +}); +``` + +Arguments: + +* `old`: The existing node in the container. +* `new`: The new node to add before/after the existing node. + +### `container.removeChild(node)` + +Remove the node from the container. Note that you can also use +`node.remove()` if you would like to remove just a single node. + +```js +selector.length // => 2 +selector.remove(id) +selector.length // => 1; +id.parent // undefined +``` + +Arguments: + +* `node`: The node to remove. + +### `container.removeAll()` or `container.empty()` + +Remove all children from the container. + +```js +selector.removeAll(); +selector.length // => 0 +``` + +## Root nodes + +A root node represents a comma separated list of selectors. Indeed, all +a root's `toString()` method does is join its selector children with a ','. +Other than this, it has no special functionality and acts like a container. + +### `root.trailingComma` + +This will be set to `true` if the input has a trailing comma, in order to +support parsing of legacy CSS hacks. + +## Selector nodes + +A selector node represents a single complex selector. For example, this +selector string `h1 h2 h3, [href] > p`, is represented as two selector nodes. +It has no special functionality of its own. + +## Pseudo nodes + +A pseudo selector extends a container node; if it has any parameters of its +own (such as `h1:not(h2, h3)`), they will be its children. Note that the pseudo +`value` will always contain the colons preceding the pseudo identifier. This +is so that both `:before` and `::before` are properly represented in the AST. + +## Attribute nodes + +### `attribute.quoted` + +Returns `true` if the attribute's value is wrapped in quotation marks, false if it is not. +Remains `undefined` if there is no attribute value. + +```css +[href=foo] /* false */ +[href='foo'] /* true */ +[href="foo"] /* true */ +[href] /* undefined */ +``` + +### `attribute.qualifiedAttribute` + +Returns the attribute name qualified with the namespace if one is given. + +### `attribute.offsetOf(part)` + + Returns the offset of the attribute part specified relative to the + start of the node of the output string. This is useful in raising + error messages about a specific part of the attribute, especially + in combination with `attribute.sourceIndex`. + + Returns `-1` if the name is invalid or the value doesn't exist in this + attribute. + + The legal values for `part` are: + + * `"ns"` - alias for "namespace" + * `"namespace"` - the namespace if it exists. + * `"attribute"` - the attribute name + * `"attributeNS"` - the start of the attribute or its namespace + * `"operator"` - the match operator of the attribute + * `"value"` - The value (string or identifier) + * `"insensitive"` - the case insensitivity flag + +### `attribute.raws.unquoted` + +Returns the unquoted content of the attribute's value. +Remains `undefined` if there is no attribute value. + +```css +[href=foo] /* foo */ +[href='foo'] /* foo */ +[href="foo"] /* foo */ +[href] /* undefined */ +``` + +### `attribute.spaces` + +Like `node.spaces` with the `before` and `after` values containing the spaces +around the element, the parts of the attribute can also have spaces before +and after them. The for each of `attribute`, `operator`, `value` and +`insensitive` there is corresponding property of the same nam in +`node.spaces` that has an optional `before` or `after` string containing only +whitespace. + +Note that corresponding values in `attributes.raws.spaces` contain values +including any comments. If set, these values will override the +`attribute.spaces` value. Take care to remove them if changing +`attribute.spaces`. + +### `attribute.raws` + +The raws object stores comments and other information necessary to re-render +the node exactly as it was in the source. + +If a comment is embedded within the identifiers for the `namespace`, `attribute` +or `value` then a property is placed in the raws for that value containing the full source of the propery including comments. + +If a comment is embedded within the space between parts of the attribute +then the raw for that space is set accordingly. + +Setting an attribute's property `raws` value to be deleted. + +For now, changing the spaces required also updating or removing any of the +raws values that override them. + +Example: `[ /*before*/ href /* after-attr */ = /* after-operator */ te/*inside-value*/st/* wow */ /*omg*/i/*bbq*/ /*whodoesthis*/]` would parse as: + +```js +{ + attribute: "href", + operator: "=", + value: "test", + spaces: { + before: '', + after: '', + attribute: { before: ' ', after: ' ' }, + operator: { after: ' ' }, + value: { after: ' ' }, + insensitive: { after: ' ' } + }, + raws: { + spaces: { + attribute: { before: ' /*before*/ ', after: ' /* after-attr */ ' }, + operator: { after: ' /* after-operator */ ' }, + value: { after: '/* wow */ /*omg*/' }, + insensitive: { after: '/*bbq*/ /*whodoesthis*/' } + }, + unquoted: 'test', + value: 'te/*inside-value*/st' + } +} +``` + +## `Processor` + +### `ProcessorOptions` + +* `lossless` - When `true`, whitespace is preserved. Defaults to `true`. +* `updateSelector` - When `true`, if any processor methods are passed a postcss + `Rule` node instead of a string, then that Rule's selector is updated + with the results of the processing. Defaults to `true`. + +### `process|processSync(selectors, [options])` + +Processes the `selectors`, returning a string from the result of processing. + +Note: when the `updateSelector` option is set, the rule's selector +will be updated with the resulting string. + +**Example:** + +```js +const parser = require("postcss-selector-parser"); +const processor = parser(); + +let result = processor.processSync(' .class'); +console.log(result); +// => .class + +// Asynchronous operation +let promise = processor.process(' .class').then(result => { + console.log(result) + // => .class +}); + +// To have the parser normalize whitespace values, utilize the options +result = processor.processSync(' .class ', {lossless: false}); +console.log(result); +// => .class + +// For better syntax errors, pass a PostCSS Rule node. +const postcss = require('postcss'); +rule = postcss.rule({selector: ' #foo > a, .class '}); +processor.process(rule, {lossless: false, updateSelector: true}).then(result => { + console.log(result); + // => #foo>a,.class + console.log("rule:", rule.selector); + // => rule: #foo>a,.class +}) +``` + +Arguments: + +* `selectors (string|postcss.Rule)`: Either a selector string or a PostCSS Rule + node. +* `[options] (object)`: Process options + + +### `ast|astSync(selectors, [options])` + +Like `process()` and `processSync()` but after +processing the `selectors` these methods return the `Root` node of the result +instead of a string. + +Note: when the `updateSelector` option is set, the rule's selector +will be updated with the resulting string. + +### `transform|transformSync(selectors, [options])` + +Like `process()` and `processSync()` but after +processing the `selectors` these methods return the value returned by the +processor callback. + +Note: when the `updateSelector` option is set, the rule's selector +will be updated with the resulting string. + +### Error Handling Within Selector Processors + +The root node passed to the selector processor callback +has a method `error(message, options)` that returns an +error object. This method should always be used to raise +errors relating to the syntax of selectors. The options +to this method are passed to postcss's error constructor +([documentation](http://api.postcss.org/Container.html#error)). + +#### Async Error Example + +```js +let processor = (root) => { + return new Promise((resolve, reject) => { + root.walkClasses((classNode) => { + if (/^(.*)[-_]/.test(classNode.value)) { + let msg = "classes may not have underscores or dashes in them"; + reject(root.error(msg, { + index: classNode.sourceIndex + RegExp.$1.length + 1, + word: classNode.value + })); + } + }); + resolve(); + }); +}; + +const postcss = require("postcss"); +const parser = require("postcss-selector-parser"); +const selectorProcessor = parser(processor); +const plugin = postcss.plugin('classValidator', (options) => { + return (root) => { + let promises = []; + root.walkRules(rule => { + promises.push(selectorProcessor.process(rule)); + }); + return Promise.all(promises); + }; +}); +postcss(plugin()).process(` +.foo-bar { + color: red; +} +`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString())); + +// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them +// +// > 1 | .foo-bar { +// | ^ +// 2 | color: red; +// 3 | } +``` + +#### Synchronous Error Example + +```js +let processor = (root) => { + root.walkClasses((classNode) => { + if (/.*[-_]/.test(classNode.value)) { + let msg = "classes may not have underscores or dashes in them"; + throw root.error(msg, { + index: classNode.sourceIndex, + word: classNode.value + }); + } + }); +}; + +const postcss = require("postcss"); +const parser = require("postcss-selector-parser"); +const selectorProcessor = parser(processor); +const plugin = postcss.plugin('classValidator', (options) => { + return (root) => { + root.walkRules(rule => { + selectorProcessor.processSync(rule); + }); + }; +}); +postcss(plugin()).process(` +.foo-bar { + color: red; +} +`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString())); + +// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them +// +// > 1 | .foo-bar { +// | ^ +// 2 | color: red; +// 3 | } +``` diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/CHANGELOG.md b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/CHANGELOG.md new file mode 100644 index 0000000..f2fdfea --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/CHANGELOG.md @@ -0,0 +1,513 @@ +# 6.0.10 + +- Fixed: `isPseudoElement()` supports `:first-letter` and `:first-line` + +# 6.0.9 + +- Fixed: `Combinator.raws` property type + +# 6.0.8 + +- Fixed: reduced size + +# 6.0.7 + +- Fixed: parse animation percents + +# 6.0.6 + +- Fixed: parse quoted attributes containing a newline correctly + +# 6.0.5 + +- Perf: rework unesc for a 63+% performance boost + +# 6.0.4 + +- Fixed: ts errors + +# 6.0.3 + +- Fixed: replace node built-in "util" module with "util-deprecate" +- Fixed: handle uppercase pseudo elements +- Fixed: do not create invalid combinator before comment + +# 6.0.2 + +- Fixed an issue with parsing and stringifying an empty attribute value + +# 6.0.1 + +- Fixed an issue with unicode surrogate pair parsing + +# 6.0.0 + +- Updated: `cssesc` to 3.0.0 (major) +- Fixed: Issues with escaped `id` and `class` selectors + +# 5.0.0 + +- Allow escaped dot within class name. +- Update PostCSS to 7.0.7 (patch) + +# 5.0.0-rc.4 + +- Fixed an issue where comments immediately after an insensitive (in attribute) + were not parsed correctly. +- Updated `cssesc` to 2.0.0 (major). +- Removed outdated integration tests. +- Added tests for custom selectors, tags with attributes, the universal + selector with pseudos, and tokens after combinators. + +# 5.0.0-rc.1 + +To ease adoption of the v5.0 release, we have relaxed the node version +check performed by npm at installation time to allow for node 4, which +remains officially unsupported, but likely to continue working for the +time being. + +# 5.0.0-rc.0 + +This release has **BREAKING CHANGES** that were required to fix regressions +in 4.0.0 and to make the Combinator Node API consistent for all combinator +types. Please read carefully. + +## Summary of Changes + +* The way a descendent combinator that isn't a single space character (E.g. `.a .b`) is stored in the AST has changed. +* Named Combinators (E.g. `.a /for/ .b`) are now properly parsed as a combinator. +* It is now possible to look up a node based on the source location of a character in that node and to query nodes if they contain some character. +* Several bug fixes that caused the parser to hang and run out of memory when a `/` was encountered have been fixed. +* The minimum supported version of Node is now `v6.0.0`. + +### Changes to the Descendent Combinator + +In prior releases, the value of a descendant combinator with multiple spaces included all the spaces. + +* `.a .b`: Extra spaces are now stored as space before. + - Old & Busted: + - `combinator.value === " "` + - New hotness: + - `combinator.value === " " && combinator.spaces.before === " "` +* `.a /*comment*/.b`: A comment at the end of the combinator causes extra space to become after space. + - Old & Busted: + - `combinator.value === " "` + - `combinator.raws.value === " /*comment/"` + - New hotness: + - `combinator.value === " "` + - `combinator.spaces.after === " "` + - `combinator.raws.spaces.after === " /*comment*/"` +* `.a.b`: whitespace that doesn't start or end with a single space character is stored as a raw value. + - Old & Busted: + - `combinator.value === "\n"` + - `combinator.raws.value === undefined` + - New hotness: + - `combinator.value === " "` + - `combinator.raws.value === "\n"` + +### Support for "Named Combinators" + +Although, nonstandard and unlikely to ever become a standard, combinators like `/deep/` and `/for/` are now properly supported. + +Because they've been taken off the standardization track, there is no spec-official name for combinators of the form `//`. However, I talked to [Tab Atkins](https://twitter.com/tabatkins) and we agreed to call them "named combinators" so now they are called that. + +Before this release such named combinators were parsed without intention and generated three nodes of type `"tag"` where the first and last nodes had a value of `"/"`. + +* `.a /for/ .b` is parsed as a combinator. + - Old & Busted: + - `root.nodes[0].nodes[1].type === "tag"` + - `root.nodes[0].nodes[1].value === "/"` + - New hotness: + - `root.nodes[0].nodes[1].type === "combinator"` + - `root.nodes[0].nodes[1].value === "/for/"` +* `.a /F\6fR/ .b` escapes are handled and uppercase is normalized. + - Old & Busted: + - `root.nodes[0].nodes[2].type === "tag"` + - `root.nodes[0].nodes[2].value === "F\\6fR"` + - New hotness: + - `root.nodes[0].nodes[1].type === "combinator"` + - `root.nodes[0].nodes[1].value === "/for/"` + - `root.nodes[0].nodes[1].raws.value === "/F\\6fR/"` + +### Source position checks and lookups + +A new API was added to look up a node based on the source location. + +```js +const selectorParser = require("postcss-selector-parser"); +// You can find the most specific node for any given character +let combinator = selectorParser.astSync(".a > .b").atPosition(1,4); +combinator.toString() === " > "; +// You can check if a node includes a specific character +// Whitespace surrounding the node that is owned by that node +// is included in the check. +[2,3,4,5,6].map(column => combinator.isAtPosition(1, column)); +// => [false, true, true, true, false] +``` + +# 4.0.0 + +This release has **BREAKING CHANGES** that were required to fix bugs regarding values with escape sequences. Please read carefully. + +* **Identifiers with escapes** - CSS escape sequences are now hidden from the public API by default. + The normal value of a node like a class name or ID, or an aspect of a node such as attribute + selector's value, is unescaped. Escapes representing Non-ascii characters are unescaped into + unicode characters. For example: `bu\tton, .\31 00, #i\2764\FE0Fu, [attr="value is \"quoted\""]` + will parse respectively to the values `button`, `100`, `i❤️u`, `value is "quoted"`. + The original escape sequences for these values can be found in the corresponding property name + in `node.raws`. Where possible, deprecation warnings were added, but the nature + of escape handling makes it impossible to detect what is escaped or not. Our expectation is + that most users are neither expecting nor handling escape sequences in their use of this library, + and so for them, this is a bug fix. Users who are taking care to handle escapes correctly can + now update their code to remove the escape handling and let us do it for them. + +* **Mutating values with escapes** - When you make an update to a node property that has escape handling + The value is assumed to be unescaped, and any special characters are escaped automatically and + the corresponding `raws` value is immediately updated. This can result in changes to the original + escape format. Where the exact value of the escape sequence is important there are methods that + allow both values to be set in conjunction. There are a number of new convenience methods for + manipulating values that involve escapes, especially for attributes values where the quote mark + is involved. See https://github.com/postcss/postcss-selector-parser/pull/133 for an extensive + write-up on these changes. + + +**Upgrade/API Example** + +In `3.x` there was no unescape handling and internal consistency of several properties was the caller's job to maintain. It was very easy for the developer +to create a CSS file that did not parse correctly when some types of values +were in use. + +```js +const selectorParser = require("postcss-selector-parser"); +let attr = selectorParser.attribute({attribute: "id", operator: "=", value: "a-value"}); +attr.value; // => "a-value" +attr.toString(); // => [id=a-value] +// Add quotes to an attribute's value. +// All these values have to be set by the caller to be consistent: +// no internal consistency is maintained. +attr.raws.unquoted = attr.value +attr.value = "'" + attr.value + "'"; +attr.value; // => "'a-value'" +attr.quoted = true; +attr.toString(); // => "[id='a-value']" +``` + +In `4.0` there is a convenient API for setting and mutating values +that may need escaping. Especially for attributes. + +```js +const selectorParser = require("postcss-selector-parser"); + +// The constructor requires you specify the exact escape sequence +let className = selectorParser.className({value: "illegal class name", raws: {value: "illegal\\ class\\ name"}}); +className.toString(); // => '.illegal\\ class\\ name' + +// So it's better to set the value as a property +className = selectorParser.className(); +// Most properties that deal with identifiers work like this +className.value = "escape for me"; +className.value; // => 'escape for me' +className.toString(); // => '.escape\\ for\\ me' + +// emoji and all non-ascii are escaped to ensure it works in every css file. +className.value = "😱🦄😍"; +className.value; // => '😱🦄😍' +className.toString(); // => '.\\1F631\\1F984\\1F60D' + +// you can control the escape sequence if you want, or do bad bad things +className.setPropertyAndEscape('value', 'xxxx', 'yyyy'); +className.value; // => "xxxx" +className.toString(); // => ".yyyy" + +// Pass a value directly through to the css output without escaping it. +className.setPropertyWithoutEscape('value', '$REPLACE_ME$'); +className.value; // => "$REPLACE_ME$" +className.toString(); // => ".$REPLACE_ME$" + +// The biggest changes are to the Attribute class +// passing quoteMark explicitly is required to avoid a deprecation warning. +let attr = selectorParser.attribute({attribute: "id", operator: "=", value: "a-value", quoteMark: null}); +attr.toString(); // => "[id=a-value]" +// Get the value with quotes on it and any necessary escapes. +// This is the same as reading attr.value in 3.x. +attr.getQuotedValue(); // => "a-value"; +attr.quoteMark; // => null + +// Add quotes to an attribute's value. +attr.quoteMark = "'"; // This is all that's required. +attr.toString(); // => "[id='a-value']" +attr.quoted; // => true +// The value is still the same, only the quotes have changed. +attr.value; // => a-value +attr.getQuotedValue(); // => "'a-value'"; + +// deprecated assignment, no warning because there's no escapes +attr.value = "new-value"; +// no quote mark is needed so it is removed +attr.getQuotedValue(); // => "new-value"; + +// deprecated assignment, +attr.value = "\"a 'single quoted' value\""; +// > (node:27859) DeprecationWarning: Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead. +attr.getQuotedValue(); // => '"a \'single quoted\' value"'; +// quote mark inferred from first and last characters. +attr.quoteMark; // => '"' + +// setValue takes options to make manipulating the value simple. +attr.setValue('foo', {smart: true}); +// foo doesn't require any escapes or quotes. +attr.toString(); // => '[id=foo]' +attr.quoteMark; // => null + +// An explicit quote mark can be specified +attr.setValue('foo', {quoteMark: '"'}); +attr.toString(); // => '[id="foo"]' + +// preserves quote mark by default +attr.setValue('bar'); +attr.toString(); // => '[id="bar"]' +attr.quoteMark = null; +attr.toString(); // => '[id=bar]' + +// with no arguments, it preserves quote mark even when it's not a great idea +attr.setValue('a value \n that should be quoted'); +attr.toString(); // => '[id=a\\ value\\ \\A\\ that\\ should\\ be\\ quoted]' + +// smart preservation with a specified default +attr.setValue('a value \n that should be quoted', {smart: true, preferCurrentQuoteMark: true, quoteMark: "'"}); +// => "[id='a value \\A that should be quoted']" +attr.quoteMark = '"'; +// => '[id="a value \\A that should be quoted"]' + +// this keeps double quotes because it wants to quote the value and the existing value has double quotes. +attr.setValue('this should be quoted', {smart: true, preferCurrentQuoteMark: true, quoteMark: "'"}); +// => '[id="this should be quoted"]' + +// picks single quotes because the value has double quotes +attr.setValue('a "double quoted" value', {smart: true, preferCurrentQuoteMark: true, quoteMark: "'"}); +// => "[id='a "double quoted" value']" + +// setPropertyAndEscape lets you do anything you want. Even things that are a bad idea and illegal. +attr.setPropertyAndEscape('value', 'xxxx', 'the password is 42'); +attr.value; // => "xxxx" +attr.toString(); // => "[id=the password is 42]" + +// Pass a value directly through to the css output without escaping it. +attr.setPropertyWithoutEscape('value', '$REPLACEMENT$'); +attr.value; // => "$REPLACEMENT$" +attr.toString(); // => "[id=$REPLACEMENT$]" +``` + +# 3.1.2 + +* Fix: Removed dot-prop dependency since it's no longer written in es5. + +# 3.1.1 + +* Fix: typescript definitions weren't in the published package. + +# 3.1.0 + +* Fixed numerous bugs in attribute nodes relating to the handling of comments + and whitespace. There's significant changes to `attrNode.spaces` and `attrNode.raws` since the `3.0.0` release. +* Added `Attribute#offsetOf(part)` to get the offset location of + attribute parts like `"operator"` and `"value"`. This is most + often added to `Attribute#sourceIndex` for error reporting. + +# 3.0.0 + +## Breaking changes + +* Some tweaks to the tokenizer/attribute selector parsing mean that whitespace + locations might be slightly different to the 2.x code. +* Better attribute selector parsing with more validation; postcss-selector-parser + no longer uses regular expressions to parse attribute selectors. +* Added an async API (thanks to @jacobp100); the default `process` API is now + async, and the sync API is now accessed through `processSync` instead. +* `process()` and `processSync()` now return a string instead of the Processor + instance. +* Tweaks handling of Less interpolation (thanks to @jwilsson). +* Removes support for Node 0.12. + +## Other changes + +* `ast()` and `astSync()` methods have been added to the `Processor`. These + return the `Root` node of the selectors after processing them. +* `transform()` and `transformSync()` methods have been added to the + `Processor`. These return the value returned by the processor callback + after processing the selectors. +* Set the parent when inserting a node (thanks to @chriseppstein). +* Correctly adjust indices when using insertBefore/insertAfter (thanks to @tivac). +* Fixes handling of namespaces with qualified tag selectors. +* `process`, `ast` and `transform` (and their sync variants) now accept a + `postcss` rule node. When provided, better errors are generated and selector + processing is automatically set back to the rule selector (unless the `updateSelector` option is set to `false`.) +* Now more memory efficient when tokenizing selectors. + +### Upgrade hints + +The pattern of: + +`rule.selector = processor.process(rule.selector).result.toString();` + +is now: + +`processor.processSync(rule)` + +# 2.2.3 + +* Resolves an issue where the parser would not reduce multiple spaces between an + ampersand and another simple selector in lossy mode (thanks to @adam-26). + +# 2.2.2 + +* No longer hangs on an unescaped semicolon; instead the parser will throw + an exception for these cases. + +# 2.2.1 + +* Allows a consumer to specify whitespace tokens when creating a new Node + (thanks to @Semigradsky). + +# 2.2.0 + +* Added a new option to normalize whitespace when parsing the selector string + (thanks to @adam-26). + +# 2.1.1 + +* Better unquoted value handling within attribute selectors + (thanks to @evilebottnawi). + +# 2.1.0 + +* Added: Use string constants for all node types & expose them on the main + parser instance (thanks to @Aweary). + +# 2.0.0 + +This release contains the following breaking changes: + +* Renamed all `eachInside` iterators to `walk`. For example, `eachTag` is now + `walkTags`, and `eachInside` is now `walk`. +* Renamed `Node#removeSelf()` to `Node#remove()`. +* Renamed `Container#remove()` to `Container#removeChild()`. +* Renamed `Node#raw` to `Node#raws` (thanks to @davidtheclark). +* Now parses `&` as the *nesting* selector, rather than a *tag* selector. +* Fixes misinterpretation of Sass interpolation (e.g. `#{foo}`) as an + id selector (thanks to @davidtheclark). + +and; + +* Fixes parsing of attribute selectors with equals signs in them + (e.g. `[data-attr="foo=bar"]`) (thanks to @montmanu). +* Adds `quoted` and `raw.unquoted` properties to attribute nodes + (thanks to @davidtheclark). + +# 1.3.3 + +* Fixes an infinite loop on `)` and `]` tokens when they had no opening pairs. + Now postcss-selector-parser will throw when it encounters these lone tokens. + +# 1.3.2 + +* Now uses plain integers rather than `str.charCodeAt(0)` for compiled builds. + +# 1.3.1 + +* Update flatten to v1.x (thanks to @shinnn). + +# 1.3.0 + +* Adds a new node type, `String`, to fix a crash on selectors such as + `foo:bar("test")`. + +# 1.2.1 + +* Fixes a crash when the parser encountered a trailing combinator. + +# 1.2.0 + +* A more descriptive error is thrown when the parser expects to find a + pseudo-class/pseudo-element (thanks to @ashelley). +* Adds support for line/column locations for selector nodes, as well as a + `Node#sourceIndex` method (thanks to @davidtheclark). + +# 1.1.4 + +* Fixes a crash when a selector started with a `>` combinator. The module will + now no longer throw if a selector has a leading/trailing combinator node. + +# 1.1.3 + +* Fixes a crash on `@` tokens. + +# 1.1.2 + +* Fixes an infinite loop caused by using parentheses in a non-pseudo element + context. + +# 1.1.1 + +* Fixes a crash when a backslash ended a selector string. + +# 1.1.0 + +* Adds support for replacing multiple nodes at once with `replaceWith` + (thanks to @jonathantneal). +* Parser no longer throws on sequential IDs and trailing commas, to support + parsing of selector hacks. + +# 1.0.1 + +* Fixes using `insertAfter` and `insertBefore` during iteration. + +# 1.0.0 + +* Adds `clone` and `replaceWith` methods to nodes. +* Adds `insertBefore` and `insertAfter` to containers. +* Stabilises API. + +# 0.0.5 + +* Fixes crash on extra whitespace inside a pseudo selector's parentheses. +* Adds sort function to the container class. +* Enables the parser to pass its input through without transforming. +* Iteration-safe `each` and `eachInside`. + +# 0.0.4 + +* Tidy up redundant duplication. +* Fixes a bug where the parser would loop infinitely on universal selectors + inside pseudo selectors. +* Adds `length` getter and `eachInside`, `map`, `reduce` to the container class. +* When a selector has been removed from the tree, the root node will no longer + cast it to a string. +* Adds node type iterators to the container class (e.g. `eachComment`). +* Adds filter function to the container class. +* Adds split function to the container class. +* Create new node types by doing `parser.id(opts)` etc. +* Adds support for pseudo classes anywhere in the selector. + +# 0.0.3 + +* Adds `next` and `prev` to the node class. +* Adds `first` and `last` getters to the container class. +* Adds `every` and `some` iterators to the container class. +* Add `empty` alias for `removeAll`. +* Combinators are now types of node. +* Fixes the at method so that it is not an alias for `index`. +* Tidy up creation of new nodes in the parser. +* Refactors how namespaces are handled for consistency & less redundant code. +* Refactors AST to use `nodes` exclusively, and eliminates excessive nesting. +* Fixes nested pseudo parsing. +* Fixes whitespace parsing. + +# 0.0.2 + +* Adds support for namespace selectors. +* Adds support for selectors joined by escaped spaces - such as `.\31\ 0`. + +# 0.0.1 + +* Initial release. diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/LICENSE-MIT b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/LICENSE-MIT new file mode 100644 index 0000000..fd0e863 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) Ben Briggs (http://beneb.info) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/README.md b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/README.md new file mode 100644 index 0000000..18a01c5 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/README.md @@ -0,0 +1,49 @@ +# postcss-selector-parser [![Build Status](https://travis-ci.org/postcss/postcss-selector-parser.svg?branch=master)](https://travis-ci.org/postcss/postcss-selector-parser) + +> Selector parser with built in methods for working with selector strings. + +## Install + +With [npm](https://npmjs.com/package/postcss-selector-parser) do: + +``` +npm install postcss-selector-parser +``` + +## Quick Start + +```js +const parser = require('postcss-selector-parser'); +const transform = selectors => { + selectors.walk(selector => { + // do something with the selector + console.log(String(selector)) + }); +}; + +const transformed = parser(transform).processSync('h1, h2, h3'); +``` + +To normalize selector whitespace: + +```js +const parser = require('postcss-selector-parser'); +const normalized = parser().processSync('h1, h2, h3', {lossless: false}); +// -> h1,h2,h3 +``` + +Async support is provided through `parser.process` and will resolve a Promise +with the resulting selector string. + +## API + +Please see [API.md](API.md). + +## Credits + +* Huge thanks to Andrey Sitnik (@ai) for work on PostCSS which helped + accelerate this module's development. + +## License + +MIT diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/index.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/index.js new file mode 100644 index 0000000..6e76a32 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/index.js @@ -0,0 +1,24 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _processor = _interopRequireDefault(require("./processor")); + +var selectors = _interopRequireWildcard(require("./selectors")); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var parser = function parser(processor) { + return new _processor["default"](processor); +}; + +Object.assign(parser, selectors); +delete parser.__esModule; +var _default = parser; +exports["default"] = _default; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/parser.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/parser.js new file mode 100644 index 0000000..e0451de --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/parser.js @@ -0,0 +1,1243 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _root = _interopRequireDefault(require("./selectors/root")); + +var _selector = _interopRequireDefault(require("./selectors/selector")); + +var _className = _interopRequireDefault(require("./selectors/className")); + +var _comment = _interopRequireDefault(require("./selectors/comment")); + +var _id = _interopRequireDefault(require("./selectors/id")); + +var _tag = _interopRequireDefault(require("./selectors/tag")); + +var _string = _interopRequireDefault(require("./selectors/string")); + +var _pseudo = _interopRequireDefault(require("./selectors/pseudo")); + +var _attribute = _interopRequireWildcard(require("./selectors/attribute")); + +var _universal = _interopRequireDefault(require("./selectors/universal")); + +var _combinator = _interopRequireDefault(require("./selectors/combinator")); + +var _nesting = _interopRequireDefault(require("./selectors/nesting")); + +var _sortAscending = _interopRequireDefault(require("./sortAscending")); + +var _tokenize = _interopRequireWildcard(require("./tokenize")); + +var tokens = _interopRequireWildcard(require("./tokenTypes")); + +var types = _interopRequireWildcard(require("./selectors/types")); + +var _util = require("./util"); + +var _WHITESPACE_TOKENS, _Object$assign; + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); +var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); + +function tokenStart(token) { + return { + line: token[_tokenize.FIELDS.START_LINE], + column: token[_tokenize.FIELDS.START_COL] + }; +} + +function tokenEnd(token) { + return { + line: token[_tokenize.FIELDS.END_LINE], + column: token[_tokenize.FIELDS.END_COL] + }; +} + +function getSource(startLine, startColumn, endLine, endColumn) { + return { + start: { + line: startLine, + column: startColumn + }, + end: { + line: endLine, + column: endColumn + } + }; +} + +function getTokenSource(token) { + return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); +} + +function getTokenSourceSpan(startToken, endToken) { + if (!startToken) { + return undefined; + } + + return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); +} + +function unescapeProp(node, prop) { + var value = node[prop]; + + if (typeof value !== "string") { + return; + } + + if (value.indexOf("\\") !== -1) { + (0, _util.ensureObject)(node, 'raws'); + node[prop] = (0, _util.unesc)(value); + + if (node.raws[prop] === undefined) { + node.raws[prop] = value; + } + } + + return node; +} + +function indexesOf(array, item) { + var i = -1; + var indexes = []; + + while ((i = array.indexOf(item, i + 1)) !== -1) { + indexes.push(i); + } + + return indexes; +} + +function uniqs() { + var list = Array.prototype.concat.apply([], arguments); + return list.filter(function (item, i) { + return i === list.indexOf(item); + }); +} + +var Parser = /*#__PURE__*/function () { + function Parser(rule, options) { + if (options === void 0) { + options = {}; + } + + this.rule = rule; + this.options = Object.assign({ + lossy: false, + safe: false + }, options); + this.position = 0; + this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; + this.tokens = (0, _tokenize["default"])({ + css: this.css, + error: this._errorGenerator(), + safe: this.options.safe + }); + var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); + this.root = new _root["default"]({ + source: rootSource + }); + this.root.errorGenerator = this._errorGenerator(); + var selector = new _selector["default"]({ + source: { + start: { + line: 1, + column: 1 + } + } + }); + this.root.append(selector); + this.current = selector; + this.loop(); + } + + var _proto = Parser.prototype; + + _proto._errorGenerator = function _errorGenerator() { + var _this = this; + + return function (message, errorOptions) { + if (typeof _this.rule === 'string') { + return new Error(message); + } + + return _this.rule.error(message, errorOptions); + }; + }; + + _proto.attribute = function attribute() { + var attr = []; + var startingToken = this.currToken; + this.position++; + + while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + attr.push(this.currToken); + this.position++; + } + + if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + } + + var len = attr.length; + var node = { + source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + }; + + if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { + return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); + } + + var pos = 0; + var spaceBefore = ''; + var commentBefore = ''; + var lastAdded = null; + var spaceAfterMeaningfulToken = false; + + while (pos < len) { + var token = attr[pos]; + var content = this.content(token); + var next = attr[pos + 1]; + + switch (token[_tokenize.FIELDS.TYPE]) { + case tokens.space: + // if ( + // len === 1 || + // pos === 0 && this.content(next) === '|' + // ) { + // return this.expected('attribute', token[TOKEN.START_POS], content); + // } + spaceAfterMeaningfulToken = true; + + if (this.options.lossy) { + break; + } + + if (lastAdded) { + (0, _util.ensureObject)(node, 'spaces', lastAdded); + var prevContent = node.spaces[lastAdded].after || ''; + node.spaces[lastAdded].after = prevContent + content; + var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; + + if (existingComment) { + node.raws.spaces[lastAdded].after = existingComment + content; + } + } else { + spaceBefore = spaceBefore + content; + commentBefore = commentBefore + content; + } + + break; + + case tokens.asterisk: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = spaceBefore; + commentBefore = ''; + } + + node.namespace = (node.namespace || "") + content; + var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; + + if (rawValue) { + node.raws.namespace += content; + } + + lastAdded = 'namespace'; + } + + spaceAfterMeaningfulToken = false; + break; + + case tokens.dollar: + if (lastAdded === "value") { + var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); + node.value += "$"; + + if (oldRawValue) { + node.raws.value = oldRawValue + "$"; + } + + break; + } + + // Falls through + + case tokens.caret: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + + spaceAfterMeaningfulToken = false; + break; + + case tokens.combinator: + if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + + if (content !== '|') { + spaceAfterMeaningfulToken = false; + break; + } + + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if (!node.namespace && !node.attribute) { + node.namespace = true; + } + + spaceAfterMeaningfulToken = false; + break; + + case tokens.word: + if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved. + !node.operator && !node.namespace) { + node.namespace = content; + lastAdded = 'namespace'; + } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = commentBefore; + commentBefore = ''; + } + + node.attribute = (node.attribute || "") + content; + + var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; + + if (_rawValue) { + node.raws.attribute += content; + } + + lastAdded = 'attribute'; + } else if (!node.value && node.value !== "" || lastAdded === "value" && !spaceAfterMeaningfulToken) { + var _unescaped = (0, _util.unesc)(content); + + var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; + + var oldValue = node.value || ''; + node.value = oldValue + _unescaped; + node.quoteMark = null; + + if (_unescaped !== content || _oldRawValue) { + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = (_oldRawValue || oldValue) + content; + } + + lastAdded = 'value'; + } else { + var insensitive = content === 'i' || content === "I"; + + if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { + node.insensitive = insensitive; + + if (!insensitive || content === "I") { + (0, _util.ensureObject)(node, 'raws'); + node.raws.insensitiveFlag = content; + } + + lastAdded = 'insensitive'; + + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'insensitive'); + node.spaces.insensitive.before = spaceBefore; + spaceBefore = ''; + } + + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); + node.raws.spaces.insensitive.before = commentBefore; + commentBefore = ''; + } + } else if (node.value || node.value === '') { + lastAdded = 'value'; + node.value += content; + + if (node.raws.value) { + node.raws.value += content; + } + } + } + + spaceAfterMeaningfulToken = false; + break; + + case tokens.str: + if (!node.attribute || !node.operator) { + return this.error("Expected an attribute followed by an operator preceding the string.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + + var _unescapeValue = (0, _attribute.unescapeValue)(content), + unescaped = _unescapeValue.unescaped, + quoteMark = _unescapeValue.quoteMark; + + node.value = unescaped; + node.quoteMark = quoteMark; + lastAdded = 'value'; + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = content; + spaceAfterMeaningfulToken = false; + break; + + case tokens.equals: + if (!node.attribute) { + return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); + } + + if (node.value) { + return this.error('Unexpected "=" found; an operator was already defined.', { + index: token[_tokenize.FIELDS.START_POS] + }); + } + + node.operator = node.operator ? node.operator + content : content; + lastAdded = 'operator'; + spaceAfterMeaningfulToken = false; + break; + + case tokens.comment: + if (lastAdded) { + if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { + var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; + var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; + (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); + node.raws.spaces[lastAdded].after = rawLastComment + content; + } else { + var lastValue = node[lastAdded] || ''; + var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; + (0, _util.ensureObject)(node, 'raws'); + node.raws[lastAdded] = rawLastValue + content; + } + } else { + commentBefore = commentBefore + content; + } + + break; + + default: + return this.error("Unexpected \"" + content + "\" found.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + + pos++; + } + + unescapeProp(node, "attribute"); + unescapeProp(node, "namespace"); + this.newNode(new _attribute["default"](node)); + this.position++; + } + /** + * return a node containing meaningless garbage up to (but not including) the specified token position. + * if the token position is negative, all remaining tokens are consumed. + * + * This returns an array containing a single string node if all whitespace, + * otherwise an array of comment nodes with space before and after. + * + * These tokens are not added to the current selector, the caller can add them or use them to amend + * a previous node's space metadata. + * + * In lossy mode, this returns only comments. + */ + ; + + _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { + if (stopPosition < 0) { + stopPosition = this.tokens.length; + } + + var startPosition = this.position; + var nodes = []; + var space = ""; + var lastComment = undefined; + + do { + if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { + if (!this.options.lossy) { + space += this.content(); + } + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { + var spaces = {}; + + if (space) { + spaces.before = space; + space = ""; + } + + lastComment = new _comment["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + spaces: spaces + }); + nodes.push(lastComment); + } + } while (++this.position < stopPosition); + + if (space) { + if (lastComment) { + lastComment.spaces.after = space; + } else if (!this.options.lossy) { + var firstToken = this.tokens[startPosition]; + var lastToken = this.tokens[this.position - 1]; + nodes.push(new _string["default"]({ + value: '', + source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: { + before: space, + after: '' + } + })); + } + } + + return nodes; + } + /** + * + * @param {*} nodes + */ + ; + + _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { + var _this2 = this; + + if (requiredSpace === void 0) { + requiredSpace = false; + } + + var space = ""; + var rawSpace = ""; + nodes.forEach(function (n) { + var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); + + var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); + + space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); + rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); + }); + + if (rawSpace === space) { + rawSpace = undefined; + } + + var result = { + space: space, + rawSpace: rawSpace + }; + return result; + }; + + _proto.isNamedCombinator = function isNamedCombinator(position) { + if (position === void 0) { + position = this.position; + } + + return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; + }; + + _proto.namedCombinator = function namedCombinator() { + if (this.isNamedCombinator()) { + var nameRaw = this.content(this.tokens[this.position + 1]); + var name = (0, _util.unesc)(nameRaw).toLowerCase(); + var raws = {}; + + if (name !== nameRaw) { + raws.value = "/" + nameRaw + "/"; + } + + var node = new _combinator["default"]({ + value: "/" + name + "/", + source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + raws: raws + }); + this.position = this.position + 3; + return node; + } else { + this.unexpected(); + } + }; + + _proto.combinator = function combinator() { + var _this3 = this; + + if (this.content() === '|') { + return this.namespace(); + } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. + + + var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); + + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) { + var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + + if (nodes.length > 0) { + var last = this.current.last; + + if (last) { + var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), + space = _this$convertWhitespa.space, + rawSpace = _this$convertWhitespa.rawSpace; + + if (rawSpace !== undefined) { + last.rawSpaceAfter += rawSpace; + } + + last.spaces.after += space; + } else { + nodes.forEach(function (n) { + return _this3.newNode(n); + }); + } + } + + return; + } + + var firstToken = this.currToken; + var spaceOrDescendantSelectorNodes = undefined; + + if (nextSigTokenPos > this.position) { + spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + } + + var node; + + if (this.isNamedCombinator()) { + node = this.namedCombinator(); + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { + node = new _combinator["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] + }); + this.position++; + } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {// pass + } else if (!spaceOrDescendantSelectorNodes) { + this.unexpected(); + } + + if (node) { + if (spaceOrDescendantSelectorNodes) { + var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), + _space = _this$convertWhitespa2.space, + _rawSpace = _this$convertWhitespa2.rawSpace; + + node.spaces.before = _space; + node.rawSpaceBefore = _rawSpace; + } + } else { + // descendant combinator + var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), + _space2 = _this$convertWhitespa3.space, + _rawSpace2 = _this$convertWhitespa3.rawSpace; + + if (!_rawSpace2) { + _rawSpace2 = _space2; + } + + var spaces = {}; + var raws = { + spaces: {} + }; + + if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { + spaces.before = _space2.slice(0, _space2.length - 1); + raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); + } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { + spaces.after = _space2.slice(1); + raws.spaces.after = _rawSpace2.slice(1); + } else { + raws.value = _rawSpace2; + } + + node = new _combinator["default"]({ + value: ' ', + source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: spaces, + raws: raws + }); + } + + if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { + node.spaces.after = this.optionalSpace(this.content()); + this.position++; + } + + return this.newNode(node); + }; + + _proto.comma = function comma() { + if (this.position === this.tokens.length - 1) { + this.root.trailingComma = true; + this.position++; + return; + } + + this.current._inferEndPosition(); + + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position + 1]) + } + }); + this.current.parent.append(selector); + this.current = selector; + this.position++; + }; + + _proto.comment = function comment() { + var current = this.currToken; + this.newNode(new _comment["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + + _proto.error = function error(message, opts) { + throw this.root.error(message, opts); + }; + + _proto.missingBackslash = function missingBackslash() { + return this.error('Expected a backslash preceding the semicolon.', { + index: this.currToken[_tokenize.FIELDS.START_POS] + }); + }; + + _proto.missingParenthesis = function missingParenthesis() { + return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + }; + + _proto.missingSquareBracket = function missingSquareBracket() { + return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + }; + + _proto.unexpected = function unexpected() { + return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + + _proto.namespace = function namespace() { + var before = this.prevToken && this.content(this.prevToken) || true; + + if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.position++; + return this.word(before); + } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { + this.position++; + return this.universal(before); + } + }; + + _proto.nesting = function nesting() { + if (this.nextToken) { + var nextContent = this.content(this.nextToken); + + if (nextContent === "|") { + this.position++; + return; + } + } + + var current = this.currToken; + this.newNode(new _nesting["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + + _proto.parentheses = function parentheses() { + var last = this.current.last; + var unbalanced = 1; + this.position++; + + if (last && last.type === types.PSEUDO) { + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position - 1]) + } + }); + var cache = this.current; + last.append(selector); + this.current = selector; + + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + + if (unbalanced) { + this.parse(); + } else { + this.current.source.end = tokenEnd(this.currToken); + this.current.parent.source.end = tokenEnd(this.currToken); + this.position++; + } + } + + this.current = cache; + } else { + // I think this case should be an error. It's used to implement a basic parse of media queries + // but I don't think it's a good idea. + var parenStart = this.currToken; + var parenValue = "("; + var parenEnd; + + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + + parenEnd = this.currToken; + parenValue += this.parseParenthesisToken(this.currToken); + this.position++; + } + + if (last) { + last.appendToPropertyAndEscape("value", parenValue, parenValue); + } else { + this.newNode(new _string["default"]({ + value: parenValue, + source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), + sourceIndex: parenStart[_tokenize.FIELDS.START_POS] + })); + } + } + + if (unbalanced) { + return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + + _proto.pseudo = function pseudo() { + var _this4 = this; + + var pseudoStr = ''; + var startingToken = this.currToken; + + while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { + pseudoStr += this.content(); + this.position++; + } + + if (!this.currToken) { + return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); + } + + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.splitWord(false, function (first, length) { + pseudoStr += first; + + _this4.newNode(new _pseudo["default"]({ + value: pseudoStr, + source: getTokenSourceSpan(startingToken, _this4.currToken), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + })); + + if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + _this4.error('Misplaced parenthesis.', { + index: _this4.nextToken[_tokenize.FIELDS.START_POS] + }); + } + }); + } else { + return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + + _proto.space = function space() { + var content = this.content(); // Handle space before and after the selector + + if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { + return node.type === 'comment'; + })) { + this.spaces = this.optionalSpace(content); + this.position++; + } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + this.current.last.spaces.after = this.optionalSpace(content); + this.position++; + } else { + this.combinator(); + } + }; + + _proto.string = function string() { + var current = this.currToken; + this.newNode(new _string["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + + _proto.universal = function universal(namespace) { + var nextToken = this.nextToken; + + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + + var current = this.currToken; + this.newNode(new _universal["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + }), namespace); + this.position++; + }; + + _proto.splitWord = function splitWord(namespace, firstCallback) { + var _this5 = this; + + var nextToken = this.nextToken; + var word = this.content(); + + while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { + this.position++; + var current = this.content(); + word += current; + + if (current.lastIndexOf('\\') === current.length - 1) { + var next = this.nextToken; + + if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { + word += this.requiredSpace(this.content(next)); + this.position++; + } + } + + nextToken = this.nextToken; + } + + var hasClass = indexesOf(word, '.').filter(function (i) { + // Allow escaped dot within class name + var escapedDot = word[i - 1] === '\\'; // Allow decimal numbers percent in @keyframes + + var isKeyframesPercent = /^\d+\.\d+%$/.test(word); + return !escapedDot && !isKeyframesPercent; + }); + var hasId = indexesOf(word, '#').filter(function (i) { + return word[i - 1] !== '\\'; + }); // Eliminate Sass interpolations from the list of id indexes + + var interpolations = indexesOf(word, '#{'); + + if (interpolations.length) { + hasId = hasId.filter(function (hashIndex) { + return !~interpolations.indexOf(hashIndex); + }); + } + + var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); + indices.forEach(function (ind, i) { + var index = indices[i + 1] || word.length; + var value = word.slice(ind, index); + + if (i === 0 && firstCallback) { + return firstCallback.call(_this5, value, indices.length); + } + + var node; + var current = _this5.currToken; + var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; + var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); + + if (~hasClass.indexOf(ind)) { + var classNameOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _className["default"](unescapeProp(classNameOpts, "value")); + } else if (~hasId.indexOf(ind)) { + var idOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _id["default"](unescapeProp(idOpts, "value")); + } else { + var tagOpts = { + value: value, + source: source, + sourceIndex: sourceIndex + }; + unescapeProp(tagOpts, "value"); + node = new _tag["default"](tagOpts); + } + + _this5.newNode(node, namespace); // Ensure that the namespace is used only once + + + namespace = null; + }); + this.position++; + }; + + _proto.word = function word(namespace) { + var nextToken = this.nextToken; + + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + + return this.splitWord(namespace); + }; + + _proto.loop = function loop() { + while (this.position < this.tokens.length) { + this.parse(true); + } + + this.current._inferEndPosition(); + + return this.root; + }; + + _proto.parse = function parse(throwOnParenthesis) { + switch (this.currToken[_tokenize.FIELDS.TYPE]) { + case tokens.space: + this.space(); + break; + + case tokens.comment: + this.comment(); + break; + + case tokens.openParenthesis: + this.parentheses(); + break; + + case tokens.closeParenthesis: + if (throwOnParenthesis) { + this.missingParenthesis(); + } + + break; + + case tokens.openSquare: + this.attribute(); + break; + + case tokens.dollar: + case tokens.caret: + case tokens.equals: + case tokens.word: + this.word(); + break; + + case tokens.colon: + this.pseudo(); + break; + + case tokens.comma: + this.comma(); + break; + + case tokens.asterisk: + this.universal(); + break; + + case tokens.ampersand: + this.nesting(); + break; + + case tokens.slash: + case tokens.combinator: + this.combinator(); + break; + + case tokens.str: + this.string(); + break; + // These cases throw; no break needed. + + case tokens.closeSquare: + this.missingSquareBracket(); + + case tokens.semicolon: + this.missingBackslash(); + + default: + this.unexpected(); + } + } + /** + * Helpers + */ + ; + + _proto.expected = function expected(description, index, found) { + if (Array.isArray(description)) { + var last = description.pop(); + description = description.join(', ') + " or " + last; + } + + var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; + + if (!found) { + return this.error("Expected " + an + " " + description + ".", { + index: index + }); + } + + return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { + index: index + }); + }; + + _proto.requiredSpace = function requiredSpace(space) { + return this.options.lossy ? ' ' : space; + }; + + _proto.optionalSpace = function optionalSpace(space) { + return this.options.lossy ? '' : space; + }; + + _proto.lossySpace = function lossySpace(space, required) { + if (this.options.lossy) { + return required ? ' ' : ''; + } else { + return space; + } + }; + + _proto.parseParenthesisToken = function parseParenthesisToken(token) { + var content = this.content(token); + + if (token[_tokenize.FIELDS.TYPE] === tokens.space) { + return this.requiredSpace(content); + } else { + return content; + } + }; + + _proto.newNode = function newNode(node, namespace) { + if (namespace) { + if (/^ +$/.test(namespace)) { + if (!this.options.lossy) { + this.spaces = (this.spaces || '') + namespace; + } + + namespace = true; + } + + node.namespace = namespace; + unescapeProp(node, "namespace"); + } + + if (this.spaces) { + node.spaces.before = this.spaces; + this.spaces = ''; + } + + return this.current.append(node); + }; + + _proto.content = function content(token) { + if (token === void 0) { + token = this.currToken; + } + + return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); + }; + + /** + * returns the index of the next non-whitespace, non-comment token. + * returns -1 if no meaningful token is found. + */ + _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { + if (startPosition === void 0) { + startPosition = this.position + 1; + } + + var searchPosition = startPosition; + + while (searchPosition < this.tokens.length) { + if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { + searchPosition++; + continue; + } else { + return searchPosition; + } + } + + return -1; + }; + + _createClass(Parser, [{ + key: "currToken", + get: function get() { + return this.tokens[this.position]; + } + }, { + key: "nextToken", + get: function get() { + return this.tokens[this.position + 1]; + } + }, { + key: "prevToken", + get: function get() { + return this.tokens[this.position - 1]; + } + }]); + + return Parser; +}(); + +exports["default"] = Parser; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/processor.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/processor.js new file mode 100644 index 0000000..a00170c --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/processor.js @@ -0,0 +1,206 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _parser = _interopRequireDefault(require("./parser")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var Processor = /*#__PURE__*/function () { + function Processor(func, options) { + this.func = func || function noop() {}; + + this.funcRes = null; + this.options = options; + } + + var _proto = Processor.prototype; + + _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { + if (options === void 0) { + options = {}; + } + + var merged = Object.assign({}, this.options, options); + + if (merged.updateSelector === false) { + return false; + } else { + return typeof rule !== "string"; + } + }; + + _proto._isLossy = function _isLossy(options) { + if (options === void 0) { + options = {}; + } + + var merged = Object.assign({}, this.options, options); + + if (merged.lossless === false) { + return true; + } else { + return false; + } + }; + + _proto._root = function _root(rule, options) { + if (options === void 0) { + options = {}; + } + + var parser = new _parser["default"](rule, this._parseOptions(options)); + return parser.root; + }; + + _proto._parseOptions = function _parseOptions(options) { + return { + lossy: this._isLossy(options) + }; + }; + + _proto._run = function _run(rule, options) { + var _this = this; + + if (options === void 0) { + options = {}; + } + + return new Promise(function (resolve, reject) { + try { + var root = _this._root(rule, options); + + Promise.resolve(_this.func(root)).then(function (transform) { + var string = undefined; + + if (_this._shouldUpdateSelector(rule, options)) { + string = root.toString(); + rule.selector = string; + } + + return { + transform: transform, + root: root, + string: string + }; + }).then(resolve, reject); + } catch (e) { + reject(e); + return; + } + }); + }; + + _proto._runSync = function _runSync(rule, options) { + if (options === void 0) { + options = {}; + } + + var root = this._root(rule, options); + + var transform = this.func(root); + + if (transform && typeof transform.then === "function") { + throw new Error("Selector processor returned a promise to a synchronous call."); + } + + var string = undefined; + + if (options.updateSelector && typeof rule !== "string") { + string = root.toString(); + rule.selector = string; + } + + return { + transform: transform, + root: root, + string: string + }; + } + /** + * Process rule into a selector AST. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise} The AST of the selector after processing it. + */ + ; + + _proto.ast = function ast(rule, options) { + return this._run(rule, options).then(function (result) { + return result.root; + }); + } + /** + * Process rule into a selector AST synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {parser.Root} The AST of the selector after processing it. + */ + ; + + _proto.astSync = function astSync(rule, options) { + return this._runSync(rule, options).root; + } + /** + * Process a selector into a transformed value asynchronously + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise} The value returned by the processor. + */ + ; + + _proto.transform = function transform(rule, options) { + return this._run(rule, options).then(function (result) { + return result.transform; + }); + } + /** + * Process a selector into a transformed value synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {any} The value returned by the processor. + */ + ; + + _proto.transformSync = function transformSync(rule, options) { + return this._runSync(rule, options).transform; + } + /** + * Process a selector into a new selector string asynchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */ + ; + + _proto.process = function process(rule, options) { + return this._run(rule, options).then(function (result) { + return result.string || result.root.toString(); + }); + } + /** + * Process a selector into a new selector string synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */ + ; + + _proto.processSync = function processSync(rule, options) { + var result = this._runSync(rule, options); + + return result.string || result.root.toString(); + }; + + return Processor; +}(); + +exports["default"] = Processor; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/attribute.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/attribute.js new file mode 100644 index 0000000..8f535e5 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/attribute.js @@ -0,0 +1,515 @@ +"use strict"; + +exports.__esModule = true; +exports.unescapeValue = unescapeValue; +exports["default"] = void 0; + +var _cssesc = _interopRequireDefault(require("cssesc")); + +var _unesc = _interopRequireDefault(require("../util/unesc")); + +var _namespace = _interopRequireDefault(require("./namespace")); + +var _types = require("./types"); + +var _CSSESC_QUOTE_OPTIONS; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var deprecate = require("util-deprecate"); + +var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; +var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); +var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); +var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); + +function unescapeValue(value) { + var deprecatedUsage = false; + var quoteMark = null; + var unescaped = value; + var m = unescaped.match(WRAPPED_IN_QUOTES); + + if (m) { + quoteMark = m[1]; + unescaped = m[2]; + } + + unescaped = (0, _unesc["default"])(unescaped); + + if (unescaped !== value) { + deprecatedUsage = true; + } + + return { + deprecatedUsage: deprecatedUsage, + unescaped: unescaped, + quoteMark: quoteMark + }; +} + +function handleDeprecatedContructorOpts(opts) { + if (opts.quoteMark !== undefined) { + return opts; + } + + if (opts.value === undefined) { + return opts; + } + + warnOfDeprecatedConstructor(); + + var _unescapeValue = unescapeValue(opts.value), + quoteMark = _unescapeValue.quoteMark, + unescaped = _unescapeValue.unescaped; + + if (!opts.raws) { + opts.raws = {}; + } + + if (opts.raws.value === undefined) { + opts.raws.value = opts.value; + } + + opts.value = unescaped; + opts.quoteMark = quoteMark; + return opts; +} + +var Attribute = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Attribute, _Namespace); + + function Attribute(opts) { + var _this; + + if (opts === void 0) { + opts = {}; + } + + _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; + _this.type = _types.ATTRIBUTE; + _this.raws = _this.raws || {}; + Object.defineProperty(_this.raws, 'unquoted', { + get: deprecate(function () { + return _this.value; + }, "attr.raws.unquoted is deprecated. Call attr.value instead."), + set: deprecate(function () { + return _this.value; + }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") + }); + _this._constructed = true; + return _this; + } + /** + * Returns the Attribute's value quoted such that it would be legal to use + * in the value of a css file. The original value's quotation setting + * used for stringification is left unchanged. See `setValue(value, options)` + * if you want to control the quote settings of a new value for the attribute. + * + * You can also change the quotation used for the current value by setting quoteMark. + * + * Options: + * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this + * option is not set, the original value for quoteMark will be used. If + * indeterminate, a double quote is used. The legal values are: + * * `null` - the value will be unquoted and characters will be escaped as necessary. + * * `'` - the value will be quoted with a single quote and single quotes are escaped. + * * `"` - the value will be quoted with a double quote and double quotes are escaped. + * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark + * over the quoteMark option value. + * * smart {boolean} - if true, will select a quote mark based on the value + * and the other options specified here. See the `smartQuoteMark()` + * method. + **/ + + + var _proto = Attribute.prototype; + + _proto.getQuotedValue = function getQuotedValue(options) { + if (options === void 0) { + options = {}; + } + + var quoteMark = this._determineQuoteMark(options); + + var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; + var escaped = (0, _cssesc["default"])(this._value, cssescopts); + return escaped; + }; + + _proto._determineQuoteMark = function _determineQuoteMark(options) { + return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); + } + /** + * Set the unescaped value with the specified quotation options. The value + * provided must not include any wrapping quote marks -- those quotes will + * be interpreted as part of the value and escaped accordingly. + */ + ; + + _proto.setValue = function setValue(value, options) { + if (options === void 0) { + options = {}; + } + + this._value = value; + this._quoteMark = this._determineQuoteMark(options); + + this._syncRawValue(); + } + /** + * Intelligently select a quoteMark value based on the value's contents. If + * the value is a legal CSS ident, it will not be quoted. Otherwise a quote + * mark will be picked that minimizes the number of escapes. + * + * If there's no clear winner, the quote mark from these options is used, + * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is + * true). If the quoteMark is unspecified, a double quote is used. + * + * @param options This takes the quoteMark and preferCurrentQuoteMark options + * from the quoteValue method. + */ + ; + + _proto.smartQuoteMark = function smartQuoteMark(options) { + var v = this.value; + var numSingleQuotes = v.replace(/[^']/g, '').length; + var numDoubleQuotes = v.replace(/[^"]/g, '').length; + + if (numSingleQuotes + numDoubleQuotes === 0) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + + if (escaped === v) { + return Attribute.NO_QUOTE; + } else { + var pref = this.preferredQuoteMark(options); + + if (pref === Attribute.NO_QUOTE) { + // pick a quote mark that isn't none and see if it's smaller + var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; + var opts = CSSESC_QUOTE_OPTIONS[quote]; + var quoteValue = (0, _cssesc["default"])(v, opts); + + if (quoteValue.length < escaped.length) { + return quote; + } + } + + return pref; + } + } else if (numDoubleQuotes === numSingleQuotes) { + return this.preferredQuoteMark(options); + } else if (numDoubleQuotes < numSingleQuotes) { + return Attribute.DOUBLE_QUOTE; + } else { + return Attribute.SINGLE_QUOTE; + } + } + /** + * Selects the preferred quote mark based on the options and the current quote mark value. + * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` + * instead. + */ + ; + + _proto.preferredQuoteMark = function preferredQuoteMark(options) { + var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; + + if (quoteMark === undefined) { + quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; + } + + if (quoteMark === undefined) { + quoteMark = Attribute.DOUBLE_QUOTE; + } + + return quoteMark; + }; + + _proto._syncRawValue = function _syncRawValue() { + var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); + + if (rawValue === this._value) { + if (this.raws) { + delete this.raws.value; + } + } else { + this.raws.value = rawValue; + } + }; + + _proto._handleEscapes = function _handleEscapes(prop, value) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(value, { + isIdentifier: true + }); + + if (escaped !== value) { + this.raws[prop] = escaped; + } else { + delete this.raws[prop]; + } + } + }; + + _proto._spacesFor = function _spacesFor(name) { + var attrSpaces = { + before: '', + after: '' + }; + var spaces = this.spaces[name] || {}; + var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; + return Object.assign(attrSpaces, spaces, rawSpaces); + }; + + _proto._stringFor = function _stringFor(name, spaceName, concat) { + if (spaceName === void 0) { + spaceName = name; + } + + if (concat === void 0) { + concat = defaultAttrConcat; + } + + var attrSpaces = this._spacesFor(spaceName); + + return concat(this.stringifyProperty(name), attrSpaces); + } + /** + * returns the offset of the attribute part specified relative to the + * start of the node of the output string. + * + * * "ns" - alias for "namespace" + * * "namespace" - the namespace if it exists. + * * "attribute" - the attribute name + * * "attributeNS" - the start of the attribute or its namespace + * * "operator" - the match operator of the attribute + * * "value" - The value (string or identifier) + * * "insensitive" - the case insensitivity flag; + * @param part One of the possible values inside an attribute. + * @returns -1 if the name is invalid or the value doesn't exist in this attribute. + */ + ; + + _proto.offsetOf = function offsetOf(name) { + var count = 1; + + var attributeSpaces = this._spacesFor("attribute"); + + count += attributeSpaces.before.length; + + if (name === "namespace" || name === "ns") { + return this.namespace ? count : -1; + } + + if (name === "attributeNS") { + return count; + } + + count += this.namespaceString.length; + + if (this.namespace) { + count += 1; + } + + if (name === "attribute") { + return count; + } + + count += this.stringifyProperty("attribute").length; + count += attributeSpaces.after.length; + + var operatorSpaces = this._spacesFor("operator"); + + count += operatorSpaces.before.length; + var operator = this.stringifyProperty("operator"); + + if (name === "operator") { + return operator ? count : -1; + } + + count += operator.length; + count += operatorSpaces.after.length; + + var valueSpaces = this._spacesFor("value"); + + count += valueSpaces.before.length; + var value = this.stringifyProperty("value"); + + if (name === "value") { + return value ? count : -1; + } + + count += value.length; + count += valueSpaces.after.length; + + var insensitiveSpaces = this._spacesFor("insensitive"); + + count += insensitiveSpaces.before.length; + + if (name === "insensitive") { + return this.insensitive ? count : -1; + } + + return -1; + }; + + _proto.toString = function toString() { + var _this2 = this; + + var selector = [this.rawSpaceBefore, '[']; + selector.push(this._stringFor('qualifiedAttribute', 'attribute')); + + if (this.operator && (this.value || this.value === '')) { + selector.push(this._stringFor('operator')); + selector.push(this._stringFor('value')); + selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { + if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { + attrSpaces.before = " "; + } + + return defaultAttrConcat(attrValue, attrSpaces); + })); + } + + selector.push(']'); + selector.push(this.rawSpaceAfter); + return selector.join(''); + }; + + _createClass(Attribute, [{ + key: "quoted", + get: function get() { + var qm = this.quoteMark; + return qm === "'" || qm === '"'; + }, + set: function set(value) { + warnOfDeprecatedQuotedAssignment(); + } + /** + * returns a single (`'`) or double (`"`) quote character if the value is quoted. + * returns `null` if the value is not quoted. + * returns `undefined` if the quotation state is unknown (this can happen when + * the attribute is constructed without specifying a quote mark.) + */ + + }, { + key: "quoteMark", + get: function get() { + return this._quoteMark; + } + /** + * Set the quote mark to be used by this attribute's value. + * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute + * value is updated accordingly. + * + * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. + */ + , + set: function set(quoteMark) { + if (!this._constructed) { + this._quoteMark = quoteMark; + return; + } + + if (this._quoteMark !== quoteMark) { + this._quoteMark = quoteMark; + + this._syncRawValue(); + } + } + }, { + key: "qualifiedAttribute", + get: function get() { + return this.qualifiedName(this.raws.attribute || this.attribute); + } + }, { + key: "insensitiveFlag", + get: function get() { + return this.insensitive ? 'i' : ''; + } + }, { + key: "value", + get: function get() { + return this._value; + } + /** + * Before 3.0, the value had to be set to an escaped value including any wrapped + * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value + * is unescaped during parsing and any quote marks are removed. + * + * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, + * a deprecation warning is raised when the new value contains any characters that would + * require escaping (including if it contains wrapped quotes). + * + * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe + * how the new value is quoted. + */ + , + set: function set(v) { + if (this._constructed) { + var _unescapeValue2 = unescapeValue(v), + deprecatedUsage = _unescapeValue2.deprecatedUsage, + unescaped = _unescapeValue2.unescaped, + quoteMark = _unescapeValue2.quoteMark; + + if (deprecatedUsage) { + warnOfDeprecatedValueAssignment(); + } + + if (unescaped === this._value && quoteMark === this._quoteMark) { + return; + } + + this._value = unescaped; + this._quoteMark = quoteMark; + + this._syncRawValue(); + } else { + this._value = v; + } + } + }, { + key: "attribute", + get: function get() { + return this._attribute; + }, + set: function set(name) { + this._handleEscapes("attribute", name); + + this._attribute = name; + } + }]); + + return Attribute; +}(_namespace["default"]); + +exports["default"] = Attribute; +Attribute.NO_QUOTE = null; +Attribute.SINGLE_QUOTE = "'"; +Attribute.DOUBLE_QUOTE = '"'; +var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { + "'": { + quotes: 'single', + wrap: true + }, + '"': { + quotes: 'double', + wrap: true + } +}, _CSSESC_QUOTE_OPTIONS[null] = { + isIdentifier: true +}, _CSSESC_QUOTE_OPTIONS); + +function defaultAttrConcat(attrValue, attrSpaces) { + return "" + attrSpaces.before + attrValue + attrSpaces.after; +} \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/className.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/className.js new file mode 100644 index 0000000..2240991 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/className.js @@ -0,0 +1,69 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _cssesc = _interopRequireDefault(require("cssesc")); + +var _util = require("../util"); + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var ClassName = /*#__PURE__*/function (_Node) { + _inheritsLoose(ClassName, _Node); + + function ClassName(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.CLASS; + _this._constructed = true; + return _this; + } + + var _proto = ClassName.prototype; + + _proto.valueToString = function valueToString() { + return '.' + _Node.prototype.valueToString.call(this); + }; + + _createClass(ClassName, [{ + key: "value", + get: function get() { + return this._value; + }, + set: function set(v) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + + if (escaped !== v) { + (0, _util.ensureObject)(this, "raws"); + this.raws.value = escaped; + } else if (this.raws) { + delete this.raws.value; + } + } + + this._value = v; + } + }]); + + return ClassName; +}(_node["default"]); + +exports["default"] = ClassName; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/combinator.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/combinator.js new file mode 100644 index 0000000..271ab4d --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/combinator.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Combinator = /*#__PURE__*/function (_Node) { + _inheritsLoose(Combinator, _Node); + + function Combinator(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.COMBINATOR; + return _this; + } + + return Combinator; +}(_node["default"]); + +exports["default"] = Combinator; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/comment.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/comment.js new file mode 100644 index 0000000..e778094 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/comment.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Comment = /*#__PURE__*/function (_Node) { + _inheritsLoose(Comment, _Node); + + function Comment(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.COMMENT; + return _this; + } + + return Comment; +}(_node["default"]); + +exports["default"] = Comment; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/constructors.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/constructors.js new file mode 100644 index 0000000..078023e --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/constructors.js @@ -0,0 +1,102 @@ +"use strict"; + +exports.__esModule = true; +exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0; + +var _attribute = _interopRequireDefault(require("./attribute")); + +var _className = _interopRequireDefault(require("./className")); + +var _combinator = _interopRequireDefault(require("./combinator")); + +var _comment = _interopRequireDefault(require("./comment")); + +var _id = _interopRequireDefault(require("./id")); + +var _nesting = _interopRequireDefault(require("./nesting")); + +var _pseudo = _interopRequireDefault(require("./pseudo")); + +var _root = _interopRequireDefault(require("./root")); + +var _selector = _interopRequireDefault(require("./selector")); + +var _string = _interopRequireDefault(require("./string")); + +var _tag = _interopRequireDefault(require("./tag")); + +var _universal = _interopRequireDefault(require("./universal")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var attribute = function attribute(opts) { + return new _attribute["default"](opts); +}; + +exports.attribute = attribute; + +var className = function className(opts) { + return new _className["default"](opts); +}; + +exports.className = className; + +var combinator = function combinator(opts) { + return new _combinator["default"](opts); +}; + +exports.combinator = combinator; + +var comment = function comment(opts) { + return new _comment["default"](opts); +}; + +exports.comment = comment; + +var id = function id(opts) { + return new _id["default"](opts); +}; + +exports.id = id; + +var nesting = function nesting(opts) { + return new _nesting["default"](opts); +}; + +exports.nesting = nesting; + +var pseudo = function pseudo(opts) { + return new _pseudo["default"](opts); +}; + +exports.pseudo = pseudo; + +var root = function root(opts) { + return new _root["default"](opts); +}; + +exports.root = root; + +var selector = function selector(opts) { + return new _selector["default"](opts); +}; + +exports.selector = selector; + +var string = function string(opts) { + return new _string["default"](opts); +}; + +exports.string = string; + +var tag = function tag(opts) { + return new _tag["default"](opts); +}; + +exports.tag = tag; + +var universal = function universal(opts) { + return new _universal["default"](opts); +}; + +exports.universal = universal; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/container.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/container.js new file mode 100644 index 0000000..2626fb8 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/container.js @@ -0,0 +1,395 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var types = _interopRequireWildcard(require("./types")); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = /*#__PURE__*/function (_Node) { + _inheritsLoose(Container, _Node); + + function Container(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + + if (!_this.nodes) { + _this.nodes = []; + } + + return _this; + } + + var _proto = Container.prototype; + + _proto.append = function append(selector) { + selector.parent = this; + this.nodes.push(selector); + return this; + }; + + _proto.prepend = function prepend(selector) { + selector.parent = this; + this.nodes.unshift(selector); + return this; + }; + + _proto.at = function at(index) { + return this.nodes[index]; + }; + + _proto.index = function index(child) { + if (typeof child === 'number') { + return child; + } + + return this.nodes.indexOf(child); + }; + + _proto.removeChild = function removeChild(child) { + child = this.index(child); + this.at(child).parent = undefined; + this.nodes.splice(child, 1); + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + return this; + }; + + _proto.removeAll = function removeAll() { + for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { + var node = _step.value; + node.parent = undefined; + } + + this.nodes = []; + return this; + }; + + _proto.empty = function empty() { + return this.removeAll(); + }; + + _proto.insertAfter = function insertAfter(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex + 1, 0, newNode); + newNode.parent = this; + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (oldIndex <= index) { + this.indexes[id] = index + 1; + } + } + + return this; + }; + + _proto.insertBefore = function insertBefore(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex, 0, newNode); + newNode.parent = this; + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (index <= oldIndex) { + this.indexes[id] = index + 1; + } + } + + return this; + }; + + _proto._findChildAtPosition = function _findChildAtPosition(line, col) { + var found = undefined; + this.each(function (node) { + if (node.atPosition) { + var foundChild = node.atPosition(line, col); + + if (foundChild) { + found = foundChild; + return false; + } + } else if (node.isAtPosition(line, col)) { + found = node; + return false; + } + }); + return found; + } + /** + * Return the most specific node at the line and column number given. + * The source location is based on the original parsed location, locations aren't + * updated as selector nodes are mutated. + * + * Note that this location is relative to the location of the first character + * of the selector, and not the location of the selector in the overall document + * when used in conjunction with postcss. + * + * If not found, returns undefined. + * @param {number} line The line number of the node to find. (1-based index) + * @param {number} col The column number of the node to find. (1-based index) + */ + ; + + _proto.atPosition = function atPosition(line, col) { + if (this.isAtPosition(line, col)) { + return this._findChildAtPosition(line, col) || this; + } else { + return undefined; + } + }; + + _proto._inferEndPosition = function _inferEndPosition() { + if (this.last && this.last.source && this.last.source.end) { + this.source = this.source || {}; + this.source.end = this.source.end || {}; + Object.assign(this.source.end, this.last.source.end); + } + }; + + _proto.each = function each(callback) { + if (!this.lastEach) { + this.lastEach = 0; + } + + if (!this.indexes) { + this.indexes = {}; + } + + this.lastEach++; + var id = this.lastEach; + this.indexes[id] = 0; + + if (!this.length) { + return undefined; + } + + var index, result; + + while (this.indexes[id] < this.length) { + index = this.indexes[id]; + result = callback(this.at(index), index); + + if (result === false) { + break; + } + + this.indexes[id] += 1; + } + + delete this.indexes[id]; + + if (result === false) { + return false; + } + }; + + _proto.walk = function walk(callback) { + return this.each(function (node, i) { + var result = callback(node, i); + + if (result !== false && node.length) { + result = node.walk(callback); + } + + if (result === false) { + return false; + } + }); + }; + + _proto.walkAttributes = function walkAttributes(callback) { + var _this2 = this; + + return this.walk(function (selector) { + if (selector.type === types.ATTRIBUTE) { + return callback.call(_this2, selector); + } + }); + }; + + _proto.walkClasses = function walkClasses(callback) { + var _this3 = this; + + return this.walk(function (selector) { + if (selector.type === types.CLASS) { + return callback.call(_this3, selector); + } + }); + }; + + _proto.walkCombinators = function walkCombinators(callback) { + var _this4 = this; + + return this.walk(function (selector) { + if (selector.type === types.COMBINATOR) { + return callback.call(_this4, selector); + } + }); + }; + + _proto.walkComments = function walkComments(callback) { + var _this5 = this; + + return this.walk(function (selector) { + if (selector.type === types.COMMENT) { + return callback.call(_this5, selector); + } + }); + }; + + _proto.walkIds = function walkIds(callback) { + var _this6 = this; + + return this.walk(function (selector) { + if (selector.type === types.ID) { + return callback.call(_this6, selector); + } + }); + }; + + _proto.walkNesting = function walkNesting(callback) { + var _this7 = this; + + return this.walk(function (selector) { + if (selector.type === types.NESTING) { + return callback.call(_this7, selector); + } + }); + }; + + _proto.walkPseudos = function walkPseudos(callback) { + var _this8 = this; + + return this.walk(function (selector) { + if (selector.type === types.PSEUDO) { + return callback.call(_this8, selector); + } + }); + }; + + _proto.walkTags = function walkTags(callback) { + var _this9 = this; + + return this.walk(function (selector) { + if (selector.type === types.TAG) { + return callback.call(_this9, selector); + } + }); + }; + + _proto.walkUniversals = function walkUniversals(callback) { + var _this10 = this; + + return this.walk(function (selector) { + if (selector.type === types.UNIVERSAL) { + return callback.call(_this10, selector); + } + }); + }; + + _proto.split = function split(callback) { + var _this11 = this; + + var current = []; + return this.reduce(function (memo, node, index) { + var split = callback.call(_this11, node); + current.push(node); + + if (split) { + memo.push(current); + current = []; + } else if (index === _this11.length - 1) { + memo.push(current); + } + + return memo; + }, []); + }; + + _proto.map = function map(callback) { + return this.nodes.map(callback); + }; + + _proto.reduce = function reduce(callback, memo) { + return this.nodes.reduce(callback, memo); + }; + + _proto.every = function every(callback) { + return this.nodes.every(callback); + }; + + _proto.some = function some(callback) { + return this.nodes.some(callback); + }; + + _proto.filter = function filter(callback) { + return this.nodes.filter(callback); + }; + + _proto.sort = function sort(callback) { + return this.nodes.sort(callback); + }; + + _proto.toString = function toString() { + return this.map(String).join(''); + }; + + _createClass(Container, [{ + key: "first", + get: function get() { + return this.at(0); + } + }, { + key: "last", + get: function get() { + return this.at(this.length - 1); + } + }, { + key: "length", + get: function get() { + return this.nodes.length; + } + }]); + + return Container; +}(_node["default"]); + +exports["default"] = Container; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/guards.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/guards.js new file mode 100644 index 0000000..c949af5 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/guards.js @@ -0,0 +1,64 @@ +"use strict"; + +exports.__esModule = true; +exports.isNode = isNode; +exports.isPseudoElement = isPseudoElement; +exports.isPseudoClass = isPseudoClass; +exports.isContainer = isContainer; +exports.isNamespace = isNamespace; +exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = exports.isPseudo = exports.isNesting = exports.isIdentifier = exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0; + +var _types = require("./types"); + +var _IS_TYPE; + +var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); + +function isNode(node) { + return typeof node === "object" && IS_TYPE[node.type]; +} + +function isNodeType(type, node) { + return isNode(node) && node.type === type; +} + +var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); +exports.isAttribute = isAttribute; +var isClassName = isNodeType.bind(null, _types.CLASS); +exports.isClassName = isClassName; +var isCombinator = isNodeType.bind(null, _types.COMBINATOR); +exports.isCombinator = isCombinator; +var isComment = isNodeType.bind(null, _types.COMMENT); +exports.isComment = isComment; +var isIdentifier = isNodeType.bind(null, _types.ID); +exports.isIdentifier = isIdentifier; +var isNesting = isNodeType.bind(null, _types.NESTING); +exports.isNesting = isNesting; +var isPseudo = isNodeType.bind(null, _types.PSEUDO); +exports.isPseudo = isPseudo; +var isRoot = isNodeType.bind(null, _types.ROOT); +exports.isRoot = isRoot; +var isSelector = isNodeType.bind(null, _types.SELECTOR); +exports.isSelector = isSelector; +var isString = isNodeType.bind(null, _types.STRING); +exports.isString = isString; +var isTag = isNodeType.bind(null, _types.TAG); +exports.isTag = isTag; +var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); +exports.isUniversal = isUniversal; + +function isPseudoElement(node) { + return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); +} + +function isPseudoClass(node) { + return isPseudo(node) && !isPseudoElement(node); +} + +function isContainer(node) { + return !!(isNode(node) && node.walk); +} + +function isNamespace(node) { + return isAttribute(node) || isTag(node); +} \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/id.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/id.js new file mode 100644 index 0000000..4e83147 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/id.js @@ -0,0 +1,37 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var ID = /*#__PURE__*/function (_Node) { + _inheritsLoose(ID, _Node); + + function ID(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.ID; + return _this; + } + + var _proto = ID.prototype; + + _proto.valueToString = function valueToString() { + return '#' + _Node.prototype.valueToString.call(this); + }; + + return ID; +}(_node["default"]); + +exports["default"] = ID; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/index.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/index.js new file mode 100644 index 0000000..1fe9b13 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/index.js @@ -0,0 +1,27 @@ +"use strict"; + +exports.__esModule = true; + +var _types = require("./types"); + +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _types[key]) return; + exports[key] = _types[key]; +}); + +var _constructors = require("./constructors"); + +Object.keys(_constructors).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _constructors[key]) return; + exports[key] = _constructors[key]; +}); + +var _guards = require("./guards"); + +Object.keys(_guards).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _guards[key]) return; + exports[key] = _guards[key]; +}); \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/namespace.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/namespace.js new file mode 100644 index 0000000..fd6c729 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/namespace.js @@ -0,0 +1,101 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _cssesc = _interopRequireDefault(require("cssesc")); + +var _util = require("../util"); + +var _node = _interopRequireDefault(require("./node")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Namespace = /*#__PURE__*/function (_Node) { + _inheritsLoose(Namespace, _Node); + + function Namespace() { + return _Node.apply(this, arguments) || this; + } + + var _proto = Namespace.prototype; + + _proto.qualifiedName = function qualifiedName(value) { + if (this.namespace) { + return this.namespaceString + "|" + value; + } else { + return value; + } + }; + + _proto.valueToString = function valueToString() { + return this.qualifiedName(_Node.prototype.valueToString.call(this)); + }; + + _createClass(Namespace, [{ + key: "namespace", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + if (namespace === true || namespace === "*" || namespace === "&") { + this._namespace = namespace; + + if (this.raws) { + delete this.raws.namespace; + } + + return; + } + + var escaped = (0, _cssesc["default"])(namespace, { + isIdentifier: true + }); + this._namespace = namespace; + + if (escaped !== namespace) { + (0, _util.ensureObject)(this, "raws"); + this.raws.namespace = escaped; + } else if (this.raws) { + delete this.raws.namespace; + } + } + }, { + key: "ns", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + this.namespace = namespace; + } + }, { + key: "namespaceString", + get: function get() { + if (this.namespace) { + var ns = this.stringifyProperty("namespace"); + + if (ns === true) { + return ''; + } else { + return ns; + } + } else { + return ''; + } + } + }]); + + return Namespace; +}(_node["default"]); + +exports["default"] = Namespace; +; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/nesting.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/nesting.js new file mode 100644 index 0000000..3288c78 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/nesting.js @@ -0,0 +1,32 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Nesting = /*#__PURE__*/function (_Node) { + _inheritsLoose(Nesting, _Node); + + function Nesting(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.NESTING; + _this.value = '&'; + return _this; + } + + return Nesting; +}(_node["default"]); + +exports["default"] = Nesting; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/node.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/node.js new file mode 100644 index 0000000..e8eca11 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/node.js @@ -0,0 +1,239 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _util = require("../util"); + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var cloneNode = function cloneNode(obj, parent) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + + var cloned = new obj.constructor(); + + for (var i in obj) { + if (!obj.hasOwnProperty(i)) { + continue; + } + + var value = obj[i]; + var type = typeof value; + + if (i === 'parent' && type === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + cloned[i] = cloneNode(value, cloned); + } + } + + return cloned; +}; + +var Node = /*#__PURE__*/function () { + function Node(opts) { + if (opts === void 0) { + opts = {}; + } + + Object.assign(this, opts); + this.spaces = this.spaces || {}; + this.spaces.before = this.spaces.before || ''; + this.spaces.after = this.spaces.after || ''; + } + + var _proto = Node.prototype; + + _proto.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + + this.parent = undefined; + return this; + }; + + _proto.replaceWith = function replaceWith() { + if (this.parent) { + for (var index in arguments) { + this.parent.insertBefore(this, arguments[index]); + } + + this.remove(); + } + + return this; + }; + + _proto.next = function next() { + return this.parent.at(this.parent.index(this) + 1); + }; + + _proto.prev = function prev() { + return this.parent.at(this.parent.index(this) - 1); + }; + + _proto.clone = function clone(overrides) { + if (overrides === void 0) { + overrides = {}; + } + + var cloned = cloneNode(this); + + for (var name in overrides) { + cloned[name] = overrides[name]; + } + + return cloned; + } + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows non standard syntax to be appended to an existing property + * by specifying the escaped value. By specifying the escaped value, + * illegal characters are allowed to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped optional. the escaped value of the property. + */ + ; + + _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + + var originalValue = this[name]; + var originalEscaped = this.raws[name]; + this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. + + if (originalEscaped || valueEscaped !== value) { + this.raws[name] = (originalEscaped || originalValue) + valueEscaped; + } else { + delete this.raws[name]; // delete any escaped value that was created by the setter. + } + } + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows the escaped value to be specified directly, allowing illegal + * characters to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped the escaped value of the property. + */ + ; + + _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + + this.raws[name] = valueEscaped; + } + /** + * When you want a value to passed through to CSS directly. This method + * deletes the corresponding raw value causing the stringifier to fallback + * to the unescaped value. + * @param {string} name the property to set. + * @param {any} value The value that is both escaped and unescaped. + */ + ; + + _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + + if (this.raws) { + delete this.raws[name]; + } + } + /** + * + * @param {number} line The number (starting with 1) + * @param {number} column The column number (starting with 1) + */ + ; + + _proto.isAtPosition = function isAtPosition(line, column) { + if (this.source && this.source.start && this.source.end) { + if (this.source.start.line > line) { + return false; + } + + if (this.source.end.line < line) { + return false; + } + + if (this.source.start.line === line && this.source.start.column > column) { + return false; + } + + if (this.source.end.line === line && this.source.end.column < column) { + return false; + } + + return true; + } + + return undefined; + }; + + _proto.stringifyProperty = function stringifyProperty(name) { + return this.raws && this.raws[name] || this[name]; + }; + + _proto.valueToString = function valueToString() { + return String(this.stringifyProperty("value")); + }; + + _proto.toString = function toString() { + return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); + }; + + _createClass(Node, [{ + key: "rawSpaceBefore", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; + + if (rawSpace === undefined) { + rawSpace = this.spaces && this.spaces.before; + } + + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.before = raw; + } + }, { + key: "rawSpaceAfter", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; + + if (rawSpace === undefined) { + rawSpace = this.spaces.after; + } + + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.after = raw; + } + }]); + + return Node; +}(); + +exports["default"] = Node; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/pseudo.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/pseudo.js new file mode 100644 index 0000000..a0e7bca --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/pseudo.js @@ -0,0 +1,38 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _container = _interopRequireDefault(require("./container")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Pseudo = /*#__PURE__*/function (_Container) { + _inheritsLoose(Pseudo, _Container); + + function Pseudo(opts) { + var _this; + + _this = _Container.call(this, opts) || this; + _this.type = _types.PSEUDO; + return _this; + } + + var _proto = Pseudo.prototype; + + _proto.toString = function toString() { + var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; + return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); + }; + + return Pseudo; +}(_container["default"]); + +exports["default"] = Pseudo; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/root.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/root.js new file mode 100644 index 0000000..be5c2cc --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/root.js @@ -0,0 +1,60 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _container = _interopRequireDefault(require("./container")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Root = /*#__PURE__*/function (_Container) { + _inheritsLoose(Root, _Container); + + function Root(opts) { + var _this; + + _this = _Container.call(this, opts) || this; + _this.type = _types.ROOT; + return _this; + } + + var _proto = Root.prototype; + + _proto.toString = function toString() { + var str = this.reduce(function (memo, selector) { + memo.push(String(selector)); + return memo; + }, []).join(','); + return this.trailingComma ? str + ',' : str; + }; + + _proto.error = function error(message, options) { + if (this._error) { + return this._error(message, options); + } else { + return new Error(message); + } + }; + + _createClass(Root, [{ + key: "errorGenerator", + set: function set(handler) { + this._error = handler; + } + }]); + + return Root; +}(_container["default"]); + +exports["default"] = Root; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/selector.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/selector.js new file mode 100644 index 0000000..699eeb6 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/selector.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _container = _interopRequireDefault(require("./container")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Selector = /*#__PURE__*/function (_Container) { + _inheritsLoose(Selector, _Container); + + function Selector(opts) { + var _this; + + _this = _Container.call(this, opts) || this; + _this.type = _types.SELECTOR; + return _this; + } + + return Selector; +}(_container["default"]); + +exports["default"] = Selector; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/string.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/string.js new file mode 100644 index 0000000..e61df30 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/string.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var String = /*#__PURE__*/function (_Node) { + _inheritsLoose(String, _Node); + + function String(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.STRING; + return _this; + } + + return String; +}(_node["default"]); + +exports["default"] = String; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/tag.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/tag.js new file mode 100644 index 0000000..e298db1 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/tag.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _namespace = _interopRequireDefault(require("./namespace")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Tag = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Tag, _Namespace); + + function Tag(opts) { + var _this; + + _this = _Namespace.call(this, opts) || this; + _this.type = _types.TAG; + return _this; + } + + return Tag; +}(_namespace["default"]); + +exports["default"] = Tag; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/types.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/types.js new file mode 100644 index 0000000..ab897b8 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/types.js @@ -0,0 +1,28 @@ +"use strict"; + +exports.__esModule = true; +exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0; +var TAG = 'tag'; +exports.TAG = TAG; +var STRING = 'string'; +exports.STRING = STRING; +var SELECTOR = 'selector'; +exports.SELECTOR = SELECTOR; +var ROOT = 'root'; +exports.ROOT = ROOT; +var PSEUDO = 'pseudo'; +exports.PSEUDO = PSEUDO; +var NESTING = 'nesting'; +exports.NESTING = NESTING; +var ID = 'id'; +exports.ID = ID; +var COMMENT = 'comment'; +exports.COMMENT = COMMENT; +var COMBINATOR = 'combinator'; +exports.COMBINATOR = COMBINATOR; +var CLASS = 'class'; +exports.CLASS = CLASS; +var ATTRIBUTE = 'attribute'; +exports.ATTRIBUTE = ATTRIBUTE; +var UNIVERSAL = 'universal'; +exports.UNIVERSAL = UNIVERSAL; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/universal.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/universal.js new file mode 100644 index 0000000..cf25473 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/selectors/universal.js @@ -0,0 +1,32 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _namespace = _interopRequireDefault(require("./namespace")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Universal = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Universal, _Namespace); + + function Universal(opts) { + var _this; + + _this = _Namespace.call(this, opts) || this; + _this.type = _types.UNIVERSAL; + _this.value = '*'; + return _this; + } + + return Universal; +}(_namespace["default"]); + +exports["default"] = Universal; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/sortAscending.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/sortAscending.js new file mode 100644 index 0000000..3ef56ac --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/sortAscending.js @@ -0,0 +1,13 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = sortAscending; + +function sortAscending(list) { + return list.sort(function (a, b) { + return a - b; + }); +} + +; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/tokenTypes.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/tokenTypes.js new file mode 100644 index 0000000..48314b9 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/tokenTypes.js @@ -0,0 +1,95 @@ +"use strict"; + +exports.__esModule = true; +exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0; +var ampersand = 38; // `&`.charCodeAt(0); + +exports.ampersand = ampersand; +var asterisk = 42; // `*`.charCodeAt(0); + +exports.asterisk = asterisk; +var at = 64; // `@`.charCodeAt(0); + +exports.at = at; +var comma = 44; // `,`.charCodeAt(0); + +exports.comma = comma; +var colon = 58; // `:`.charCodeAt(0); + +exports.colon = colon; +var semicolon = 59; // `;`.charCodeAt(0); + +exports.semicolon = semicolon; +var openParenthesis = 40; // `(`.charCodeAt(0); + +exports.openParenthesis = openParenthesis; +var closeParenthesis = 41; // `)`.charCodeAt(0); + +exports.closeParenthesis = closeParenthesis; +var openSquare = 91; // `[`.charCodeAt(0); + +exports.openSquare = openSquare; +var closeSquare = 93; // `]`.charCodeAt(0); + +exports.closeSquare = closeSquare; +var dollar = 36; // `$`.charCodeAt(0); + +exports.dollar = dollar; +var tilde = 126; // `~`.charCodeAt(0); + +exports.tilde = tilde; +var caret = 94; // `^`.charCodeAt(0); + +exports.caret = caret; +var plus = 43; // `+`.charCodeAt(0); + +exports.plus = plus; +var equals = 61; // `=`.charCodeAt(0); + +exports.equals = equals; +var pipe = 124; // `|`.charCodeAt(0); + +exports.pipe = pipe; +var greaterThan = 62; // `>`.charCodeAt(0); + +exports.greaterThan = greaterThan; +var space = 32; // ` `.charCodeAt(0); + +exports.space = space; +var singleQuote = 39; // `'`.charCodeAt(0); + +exports.singleQuote = singleQuote; +var doubleQuote = 34; // `"`.charCodeAt(0); + +exports.doubleQuote = doubleQuote; +var slash = 47; // `/`.charCodeAt(0); + +exports.slash = slash; +var bang = 33; // `!`.charCodeAt(0); + +exports.bang = bang; +var backslash = 92; // '\\'.charCodeAt(0); + +exports.backslash = backslash; +var cr = 13; // '\r'.charCodeAt(0); + +exports.cr = cr; +var feed = 12; // '\f'.charCodeAt(0); + +exports.feed = feed; +var newline = 10; // '\n'.charCodeAt(0); + +exports.newline = newline; +var tab = 9; // '\t'.charCodeAt(0); +// Expose aliases primarily for readability. + +exports.tab = tab; +var str = singleQuote; // No good single character representation! + +exports.str = str; +var comment = -1; +exports.comment = comment; +var word = -2; +exports.word = word; +var combinator = -3; +exports.combinator = combinator; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/tokenize.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/tokenize.js new file mode 100644 index 0000000..bee9fee --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/tokenize.js @@ -0,0 +1,271 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = tokenize; +exports.FIELDS = void 0; + +var t = _interopRequireWildcard(require("./tokenTypes")); + +var _unescapable, _wordDelimiters; + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); +var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); +var hex = {}; +var hexChars = "0123456789abcdefABCDEF"; + +for (var i = 0; i < hexChars.length; i++) { + hex[hexChars.charCodeAt(i)] = true; +} +/** + * Returns the last index of the bar css word + * @param {string} css The string in which the word begins + * @param {number} start The index into the string where word's first letter occurs + */ + + +function consumeWord(css, start) { + var next = start; + var code; + + do { + code = css.charCodeAt(next); + + if (wordDelimiters[code]) { + return next - 1; + } else if (code === t.backslash) { + next = consumeEscape(css, next) + 1; + } else { + // All other characters are part of the word + next++; + } + } while (next < css.length); + + return next - 1; +} +/** + * Returns the last index of the escape sequence + * @param {string} css The string in which the sequence begins + * @param {number} start The index into the string where escape character (`\`) occurs. + */ + + +function consumeEscape(css, start) { + var next = start; + var code = css.charCodeAt(next + 1); + + if (unescapable[code]) {// just consume the escape char + } else if (hex[code]) { + var hexDigits = 0; // consume up to 6 hex chars + + do { + next++; + hexDigits++; + code = css.charCodeAt(next + 1); + } while (hex[code] && hexDigits < 6); // if fewer than 6 hex chars, a trailing space ends the escape + + + if (hexDigits < 6 && code === t.space) { + next++; + } + } else { + // the next char is part of the current word + next++; + } + + return next; +} + +var FIELDS = { + TYPE: 0, + START_LINE: 1, + START_COL: 2, + END_LINE: 3, + END_COL: 4, + START_POS: 5, + END_POS: 6 +}; +exports.FIELDS = FIELDS; + +function tokenize(input) { + var tokens = []; + var css = input.css.valueOf(); + var _css = css, + length = _css.length; + var offset = -1; + var line = 1; + var start = 0; + var end = 0; + var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; + + function unclosed(what, fix) { + if (input.safe) { + // fyi: this is never set to true. + css += fix; + next = css.length - 1; + } else { + throw input.error('Unclosed ' + what, line, start - offset, start); + } + } + + while (start < length) { + code = css.charCodeAt(start); + + if (code === t.newline) { + offset = start; + line += 1; + } + + switch (code) { + case t.space: + case t.tab: + case t.newline: + case t.cr: + case t.feed: + next = start; + + do { + next += 1; + code = css.charCodeAt(next); + + if (code === t.newline) { + offset = next; + line += 1; + } + } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); + + tokenType = t.space; + endLine = line; + endColumn = next - offset - 1; + end = next; + break; + + case t.plus: + case t.greaterThan: + case t.tilde: + case t.pipe: + next = start; + + do { + next += 1; + code = css.charCodeAt(next); + } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); + + tokenType = t.combinator; + endLine = line; + endColumn = start - offset; + end = next; + break; + // Consume these characters as single tokens. + + case t.asterisk: + case t.ampersand: + case t.bang: + case t.comma: + case t.equals: + case t.dollar: + case t.caret: + case t.openSquare: + case t.closeSquare: + case t.colon: + case t.semicolon: + case t.openParenthesis: + case t.closeParenthesis: + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + + case t.singleQuote: + case t.doubleQuote: + quote = code === t.singleQuote ? "'" : '"'; + next = start; + + do { + escaped = false; + next = css.indexOf(quote, next + 1); + + if (next === -1) { + unclosed('quote', quote); + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === t.backslash) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + tokenType = t.str; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + + default: + if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { + next = css.indexOf('*/', start + 2) + 1; + + if (next === 0) { + unclosed('comment', '*/'); + } + + content = css.slice(start, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + tokenType = t.comment; + line = nextLine; + endLine = nextLine; + endColumn = next - nextOffset; + } else if (code === t.slash) { + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + } else { + next = consumeWord(css, start); + tokenType = t.word; + endLine = line; + endColumn = next - offset; + } + + end = next + 1; + break; + } // Ensure that the token structure remains consistent + + + tokens.push([tokenType, // [0] Token type + line, // [1] Starting line + start - offset, // [2] Starting column + endLine, // [3] Ending line + endColumn, // [4] Ending column + start, // [5] Start position / Source index + end // [6] End position + ]); // Reset offset for the next token + + if (nextOffset) { + offset = nextOffset; + nextOffset = null; + } + + start = end; + } + + return tokens; +} \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/ensureObject.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/ensureObject.js new file mode 100644 index 0000000..3472e07 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/ensureObject.js @@ -0,0 +1,22 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = ensureObject; + +function ensureObject(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + + while (props.length > 0) { + var prop = props.shift(); + + if (!obj[prop]) { + obj[prop] = {}; + } + + obj = obj[prop]; + } +} + +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/getProp.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/getProp.js new file mode 100644 index 0000000..53e07c9 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/getProp.js @@ -0,0 +1,24 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = getProp; + +function getProp(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + + while (props.length > 0) { + var prop = props.shift(); + + if (!obj[prop]) { + return undefined; + } + + obj = obj[prop]; + } + + return obj; +} + +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/index.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/index.js new file mode 100644 index 0000000..043fda8 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/index.js @@ -0,0 +1,22 @@ +"use strict"; + +exports.__esModule = true; +exports.stripComments = exports.ensureObject = exports.getProp = exports.unesc = void 0; + +var _unesc = _interopRequireDefault(require("./unesc")); + +exports.unesc = _unesc["default"]; + +var _getProp = _interopRequireDefault(require("./getProp")); + +exports.getProp = _getProp["default"]; + +var _ensureObject = _interopRequireDefault(require("./ensureObject")); + +exports.ensureObject = _ensureObject["default"]; + +var _stripComments = _interopRequireDefault(require("./stripComments")); + +exports.stripComments = _stripComments["default"]; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/stripComments.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/stripComments.js new file mode 100644 index 0000000..c74f1fe --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/stripComments.js @@ -0,0 +1,27 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = stripComments; + +function stripComments(str) { + var s = ""; + var commentStart = str.indexOf("/*"); + var lastEnd = 0; + + while (commentStart >= 0) { + s = s + str.slice(lastEnd, commentStart); + var commentEnd = str.indexOf("*/", commentStart + 2); + + if (commentEnd < 0) { + return s; + } + + lastEnd = commentEnd + 2; + commentStart = str.indexOf("/*", lastEnd); + } + + s = s + str.slice(lastEnd); + return s; +} + +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/unesc.js b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/unesc.js new file mode 100644 index 0000000..3136e7e --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/util/unesc.js @@ -0,0 +1,93 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = unesc; + +// Many thanks for this post which made this migration much easier. +// https://mathiasbynens.be/notes/css-escapes + +/** + * + * @param {string} str + * @returns {[string, number]|undefined} + */ +function gobbleHex(str) { + var lower = str.toLowerCase(); + var hex = ''; + var spaceTerminated = false; + + for (var i = 0; i < 6 && lower[i] !== undefined; i++) { + var code = lower.charCodeAt(i); // check to see if we are dealing with a valid hex char [a-f|0-9] + + var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point + + spaceTerminated = code === 32; + + if (!valid) { + break; + } + + hex += lower[i]; + } + + if (hex.length === 0) { + return undefined; + } + + var codePoint = parseInt(hex, 16); + var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; // Add special case for + // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" + // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point + + if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { + return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; + } + + return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; +} + +var CONTAINS_ESCAPE = /\\/; + +function unesc(str) { + var needToProcess = CONTAINS_ESCAPE.test(str); + + if (!needToProcess) { + return str; + } + + var ret = ""; + + for (var i = 0; i < str.length; i++) { + if (str[i] === "\\") { + var gobbled = gobbleHex(str.slice(i + 1, i + 7)); + + if (gobbled !== undefined) { + ret += gobbled[0]; + i += gobbled[1]; + continue; + } // Retain a pair of \\ if double escaped `\\\\` + // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e + + + if (str[i + 1] === "\\") { + ret += "\\"; + i++; + continue; + } // if \\ is at the end of the string retain it + // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb + + + if (str.length === i + 1) { + ret += str[i]; + } + + continue; + } + + ret += str[i]; + } + + return ret; +} + +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/node_modules/.bin/cssesc b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/node_modules/.bin/cssesc new file mode 100755 index 0000000..59feb13 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/node_modules/.bin/cssesc @@ -0,0 +1,17 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -z "$NODE_PATH" ]; then + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/bin/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/cssesc@3.0.0/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules" +else + export NODE_PATH="/home/speccon18/code/portfolio/node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/bin/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/cssesc@3.0.0/node_modules:/home/speccon18/code/portfolio/node_modules/.pnpm/node_modules:$NODE_PATH" +fi +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../../../../../cssesc@3.0.0/node_modules/cssesc/bin/cssesc" "$@" +else + exec node "$basedir/../../../../../cssesc@3.0.0/node_modules/cssesc/bin/cssesc" "$@" +fi diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/package.json b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/package.json new file mode 100644 index 0000000..a6f3358 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/package.json @@ -0,0 +1,78 @@ +{ + "name": "postcss-selector-parser", + "version": "6.0.10", + "devDependencies": { + "@babel/cli": "^7.11.6", + "@babel/core": "^7.11.6", + "@babel/eslint-parser": "^7.11.5", + "@babel/eslint-plugin": "^7.11.5", + "@babel/plugin-proposal-class-properties": "^7.10.4", + "@babel/preset-env": "^7.11.5", + "@babel/register": "^7.11.5", + "ava": "^3.12.1", + "babel-plugin-add-module-exports": "^1.0.4", + "coveralls": "^3.1.0", + "del-cli": "^3.0.1", + "eslint": "^7.9.0", + "eslint-plugin-import": "^2.22.0", + "glob": "^7.1.6", + "minimist": "^1.2.5", + "nyc": "^15.1.0", + "postcss": "^8.0.0", + "semver": "^7.3.2", + "typescript": "^4.0.3" + }, + "main": "dist/index.js", + "types": "postcss-selector-parser.d.ts", + "files": [ + "API.md", + "CHANGELOG.md", + "LICENSE-MIT", + "dist", + "postcss-selector-parser.d.ts", + "!**/__tests__" + ], + "scripts": { + "pretest": "eslint src && tsc --noEmit postcss-selector-parser.d.ts", + "prepare": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/", + "lintfix": "eslint --fix src", + "report": "nyc report --reporter=html", + "test": "nyc ava src/__tests__/*.js ", + "testone": "ava" + }, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "license": "MIT", + "engines": { + "node": ">=4" + }, + "homepage": "https://github.com/postcss/postcss-selector-parser", + "contributors": [ + { + "name": "Ben Briggs", + "email": "beneb.info@gmail.com", + "url": "http://beneb.info" + }, + { + "name": "Chris Eppstein", + "email": "chris@eppsteins.net", + "url": "http://twitter.com/chriseppstein" + } + ], + "repository": "postcss/postcss-selector-parser", + "ava": { + "require": [ + "@babel/register" + ], + "concurrency": 5, + "timeout": "25s" + }, + "nyc": { + "exclude": [ + "node_modules", + "**/__tests__" + ] + } +} diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts new file mode 100644 index 0000000..89a2c52 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts @@ -0,0 +1,555 @@ +// Type definitions for postcss-selector-parser 2.2.3 +// Definitions by: Chris Eppstein + +/*~ Note that ES6 modules cannot directly export callable functions. + *~ This file should be imported using the CommonJS-style: + *~ import x = require('someLibrary'); + *~ + *~ Refer to the documentation to understand common + *~ workarounds for this limitation of ES6 modules. + */ + +/*~ This declaration specifies that the function + *~ is the exported object from the file + */ +export = parser; + +// A type that's T but not U. +type Diff = T extends U ? never : T; + +// TODO: Conditional types in TS 1.8 will really clean this up. +declare function parser(): parser.Processor; +declare function parser(processor: parser.AsyncProcessor): parser.Processor; +declare function parser(processor: parser.AsyncProcessor): parser.Processor; +declare function parser(processor: parser.SyncProcessor): parser.Processor; +declare function parser(processor: parser.SyncProcessor): parser.Processor; +declare function parser(processor?: parser.SyncProcessor | parser.AsyncProcessor): parser.Processor; + +/*~ If you want to expose types from your module as well, you can + *~ place them in this block. Often you will want to describe the + *~ shape of the return type of the function; that type should + *~ be declared in here, as this example shows. + */ +declare namespace parser { + /* copied from postcss -- so we don't need to add a dependency */ + type ErrorOptions = { + plugin?: string; + word?: string; + index?: number + }; + /* the bits we use of postcss.Rule, copied from postcss -- so we don't need to add a dependency */ + type PostCSSRuleNode = { + selector: string + /** + * @returns postcss.CssSyntaxError but it's a complex object, caller + * should cast to it if they have a dependency on postcss. + */ + error(message: string, options?: ErrorOptions): Error; + }; + /** Accepts a string */ + type Selectors = string | PostCSSRuleNode + type ProcessorFn = (root: parser.Root) => ReturnType; + type SyncProcessor = ProcessorFn; + type AsyncProcessor = ProcessorFn>; + + const TAG: "tag"; + const STRING: "string"; + const SELECTOR: "selector"; + const ROOT: "root"; + const PSEUDO: "pseudo"; + const NESTING: "nesting"; + const ID: "id"; + const COMMENT: "comment"; + const COMBINATOR: "combinator"; + const CLASS: "class"; + const ATTRIBUTE: "attribute"; + const UNIVERSAL: "universal"; + + interface NodeTypes { + tag: Tag, + string: String, + selector: Selector, + root: Root, + pseudo: Pseudo, + nesting: Nesting, + id: Identifier, + comment: Comment, + combinator: Combinator, + class: ClassName, + attribute: Attribute, + universal: Universal + } + + type Node = NodeTypes[keyof NodeTypes]; + + function isNode(node: any): node is Node; + + interface Options { + /** + * Preserve whitespace when true. Default: false; + */ + lossless: boolean; + /** + * When true and a postcss.Rule is passed, set the result of + * processing back onto the rule when done. Default: false. + */ + updateSelector: boolean; + } + class Processor< + TransformType = never, + SyncSelectorsType extends Selectors | never = Selectors + > { + res: Root; + readonly result: String; + ast(selectors: Selectors, options?: Partial): Promise; + astSync(selectors: SyncSelectorsType, options?: Partial): Root; + transform(selectors: Selectors, options?: Partial): Promise; + transformSync(selectors: SyncSelectorsType, options?: Partial): TransformType; + process(selectors: Selectors, options?: Partial): Promise; + processSync(selectors: SyncSelectorsType, options?: Partial): string; + } + interface ParserOptions { + css: string; + error: (message: string, options: ErrorOptions) => Error; + options: Options; + } + class Parser { + input: ParserOptions; + lossy: boolean; + position: number; + root: Root; + selectors: string; + current: Selector; + constructor(input: ParserOptions); + /** + * Raises an error, if the processor is invoked on + * a postcss Rule node, a better error message is raised. + */ + error(message: string, options?: ErrorOptions): void; + } + interface NodeSource { + start?: { + line: number, + column: number + }, + end?: { + line: number, + column: number + } + } + interface SpaceAround { + before: string; + after: string; + } + interface Spaces extends SpaceAround { + [spaceType: string]: string | Partial | undefined; + } + interface NodeOptions { + value: Value; + spaces?: Partial; + source?: NodeSource; + sourceIndex?: number; + } + interface Base< + Value extends string | undefined = string, + ParentType extends Container | undefined = Container | undefined + > { + type: keyof NodeTypes; + parent: ParentType; + value: Value; + spaces: Spaces; + source?: NodeSource; + sourceIndex: number; + rawSpaceBefore: string; + rawSpaceAfter: string; + remove(): Node; + replaceWith(...nodes: Node[]): Node; + next(): Node; + prev(): Node; + clone(opts: {[override: string]:any}): Node; + /** + * Return whether this node includes the character at the position of the given line and column. + * Returns undefined if the nodes lack sufficient source metadata to determine the position. + * @param line 1-index based line number relative to the start of the selector. + * @param column 1-index based column number relative to the start of the selector. + */ + isAtPosition(line: number, column: number): boolean | undefined; + /** + * Some non-standard syntax doesn't follow normal escaping rules for css, + * this allows the escaped value to be specified directly, allowing illegal characters to be + * directly inserted into css output. + * @param name the property to set + * @param value the unescaped value of the property + * @param valueEscaped optional. the escaped value of the property. + */ + setPropertyAndEscape(name: string, value: any, valueEscaped: string): void; + /** + * When you want a value to passed through to CSS directly. This method + * deletes the corresponding raw value causing the stringifier to fallback + * to the unescaped value. + * @param name the property to set. + * @param value The value that is both escaped and unescaped. + */ + setPropertyWithoutEscape(name: string, value: any): void; + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows non standard syntax to be appended to an existing property + * by specifying the escaped value. By specifying the escaped value, + * illegal characters are allowed to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped optional. the escaped value of the property. + */ + appendToPropertyAndEscape(name: string, value: any, valueEscaped: string): void; + toString(): string; + } + interface ContainerOptions extends NodeOptions { + nodes?: Array; + } + interface Container< + Value extends string | undefined = string, + Child extends Node = Node + > extends Base { + nodes: Array; + append(selector: Selector): this; + prepend(selector: Selector): this; + at(index: number): Child; + /** + * Return the most specific node at the line and column number given. + * The source location is based on the original parsed location, locations aren't + * updated as selector nodes are mutated. + * + * Note that this location is relative to the location of the first character + * of the selector, and not the location of the selector in the overall document + * when used in conjunction with postcss. + * + * If not found, returns undefined. + * @param line The line number of the node to find. (1-based index) + * @param col The column number of the node to find. (1-based index) + */ + atPosition(line: number, column: number): Child; + index(child: Child): number; + readonly first: Child; + readonly last: Child; + readonly length: number; + removeChild(child: Child): this; + removeAll(): Container; + empty(): Container; + insertAfter(oldNode: Child, newNode: Child): this; + insertBefore(oldNode: Child, newNode: Child): this; + each(callback: (node: Child) => boolean | void): boolean | undefined; + walk( + callback: (node: Node) => boolean | void + ): boolean | undefined; + walkAttributes( + callback: (node: Attribute) => boolean | void + ): boolean | undefined; + walkClasses( + callback: (node: ClassName) => boolean | void + ): boolean | undefined; + walkCombinators( + callback: (node: Combinator) => boolean | void + ): boolean | undefined; + walkComments( + callback: (node: Comment) => boolean | void + ): boolean | undefined; + walkIds( + callback: (node: Identifier) => boolean | void + ): boolean | undefined; + walkNesting( + callback: (node: Nesting) => boolean | void + ): boolean | undefined; + walkPseudos( + callback: (node: Pseudo) => boolean | void + ): boolean | undefined; + walkTags(callback: (node: Tag) => boolean | void): boolean | undefined; + split(callback: (node: Child) => boolean): [Child[], Child[]]; + map(callback: (node: Child) => T): T[]; + reduce( + callback: ( + previousValue: Child, + currentValue: Child, + currentIndex: number, + array: readonly Child[] + ) => Child + ): Child; + reduce( + callback: ( + previousValue: Child, + currentValue: Child, + currentIndex: number, + array: readonly Child[] + ) => Child, + initialValue: Child + ): Child; + reduce( + callback: ( + previousValue: T, + currentValue: Child, + currentIndex: number, + array: readonly Child[] + ) => T, + initialValue: T + ): T; + every(callback: (node: Child) => boolean): boolean; + some(callback: (node: Child) => boolean): boolean; + filter(callback: (node: Child) => boolean): Child[]; + sort(callback: (nodeA: Child, nodeB: Child) => number): Child[]; + toString(): string; + } + function isContainer(node: any): node is Root | Selector | Pseudo; + + interface NamespaceOptions extends NodeOptions { + namespace?: string | true; + } + interface Namespace extends Base { + /** alias for namespace */ + ns: string | true; + /** + * namespace prefix. + */ + namespace: string | true; + /** + * If a namespace exists, prefix the value provided with it, separated by |. + */ + qualifiedName(value: string): string; + /** + * A string representing the namespace suitable for output. + */ + readonly namespaceString: string; + } + function isNamespace(node: any): node is Attribute | Tag; + + interface Root extends Container { + type: "root"; + /** + * Raises an error, if the processor is invoked on + * a postcss Rule node, a better error message is raised. + */ + error(message: string, options?: ErrorOptions): Error; + nodeAt(line: number, column: number): Node + } + function root(opts: ContainerOptions): Root; + function isRoot(node: any): node is Root; + + interface _Selector extends Container> { + type: "selector"; + } + type Selector = _Selector; + function selector(opts: ContainerOptions): Selector; + function isSelector(node: any): node is Selector; + + interface CombinatorRaws { + value?: string; + spaces?: { + before?: string; + after?: string; + }; + } + interface Combinator extends Base { + type: "combinator"; + raws?: CombinatorRaws; + } + function combinator(opts: NodeOptions): Combinator; + function isCombinator(node: any): node is Combinator; + + interface ClassName extends Base { + type: "class"; + } + function className(opts: NamespaceOptions): ClassName; + function isClassName(node: any): node is ClassName; + + type AttributeOperator = "=" | "~=" | "|=" | "^=" | "$=" | "*="; + type QuoteMark = '"' | "'" | null; + interface PreferredQuoteMarkOptions { + quoteMark?: QuoteMark; + preferCurrentQuoteMark?: boolean; + } + interface SmartQuoteMarkOptions extends PreferredQuoteMarkOptions { + smart?: boolean; + } + interface AttributeOptions extends NamespaceOptions { + attribute: string; + operator?: AttributeOperator; + insensitive?: boolean; + quoteMark?: QuoteMark; + /** @deprecated Use quoteMark instead. */ + quoted?: boolean; + spaces?: { + before?: string; + after?: string; + attribute?: Partial; + operator?: Partial; + value?: Partial; + insensitive?: Partial; + } + raws: { + unquoted?: string; + attribute?: string; + operator?: string; + value?: string; + insensitive?: string; + spaces?: { + attribute?: Partial; + operator?: Partial; + value?: Partial; + insensitive?: Partial; + } + }; + } + interface Attribute extends Namespace { + type: "attribute"; + attribute: string; + operator?: AttributeOperator; + insensitive?: boolean; + quoteMark: QuoteMark; + quoted?: boolean; + spaces: { + before: string; + after: string; + attribute?: Partial; + operator?: Partial; + value?: Partial; + insensitive?: Partial; + } + raws: { + /** @deprecated The attribute value is unquoted, use that instead.. */ + unquoted?: string; + attribute?: string; + operator?: string; + /** The value of the attribute with quotes and escapes. */ + value?: string; + insensitive?: string; + spaces?: { + attribute?: Partial; + operator?: Partial; + value?: Partial; + insensitive?: Partial; + } + }; + /** + * The attribute name after having been qualified with a namespace. + */ + readonly qualifiedAttribute: string; + + /** + * The case insensitivity flag or an empty string depending on whether this + * attribute is case insensitive. + */ + readonly insensitiveFlag : 'i' | ''; + + /** + * Returns the attribute's value quoted such that it would be legal to use + * in the value of a css file. The original value's quotation setting + * used for stringification is left unchanged. See `setValue(value, options)` + * if you want to control the quote settings of a new value for the attribute or + * `set quoteMark(mark)` if you want to change the quote settings of the current + * value. + * + * You can also change the quotation used for the current value by setting quoteMark. + **/ + getQuotedValue(options?: SmartQuoteMarkOptions): string; + + /** + * Set the unescaped value with the specified quotation options. The value + * provided must not include any wrapping quote marks -- those quotes will + * be interpreted as part of the value and escaped accordingly. + * @param value + */ + setValue(value: string, options?: SmartQuoteMarkOptions): void; + + /** + * Intelligently select a quoteMark value based on the value's contents. If + * the value is a legal CSS ident, it will not be quoted. Otherwise a quote + * mark will be picked that minimizes the number of escapes. + * + * If there's no clear winner, the quote mark from these options is used, + * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is + * true). If the quoteMark is unspecified, a double quote is used. + **/ + smartQuoteMark(options: PreferredQuoteMarkOptions): QuoteMark; + + /** + * Selects the preferred quote mark based on the options and the current quote mark value. + * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` + * instead. + */ + preferredQuoteMark(options: PreferredQuoteMarkOptions): QuoteMark + + /** + * returns the offset of the attribute part specified relative to the + * start of the node of the output string. + * + * * "ns" - alias for "namespace" + * * "namespace" - the namespace if it exists. + * * "attribute" - the attribute name + * * "attributeNS" - the start of the attribute or its namespace + * * "operator" - the match operator of the attribute + * * "value" - The value (string or identifier) + * * "insensitive" - the case insensitivity flag; + * @param part One of the possible values inside an attribute. + * @returns -1 if the name is invalid or the value doesn't exist in this attribute. + */ + offsetOf(part: "ns" | "namespace" | "attribute" | "attributeNS" | "operator" | "value" | "insensitive"): number; + } + function attribute(opts: AttributeOptions): Attribute; + function isAttribute(node: any): node is Attribute; + + interface Pseudo extends Container { + type: "pseudo"; + } + function pseudo(opts: ContainerOptions): Pseudo; + /** + * Checks wether the node is the Psuedo subtype of node. + */ + function isPseudo(node: any): node is Pseudo; + + /** + * Checks wether the node is, specifically, a pseudo element instead of + * pseudo class. + */ + function isPseudoElement(node: any): node is Pseudo; + + /** + * Checks wether the node is, specifically, a pseudo class instead of + * pseudo element. + */ + function isPseudoClass(node: any): node is Pseudo; + + + interface Tag extends Namespace { + type: "tag"; + } + function tag(opts: NamespaceOptions): Tag; + function isTag(node: any): node is Tag; + + interface Comment extends Base { + type: "comment"; + } + function comment(opts: NodeOptions): Comment; + function isComment(node: any): node is Comment; + + interface Identifier extends Base { + type: "id"; + } + function id(opts: any): any; + function isIdentifier(node: any): node is Identifier; + + interface Nesting extends Base { + type: "nesting"; + } + function nesting(opts: any): any; + function isNesting(node: any): node is Nesting; + + interface String extends Base { + type: "string"; + } + function string(opts: NodeOptions): String; + function isString(node: any): node is String; + + interface Universal extends Base { + type: "universal"; + } + function universal(opts?: NamespaceOptions): any; + function isUniversal(node: any): node is Universal; +} diff --git a/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/util-deprecate b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/util-deprecate new file mode 120000 index 0000000..3cb73d8 --- /dev/null +++ b/node_modules/.pnpm/postcss-selector-parser@6.0.10/node_modules/util-deprecate @@ -0,0 +1 @@ +../../util-deprecate@1.0.2/node_modules/util-deprecate \ No newline at end of file diff --git a/node_modules/@tailwindcss/aspect-ratio b/node_modules/@tailwindcss/aspect-ratio new file mode 120000 index 0000000..d855d51 --- /dev/null +++ b/node_modules/@tailwindcss/aspect-ratio @@ -0,0 +1 @@ +../.pnpm/@tailwindcss+aspect-ratio@0.4.2_tailwindcss@3.4.1/node_modules/@tailwindcss/aspect-ratio \ No newline at end of file diff --git a/node_modules/@tailwindcss/forms b/node_modules/@tailwindcss/forms new file mode 120000 index 0000000..e619ce6 --- /dev/null +++ b/node_modules/@tailwindcss/forms @@ -0,0 +1 @@ +../.pnpm/@tailwindcss+forms@0.5.7_tailwindcss@3.4.1/node_modules/@tailwindcss/forms \ No newline at end of file diff --git a/node_modules/@tailwindcss/typography b/node_modules/@tailwindcss/typography new file mode 120000 index 0000000..c6027a7 --- /dev/null +++ b/node_modules/@tailwindcss/typography @@ -0,0 +1 @@ +../.pnpm/@tailwindcss+typography@0.5.10_tailwindcss@3.4.1/node_modules/@tailwindcss/typography \ No newline at end of file diff --git a/package.json b/package.json index b0785ce..adeae79 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,9 @@ "author": "", "license": "ISC", "devDependencies": { + "@tailwindcss/aspect-ratio": "^0.4.2", + "@tailwindcss/forms": "^0.5.7", + "@tailwindcss/typography": "^0.5.10", "prettier": "^3.2.5", "prettier-plugin-tailwindcss": "^0.5.11", "tailwindcss": "^3.4.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca95d26..f34154d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,15 @@ settings: excludeLinksFromLockfile: false devDependencies: + '@tailwindcss/aspect-ratio': + specifier: ^0.4.2 + version: 0.4.2(tailwindcss@3.4.1) + '@tailwindcss/forms': + specifier: ^0.5.7 + version: 0.5.7(tailwindcss@3.4.1) + '@tailwindcss/typography': + specifier: ^0.5.10 + version: 0.5.10(tailwindcss@3.4.1) prettier: specifier: ^3.2.5 version: 3.2.5 @@ -92,6 +101,35 @@ packages: dev: true optional: true + /@tailwindcss/aspect-ratio@0.4.2(tailwindcss@3.4.1): + resolution: {integrity: sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==} + peerDependencies: + tailwindcss: '>=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1' + dependencies: + tailwindcss: 3.4.1 + dev: true + + /@tailwindcss/forms@0.5.7(tailwindcss@3.4.1): + resolution: {integrity: sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==} + peerDependencies: + tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1' + dependencies: + mini-svg-data-uri: 1.4.4 + tailwindcss: 3.4.1 + dev: true + + /@tailwindcss/typography@0.5.10(tailwindcss@3.4.1): + resolution: {integrity: sha512-Pe8BuPJQJd3FfRnm6H0ulKIGoMEQS+Vq01R6M5aCrFB/ccR/shT+0kXLjouGC1gFLm9hopTFN+DMP0pfwRWzPw==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + dependencies: + lodash.castarray: 4.4.0 + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + postcss-selector-parser: 6.0.10 + tailwindcss: 3.4.1 + dev: true + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -367,6 +405,18 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true + /lodash.castarray@4.4.0: + resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==} + dev: true + + /lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + dev: true + + /lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + /lru-cache@10.2.0: resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} engines: {node: 14 || >=16.14} @@ -385,6 +435,11 @@ packages: picomatch: 2.3.1 dev: true + /mini-svg-data-uri@1.4.4: + resolution: {integrity: sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==} + hasBin: true + dev: true + /minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} @@ -511,6 +566,14 @@ packages: postcss-selector-parser: 6.0.15 dev: true + /postcss-selector-parser@6.0.10: + resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: true + /postcss-selector-parser@6.0.15: resolution: {integrity: sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==} engines: {node: '>=4'} diff --git a/src/main.rs b/src/main.rs index 7a2f81b..0c2c20e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,10 @@ async fn main() { // build our application with a single route let app = Router::new() .route("/", get(root)) - .nest_service("/assets", ServeDir::new(format!("{}/assets", assets_path.to_str().unwrap())),); + .route("/blog", get(blog)) + .route("/resume", get(resume)) + .route("/projects", get(projects)) + .nest_service("/assets", ServeDir::new(format!("{}/assets", assets_path.to_str().unwrap())),); // run our app with hyper, listening globally on port 3000 let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); axum::serve(listener, app).await.unwrap(); @@ -34,11 +37,35 @@ async fn root() -> impl IntoResponse { let template = HelloTemplate {}; HtmlTemplate(template) } +async fn blog() -> impl IntoResponse { + let template = BlogTemplate {}; + HtmlTemplate(template) +} +async fn resume() -> impl IntoResponse { + let template = ResumeTemplate {}; + HtmlTemplate(template) +} +async fn projects() -> impl IntoResponse { + let template = ProjectsTemplate {}; + HtmlTemplate(template) +} #[derive(Template)] #[template(path = "index.html")] struct HelloTemplate; +#[derive(Template)] +#[template(path = "blog.html")] +struct BlogTemplate; + +#[derive(Template)] +#[template(path = "resume.html")] +struct ResumeTemplate; + +#[derive(Template)] +#[template(path = "projects.html")] +struct ProjectsTemplate; + /// A wrapper type that we'll use to encapsulate HTML parsed by askama into valid HTML for axum to serve. struct HtmlTemplate(T); diff --git a/tailwind.config.js b/tailwind.config.js index 49681f7..5147982 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,9 @@ /** @type {import('tailwindcss').Config} */ module.exports = { content: ['./templates/*.html'], + plugins: [ + require('@tailwindcss/forms'), + require('@tailwindcss/typography'), + require('@tailwindcss/aspect-ratio'), + ] }; \ No newline at end of file diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..9fb0bd0 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,74 @@ + + + + Steven Carpenters Portfolio + + + + + + + {% block content %}{% endblock %} + \ No newline at end of file diff --git a/templates/blog.html b/templates/blog.html new file mode 100644 index 0000000..d72b3ed --- /dev/null +++ b/templates/blog.html @@ -0,0 +1,6 @@ + +{% extends "base.html" %} + +{% block content %} +

HI

+{% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index f2927e1..57c8edf 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,28 +1,27 @@ - + +{% extends "base.html" %} - - Steven Carpenters Portfolio - - +{% block title %}Hello!{% endblock %} - - -

Welcome my boy!

-

My name is Steven Carpenter, and I am 25 years old. Since 2011, I have been immersed in the world of coding, - driven by a passion to enhance the ease and security of our daily computer use for everyone. My primary programming +{% block content %} +

+

Hacker.

+

Maker.

+

Developer.

+ +

My name is Steven Carpenter, and I am 24 years old. Since 2011, I have been immersed in + software developemnt, + driven by a passion to enhance the ease and security of daily computer use for everyone. My primary programming language is Rust, but I also have experience in seven other languages, including Go and JavaScript.

-

I aim to update my blog at least twice a week, typically on Tuesdays and Thursdays. Additionally, you might see +
+

I aim to update my blog at least twice a week, typically on Tuesdays and Thursdays. + Additionally, you might see extra posts coinciding with major updates to my projects or significant news in the tech industry. If you wish to get in touch, please email me at steven.carpenter@skdevstudios.com, using 'Portfolio Contact' as the subject.

-

I've chosen to create my own website for this venture instead of relying on traditional blogging platforms or +
+

I've chosen to create my own website for this venture instead of relying on traditional + blogging platforms or social media because I view those as channels primarily for discoverability. In contrast, this website represents my own space on the web—a space I own, moderate, and host. This independence ensures that my content remains unaffected by the profit-driven algorithms of other platforms.

- \ No newline at end of file + {% endblock %} \ No newline at end of file diff --git a/templates/projects.html b/templates/projects.html new file mode 100644 index 0000000..a285239 --- /dev/null +++ b/templates/projects.html @@ -0,0 +1,5 @@ + +{% extends "base.html" %} + +{% block content %} +{% endblock %} \ No newline at end of file diff --git a/templates/resume.html b/templates/resume.html new file mode 100644 index 0000000..d72b3ed --- /dev/null +++ b/templates/resume.html @@ -0,0 +1,6 @@ + +{% extends "base.html" %} + +{% block content %} +

HI

+{% endblock %} \ No newline at end of file