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

@kaze-style/core

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaze-style/core - npm Package Compare versions

Comparing version 0.12.0 to 0.13.0

dist/cjs/setCssRuleObjects.js

7

dist/__preGlobalStyle.d.ts

@@ -1,8 +0,3 @@

import type { CssRule } from './styleOrder';
import type { ForBuild } from './types/common';
import type { KazeGlobalStyle } from './types/globalStyle';
export type ForBuildGlobalStyle = {
cssRules: CssRule[];
index: number;
};
export declare const __preGlobalStyle: <T extends string>(globalStyles: KazeGlobalStyle<T>, forBuild: ForBuild, filename: string, index: number) => void;
export declare const __preGlobalStyle: <T extends string>(globalStyles: KazeGlobalStyle<T>, forBuild: ForBuild, filename: string, _index: number) => void;

@@ -1,1 +0,1 @@

import{createGlobalStyle as s}from"./createGlobalStyle.js";var y=(l,e,t,o)=>{let{cssRules:r}=s(l);e.filename===t&&e.globalStyles.push({cssRules:r,index:o})};export{y as __preGlobalStyle};
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};

@@ -1,9 +0,3 @@

import type { CssRule } from './styleOrder';
import type { ClassesObject, Classes, ForBuild } from './types/common';
import type { Classes, ForBuild } from './types/common';
import type { KazeStyle } from './types/style';
export type ForBuildStyle<K extends string> = {
classesObject: ClassesObject<K>;
cssRules: CssRule[];
index: number;
};
export declare const __preStyle: <K extends string>(styles: KazeStyle<K>, forBuild: ForBuild, filename: string, index: number) => Classes<K>;

@@ -1,1 +0,1 @@

import{createStyle as y}from"./createStyle.js";var m=(s,e,t,r)=>{let{classes:l,classesObject:o,cssRules:p}=y(s);return e.filename===t&&e.styles.push({classesObject:o,cssRules:p,index:r}),l};export{m as __preStyle};
import{createStyle as m}from"./createStyle.js";var n=(s,e,t,r)=>{let[p,o,l]=m(s);return e[0]===t&&(e[1].push(...p),e[2].push([l,r])),o};export{n as __preStyle};

@@ -1,1 +0,1 @@

"use strict";var s=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var a=(l,e)=>{for(var o in e)s(l,o,{get:e[o],enumerable:!0})},n=(l,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of m(e))!i.call(l,t)&&t!==o&&s(l,t,{get:()=>e[t],enumerable:!(r=y(e,t))||r.enumerable});return l};var b=l=>n(s({},"__esModule",{value:!0}),l);var S={};a(S,{__preGlobalStyle:()=>u});module.exports=b(S);var p=require("./createGlobalStyle");const u=(l,e,o,r)=>{const{cssRules:t}=(0,p.createGlobalStyle)(l);e.filename===o&&e.globalStyles.push({cssRules:t,index:r})};0&&(module.exports={__preGlobalStyle});
"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});

@@ -1,1 +0,1 @@

"use strict";var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var a=(s,e)=>{for(var r in e)o(s,r,{get:e[r],enumerable:!0})},u=(s,e,r,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of n(e))!i.call(s,t)&&t!==r&&o(s,t,{get:()=>e[t],enumerable:!(l=m(e,t))||l.enumerable});return s};var K=s=>u(o({},"__esModule",{value:!0}),s);var d={};a(d,{__preStyle:()=>b});module.exports=K(d);var p=require("./createStyle");const b=(s,e,r,l)=>{const{classes:t,classesObject:y,cssRules:c}=(0,p.createStyle)(s);return e.filename===r&&e.styles.push({classesObject:y,cssRules:c,index:l}),t};0&&(module.exports={__preStyle});
"use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var i=(s,e)=>{for(var r in e)o(s,r,{get:e[r],enumerable:!0})},u=(s,e,r,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!c.call(s,t)&&t!==r&&o(s,t,{get:()=>e[t],enumerable:!(p=n(e,t))||p.enumerable});return s};var K=s=>u(o({},"__esModule",{value:!0}),s);var C={};i(C,{__preStyle:()=>S});module.exports=K(C);var l=require("./createStyle");const S=(s,e,r,p)=>{const[t,m,y]=(0,l.createStyle)(s);return e[0]===r&&(e[1].push(...t),e[2].push([y,p])),m};0&&(module.exports={__preStyle});

@@ -1,1 +0,1 @@

