@kaze-style/core
Advanced tools
Comparing version 0.13.0 to 0.14.0
@@ -1,1 +0,1 @@ | ||
"use strict";var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var g=(e,s)=>{for(var r in s)a(e,r,{get:s[r],enumerable:!0})},c=(e,s,r,i)=>{if(s&&typeof s=="object"||typeof s=="function")for(let t of o(s))!l.call(e,t)&&t!==r&&a(e,t,{get:()=>s[t],enumerable:!(i=n(s,t))||i.enumerable});return e};var m=e=>c(a({},"__esModule",{value:!0}),e);var C={};g(C,{ClassName:()=>u});module.exports=m(C);class u extends String{o;e;constructor(s,r=[]){super([...Object.values(s),...r].join(" ")),this.o=s,this.e=r}}0&&(module.exports={ClassName}); | ||
"use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var l=(t,s)=>{for(var e in s)o(t,e,{get:s[e],enumerable:!0})},g=(t,s,e,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of i(s))!n.call(t,r)&&r!==e&&o(t,r,{get:()=>s[r],enumerable:!(a=c(s,r))||a.enumerable});return t};var h=t=>g(o({},"__esModule",{value:!0}),t);var b={};l(b,{ClassName:()=>j});module.exports=h(b);class j extends String{object;other;constructor(s,e=[]){super([...Object.values(s),...e].join(" ")),this.object=s,this.other=e}}0&&(module.exports={ClassName}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var r=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var a=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 n(s))!a.call(e,l)&&l!==t&&r(e,l,{get:()=>s[l],enumerable:!(o=c(s,l))||o.enumerable});return e};var C=e=>R(r({},"__esModule",{value:!0}),e);var d={};i(d,{createGlobalStyle:()=>b});module.exports=C(d);var p=require("./uniqueCssRules"),u=require("./utils/compileObjectCss");const b=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,"g"]))}return[(0,p.uniqueCssRules)(s)]};0&&(module.exports={createGlobalStyle}); | ||
"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}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var o=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var l=(e,s)=>{for(var n in s)o(e,n,{get:s[n],enumerable:!0})},p=(e,s,n,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of a(s))!f.call(e,r)&&r!==n&&o(e,r,{get:()=>s[r],enumerable:!(t=g(s,r))||t.enumerable});return e};var u=e=>p(o({},"__esModule",{value:!0}),e);var m={};l(m,{mergeStyle:()=>C});module.exports=u(m);var i=require("./ClassName");const C=(...e)=>{const s={},n=[];return e.forEach(t=>{typeof t=="string"?n.push(t):t instanceof i.ClassName&&(n.push(...t.e),Object.assign(s,t.o))}),new i.ClassName(s,n)};0&&(module.exports={mergeStyle}); | ||
"use strict";var o=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var l=(e,s)=>{for(var t in s)o(e,t,{get:s[t],enumerable:!0})},p=(e,s,t,n)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of a(s))!f.call(e,r)&&r!==t&&o(e,r,{get:()=>s[r],enumerable:!(n=g(s,r))||n.enumerable});return e};var u=e=>p(o({},"__esModule",{value:!0}),e);var C={};l(C,{mergeStyle:()=>h});module.exports=u(C);var i=require("./ClassName");const h=(...e)=>{const s={},t=[];return e.forEach(n=>{typeof n=="string"?t.push(n):n instanceof i.ClassName&&(t.push(...n.other),Object.assign(s,n.object))}),new i.ClassName(s,t)};0&&(module.exports={mergeStyle}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var l=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var K=Object.prototype.hasOwnProperty;var V=(o,e)=>{for(var s in e)l(o,s,{get:e[s],enumerable:!0})},d=(o,e,s,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of g(e))!K.call(o,t)&&t!==s&&l(o,t,{get:()=>e[t],enumerable:!(a=O(e,t))||a.enumerable});return o};var v=o=>d(l({},"__esModule",{value:!0}),o);var x={};V(x,{resolveStyle:()=>c});module.exports=v(x);var f=require("./styleOrder"),y=require("./utils/compileCss"),u=require("./utils/compileKeyFrameCss"),S=require("./utils/hashClassName"),R=require("./utils/hashSelector"),C=require("./utils/isCssValue"),N=require("./utils/isObject"),h=require("./utils/resolveSelectors"),b=require("./utils/styleDeclarationStringify");const c=(o,e=[[],""],s=[{},[]])=>{const a=s[0],t=s[1];for(const j in o){const m=j,r=o[m],n="animationName";if((0,C.isCssValue)(r)){const i=(0,S.hashClassName)(e,m,r),p=(0,R.hashSelector)(e,m);t.push([(0,y.compileCss)(`.${i}`,e,(0,b.styleDeclarationStringify)(m,r)),(0,f.checkStyleOrder)(e)]),Object.assign(a,{[p]:i})}else if((0,N.isObject)(r))if(m===n){const i=r,[p,k]=(0,u.compileKeyFrameCss)(i);t.push([k,"k"]),Object.assign(a,{[p]:p}),c({[n]:p},e,s)}else c(r,(0,h.resolveSelectors)(e,m),s)}return s};0&&(module.exports={resolveStyle}); | ||
"use strict";var l=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var K=(s,e)=>{for(var o in e)l(s,o,{get:e[o],enumerable:!0})},V=(s,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of g(e))!k.call(s,t)&&t!==o&&l(s,t,{get:()=>e[t],enumerable:!(a=O(e,t))||a.enumerable});return s};var d=s=>V(l({},"__esModule",{value:!0}),s);var v={};K(v,{resolveStyle:()=>f});module.exports=d(v);var y=require("./styleOrder"),c=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 f=(s,e=[[],""],o=[{},[]])=>{const a=o[0],t=o[1];for(const h in s){const m=h,r=s[m];if((0,R.isCssValue)(r)){const i=(0,u.hashClassName)(e,m,r),p=(0,S.hashSelector)(e,m);t.push([(0,c.compileCss)(`.${i}`,e,(0,b.styleDeclarationStringify)(m,r)),(0,y.getStyleOrder)(e)]),Object.assign(a,{[p]:i})}else if((0,C.isObject)(r))if(m==="animationName"){const i=r,[p,j]=(0,n.compileKeyFrameCss)(i);t.push([j,"keyframes"]),Object.assign(a,{[p]:p}),f({animationName:p},e,o)}else f(r,(0,N.resolveSelectors)(e,m),o)}return o};0&&(module.exports={resolveStyle}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var n=(r,e)=>{for(var l in e)o(r,l,{get:e[l],enumerable:!0})},u=(r,e,l,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of t(e))!f.call(r,i)&&i!==l&&o(r,i,{get:()=>e[i],enumerable:!(s=c(e,i))||s.enumerable});return r};var d=r=>u(o({},"__esModule",{value:!0}),r);var m={};n(m,{checkStyleOrder:()=>p,styleOrder:()=>y});module.exports=d(m);const y=["g","n","l","v","w","f","o","h","c","k","a","m"],p=([r,e])=>{let l="n";return r.length!==0?r.some(s=>s.includes("media"))?l="m":l="a":e.includes(":active")?l="c":e.includes(":hover")?l="h":e.includes(":focus-visible")?l="o":e.includes(":focus")?l="f":e.includes(":focus-within")?l="w":e.includes(":visited")?l="v":e.includes(":link")&&(l="l"),l};0&&(module.exports={checkStyleOrder,styleOrder}); | ||
"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}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var l=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var i=(s,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!o.call(s,t)&&t!==a&&l(s,t,{get:()=>e[t],enumerable:!(r=n(e,t))||r.enumerable});return s};var d=s=>i(l({},"__esModule",{value:!0}),s);var m={};module.exports=d(m); | ||
"use strict";var l=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var i=(s,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!o.call(s,t)&&t!==a&&l(s,t,{get:()=>e[t],enumerable:!(r=n(e,t))||r.enumerable});return s};var m=s=>i(l({},"__esModule",{value:!0}),s);var u={};module.exports=m(u); |
@@ -1,1 +0,1 @@ | ||
"use strict";var s=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var d=(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 p=n=>d(s({},"__esModule",{value:!0}),n);var x={};module.exports=p(x); | ||
"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); |
@@ -1,1 +0,1 @@ | ||
"use strict";var m=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var C=(t,s)=>{for(var e in s)m(t,e,{get:s[e],enumerable:!0})},b=(t,s,e,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of g(s))!j.call(t,o)&&o!==e&&m(t,o,{get:()=>s[o],enumerable:!(r=a(s,o))||r.enumerable});return t};var d=t=>b(m({},"__esModule",{value:!0}),t);var A={};C(A,{compileObjectCss:()=>y});module.exports=d(A);var n=require("./compileCss"),c=require("./isCssValue"),l=require("./isObject"),f=require("./resolveSelectors"),u=require("./styleDeclarationStringify");const y=(t,s,e=[[],""],r=[[]])=>{const o=[];for(const i in t){const p=t[i];(0,c.isCssValue)(p)?o.push((0,u.styleDeclarationStringify)(i,p)):(0,l.isObject)(p)&&y(p,s,(0,f.resolveSelectors)(e,i),r)}if(o.length!==0){const i=(0,n.compileCss)(s,e,o.join(""));r[0].push(i)}return r[0]};0&&(module.exports={compileObjectCss}); | ||
"use strict";var m=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var C=(t,s)=>{for(var r in s)m(t,r,{get:s[r],enumerable:!0})},b=(t,s,r,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of g(s))!j.call(t,o)&&o!==r&&m(t,o,{get:()=>s[o],enumerable:!(e=a(s,o))||e.enumerable});return t};var A=t=>b(m({},"__esModule",{value:!0}),t);var O={};C(O,{compileObjectCss:()=>y});module.exports=A(O);var n=require("./compileCss"),c=require("./isCssValue"),l=require("./isObject"),f=require("./resolveSelectors"),u=require("./styleDeclarationStringify");const y=(t,s,r=[[],""],e=[[]])=>{const o=[];for(const i in t){const p=t[i];(0,c.isCssValue)(p)?o.push((0,u.styleDeclarationStringify)(i,p)):(0,l.isObject)(p)&&y(p,s,(0,f.resolveSelectors)(r,i),e)}if(o.length!==0){const i=(0,n.compileCss)(s,r,o.join(""));e[0].push(i)}return e[0]};0&&(module.exports={compileObjectCss}); |
@@ -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 d={};p(d,{isCssValue:()=>u});module.exports=m(d);const u=r=>typeof r=="string"||typeof r=="number"||Array.isArray(r);0&&(module.exports={isCssValue}); | ||
"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}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var S=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},u=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!f.call(t,r)&&r!==s&&i(t,r,{get:()=>e[r],enumerable:!(o=n(e,r))||o.enumerable});return t};var d=t=>u(i({},"__esModule",{value:!0}),t);var g={};S(g,{resolveSelectors:()=>a});module.exports=d(g);var l=require("./isNestedSelector"),m=require("./normalizeNestedSelector");const a=(t,e)=>{const s=[...t[0]];let o=t[1];return e.substring(0,1)==="@"?s.unshift(e):(0,l.isNestedSelector)(e)&&(o=(0,m.normalizeNestedSelector)(o,e)),[s,o]};0&&(module.exports={resolveSelectors}); | ||
"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var S=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},u=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!f.call(t,r)&&r!==s&&i(t,r,{get:()=>e[r],enumerable:!(o=n(e,r))||o.enumerable});return t};var a=t=>u(i({},"__esModule",{value:!0}),t);var N={};S(N,{resolveSelectors:()=>g});module.exports=a(N);var l=require("./isNestSelector"),m=require("./normalizeNestSelector");const g=(t,e)=>{const s=[...t[0]];let o=t[1];return e.substring(0,1)==="@"?s.unshift(e):(0,l.isNestSelector)(e)&&(o=(0,m.normalizeNestSelector)(o,e)),[s,o]};0&&(module.exports={resolveSelectors}); |
export declare class ClassName extends String { | ||
/** | ||
* object | ||
*/ | ||
o: Record<string, string>; | ||
/** | ||
* etc | ||
*/ | ||
e: string[]; | ||
constructor(object: ClassName['o'], etc?: ClassName['e']); | ||
object: Record<string, string>; | ||
other: string[]; | ||
constructor(object: ClassName['object'], other?: ClassName['other']); | ||
} |
@@ -1,1 +0,1 @@ | ||
var r=class extends String{o;e;constructor(s,e=[]){super([...Object.values(s),...e].join(" ")),this.o=s,this.e=e}};export{r as ClassName}; | ||
var e=class extends String{object;other;constructor(t,s=[]){super([...Object.values(t),...s].join(" ")),this.object=t,this.other=s}};export{e as ClassName}; |
@@ -1,1 +0,1 @@ | ||
import{uniqueCssRules as u}from"./uniqueCssRules.js";import{compileObjectCss as y}from"./utils/compileObjectCss.js";var n=l=>{let s=[],e=l;for(let t in e){let o=e[t],r=y(o,t);s.push(...r.map(p=>[p,"g"]))}return[u(s)]};export{n as createGlobalStyle}; | ||
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}; |
@@ -1,1 +0,1 @@ | ||
import{ClassName as t}from"./ClassName.js";var i=(...r)=>{let n={},e=[];return r.forEach(s=>{typeof s=="string"?e.push(s):s instanceof t&&(e.push(...s.e),Object.assign(n,s.o))}),new t(n,e)};export{i as mergeStyle}; | ||
import{ClassName as n}from"./ClassName.js";var i=(...r)=>{let t={},e=[];return r.forEach(s=>{typeof s=="string"?e.push(s):s instanceof n&&(e.push(...s.other),Object.assign(t,s.object))}),new n(t,e)};export{i as mergeStyle}; |
@@ -5,4 +5,4 @@ import type { ClassName } from './ClassName'; | ||
import type { SupportStyle } from './types/style'; | ||
type ResolvedStyle = [object: ClassName['o'], cssRules: CssRule[]]; | ||
type ResolvedStyle = [object: ClassName['object'], cssRules: CssRule[]]; | ||
export declare const resolveStyle: (style: SupportStyle, selectors?: Selectors, resolvedStyle?: ResolvedStyle) => ResolvedStyle; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
import{checkStyleOrder as y}from"./styleOrder.js";import{compileCss as u}from"./utils/compileCss.js";import{compileKeyFrameCss as S}from"./utils/compileKeyFrameCss.js";import{hashClassName as R}from"./utils/hashClassName.js";import{hashSelector as C}from"./utils/hashSelector.js";import{isCssValue as N}from"./utils/isCssValue.js";import{isObject as h}from"./utils/isObject.js";import{resolveSelectors as b}from"./utils/resolveSelectors.js";import{styleDeclarationStringify as j}from"./utils/styleDeclarationStringify.js";var c=(a,e=[[],""],t=[{},[]])=>{let p=t[0],i=t[1];for(let n in a){let o=n,s=a[o],l="animationName";if(N(s)){let r=R(e,o,s),m=C(e,o);i.push([u(`.${r}`,e,j(o,s)),y(e)]),Object.assign(p,{[m]:r})}else if(h(s))if(o===l){let r=s,[m,f]=S(r);i.push([f,"k"]),Object.assign(p,{[m]:m}),c({[l]:m},e,t)}else c(s,b(e,o),t)}return t};export{c as resolveStyle}; | ||
import{getStyleOrder as c}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 h}from"./utils/styleDeclarationStringify.js";var l=(a,e=[[],""],t=[{},[]])=>{let p=t[0],i=t[1];for(let f in a){let s=f,o=a[s];if(C(o)){let r=S(e,s,o),m=R(e,s);i.push([n(`.${r}`,e,h(s,o)),c(e)]),Object.assign(p,{[m]:r})}else if(N(o))if(s==="animationName"){let r=o,[m,y]=u(r);i.push([y,"keyframes"]),Object.assign(p,{[m]:m}),l({animationName:m},e,t)}else l(o,b(e,s),t)}return t};export{l as resolveStyle}; |
import type { Selectors } from './types/common'; | ||
export declare const styleOrder: readonly ["g", "n", "l", "v", "w", "f", "o", "h", "c", "k", "a", "m"]; | ||
export declare const checkStyleOrder: ([atRules, nested]: Selectors) => "o" | "n" | "l" | "v" | "w" | "f" | "h" | "c" | "a" | "m"; | ||
export declare const styleOrder: readonly ["global", "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,1 +0,1 @@ | ||
var s=["g","n","l","v","w","f","o","h","c","k","a","m"],o=([r,l])=>{let e="n";return r.length!==0?r.some(i=>i.includes("media"))?e="m":e="a":l.includes(":active")?e="c":l.includes(":hover")?e="h":l.includes(":focus-visible")?e="o":l.includes(":focus")?e="f":l.includes(":focus-within")?e="w":l.includes(":visited")?e="v":l.includes(":link")&&(e="l"),e};export{o as checkStyleOrder,s as styleOrder}; | ||
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}; |
import type { ClassName } from '../ClassName'; | ||
import type { CssRule } from '../styleOrder'; | ||
export type CssValue = string | number | undefined; | ||
export type NestedChar = ':' | '&' | ' ' | '@' | ',' | '>' | '~' | '+' | '[' | '.' | '#'; | ||
export type NestChar = ':' | '&' | ' ' | '@' | ',' | '>' | '~' | '+' | '[' | '.' | '#'; | ||
export type Classes<K extends string> = Record<K, ClassName>; | ||
export type PureClasses<K extends string> = Record<K, ClassName['o']>; | ||
export type Selectors = [atRules: string[], nested: string]; | ||
export type PureClasses<K extends string> = Record<K, ClassName['object']>; | ||
export type Selectors = [atRules: string[], nest: string]; | ||
export type ForBuild = [ | ||
@@ -9,0 +9,0 @@ filename: string, |
import type { Pseudos, PropertiesFallback, AtRule } from 'csstype'; | ||
import type { CssValue, NestedChar } from './common'; | ||
import type { CssValue, NestChar } from './common'; | ||
import type { AndArray, IncludeStr } from './utils'; | ||
@@ -10,3 +10,3 @@ type SupportGlobalRules = PropertiesFallback<AndArray<CssValue>>; | ||
type GlobalStringRules = { | ||
[_ in IncludeStr<NestedChar>]?: SupportGlobalStyle; | ||
[_ in IncludeStr<NestChar>]?: SupportGlobalStyle; | ||
}; | ||
@@ -13,0 +13,0 @@ type GlobalSelector = keyof HTMLElementTagNameMap | '*'; |
import type { Pseudos, PropertiesFallback } from 'csstype'; | ||
import type { CssValue, NestedChar } from './common'; | ||
import type { CssValue, NestChar } from './common'; | ||
import type { IncludeStr } from './utils'; | ||
@@ -13,3 +13,3 @@ type SupportRules = Omit<PropertiesFallback<CssValue>, 'animationName'>; | ||
type StringRules = { | ||
[_ in IncludeStr<NestedChar>]?: SupportStyle; | ||
[_ in IncludeStr<NestChar>]?: SupportStyle; | ||
}; | ||
@@ -16,0 +16,0 @@ type AnimationNameRules = { |
export type ValueOf<T> = T[keyof T]; | ||
export type AndArray<T> = T | T[]; | ||
type Key = string | number | symbol; | ||
export type NestedObj<T> = { | ||
[_ in Key]?: NestedObj<T> | T; | ||
export type NestObj<T> = { | ||
[_ in Key]?: NestObj<T> | T; | ||
}; | ||
@@ -7,0 +7,0 @@ type UnionToIntersection<U> = (U extends unknown ? (_: U) => void : never) extends (_: infer I) => void ? I : never; |
import type { Selectors } from '../types/common'; | ||
export declare const compileCss: (selector: string, [atRules, nested]: Selectors, declaration: string) => string; | ||
export declare const compileCss: (selector: string, [atRules, nest]: Selectors, declaration: string) => string; |
import type { CssValue, Selectors } from '../types/common'; | ||
import type { AndArray, NestedObj } from '../types/utils'; | ||
import type { AndArray, NestObj } from '../types/utils'; | ||
type ResolvedStyle = [rules: string[]]; | ||
export declare const compileObjectCss: (style: NestedObj<AndArray<CssValue>>, selector: string, selectors?: Selectors, resolvedStyle?: ResolvedStyle) => string[]; | ||
export declare const compileObjectCss: (style: NestObj<AndArray<CssValue>>, selector: string, selectors?: Selectors, resolvedStyle?: ResolvedStyle) => string[]; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
import{compileCss as m}from"./compileCss.js";import{isCssValue as n}from"./isCssValue.js";import{isObject as c}from"./isObject.js";import{resolveSelectors as l}from"./resolveSelectors.js";import{styleDeclarationStringify as f}from"./styleDeclarationStringify.js";var u=(r,i,p=[[],""],o=[[]])=>{let e=[];for(let s in r){let t=r[s];n(t)?e.push(f(s,t)):c(t)&&u(t,i,l(p,s),o)}if(e.length!==0){let s=m(i,p,e.join(""));o[0].push(s)}return o[0]};export{u as compileObjectCss}; | ||
import{compileCss as m}from"./compileCss.js";import{isCssValue as n}from"./isCssValue.js";import{isObject as c}from"./isObject.js";import{resolveSelectors as l}from"./resolveSelectors.js";import{styleDeclarationStringify as f}from"./styleDeclarationStringify.js";var u=(e,i,p=[[],""],o=[[]])=>{let r=[];for(let s in e){let t=e[s];n(t)?r.push(f(s,t)):c(t)&&u(t,i,l(p,s),o)}if(r.length!==0){let s=m(i,p,r.join(""));o[0].push(s)}return o[0]};export{u as compileObjectCss}; |
type StyleElement = HTMLStyleElement & { | ||
r: string[]; | ||
}; | ||
export declare const getStyleElements: () => Record<"o" | "g" | "n" | "l" | "v" | "w" | "f" | "h" | "c" | "k" | "a" | "m", StyleElement>; | ||
export declare const getStyleElements: () => Record<"link" | "global" | "normal" | "visited" | "focusWithin" | "focus" | "focusVisible" | "hover" | "active" | "keyframes" | "atRules" | "media", StyleElement>; | ||
export {}; |
import type { CssValue, Selectors } from '../types/common'; | ||
import type { AndArray } from '../types/utils'; | ||
export declare const hashClassName: ([atRules, nested]: Selectors, property: string, styleValue: AndArray<CssValue>) => string; | ||
export declare const hashClassName: ([atRules, nest]: Selectors, property: string, styleValue: AndArray<CssValue>) => string; |
import type { Selectors } from '../types/common'; | ||
export declare const hashSelector: ([atRules, nested]: Selectors, property: string) => string; | ||
export declare const hashSelector: ([atRules, nest]: Selectors, property: string) => string; |
import type { CssValue } from '../types/common'; | ||
import type { AndArray, NestedObj } from '../types/utils'; | ||
export declare const isCssValue: (styleValue: NestedObj<AndArray<CssValue>> | AndArray<CssValue>) => styleValue is AndArray<CssValue>; | ||
import type { AndArray, NestObj } from '../types/utils'; | ||
export declare const isCssValue: (styleValue: NestObj<AndArray<CssValue>> | AndArray<CssValue>) => styleValue is AndArray<CssValue>; |
@@ -1,1 +0,1 @@ | ||
import{isNestedSelector as r}from"./isNestedSelector.js";import{normalizeNestedSelector as i}from"./normalizeNestedSelector.js";var n=(s,e)=>{let o=[...s[0]],t=s[1];return e.substring(0,1)==="@"?o.unshift(e):r(e)&&(t=i(t,e)),[o,t]};export{n as resolveSelectors}; | ||
import{isNestSelector as r}from"./isNestSelector.js";import{normalizeNestSelector as i}from"./normalizeNestSelector.js";var n=(s,e)=>{let o=[...s[0]],t=s[1];return e.substring(0,1)==="@"?o.unshift(e):r(e)&&(t=i(t,e)),[o,t]};export{n as resolveSelectors}; |
{ | ||
"name": "@kaze-style/core", | ||
"version": "0.13.0", | ||
"version": "0.14.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Taishi Naritomi", |
<div> | ||
<br> | ||
<br /> | ||
<br /> | ||
<div align="center"> | ||
<img src='https://raw.githubusercontent.com/taishinaritomi/kaze-style/main/assets/logo.svg' width="250" height="auto" alt="Kaze"> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/taishinaritomi/kaze-style/main/assets/kaze-light.svg"> | ||
<img width="300" height="auto" alt="Kaze" src="https://raw.githubusercontent.com/taishinaritomi/kaze-style/main/assets/kaze-dark.svg"> | ||
</picture> | ||
</div> | ||
<br /> | ||
<br /> | ||
<hr /> | ||
<p align="center">Kaze [風] zero-runtime CSS in JS for React.<p> | ||
<br /> | ||
<p align="center">Kaze [風] zero-runtime CSS in JS for React ✌️<p> | ||
<p align="center"><b>🚧 under development 🚧</b></p> | ||
@@ -23,3 +30,3 @@ <div align="center"> | ||
</div> | ||
<br> | ||
<br /> | ||
</div> | ||
@@ -26,0 +33,0 @@ |
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
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
43065
105
0
313