@yummacss/nitro 3.13.0 → 3.14.0
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/package.json +6 -16
- package/dist/browser.cjs +0 -1
- package/dist/browser.d.cts +0 -6
- package/dist/generator-CJZC2LWl.cjs +0 -153
- package/dist/generator-CiI3U1Ki.d.cts +0 -21
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yummacss/nitro",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"description": "Fast CSS generation for Yumma CSS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css-framework",
|
|
@@ -18,24 +18,14 @@
|
|
|
18
18
|
"type": "module",
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
|
-
"types":
|
|
22
|
-
|
|
23
|
-
"require": "./dist/index.d.cts"
|
|
24
|
-
},
|
|
25
|
-
"import": "./dist/index.mjs",
|
|
26
|
-
"require": "./dist/index.cjs"
|
|
21
|
+
"types": "./dist/index.d.mts",
|
|
22
|
+
"import": "./dist/index.mjs"
|
|
27
23
|
},
|
|
28
24
|
"./browser": {
|
|
29
|
-
"types":
|
|
30
|
-
|
|
31
|
-
"require": "./dist/browser.d.cts"
|
|
32
|
-
},
|
|
33
|
-
"import": "./dist/browser.mjs",
|
|
34
|
-
"require": "./dist/browser.cjs"
|
|
25
|
+
"types": "./dist/browser.d.mts",
|
|
26
|
+
"import": "./dist/browser.mjs"
|
|
35
27
|
}
|
|
36
28
|
},
|
|
37
|
-
"main": "dist/index.cjs",
|
|
38
|
-
"module": "dist/index.mjs",
|
|
39
29
|
"types": "dist/index.d.mts",
|
|
40
30
|
"files": [
|
|
41
31
|
"dist"
|
|
@@ -43,7 +33,7 @@
|
|
|
43
33
|
"dependencies": {
|
|
44
34
|
"globby": "^16.1.0",
|
|
45
35
|
"zod": "^4.3.4",
|
|
46
|
-
"@yummacss/core": "3.
|
|
36
|
+
"@yummacss/core": "3.14.0"
|
|
47
37
|
},
|
|
48
38
|
"publishConfig": {
|
|
49
39
|
"access": "public",
|
package/dist/browser.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./generator-CJZC2LWl.cjs`);exports.baseStyles=e.r,exports.generator=e.t,exports.tokenizer=e.n;
|
package/dist/browser.d.cts
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
let e=require(`@yummacss/core`);const t=`*,
|
|
2
|
-
*::before,
|
|
3
|
-
*::after {
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
border: 0 solid;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
* {
|
|
9
|
-
margin: 0;
|
|
10
|
-
padding: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
html {
|
|
14
|
-
font-family: system-ui, sans-serif;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
body {
|
|
18
|
-
-webkit-font-smoothing: antialiased;
|
|
19
|
-
font-family: inherit;
|
|
20
|
-
line-height: 1.5;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
canvas,
|
|
24
|
-
img,
|
|
25
|
-
picture,
|
|
26
|
-
svg,
|
|
27
|
-
video {
|
|
28
|
-
display: block;
|
|
29
|
-
max-width: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
button,
|
|
33
|
-
input,
|
|
34
|
-
optgroup,
|
|
35
|
-
select,
|
|
36
|
-
textarea {
|
|
37
|
-
background-color: transparent;
|
|
38
|
-
font-family: inherit;
|
|
39
|
-
padding: .5rem;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
button:not([class]),
|
|
43
|
-
input:not([class]),
|
|
44
|
-
optgroup:not([class]),
|
|
45
|
-
select:not([class]),
|
|
46
|
-
textarea:not([class]) {
|
|
47
|
-
border: 1px solid #bfc2c7;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
a,
|
|
51
|
-
button,
|
|
52
|
-
input,
|
|
53
|
-
select,
|
|
54
|
-
summary,
|
|
55
|
-
textarea {
|
|
56
|
-
&:focus {
|
|
57
|
-
outline: 2px solid transparent;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
textarea:not([rows]) {
|
|
62
|
-
min-height: 10em;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
button {
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
button:disabled,
|
|
70
|
-
input:disabled,
|
|
71
|
-
select:disabled,
|
|
72
|
-
textarea:disabled {
|
|
73
|
-
cursor: not-allowed;
|
|
74
|
-
opacity: .5;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
h1,
|
|
78
|
-
h2,
|
|
79
|
-
h3,
|
|
80
|
-
h4,
|
|
81
|
-
h5,
|
|
82
|
-
h6,
|
|
83
|
-
p {
|
|
84
|
-
overflow-wrap: break-word;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
h1,
|
|
88
|
-
h2,
|
|
89
|
-
h3,
|
|
90
|
-
h4,
|
|
91
|
-
h5,
|
|
92
|
-
h6 {
|
|
93
|
-
font-size: 1rem;
|
|
94
|
-
font-weight: 600;
|
|
95
|
-
text-wrap: balance;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
p {
|
|
99
|
-
text-wrap: pretty;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
b,
|
|
103
|
-
strong {
|
|
104
|
-
font-weight: 700;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
small {
|
|
108
|
-
font-size: 80%;
|
|
109
|
-
line-height: 1.4;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
pre,
|
|
113
|
-
code,
|
|
114
|
-
kbd,
|
|
115
|
-
samp {
|
|
116
|
-
font-family: monospace;
|
|
117
|
-
font-size: 1em;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
a {
|
|
121
|
-
color: inherit;
|
|
122
|
-
text-decoration: none;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
ol,
|
|
126
|
-
ul {
|
|
127
|
-
list-style: none;
|
|
128
|
-
padding: 0;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
th {
|
|
132
|
-
font-size: 1rem;
|
|
133
|
-
font-weight: 600;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
hr {
|
|
137
|
-
border-top: 1px solid #bfc2c7;
|
|
138
|
-
height: 0;
|
|
139
|
-
margin: 1em 0;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
details {
|
|
143
|
-
display: block;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
summary {
|
|
147
|
-
display: list-item;
|
|
148
|
-
}`;function n(e){let t=new Set,n=[/class(?:Name)?=["']([^"']+)["']/g,/class(?:Name)?=\{["']([^"']+)["']\}/g,/class(?:Name)?=\{`([^`]+)`\}/g],r=[/`([^`]+)`/g,/"([^"]+)"/g,/'([^']+)'/g],i=[/cva\s*\(\s*["'`]([^"'`]+)["'`]/g,/:\s*["'`]([^"'`]+)["'`]/g],a=[/\bcn\s*\(\s*["'`]([^"'`]+)["'`]/g,/\bcn\s*\(\s*\{\s*["'`]([^"'`]+)["'`]\s*:/g],o=[/clsx\s*\(\s*["'`]([^"'`]+)["'`]/g,/classnames\s*\(\s*["'`]([^"'`]+)["'`]/g,/clsx\s*\(\s*\{\s*["'`]([^"'`]+)["'`]\s*:/g,/classnames\s*\(\s*\{\s*["'`]([^"'`]+)["'`]\s*:/g],s=[...n,...r,...i,...a,...o];for(let n of s){let r;for(r=n.exec(e);r!==null;){let i=r[1];i&&i.split(/\s+/).filter(e=>e&&/^[a-z]/.test(e)&&e.includes(`-`)).forEach(e=>{t.add(e)}),r=n.exec(e)}}return Array.from(t)}function r(e,n){let r=[];n.buildOptions.reset&&r.push(t);let a=i(e);return a&&r.push(a),r.join(`
|
|
149
|
-
|
|
150
|
-
`)}function i(t){let n=(0,e.coreUtils)(),r=[],i=new Map,a=new Set,o=Array.from(t).sort();for(let e of o){if(a.has(e))continue;let t=s(e,n);if(t){if(t.mediaQuery){let e=i.get(t.mediaQuery)||[];e.push(t.rule),i.set(t.mediaQuery,e)}else r.push(t.rule);a.add(e)}}let c=Array.from(i.entries()).sort(([e],[t])=>e.localeCompare(t));for(let[e,t]of c)r.push(`${e} {\n${t.join(`
|
|
151
|
-
`)}\n}`);return r.join(`
|
|
152
|
-
`)}function a(e,t){let{properties:n,variants:r,prefix:i,values:a}=t,s=e,c,l=``,u=``,d=``,f=!0;for(;f;){if(f=!1,r?.mediaQueries){for(let e of r.mediaQueries)if(s.startsWith(`${e.prefix}:`)){c=e.value,s=s.slice(e.prefix.length+1),f=!0;break}}if(!f){if(r?.pseudoElements){for(let e of r.pseudoElements)if(s.startsWith(`${e.prefix}::`)){u+=e.value,s=s.slice(e.prefix.length+2),f=!0;break}}if(!f&&r?.pseudoClasses){for(let e of r.pseudoClasses)if(s.startsWith(`${e.prefix}:`)&&!s.startsWith(`${e.prefix}::`)){l+=e.value,s=s.slice(e.prefix.length+1),f=!0;break}}}}if(r?.opacity){for(let e of r.opacity)if(s.endsWith(`/${e.prefix}`)){d=e.value,s=s.slice(0,-(e.prefix.length+1));break}}if(!s.startsWith(`${i}-`)&&s!==i)return null;let p=s===i?``:s.slice(i.length+1),m=!1,h=p;p.startsWith(`-`)&&(m=!0,h=p.slice(1));let g=a[h===``?`base`:h]||a[h];if(!g)return null;let _=g;m&&/^-?\d/.test(g)&&(_=g.startsWith(`-`)?g.slice(1):`-${g}`);let v=d&&_.startsWith(`#`)&&_.length===7?`${_}${d}`:_,y=n.map(e=>`${e}: ${v};`).join(`
|
|
153
|
-
`);return{rule:`.${o(e)}${l}${u} {\n ${y}\n}`,mediaQuery:c}}function o(e){return e.replace(/:/g,`\\:`).replace(/\//g,`\\/`)}function s(e,t){for(let[n,r]of Object.entries(t)){let t=a(e,r);if(t)return t}return null}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
//#region src/base-styles.d.ts
|
|
4
|
-
declare const baseStyles = "*,\n*::before,\n*::after {\n box-sizing: border-box;\n border: 0 solid;\n}\n\n* {\n margin: 0;\n padding: 0;\n}\n\nhtml {\n font-family: system-ui, sans-serif;\n}\n\nbody {\n -webkit-font-smoothing: antialiased;\n font-family: inherit;\n line-height: 1.5;\n}\n\ncanvas,\nimg,\npicture,\nsvg,\nvideo {\n display: block;\n max-width: 100%;\n}\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n background-color: transparent;\n font-family: inherit;\n padding: .5rem;\n}\n\nbutton:not([class]),\ninput:not([class]),\noptgroup:not([class]),\nselect:not([class]),\ntextarea:not([class]) {\n border: 1px solid #bfc2c7;\n}\n\na,\nbutton,\ninput,\nselect,\nsummary,\ntextarea {\n &:focus {\n outline: 2px solid transparent;\n }\n}\n\ntextarea:not([rows]) {\n min-height: 10em;\n}\n\nbutton {\n cursor: pointer;\n}\n\nbutton:disabled,\ninput:disabled,\nselect:disabled,\ntextarea:disabled {\n cursor: not-allowed;\n opacity: .5;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np {\n overflow-wrap: break-word;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: 1rem;\n font-weight: 600;\n text-wrap: balance;\n}\n\np {\n text-wrap: pretty;\n}\n\nb,\nstrong {\n font-weight: 700;\n}\n\nsmall {\n font-size: 80%;\n line-height: 1.4;\n}\n\npre,\ncode,\nkbd,\nsamp {\n font-family: monospace;\n font-size: 1em;\n}\n\na {\n color: inherit;\n text-decoration: none;\n}\n\nol,\nul {\n list-style: none;\n padding: 0;\n}\n\nth {\n font-size: 1rem;\n font-weight: 600;\n}\n\nhr {\n border-top: 1px solid #bfc2c7;\n height: 0;\n margin: 1em 0;\n}\n\ndetails {\n display: block;\n}\n\nsummary {\n display: list-item;\n}";
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/config/schema.d.ts
|
|
7
|
-
declare const configName = "yumma.config.mjs";
|
|
8
|
-
declare const ConfigSchema: z.ZodObject<{
|
|
9
|
-
source: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
10
|
-
output: z.ZodDefault<z.ZodString>;
|
|
11
|
-
buildOptions: z.ZodDefault<z.ZodObject<{
|
|
12
|
-
reset: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
-
minify: z.ZodDefault<z.ZodBoolean>;
|
|
14
|
-
}, z.core.$strip>>;
|
|
15
|
-
}, z.core.$strip>;
|
|
16
|
-
type Config = z.infer<typeof ConfigSchema>;
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/generator.d.ts
|
|
19
|
-
declare function generator(usedClasses: Set<string>, config: Config): string;
|
|
20
|
-
//#endregion
|
|
21
|
-
export { baseStyles as a, configName as i, Config as n, ConfigSchema as r, generator as t };
|
package/dist/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./generator-CJZC2LWl.cjs`);let t=require(`zod`),n=require(`node:fs`),r=require(`globby`);const i=`yumma.config.mjs`,a=t.z.object({source:t.z.array(t.z.string()).default([``]),output:t.z.string().default(``),buildOptions:t.z.object({reset:t.z.boolean().default(!0),minify:t.z.boolean().default(!1)}).default({reset:!0,minify:!1})});async function o(t){let i=await(0,r.globby)(t),a=new Set;for(let t of i)try{e.n((0,n.readFileSync)(t,`utf-8`)).forEach(e=>{a.add(e)})}catch{}return a}exports.ConfigSchema=a,exports.baseStyles=e.r,exports.configName=`yumma.config.mjs`,exports.extractor=o,exports.generator=e.t;
|
package/dist/index.d.cts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { a as baseStyles, i as configName, n as Config, r as ConfigSchema, t as generator } from "./generator-CiI3U1Ki.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/extractor.d.ts
|
|
4
|
-
declare function extractor(patterns: string[]): Promise<Set<string>>;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { type Config, ConfigSchema, baseStyles, configName, extractor, generator };
|