@yummacss/nitro 3.14.0 → 3.15.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.
@@ -0,0 +1 @@
1
+ const e=require(`./generator-r-DVZbiy.cjs`);exports.baseStyles=e.r,exports.generator=e.t,exports.tokenizer=e.n;
@@ -0,0 +1,6 @@
1
+ import { a as baseStyles, t as generator } from "./generator-CiI3U1Ki.cjs";
2
+
3
+ //#region src/tokenizer.d.ts
4
+ declare function tokenizer(content: string): string[];
5
+ //#endregion
6
+ export { baseStyles, generator, tokenizer };
package/dist/browser.mjs CHANGED
@@ -1 +1 @@
1
- import{n as e,r as t,t as n}from"./generator-acvvDx6X.mjs";export{t as baseStyles,n as generator,e as tokenizer};
1
+ import{n as e,r as t,t as n}from"./generator-JJrlxSy1.mjs";export{t as baseStyles,n as generator,e as tokenizer};
@@ -0,0 +1,21 @@
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 };
@@ -149,5 +149,5 @@ summary {
149
149
 
150
150
  `)}function i(t){let n=e(),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
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}export{n,t as r,r as t};
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?.containerQueries){for(let e of r.containerQueries)if(s.startsWith(`${e.prefix}:`)){c=e.value,s=s.slice(e.prefix.length+1),f=!0;break}}if(!f){if(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,`\\/`).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}export{n,t as r,r as t};
@@ -0,0 +1,153 @@
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?.containerQueries){for(let e of r.containerQueries)if(s.startsWith(`${e.prefix}:`)){c=e.value,s=s.slice(e.prefix.length+1),f=!0;break}}if(!f){if(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,`\\/`).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}});
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ const e=require(`./generator-r-DVZbiy.cjs`);let t=require(`zod`),n=require(`node:fs`),r=require(`tinyglobby`);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.glob)(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;
@@ -0,0 +1,6 @@
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 };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{n as e,r as t,t as n}from"./generator-acvvDx6X.mjs";import{z as r}from"zod";import{readFileSync as i}from"node:fs";import{globby as a}from"globby";const o=`yumma.config.mjs`,s=r.object({source:r.array(r.string()).default([``]),output:r.string().default(``),buildOptions:r.object({reset:r.boolean().default(!0),minify:r.boolean().default(!1)}).default({reset:!0,minify:!1})});async function c(t){let n=await a(t),r=new Set;for(let t of n)try{e(i(t,`utf-8`)).forEach(e=>{r.add(e)})}catch{}return r}export{s as ConfigSchema,t as baseStyles,o as configName,c as extractor,n as generator};
1
+ import{n as e,r as t,t as n}from"./generator-JJrlxSy1.mjs";import{z as r}from"zod";import{readFileSync as i}from"node:fs";import{glob as a}from"tinyglobby";const o=`yumma.config.mjs`,s=r.object({source:r.array(r.string()).default([``]),output:r.string().default(``),buildOptions:r.object({reset:r.boolean().default(!0),minify:r.boolean().default(!1)}).default({reset:!0,minify:!1})});async function c(t){let n=await a(t),r=new Set;for(let t of n)try{e(i(t,`utf-8`)).forEach(e=>{r.add(e)})}catch{}return r}export{s as ConfigSchema,t as baseStyles,o as configName,c as extractor,n as generator};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yummacss/nitro",
3
- "version": "3.14.0",
3
+ "version": "3.15.0",
4
4
  "description": "Fast CSS generation for Yumma CSS.",
5
5
  "keywords": [
6
6
  "css-framework",
@@ -19,21 +19,27 @@
19
19
  "exports": {
20
20
  ".": {
21
21
  "types": "./dist/index.d.mts",
22
- "import": "./dist/index.mjs"
22
+ "import": "./dist/index.mjs",
23
+ "require": "./dist/index.cjs",
24
+ "default": "./dist/index.mjs"
23
25
  },
24
26
  "./browser": {
25
27
  "types": "./dist/browser.d.mts",
26
- "import": "./dist/browser.mjs"
28
+ "import": "./dist/browser.mjs",
29
+ "require": "./dist/browser.cjs",
30
+ "default": "./dist/browser.mjs"
27
31
  }
28
32
  },
33
+ "main": "dist/index.cjs",
34
+ "module": "dist/index.mjs",
29
35
  "types": "dist/index.d.mts",
30
36
  "files": [
31
37
  "dist"
32
38
  ],
33
39
  "dependencies": {
34
- "globby": "^16.1.0",
40
+ "tinyglobby": "^0.2.15",
35
41
  "zod": "^4.3.4",
36
- "@yummacss/core": "3.14.0"
42
+ "@yummacss/core": "3.15.0"
37
43
  },
38
44
  "publishConfig": {
39
45
  "access": "public",