"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;others;constructor(s,e=[]){super([...Object.values(s),...e].join(" ")),this.others=e,this.object=s}}0&&(module.exports={ClassName});
"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});

@@ -1,1 +0,1 @@

"use strict";var r=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var c=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))!c.call(e,l)&&l!==t&&r(e,l,{get:()=>s[l],enumerable:!(o=m(s,l))||o.enumerable});return e};var d=e=>R(r({},"__esModule",{value:!0}),e);var b={};i(b,{createGlobalStyle:()=>C});module.exports=d(b);var p=require("./uniqueCssRules"),u=require("./utils/compileNestedCss");const C=e=>{const s=[],t=e;for(const o in t){const l=t[o],y=(0,u.compileNestedCss)({style:l,selector:o});s.push(...y.map(a=>({value:a,order:"global"})))}return{cssRules:(0,p.uniqueCssRules)(s)}};0&&(module.exports={createGlobalStyle});
"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});

@@ -1,1 +0,1 @@

"use strict";var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var i=(e,s)=>{for(var l in s)r(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))!C.call(e,t)&&t!==l&&r(e,t,{get:()=>s[t],enumerable:!(o=p(s,t))||o.enumerable});return e};var R=e=>K(r({},"__esModule",{value:!0}),e);var O={};i(O,{createStyle:()=>f});module.exports=R(O);var c=require("./ClassName"),n=require("./resolveStyle"),m=require("./uniqueCssRules");const f=e=>{const s={},l={},o=[];for(const t in e){const{classNameObject:a,cssRules:u}=(0,n.resolveStyle)({style:e[t]});o.push(...u),s[t]=new c.ClassName(a),l[t]=a}return{classes:s,classesObject:l,cssRules:(0,m.uniqueCssRules)(o)}};0&&(module.exports={createStyle});
"use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var i=(e,s)=>{for(var r in s)o(e,r,{get:s[r],enumerable:!0})},K=(e,s,r,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let t of C(s))!y.call(e,t)&&t!==r&&o(e,t,{get:()=>s[t],enumerable:!(l=c(s,t))||l.enumerable});return e};var R=e=>K(o({},"__esModule",{value:!0}),e);var S={};i(S,{createStyle:()=>f});module.exports=R(S);var a=require("./ClassName"),p=require("./resolveStyle"),m=require("./uniqueCssRules");const f=e=>{const s={},r={},l=[];for(const t in e){const[u,n]=(0,p.resolveStyle)(e[t]);l.push(...n),s[t]=new a.ClassName(u),r[t]=u}return[(0,m.uniqueCssRules)(l),s,r]};0&&(module.exports={createStyle});

@@ -1,1 +0,1 @@

"use strict";var x=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var f=(t,e,m,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of s(e))!S.call(t,p)&&p!==m&&x(t,p,{get:()=>e[p],enumerable:!(l=y(e,p))||l.enumerable});return t},r=(t,e,m)=>(f(t,e,"default"),m&&f(m,e,"default"));var a=t=>f(x({},"__esModule",{value:!0}),t);var o={};module.exports=a(o);r(o,require("./mergeStyle"),module.exports);r(o,require("./createStyle"),module.exports);r(o,require("./createGlobalStyle"),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);
"use strict";var x=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var f=(t,e,m,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of s(e))!a.call(t,p)&&p!==m&&x(t,p,{get:()=>e[p],enumerable:!(l=y(e,p))||l.enumerable});return t},r=(t,e,m)=>(f(t,e,"default"),m&&f(m,e,"default"));var S=t=>f(x({},"__esModule",{value:!0}),t);var o={};module.exports=S(o);r(o,require("./mergeStyle"),module.exports);r(o,require("./createStyle"),module.exports);r(o,require("./createGlobalStyle"),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("./setCssRuleObjects"),module.exports);

@@ -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 C={};l(C,{mergeStyle:()=>h});module.exports=u(C);var i=require("./ClassName");const h=(...e)=>{const s=[],n={};return e.forEach(t=>{typeof t=="string"?s.push(t):t instanceof i.ClassName&&(s.push(...t.others),Object.assign(n,t.object))}),new i.ClassName(n,s)};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 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});

@@ -1,1 +0,1 @@

"use strict";var p=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var k=(o,e)=>{for(var s in e)p(o,s,{get:e[s],enumerable:!0})},d=(o,e,s,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of h(e))!g.call(o,t)&&t!==s&&p(o,t,{get:()=>e[t],enumerable:!(a=j(e,t))||a.enumerable});return o};var K=o=>d(p({},"__esModule",{value:!0}),o);var V={};k(V,{resolveStyle:()=>i});module.exports=K(V);var y=require("./utils/checkStyleOrder"),n=require("./utils/compileCss"),f=require("./utils/compileKeyFrameCss"),u=require("./utils/hashClassName"),N=require("./utils/hashSelector"),R=require("./utils/isCssValue"),S=require("./utils/isObject"),C=require("./utils/resolveSelectors"),O=require("./utils/styleDeclarationStringify");const i=({style:o,selectors:e={nested:"",atRules:[]},resolvedStyle:s={classNameObject:{},cssRules:[]}})=>{for(const a in o){const t=a,r=o[t];if((0,R.isCssValue)(r)){const l=(0,u.hashClassName)({selectors:e,property:t,styleValue:r}),c=(0,N.hashSelector)({selectors:e,property:t}),m=(0,n.compileCss)({selector:`.${l}`,selectors:e,declaration:(0,O.styleDeclarationStringify)({property:t,styleValue:r})}),b=(0,y.checkStyleOrder)({selectors:e});s.cssRules.push({value:m,order:b}),Object.assign(s.classNameObject,{[c]:l})}else if((0,S.isObject)(r))if(t==="animationName"){const l=r,{keyframesRule:c,keyframeName:m}=(0,f.compileKeyFrameCss)(l);s.cssRules.push({value:c,order:"keyframes"}),Object.assign(s.classNameObject,{[m]:m}),i({style:{animationName:m},selectors:e,resolvedStyle:s})}else i({style:r,selectors:(0,C.resolveSelectors)({property:t,selectors:e}),resolvedStyle: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 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});

@@ -1,1 +0,1 @@

"use strict";var t=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(e,r)=>{for(var o in r)t(e,o,{get:r[o],enumerable:!0})},u=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of i(r))!m.call(e,s)&&s!==o&&t(e,s,{get:()=>r[s],enumerable:!(n=f(r,s))||n.enumerable});return e};var O=e=>u(t({},"__esModule",{value:!0}),e);var x={};p(x,{sortCssRules:()=>l});module.exports=O(x);var d=require("./styleOrder");const l=e=>e.sort((r,o)=>r.order===o.order?0:d.styleOrder.indexOf(r.order)-d.styleOrder.indexOf(o.order));0&&(module.exports={sortCssRules});
"use strict";var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(e,r)=>{for(var t in r)n(e,t,{get:r[t],enumerable:!0})},m=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of f(r))!i.call(e,s)&&s!==t&&n(e,s,{get:()=>r[s],enumerable:!(o=u(r,s))||o.enumerable});return e};var p=e=>m(n({},"__esModule",{value:!0}),e);var c={};l(c,{sortCssRules:()=>O});module.exports=p(c);var d=require("./styleOrder");const O=e=>e.sort((r,t)=>{const o=r[1],s=t[1];return o===s?0:d.styleOrder.indexOf(o)-d.styleOrder.indexOf(s)});0&&(module.exports={sortCssRules});

@@ -1,1 +0,1 @@

"use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var d=(r,e)=>{for(var s in e)o(r,s,{get:e[s],enumerable:!0})},n=(r,e,s,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!y.call(r,t)&&t!==s&&o(r,t,{get:()=>e[t],enumerable:!(l=i(e,t))||l.enumerable});return r};var u=r=>n(o({},"__esModule",{value:!0}),r);var p={};d(p,{styleOrder:()=>c});module.exports=u(p);const c=["global","normal","link","visited","focusWithin","focus","focusVisible","hover","active","keyframes","atRules","media"];0&&(module.exports={styleOrder});
"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});

@@ -1,1 +0,1 @@

"use strict";var l=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var i=(s,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!a.call(s,t)&&t!==n&&l(s,t,{get:()=>e[t],enumerable:!(r=o(e,t))||r.enumerable});return s};var d=s=>i(l({},"__esModule",{value:!0}),s);var u={};module.exports=d(u);
"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);

@@ -1,1 +0,1 @@

