Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@no-gravity-elements/typography

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@no-gravity-elements/typography - npm Package Compare versions

Comparing version 1.0.21 to 1.0.22

3

lib/index.js

@@ -1,3 +0,2 @@

var q=`
.h1{font-size:calc(var(--nge-base-unit, 8px)*8);line-height:calc(var(--nge-base-unit, 8px)*8);font-weight:900}.h1,.h2,.h3{text-transform:var(--nge-typography-text-transform, uppercase)}.h2{font-size:calc(var(--nge-base-unit, 8px)*6);line-height:calc(var(--nge-base-unit, 8px)*6);font-weight:900}.h3{font-size:calc(var(--nge-base-unit, 8px)*4);line-height:calc(var(--nge-base-unit, 8px)*4.5);font-weight:800}.h4,.h5{line-height:calc(var(--nge-base-unit, 8px)*4)}.h4{font-size:calc(var(--nge-base-unit, 8px)*3);font-weight:800;text-transform:var(--nge-typography-text-transform, uppercase)}.h5{font-size:calc(var(--nge-base-unit, 8px)*2.5);font-weight:500}.h6{font-size:calc(var(--nge-base-unit, 8px)*2);line-height:calc(var(--nge-base-unit, 8px)*3)}.h6,.h7{font-weight:500}.h7,.sp{font-size:calc(var(--nge-base-unit, 8px)*1.5);line-height:calc(var(--nge-base-unit, 8px)*2.25)}.lp,.p,.sp{font-weight:200}.p{font-size:calc(var(--nge-base-unit, 8px)*2);line-height:calc(var(--nge-base-unit, 8px)*3)}.lp{font-size:calc(var(--nge-base-unit, 8px)*2.5);line-height:calc(var(--nge-base-unit, 8px)*4)}.legal{font-size:calc(var(--nge-base-unit, 8px)*1.125);line-height:calc(var(--nge-base-unit, 8px)*1.5);font-weight:500}.button{font-size:calc(var(--nge-base-unit, 8px)*1.75);line-height:calc(var(--nge-base-unit, 8px)*2);font-weight:500}:host{color:var(--color, var(--nge-primary-color, #fafafa));font-family:"Noto Sans",sans-serif;font-optical-sizing:auto;font-style:normal;font-variation-settings:"wdth"100}:host>*{margin:0}`;var A,d,Z,ue,k,J,I,fe,T={},z=[],he=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function x(e,t){for(var n in t)e[n]=t[n];return e}function ee(e){var t=e.parentNode;t&&t.removeChild(e)}function y(e,t,n){var _,l,r,i={};for(r in t)r=="key"?_=t[r]:r=="ref"?l=t[r]:i[r]=t[r];if(arguments.length>2&&(i.children=arguments.length>3?A.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)i[r]===void 0&&(i[r]=e.defaultProps[r]);return E(e,i,_,l,null)}function E(e,t,n,_,l){var r={type:e,props:t,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:l??++Z};return l==null&&d.vnode!=null&&d.vnode(r),r}function P(e){return e.children}function N(e,t){this.props=e,this.context=t}function L(e,t){if(t==null)return e.__?L(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?L(e):null}function te(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return te(e)}}function X(e){(!e.__d&&(e.__d=!0)&&k.push(e)&&!U.__r++||J!==d.debounceRendering)&&((J=d.debounceRendering)||I)(U)}function U(){var e,t,n,_,l,r,i,c;for(k.sort(function(p,f){return p.__v.__b-f.__v.__b});e=k.shift();)e.__d&&(t=k.length,_=void 0,l=void 0,i=(r=(n=e).__v).__e,(c=n.__P)&&(_=[],(l=x({},r)).__v=r.__v+1,F(c,r,l,n.__n,c.ownerSVGElement!==void 0,r.__h!=null?[i]:null,_,i??L(r),r.__h),le(_,r),r.__e!=i&&te(r)),k.length>t&&k.sort(function(p,f){return p.__v.__b-f.__v.__b}));U.__r=0}function ne(e,t,n,_,l,r,i,c,p,f){var o,h,s,a,u,C,g,m=_&&_.__k||z,b=m.length;for(n.__k=[],o=0;o<t.length;o++)if((a=n.__k[o]=(a=t[o])==null||typeof a=="boolean"?null:typeof a=="string"||typeof a=="number"||typeof a=="bigint"?E(null,a,null,null,a):Array.isArray(a)?E(P,{children:a},null,null,null):a.__b>0?E(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a)!=null){if(a.__=n,a.__b=n.__b+1,(s=m[o])===null||s&&a.key==s.key&&a.type===s.type)m[o]=void 0;else for(h=0;h<b;h++){if((s=m[h])&&a.key==s.key&&a.type===s.type){m[h]=void 0;break}s=null}F(e,a,s=s||T,l,r,i,c,p,f),u=a.__e,(h=a.ref)&&s.ref!=h&&(g||(g=[]),s.ref&&g.push(s.ref,null,a),g.push(h,a.__c||u,a)),u!=null?(C==null&&(C=u),typeof a.type=="function"&&a.__k===s.__k?a.__d=p=re(a,p,e):p=oe(e,a,s,m,u,p),typeof n.type=="function"&&(n.__d=p)):p&&s.__e==p&&p.parentNode!=e&&(p=L(s))}for(n.__e=C,o=b;o--;)m[o]!=null&&(typeof n.type=="function"&&m[o].__e!=null&&m[o].__e==n.__d&&(n.__d=_e(_).nextSibling),ae(m[o],m[o]));if(g)for(o=0;o<g.length;o++)ie(g[o],g[++o],g[++o])}function re(e,t,n){for(var _,l=e.__k,r=0;l&&r<l.length;r++)(_=l[r])&&(_.__=e,t=typeof _.type=="function"?re(_,t,n):oe(n,_,_,l,_.__e,t));return t}function oe(e,t,n,_,l,r){var i,c,p;if(t.__d!==void 0)i=t.__d,t.__d=void 0;else if(n==null||l!=r||l.parentNode==null)e:if(r==null||r.parentNode!==e)e.appendChild(l),i=null;else{for(c=r,p=0;(c=c.nextSibling)&&p<_.length;p+=1)if(c==l)break e;e.insertBefore(l,r),i=r}return i!==void 0?i:l.nextSibling}function _e(e){var t,n,_;if(e.type==null||typeof e.type=="string")return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(_=_e(n)))return _}return null}function de(e,t,n,_,l){var r;for(r in n)r==="children"||r==="key"||r in t||O(e,r,null,n[r],_);for(r in t)l&&typeof t[r]!="function"||r==="children"||r==="key"||r==="value"||r==="checked"||n[r]===t[r]||O(e,r,t[r],n[r],_)}function K(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||he.test(t)?n:n+"px"}function O(e,t,n,_,l){var r;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof _=="string"&&(e.style.cssText=_=""),_)for(t in _)n&&t in n||K(e.style,t,"");if(n)for(t in n)_&&n[t]===_[t]||K(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?_||e.addEventListener(t,r?Y:Q,r):e.removeEventListener(t,r?Y:Q,r);else if(t!=="dangerouslySetInnerHTML"){if(l)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t.indexOf("-")==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function Q(e){return this.l[e.type+!1](d.event?d.event(e):e)}function Y(e){return this.l[e.type+!0](d.event?d.event(e):e)}function F(e,t,n,_,l,r,i,c,p){var f,o,h,s,a,u,C,g,m,b,M,w,G,W,D,v=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(p=n.__h,c=t.__e=n.__e,t.__h=null,r=[c]),(f=d.__b)&&f(t);try{e:if(typeof v=="function"){if(g=t.props,m=(f=v.contextType)&&_[f.__c],b=f?m?m.props.value:f.__:_,n.__c?C=(o=t.__c=n.__c).__=o.__E:("prototype"in v&&v.prototype.render?t.__c=o=new v(g,b):(t.__c=o=new N(g,b),o.constructor=v,o.render=me),m&&m.sub(o),o.props=g,o.state||(o.state={}),o.context=b,o.__n=_,h=o.__d=!0,o.__h=[],o._sb=[]),o.__s==null&&(o.__s=o.state),v.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=x({},o.__s)),x(o.__s,v.getDerivedStateFromProps(g,o.__s))),s=o.props,a=o.state,o.__v=t,h)v.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else{if(v.getDerivedStateFromProps==null&&g!==s&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(g,b),!o.__e&&o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(g,o.__s,b)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(o.props=g,o.state=o.__s,o.__d=!1),o.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(H){H&&(H.__=t)}),M=0;M<o._sb.length;M++)o.__h.push(o._sb[M]);o._sb=[],o.__h.length&&i.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(g,o.__s,b),o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(s,a,u)})}if(o.context=b,o.props=g,o.__P=e,w=d.__r,G=0,"prototype"in v&&v.prototype.render){for(o.state=o.__s,o.__d=!1,w&&w(t),f=o.render(o.props,o.state,o.context),W=0;W<o._sb.length;W++)o.__h.push(o._sb[W]);o._sb=[]}else do o.__d=!1,w&&w(t),f=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++G<25);o.state=o.__s,o.getChildContext!=null&&(_=x(x({},_),o.getChildContext())),h||o.getSnapshotBeforeUpdate==null||(u=o.getSnapshotBeforeUpdate(s,a)),D=f!=null&&f.type===P&&f.key==null?f.props.children:f,ne(e,Array.isArray(D)?D:[D],t,n,_,l,r,i,c,p),o.base=t.__e,t.__h=null,o.__h.length&&i.push(o),C&&(o.__E=o.__=null),o.__e=!1}else r==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ge(n.__e,t,n,_,l,r,i,p);(f=d.diffed)&&f(t)}catch(H){t.__v=null,(p||r!=null)&&(t.__e=c,t.__h=!!p,r[r.indexOf(c)]=null),d.__e(H,t,n)}}function le(e,t){d.__c&&d.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(_){_.call(n)})}catch(_){d.__e(_,n.__v)}})}function ge(e,t,n,_,l,r,i,c){var p,f,o,h=n.props,s=t.props,a=t.type,u=0;if(a==="svg"&&(l=!0),r!=null){for(;u<r.length;u++)if((p=r[u])&&"setAttribute"in p==!!a&&(a?p.localName===a:p.nodeType===3)){e=p,r[u]=null;break}}if(e==null){if(a===null)return document.createTextNode(s);e=l?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a,s.is&&s),r=null,c=!1}if(a===null)h===s||c&&e.data===s||(e.data=s);else{if(r=r&&A.call(e.childNodes),f=(h=n.props||T).dangerouslySetInnerHTML,o=s.dangerouslySetInnerHTML,!c){if(r!=null)for(h={},u=0;u<e.attributes.length;u++)h[e.attributes[u].name]=e.attributes[u].value;(o||f)&&(o&&(f&&o.__html==f.__html||o.__html===e.innerHTML)||(e.innerHTML=o&&o.__html||""))}if(de(e,s,h,l,c),o)t.__k=[];else if(u=t.props.children,ne(e,Array.isArray(u)?u:[u],t,n,_,l&&a!=="foreignObject",r,i,r?r[0]:n.__k&&L(n,0),c),r!=null)for(u=r.length;u--;)r[u]!=null&&ee(r[u]);c||("value"in s&&(u=s.value)!==void 0&&(u!==e.value||a==="progress"&&!u||a==="option"&&u!==h.value)&&O(e,"value",u,h.value,!1),"checked"in s&&(u=s.checked)!==void 0&&u!==e.checked&&O(e,"checked",u,h.checked,!1))}return e}function ie(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(_){d.__e(_,n)}}function ae(e,t,n){var _,l;if(d.unmount&&d.unmount(e),(_=e.ref)&&(_.current&&_.current!==e.__e||ie(_,null,t)),(_=e.__c)!=null){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(r){d.__e(r,t)}_.base=_.__P=null,e.__c=void 0}if(_=e.__k)for(l=0;l<_.length;l++)_[l]&&ae(_[l],t,n||typeof e.type!="function");n||e.__e==null||ee(e.__e),e.__=e.__e=e.__d=void 0}function me(e,t,n){return this.constructor(e,n)}function R(e,t,n){var _,l,r;d.__&&d.__(e,t),l=(_=typeof n=="function")?null:n&&n.__k||t.__k,r=[],F(t,e=(!_&&n||t).__k=y(P,null,[e]),l||T,T,t.ownerSVGElement!==void 0,!_&&n?[n]:l?null:t.firstChild?A.call(t.childNodes):null,r,!_&&n?n:l?l.__e:t.firstChild,_),le(r,e)}function j(e,t){R(e,t,j)}function S(e,t,n){var _,l,r,i=x({},e.props);for(r in t)r=="key"?_=t[r]:r=="ref"?l=t[r]:i[r]=t[r];return arguments.length>2&&(i.children=arguments.length>3?A.call(arguments,2):n),E(e.type,i,_||e.key,l||e.ref,null)}A=z.slice,d={__e:function(e,t,n,_){for(var l,r,i;t=t.__;)if((l=t.__c)&&!l.__)try{if((r=l.constructor)&&r.getDerivedStateFromError!=null&&(l.setState(r.getDerivedStateFromError(e)),i=l.__d),l.componentDidCatch!=null&&(l.componentDidCatch(e,_||{}),i=l.__d),i)return l.__E=l}catch(c){e=c}throw e}},Z=0,ue=function(e){return e!=null&&e.constructor===void 0},N.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=x({},this.state),typeof e=="function"&&(e=e(x({},n),this.props)),e&&x(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),X(this))},N.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),X(this))},N.prototype.render=P,k=[],I=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,U.__r=0,fe=0;function V(){return(V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(e[_]=n[_])}return e}).apply(this,arguments)}function ve(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(_,l){if(_==null)return{};var r,i,c={},p=Object.keys(_);for(i=0;i<p.length;i++)l.indexOf(r=p[i])>=0||(c[r]=_[r]);return c}(e,["context","children"]);return S(t,n)}function ye(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=y(ve,V({},this._props,{context:e.detail.context}),function t(n,_){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var l=[],r={},i=0,c=n.attributes,p=n.childNodes;for(i=c.length;i--;)c[i].name!=="slot"&&(r[c[i].name]=c[i].value,r[ce(c[i].name)]=c[i].value);for(i=p.length;i--;){var f=t(p[i],null),o=p[i].slot;o?r[o]=y(se,{name:o},f):l[i]=f}var h=_?y(se,null,l):l;return y(_||n.nodeName.toLowerCase(),r,h)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?j:R)(this._vdom,this._root)}function ce(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function be(e,t,n){if(this._vdom){var _={};_[e]=n=n??void 0,_[ce(e)]=n,this._vdom=S(this._vdom,_),R(this._vdom,this._root)}}function xe(){R(this._vdom=null,this._root)}function se(e,t){var n=this;return y("slot",V({},e,{ref:function(_){_?(n.ref=_,n._listener||(n._listener=function(l){l.stopPropagation(),l.detail.context=t},_.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function pe(e,t,n,_){function l(){var r=Reflect.construct(HTMLElement,[],l);return r._vdomComponent=e,r._root=_&&_.shadow?r.attachShadow({mode:"open"}):r,r}return(l.prototype=Object.create(HTMLElement.prototype)).constructor=l,l.prototype.connectedCallback=ye,l.prototype.attributeChangedCallback=be,l.prototype.disconnectedCallback=xe,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),l.observedAttributes=n,n.forEach(function(r){Object.defineProperty(l.prototype,r,{get:function(){return this._vdom.props[r]},set:function(i){this._vdom?this.attributeChangedCallback(r,null,i):(this._props||(this._props={}),this._props[r]=i,this.connectedCallback());var c=typeof i;i!=null&&c!=="string"&&c!=="boolean"&&c!=="number"||this.setAttribute(r,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,l)}var $=(s=>(s.h1="h1",s.h2="h2",s.h3="h3",s.h4="h4",s.h5="h5",s.h6="h6",s.h7="h7",s.sp="sp",s.p="p",s.lp="lp",s.legal="legal",s.button="button",s))($||{});var B=({size:e,tag:t})=>{let n=t||"span";return y(P,null,(()=>y(n,{class:e&&$[e]||"p"},y("slot",null)))()," ",y("style",{type:"text/css"},q))};B.observedAttributes=["tag","size"];var ke=e=>customElements.get(e)!==void 0;ke("nge-typography")||pe(B,"nge-typography",B?.observedAttributes||[],{shadow:!0});
var K='.h1{font-size:calc(var(--nge-base-unit, 8px)*8);line-height:calc(var(--nge-base-unit, 8px)*8);font-weight:900}.h1,.h2,.h3{text-transform:var(--nge-typography-text-transform, uppercase)}.h2{font-size:calc(var(--nge-base-unit, 8px)*6);line-height:calc(var(--nge-base-unit, 8px)*6);font-weight:900}.h3{font-size:calc(var(--nge-base-unit, 8px)*4);line-height:calc(var(--nge-base-unit, 8px)*4.5);font-weight:800}.h4,.h5{line-height:calc(var(--nge-base-unit, 8px)*4)}.h4{font-size:calc(var(--nge-base-unit, 8px)*3);font-weight:800;text-transform:var(--nge-typography-text-transform, uppercase)}.h5{font-size:calc(var(--nge-base-unit, 8px)*2.5);font-weight:500}.h6{font-size:calc(var(--nge-base-unit, 8px)*2);line-height:calc(var(--nge-base-unit, 8px)*3)}.h6,.h7{font-weight:500}.h7,.sp{font-size:calc(var(--nge-base-unit, 8px)*1.5);line-height:calc(var(--nge-base-unit, 8px)*2.25)}.lp,.p,.sp{font-weight:200}.p{font-size:calc(var(--nge-base-unit, 8px)*2);line-height:calc(var(--nge-base-unit, 8px)*3)}.lp{font-size:calc(var(--nge-base-unit, 8px)*2.5);line-height:calc(var(--nge-base-unit, 8px)*4)}.legal{font-size:calc(var(--nge-base-unit, 8px)*1.125);line-height:calc(var(--nge-base-unit, 8px)*1.5);font-weight:500}.button{font-size:calc(var(--nge-base-unit, 8px)*1.75);line-height:calc(var(--nge-base-unit, 8px)*2);font-weight:500}:host{color:var(--color, var(--nge-primary-color, #fafafa));font-family:"Noto Sans",sans-serif;font-optical-sizing:auto;font-style:normal;font-variation-settings:"wdth"100}:host>*{margin:0}';var z,f,te,fe,w,Q,ne,W,he,D={},oe=[],de=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$=Array.isArray;function k(e,t){for(var n in t)e[n]=t[n];return e}function re(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var _,r,o,s={};for(o in t)o=="key"?_=t[o]:o=="ref"?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?z.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return S(e,s,_,r,null)}function S(e,t,n,_,r){var o={type:e,props:t,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++te,__i:-1,__u:0};return r==null&&f.vnode!=null&&f.vnode(o),o}function T(e){return e.children}function O(e,t){this.props=e,this.context=t}function P(e,t){if(t==null)return e.__?P(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?P(e):null}function _e(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return _e(e)}}function X(e){(!e.__d&&(e.__d=!0)&&w.push(e)&&!M.__r++||Q!==f.debounceRendering)&&((Q=f.debounceRendering)||ne)(M)}function M(){var e,t,n,_,r,o,s,l,c;for(w.sort(W);e=w.shift();)e.__d&&(t=w.length,_=void 0,o=(r=(n=e).__v).__e,l=[],c=[],(s=n.__P)&&((_=k({},r)).__v=r.__v+1,f.vnode&&f.vnode(_),I(s,_,r,n.__n,s.ownerSVGElement!==void 0,32&r.__u?[o]:null,l,o??P(r),!!(32&r.__u),c),_.__v=r.__v,_.__.__k[_.__i]=_,le(l,_,c),_.__e!=o&&_e(_)),w.length>t&&w.sort(W));M.__r=0}function ie(e,t,n,_,r,o,s,l,c,a,p){var i,v,u,d,x,g=_&&_.__k||oe,h=t.length;for(n.__d=c,ve(n,t,g),c=n.__d,i=0;i<h;i++)(u=n.__k[i])!=null&&typeof u!="boolean"&&typeof u!="function"&&(v=u.__i===-1?D:g[u.__i]||D,u.__i=i,I(e,u,v,r,o,s,l,c,a,p),d=u.__e,u.ref&&v.ref!=u.ref&&(v.ref&&R(v.ref,null,u),p.push(u.ref,u.__c||d,u)),x==null&&d!=null&&(x=d),65536&u.__u||v.__k===u.__k?(d||v.__e!=c||(c=P(v)),c=se(u,c,e)):typeof u.type=="function"&&u.__d!==void 0?c=u.__d:d&&(c=d.nextSibling),u.__d=void 0,u.__u&=-196609);n.__d=c,n.__e=x}function ve(e,t,n){var _,r,o,s,l,c=t.length,a=n.length,p=a,i=0;for(e.__k=[],_=0;_<c;_++)s=_+i,(r=e.__k[_]=(r=t[_])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?S(null,r,null,null,null):$(r)?S(T,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?S(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,l=ge(r,n,s,p),r.__i=l,o=null,l!==-1&&(p--,(o=n[l])&&(o.__u|=131072)),o==null||o.__v===null?(l==-1&&i--,typeof r.type!="function"&&(r.__u|=65536)):l!==s&&(l===s+1?i++:l>s?p>c-s?i+=l-s:i--:l<s?l==s-1&&(i=l-s):i=0,l!==_+i&&(r.__u|=65536))):(o=n[s])&&o.key==null&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=P(o)),j(o,o,!1),n[s]=null,p--);if(p)for(_=0;_<a;_++)(o=n[_])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=P(o)),j(o,o))}function se(e,t,n){var _,r;if(typeof e.type=="function"){for(_=e.__k,r=0;_&&r<_.length;r++)_[r]&&(_[r].__=e,t=se(_[r],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function ge(e,t,n,_){var r=e.key,o=e.type,s=n-1,l=n+1,c=t[n];if(c===null||c&&r==c.key&&o===c.type&&!(131072&c.__u))return n;if(_>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||l<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&r==c.key&&o===c.type)return s;s--}if(l<t.length){if((c=t[l])&&!(131072&c.__u)&&r==c.key&&o===c.type)return l;l++}}return-1}function Y(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||de.test(t)?n:n+"px"}function F(e,t,n,_,r){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof _=="string"&&(e.style.cssText=_=""),_)for(t in _)n&&t in n||Y(e.style,t,"");if(n)for(t in n)_&&n[t]===_[t]||Y(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?_?n.u=_.u:(n.u=Date.now(),e.addEventListener(t,o?ee:Z,o)):e.removeEventListener(t,o?ee:Z,o);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Z(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(f.event?f.event(e):e)}}function ee(e){if(this.l)return this.l[e.type+!0](f.event?f.event(e):e)}function I(e,t,n,_,r,o,s,l,c,a){var p,i,v,u,d,x,g,h,y,C,N,E,J,U,H,m=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[l=t.__e=n.__e]),(p=f.__b)&&p(t);e:if(typeof m=="function")try{if(h=t.props,y=(p=m.contextType)&&_[p.__c],C=p?y?y.props.value:p.__:_,n.__c?g=(i=t.__c=n.__c).__=i.__E:("prototype"in m&&m.prototype.render?t.__c=i=new m(h,C):(t.__c=i=new O(h,C),i.constructor=m,i.render=me),y&&y.sub(i),i.props=h,i.state||(i.state={}),i.context=C,i.__n=_,v=i.__d=!0,i.__h=[],i._sb=[]),i.__s==null&&(i.__s=i.state),m.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=k({},i.__s)),k(i.__s,m.getDerivedStateFromProps(h,i.__s))),u=i.props,d=i.state,i.__v=t,v)m.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(m.getDerivedStateFromProps==null&&h!==u&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(h,C),!i.__e&&(i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(h,i.__s,C)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(i.props=h,i.state=i.__s,i.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),N=0;N<i._sb.length;N++)i.__h.push(i._sb[N]);i._sb=[],i.__h.length&&s.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(h,i.__s,C),i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(u,d,x)})}if(i.context=C,i.props=h,i.__P=e,i.__e=!1,E=f.__r,J=0,"prototype"in m&&m.prototype.render){for(i.state=i.__s,i.__d=!1,E&&E(t),p=i.render(i.props,i.state,i.context),U=0;U<i._sb.length;U++)i.__h.push(i._sb[U]);i._sb=[]}else do i.__d=!1,E&&E(t),p=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++J<25);i.state=i.__s,i.getChildContext!=null&&(_=k(k({},_),i.getChildContext())),v||i.getSnapshotBeforeUpdate==null||(x=i.getSnapshotBeforeUpdate(u,d)),ie(e,$(H=p!=null&&p.type===T&&p.key==null?p.props.children:p)?H:[H],t,n,_,r,o,s,l,c,a),i.base=t.__e,t.__u&=-161,i.__h.length&&s.push(i),g&&(i.__E=i.__=null)}catch(A){t.__v=null,c||o!=null?(t.__e=l,t.__u|=c?160:32,o[o.indexOf(l)]=null):(t.__e=n.__e,t.__k=n.__k),f.__e(A,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ye(n.__e,t,n,_,r,o,s,c,a);(p=f.diffed)&&p(t)}function le(e,t,n){t.__d=void 0;for(var _=0;_<n.length;_++)R(n[_],n[++_],n[++_]);f.__c&&f.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(o){o.call(r)})}catch(o){f.__e(o,r.__v)}})}function ye(e,t,n,_,r,o,s,l,c){var a,p,i,v,u,d,x,g=n.props,h=t.props,y=t.type;if(y==="svg"&&(r=!0),o!=null){for(a=0;a<o.length;a++)if((u=o[a])&&"setAttribute"in u==!!y&&(y?u.localName===y:u.nodeType===3)){e=u,o[a]=null;break}}if(e==null){if(y===null)return document.createTextNode(h);e=r?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,h.is&&h),o=null,l=!1}if(y===null)g===h||l&&e.data===h||(e.data=h);else{if(o=o&&z.call(e.childNodes),g=n.props||D,!l&&o!=null)for(g={},a=0;a<e.attributes.length;a++)g[(u=e.attributes[a]).name]=u.value;for(a in g)u=g[a],a=="children"||(a=="dangerouslySetInnerHTML"?i=u:a==="key"||a in h||F(e,a,null,u,r));for(a in h)u=h[a],a=="children"?v=u:a=="dangerouslySetInnerHTML"?p=u:a=="value"?d=u:a=="checked"?x=u:a==="key"||l&&typeof u!="function"||g[a]===u||F(e,a,u,g[a],r);if(p)l||i&&(p.__html===i.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(i&&(e.innerHTML=""),ie(e,$(v)?v:[v],t,n,_,r&&y!=="foreignObject",o,s,o?o[0]:n.__k&&P(n,0),l,c),o!=null)for(a=o.length;a--;)o[a]!=null&&re(o[a]);l||(a="value",d!==void 0&&(d!==e[a]||y==="progress"&&!d||y==="option"&&d!==g[a])&&F(e,a,d,g[a],!1),a="checked",x!==void 0&&x!==e[a]&&F(e,a,x,g[a],!1))}return e}function R(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(_){f.__e(_,n)}}function j(e,t,n){var _,r;if(f.unmount&&f.unmount(e),(_=e.ref)&&(_.current&&_.current!==e.__e||R(_,null,t)),(_=e.__c)!=null){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(o){f.__e(o,t)}_.base=_.__P=null,e.__c=void 0}if(_=e.__k)for(r=0;r<_.length;r++)_[r]&&j(_[r],t,n||typeof e.type!="function");n||e.__e==null||re(e.__e),e.__=e.__e=e.__d=void 0}function me(e,t,n){return this.constructor(e,n)}function L(e,t,n){var _,r,o,s;f.__&&f.__(e,t),r=(_=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],I(t,e=(!_&&n||t).__k=b(T,null,[e]),r||D,D,t.ownerSVGElement!==void 0,!_&&n?[n]:r?null:t.firstChild?z.call(t.childNodes):null,o,!_&&n?n:r?r.__e:t.firstChild,_,s),le(o,e,s)}function B(e,t){L(e,t,B)}function V(e,t,n){var _,r,o,s,l=k({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?_=t[o]:o=="ref"?r=t[o]:l[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(l.children=arguments.length>3?z.call(arguments,2):n),S(e.type,l,_||e.key,r||e.ref,null)}z=oe.slice,f={__e:function(e,t,n,_){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&o.getDerivedStateFromError!=null&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,_||{}),s=r.__d),s)return r.__E=r}catch(l){e=l}throw e}},te=0,fe=function(e){return e!=null&&e.constructor==null},O.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=k({},this.state),typeof e=="function"&&(e=e(k({},n),this.props)),e&&k(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),X(this))},O.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),X(this))},O.prototype.render=T,w=[],ne=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,W=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,he=0;function G(){return(G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(e[_]=n[_])}return e}).apply(this,arguments)}var be=["context","children"];function xe(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(_,r){if(_==null)return{};var o,s,l={},c=Object.keys(_);for(s=0;s<c.length;s++)r.indexOf(o=c[s])>=0||(l[o]=_[o]);return l}(e,be);return V(t,n)}function ke(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=b(xe,G({},this._props,{context:e.detail.context}),function t(n,_){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var r=[],o={},s=0,l=n.attributes,c=n.childNodes;for(s=l.length;s--;)l[s].name!=="slot"&&(o[l[s].name]=l[s].value,o[ce(l[s].name)]=l[s].value);for(s=c.length;s--;){var a=t(c[s],null),p=c[s].slot;p?o[p]=b(ae,{name:p},a):r[s]=a}var i=_?b(ae,null,r):r;return b(_||n.nodeName.toLowerCase(),o,i)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?B:L)(this._vdom,this._root)}function ce(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ce(e,t,n){if(this._vdom){var _={};_[e]=n=n??void 0,_[ce(e)]=n,this._vdom=V(this._vdom,_),L(this._vdom,this._root)}}function we(){L(this._vdom=null,this._root)}function ae(e,t){var n=this;return b("slot",G({},e,{ref:function(_){_?(n.ref=_,n._listener||(n._listener=function(r){r.stopPropagation(),r.detail.context=t},_.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function ue(e,t,n,_){function r(){var o=Reflect.construct(HTMLElement,[],r);return o._vdomComponent=e,o._root=_&&_.shadow?o.attachShadow({mode:_.mode||"open"}):o,o}return(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=ke,r.prototype.attributeChangedCallback=Ce,r.prototype.disconnectedCallback=we,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),r.observedAttributes=n,n.forEach(function(o){Object.defineProperty(r.prototype,o,{get:function(){return this._vdom.props[o]},set:function(s){this._vdom?this.attributeChangedCallback(o,null,s):(this._props||(this._props={}),this._props[o]=s,this.connectedCallback());var l=typeof s;s!=null&&l!=="string"&&l!=="boolean"&&l!=="number"||this.setAttribute(o,s)}})}),customElements.define(t||e.tagName||e.displayName||e.name,r)}import{TypographySizes as pe}from"@no-gravity-elements/types";var q=({size:e,tag:t})=>{let n=t||"span";return b(T,null,(()=>b(n,{class:e&&pe[e]||pe.p},b("slot",null)))()," ",b("style",{type:"text/css"},K))};q.observedAttributes=["tag","size"];var Pe=e=>customElements.get(e)!==void 0;Pe("nge-typography")||ue(q,"nge-typography",q?.observedAttributes||[],{shadow:!0});
//# sourceMappingURL=index.js.map
{
"name": "@no-gravity-elements/typography",
"version": "1.0.21",
"version": "1.0.22",
"description": "No Gravity Element",

@@ -29,3 +29,3 @@ "author": "No Gravity Company",

},
"gitHead": "4201e5cfb02274b466fd953a4809d1428a1c4baa"
"gitHead": "90125668b1bd5c90cf4efa266e018522c8198398"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc