@styleframe/core 3.5.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/{styleframe.d.ts → index.d.cts} +19 -0
- package/dist/index.d.mts +665 -0
- package/dist/index.d.ts +665 -0
- package/dist/styleframe.js +815 -988
- package/dist/styleframe.umd.cjs +1 -1
- package/package.json +16 -13
package/dist/styleframe.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(l,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(l=typeof globalThis<"u"?globalThis:l||self,A(l.styleframe={}))})(this,(function(l){"use strict";function A(e){return typeof e=="object"&&e!==null}function b(e,t){return A(e)&&"type"in e&&e.type===t}function C(e){return b(e,"variable")}function p(e){return b(e,"reference")}function _e(e){return b(e,"selector")}function Y(e){return b(e,"at-rule")}function Fe(e){return b(e,"utility")}function Z(e){return b(e,"modifier")}function k(e){return b(e,"css")}function Se(e){return b(e,"theme")}function M(e){return b(e,"root")}function Te(e){return b(e,"recipe")}function J(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null}function $(e){return J(e)||p(e)||k(e)||Array.isArray(e)&&e.every($)}function $e(e){return A(e)&&"id"in e&&"children"in e&&"declarations"in e&&"variables"in e}function P(e){return A(e)&&"children"in e&&"declarations"in e&&"variables"in e}function Q(e){return typeof e=="string"&&e.startsWith("@")}function Ee(e){return A(e)&&"id"in e&&"root"in e&&"variable"in e&&"selector"in e&&"recipe"in e&&typeof e.id=="string"&&M(e.root)}function x(e){let t=5381;for(let r=0;r<e.length;r++)t=(t<<5)+t+e.charCodeAt(r)&4294967295;return(t>>>0).toString(16).padStart(7,"0").slice(0,7)}function B(e){const t=typeof e=="function"?{replacer:e}:e??{},{replacer:r=c=>c,namespace:n}=t,s=Array.isArray(n)?n:n?[n]:[];return c=>{let i=c,o;if(typeof i=="string"&&i[0]==="@"){const a=i.slice(1),f=s.find(y=>a===y||a.startsWith(`${y}.`));let d,u;f?(d=a,u=a.startsWith(`${f}.`)?a.slice(f.length+1):a):s.length>0?(d=`${s[0]}.${a}`,u=a):(d=a,u=a),o=r(u),i={type:"reference",name:d}}else if(p(i)){let a=i.name;for(const f of s)if(a.startsWith(`${f}.`)){a=a.slice(f.length+1);break}o=r(a)}else{const a=String(c).trim();/\s/.test(a)?o=x(a):o=`[${a}]`}return{[o]:i}}}const ee=({name:e,value:t,modifiers:r})=>`_${[...r,e,...t==="default"?[]:[t]].filter(Boolean).join(":")}`;function te(e,t){if(p(t)){e._usage.variables.add(t.name);return}if(k(t))for(const r of t.value)p(r)&&e._usage.variables.add(r.name)}const D=/@([\w.-]+)/g;function I(e){const t=[];let r=0,n;for(D.lastIndex=0;(n=D.exec(e))!==null;){const c=e.slice(r,n.index);c!==""&&t.push(c),t.push({type:"reference",name:n[1]}),r=D.lastIndex}const s=e.slice(r);return s!==""&&t.push(s),t}function ne(e,t,r){let n=t;for(;n;){if(n.variables.some(s=>s.name===e))return!0;if(n.parentId)n=r._registry.get(n.parentId);else break}return!1}function re(e,t,r){if(!ne(e,t,r))throw new Error(`[styleframe] Variable "${e}" is not defined. Check that the variable exists before referencing it with "@${e}".`)}function E(e,t){return function(n){if(typeof n!="string"||!n.includes("@"))return n;if(Q(n)&&/^@[\w.-]+$/.test(n)){const i=n.slice(1);return re(i,e,t),t._usage.variables.add(i),{type:"reference",name:i}}const s=I(n);if(s.some(i=>p(i))){for(const i of s)p(i)&&t._usage.variables.add(i.name);return{type:"css",value:s}}return n}}function K(e,t){return function(n,s){const c=E(e,t),i=s!=null?c(s):s;if(C(n))return t._usage.variables.add(n.name),{type:"reference",name:n.name,fallback:i};if(n==null)throw new Error(`[styleframe] ref() received ${String(n)}. This usually means you're referencing a variable that doesn't exist.`);return t._usage.variables.add(n),{type:"reference",name:n,fallback:i}}}function ie(e,t){const r=K(e,t),n=s=>{const c=I(s);for(const i of c)p(i)&&t._usage.variables.add(i.name);return c};return function(c,...i){return{type:"css",value:c.reduce((a,f,d)=>{if(a.push(...n(f)),d<i.length){const u=i[d];C(u)?a.push(r(u)):Y(u)?a.push(u.rule):typeof u=="string"&&u.includes("@")?a.push(...n(u)):a.push(u)}return a},[])}}}function Oe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ne(e){return`.${e.replace(/[[\].#()%,:/]/g,"\\$&")}`}function j(e){if(e instanceof Buffer)return Buffer.from(e);const t=e.constructor;return new t(e.buffer.slice(0),e.byteOffset,e.byteLength/e.BYTES_PER_ELEMENT||1)}function se(e){if(e=e||{},e.circular)return Ue(e);const t=new Map;if(t.set(Date,i=>new Date(i)),t.set(Map,(i,o)=>new Map(n(Array.from(i),o))),t.set(Set,(i,o)=>new Set(n(Array.from(i),o))),e.constructorHandlers)for(const i of e.constructorHandlers)t.set(i[0],i[1]);let r;return e.proto?c:s;function n(i,o){const a=Object.keys(i),f=Array.from({length:a.length});for(let d=0;d<a.length;d++){const u=a[d],y=i[u];typeof y!="object"||y===null?f[u]=y:y.constructor!==Object&&(r=t.get(y.constructor))?f[u]=r(y,o):ArrayBuffer.isView(y)?f[u]=j(y):f[u]=o(y)}return f}function s(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return n(i,s);if(i.constructor!==Object&&(r=t.get(i.constructor)))return r(i,s);const o={};for(const a in i){if(Object.hasOwnProperty.call(i,a)===!1)continue;const f=i[a];typeof f!="object"||f===null?o[a]=f:f.constructor!==Object&&(r=t.get(f.constructor))?o[a]=r(f,s):ArrayBuffer.isView(f)?o[a]=j(f):o[a]=s(f)}return o}function c(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return n(i,c);if(i.constructor!==Object&&(r=t.get(i.constructor)))return r(i,c);const o={};for(const a in i){const f=i[a];typeof f!="object"||f===null?o[a]=f:f.constructor!==Object&&(r=t.get(f.constructor))?o[a]=r(f,c):ArrayBuffer.isView(f)?o[a]=j(f):o[a]=c(f)}return o}}function Ue(e){const t=[],r=[],n=new Map;if(n.set(Date,a=>new Date(a)),n.set(Map,(a,f)=>new Map(c(Array.from(a),f))),n.set(Set,(a,f)=>new Set(c(Array.from(a),f))),e.constructorHandlers)for(const a of e.constructorHandlers)n.set(a[0],a[1]);let s;return e.proto?o:i;function c(a,f){const d=Object.keys(a),u=Array.from({length:d.length});for(let y=0;y<d.length;y++){const m=d[y],h=a[m];if(typeof h!="object"||h===null)u[m]=h;else if(h.constructor!==Object&&(s=n.get(h.constructor)))u[m]=s(h,f);else if(ArrayBuffer.isView(h))u[m]=j(h);else{const v=t.indexOf(h);v!==-1?u[m]=r[v]:u[m]=f(h)}}return u}function i(a){if(typeof a!="object"||a===null)return a;if(Array.isArray(a))return c(a,i);if(a.constructor!==Object&&(s=n.get(a.constructor)))return s(a,i);const f={};t.push(a),r.push(f);for(const d in a){if(Object.hasOwnProperty.call(a,d)===!1)continue;const u=a[d];if(typeof u!="object"||u===null)f[d]=u;else if(u.constructor!==Object&&(s=n.get(u.constructor)))f[d]=s(u,i);else if(ArrayBuffer.isView(u))f[d]=j(u);else{const y=t.indexOf(u);y!==-1?f[d]=r[y]:f[d]=i(u)}}return t.pop(),r.pop(),f}function o(a){if(typeof a!="object"||a===null)return a;if(Array.isArray(a))return c(a,o);if(a.constructor!==Object&&(s=n.get(a.constructor)))return s(a,o);const f={};t.push(a),r.push(f);for(const d in a){const u=a[d];if(typeof u!="object"||u===null)f[d]=u;else if(u.constructor!==Object&&(s=n.get(u.constructor)))f[d]=s(u,o);else if(ArrayBuffer.isView(u))f[d]=j(u);else{const y=t.indexOf(u);y!==-1?f[d]=r[y]:f[d]=o(u)}}return t.pop(),r.pop(),f}}const _=se();function w(e,t=8){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let s=0;s<t;s++){const c=Math.floor(Math.random()*r.length);n+=r[c]}return e?`${e}${n}`:n}function Ce(e,t){const r=e.variables.find(n=>n.name===t);if(!r)throw new Error(`Variable "${t}" not found`);return r}function Pe(e,t){const r=e.utilities.find(n=>n.name===t);if(!r)throw new Error(`Utility "${t}" not found`);return r}function ce(e,t){const r=e.modifiers.find(n=>n.key.includes(t));if(!r)throw new Error(`Modifier "${t}" not found`);return r}function O(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e===null||t===null)return e===t;if(typeof e!="object"||typeof t!="object")return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((r,n)=>O(r,t[n]));if("type"in e&&"type"in t){if(e.type!==t.type)return!1;if(p(e)&&p(t))return e.name===t.name&&O(e.fallback,t.fallback);if(k(e)&&k(t))return O(e.value,t.value)}return!1}const ae="__licenseRequired";function Be(e){W(e)||Object.defineProperty(e,ae,{value:!0,writable:!1,configurable:!1,enumerable:!0})}function W(e){return Object.prototype.hasOwnProperty.call(e,ae)}function oe(e,t){const r=[...e];for(const n of t){const s=r.find(c=>c.name===n.name);s?s.value=n.value:r.push(n)}return r}function fe(e,t){const r=[...e];for(const n of t){const s=r.find(c=>c.name===n.name);s?Object.assign(s,H(s,n)):r.push(n)}return r}function H(e,t){return Object.keys(e).reduce((r,n)=>(n==="variables"?r.variables=oe(e.variables,t.variables):n==="declarations"?r.declarations={...e.declarations,...t.declarations}:n==="themes"&&M(r)&&M(e)&&M(t)?r.themes=fe(e.themes,t.themes):Array.isArray(e[n])&&(r[n]=e[n].concat(t[n])),r),{...e,...t})}function L(e,t){for(const r of e)"id"in r&&typeof r.id=="string"&&(t._registry.set(r.id,r),"children"in r&&L(r.children,t))}function ue(e){e._registry=new Map,e._registry.set(e.id,e),L(e.children,e);for(const t of e.themes)e._registry.set(t.id,t),L(t.children,e)}function De(e,...t){return t.reduce((r,n)=>{const s={...r,root:H(r.root,n.root)};return ue(s.root),(W(r)||W(n))&&Be(s),s},e)}function N(e,t){return function(n,s,c){const i={type:"at-rule",id:w("ar-"),parentId:e.id,identifier:n,rule:s,declarations:{},variables:[],children:[]};t._registry.set(i.id,i);const o=R(i,t);return typeof c=="function"?i.declarations=c(o)??{}:P(c)?(i.variables=c.variables,i.declarations=c.declarations,i.children=c.children):c&&(i.declarations=c),F(i.declarations,o,i,t),e.children.push(i),i}}function le(e,t){const r=N(e,t);return function(s,c){return r("media",s,c)}}function de(e,t){const r=N(e,t);return function(s,c){return r("keyframes",s,c)}}function ye(e,t){return function(n,s){const c={type:"selector",id:w("sel-"),parentId:e.id,query:n,declarations:{},variables:[],children:[]};t._registry.set(c.id,c);const i=R(c,t);return typeof s=="function"?c.declarations=s(i)??{}:P(s)?(c.variables=s.variables,c.declarations=s.declarations,c.children=s.children):c.declarations=s,F(c.declarations,i,c,t),e.children.push(c),c}}function me(e,t){return function(n,s,c={default:!1}){const i=typeof n=="string"?n:n.name,a=E(e,t)(s),f=e.variables.find(u=>u.name===i);if(c.default&&f)return f;if(f)return f.value=a,f;const d={type:"variable",id:w("var-"),parentId:e.id,name:i,value:a};return e.variables.push(d),d}}function R(e,t){const r=me(e,t),n=ye(e,t),s=N(e,t),c=de(t,t),i=le(e,t),o=K(t,t),a=ie(t,t);return{variable:r,selector:n,keyframes:c,atRule:s,media:i,ref:o,css:a}}function F(e,t,r,n){for(const c in e)if(c.startsWith("@")){const i=e[c];if(typeof i=="object"&&i!==null&&!$(i)){const o=c.replace(/^@(\w+).*/,"$1"),a=c.replace(`@${o}`,"").trim();t.atRule(o,a,i),delete e[c]}}else if(/^[.&:]/.test(c)||/^(\d+%|from|to)(\s*,\s*(\d+%|from|to))*$/.test(c)){const i=e[c];typeof i=="object"&&(t.selector(c,i),delete e[c])}const s=E(r,n);for(const c in e){const i=e[c];if($(i)){const o=s(i);o!==i&&(e[c]=o)}}return e}function he(e,t,r){const n={...e,id:w("ut-"),parentId:e.parentId,declarations:{...e.declarations},variables:[...e.variables],children:[...e.children],modifiers:[...r.keys()]};if(t._registry.set(n.id,n),r.size>0){const s=[...r.values()];let c=_(e.declarations);n.declarations={},n.variables=[],n.children=[];for(let o=s.length-1;o>=0;o--){const a=R(n,t),f=s[o]?.factory({...a,declarations:_(c),variables:_(e.variables),children:_(e.children)});f&&(c=f)}n.declarations=c;const i=R(n,t);F(n.declarations,i,n,t)}return n}function ge(e,t){return function(n,s){const c={type:"modifier",key:Array.isArray(n)?n:[n],factory:s};return t.modifiers.push(c),c}}function pe(){const e={type:"root",id:w("rt-"),declarations:{},utilities:[],modifiers:[],recipes:[],variables:[],children:[],themes:[],_registry:new Map,_usage:{variables:new Set,utilities:new Set}};return e._registry.set(e.id,e),e}function Ie(e,t){const r=B({namespace:e});return n=>{if(typeof n=="string"&&n[0]==="@"){const s=n.slice(1),c=e.find(i=>s===i||s.startsWith(`${i}.`));if(c){const i=s.slice(c.length+1)||s;if(t.variables.some(o=>o.name===s))return t._usage.variables.add(s),{[i]:{type:"reference",name:s}}}else{for(const i of e){const o=`${i}.${s}`;if(t.variables.some(a=>a.name===o))return t._usage.variables.add(o),{[s]:{type:"reference",name:o}}}if(t.variables.some(i=>i.name===s))return t._usage.variables.add(s),{[s]:{type:"reference",name:s}}}return r(n)}return r(n)}}function Ke(e){let t=[new Map];for(const r of e){if(!Z(r))continue;const n=[];for(const s of r.key)for(const c of t){const i=new Map(c);i.set(s,r),n.push(i)}t=n}return t.filter(r=>r.size>0)}function be(e,t){return function(n,s,c={}){const i=t.utilities.find(a=>a.name===n);if(i)return i.create;const o={type:"utility",name:n,factory:s,values:[],autogenerate:c.autogenerate??(Array.isArray(c.namespace)?Ie(c.namespace,t):B(c.namespace?{namespace:c.namespace}:void 0)),namespace:c.namespace,create:(a,f=[])=>{let d=a;if(Array.isArray(a)){d={};for(const u of a){const y=o.autogenerate(u);for(const m of Object.values(y))te(t,m);d={...d,...y}}}for(const[u,y]of Object.entries(d)){let m=y;if(typeof y=="string"&&y[0]==="@"){const g=y.slice(1);!Array.isArray(d)&&g in d&&(m=d[g])}if(o.namespace&&p(y))if(t.variables.some(g=>g.name===y.name))m=y,t._usage.variables.add(y.name);else{const g=Array.isArray(o.namespace)?o.namespace:[o.namespace];let U=!1;for(const S of g){const V=`${S}.${u}`;if(V!==y.name&&t.variables.some(T=>T.name===V)){m={type:"reference",name:V},t._usage.variables.add(V),U=!0;break}}U||(t.variables.some(S=>S.name===u)?(m={type:"reference",name:u},t._usage.variables.add(u)):m=u)}const h=o.values.find(g=>g.key===u&&g.modifiers.length===0),v={type:"utility",id:w("ut-"),parentId:e.id,name:n,value:u,declarations:{},variables:[],children:[],modifiers:[]};t._registry.set(v.id,v);const Me=R(v,t);if(v.declarations=s({...Me,value:m})??{},F(v.declarations,Me,v,t),h||(o.values.push({key:u,value:m,modifiers:[]}),e.children.push(v)),f&&f.length>0)for(const g of f){const U=Array.isArray(g)?g:[g],S=Ke(U);for(const V of S){const T=[...V.keys()];o.values.find(X=>X.key===u&&X.modifiers.length===T.length&&X.modifiers.every((He,Le)=>He===T[Le]))||(o.values.push({key:u,value:m,modifiers:T}),e.children.push(he(v,t,V)))}}}}};return t.utilities.push(o),o.create}}function ve(e,t){return function(n,s){const c=t.themes.find(a=>a.name===n),i=c??{type:"theme",id:w("th-"),parentId:t.id,name:n,declarations:{},variables:[],children:[]};c||(t._registry.set(i.id,i),t.themes.push(i));const o=R(i,t);return s&&s(o),i}}function Ae(e,t){return function(n){const s={type:"recipe",...n};return s._runtime=Re(s,t),ke(s,t),t.recipes.push(s),s}}function we(e,t){const r=e.autogenerate(t);return Object.keys(r)[0]??"default"}function z(e,t){const r={};for(const[n,s]of Object.entries(e))if(Ve(s)){const c={};for(const[i,o]of Object.entries(s)){const a=q(t,i);if(!a)throw new Error(`[styleframe] Utility "${i}" not found in registry. Make sure the utility is registered before using it in a recipe.`);c[i]=we(a,o)}r[je(n)]=c}else if(typeof s=="boolean")r[n]=s;else{const c=q(t,n);if(!c)throw new Error(`[styleframe] Utility "${n}" not found in registry. Make sure the utility is registered before using it in a recipe.`);r[n]=we(c,s)}return r}function Re(e,t){const r={};if(e.base&&(r.base=z(e.base,t)),e.variants){const n={};for(const[s,c]of Object.entries(e.variants)){const i={};for(const[o,a]of Object.entries(c))a==null?i[o]=null:i[o]=z(a,t);n[s]=i}r.variants=n}return e.defaultVariants&&(r.defaultVariants={...e.defaultVariants}),e.compoundVariants&&(r.compoundVariants=e.compoundVariants.map(n=>({match:{...n.match},...n.css?{css:z(n.css,t)}:{},...n.className?{className:n.className}:{}}))),r}function Ve(e){return!p(e)&&typeof e=="object"&&e!==null}function je(e){return e.startsWith("&::")?e.slice(3):e.startsWith("&:")?e.slice(2):e}function G(e,t){const r=(n,s,c)=>{let i=t.get(n);i||(i=[],t.set(n,i)),i.push({value:s,modifiers:c})};for(const[n,s]of Object.entries(e))if(Ve(s)){const c=je(n).split(":");for(const[i,o]of Object.entries(s))r(i,o,c)}else r(n,s,[])}function q(e,t){const r=e.utilities.find(s=>s.name===t);if(r)return r;const n=t.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`);return e.utilities.find(s=>s.name===n)}function ke(e,t){const r=new Map;if(e.base&&G(e.base,r),e.variants)for(const s of Object.values(e.variants))for(const c of Object.values(s))G(c,r);if(e.compoundVariants)for(const s of e.compoundVariants)s.css&&G(s.css,r);const n=new Map;for(const[s,c]of r){const i=q(t,s);if(!i)throw new Error(`[styleframe] Utility "${s}" not found in registry. Make sure the utility is registered before using it in a recipe.`);for(const o of c){const a=[];for(const d of o.modifiers){if(!n.has(d))try{n.set(d,ce(t,d))}catch{throw new Error(`[styleframe] Modifier "${d}" not found in registry. Make sure the modifier is registered before using it in a recipe.`)}const u=n.get(d);u&&a.push(u)}const f=i.autogenerate(o.value);for(const d of Object.keys(f))t._usage.utilities.add(ee({name:i.name,value:d,modifiers:o.modifiers}));i.create([o.value],a.length>0?a.length>1?[a]:a:void 0)}}}function We(e){const t=w("sf-"),r=pe(),n={...e},s=be(r,r),c=ge(r,r),i=Ae(r,r),o=ve(r,r),{variable:a,selector:f,atRule:d,keyframes:u,media:y,ref:m,css:h}=R(r,r);return{id:t,root:r,variable:a,selector:f,utility:s,modifier:c,recipe:i,theme:o,atRule:d,keyframes:u,media:y,ref:m,css:h,options:n}}l.applyModifiers=he,l.capitalizeFirst=Oe,l.classNameToCssSelector=Ne,l.createAtRuleFunction=N,l.createCssFunction=ie,l.createDeclarationsCallbackContext=R,l.createKeyframesFunction=de,l.createMediaFunction=le,l.createModifierFunction=ge,l.createPropertyValueResolver=E,l.createRecipeFunction=Ae,l.createRefFunction=K,l.createRoot=pe,l.createSelectorFunction=ye,l.createThemeFunction=ve,l.createUtilityFunction=be,l.createVariableFunction=me,l.deepClone=_,l.defaultUtilitySelectorFn=ee,l.findVariableInScope=ne,l.generateRandomId=w,l.generateRecipeRuntime=Re,l.getModifier=ce,l.getUtility=Pe,l.getVariable=Ce,l.hashValue=x,l.isAtRule=Y,l.isCSS=k,l.isContainer=$e,l.isContainerInput=P,l.isKeyReferenceValue=Q,l.isModifier=Z,l.isObject=A,l.isPrimitiveTokenValue=J,l.isRecipe=Te,l.isRef=p,l.isRoot=M,l.isSelector=_e,l.isStyleframe=Ee,l.isTheme=Se,l.isToken=b,l.isTokenEqual=O,l.isTokenValue=$,l.isUtility=Fe,l.isVariable=C,l.merge=De,l.mergeContainers=H,l.mergeThemesArray=fe,l.mergeVariablesArray=oe,l.parseAtReferences=I,l.parseDeclarationsBlock=F,l.processRecipeUtilities=ke,l.rebuildRegistry=ue,l.rfdc=se,l.styleframe=We,l.trackReferenceUsage=te,l.transformUtilityKey=B,l.validateReference=re,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.styleframe={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`object`&&!!e}function n(e,n){return t(e)&&`type`in e&&e.type===n}function r(e){return n(e,`variable`)}function i(e){return n(e,`reference`)}function a(e){return n(e,`selector`)}function o(e){return n(e,`at-rule`)}function s(e){return n(e,`utility`)}function c(e){return n(e,`modifier`)}function l(e){return n(e,`css`)}function u(e){return n(e,`theme`)}function d(e){return n(e,`root`)}function f(e){return n(e,`recipe`)}function p(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===null}function m(e){return p(e)||i(e)||l(e)||Array.isArray(e)&&e.every(m)}function ee(e){return t(e)&&`id`in e&&`children`in e&&`declarations`in e&&`variables`in e}function h(e){return t(e)&&`children`in e&&`declarations`in e&&`variables`in e}function g(e){return typeof e==`string`&&e.startsWith(`@`)}function te(e){return t(e)&&`id`in e&&`root`in e&&`variable`in e&&`selector`in e&&`recipe`in e&&typeof e.id==`string`&&d(e.root)}function _(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)&4294967295;return(t>>>0).toString(16).padStart(7,`0`).slice(0,7)}function v(e){let{replacer:t=e=>e,namespace:n}=typeof e==`function`?{replacer:e}:e??{},r=Array.isArray(n)?n:n?[n]:[];return e=>{let n=e,a;if(typeof n==`string`&&n[0]===`@`){let e=n.slice(1),i=r.find(t=>e===t||e.startsWith(`${t}.`)),o,s;i?(o=e,s=e.startsWith(`${i}.`)?e.slice(i.length+1):e):r.length>0?(o=`${r[0]}.${e}`,s=e):(o=e,s=e),a=t(s),n={type:`reference`,name:o}}else if(i(n)){let e=n.name;for(let t of r)if(e.startsWith(`${t}.`)){e=e.slice(t.length+1);break}a=t(e)}else{let t=String(e).trim();a=/\s/.test(t)?_(t):`[${t}]`}return{[a]:n}}}var y=({name:e,value:t,modifiers:n})=>`_${[...n,e,...t===`default`?[]:[t]].filter(Boolean).join(`:`)}`;function ne(e,t){if(i(t)){e._usage.variables.add(t.name);return}if(l(t))for(let n of t.value)i(n)&&e._usage.variables.add(n.name)}var b=/@([\w.-]+)/g;function x(e){let t=[],n=0,r;for(b.lastIndex=0;(r=b.exec(e))!==null;){let i=e.slice(n,r.index);i!==``&&t.push(i),t.push({type:`reference`,name:r[1]}),n=b.lastIndex}let i=e.slice(n);return i!==``&&t.push(i),t}function re(e,t,n){let r=t;for(;r;){if(r.variables.some(t=>t.name===e))return!0;if(r.parentId)r=n._registry.get(r.parentId);else break}return!1}function S(e,t,n){if(!re(e,t,n))throw Error(`[styleframe] Variable "${e}" is not defined. Check that the variable exists before referencing it with "@${e}".`)}function C(e,t){return function(n){if(typeof n!=`string`||!n.includes(`@`))return n;if(g(n)&&/^@[\w.-]+$/.test(n)){let r=n.slice(1);return S(r,e,t),t._usage.variables.add(r),{type:`reference`,name:r}}let r=x(n);if(r.some(e=>i(e))){for(let e of r)i(e)&&t._usage.variables.add(e.name);return{type:`css`,value:r}}return n}}function w(e,t){return function(n,i){let a=C(e,t),o=i==null?i:a(i);if(r(n))return t._usage.variables.add(n.name),{type:`reference`,name:n.name,fallback:o};if(n==null)throw Error(`[styleframe] ref() received ${String(n)}. This usually means you're referencing a variable that doesn't exist.`);return t._usage.variables.add(n),{type:`reference`,name:n,fallback:o}}}function T(e,t){let n=w(e,t),a=e=>{let n=x(e);for(let e of n)i(e)&&t._usage.variables.add(e.name);return n};return function(e,...t){return{type:`css`,value:e.reduce((e,i,s)=>{if(e.push(...a(i)),s<t.length){let i=t[s];r(i)?e.push(n(i)):o(i)?e.push(i.rule):typeof i==`string`&&i.includes(`@`)?e.push(...a(i)):e.push(i)}return e},[])}}}function ie(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ae(e){return`.${e.replace(/[[\].#()%,:/]/g,`\\$&`)}`}function E(e){if(e instanceof Buffer)return Buffer.from(e);let t=e.constructor;return new t(e.buffer.slice(0),e.byteOffset,e.byteLength/e.BYTES_PER_ELEMENT||1)}function oe(e){if(e||={},e.circular)return se(e);let t=new Map;if(t.set(Date,e=>new Date(e)),t.set(Map,(e,t)=>new Map(r(Array.from(e),t))),t.set(Set,(e,t)=>new Set(r(Array.from(e),t))),e.constructorHandlers)for(let n of e.constructorHandlers)t.set(n[0],n[1]);let n;return e.proto?a:i;function r(e,r){let i=Object.keys(e),a=Array.from({length:i.length});for(let o=0;o<i.length;o++){let s=i[o],c=e[s];typeof c!=`object`||!c?a[s]=c:c.constructor!==Object&&(n=t.get(c.constructor))?a[s]=n(c,r):ArrayBuffer.isView(c)?a[s]=E(c):a[s]=r(c)}return a}function i(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return r(e,i);if(e.constructor!==Object&&(n=t.get(e.constructor)))return n(e,i);let a={};for(let r in e){if(Object.hasOwnProperty.call(e,r)===!1)continue;let o=e[r];typeof o!=`object`||!o?a[r]=o:o.constructor!==Object&&(n=t.get(o.constructor))?a[r]=n(o,i):ArrayBuffer.isView(o)?a[r]=E(o):a[r]=i(o)}return a}function a(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return r(e,a);if(e.constructor!==Object&&(n=t.get(e.constructor)))return n(e,a);let i={};for(let r in e){let o=e[r];typeof o!=`object`||!o?i[r]=o:o.constructor!==Object&&(n=t.get(o.constructor))?i[r]=n(o,a):ArrayBuffer.isView(o)?i[r]=E(o):i[r]=a(o)}return i}}function se(e){let t=[],n=[],r=new Map;if(r.set(Date,e=>new Date(e)),r.set(Map,(e,t)=>new Map(a(Array.from(e),t))),r.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(let t of e.constructorHandlers)r.set(t[0],t[1]);let i;return e.proto?s:o;function a(e,a){let o=Object.keys(e),s=Array.from({length:o.length});for(let c=0;c<o.length;c++){let l=o[c],u=e[l];if(typeof u!=`object`||!u)s[l]=u;else if(u.constructor!==Object&&(i=r.get(u.constructor)))s[l]=i(u,a);else if(ArrayBuffer.isView(u))s[l]=E(u);else{let e=t.indexOf(u);e===-1?s[l]=a(u):s[l]=n[e]}}return s}function o(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return a(e,o);if(e.constructor!==Object&&(i=r.get(e.constructor)))return i(e,o);let s={};t.push(e),n.push(s);for(let a in e){if(Object.hasOwnProperty.call(e,a)===!1)continue;let c=e[a];if(typeof c!=`object`||!c)s[a]=c;else if(c.constructor!==Object&&(i=r.get(c.constructor)))s[a]=i(c,o);else if(ArrayBuffer.isView(c))s[a]=E(c);else{let e=t.indexOf(c);e===-1?s[a]=o(c):s[a]=n[e]}}return t.pop(),n.pop(),s}function s(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return a(e,s);if(e.constructor!==Object&&(i=r.get(e.constructor)))return i(e,s);let o={};t.push(e),n.push(o);for(let a in e){let c=e[a];if(typeof c!=`object`||!c)o[a]=c;else if(c.constructor!==Object&&(i=r.get(c.constructor)))o[a]=i(c,s);else if(ArrayBuffer.isView(c))o[a]=E(c);else{let e=t.indexOf(c);e===-1?o[a]=s(c):o[a]=n[e]}}return t.pop(),n.pop(),o}}var D=oe();function O(e,t=8){let n=``;for(let e=0;e<t;e++){let e=Math.floor(Math.random()*62);n+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[e]}return e?`${e}${n}`:n}function ce(e,t){let n=e.variables.find(e=>e.name===t);if(!n)throw Error(`Variable "${t}" not found`);return n}function le(e,t){let n=e.utilities.find(e=>e.name===t);if(!n)throw Error(`Utility "${t}" not found`);return n}function k(e,t){let n=e.modifiers.find(e=>e.key.includes(t));if(!n)throw Error(`Modifier "${t}" not found`);return n}function A(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e===null||t===null)return e===t;if(typeof e!=`object`||typeof t!=`object`)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length?e.every((e,n)=>A(e,t[n])):!1;if(`type`in e&&`type`in t){if(e.type!==t.type)return!1;if(i(e)&&i(t))return e.name===t.name&&A(e.fallback,t.fallback);if(l(e)&&l(t))return A(e.value,t.value)}return!1}var ue=`__licenseRequired`;function de(e){j(e)||Object.defineProperty(e,"__licenseRequired",{value:!0,writable:!1,configurable:!1,enumerable:!0})}function j(e){return Object.prototype.hasOwnProperty.call(e,ue)}function M(e,t){let n=[...e];for(let e of t){let t=n.find(t=>t.name===e.name);t?t.value=e.value:n.push(e)}return n}function N(e,t){let n=[...e];for(let e of t){let t=n.find(t=>t.name===e.name);t?Object.assign(t,P(t,e)):n.push(e)}return n}function P(e,t){return Object.keys(e).reduce((n,r)=>(r===`variables`?n.variables=M(e.variables,t.variables):r===`declarations`?n.declarations={...e.declarations,...t.declarations}:r===`themes`&&d(n)&&d(e)&&d(t)?n.themes=N(e.themes,t.themes):Array.isArray(e[r])&&(n[r]=e[r].concat(t[r])),n),{...e,...t})}function F(e,t){for(let n of e)`id`in n&&typeof n.id==`string`&&(t._registry.set(n.id,n),`children`in n&&F(n.children,t))}function I(e){e._registry=new Map,e._registry.set(e.id,e),F(e.children,e);for(let t of e.themes)e._registry.set(t.id,t),F(t.children,e)}function fe(e,...t){return t.reduce((e,t)=>{let n={...e,root:P(e.root,t.root)};return I(n.root),(j(e)||j(t))&&de(n),n},e)}function L(e,t){return function(n,r,i){let a={type:`at-rule`,id:O(`ar-`),parentId:e.id,identifier:n,rule:r,declarations:{},variables:[],children:[]};t._registry.set(a.id,a);let o=H(a,t);return typeof i==`function`?a.declarations=i(o)??{}:h(i)?(a.variables=i.variables,a.declarations=i.declarations,a.children=i.children):i&&(a.declarations=i),U(a.declarations,o,a,t),e.children.push(a),a}}function R(e,t){let n=L(e,t);return function(e,t){return n(`media`,e,t)}}function z(e,t){let n=L(e,t);return function(e,t){return n(`keyframes`,e,t)}}function B(e,t){return function(n,r){let i={type:`selector`,id:O(`sel-`),parentId:e.id,query:n,declarations:{},variables:[],children:[]};t._registry.set(i.id,i);let a=H(i,t);return typeof r==`function`?i.declarations=r(a)??{}:h(r)?(i.variables=r.variables,i.declarations=r.declarations,i.children=r.children):i.declarations=r,U(i.declarations,a,i,t),e.children.push(i),i}}function V(e,t){return function(n,r,i={default:!1}){let a=typeof n==`string`?n:n.name,o=C(e,t)(r),s=e.variables.find(e=>e.name===a);if(i.default&&s)return s;if(s)return s.value=o,s;let c={type:`variable`,id:O(`var-`),parentId:e.id,name:a,value:o};return e.variables.push(c),c}}function H(e,t){let n=V(e,t),r=B(e,t),i=L(e,t);return{variable:n,selector:r,keyframes:z(t,t),atRule:i,media:R(e,t),ref:w(t,t),css:T(t,t)}}function U(e,t,n,r){for(let n in e)if(n.startsWith(`@`)){let r=e[n];if(typeof r==`object`&&r&&!m(r)){let i=n.replace(/^@(\w+).*/,`$1`),a=n.replace(`@${i}`,``).trim();t.atRule(i,a,r),delete e[n]}}else if(/^[.&:]/.test(n)||/^(\d+%|from|to)(\s*,\s*(\d+%|from|to))*$/.test(n)){let r=e[n];typeof r==`object`&&(t.selector(n,r),delete e[n])}let i=C(n,r);for(let t in e){let n=e[t];if(m(n)){let r=i(n);r!==n&&(e[t]=r)}}return e}function W(e,t,n){let r={...e,id:O(`ut-`),parentId:e.parentId,declarations:{...e.declarations},variables:[...e.variables],children:[...e.children],modifiers:[...n.keys()]};if(t._registry.set(r.id,r),n.size>0){let i=[...n.values()],a=D(e.declarations);r.declarations={},r.variables=[],r.children=[];for(let n=i.length-1;n>=0;n--){let o=H(r,t),s=i[n]?.factory({...o,declarations:D(a),variables:D(e.variables),children:D(e.children)});s&&(a=s)}r.declarations=a;let o=H(r,t);U(r.declarations,o,r,t)}return r}function G(e,t){return function(e,n){let r={type:`modifier`,key:Array.isArray(e)?e:[e],factory:n};return t.modifiers.push(r),r}}function K(){let e={type:`root`,id:O(`rt-`),declarations:{},utilities:[],modifiers:[],recipes:[],variables:[],children:[],themes:[],_registry:new Map,_usage:{variables:new Set,utilities:new Set,recipes:new Set,recipeUtilities:new Map}};return e._registry.set(e.id,e),e}function pe(e,t){let n=v({namespace:e});return r=>{if(typeof r==`string`&&r[0]===`@`){let i=r.slice(1),a=e.find(e=>i===e||i.startsWith(`${e}.`));if(a){let e=i.slice(a.length+1)||i;if(t.variables.some(e=>e.name===i))return t._usage.variables.add(i),{[e]:{type:`reference`,name:i}}}else{for(let n of e){let e=`${n}.${i}`;if(t.variables.some(t=>t.name===e))return t._usage.variables.add(e),{[i]:{type:`reference`,name:e}}}if(t.variables.some(e=>e.name===i))return t._usage.variables.add(i),{[i]:{type:`reference`,name:i}}}return n(r)}return n(r)}}function me(e){let t=[new Map];for(let n of e){if(!c(n))continue;let e=[];for(let r of n.key)for(let i of t){let t=new Map(i);t.set(r,n),e.push(t)}t=e}return t.filter(e=>e.size>0)}function q(e,t){return function(n,r,a={}){let o=t.utilities.find(e=>e.name===n);if(o)return o.create;let s={type:`utility`,name:n,factory:r,values:[],autogenerate:a.autogenerate??(Array.isArray(a.namespace)?pe(a.namespace,t):v(a.namespace?{namespace:a.namespace}:void 0)),namespace:a.namespace,create:(a,o=[])=>{let c=a;if(Array.isArray(a)){c={};for(let e of a){let n=s.autogenerate(e);for(let e of Object.values(n))ne(t,e);c={...c,...n}}}for(let[a,l]of Object.entries(c)){let u=l;if(typeof l==`string`&&l[0]===`@`){let e=l.slice(1);!Array.isArray(c)&&e in c&&(u=c[e])}if(s.namespace&&i(l))if(t.variables.some(e=>e.name===l.name))u=l,t._usage.variables.add(l.name);else{let e=Array.isArray(s.namespace)?s.namespace:[s.namespace],n=!1;for(let r of e){let e=`${r}.${a}`;if(e!==l.name&&t.variables.some(t=>t.name===e)){u={type:`reference`,name:e},t._usage.variables.add(e),n=!0;break}}n||(t.variables.some(e=>e.name===a)?(u={type:`reference`,name:a},t._usage.variables.add(a)):u=a)}let d=s.values.find(e=>e.key===a&&e.modifiers.length===0),f={type:`utility`,id:O(`ut-`),parentId:e.id,name:n,value:a,declarations:{},variables:[],children:[],modifiers:[]};t._registry.set(f.id,f);let p=H(f,t);if(f.declarations=r({...p,value:u})??{},U(f.declarations,p,f,t),d||(s.values.push({key:a,value:u,modifiers:[]}),e.children.push(f)),o&&o.length>0)for(let n of o){let r=me(Array.isArray(n)?n:[n]);for(let n of r){let r=[...n.keys()];s.values.find(e=>e.key===a&&e.modifiers.length===r.length&&e.modifiers.every((e,t)=>e===r[t]))||(s.values.push({key:a,value:u,modifiers:r}),e.children.push(W(f,t,n)))}}}}};return t.utilities.push(s),s.create}}function J(e,t){return function(e,n){let r=t.themes.find(t=>t.name===e),i=r??{type:`theme`,id:O(`th-`),parentId:t.id,name:e,declarations:{},variables:[],children:[]};r||(t._registry.set(i.id,i),t.themes.push(i));let a=H(i,t);return n&&n(a),i}}function Y(e,t){return function(e){let n={type:`recipe`,...e};return n._runtime=he(n,t),ve(n,t),t.recipes.push(n),n}}function X(e,t){let n=e.autogenerate(t);return Object.keys(n)[0]??`default`}function Z(e,t){let n={};for(let[r,i]of Object.entries(e))if(ge(i)){let e={};for(let[n,r]of Object.entries(i)){let i=$(t,n);if(!i)throw Error(`[styleframe] Utility "${n}" not found in registry. Make sure the utility is registered before using it in a recipe.`);e[n]=X(i,r)}n[_e(r)]=e}else if(typeof i==`boolean`)n[r]=i;else{let e=$(t,r);if(!e)throw Error(`[styleframe] Utility "${r}" not found in registry. Make sure the utility is registered before using it in a recipe.`);n[r]=X(e,i)}return n}function he(e,t){let n={};if(e.base&&(n.base=Z(e.base,t)),e.variants){let r={};for(let[n,i]of Object.entries(e.variants)){let e={};for(let[n,r]of Object.entries(i))r==null?e[n]=null:e[n]=Z(r,t);r[n]=e}n.variants=r}return e.defaultVariants&&(n.defaultVariants={...e.defaultVariants}),e.compoundVariants&&(n.compoundVariants=e.compoundVariants.map(e=>({match:{...e.match},...e.css?{css:Z(e.css,t)}:{},...e.className?{className:e.className}:{}}))),n}function ge(e){return!i(e)&&typeof e==`object`&&!!e}function _e(e){return e.startsWith(`&::`)?e.slice(3):e.startsWith(`&:`)?e.slice(2):e}function Q(e,t){let n=(e,n,r)=>{let i=t.get(e);i||(i=[],t.set(e,i)),i.push({value:n,modifiers:r})};for(let[t,r]of Object.entries(e))if(ge(r)){let e=_e(t).split(`:`);for(let[t,i]of Object.entries(r))n(t,i,e)}else n(t,r,[])}function $(e,t){let n=e.utilities.find(e=>e.name===t);if(n)return n;let r=t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);return e.utilities.find(e=>e.name===r)}function ve(e,t){let n=new Map;if(e.base&&Q(e.base,n),e.variants)for(let t of Object.values(e.variants))for(let e of Object.values(t))Q(e,n);if(e.compoundVariants)for(let t of e.compoundVariants)t.css&&Q(t.css,n);let r=new Map;for(let[i,a]of n){let n=$(t,i);if(!n)throw Error(`[styleframe] Utility "${i}" not found in registry. Make sure the utility is registered before using it in a recipe.`);for(let i of a){let a=[];for(let e of i.modifiers){if(!r.has(e))try{r.set(e,k(t,e))}catch{throw Error(`[styleframe] Modifier "${e}" not found in registry. Make sure the modifier is registered before using it in a recipe.`)}let n=r.get(e);n&&a.push(n)}let o=n.autogenerate(i.value);for(let r of Object.keys(o)){let a=y({name:n.name,value:r,modifiers:i.modifiers}),o=t._usage.recipeUtilities.get(e.name);o||(o=new Set,t._usage.recipeUtilities.set(e.name,o)),o.add(a)}n.create([i.value],a.length>0?a.length>1?[a]:a:void 0)}}}function ye(e,t){for(let[n,r]of e._usage.recipeUtilities)if(!t||t.has(n))for(let t of r)e._usage.utilities.add(t)}function be(e){let t=O(`sf-`),n=K(),r={...e},i=q(n,n),a=G(n,n),o=Y(n,n),s=J(n,n),{variable:c,selector:l,atRule:u,keyframes:d,media:f,ref:p,css:m}=H(n,n);return{id:t,root:n,variable:c,selector:l,utility:i,modifier:a,recipe:o,theme:s,atRule:u,keyframes:d,media:f,ref:p,css:m,options:r}}e.applyModifiers=W,e.capitalizeFirst=ie,e.classNameToCssSelector=ae,e.createAtRuleFunction=L,e.createCssFunction=T,e.createDeclarationsCallbackContext=H,e.createKeyframesFunction=z,e.createMediaFunction=R,e.createModifierFunction=G,e.createPropertyValueResolver=C,e.createRecipeFunction=Y,e.createRefFunction=w,e.createRoot=K,e.createSelectorFunction=B,e.createThemeFunction=J,e.createUtilityFunction=q,e.createVariableFunction=V,e.deepClone=D,e.defaultUtilitySelectorFn=y,e.findVariableInScope=re,e.generateRandomId=O,e.generateRecipeRuntime=he,e.getModifier=k,e.getUtility=le,e.getVariable=ce,e.hashValue=_,e.isAtRule=o,e.isCSS=l,e.isContainer=ee,e.isContainerInput=h,e.isKeyReferenceValue=g,e.isModifier=c,e.isObject=t,e.isPrimitiveTokenValue=p,e.isRecipe=f,e.isRef=i,e.isRoot=d,e.isSelector=a,e.isStyleframe=te,e.isTheme=u,e.isToken=n,e.isTokenEqual=A,e.isTokenValue=m,e.isUtility=s,e.isVariable=r,e.merge=fe,e.mergeContainers=P,e.mergeThemesArray=N,e.mergeVariablesArray=M,e.parseAtReferences=x,e.parseDeclarationsBlock=U,e.processRecipeUtilities=ve,e.rebuildRegistry=I,e.registerRecipeUtilities=ye,e.rfdc=oe,e.styleframe=be,e.trackReferenceUsage=ne,e.transformUtilityKey=v,e.validateReference=S});
|
package/package.json
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@styleframe/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"types": "./dist/
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
6
6
|
"module": "./dist/styleframe.js",
|
|
7
7
|
"main": "./dist/styleframe.umd.cjs",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.mts",
|
|
12
|
+
"default": "./dist/styleframe.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.cts",
|
|
16
|
+
"default": "./dist/styleframe.umd.cjs"
|
|
17
|
+
}
|
|
13
18
|
}
|
|
14
19
|
},
|
|
15
20
|
"files": [
|
|
@@ -25,14 +30,15 @@
|
|
|
25
30
|
"@styleframe/license": "^2.0.2"
|
|
26
31
|
},
|
|
27
32
|
"devDependencies": {
|
|
33
|
+
"@microsoft/api-extractor": "^7.58.7",
|
|
28
34
|
"@styleframe/config-typescript": "^3.0.0",
|
|
29
|
-
"@styleframe/config-vite": "^3.
|
|
35
|
+
"@styleframe/config-vite": "^3.1.0",
|
|
30
36
|
"@styleframe/license": "^2.0.2",
|
|
31
|
-
"@vitest/coverage-v8": "^
|
|
37
|
+
"@vitest/coverage-v8": "^4.1.7",
|
|
32
38
|
"typescript": "^5.8.3",
|
|
33
|
-
"vite": "^
|
|
34
|
-
"vitest": "^
|
|
35
|
-
"vite-plugin-dts": "^
|
|
39
|
+
"vite": "^8.0.14",
|
|
40
|
+
"vitest": "^4.1.7",
|
|
41
|
+
"vite-plugin-dts": "^5.0.1"
|
|
36
42
|
},
|
|
37
43
|
"homepage": "https://github.com/styleframe-dev/styleframe#readme",
|
|
38
44
|
"bugs": {
|
|
@@ -43,9 +49,6 @@
|
|
|
43
49
|
"url": "git+https://github.com/styleframe-dev/styleframe.git"
|
|
44
50
|
},
|
|
45
51
|
"author": "Alex Grozav <alex@styleframe.dev>",
|
|
46
|
-
"overrides": {
|
|
47
|
-
"vite": "npm:rolldown-vite@latest"
|
|
48
|
-
},
|
|
49
52
|
"scripts": {
|
|
50
53
|
"dev": "vite build --watch",
|
|
51
54
|
"build": "pnpm typecheck && vite build",
|