"use strict";var t=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var m=(r,e)=>{for(var u in e)t(r,u,{get:e[u],enumerable:!0})},n=(r,e,u,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of o(e))!p.call(r,s)&&s!==u&&t(r,s,{get:()=>e[s],enumerable:!(a=l(e,s))||a.enumerable});return r};var y=r=>n(t({},"__esModule",{value:!0}),r);var f={};m(f,{uniqueCssRules:()=>C});module.exports=y(f);const C=r=>Array.from(new Map(r.map(e=>[e.value,e])).values());0&&(module.exports={uniqueCssRules});
"use strict";var u=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var m=(r,e)=>{for(var t in e)u(r,t,{get:e[t],enumerable:!0})},n=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of a(e))!l.call(r,s)&&s!==t&&u(r,s,{get:()=>e[s],enumerable:!(o=p(e,s))||o.enumerable});return r};var y=r=>n(u({},"__esModule",{value:!0}),r);var f={};m(f,{uniqueCssRules:()=>C});module.exports=y(f);const C=r=>Array.from(new Map(r.map(e=>[e[0],e])).values());0&&(module.exports={uniqueCssRules});

@@ -1,1 +0,1 @@

"use strict";var c=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var $=(r,e)=>{for(var o in e)c(r,o,{get:e[o],enumerable:!0})},m=(r,e,o,s)=>{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:!(s=g(e,t))||s.enumerable});return r};var f=r=>m(c({},"__esModule",{value:!0}),r);var y={};$(y,{compileCss:()=>a});module.exports=f(y);const a=({selector:r,selectors:{nested:e,atRules:o},declaration:s})=>{let t="",l="";return e?t=`${e.replace(/&/g,`${r}`)}`:t=`${r}`,l=`${t}{${s}}`,o.length!==0&&o.forEach(i=>l=`${i}{${l}}`),l};0&&(module.exports={compileCss});
"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});

@@ -1,1 +0,1 @@

"use strict";var m=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var i=(s,e)=>{for(var o in e)m(s,o,{get:e[o],enumerable:!0})},u=(s,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of y(e))!f.call(s,r)&&r!==o&&m(s,r,{get:()=>e[r],enumerable:!(t=p(e,r))||t.enumerable});return s};var R=s=>u(m({},"__esModule",{value:!0}),s);var g={};i(g,{compileKeyFrameCss:()=>$});module.exports=R(g);var c=require("../hash"),a=require("./compileNestedCss");const $=s=>{const e=[];for(const n in s){const l=s[n];e.push(`${(0,a.compileNestedCss)({selector:n,style:l||{}}).join("")}`)}const o=e.join(""),t=`_${(0,c.hash)(o)}`;return{keyframesRule:`@keyframes ${t}{${o}}`,keyframeName:t}};0&&(module.exports={compileKeyFrameCss});
"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});

@@ -1,1 +0,1 @@

"use strict";var l=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var n=(s,r)=>{for(var e in r)l(s,e,{get:r[e],enumerable:!0})},c=(s,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of a(r))!i.call(s,t)&&t!==e&&l(s,t,{get:()=>r[t],enumerable:!(o=y(r,t))||o.enumerable});return s};var u=s=>c(l({},"__esModule",{value:!0}),s);var f={};n(f,{hashClassName:()=>A});module.exports=u(f);var p=require("../hash"),m=require("./styleValueStringify");const A=({selectors:{nested:s,atRules:r},property:e,styleValue:o})=>`_${(0,p.hash)(`${e}${s}${r.join("")}${(0,m.styleValueStringify)(o)}`)}`;0&&(module.exports={hashClassName});
"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});

@@ -1,1 +0,1 @@

"use strict";var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(e,r)=>{for(var t in r)s(e,t,{get:r[t],enumerable:!0})},g=(e,r,t,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of n(r))!i.call(e,o)&&o!==t&&s(e,o,{get:()=>r[o],enumerable:!(p=m(r,o))||p.enumerable});return e};var h=e=>g(s({},"__esModule",{value:!0}),e);var $={};l($,{hashSelector:()=>y});module.exports=h($);var c=require("../hash");const y=({selectors:{nested:e,atRules:r},property:t})=>`_${(0,c.hash)(`${t}${e}${r.join("")}`)}`;0&&(module.exports={hashSelector});
"use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var h=(r,o)=>{for(var t in o)s(r,t,{get:o[t],enumerable:!0})},$=(r,o,t,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of i(o))!p.call(r,e)&&e!==t&&s(r,e,{get:()=>o[e],enumerable:!(m=c(o,e))||m.enumerable});return r};var l=r=>$(s({},"__esModule",{value:!0}),r);var a={};h(a,{hashSelector:()=>S});module.exports=l(a);var n=require("../hash");const S=([r,o],t)=>`_${(0,n.hash)(`${r.join("")}${o}${t}`)}`;0&&(module.exports={hashSelector});

@@ -1,1 +0,1 @@

