@kaze-style/core
Advanced tools
Comparing version 0.15.0 to 0.16.0
@@ -1,1 +0,1 @@ | ||
"use strict";var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var a=(t,e)=>{for(var l in e)s(t,l,{get:e[l],enumerable:!0})},n=(t,e,l,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of m(e))!y.call(t,o)&&o!==l&&s(t,o,{get:()=>e[o],enumerable:!(r=i(e,o))||r.enumerable});return t};var b=t=>n(s({},"__esModule",{value:!0}),t);var S={};a(S,{__preGlobalStyle:()=>c});module.exports=b(S);var p=require("./createGlobalStyle");const c=(t,e,l,r)=>{const[o]=(0,p.createGlobalStyle)(t);e[0]===l&&e[1].push(...o)};0&&(module.exports={__preGlobalStyle}); | ||
"use strict";var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var n=(o,e)=>{for(var l in e)s(o,l,{get:e[l],enumerable:!0})},a=(o,e,l,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of m(e))!y.call(o,t)&&t!==l&&s(o,t,{get:()=>e[t],enumerable:!(r=i(e,t))||r.enumerable});return o};var b=o=>a(s({},"__esModule",{value:!0}),o);var d={};n(d,{__preGlobalStyle:()=>c});module.exports=b(d);var p=require("./resolveGlobalStyle");const c=(o,e,l,r)=>{const[t]=(0,p.resolveGlobalStyle)(o);e[0]===l&&e[1].push(...t)};0&&(module.exports={__preGlobalStyle}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var p=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var i=(s,e)=>{for(var r in e)p(s,r,{get:e[r],enumerable:!0})},u=(s,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!c.call(s,t)&&t!==r&&p(s,t,{get:()=>e[t],enumerable:!(o=n(e,t))||o.enumerable});return s};var K=s=>u(p({},"__esModule",{value:!0}),s);var C={};i(C,{__preStyle:()=>S});module.exports=K(C);var l=require("./createStyle");const S=(s,e,r,o)=>{const[t,m,y]=(0,l.createStyle)(s);return e[0]===r&&(e[1].push(...t),e[2].push([y,o])),m};0&&(module.exports={__preStyle}); | ||
"use strict";var l=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var c=(e,s)=>{for(var r in s)l(e,r,{get:s[r],enumerable:!0})},K=(e,s,r,o)=>{if(s&&typeof s=="object"||typeof s=="function")for(let t of a(s))!i.call(e,t)&&t!==r&&l(e,t,{get:()=>s[t],enumerable:!(o=n(s,t))||o.enumerable});return e};var u=e=>K(l({},"__esModule",{value:!0}),e);var C={};c(C,{__preStyle:()=>S});module.exports=u(C);var p=require("./resolveStyle");const S=(e,s,r,o)=>{const[t,m,y]=(0,p.resolveStyle)(e);return s[0]===r&&(s[1].push(...t),s[2].push([y,o])),m};0&&(module.exports={__preStyle}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(t,s)=>{for(var e in s)o(t,e,{get:s[e],enumerable:!0})},m=(t,s,e,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of n(s))!l.call(t,a)&&a!==e&&o(t,a,{get:()=>s[a],enumerable:!(r=i(s,a))||r.enumerable});return t};var p=t=>m(o({},"__esModule",{value:!0}),t);var N={};c(N,{ClassName:()=>C});module.exports=p(N);class C extends String{obj;str;other;constructor(s,e=[]){const r=[...Object.values(s),...e].join(" ");super(r),this.str=r,this.obj=s,this.other=e}}0&&(module.exports={ClassName}); | ||
"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var l=(t,s)=>{for(var e in s)i(t,e,{get:s[e],enumerable:!0})},g=(t,s,e,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of o(s))!p.call(t,a)&&a!==e&&i(t,a,{get:()=>s[a],enumerable:!(r=n(s,a))||r.enumerable});return t};var c=t=>g(i({},"__esModule",{value:!0}),t);var v={};l(v,{ClassName:()=>m});module.exports=c(v);class m extends String{r;v;o;constructor(s,e=[]){const r=[...Object.values(s),...e].join(" ");super(r),this.v=r,this.r=s,this.o=e}string=()=>this.v;static=()=>this.r;other=()=>this.o}0&&(module.exports={ClassName}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var i=(e,s)=>{for(var t in s)r(e,t,{get:s[t],enumerable:!0})},R=(e,s,t,o)=>{if(s&&typeof s=="object"||typeof s=="function")for(let l of c(s))!n.call(e,l)&&l!==t&&r(e,l,{get:()=>s[l],enumerable:!(o=a(s,l))||o.enumerable});return e};var b=e=>R(r({},"__esModule",{value:!0}),e);var f={};i(f,{createGlobalStyle:()=>C});module.exports=b(f);var p=require("./uniqueCssRules"),u=require("./utils/compileObjectCss");const C=e=>{const s=[],t=e;for(const o in t){const l=t[o],y=(0,u.compileObjectCss)(l,o);s.push(...y.map(m=>[m,"global"]))}return[(0,p.uniqueCssRules)(s)]};0&&(module.exports={createGlobalStyle}); | ||
"use strict";var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var l in e)s(t,l,{get:e[l],enumerable:!0})},f=(t,e,l,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of m(e))!n.call(t,o)&&o!==l&&s(t,o,{get:()=>e[o],enumerable:!(r=i(e,o))||r.enumerable});return t};var c=t=>f(s({},"__esModule",{value:!0}),t);var b={};p(b,{createGlobalStyle:()=>d});module.exports=c(b);var y=require("./resolveGlobalStyle"),a=require("./setCssRules");const d=t=>{const[e]=(0,y.resolveGlobalStyle)(t);typeof document<"u"&&(0,a.setCssRules)(e)};0&&(module.exports={createGlobalStyle}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var i=(e,s)=>{for(var l in s)a(e,l,{get:s[l],enumerable:!0})},K=(e,s,l,o)=>{if(s&&typeof s=="object"||typeof s=="function")for(let t of y(s))!u.call(e,t)&&t!==l&&a(e,t,{get:()=>s[t],enumerable:!(o=n(s,t))||o.enumerable});return e};var R=e=>K(a({},"__esModule",{value:!0}),e);var b={};i(b,{createStyle:()=>f});module.exports=R(b);var m=require("./ClassName"),c=require("./resolveStyle"),p=require("./uniqueCssRules");const f=e=>{const s={},l={},o=[];for(const t in e){const[r,C]=(0,c.resolveStyle)(e[t]);o.push(...C),s[t]=new m.ClassName(r),l[t]=r}return[(0,p.uniqueCssRules)(o),s,l]};0&&(module.exports={createStyle}); | ||
"use strict";var r=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(s,e)=>{for(var t in e)r(s,t,{get:e[t],enumerable:!0})},i=(s,e,t,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of n(e))!c.call(s,o)&&o!==t&&r(s,o,{get:()=>e[o],enumerable:!(l=y(e,o))||l.enumerable});return s};var a=s=>i(r({},"__esModule",{value:!0}),s);var K={};f(K,{createStyle:()=>u});module.exports=a(K);var m=require("./resolveStyle"),p=require("./setCssRules");const u=s=>{const[e,t]=(0,m.resolveStyle)(s);return typeof document<"u"&&(0,p.setCssRules)(e),t};0&&(module.exports={createStyle}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var x=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var l=(t,r,m,f)=>{if(r&&typeof r=="object"||typeof r=="function")for(let p of a(r))!y.call(t,p)&&p!==m&&x(t,p,{get:()=>r[p],enumerable:!(f=s(r,p))||f.enumerable});return t},o=(t,r,m)=>(l(t,r,"default"),m&&l(m,r,"default"));var S=t=>l(x({},"__esModule",{value:!0}),t);var e={};module.exports=S(e);o(e,require("./mergeStyle"),module.exports);o(e,require("./createStyle"),module.exports);o(e,require("./createGlobalStyle"),module.exports);o(e,require("./__style"),module.exports);o(e,require("./__globalStyle"),module.exports);o(e,require("./__preStyle"),module.exports);o(e,require("./__preGlobalStyle"),module.exports);o(e,require("./ClassName"),module.exports);o(e,require("./styleOrder"),module.exports);o(e,require("./sortCssRules"),module.exports);o(e,require("./uniqueCssRules"),module.exports);o(e,require("./setCssRuleObjects"),module.exports); | ||
"use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var f=(t,e,m,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of l(e))!y.call(t,p)&&p!==m&&s(t,p,{get:()=>e[p],enumerable:!(x=a(e,p))||x.enumerable});return t},r=(t,e,m)=>(f(t,e,"default"),m&&f(m,e,"default"));var C=t=>f(s({},"__esModule",{value:!0}),t);var o={};module.exports=C(o);r(o,require("./mergeStyle"),module.exports);r(o,require("./createStyle"),module.exports);r(o,require("./createGlobalStyle"),module.exports);r(o,require("./resolveStyle"),module.exports);r(o,require("./resolveGlobalStyle"),module.exports);r(o,require("./__style"),module.exports);r(o,require("./__globalStyle"),module.exports);r(o,require("./__preStyle"),module.exports);r(o,require("./__preGlobalStyle"),module.exports);r(o,require("./ClassName"),module.exports);r(o,require("./styleOrder"),module.exports);r(o,require("./sortCssRules"),module.exports);r(o,require("./uniqueCssRules"),module.exports);r(o,require("./setCssRules"),module.exports); |
@@ -1,1 +0,1 @@ | ||
"use strict";var n=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},C=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of l(e))!m.call(t,o)&&o!==r&&n(t,o,{get:()=>e[o],enumerable:!(s=f(e,o))||s.enumerable});return t};var g=t=>C(n({},"__esModule",{value:!0}),t);var j={};p(j,{mergeStyle:()=>b});module.exports=g(j);var a=require("./ClassName"),i=require("./utils/isObject");const b=(...t)=>{const e={},r=[];return t.forEach(s=>{typeof s=="string"?r.push(s):s instanceof a.ClassName?(r.push(...s.other),Object.assign(e,s.obj)):(0,i.isObject)(s)&&Object.assign(e,s)}),new a.ClassName(e,r)};0&&(module.exports={mergeStyle}); | ||
"use strict";var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},C=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of f(e))!l.call(t,o)&&o!==r&&a(t,o,{get:()=>e[o],enumerable:!(s=m(e,o))||s.enumerable});return t};var c=t=>C(a({},"__esModule",{value:!0}),t);var d={};p(d,{mergeStyle:()=>g});module.exports=c(d);var i=require("./ClassName"),n=require("./utils/isObject");const g=(...t)=>{const e={},r=[];return t.forEach(s=>{typeof s=="string"?r.push(s):s instanceof i.ClassName?(r.push(...s.other()),Object.assign(e,s.static())):(0,n.isObject)(s)&&Object.assign(e,s)}),new i.ClassName(e,r)};0&&(module.exports={mergeStyle}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var l=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var K=(s,e)=>{for(var t in e)l(s,t,{get:e[t],enumerable:!0})},V=(s,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of g(e))!k.call(s,o)&&o!==t&&l(s,o,{get:()=>e[o],enumerable:!(a=h(e,o))||a.enumerable});return s};var d=s=>V(l({},"__esModule",{value:!0}),s);var v={};K(v,{resolveStyle:()=>c});module.exports=d(v);var f=require("./styleOrder"),y=require("./utils/compileCss"),n=require("./utils/compileKeyFrameCss"),u=require("./utils/hashClassName"),S=require("./utils/hashSelector"),R=require("./utils/isCssValue"),C=require("./utils/isObject"),N=require("./utils/resolveSelectors"),b=require("./utils/styleDeclarationStringify");const c=(s,e=[[],""],t=[{},[]])=>{const a=t[0],o=t[1];for(const j in s){const m=j,r=s[m];if((0,R.isCssValue)(r)){const i=(0,u.hashClassName)(e,m,r),p=(0,S.hashSelector)(e,m);o.push([(0,y.compileCss)(`.${i}`,e,(0,b.styleDeclarationStringify)(m,r)),(0,f.getStyleOrder)(e)]),Object.assign(a,{[p]:i})}else if((0,C.isObject)(r))if(m==="animationName"){const i=r,[p,O]=(0,n.compileKeyFrameCss)(i);o.push([O,"keyframes"]),Object.assign(a,{[p]:p}),c({animationName:p},e,t)}else c(r,(0,N.resolveSelectors)(e,m),t)}return t};0&&(module.exports={resolveStyle}); | ||
"use strict";var r=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var R=(t,e)=>{for(var o in e)r(t,o,{get:e[o],enumerable:!0})},K=(t,e,o,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of y(e))!f.call(t,s)&&s!==o&&r(t,s,{get:()=>e[s],enumerable:!(l=u(e,s))||l.enumerable});return t};var S=t=>K(r({},"__esModule",{value:!0}),t);var h={};R(h,{resolveStyle:()=>N});module.exports=S(h);var c=require("./ClassName"),i=require("./compileAtomicCss"),p=require("./compileNotAtomicCss"),n=require("./uniqueCssRules"),C=require("./utils/hashStyle");const N=t=>{const e={},o={},l=[];for(const s in t)if(s.startsWith("$")){const[a,m]=(0,i.compileAtomicCss)(t[s]);l.push(...a),e[s]=new c.ClassName(m),o[s]=m}else{const a=`${(0,C.hashStyle)(t[s])}`,[m]=(0,p.compileNotAtomicCss)(t[s],"notAtomic",`.${a}`);l.push(...m),e[s]=a,o[s]=a}return[(0,n.uniqueCssRules)(l),e,o]};0&&(module.exports={resolveStyle}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var l=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var i in e)l(r,i,{get:e[i],enumerable:!0})},d=(r,e,i,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of u(e))!n.call(r,s)&&s!==i&&l(r,s,{get:()=>e[s],enumerable:!(t=o(e,s))||t.enumerable});return r};var f=r=>d(l({},"__esModule",{value:!0}),r);var y={};c(y,{getStyleOrder:()=>m,styleOrder:()=>a});module.exports=f(y);const a=["global","normal","link","visited","focusWithin","focus","focusVisible","hover","active","keyframes","atRules","media"],m=([r,e])=>r.length!==0?r.some(i=>i.includes("@media"))?"media":"atRules":e.includes(":active")?"active":e.includes(":hover")?"hover":e.includes(":focus-visible")?"focusVisible":e.includes(":focus")?"focus":e.includes(":focus-within")?"focusWithin":e.includes(":visited")?"visited":e.includes(":link")?"link":"normal";0&&(module.exports={getStyleOrder,styleOrder}); | ||
"use strict";var t=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var i in e)t(r,i,{get:e[i],enumerable:!0})},d=(r,e,i,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of u(e))!n.call(r,s)&&s!==i&&t(r,s,{get:()=>e[s],enumerable:!(l=o(e,s))||l.enumerable});return r};var f=r=>d(t({},"__esModule",{value:!0}),r);var y={};c(y,{getStyleOrder:()=>m,styleOrder:()=>a});module.exports=f(y);const a=["global","notAtomic","normal","link","visited","focusWithin","focus","focusVisible","hover","active","keyframes","atRules","media"],m=([r,e])=>r.length!==0?r.some(i=>i.includes("@media"))?"media":"atRules":e.includes(":active")?"active":e.includes(":hover")?"hover":e.includes(":focus-visible")?"focusVisible":e.includes(":focus")?"focus":e.includes(":focus-within")?"focusWithin":e.includes(":visited")?"visited":e.includes(":link")?"link":"normal";0&&(module.exports={getStyleOrder,styleOrder}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var o=(s,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!i.call(s,t)&&t!==a&&n(s,t,{get:()=>e[t],enumerable:!(r=l(e,t))||r.enumerable});return s};var m=s=>o(n({},"__esModule",{value:!0}),s);var C={};module.exports=m(C); | ||
"use strict";var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var p=(e,s,i,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let t of l(s))!o.call(e,t)&&t!==i&&a(e,t,{get:()=>s[t],enumerable:!(r=n(s,t))||r.enumerable});return e};var m=e=>p(a({},"__esModule",{value:!0}),e);var C={};module.exports=m(C); |
@@ -1,1 +0,1 @@ | ||
"use strict";var p=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var a=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!u.call(t,r)&&r!==i&&p(t,r,{get:()=>e[r],enumerable:!(s=o(e,r))||s.enumerable});return t};var m=t=>a(p({},"__esModule",{value:!0}),t);var n={};module.exports=m(n); | ||
"use strict";var p=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of a(e))!l.call(t,r)&&r!==o&&p(t,r,{get:()=>e[r],enumerable:!(s=i(e,r))||s.enumerable});return t};var n=t=>u(p({},"__esModule",{value:!0}),t);var m={};module.exports=n(m); |
@@ -1,1 +0,1 @@ | ||
"use strict";var s=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var p=(n,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of T(e))!y.call(n,t)&&t!==i&&s(n,t,{get:()=>e[t],enumerable:!(r=o(e,t))||r.enumerable});return n};var d=n=>p(s({},"__esModule",{value:!0}),n);var x={};module.exports=d(x); | ||
"use strict";var i=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var p=(n,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of o(e))!y.call(n,t)&&t!==s&&i(n,t,{get:()=>e[t],enumerable:!(r=T(e,t))||r.enumerable});return n};var d=n=>p(i({},"__esModule",{value:!0}),n);var x={};module.exports=d(x); |
@@ -1,1 +0,1 @@ | ||
"use strict";var c=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(r,e)=>{for(var o in e)c(r,o,{get:e[o],enumerable:!0})},m=(r,e,o,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of n(e))!p.call(r,t)&&t!==o&&c(r,t,{get:()=>e[t],enumerable:!(l=$(e,t))||l.enumerable});return r};var f=r=>m(c({},"__esModule",{value:!0}),r);var h={};g(h,{compileCss:()=>S});module.exports=f(h);const S=(r,[e,o],l)=>{let t="",s="";return o?t=`${o.replace(/&/g,`${r}`)}`:t=`${r}`,s=`${t}{${l}}`,e.length!==0&&e.forEach(i=>s=`${i}{${s}}`),s};0&&(module.exports={compileCss}); | ||
"use strict";var n=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(r,e)=>{for(var t in e)n(r,t,{get:e[t],enumerable:!0})},m=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of l(e))!p.call(r,o)&&o!==t&&n(r,o,{get:()=>e[o],enumerable:!(s=i(e,o))||s.enumerable});return r};var f=r=>m(n({},"__esModule",{value:!0}),r);var y={};g(y,{compileCss:()=>h});module.exports=f(y);const h=(r,[e,t],s)=>{let c=`${t?`${t.replace(/&/g,`${r}`)}`:`${r}`}{${s}}`;return e.length!==0&&e.forEach($=>c=`${$}{${c}}`),c};0&&(module.exports={compileCss}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var m=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var l=(s,e)=>{for(var r in e)m(s,r,{get:e[r],enumerable:!0})},u=(s,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of f(e))!y.call(s,t)&&t!==r&&m(s,t,{get:()=>e[t],enumerable:!(o=p(e,t))||o.enumerable});return s};var g=s=>u(m({},"__esModule",{value:!0}),s);var k={};l(k,{compileKeyFrameCss:()=>R});module.exports=g(k);var a=require("../hash"),c=require("./compileObjectCss");const R=s=>{const e=[];for(const n in s){const i=s[n];e.push(`${(0,c.compileObjectCss)(i||{},n).join("")}`)}const r=e.join(""),o=`_${(0,a.hash)(r)}`,t=`@keyframes ${o}{${r}}`;return[o,t]};0&&(module.exports={compileKeyFrameCss}); | ||
"use strict";var m=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var g=(s,e)=>{for(var t in e)m(s,t,{get:e[t],enumerable:!0})},k=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of u(e))!R.call(s,o)&&o!==t&&m(s,o,{get:()=>e[o],enumerable:!(r=f(e,o))||r.enumerable});return s};var h=s=>k(m({},"__esModule",{value:!0}),s);var N={};g(N,{compileKeyFrameCss:()=>K});module.exports=h(N);var a=require("../compileNotAtomicCss"),c=require("../hash");const K=s=>{const e=[];for(const n in s){const l=s[n],[p]=(0,a.compileNotAtomicCss)(l||{},"normal",n),i=p.map(([y])=>y).join("");e.push(i)}const t=e.join(""),r=`_${(0,c.hash)(t)}`,o=`@keyframes ${r}{${t}}`;return[r,o]};0&&(module.exports={compileKeyFrameCss}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var a=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},i=(t,e,r,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of o(e))!c.call(t,l)&&l!==r&&n(t,l,{get:()=>e[l],enumerable:!(m=d(e,l))||m.enumerable});return t};var E=t=>i(n({},"__esModule",{value:!0}),t);var S={};a(S,{getStyleElements:()=>p});module.exports=E(S);var y=require("../styleOrder");const s={},p=()=>(s[y.styleOrder[0]]===void 0&&y.styleOrder.forEach(t=>{const e=document.createElement("style");e.r=[],e.id=`kaze-${t}`,document.head.appendChild(e),Object.assign(s,{[t]:e})}),s);0&&(module.exports={getStyleElements}); | ||
"use strict";var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})},a=(t,e,n,y)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of o(e))!c.call(t,l)&&l!==n&&r(t,l,{get:()=>e[l],enumerable:!(y=d(e,l))||y.enumerable});return t};var i=t=>a(r({},"__esModule",{value:!0}),t);var S={};E(S,{getStyleElements:()=>p});module.exports=i(S);var m=require("../styleOrder");const s={},p=()=>(s[m.styleOrder[0]]===void 0&&m.styleOrder.forEach(t=>{const e=document.createElement("style");e.r=[],e.id=`kaze-${t}`,document.head.appendChild(e),Object.assign(s,{[t]:e})}),s);0&&(module.exports={getStyleElements}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var m=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var y=(t,r)=>{for(var s in r)m(t,s,{get:r[s],enumerable:!0})},f=(t,r,s,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of p(r))!l.call(t,e)&&e!==s&&m(t,e,{get:()=>r[e],enumerable:!(o=n(r,e))||o.enumerable});return t};var u=t=>f(m({},"__esModule",{value:!0}),t);var c={};y(c,{hashClassName:()=>$});module.exports=u(c);var i=require("../hash"),a=require("./styleValueStringify");const $=([t,r],s,o)=>`_${(0,i.hash)(`${t.join("")}${r}${s}${(0,a.styleValueStringify)(o)}`)}`;0&&(module.exports={hashClassName}); | ||
"use strict";var m=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var l=(t,r)=>{for(var s in r)m(t,s,{get:r[s],enumerable:!0})},f=(t,r,s,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of a(r))!n.call(t,e)&&e!==s&&m(t,e,{get:()=>r[e],enumerable:!(o=y(r,e))||o.enumerable});return t};var c=t=>f(m({},"__esModule",{value:!0}),t);var u={};l(u,{hashClassName:()=>h});module.exports=c(u);var i=require("../hash"),p=require("./styleDeclarationStringify");const h=([t,r],s,o)=>`_${(0,i.hash)(`${t.join("")}${r}${(0,p.styleDeclarationStringify)(s,o)}`)}`;0&&(module.exports={hashClassName}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var y=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(r,s)=>{for(var t in s)y(r,t,{get:s[t],enumerable:!0})},i=(r,s,t,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(let e of A(s))!n.call(r,e)&&e!==t&&y(r,e,{get:()=>s[e],enumerable:!(a=o(s,e))||a.enumerable});return r};var m=r=>i(y({},"__esModule",{value:!0}),r);var C={};p(C,{isCssValue:()=>u});module.exports=m(C);const u=r=>typeof r=="string"||typeof r=="number"||Array.isArray(r);0&&(module.exports={isCssValue}); | ||
"use strict";var y=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var o=(r,s)=>{for(var t in s)y(r,t,{get:s[t],enumerable:!0})},i=(r,s,t,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(let e of p(s))!n.call(r,e)&&e!==t&&y(r,e,{get:()=>s[e],enumerable:!(a=A(s,e))||a.enumerable});return r};var u=r=>i(y({},"__esModule",{value:!0}),r);var m={};o(m,{isCssValue:()=>l});module.exports=u(m);const l=r=>typeof r=="string"||typeof r=="number"||Array.isArray(r);0&&(module.exports={isCssValue}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var y=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var l=(t,r)=>{for(var o in r)y(t,o,{get:r[o],enumerable:!0})},f=(t,r,o,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of n(r))!a.call(t,e)&&e!==o&&y(t,e,{get:()=>r[e],enumerable:!(i=m(r,e))||i.enumerable});return t};var u=t=>f(y({},"__esModule",{value:!0}),t);var c={};l(c,{styleDeclarationStringify:()=>A});module.exports=u(c);var p=require("./hyphenateProperty"),s=require("./styleValueStringify");const A=(t,r)=>`${(0,p.hyphenateProperty)(t)}:${(0,s.styleValueStringify)(r)};`;0&&(module.exports={styleDeclarationStringify}); | ||
"use strict";var e=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var m=(t,r)=>{for(var y in r)e(t,y,{get:r[y],enumerable:!0})},A=(t,r,y,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of n(r))!a.call(t,o)&&o!==y&&e(t,o,{get:()=>r[o],enumerable:!(i=s(r,o))||i.enumerable});return t};var f=t=>A(e({},"__esModule",{value:!0}),t);var d={};m(d,{styleDeclarationStringify:()=>c});module.exports=f(d);var p=require("./hyphenateProperty");const c=(t,r)=>`${(0,p.hyphenateProperty)(t)}:${Array.isArray(r)?r.join(" "):r};`;0&&(module.exports={styleDeclarationStringify}); |
@@ -1,1 +0,1 @@ | ||
import{createGlobalStyle as r}from"./createGlobalStyle.js";var i=(t,e,o,s)=>{let[l]=r(t);e[0]===o&&e[1].push(...l)};export{i as __preGlobalStyle}; | ||
import{resolveGlobalStyle as r}from"./resolveGlobalStyle.js";var i=(o,e,t,s)=>{let[l]=r(o);e[0]===t&&e[1].push(...l)};export{i as __preGlobalStyle}; |
@@ -1,1 +0,1 @@ | ||
import{createStyle as m}from"./createStyle.js";var n=(s,e,t,r)=>{let[o,p,l]=m(s);return e[0]===t&&(e[1].push(...o),e[2].push([l,r])),p};export{n as __preStyle}; | ||
import{resolveStyle as m}from"./resolveStyle.js";var n=(e,s,t,r)=>{let[o,l,p]=m(e);return s[0]===t&&(s[1].push(...o),s[2].push([p,r])),l};export{n as __preStyle}; |
@@ -1,1 +0,1 @@ | ||
var r=class extends String{obj;str;other;constructor(s,t=[]){let e=[...Object.values(s),...t].join(" ");super(e),this.str=e,this.obj=s,this.other=t}};export{r as ClassName}; | ||
var e=class extends String{r;v;o;constructor(s,t=[]){let r=[...Object.values(s),...t].join(" ");super(r),this.v=r,this.r=s,this.o=t}string=()=>this.v;static=()=>this.r;other=()=>this.o};export{e as ClassName}; |
@@ -1,1 +0,1 @@ | ||
import{uniqueCssRules as u}from"./uniqueCssRules.js";import{compileObjectCss as y}from"./utils/compileObjectCss.js";var c=l=>{let s=[],e=l;for(let t in e){let o=e[t],r=y(o,t);s.push(...r.map(p=>[p,"global"]))}return[u(s)]};export{c as createGlobalStyle}; | ||
import{resolveGlobalStyle as o}from"./resolveGlobalStyle.js";import{setCssRules as l}from"./setCssRules.js";var y=e=>{let[t]=o(e);typeof document<"u"&&l(t)};export{y as createGlobalStyle}; |
@@ -1,1 +0,1 @@ | ||
import{ClassName as m}from"./ClassName.js";import{resolveStyle as c}from"./resolveStyle.js";import{uniqueCssRules as p}from"./uniqueCssRules.js";var u=e=>{let t={},l={},o=[];for(let s in e){let[a,r]=c(e[s]);o.push(...r),t[s]=new m(a),l[s]=a}return[p(o),t,l]};export{u as createStyle}; | ||
import{resolveStyle as o}from"./resolveStyle.js";import{setCssRules as r}from"./setCssRules.js";var p=e=>{let[s,t]=o(e);return typeof document<"u"&&r(s),t};export{p as createStyle}; |
@@ -1,1 +0,1 @@ | ||
export*from"./mergeStyle.js";export*from"./createStyle.js";export*from"./createGlobalStyle.js";export*from"./__style.js";export*from"./__globalStyle.js";export*from"./__preStyle.js";export*from"./__preGlobalStyle.js";export*from"./ClassName.js";export*from"./styleOrder.js";export*from"./sortCssRules.js";export*from"./uniqueCssRules.js";export*from"./setCssRuleObjects.js"; | ||
export*from"./mergeStyle.js";export*from"./createStyle.js";export*from"./createGlobalStyle.js";export*from"./resolveStyle.js";export*from"./resolveGlobalStyle.js";export*from"./__style.js";export*from"./__globalStyle.js";export*from"./__preStyle.js";export*from"./__preGlobalStyle.js";export*from"./ClassName.js";export*from"./styleOrder.js";export*from"./sortCssRules.js";export*from"./uniqueCssRules.js";export*from"./setCssRules.js"; |
@@ -1,1 +0,1 @@ | ||
import{ClassName as r}from"./ClassName.js";import{isObject as n}from"./utils/isObject.js";var f=(...o)=>{let s={},t=[];return o.forEach(e=>{typeof e=="string"?t.push(e):e instanceof r?(t.push(...e.other),Object.assign(s,e.obj)):n(e)&&Object.assign(s,e)}),new r(s,t)};export{f as mergeStyle}; | ||
import{ClassName as r}from"./ClassName.js";import{isObject as a}from"./utils/isObject.js";var m=(...o)=>{let s={},t=[];return o.forEach(e=>{typeof e=="string"?t.push(e):e instanceof r?(t.push(...e.other()),Object.assign(s,e.static())):a(e)&&Object.assign(s,e)}),new r(s,t)};export{m as mergeStyle}; |
@@ -1,1 +0,1 @@ | ||
import{getStyleOrder as y}from"./styleOrder.js";import{compileCss as n}from"./utils/compileCss.js";import{compileKeyFrameCss as u}from"./utils/compileKeyFrameCss.js";import{hashClassName as S}from"./utils/hashClassName.js";import{hashSelector as R}from"./utils/hashSelector.js";import{isCssValue as C}from"./utils/isCssValue.js";import{isObject as N}from"./utils/isObject.js";import{resolveSelectors as b}from"./utils/resolveSelectors.js";import{styleDeclarationStringify as j}from"./utils/styleDeclarationStringify.js";var l=(a,e=[[],""],o=[{},[]])=>{let p=o[0],i=o[1];for(let c in a){let s=c,t=a[s];if(C(t)){let r=S(e,s,t),m=R(e,s);i.push([n(`.${r}`,e,j(s,t)),y(e)]),Object.assign(p,{[m]:r})}else if(N(t))if(s==="animationName"){let r=t,[m,f]=u(r);i.push([f,"keyframes"]),Object.assign(p,{[m]:m}),l({animationName:m},e,o)}else l(t,b(e,s),o)}return o};export{l as resolveStyle}; | ||
import{ClassName as r}from"./ClassName.js";import{compileAtomicCss as c}from"./compileAtomicCss.js";import{compileNotAtomicCss as i}from"./compileNotAtomicCss.js";import{uniqueCssRules as p}from"./uniqueCssRules.js";import{hashStyle as n}from"./utils/hashStyle.js";var K=t=>{let l={},a={},m=[];for(let s in t)if(s.startsWith("$")){let[e,o]=c(t[s]);m.push(...e),l[s]=new r(o),a[s]=o}else{let e=`${n(t[s])}`,[o]=i(t[s],"notAtomic",`.${e}`);m.push(...o),l[s]=e,a[s]=e}return[p(m),l,a]};export{K as resolveStyle}; |
@@ -1,1 +0,1 @@ | ||
var s=["global","normal","link","visited","focusWithin","focus","focusVisible","hover","active","keyframes","atRules","media"],l=([r,e])=>r.length!==0?r.some(i=>i.includes("@media"))?"media":"atRules":e.includes(":active")?"active":e.includes(":hover")?"hover":e.includes(":focus-visible")?"focusVisible":e.includes(":focus")?"focus":e.includes(":focus-within")?"focusWithin":e.includes(":visited")?"visited":e.includes(":link")?"link":"normal";export{l as getStyleOrder,s as styleOrder}; | ||
var s=["global","notAtomic","normal","link","visited","focusWithin","focus","focusVisible","hover","active","keyframes","atRules","media"],t=([r,e])=>r.length!==0?r.some(i=>i.includes("@media"))?"media":"atRules":e.includes(":active")?"active":e.includes(":hover")?"hover":e.includes(":focus-visible")?"focusVisible":e.includes(":focus")?"focus":e.includes(":focus-within")?"focusWithin":e.includes(":visited")?"visited":e.includes(":link")?"link":"normal";export{t as getStyleOrder,s as styleOrder}; |
@@ -1,1 +0,1 @@ | ||
var i=(t,[o,l],s)=>{let r="",e="";return l?r=`${l.replace(/&/g,`${t}`)}`:r=`${t}`,e=`${r}{${s}}`,o.length!==0&&o.forEach(c=>e=`${c}{${e}}`),e};export{i as compileCss}; | ||
var $=(r,[t,o],s)=>{let e=`${o?`${o.replace(/&/g,`${r}`)}`:`${r}`}{${s}}`;return t.length!==0&&t.forEach(c=>e=`${c}{${e}}`),e};export{$ as compileCss}; |
@@ -1,1 +0,1 @@ | ||
import{hash as a}from"../hash.js";import{compileObjectCss as c}from"./compileObjectCss.js";var f=e=>{let s=[];for(let o in e){let n=e[o];s.push(`${c(n||{},o).join("")}`)}let r=s.join(""),t=`_${a(r)}`,m=`@keyframes ${t}{${r}}`;return[t,m]};export{f as compileKeyFrameCss}; | ||
import{compileNotAtomicCss as p}from"../compileNotAtomicCss.js";import{hash as i}from"../hash.js";var u=e=>{let s=[];for(let r in e){let n=e[r],[a]=p(n||{},"normal",r),c=a.map(([l])=>l).join("");s.push(c)}let t=s.join(""),o=`_${i(t)}`,m=`@keyframes ${o}{${t}}`;return[o,m]};export{u as compileKeyFrameCss}; |
@@ -1,1 +0,1 @@ | ||
import{styleOrder as r}from"../styleOrder.js";var t={},s=()=>(t[r[0]]===void 0&&r.forEach(l=>{let e=document.createElement("style");e.r=[],e.id=`kaze-${l}`,document.head.appendChild(e),Object.assign(t,{[l]:e})}),t);export{s as getStyleElements}; | ||
import{styleOrder as n}from"../styleOrder.js";var t={},s=()=>(t[n[0]]===void 0&&n.forEach(l=>{let e=document.createElement("style");e.r=[],e.id=`kaze-${l}`,document.head.appendChild(e),Object.assign(t,{[l]:e})}),t);export{s as getStyleElements}; |
@@ -1,1 +0,1 @@ | ||
import{hash as o}from"../hash.js";import{styleValueStringify as m}from"./styleValueStringify.js";var n=([r,t],s,e)=>`_${o(`${r.join("")}${t}${s}${m(e)}`)}`;export{n as hashClassName}; | ||
import{hash as o}from"../hash.js";import{styleDeclarationStringify as m}from"./styleDeclarationStringify.js";var y=([r,t],s,e)=>`_${o(`${r.join("")}${t}${m(s,e)}`)}`;export{y as hashClassName}; |
@@ -1,1 +0,1 @@ | ||
import{hyphenateProperty as e}from"./hyphenateProperty.js";import{styleValueStringify as o}from"./styleValueStringify.js";var p=(r,t)=>`${e(r)}:${o(t)};`;export{p as styleDeclarationStringify}; | ||
import{hyphenateProperty as o}from"./hyphenateProperty.js";var e=(t,r)=>`${o(t)}:${Array.isArray(r)?r.join(" "):r};`;export{e as styleDeclarationStringify}; |
import type { ForBuild } from './types/common'; | ||
import type { KazeGlobalStyle } from './types/globalStyle'; | ||
export declare const __preGlobalStyle: <T extends string>(globalStyles: KazeGlobalStyle<T>, forBuild: ForBuild, filename: string, _index: number) => void; | ||
import type { KazeGlobalStyle } from './types/style'; | ||
export declare const __preGlobalStyle: <T extends string>(globalStyles: KazeGlobalStyle<T>, forBuild: ForBuild<string>, filename: string, _index: number) => void; |
import type { Classes, ForBuild } from './types/common'; | ||
import type { KazeStyle } from './types/style'; | ||
export declare const __preStyle: <K extends string>(styles: KazeStyle<K>, forBuild: ForBuild, filename: string, index: number) => Classes<K>; | ||
export declare const __preStyle: <K extends string>(styles: KazeStyle<K>, forBuild: ForBuild<K>, filename: string, index: number) => Classes<K>; |
export declare class ClassName extends String { | ||
obj: Record<string, string>; | ||
str: string; | ||
other: string[]; | ||
constructor(obj: ClassName['obj'], other?: ClassName['other']); | ||
private r; | ||
private v; | ||
private o; | ||
constructor(record: ClassName['r'], other?: ClassName['o']); | ||
string: () => string; | ||
static: () => Record<string, string>; | ||
other: () => string[]; | ||
} | ||
export type ClassNameType = ClassName & string; | ||
export type ClassNameObject = ClassName['obj']; | ||
export type ClassNameRecord = ClassName['r']; |
@@ -1,5 +0,2 @@ | ||
import type { CssRule } from './styleOrder'; | ||
import type { KazeGlobalStyle } from './types/globalStyle'; | ||
type Result = [cssRules: CssRule[]]; | ||
export declare const createGlobalStyle: <T extends string>(_styles: KazeGlobalStyle<T>) => Result; | ||
export {}; | ||
import type { KazeGlobalStyle } from './types/style'; | ||
export declare const createGlobalStyle: <T extends string>(globalStyles: KazeGlobalStyle<T>) => void; |
@@ -1,10 +0,3 @@ | ||
import type { CssRule } from './styleOrder'; | ||
import type { Classes, ObjectClasses } from './types/common'; | ||
import type { Classes } from './types/common'; | ||
import type { KazeStyle } from './types/style'; | ||
type Result<K extends string> = [ | ||
cssRules: CssRule[], | ||
classes: Classes<K>, | ||
objectClasses: ObjectClasses<K> | ||
]; | ||
export declare const createStyle: <K extends string>(styles: KazeStyle<K>) => Result<K>; | ||
export {}; | ||
export declare const createStyle: <K extends string>(styles: KazeStyle<K>) => Classes<K>; |
export * from './mergeStyle'; | ||
export * from './createStyle'; | ||
export * from './createGlobalStyle'; | ||
export * from './resolveStyle'; | ||
export * from './resolveGlobalStyle'; | ||
export * from './__style'; | ||
@@ -12,6 +14,5 @@ export * from './__globalStyle'; | ||
export * from './uniqueCssRules'; | ||
export * from './setCssRuleObjects'; | ||
export type { ClassNameObject, ClassNameType } from './ClassName'; | ||
export * from './setCssRules'; | ||
export type { ClassNameRecord, ClassNameType } from './ClassName'; | ||
export type { Classes, ClassNameOverride, ForBuild } from './types/common'; | ||
export type { KazeStyle, SupportStyle } from './types/style'; | ||
export type { KazeGlobalStyle, SupportGlobalStyle } from './types/globalStyle'; | ||
export type { KazeStyle, KazeGlobalStyle, SupportStyle } from './types/style'; |
@@ -1,5 +0,5 @@ | ||
import type { ClassNameObject, ClassNameType } from './ClassName'; | ||
import type { ClassNameRecord, ClassNameType } from './ClassName'; | ||
import { ClassName } from './ClassName'; | ||
type ClassNamesArgs = (string | false | undefined | null | ClassName | ClassNameObject)[]; | ||
type ClassNamesArgs = (string | false | undefined | null | ClassName | ClassNameRecord)[]; | ||
export declare const mergeStyle: (..._classNames: ClassNamesArgs) => ClassNameType; | ||
export {}; |
@@ -1,7 +0,10 @@ | ||
import type { ClassNameObject } from './ClassName'; | ||
import type { CssRule } from './styleOrder'; | ||
import type { Selectors } from './types/common'; | ||
import type { SupportStyle } from './types/style'; | ||
type ResolvedStyle = [object: ClassNameObject, cssRules: CssRule[]]; | ||
export declare const resolveStyle: (style: SupportStyle, selectors?: Selectors, resolvedStyle?: ResolvedStyle) => ResolvedStyle; | ||
import type { Classes, StaticClasses } from './types/common'; | ||
import type { KazeStyle } from './types/style'; | ||
type Result<K extends string> = [ | ||
cssRules: CssRule[], | ||
classes: Classes<K>, | ||
staticClasses: StaticClasses<K> | ||
]; | ||
export declare const resolveStyle: <K extends string>(styles: KazeStyle<K>) => Result<K>; | ||
export {}; |
import type { Selectors } from './types/common'; | ||
export declare const styleOrder: readonly ["global", "normal", "link", "visited", "focusWithin", "focus", "focusVisible", "hover", "active", "keyframes", "atRules", "media"]; | ||
export declare const styleOrder: readonly ["global", "notAtomic", "normal", "link", "visited", "focusWithin", "focus", "focusVisible", "hover", "active", "keyframes", "atRules", "media"]; | ||
export declare const getStyleOrder: ([atRules, nest]: Selectors) => StyleOrder; | ||
export type StyleOrder = typeof styleOrder[number]; | ||
export type CssRule = [value: string, order: StyleOrder]; |
@@ -1,16 +0,16 @@ | ||
import type { ClassNameObject, ClassNameType } from '../ClassName'; | ||
import type { ClassNameRecord, ClassNameType } from '../ClassName'; | ||
import type { CssRule } from '../styleOrder'; | ||
export type CssValue = string | number | undefined; | ||
export type NestChar = ':' | '&' | ' ' | '@' | ',' | '>' | '~' | '+' | '[' | '.' | '#'; | ||
export type Classes<K extends string> = Record<K, ClassNameType>; | ||
export type ObjectClasses<K extends string> = Record<K, ClassNameObject>; | ||
export type StringClasses<K extends string> = Record<K, string>; | ||
import type { FirstChar } from './utils'; | ||
export type Classes<T extends string> = { | ||
[P in T]: FirstChar<P> extends '$' ? ClassNameType : string; | ||
}; | ||
export type StaticClasses<T extends string> = Record<T, string | ClassNameRecord>; | ||
export type ClassNameOverride<T = unknown, K extends string = 'className'> = Omit<T, K> & { | ||
[_ in K]?: ClassNameObject | string; | ||
[_ in K]?: ClassNameRecord | string; | ||
}; | ||
export type Selectors = [atRules: string[], nest: string]; | ||
export type ForBuild = [ | ||
export type ForBuild<T extends string = string> = [ | ||
filename: string, | ||
cssRules: CssRule[], | ||
styles: [classes: ObjectClasses<string>, index: number][] | ||
styles: [classes: StaticClasses<T>, index: number][] | ||
]; |
@@ -1,25 +0,28 @@ | ||
import type { Pseudos, PropertiesFallback } from 'csstype'; | ||
import type { CssValue, NestChar } from './common'; | ||
import type { IncludeStr } from './utils'; | ||
type SupportRules = Omit<PropertiesFallback<CssValue>, 'animationName'>; | ||
import type { PropertiesFallback, AtRule, Pseudos, HtmlAttributes, SvgAttributes } from 'csstype'; | ||
import type { IncludeString } from './utils'; | ||
export type CssValue = string | number | undefined; | ||
type SelectorChar = ':' | '&' | ' ' | '@' | ',' | '>' | '~' | '+' | '[' | '.' | '#'; | ||
type PredictProperties = '@media (max-width: 0)' | '@media (min-width: 0)' | '@media (prefers-color-scheme: dark)' | '@media (prefers-color-scheme: light)' | '@layer utilities' | '@layer base' | '@supports ()' | '@supports not ()'; | ||
type PredictRules = { | ||
[_ in PredictProperties]?: SupportStyle; | ||
type SupportProperties = Omit<PropertiesFallback<CssValue>, 'animationName'> & { | ||
animationName?: string | string[] | KeyframesRules; | ||
}; | ||
type PseudosRules = { | ||
[_ in Pseudos]?: SupportStyle; | ||
type FontFaceRules = AtRule.FontFaceFallback<CssValue>; | ||
export type KeyframesRules = { | ||
[_ in 'from' | 'to']?: SupportProperties; | ||
} & { | ||
[_ in string]?: SupportProperties; | ||
}; | ||
type StringRules = { | ||
[_ in IncludeStr<NestChar>]?: SupportStyle; | ||
export type SupportStyle = SupportProperties & { | ||
[_ in PredictProperties | (Pseudos | `&${Pseudos}`) | (HtmlAttributes | SvgAttributes) | `&${HtmlAttributes | SvgAttributes}`]?: SupportStyle; | ||
} & { | ||
[_ in IncludeString<SelectorChar>]?: SupportStyle; | ||
}; | ||
type AnimationNameRules = { | ||
animationName?: KeyframesRules | string; | ||
}; | ||
export type KeyframesRules = { | ||
[_ in 'from' | 'to']?: SupportRules; | ||
export type KazeStyle<T extends string> = Record<T, SupportStyle>; | ||
export type KazeGlobalStyle<T extends string> = { | ||
'@font-face'?: FontFaceRules; | ||
} & { | ||
[_ in string]?: SupportRules; | ||
[K in T]: K extends '@font-face' ? FontFaceRules : SupportStyle; | ||
} & { | ||
[_ in (keyof HTMLElementTagNameMap | '*') | `${keyof HTMLElementTagNameMap | '*'}${Pseudos}`]?: SupportStyle; | ||
}; | ||
export type SupportStyle = SupportRules & PseudosRules & PredictRules & StringRules & AnimationNameRules; | ||
export type KazeStyle<T extends string> = Record<T, SupportStyle>; | ||
export {}; |
@@ -8,3 +8,4 @@ export type ValueOf<T> = T[keyof T]; | ||
type UnionToIntersection<U> = (U extends unknown ? (_: U) => void : never) extends (_: infer I) => void ? I : never; | ||
export type IncludeStr<T extends AndArray<string>> = T extends string ? `${string}${T}${string}` : UnionToIntersection<`${string}${T[number]}${string}`>; | ||
export type FirstChar<T> = T extends `${infer X}${infer _}` ? X : never; | ||
export type IncludeString<T extends AndArray<string>> = T extends string ? `${string}${T}${string}` : UnionToIntersection<`${string}${T[number]}${string}`>; | ||
export {}; |
import type { Selectors } from '../types/common'; | ||
export declare const compileCss: (selector: string, [atRules, nest]: Selectors, declaration: string) => string; | ||
export declare const compileCss: (_selector: string, [atRules, nest]: Selectors, declaration: string) => string; |
type StyleElement = HTMLStyleElement & { | ||
r: string[]; | ||
}; | ||
export declare const getStyleElements: () => Record<"link" | "global" | "normal" | "visited" | "focusWithin" | "focus" | "focusVisible" | "hover" | "active" | "keyframes" | "atRules" | "media", StyleElement>; | ||
export declare const getStyleElements: () => Record<"link" | "global" | "notAtomic" | "normal" | "visited" | "focusWithin" | "focus" | "focusVisible" | "hover" | "active" | "keyframes" | "atRules" | "media", StyleElement>; | ||
export {}; |
@@ -1,3 +0,4 @@ | ||
import type { CssValue, Selectors } from '../types/common'; | ||
import type { Selectors } from '../types/common'; | ||
import type { CssValue } from '../types/style'; | ||
import type { AndArray } from '../types/utils'; | ||
export declare const hashClassName: ([atRules, nest]: Selectors, property: string, styleValue: AndArray<CssValue>) => string; |
@@ -1,3 +0,3 @@ | ||
import type { CssValue } from '../types/common'; | ||
import type { CssValue } from '../types/style'; | ||
import type { AndArray, NestObj } from '../types/utils'; | ||
export declare const isCssValue: (styleValue: NestObj<AndArray<CssValue>> | AndArray<CssValue>) => styleValue is AndArray<CssValue>; |
@@ -1,3 +0,3 @@ | ||
import type { CssValue } from '../types/common'; | ||
import type { CssValue } from '../types/style'; | ||
import type { AndArray } from '../types/utils'; | ||
export declare const styleDeclarationStringify: (property: string, styleValue: AndArray<CssValue>) => string; |
{ | ||
"name": "@kaze-style/core", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Taishi Naritomi", |
@@ -14,7 +14,7 @@ <div> | ||
<br /> | ||
<p align="center">Kaze [風] zero-runtime CSS in JS for React<p> | ||
<p align="center">Kaze [風] zero-runtime CSS in JS<p> | ||
<p align="center"><b>🚧 under development 🚧</b></p> | ||
<div align="center"> | ||
<a href='https://www.npmjs.com/package/@kaze-style/react'> | ||
<img src='https://img.shields.io/npm/v/@kaze-style/react?style=for-the-badge'> | ||
<a href='https://www.npmjs.com/package/@kaze-style/core'> | ||
<img src='https://img.shields.io/npm/v/@kaze-style/core?style=for-the-badge'> | ||
</a> | ||
@@ -24,7 +24,7 @@ <a href='https://github.com/taishinaritomi/kaze-style/blob/main/LICENSE'> | ||
</a> | ||
<a href='https://bundlephobia.com/package/@kaze-style/react'> | ||
<img src='https://img.shields.io/bundlephobia/minzip/@kaze-style/react?style=for-the-badge'> | ||
<a href='https://bundlephobia.com/package/@kaze-style/core'> | ||
<img src='https://img.shields.io/bundlephobia/minzip/@kaze-style/core?style=for-the-badge'> | ||
</a> | ||
<a href='https://github.com/microsoft/typescript'> | ||
<img src='https://img.shields.io/npm/types/@kaze-style/react?style=for-the-badge'> | ||
<img src='https://img.shields.io/npm/types/@kaze-style/core?style=for-the-badge'> | ||
</a> | ||
@@ -37,6 +37,7 @@ </div> | ||
- **Build** - can choose when to extract css (build time & run time) | ||
- **Extract** - Can choose when to extract css is buildtime or runtime(RSC is buildtime only) | ||
- **Atomic** - Select atomic css with $ | ||
- **Merge** - Style merging ignoring css specificity (atomic css only) | ||
- **Minimal** - [0.3kb](https://shakerphobia.netlify.app/?imports=ClassName,mergeStyle,__globalStyle,__style&pkg=@kaze-style/core) runtime by buildtime extract | ||
- **TypeScript** - Type-safe styles via [csstype](https://github.com/frenic/csstype) | ||
- **Minimal** - [0.3kb](https://shakerphobia.netlify.app/?imports=ClassName,mergeStyle,__globalStyle,__style&pkg=@kaze-style/react) runtime by build time extract | ||
- **Merge** - Style merging ignoring css specificity | ||
- **Theme** - Consistent styling using "@kaze-style/themes" | ||
@@ -48,3 +49,3 @@ | ||
// App.style.ts | ||
import { createStyle, createGlobalStyle } from '@kaze-style/react'; | ||
import { createStyle, createGlobalStyle } from '@kaze-style/core'; | ||
@@ -57,11 +58,15 @@ createGlobalStyle({ | ||
export const style = createStyle({ | ||
export const classes = createStyle({ | ||
//Not Atomic CSS | ||
container: { | ||
margin: '20px', | ||
padding: '20px', | ||
}, | ||
base: { | ||
//Atomic CSS | ||
$base: { | ||
color: 'red', | ||
background: 'black', | ||
}, | ||
action: { | ||
//Atomic CSS | ||
$action: { | ||
color: 'blue', | ||
@@ -74,4 +79,4 @@ }, | ||
// App.tsx | ||
import { mergeStyle } from '@kaze-style/react'; | ||
import { style } from './App.style'; | ||
import { mergeStyle } from '@kaze-style/core'; | ||
import { classes } from './App.style'; | ||
@@ -81,3 +86,3 @@ export const App = ({ action }) => { | ||
<div className={style.container}> | ||
<p className={mergeStyle(style.base, action && style.action)}></p> | ||
<p className={mergeStyle(classes.$base, action && classes.$action)}></p> | ||
</div> | ||
@@ -88,3 +93,3 @@ ); | ||
### Setup Next.js(build time extract) | ||
### Setup Next.js(buildtime extract) | ||
@@ -91,0 +96,0 @@ ```ts |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
46678
108
328
117
21
1