@kaze-style/core
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -1,1 +0,1 @@ | ||
import{ClassName as o}from"./ClassName";import{resolveStyle as n}from"./resolveStyle";const j=e=>{const t={},l={},c=[];for(const s in e){const{classNameObject:a,cssRuleObjects:r}=n({style:e[s]});c.push(...r),t[s]=new o(a),l[s]=a}return{classes:t,classesObject:l,cssRuleObjects:Array.from(new Set(c))}};export{j as createStyle}; | ||
import{ClassName as o}from"./ClassName";import{resolveStyle as n}from"./resolveStyle";const b=e=>{const t={},c={},l=[];for(const s in e){const{classNameObject:a,cssRuleObjects:r}=n({style:e[s]});l.push(...r),t[s]=new o(a),c[s]=a}return{classes:t,classesObject:c,cssRuleObjects:Array.from(new Map(l.map(s=>[s.cssRule,s])).values())}};export{b as createStyle}; |
@@ -1,1 +0,1 @@ | ||
import{checkStyleOrder as b}from"./utils/checkStyleOrder";import{combinedQuery as y}from"./utils/combinedQuery";import{compileCss as O}from"./utils/compileCss";import{compileKeyFrameCss as j}from"./utils/compileKeyFrameCss";import{hashClassName as u}from"./utils/hashClassName";import{hashSelector as N}from"./utils/hashSelector";import{hyphenateProperty as h}from"./utils/hyphenateProperty";import{isCssValue as g}from"./utils/isCssValue";import{isLayerSelector as C}from"./utils/isLayerSelector";import{isMediaQuerySelector as S}from"./utils/isMediaQuerySelector";import{isNestedSelector as d}from"./utils/isNestedSelector";import{isObject as R}from"./utils/isObject";import{isShortHandProperty as K}from"./utils/isShortHandProperty";import{isSupportQuerySelector as Q}from"./utils/isSupportQuerySelector";import{normalizeNestedProperty as k}from"./utils/normalizeNestedProperty";import{omit as z}from"./utils/omit";import{resolveShortHandStyle as A}from"./utils/resolveShortHandStyle";const i=({style:p,pseudo:o="",atRules:e={media:"",layer:"",support:""},resolvedStyle:t={classNameObject:{},cssRuleObjects:[]}})=>{for(const l in p){const r=l,m=p[r];if(g(m))if(K(r)){const s=A(r,m);i({style:Object.assign(z(p,[r]),s),pseudo:o,atRules:e,resolvedStyle:t})}else{const s=h(r),a=u({pseudo:o,atRules:e,property:s,styleValue:m}),c=N({pseudo:o,atRules:e,property:s}),n=O({className:a,pseudo:o,atRules:e,property:s,styleValue:m}),f=b({atRules:e,pseudo:o});t.cssRuleObjects.push({cssRule:n,order:f}),Object.assign(t.classNameObject,{[c]:a})}else if(r==="animationName"){const s=m,{keyframesRule:a,keyframeName:c}=j(s);t.cssRuleObjects.push({cssRule:a,order:"keyframes"}),Object.assign(t.classNameObject,{[c]:c}),i({style:{animationName:c},pseudo:o,atRules:e,resolvedStyle:t})}else if(R(m))if(S(r)){const s=y(e.media,r.slice(6).trim());i({style:m,pseudo:o,atRules:Object.assign(e,{media:s}),resolvedStyle:t})}else if(C(r)){const s=(e.layer?`${e.layer}.`:"")+r.slice(6).trim();i({style:m,pseudo:o,atRules:Object.assign(e,{layer:s}),resolvedStyle:t})}else if(Q(r)){const s=y(e.support,r.slice(9).trim());i({style:m,pseudo:o,atRules:Object.assign(e,{support:s}),resolvedStyle:t})}else d(r)&&i({style:m,pseudo:o+k(r),atRules:e,resolvedStyle:t})}return t};export{i as resolveStyle}; | ||
import{checkStyleOrder as b}from"./utils/checkStyleOrder";import{combinedQuery as y}from"./utils/combinedQuery";import{compileCss as O}from"./utils/compileCss";import{compileKeyFrameCss as j}from"./utils/compileKeyFrameCss";import{hashClassName as u}from"./utils/hashClassName";import{hashSelector as N}from"./utils/hashSelector";import{hyphenateProperty as h}from"./utils/hyphenateProperty";import{isCssValue as g}from"./utils/isCssValue";import{isLayerSelector as C}from"./utils/isLayerSelector";import{isMediaQuerySelector as S}from"./utils/isMediaQuerySelector";import{isNestedSelector as d}from"./utils/isNestedSelector";import{isObject as R}from"./utils/isObject";import{isShortHandProperty as K}from"./utils/isShortHandProperty";import{isSupportQuerySelector as Q}from"./utils/isSupportQuerySelector";import{normalizeNestedProperty as k}from"./utils/normalizeNestedProperty";import{omit as z}from"./utils/omit";import{resolveShortHandStyle as A}from"./utils/resolveShortHandStyle";const i=({style:p,pseudo:o="",atRules:e={media:"",layer:"",support:""},resolvedStyle:t={classNameObject:{},cssRuleObjects:[]}})=>{for(const l in p){const r=l,m=p[r];if(g(m))if(K(r)){const s=A(r,m);i({style:Object.assign(z(p,[r]),s),pseudo:o,atRules:e,resolvedStyle:t})}else{const s=h(r),a=u({pseudo:o,atRules:e,property:s,styleValue:m}),c=N({pseudo:o,atRules:e,property:s}),n=O({className:a,pseudo:o,atRules:e,property:s,styleValue:m}),f=b({atRules:e,pseudo:o});t.cssRuleObjects.push({cssRule:n,order:f}),Object.assign(t.classNameObject,{[c]:a})}else if(r==="animationName"){const s=m,{keyframesRule:a,keyframeName:c}=j(s);t.cssRuleObjects.push({cssRule:a,order:"keyframes"}),Object.assign(t.classNameObject,{[c]:c}),i({style:{animationName:c},pseudo:o,atRules:e,resolvedStyle:t})}else if(R(m))if(S(r)){const s=y(e.media,r.slice(6).trim());i({style:m,pseudo:o,atRules:Object.assign({},e,{media:s}),resolvedStyle:t})}else if(C(r)){const s=(e.layer?`${e.layer}.`:"")+r.slice(6).trim();i({style:m,pseudo:o,atRules:Object.assign({},e,{layer:s}),resolvedStyle:t})}else if(Q(r)){const s=y(e.support,r.slice(9).trim());i({style:m,pseudo:o,atRules:Object.assign({},e,{support:s}),resolvedStyle:t})}else d(r)&&i({style:m,pseudo:o+k(r),atRules:e,resolvedStyle:t})}return t};export{i as resolveStyle}; |
@@ -1,1 +0,1 @@ | ||
const e=r=>r.substr(0,6)==="@layer";export{e as isLayerSelector}; | ||
const t=e=>{const r="@layer";return e.substring(0,r.length)===r};export{t as isLayerSelector}; |
@@ -1,1 +0,1 @@ | ||
const r=e=>e.substr(0,6)==="@media";export{r as isMediaQuerySelector}; | ||
const r=t=>{const e="@media";return t.substring(0,e.length)===e};export{r as isMediaQuerySelector}; |
@@ -1,1 +0,1 @@ | ||
const t=r=>r.substr(0,9)==="@supports";export{t as isSupportQuerySelector}; | ||
const s=r=>{const t="@supports";return r.substring(0,t.length)===t};export{s as isSupportQuerySelector}; |
{ | ||
"name": "@kaze-style/core", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Taishi Naritomi", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
68244