"use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(e,r)=>{for(var t in r)o(e,t,{get:r[t],enumerable:!0})},g=(e,r,t,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of a(r))!c.call(e,n)&&n!==t&&o(e,n,{get:()=>r[n],enumerable:!(p=s(r,n))||p.enumerable});return e};var i=e=>g(o({},"__esModule",{value:!0}),e);var l={};d(l,{hyphenateProperty:()=>h});module.exports=i(l);const h=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase());0&&(module.exports={hyphenateProperty});
"use strict";var n=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(e,r)=>{for(var t in r)n(e,t,{get:r[t],enumerable:!0})},i=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of o(r))!d.call(e,s)&&s!==t&&n(e,s,{get:()=>r[s],enumerable:!(a=c(r,s))||a.enumerable});return e};var h=e=>i(n({},"__esModule",{value:!0}),e);var p={};g(p,{hyphenateProperty:()=>l});module.exports=h(p);const l=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase());0&&(module.exports={hyphenateProperty});

@@ -1,1 +0,1 @@

"use strict";var l=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var n=(r,t)=>{for(var e in t)l(r,e,{get:t[e],enumerable:!0})},A=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of g(t))!o.call(r,i)&&i!==e&&l(r,i,{get:()=>t[i],enumerable:!(s=c(t,i))||s.enumerable});return r};var a=r=>A(l({},"__esModule",{value:!0}),r);var u={};n(u,{normalizeNestedSelector:()=>p});module.exports=a(u);const p=({nested:r,current:t})=>{let e=t;return t?e+=r.charAt(0)==="&"?r.slice(1):r:e=r.includes("&")?r:"&"+r,e};0&&(module.exports={normalizeNestedSelector});
"use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var e=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var a=(i,r)=>{for(var l in r)o(i,l,{get:r[l],enumerable:!0})},f=(i,r,l,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of e(r))!g.call(i,c)&&c!==l&&o(i,c,{get:()=>r[c],enumerable:!(t=s(r,c))||t.enumerable});return i};var h=i=>f(o({},"__esModule",{value:!0}),i);var n={};a(n,{normalizeNestedSelector:()=>m});module.exports=h(n);const m=(i,r)=>{let l=i;return i?l+=r.charAt(0)==="&"?r.slice(1):r:l=r.includes("&")?r:"&"+r,l};0&&(module.exports={normalizeNestedSelector});

@@ -1,1 +0,1 @@

"use strict";var n=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var a=(t,e)=>{for(var s in e)n(t,s,{get:e[s],enumerable:!0})},g=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!u.call(t,r)&&r!==s&&n(t,r,{get:()=>e[r],enumerable:!(o=m(e,r))||o.enumerable});return t};var d=t=>g(n({},"__esModule",{value:!0}),t);var S={};a(S,{resolveSelectors:()=>f});module.exports=d(S);var i=require("./isNestedSelector"),c=require("./normalizeNestedSelector");const f=({property:t,selectors:e})=>t.substring(0,1)==="@"?Object.assign({},e,{atRules:[t].concat(e.atRules)}):(0,i.isNestedSelector)(t)?Object.assign({},e,{nested:(0,c.normalizeNestedSelector)({current:e.nested,nested:t})}):e;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 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});

@@ -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,p)=>{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:!(p=m(r,e))||p.enumerable});return t};var u=t=>f(y({},"__esModule",{value:!0}),t);var g={};l(g,{styleDeclarationStringify:()=>A});module.exports=u(g);var s=require("./hyphenateProperty"),i=require("./styleValueStringify");const A=({property:t,styleValue:r})=>`${(0,s.hyphenateProperty)(t)}:${(0,i.styleValueStringify)(r)};`;0&&(module.exports={styleDeclarationStringify});
"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});
export declare class ClassName extends String {
object: Record<string, string>;
others: string[];
constructor(object: ClassName['object'], others?: ClassName['others']);
/**
* object
*/
o: Record<string, string>;
/**
* etc
*/
e: string[];
constructor(object: ClassName['o'], etc?: ClassName['e']);
}

@@ -1,1 +0,1 @@

var e=class extends String{object;others;constructor(s,t=[]){super([...Object.values(s),...t].join(" ")),this.others=t,this.object=s}};export{e as ClassName};
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};
import type { CssRule } from './styleOrder';
import type { KazeGlobalStyle } from './types/globalStyle';
type Result = {
cssRules: CssRule[];
};
type Result = [cssRules: CssRule[]];
export declare const createGlobalStyle: <T extends string>(_styles: KazeGlobalStyle<T>) => Result;
export {};

@@ -1,1 +0,1 @@

import{uniqueCssRules as u}from"./uniqueCssRules.js";import{compileNestedCss as y}from"./utils/compileNestedCss.js";var n=l=>{let s=[],e=l;for(let t in e){let o=e[t],r=y({style:o,selector:t});s.push(...r.map(p=>({value:p,order:"global"})))}return{cssRules:u(s)}};export{n as createGlobalStyle};
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 type { CssRule } from './styleOrder';
import type { Classes, ClassesObject } from './types/common';
import type { Classes, PureClasses } from './types/common';
import type { KazeStyle } from './types/style';
type Result<K extends string> = {
cssRules: CssRule[];
classes: Classes<K>;
classesObject: ClassesObject<K>;
};
type Result<K extends string> = [
cssRules: CssRule[],
classes: Classes<K>,
pureClasses: PureClasses<K>
];
export declare const createStyle: <K extends string>(styles: KazeStyle<K>) => Result<K>;
export {};

@@ -1,1 +0,1 @@

import{ClassName as c}from"./ClassName.js";import{resolveStyle as n}from"./resolveStyle.js";import{uniqueCssRules as m}from"./uniqueCssRules.js";var C=e=>{let t={},l={},o=[];for(let s in e){let{classNameObject:r,cssRules:a}=n({style:e[s]});o.push(...a),t[s]=new c(r),l[s]=r}return{classes:t,classesObject:l,cssRules:m(o)}};export{C as createStyle};
import{ClassName as a}from"./ClassName.js";import{resolveStyle as p}from"./resolveStyle.js";import{uniqueCssRules as m}from"./uniqueCssRules.js";var y=e=>{let t={},r={},l=[];for(let s in e){let[o,u]=p(e[s]);l.push(...u),t[s]=new a(o),r[s]=o}return[m(l),t,r]};export{y as createStyle};

@@ -12,4 +12,5 @@ export * from './mergeStyle';

export * from './uniqueCssRules';
export type { Classes, ForBuild } from './types/common';
export * from './setCssRuleObjects';
export type { Classes, PureClasses, ForBuild } from './types/common';
export type { KazeStyle, SupportStyle } from './types/style';
export type { KazeGlobalStyle, SupportGlobalStyle } from './types/globalStyle';

@@ -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"./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";

@@ -1,1 +0,1 @@

import{ClassName as n}from"./ClassName.js";var i=(...r)=>{let e=[],t={};return r.forEach(s=>{typeof s=="string"?e.push(s):s instanceof n&&(e.push(...s.others),Object.assign(t,s.object))}),new n(t,e)};export{i as mergeStyle};
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};

@@ -5,12 +5,4 @@ import type { ClassName } from './ClassName';

import type { SupportStyle } from './types/style';
type ResolvedStyle = {
classNameObject: ClassName['object'];
cssRules: CssRule[];
};
type Args = {
style: SupportStyle;
selectors?: Selectors;
resolvedStyle?: ResolvedStyle;
};
export declare const resolveStyle: ({ style, selectors, resolvedStyle, }: Args) => ResolvedStyle;
type ResolvedStyle = [object: ClassName['o'], cssRules: CssRule[]];
export declare const resolveStyle: (style: SupportStyle, selectors?: Selectors, resolvedStyle?: ResolvedStyle) => ResolvedStyle;
export {};

@@ -1,1 +0,1 @@

import{checkStyleOrder as y}from"./utils/checkStyleOrder.js";import{compileCss as n}from"./utils/compileCss.js";import{compileKeyFrameCss as f}from"./utils/compileKeyFrameCss.js";import{hashClassName as u}from"./utils/hashClassName.js";import{hashSelector as N}from"./utils/hashSelector.js";import{isCssValue as R}from"./utils/isCssValue.js";import{isObject as S}from"./utils/isObject.js";import{resolveSelectors as C}from"./utils/resolveSelectors.js";import{styleDeclarationStringify as O}from"./utils/styleDeclarationStringify.js";var c=({style:l,selectors:s={nested:"",atRules:[]},resolvedStyle:e={classNameObject:{},cssRules:[]}})=>{for(let p in l){let t=p,o=l[t];if(R(o)){let m=u({selectors:s,property:t,styleValue:o}),a=N({selectors:s,property:t}),r=n({selector:`.${m}`,selectors:s,declaration:O({property:t,styleValue:o})}),i=y({selectors:s});e.cssRules.push({value:r,order:i}),Object.assign(e.classNameObject,{[a]:m})}else if(S(o))if(t==="animationName"){let m=o,{keyframesRule:a,keyframeName:r}=f(m);e.cssRules.push({value:a,order:"keyframes"}),Object.assign(e.classNameObject,{[r]:r}),c({style:{animationName:r},selectors:s,resolvedStyle:e})}else c({style:o,selectors:C({property:t,selectors:s}),resolvedStyle:e})}return e};export{c as resolveStyle};
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};

@@ -1,1 +0,1 @@

import{styleOrder as o}from"./styleOrder.js";var d=s=>s.sort((r,e)=>r.order===e.order?0:o.indexOf(r.order)-o.indexOf(e.order));export{d as sortCssRules};
import{styleOrder as s}from"./styleOrder.js";var u=t=>t.sort((o,n)=>{let r=o[1],e=n[1];return r===e?0:s.indexOf(r)-s.indexOf(e)});export{u as sortCssRules};

@@ -1,6 +0,5 @@

export declare const styleOrder: readonly ["global", "normal", "link", "visited", "focusWithin", "focus", "focusVisible", "hover", "active", "keyframes", "atRules", "media"];
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 type StyleOrder = typeof styleOrder[number];
export type CssRule = {
order: StyleOrder;
value: string;
};
export type CssRule = [value: string, order: StyleOrder];

@@ -1,1 +0,1 @@

var e=["global","normal","link","visited","focusWithin","focus","focusVisible","hover","active","keyframes","atRules","media"];export{e as styleOrder};
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};

@@ -5,19 +5,9 @@ import type { ClassName } from '../ClassName';

export type NestedChar = ':' | '&' | ' ' | '@' | ',' | '>' | '~' | '+' | '[' | '.' | '#';
export type Classes<K extends string> = Record<K, string>;
export type ClassesObject<K extends string> = Record<K, ClassName['object']>;
export type Selectors = {
nested: string;
atRules: string[];
};
export type ForBuild = {
filename: string;
globalStyles: {
cssRules: CssRule[];
index: number;
}[];
styles: {
classesObject: ClassesObject<string>;
cssRules: CssRule[];
index: number;
}[];
};
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 ForBuild = [
filename: string,
cssRules: CssRule[],
styles: [classes: PureClasses<string>, index: number][]
];

@@ -1,1 +0,1 @@

var s=r=>Array.from(new Map(r.map(e=>[e.value,e])).values());export{s as uniqueCssRules};
var s=r=>Array.from(new Map(r.map(e=>[e[0],e])).values());export{s as uniqueCssRules};
import type { Selectors } from '../types/common';
type Args = {
selector: string;
selectors: Selectors;
declaration: string;
};
export declare const compileCss: ({ selector, selectors: { nested, atRules }, declaration, }: Args) => string;
export {};
export declare const compileCss: (selector: string, [atRules, nested]: Selectors, declaration: string) => string;

@@ -1,1 +0,1 @@

var i=({selector:t,selectors:{nested:o,atRules:s},declaration:l})=>{let r="",e="";return o?r=`${o.replace(/&/g,`${t}`)}`:r=`${t}`,e=`${r}{${l}}`,s.length!==0&&s.forEach(c=>e=`${c}{${e}}`),e};export{i as compileCss};
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};
import type { KeyframesRules } from '../types/style';
export declare const compileKeyFrameCss: (keyframeObject: KeyframesRules) => {
keyframesRule: string;
keyframeName: string;
};
export declare const compileKeyFrameCss: (keyframeObject: KeyframesRules) => [keyframeName: string, keyframesRule: string];

@@ -1,1 +0,1 @@

import{hash as n}from"../hash.js";import{compileNestedCss as c}from"./compileNestedCss.js";var y=e=>{let s=[];for(let t in e){let m=e[t];s.push(`${c({selector:t,style:m||{}}).join("")}`)}let o=s.join(""),r=`_${n(o)}`;return{keyframesRule:`@keyframes ${r}{${o}}`,keyframeName:r}};export{y as compileKeyFrameCss};
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 type { CssValue, Selectors } from '../types/common';
import type { AndArray } from '../types/utils';
type Args = {
selectors: Selectors;
property: string;
styleValue: AndArray<CssValue>;
};
export declare const hashClassName: ({ selectors: { nested, atRules }, property, styleValue, }: Args) => string;
export {};
export declare const hashClassName: ([atRules, nested]: Selectors, property: string, styleValue: AndArray<CssValue>) => string;

@@ -1,1 +0,1 @@

import{hash as o}from"../hash.js";import{styleValueStringify as l}from"./styleValueStringify.js";var y=({selectors:{nested:r,atRules:s},property:e,styleValue:t})=>`_${o(`${e}${r}${s.join("")}${l(t)}`)}`;export{y as hashClassName};
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 type { Selectors } from '../types/common';
type Args = {
selectors: Selectors;
property: string;
};
export declare const hashSelector: ({ selectors: { nested, atRules }, property, }: Args) => string;
export {};
export declare const hashSelector: ([atRules, nested]: Selectors, property: string) => string;

@@ -1,1 +0,1 @@

import{hash as o}from"../hash.js";var p=({selectors:{nested:r,atRules:e},property:t})=>`_${o(`${t}${r}${e.join("")}`)}`;export{p as hashSelector};
import{hash as e}from"../hash.js";var m=([o,r],t)=>`_${e(`${o.join("")}${r}${t}`)}`;export{m as hashSelector};

@@ -1,1 +0,1 @@

export declare const hyphenateProperty: (str: string) => string;
export declare const hyphenateProperty: (property: string) => string;

@@ -1,1 +0,1 @@

var n=e=>e.includes("-")?e:e.replace(/[A-Z]/g,r=>"-"+r.toLowerCase());export{n as hyphenateProperty};
var s=e=>e.includes("-")?e:e.replace(/[A-Z]/g,r=>"-"+r.toLowerCase());export{s as hyphenateProperty};

@@ -1,6 +0,1 @@

type Args = {
nested: string;
current: string;
};
export declare const normalizeNestedSelector: ({ nested, current }: Args) => string;
export {};
export declare const normalizeNestedSelector: (current: string, nested: string) => string;

@@ -1,1 +0,1 @@

var i=({nested:r,current:e})=>{let t=e;return e?t+=r.charAt(0)==="&"?r.slice(1):r:t=r.includes("&")?r:"&"+r,t};export{i as normalizeNestedSelector};
var c=(l,r)=>{let i=l;return l?i+=r.charAt(0)==="&"?r.slice(1):r:i=r.includes("&")?r:"&"+r,i};export{c as normalizeNestedSelector};
import type { Selectors } from '../types/common';
type Args = {
property: string;
selectors: Selectors;
};
export declare const resolveSelectors: ({ property, selectors }: Args) => Selectors;
export {};
export declare const resolveSelectors: (selectors: Selectors, property: string) => Selectors;

@@ -1,1 +0,1 @@

import{isNestedSelector as r}from"./isNestedSelector.js";import{normalizeNestedSelector as s}from"./normalizeNestedSelector.js";var i=({property:t,selectors:e})=>t.substring(0,1)==="@"?Object.assign({},e,{atRules:[t].concat(e.atRules)}):r(t)?Object.assign({},e,{nested:s({current:e.nested,nested:t})}):e;export{i as resolveSelectors};
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 type { CssValue } from '../types/common';
import type { AndArray } from '../types/utils';
type Args = {
property: string;
styleValue: AndArray<CssValue>;
};
export declare const styleDeclarationStringify: ({ property, styleValue }: Args) => string;
export {};
export declare const styleDeclarationStringify: (property: string, styleValue: AndArray<CssValue>) => string;

@@ -1,1 +0,1 @@

import{hyphenateProperty as e}from"./hyphenateProperty.js";import{styleValueStringify as o}from"./styleValueStringify.js";var s=({property:r,styleValue:t})=>`${e(r)}:${o(t)};`;export{s as styleDeclarationStringify};
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};
{
"name": "@kaze-style/core",
"version": "0.12.0",
"version": "0.13.0",
"license": "MIT",

@@ -22,19 +22,6 @@ "author": "Taishi Naritomi",

"types": "./dist/index.d.ts"
},
"./runtime": {
"import": "./dist/runtime.js",
"require": "./dist/cjs/runtime.js",
"types": "./dist/runtime.d.ts"
}
},
"typesVersions": {
"*": {
"runtime": [
"./dist/runtime"
]
}
},
"files": [
"dist",
"runtime",
"LICENSE"

@@ -45,3 +32,3 @@ ],

"dev": "tsx ./../../scripts/build.ts --watch",
"build": "tsx ./../../scripts/build.ts --size --sizeEntry src/runtime.ts"
"build": "tsx ./../../scripts/build.ts --size"
},

@@ -48,0 +35,0 @@ "dependencies": {

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