@bookklik/senangstart-css 0.2.6 → 0.2.7
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/dist/senangstart-css.js +15 -41
- package/dist/senangstart-css.min.js +28 -28
- package/dist/senangstart-tw.js +9 -2
- package/dist/senangstart-tw.min.js +1 -1
- package/docs/guide/getting-started.md +6 -0
- package/docs/ms/guide/getting-started.md +6 -0
- package/docs/public/assets/senangstart-css.min.js +28 -28
- package/docs/public/llms.txt +2 -1
- package/package.json +1 -1
- package/scripts/convert-tailwind.js +12 -2
- package/scripts/generate-llms-txt.js +2 -1
- package/src/cdn/senangstart-engine.js +24 -12
- package/src/cdn/tw-conversion-engine.js +12 -2
- package/src/compiler/generators/css.js +19 -1
- package/tests/unit/convert-tailwind.test.js +12 -0
package/dist/senangstart-css.js
CHANGED
|
@@ -55,41 +55,6 @@
|
|
|
55
55
|
}
|
|
56
56
|
return true;
|
|
57
57
|
}
|
|
58
|
-
function parseToken(raw) {
|
|
59
|
-
const token = {
|
|
60
|
-
raw,
|
|
61
|
-
breakpoint: null,
|
|
62
|
-
state: null,
|
|
63
|
-
property: null,
|
|
64
|
-
value: null,
|
|
65
|
-
isArbitrary: false
|
|
66
|
-
};
|
|
67
|
-
const parts = raw.split(":");
|
|
68
|
-
let idx = 0;
|
|
69
|
-
if (BREAKPOINTS.includes(parts[0])) {
|
|
70
|
-
token.breakpoint = parts[0];
|
|
71
|
-
idx++;
|
|
72
|
-
}
|
|
73
|
-
if (STATES.includes(parts[idx])) {
|
|
74
|
-
token.state = parts[idx];
|
|
75
|
-
idx++;
|
|
76
|
-
}
|
|
77
|
-
if (idx < parts.length) {
|
|
78
|
-
token.property = parts[idx];
|
|
79
|
-
idx++;
|
|
80
|
-
}
|
|
81
|
-
if (idx < parts.length) {
|
|
82
|
-
let value = parts.slice(idx).join(":");
|
|
83
|
-
const arbitraryMatch = value.match(/^\[(.+)\]$/);
|
|
84
|
-
if (arbitraryMatch) {
|
|
85
|
-
token.value = arbitraryMatch[1].replace(/_/g, " ");
|
|
86
|
-
token.isArbitrary = true;
|
|
87
|
-
} else {
|
|
88
|
-
token.value = value;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return token;
|
|
92
|
-
}
|
|
93
58
|
function tokenize(raw, attrType) {
|
|
94
59
|
if (typeof raw !== "string" || raw.length === 0 || raw.length > 200) {
|
|
95
60
|
return {
|
|
@@ -1106,6 +1071,9 @@ img, video {
|
|
|
1106
1071
|
const states = STATES;
|
|
1107
1072
|
function generateLayoutRule(token) {
|
|
1108
1073
|
const { property, value, isArbitrary } = token;
|
|
1074
|
+
if (property === value && layoutKeywords[property]) {
|
|
1075
|
+
return layoutKeywords[property];
|
|
1076
|
+
}
|
|
1109
1077
|
if (property === "container") {
|
|
1110
1078
|
return "width: 100%; margin-left: auto; margin-right: auto;";
|
|
1111
1079
|
}
|
|
@@ -1381,11 +1349,17 @@ img, video {
|
|
|
1381
1349
|
let cssValue;
|
|
1382
1350
|
if (isArbitrary) {
|
|
1383
1351
|
cssValue = value;
|
|
1384
|
-
} else if (value.startsWith("tw-")) {
|
|
1385
|
-
const twValue = value.slice(3);
|
|
1386
|
-
cssValue = `var(--tw-${twValue})`;
|
|
1387
1352
|
} else {
|
|
1388
|
-
|
|
1353
|
+
const isNegative = value.startsWith("-");
|
|
1354
|
+
const cleanValue = isNegative ? value.substring(1) : value;
|
|
1355
|
+
let baseValue;
|
|
1356
|
+
if (cleanValue.startsWith("tw-")) {
|
|
1357
|
+
const twValue = cleanValue.slice(3);
|
|
1358
|
+
baseValue = `var(--tw-${twValue})`;
|
|
1359
|
+
} else {
|
|
1360
|
+
baseValue = `var(--s-${cleanValue})`;
|
|
1361
|
+
}
|
|
1362
|
+
cssValue = isNegative ? `calc(${baseValue} * -1)` : baseValue;
|
|
1389
1363
|
}
|
|
1390
1364
|
const map = {
|
|
1391
1365
|
"p": `padding: ${cssValue};`,
|
|
@@ -2326,7 +2300,7 @@ img, video {
|
|
|
2326
2300
|
return `[layout~="${raw}"] { ${layoutKeywords[raw]} }
|
|
2327
2301
|
`;
|
|
2328
2302
|
}
|
|
2329
|
-
const token =
|
|
2303
|
+
const token = tokenize(raw, attrType);
|
|
2330
2304
|
let cssDeclaration = "";
|
|
2331
2305
|
switch (attrType) {
|
|
2332
2306
|
case "layout":
|
|
@@ -2495,7 +2469,7 @@ img, video {
|
|
|
2495
2469
|
attributeFilter: ["layout", "space", "visual"]
|
|
2496
2470
|
});
|
|
2497
2471
|
console.log(
|
|
2498
|
-
"%c[SenangStart CSS]%c
|
|
2472
|
+
"%c[SenangStart CSS]%c Just-in-Time runtime initialized \u2713",
|
|
2499
2473
|
"color: #2563EB; font-weight: bold;",
|
|
2500
2474
|
"color: #10B981;"
|
|
2501
2475
|
);
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/* SenangStart CSS v0.2.0 | MIT */
|
|
2
|
-
(()=>{var F=["mob","tab","lap","desk","tw-sm","tw-md","tw-lg","tw-xl","tw-2xl"],w=["hover","focus","focus-visible","active","disabled","dark"],B=["flex","grid","block","inline","hidden","row","col","row-reverse","col-reverse","center","start","end","between","around","evenly","wrap","nowrap","absolute","relative","fixed","sticky"];function z(p){return typeof p!="string"?"":p.replace(/;/g,"_")}function P(p){return!(!p.property||typeof p.property!="string"||p.property.length>100||p.value!==null&&typeof p.value!="string"||p.value&&p.value.length>500||p.breakpoint&&!F.includes(p.breakpoint)||p.state&&!w.includes(p.state))}function S(p){let y={raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1},u=p.split(":"),m=0;if(F.includes(u[0])&&(y.breakpoint=u[0],m++),w.includes(u[m])&&(y.state=u[m],m++),m<u.length&&(y.property=u[m],m++),m<u.length){let f=u.slice(m).join(":"),x=f.match(/^\[(.+)\]$/);x?(y.value=x[1].replace(/_/g," "),y.isArbitrary=!0):y.value=f}return y}function M(p,y){if(typeof p!="string"||p.length===0||p.length>200)return{raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:y,error:"Invalid token format"};let u={raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:y};if(y==="layout"){if(p.startsWith("z:"))return u.property="z",u.value=p.substring(2),u;if(p.startsWith("overflow:"))return u.property="overflow",u.value=p.substring(9),u;if(B.includes(p))return u.property=p,u.value=p,u;let x=p.split(":");if(x.length===2&&F.includes(x[0]))return u.breakpoint=x[0],u.property=x[1],u.value=x[1],u}let m=p.split(":");if(m.length===1)return u.property=p,u.value=p,u;let f=0;if(F.includes(m[0])&&(u.breakpoint=m[0],f++),w.includes(m[f])&&(u.state=m[f],f++),f<m.length&&(u.property=m[f],f++),f<m.length){let x=m.slice(f).join(":"),v=x.match(/^\[(.+)\]$/);v?(u.value=z(v[1].replace(/_/g," ")),u.isArbitrary=!0):u.value=z(x)}return P(u)||(u.error="Invalid token structure"),u}(function(){"use strict";let p={theme:{spacing:{none:"0px",thin:"1px",regular:"2px",thick:"3px",tiny:"4px","tiny-2x":"6px",small:"8px","small-2x":"10px","small-3x":"12px","small-4x":"14px",medium:"16px","medium-2x":"20px","medium-3x":"24px","medium-4x":"28px",large:"32px","large-2x":"36px","large-3x":"40px","large-4x":"44px",big:"48px","big-2x":"56px","big-3x":"64px","big-4x":"80px",giant:"96px","giant-2x":"112px","giant-3x":"128px","giant-4x":"144px",vast:"160px","vast-2x":"176px","vast-3x":"192px","vast-4x":"208px","vast-5x":"224px","vast-6x":"240px","vast-7x":"256px","vast-8x":"288px","vast-9x":"320px","vast-10x":"384px"},radius:{none:"0px",small:"4px",medium:"8px",big:"16px",round:"9999px"},shadow:{none:"none",small:"0 1px 2px rgba(0,0,0,0.05)",medium:"0 4px 6px rgba(0,0,0,0.1)",big:"0 10px 15px rgba(0,0,0,0.15)",giant:"0 25px 50px rgba(0,0,0,0.25)"},fontSize:{mini:"0.75rem",small:"0.875rem",base:"1rem",large:"1.125rem",big:"1.25rem",huge:"1.5rem",grand:"1.875rem",giant:"2.25rem",mount:"3rem",mega:"3.75rem",giga:"4.5rem",tera:"6rem",hero:"8rem"},fontSizeLineHeight:{mini:"1rem",small:"1.25rem",base:"1.5rem",large:"1.75rem",big:"1.75rem",huge:"2rem",grand:"2.25rem",giant:"2.5rem",mount:"1",mega:"1",giga:"1",tera:"1",hero:"1"},fontWeight:{normal:"400",medium:"500",bold:"700"},screens:{mob:"480px",tab:"768px",lap:"1024px",desk:"1280px","tw-sm":"640px","tw-md":"768px","tw-lg":"1024px","tw-xl":"1280px","tw-2xl":"1536px"},colors:{white:"#FFFFFF",black:"#000000",grey:"#6B7280",dark:"#3E4A5D",light:"#DBEAFE",primary:"#2563EB",secondary:"#DBEAFE",success:"#10B981",warning:"#F59E0B",danger:"#EF4444","red-50":"#FEF2F2","red-100":"#FEE2E2","red-200":"#FECACA","red-300":"#FCA5A5","red-400":"#F87171","red-500":"#EF4444","red-600":"#DC2626","red-700":"#B91C1C","red-800":"#991B1B","red-900":"#7F1D1D","red-950":"#450A0A","orange-50":"#FFF7ED","orange-100":"#FFEDD5","orange-200":"#FED7AA","orange-300":"#FDBA74","orange-400":"#FB923C","orange-500":"#F97316","orange-600":"#EA580C","orange-700":"#C2410C","orange-800":"#9A3412","orange-900":"#7C2D12","orange-950":"#431407","amber-50":"#FFFBEB","amber-100":"#FEF3C7","amber-200":"#FDE68A","amber-300":"#FCD34D","amber-400":"#FBBF24","amber-500":"#F59E0B","amber-600":"#D97706","amber-700":"#B45309","amber-800":"#92400E","amber-900":"#78350F","amber-950":"#451A03","yellow-50":"#FEFCE8","yellow-100":"#FEF9C3","yellow-200":"#FEF08A","yellow-300":"#FDE047","yellow-400":"#FACC15","yellow-500":"#EAB308","yellow-600":"#CA8A04","yellow-700":"#A16207","yellow-800":"#854D0E","yellow-900":"#713F12","yellow-950":"#422006","lime-50":"#F7FEE7","lime-100":"#ECFCCB","lime-200":"#D9F99D","lime-300":"#BEF264","lime-400":"#A3E635","lime-500":"#84CC16","lime-600":"#65A30D","lime-700":"#4D7C0F","lime-800":"#3F6212","lime-900":"#365314","lime-950":"#1A2E05","green-50":"#F0FDF4","green-100":"#DCFCE7","green-200":"#BBF7D0","green-300":"#86EFAC","green-400":"#4ADE80","green-500":"#22C55E","green-600":"#16A34A","green-700":"#15803D","green-800":"#166534","green-900":"#14532D","green-950":"#052E16","emerald-50":"#ECFDF5","emerald-100":"#D1FAE5","emerald-200":"#A7F3D0","emerald-300":"#6EE7B7","emerald-400":"#34D399","emerald-500":"#10B981","emerald-600":"#059669","emerald-700":"#047857","emerald-800":"#065F46","emerald-900":"#064E3B","emerald-950":"#022C22","teal-50":"#F0FDFA","teal-100":"#CCFBF1","teal-200":"#99F6E4","teal-300":"#5EEAD4","teal-400":"#2DD4BF","teal-500":"#14B8A6","teal-600":"#0D9488","teal-700":"#0F766E","teal-800":"#115E59","teal-900":"#134E4A","teal-950":"#042F2E","cyan-50":"#ECFEFF","cyan-100":"#CFFAFE","cyan-200":"#A5F3FC","cyan-300":"#67E8F9","cyan-400":"#22D3EE","cyan-500":"#06B6D4","cyan-600":"#0891B2","cyan-700":"#0E7490","cyan-800":"#155E75","cyan-900":"#164E63","cyan-950":"#083344","sky-50":"#F0F9FF","sky-100":"#E0F2FE","sky-200":"#BAE6FD","sky-300":"#7DD3FC","sky-400":"#38BDF8","sky-500":"#0EA5E9","sky-600":"#0284C7","sky-700":"#0369A1","sky-800":"#075985","sky-900":"#0C4A6E","sky-950":"#082F49","blue-50":"#EFF6FF","blue-100":"#DBEAFE","blue-200":"#BFDBFE","blue-300":"#93C5FD","blue-400":"#60A5FA","blue-500":"#3B82F6","blue-600":"#2563EB","blue-700":"#1D4ED8","blue-800":"#1E40AF","blue-900":"#1E3A8A","blue-950":"#172554","indigo-50":"#EEF2FF","indigo-100":"#E0E7FF","indigo-200":"#C7D2FE","indigo-300":"#A5B4FC","indigo-400":"#818CF8","indigo-500":"#6366F1","indigo-600":"#4F46E5","indigo-700":"#4338CA","indigo-800":"#3730A3","indigo-900":"#312E81","indigo-950":"#1E1B4B","violet-50":"#F5F3FF","violet-100":"#EDE9FE","violet-200":"#DDD6FE","violet-300":"#C4B5FD","violet-400":"#A78BFA","violet-500":"#8B5CF6","violet-600":"#7C3AED","violet-700":"#6D28D9","violet-800":"#5B21B6","violet-900":"#4C1D95","violet-950":"#2E1065","purple-50":"#FAF5FF","purple-100":"#F3E8FF","purple-200":"#E9D5FF","purple-300":"#D8B4FE","purple-400":"#C084FC","purple-500":"#A855F7","purple-600":"#9333EA","purple-700":"#7E22CE","purple-800":"#6B21A8","purple-900":"#581C87","purple-950":"#3B0764","fuchsia-50":"#FDF4FF","fuchsia-100":"#FAE8FF","fuchsia-200":"#F5D0FE","fuchsia-300":"#F0ABFC","fuchsia-400":"#E879F9","fuchsia-500":"#D946EF","fuchsia-600":"#C026D3","fuchsia-700":"#A21CAF","fuchsia-800":"#86198F","fuchsia-900":"#701A75","fuchsia-950":"#4A044E","pink-50":"#FDF2F8","pink-100":"#FCE7F3","pink-200":"#FBCFE8","pink-300":"#F9A8D4","pink-400":"#F472B6","pink-500":"#EC4899","pink-600":"#DB2777","pink-700":"#BE185D","pink-800":"#9D174D","pink-900":"#831843","pink-950":"#500724","rose-50":"#FFF1F2","rose-100":"#FFE4E6","rose-200":"#FECDD3","rose-300":"#FDA4AF","rose-400":"#FB7185","rose-500":"#F43F5E","rose-600":"#E11D48","rose-700":"#BE123C","rose-800":"#9F1239","rose-900":"#881337","rose-950":"#4C0519","slate-50":"#F8FAFC","slate-100":"#F1F5F9","slate-200":"#E2E8F0","slate-300":"#CBD5E1","slate-400":"#94A3B8","slate-500":"#64748B","slate-600":"#475569","slate-700":"#334155","slate-800":"#1E293B","slate-900":"#0F172A","slate-950":"#020617","gray-50":"#F9FAFB","gray-100":"#F3F4F6","gray-200":"#E5E7EB","gray-300":"#D1D5DB","gray-400":"#9CA3AF","gray-500":"#6B7280","gray-600":"#4B5563","gray-700":"#374151","gray-800":"#1F2937","gray-900":"#111827","gray-950":"#030712","zinc-50":"#FAFAFA","zinc-100":"#F4F4F5","zinc-200":"#E4E4E7","zinc-300":"#D4D4D8","zinc-400":"#A1A1AA","zinc-500":"#71717A","zinc-600":"#52525B","zinc-700":"#3F3F46","zinc-800":"#27272A","zinc-900":"#18181B","zinc-950":"#09090B","neutral-50":"#FAFAFA","neutral-100":"#F5F5F5","neutral-200":"#E5E5E5","neutral-300":"#D4D4D4","neutral-400":"#A3A3A3","neutral-500":"#737373","neutral-600":"#525252","neutral-700":"#404040","neutral-800":"#262626","neutral-900":"#171717","neutral-950":"#0A0A0A","stone-50":"#FAFAF9","stone-100":"#F5F5F4","stone-200":"#E7E5E4","stone-300":"#D6D3D1","stone-400":"#A8A29E","stone-500":"#78716C","stone-600":"#57534E","stone-700":"#44403C","stone-800":"#292524","stone-900":"#1C1917","stone-950":"#0C0A09"},zIndex:{base:"0",low:"10",mid:"50",high:"100",top:"9999"},ring:{none:"0px",thin:"1px",regular:"2px",thick:"3px",small:"4px",medium:"6px",big:"8px"}},darkMode:"media",preflight:!0},y={theme:{type:"object",properties:{spacing:{type:"object"},radius:{type:"object"},shadow:{type:"object"},fontSize:{type:"object"},fontWeight:{type:"object"},screens:{type:"object"},colors:{type:"object"},zIndex:{type:"object"},ring:{type:"object"}}},darkMode:{type:"string",enum:["media","selector"]},preflight:{type:"boolean"}};function u(s){return!(!s||typeof s!="object"||Array.isArray(s)||s.theme&&(typeof s.theme!="object"||Array.isArray(s.theme))||s.darkMode!==void 0&&s.darkMode!=="media"&&s.darkMode!=="selector"&&!Array.isArray(s.darkMode)||s.preflight!==void 0&&typeof s.preflight!="boolean")}function m(){let s=document.querySelector('script[type="senangstart/config"]');if(!s)return{};try{let n=JSON.parse(s.textContent);return u(n)?n:(console.error("[SenangStart] Invalid config structure"),{})}catch(n){return console.error("[SenangStart] Invalid config JSON:",n),{}}}function f(s){if(!u(s))return console.error("[SenangStart] Invalid user config, using defaults"),JSON.parse(JSON.stringify(p));let n=JSON.parse(JSON.stringify(p));if(s.theme)for(let e of Object.keys(n.theme))s.theme[e]&&(n.theme[e]={...n.theme[e],...s.theme[e]});return s.darkMode!==void 0&&(n.darkMode=s.darkMode),s.preflight!==void 0&&(n.preflight=s.preflight),n}function x(s){let{theme:n}=s,e=`:root {
|
|
3
|
-
`;for(let[
|
|
4
|
-
`;for(let[
|
|
5
|
-
`;for(let[
|
|
6
|
-
`;for(let[
|
|
7
|
-
`;if(n.fontSizeLineHeight)for(let[
|
|
8
|
-
`;for(let[
|
|
9
|
-
`;for(let[
|
|
10
|
-
`;for(let[
|
|
11
|
-
`;if(n.ring)for(let[
|
|
2
|
+
(()=>{var y=["mob","tab","lap","desk","tw-sm","tw-md","tw-lg","tw-xl","tw-2xl"],w=["hover","focus","focus-visible","active","disabled","dark"],z=["flex","grid","block","inline","hidden","row","col","row-reverse","col-reverse","center","start","end","between","around","evenly","wrap","nowrap","absolute","relative","fixed","sticky"];function S(p){return typeof p!="string"?"":p.replace(/;/g,"_")}function _(p){return!(!p.property||typeof p.property!="string"||p.property.length>100||p.value!==null&&typeof p.value!="string"||p.value&&p.value.length>500||p.breakpoint&&!y.includes(p.breakpoint)||p.state&&!w.includes(p.state))}function k(p,v){if(typeof p!="string"||p.length===0||p.length>200)return{raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:v,error:"Invalid token format"};let u={raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:v};if(v==="layout"){if(p.startsWith("z:"))return u.property="z",u.value=p.substring(2),u;if(p.startsWith("overflow:"))return u.property="overflow",u.value=p.substring(9),u;if(z.includes(p))return u.property=p,u.value=p,u;let x=p.split(":");if(x.length===2&&y.includes(x[0]))return u.breakpoint=x[0],u.property=x[1],u.value=x[1],u}let f=p.split(":");if(f.length===1)return u.property=p,u.value=p,u;let b=0;if(y.includes(f[0])&&(u.breakpoint=f[0],b++),w.includes(f[b])&&(u.state=f[b],b++),b<f.length&&(u.property=f[b],b++),b<f.length){let x=f.slice(b).join(":"),$=x.match(/^\[(.+)\]$/);$?(u.value=S($[1].replace(/_/g," ")),u.isArbitrary=!0):u.value=S(x)}return _(u)||(u.error="Invalid token structure"),u}(function(){"use strict";let p={theme:{spacing:{none:"0px",thin:"1px",regular:"2px",thick:"3px",tiny:"4px","tiny-2x":"6px",small:"8px","small-2x":"10px","small-3x":"12px","small-4x":"14px",medium:"16px","medium-2x":"20px","medium-3x":"24px","medium-4x":"28px",large:"32px","large-2x":"36px","large-3x":"40px","large-4x":"44px",big:"48px","big-2x":"56px","big-3x":"64px","big-4x":"80px",giant:"96px","giant-2x":"112px","giant-3x":"128px","giant-4x":"144px",vast:"160px","vast-2x":"176px","vast-3x":"192px","vast-4x":"208px","vast-5x":"224px","vast-6x":"240px","vast-7x":"256px","vast-8x":"288px","vast-9x":"320px","vast-10x":"384px"},radius:{none:"0px",small:"4px",medium:"8px",big:"16px",round:"9999px"},shadow:{none:"none",small:"0 1px 2px rgba(0,0,0,0.05)",medium:"0 4px 6px rgba(0,0,0,0.1)",big:"0 10px 15px rgba(0,0,0,0.15)",giant:"0 25px 50px rgba(0,0,0,0.25)"},fontSize:{mini:"0.75rem",small:"0.875rem",base:"1rem",large:"1.125rem",big:"1.25rem",huge:"1.5rem",grand:"1.875rem",giant:"2.25rem",mount:"3rem",mega:"3.75rem",giga:"4.5rem",tera:"6rem",hero:"8rem"},fontSizeLineHeight:{mini:"1rem",small:"1.25rem",base:"1.5rem",large:"1.75rem",big:"1.75rem",huge:"2rem",grand:"2.25rem",giant:"2.5rem",mount:"1",mega:"1",giga:"1",tera:"1",hero:"1"},fontWeight:{normal:"400",medium:"500",bold:"700"},screens:{mob:"480px",tab:"768px",lap:"1024px",desk:"1280px","tw-sm":"640px","tw-md":"768px","tw-lg":"1024px","tw-xl":"1280px","tw-2xl":"1536px"},colors:{white:"#FFFFFF",black:"#000000",grey:"#6B7280",dark:"#3E4A5D",light:"#DBEAFE",primary:"#2563EB",secondary:"#DBEAFE",success:"#10B981",warning:"#F59E0B",danger:"#EF4444","red-50":"#FEF2F2","red-100":"#FEE2E2","red-200":"#FECACA","red-300":"#FCA5A5","red-400":"#F87171","red-500":"#EF4444","red-600":"#DC2626","red-700":"#B91C1C","red-800":"#991B1B","red-900":"#7F1D1D","red-950":"#450A0A","orange-50":"#FFF7ED","orange-100":"#FFEDD5","orange-200":"#FED7AA","orange-300":"#FDBA74","orange-400":"#FB923C","orange-500":"#F97316","orange-600":"#EA580C","orange-700":"#C2410C","orange-800":"#9A3412","orange-900":"#7C2D12","orange-950":"#431407","amber-50":"#FFFBEB","amber-100":"#FEF3C7","amber-200":"#FDE68A","amber-300":"#FCD34D","amber-400":"#FBBF24","amber-500":"#F59E0B","amber-600":"#D97706","amber-700":"#B45309","amber-800":"#92400E","amber-900":"#78350F","amber-950":"#451A03","yellow-50":"#FEFCE8","yellow-100":"#FEF9C3","yellow-200":"#FEF08A","yellow-300":"#FDE047","yellow-400":"#FACC15","yellow-500":"#EAB308","yellow-600":"#CA8A04","yellow-700":"#A16207","yellow-800":"#854D0E","yellow-900":"#713F12","yellow-950":"#422006","lime-50":"#F7FEE7","lime-100":"#ECFCCB","lime-200":"#D9F99D","lime-300":"#BEF264","lime-400":"#A3E635","lime-500":"#84CC16","lime-600":"#65A30D","lime-700":"#4D7C0F","lime-800":"#3F6212","lime-900":"#365314","lime-950":"#1A2E05","green-50":"#F0FDF4","green-100":"#DCFCE7","green-200":"#BBF7D0","green-300":"#86EFAC","green-400":"#4ADE80","green-500":"#22C55E","green-600":"#16A34A","green-700":"#15803D","green-800":"#166534","green-900":"#14532D","green-950":"#052E16","emerald-50":"#ECFDF5","emerald-100":"#D1FAE5","emerald-200":"#A7F3D0","emerald-300":"#6EE7B7","emerald-400":"#34D399","emerald-500":"#10B981","emerald-600":"#059669","emerald-700":"#047857","emerald-800":"#065F46","emerald-900":"#064E3B","emerald-950":"#022C22","teal-50":"#F0FDFA","teal-100":"#CCFBF1","teal-200":"#99F6E4","teal-300":"#5EEAD4","teal-400":"#2DD4BF","teal-500":"#14B8A6","teal-600":"#0D9488","teal-700":"#0F766E","teal-800":"#115E59","teal-900":"#134E4A","teal-950":"#042F2E","cyan-50":"#ECFEFF","cyan-100":"#CFFAFE","cyan-200":"#A5F3FC","cyan-300":"#67E8F9","cyan-400":"#22D3EE","cyan-500":"#06B6D4","cyan-600":"#0891B2","cyan-700":"#0E7490","cyan-800":"#155E75","cyan-900":"#164E63","cyan-950":"#083344","sky-50":"#F0F9FF","sky-100":"#E0F2FE","sky-200":"#BAE6FD","sky-300":"#7DD3FC","sky-400":"#38BDF8","sky-500":"#0EA5E9","sky-600":"#0284C7","sky-700":"#0369A1","sky-800":"#075985","sky-900":"#0C4A6E","sky-950":"#082F49","blue-50":"#EFF6FF","blue-100":"#DBEAFE","blue-200":"#BFDBFE","blue-300":"#93C5FD","blue-400":"#60A5FA","blue-500":"#3B82F6","blue-600":"#2563EB","blue-700":"#1D4ED8","blue-800":"#1E40AF","blue-900":"#1E3A8A","blue-950":"#172554","indigo-50":"#EEF2FF","indigo-100":"#E0E7FF","indigo-200":"#C7D2FE","indigo-300":"#A5B4FC","indigo-400":"#818CF8","indigo-500":"#6366F1","indigo-600":"#4F46E5","indigo-700":"#4338CA","indigo-800":"#3730A3","indigo-900":"#312E81","indigo-950":"#1E1B4B","violet-50":"#F5F3FF","violet-100":"#EDE9FE","violet-200":"#DDD6FE","violet-300":"#C4B5FD","violet-400":"#A78BFA","violet-500":"#8B5CF6","violet-600":"#7C3AED","violet-700":"#6D28D9","violet-800":"#5B21B6","violet-900":"#4C1D95","violet-950":"#2E1065","purple-50":"#FAF5FF","purple-100":"#F3E8FF","purple-200":"#E9D5FF","purple-300":"#D8B4FE","purple-400":"#C084FC","purple-500":"#A855F7","purple-600":"#9333EA","purple-700":"#7E22CE","purple-800":"#6B21A8","purple-900":"#581C87","purple-950":"#3B0764","fuchsia-50":"#FDF4FF","fuchsia-100":"#FAE8FF","fuchsia-200":"#F5D0FE","fuchsia-300":"#F0ABFC","fuchsia-400":"#E879F9","fuchsia-500":"#D946EF","fuchsia-600":"#C026D3","fuchsia-700":"#A21CAF","fuchsia-800":"#86198F","fuchsia-900":"#701A75","fuchsia-950":"#4A044E","pink-50":"#FDF2F8","pink-100":"#FCE7F3","pink-200":"#FBCFE8","pink-300":"#F9A8D4","pink-400":"#F472B6","pink-500":"#EC4899","pink-600":"#DB2777","pink-700":"#BE185D","pink-800":"#9D174D","pink-900":"#831843","pink-950":"#500724","rose-50":"#FFF1F2","rose-100":"#FFE4E6","rose-200":"#FECDD3","rose-300":"#FDA4AF","rose-400":"#FB7185","rose-500":"#F43F5E","rose-600":"#E11D48","rose-700":"#BE123C","rose-800":"#9F1239","rose-900":"#881337","rose-950":"#4C0519","slate-50":"#F8FAFC","slate-100":"#F1F5F9","slate-200":"#E2E8F0","slate-300":"#CBD5E1","slate-400":"#94A3B8","slate-500":"#64748B","slate-600":"#475569","slate-700":"#334155","slate-800":"#1E293B","slate-900":"#0F172A","slate-950":"#020617","gray-50":"#F9FAFB","gray-100":"#F3F4F6","gray-200":"#E5E7EB","gray-300":"#D1D5DB","gray-400":"#9CA3AF","gray-500":"#6B7280","gray-600":"#4B5563","gray-700":"#374151","gray-800":"#1F2937","gray-900":"#111827","gray-950":"#030712","zinc-50":"#FAFAFA","zinc-100":"#F4F4F5","zinc-200":"#E4E4E7","zinc-300":"#D4D4D8","zinc-400":"#A1A1AA","zinc-500":"#71717A","zinc-600":"#52525B","zinc-700":"#3F3F46","zinc-800":"#27272A","zinc-900":"#18181B","zinc-950":"#09090B","neutral-50":"#FAFAFA","neutral-100":"#F5F5F5","neutral-200":"#E5E5E5","neutral-300":"#D4D4D4","neutral-400":"#A3A3A3","neutral-500":"#737373","neutral-600":"#525252","neutral-700":"#404040","neutral-800":"#262626","neutral-900":"#171717","neutral-950":"#0A0A0A","stone-50":"#FAFAF9","stone-100":"#F5F5F4","stone-200":"#E7E5E4","stone-300":"#D6D3D1","stone-400":"#A8A29E","stone-500":"#78716C","stone-600":"#57534E","stone-700":"#44403C","stone-800":"#292524","stone-900":"#1C1917","stone-950":"#0C0A09"},zIndex:{base:"0",low:"10",mid:"50",high:"100",top:"9999"},ring:{none:"0px",thin:"1px",regular:"2px",thick:"3px",small:"4px",medium:"6px",big:"8px"}},darkMode:"media",preflight:!0},v={theme:{type:"object",properties:{spacing:{type:"object"},radius:{type:"object"},shadow:{type:"object"},fontSize:{type:"object"},fontWeight:{type:"object"},screens:{type:"object"},colors:{type:"object"},zIndex:{type:"object"},ring:{type:"object"}}},darkMode:{type:"string",enum:["media","selector"]},preflight:{type:"boolean"}};function u(s){return!(!s||typeof s!="object"||Array.isArray(s)||s.theme&&(typeof s.theme!="object"||Array.isArray(s.theme))||s.darkMode!==void 0&&s.darkMode!=="media"&&s.darkMode!=="selector"&&!Array.isArray(s.darkMode)||s.preflight!==void 0&&typeof s.preflight!="boolean")}function f(){let s=document.querySelector('script[type="senangstart/config"]');if(!s)return{};try{let n=JSON.parse(s.textContent);return u(n)?n:(console.error("[SenangStart] Invalid config structure"),{})}catch(n){return console.error("[SenangStart] Invalid config JSON:",n),{}}}function b(s){if(!u(s))return console.error("[SenangStart] Invalid user config, using defaults"),JSON.parse(JSON.stringify(p));let n=JSON.parse(JSON.stringify(p));if(s.theme)for(let e of Object.keys(n.theme))s.theme[e]&&(n.theme[e]={...n.theme[e],...s.theme[e]});return s.darkMode!==void 0&&(n.darkMode=s.darkMode),s.preflight!==void 0&&(n.preflight=s.preflight),n}function x(s){let{theme:n}=s,e=`:root {
|
|
3
|
+
`;for(let[i,o]of Object.entries(n.spacing))e+=` --s-${i}: ${o};
|
|
4
|
+
`;for(let[i,o]of Object.entries(n.radius))e+=` --r-${i}: ${o};
|
|
5
|
+
`;for(let[i,o]of Object.entries(n.shadow))e+=` --shadow-${i}: ${o};
|
|
6
|
+
`;for(let[i,o]of Object.entries(n.fontSize))e+=` --font-${i}: ${o};
|
|
7
|
+
`;if(n.fontSizeLineHeight)for(let[i,o]of Object.entries(n.fontSizeLineHeight))e+=` --font-lh-${i}: ${o};
|
|
8
|
+
`;for(let[i,o]of Object.entries(n.fontWeight))e+=` --fw-${i}: ${o};
|
|
9
|
+
`;for(let[i,o]of Object.entries(n.colors))e+=` --c-${i}: ${o};
|
|
10
|
+
`;for(let[i,o]of Object.entries(n.zIndex))e+=` --z-${i}: ${o};
|
|
11
|
+
`;if(n.ring)for(let[i,o]of Object.entries(n.ring))e+=` --ring-${i}: ${o};
|
|
12
12
|
`;e+=` --ring-color: var(--c-primary);
|
|
13
13
|
`,e+=` --ring-offset: 0px;
|
|
14
14
|
`,e+=` --ring-offset-color: #fff;
|
|
15
|
-
`;let r={0:"0px",px:"1px","0.5":"0.125rem",1:"0.25rem","1.5":"0.375rem",2:"0.5rem","2.5":"0.625rem",3:"0.75rem","3.5":"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"};for(let[
|
|
16
|
-
`;let
|
|
17
|
-
`;let d={sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"0 0 #0000"};for(let[
|
|
18
|
-
`;let
|
|
19
|
-
`;let t={xs:"1rem",sm:"1.25rem",base:"1.5rem",lg:"1.75rem",xl:"1.75rem","2xl":"2rem","3xl":"2.25rem","4xl":"2.5rem","5xl":"1","6xl":"1","7xl":"1","8xl":"1","9xl":"1"};for(let[
|
|
20
|
-
`;let
|
|
15
|
+
`;let r={0:"0px",px:"1px","0.5":"0.125rem",1:"0.25rem","1.5":"0.375rem",2:"0.5rem","2.5":"0.625rem",3:"0.75rem","3.5":"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"};for(let[i,o]of Object.entries(r))e+=` --tw-${i}: ${o};
|
|
16
|
+
`;let l={none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"};for(let[i,o]of Object.entries(l))e+=` --tw-rounded-${i}: ${o};
|
|
17
|
+
`;let d={sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"0 0 #0000"};for(let[i,o]of Object.entries(d))e+=` --tw-shadow-${i}: ${o};
|
|
18
|
+
`;let c={xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"};for(let[i,o]of Object.entries(c))e+=` --tw-text-${i}: ${o};
|
|
19
|
+
`;let t={xs:"1rem",sm:"1.25rem",base:"1.5rem",lg:"1.75rem",xl:"1.75rem","2xl":"2rem","3xl":"2.25rem","4xl":"2.5rem","5xl":"1","6xl":"1","7xl":"1","8xl":"1","9xl":"1"};for(let[i,o]of Object.entries(t))e+=` --tw-leading-${i}: ${o};
|
|
20
|
+
`;let a={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"};for(let[i,o]of Object.entries(a))e+=` --tw-font-${i}: ${o};
|
|
21
21
|
`;return e+=`}
|
|
22
22
|
|
|
23
|
-
`,e}function
|
|
23
|
+
`,e}function $(){return`/* SenangStart Preflight - Opinionated Base Styles */
|
|
24
24
|
*,
|
|
25
25
|
::before,
|
|
26
26
|
::after {
|
|
@@ -198,7 +198,7 @@ img, video {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
`}let E={flex:"display: flex;",grid:"display: grid;","inline-flex":"display: inline-flex;","inline-grid":"display: inline-grid;",block:"display: block;",inline:"display: inline-block;",hidden:"display: none;",row:"flex-direction: row;",col:"flex-direction: column;","row-reverse":"flex-direction: row-reverse;","col-reverse":"flex-direction: column-reverse;",wrap:"flex-wrap: wrap;",nowrap:"flex-wrap: nowrap;","wrap-reverse":"flex-wrap: wrap-reverse;",grow:"flex-grow: 1;","grow-0":"flex-grow: 0;",shrink:"flex-shrink: 1;","shrink-0":"flex-shrink: 0;","grid-flow-row":"grid-auto-flow: row;","grid-flow-col":"grid-auto-flow: column;","grid-flow-dense":"grid-auto-flow: dense;","grid-flow-row-dense":"grid-auto-flow: row dense;","grid-flow-col-dense":"grid-auto-flow: column dense;",center:"justify-content: center; align-items: center;",start:"justify-content: flex-start; align-items: flex-start;",end:"justify-content: flex-end; align-items: flex-end;",between:"justify-content: space-between;",around:"justify-content: space-around;",evenly:"justify-content: space-evenly;",absolute:"position: absolute;",relative:"position: relative;",fixed:"position: fixed;",sticky:"position: sticky;",static:"position: static;",visible:"visibility: visible;",invisible:"visibility: hidden;",isolate:"isolation: isolate;","isolate-auto":"isolation: auto;","box-border":"box-sizing: border-box;","box-content":"box-sizing: content-box;","float-left":"float: left;","float-right":"float: right;","float-none":"float: none;","clear-left":"clear: left;","clear-right":"clear: right;","clear-both":"clear: both;","clear-none":"clear: none;",container:"width: 100%; margin-left: auto; margin-right: auto;","border-collapse":"border-collapse: collapse;","border-separate":"border-collapse: separate;"},W=F,I=w;function j(s){let{property:n,value:e,isArbitrary:r}=s;if(n==="container")return"width: 100%; margin-left: auto; margin-right: auto;";if(n==="justify")return`justify-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="justify-items")return`justify-items: ${e};`;if(n==="justify-self")return`justify-self: ${e};`;if(n==="content")return`align-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="items")return`align-items: ${{start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="self")return`align-self: ${{auto:"auto",start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="place-content")return`place-content: ${{start:"start",end:"end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="place-items")return`place-items: ${e};`;if(n==="place-self")return`place-self: ${e};`;if(n==="z")return`z-index: var(--z-${e});`;if(n==="overflow")return`overflow: ${e};`;if(n==="overflow-x")return`overflow-x: ${e};`;if(n==="overflow-y")return`overflow-y: ${e};`;if(n==="aspect")return`aspect-ratio: ${r?e.replace(/_/g," "):{square:"1 / 1",video:"16 / 9",auto:"auto"}[e]||e};`;if(n==="object")return`object-fit: ${e};`;if(n==="object-pos")return`object-position: ${r?e.replace(/_/g," "):e};`;if(n==="inset")return`inset: ${r?e:e==="0"?"0":`var(--s-${e})`};`;if(["top","right","bottom","left"].includes(n)){let i=r?e:e==="0"?"0":`var(--s-${e})`;return`${n}: ${i};`}if(n==="inset-x"){let i=r?e:e==="0"?"0":`var(--s-${e})`;return`left: ${i}; right: ${i};`}if(n==="inset-y"){let i=r?e:e==="0"?"0":`var(--s-${e})`;return`top: ${i}; bottom: ${i};`}return n==="cols"?`columns: ${e};`:n==="overscroll"?`overscroll-behavior: ${e};`:n==="overscroll-x"?`overscroll-behavior-x: ${e};`:n==="overscroll-y"?`overscroll-behavior-y: ${e};`:n==="basis"?`flex-basis: ${r?e:`var(--s-${e})`};`:n==="flex"?`flex: ${r?e.replace(/_/g," "):{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"}[e]||e};`:n==="order"?`order: ${{first:"-9999",last:"9999",none:"0"}[e]||e};`:n==="grid-cols"?e==="none"?"grid-template-columns: none;":e==="subgrid"?"grid-template-columns: subgrid;":r?`grid-template-columns: ${e.replace(/_/g," ")};`:`grid-template-columns: repeat(${e}, minmax(0, 1fr));`:n==="grid-rows"?e==="none"?"grid-template-rows: none;":e==="subgrid"?"grid-template-rows: subgrid;":r?`grid-template-rows: ${e.replace(/_/g," ")};`:`grid-template-rows: repeat(${e}, minmax(0, 1fr));`:n==="col-span"?e==="full"?"grid-column: 1 / -1;":`grid-column: span ${e} / span ${e};`:n==="col-start"?`grid-column-start: ${e};`:n==="col-end"?`grid-column-end: ${e};`:n==="row-span"?e==="full"?"grid-row: 1 / -1;":`grid-row: span ${e} / span ${e};`:n==="row-start"?`grid-row-start: ${e};`:n==="row-end"?`grid-row-end: ${e};`:n==="auto-cols"?`grid-auto-columns: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="auto-rows"?`grid-auto-rows: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="table"?`table-layout: ${{auto:"auto",fixed:"fixed"}[e]||e};`:n==="caption"?`caption-side: ${e};`:n==="border-spacing"?`border-spacing: ${r?e:`var(--s-${e})`};`:n==="border-spacing-x"?`border-spacing: ${r?e:`var(--s-${e})`} 0;`:n==="border-spacing-y"?`border-spacing: 0 ${r?e:`var(--s-${e})`};`:E[n]||""}function T(s){let{property:n,value:e,isArbitrary:r}=s;if(e==="auto")return{m:"margin: auto;","m-x":"margin-left: auto; margin-right: auto;","m-y":"margin-top: auto; margin-bottom: auto;","m-t":"margin-top: auto;","m-r":"margin-right: auto;","m-b":"margin-bottom: auto;","m-l":"margin-left: auto;"}[n]||"";let i={min:"min-content",max:"max-content",fit:"fit-content"};if(["w","h","min-w","max-w","min-h","max-h"].includes(n)&&i[e]){let o=i[e];return{w:`width: ${o};`,h:`height: ${o};`,"min-w":`min-width: ${o};`,"max-w":`max-width: ${o};`,"min-h":`min-height: ${o};`,"max-h":`max-height: ${o};`}[n]||""}let l;return r?l=e:e.startsWith("tw-")?l=`var(--tw-${e.slice(3)})`:l=`var(--s-${e})`,{p:`padding: ${l};`,"p-t":`padding-top: ${l};`,"p-r":`padding-right: ${l};`,"p-b":`padding-bottom: ${l};`,"p-l":`padding-left: ${l};`,"p-x":`padding-left: ${l}; padding-right: ${l};`,"p-y":`padding-top: ${l}; padding-bottom: ${l};`,m:`margin: ${l};`,"m-t":`margin-top: ${l};`,"m-r":`margin-right: ${l};`,"m-b":`margin-bottom: ${l};`,"m-l":`margin-left: ${l};`,"m-x":`margin-left: ${l}; margin-right: ${l};`,"m-y":`margin-top: ${l}; margin-bottom: ${l};`,g:`gap: ${l};`,"g-x":`column-gap: ${l};`,"g-y":`row-gap: ${l};`,w:`width: ${l};`,h:`height: ${l};`,"min-w":`min-width: ${l};`,"max-w":`max-width: ${l};`,"min-h":`min-height: ${l};`,"max-h":`max-height: ${l};`}[n]||""}function O(s){let{property:n,value:e,isArbitrary:r}=s,i={italic:"font-style: italic;","not-italic":"font-style: normal;","font-stretch-condensed":"font-stretch: condensed;","font-stretch-expanded":"font-stretch: expanded;","font-stretch-normal":"font-stretch: normal;",antialiased:"-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;","subpixel-antialiased":"-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;","normal-nums":"font-variant-numeric: normal;",ordinal:"font-variant-numeric: ordinal;","slashed-zero":"font-variant-numeric: slashed-zero;","lining-nums":"font-variant-numeric: lining-nums;","oldstyle-nums":"font-variant-numeric: oldstyle-nums;","proportional-nums":"font-variant-numeric: proportional-nums;","tabular-nums":"font-variant-numeric: tabular-nums;",uppercase:"text-transform: uppercase;",lowercase:"text-transform: lowercase;",capitalize:"text-transform: capitalize;","normal-case":"text-transform: none;",underline:"text-decoration-line: underline;",overline:"text-decoration-line: overline;","line-through":"text-decoration-line: line-through;","no-underline":"text-decoration-line: none;","decoration-solid":"text-decoration-style: solid;","decoration-double":"text-decoration-style: double;","decoration-dotted":"text-decoration-style: dotted;","decoration-dashed":"text-decoration-style: dashed;","decoration-wavy":"text-decoration-style: wavy;",truncate:"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;","text-ellipsis":"text-overflow: ellipsis;","text-clip":"text-overflow: clip;","text-wrap":"text-wrap: wrap;","text-nowrap":"text-wrap: nowrap;","text-balance":"text-wrap: balance;","text-pretty":"text-wrap: pretty;","whitespace-normal":"white-space: normal;","whitespace-nowrap":"white-space: nowrap;","whitespace-pre":"white-space: pre;","whitespace-pre-line":"white-space: pre-line;","whitespace-pre-wrap":"white-space: pre-wrap;","whitespace-break-spaces":"white-space: break-spaces;","break-normal":"overflow-wrap: normal; word-break: normal;","break-words":"overflow-wrap: break-word;","break-all":"word-break: break-all;","break-keep":"word-break: keep-all;","hyphens-none":"hyphens: none;","hyphens-manual":"hyphens: manual;","hyphens-auto":"hyphens: auto;","align-baseline":"vertical-align: baseline;","align-top":"vertical-align: top;","align-middle":"vertical-align: middle;","align-bottom":"vertical-align: bottom;","align-text-top":"vertical-align: text-top;","align-text-bottom":"vertical-align: text-bottom;","align-sub":"vertical-align: sub;","align-super":"vertical-align: super;","list-none":"list-style-type: none;","list-disc":"list-style-type: disc;","list-decimal":"list-style-type: decimal;","list-square":"list-style-type: square;","list-inside":"list-style-position: inside;","list-outside":"list-style-position: outside;"};if(i[n])return i[n];let l={bg:()=>`background-color: ${r?e:`var(--c-${e})`};`,text:()=>["left","center","right","justify"].includes(e)?`text-align: ${e};`:`color: ${r?e:`var(--c-${e})`};`,"text-size":()=>{let t,o;if(r)return t=e,`font-size: ${t};`;if(e.startsWith("tw-")){let c=e.slice(3);t=`var(--tw-text-${c})`,o=`var(--tw-leading-${c})`}else t=`var(--font-${e})`,o=`var(--font-lh-${e})`;return`font-size: ${t}; line-height: ${o};`},font:()=>{let t={sans:"ui-sans-serif, system-ui, sans-serif",serif:"ui-serif, Georgia, serif",mono:"ui-monospace, monospace"};if(t[e])return`font-family: ${t[e]};`;let o;return r?o=e:e.startsWith("tw-")?o=`var(--tw-font-${e.slice(3)})`:o=`var(--fw-${e})`,`font-weight: ${o};`},tracking:()=>`letter-spacing: ${r?e:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"}[e]||e};`,leading:()=>`line-height: ${r?e:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"}[e]||e};`,"line-clamp":()=>`overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${e};`,decoration:()=>`text-decoration-color: ${r?e:`var(--c-${e})`};`,"decoration-thickness":()=>`text-decoration-thickness: ${r?e:`${e}px`};`,"underline-offset":()=>`text-underline-offset: ${r?e:`${e}px`};`,indent:()=>`text-indent: ${r?e:`var(--s-${e})`};`,border:()=>`border-color: ${r?e:`var(--c-${e})`}; border-style: solid;`,"border-t":()=>`border-top-color: ${r?e:`var(--c-${e})`}; border-top-style: solid;`,"border-b":()=>`border-bottom-color: ${r?e:`var(--c-${e})`}; border-bottom-style: solid;`,"border-l":()=>`border-left-color: ${r?e:`var(--c-${e})`}; border-left-style: solid;`,"border-r":()=>`border-right-color: ${r?e:`var(--c-${e})`}; border-right-style: solid;`,"border-x":()=>{let t=r?e:`var(--c-${e})`;return`border-left-color: ${t}; border-right-color: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y":()=>{let t=r?e:`var(--c-${e})`;return`border-top-color: ${t}; border-bottom-color: ${t}; border-top-style: solid; border-bottom-style: solid;`},"border-w":()=>`border-width: ${r?e:`var(--s-${e})`}; border-style: solid;`,"border-t-w":()=>`border-top-width: ${r?e:`var(--s-${e})`}; border-top-style: solid;`,"border-b-w":()=>`border-bottom-width: ${r?e:`var(--s-${e})`}; border-bottom-style: solid;`,"border-l-w":()=>`border-left-width: ${r?e:`var(--s-${e})`}; border-left-style: solid;`,"border-r-w":()=>`border-right-width: ${r?e:`var(--s-${e})`}; border-right-style: solid;`,"border-x-w":()=>{let t=r?e:`var(--s-${e})`;return`border-left-width: ${t}; border-right-width: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y-w":()=>{let t=r?e:`var(--s-${e})`;return`border-top-width: ${t}; border-bottom-width: ${t}; border-top-style: solid; border-bottom-style: solid;`},rounded:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-rounded-${e.slice(3)})`:t=`var(--r-${e})`,`border-radius: ${t};`},shadow:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-shadow-${e.slice(3)})`:t=`var(--shadow-${e})`,`box-shadow: ${t};`},opacity:()=>`opacity: ${r?e:parseFloat(e)/100};`,content:()=>`content: "${e}";`,scale:()=>`transform: scale(${r?e:parseFloat(e)/100});`,"scale-x":()=>`transform: scaleX(${r?e:parseFloat(e)/100});`,"scale-y":()=>`transform: scaleY(${r?e:parseFloat(e)/100});`,rotate:()=>`transform: rotate(${r?e:`${e}deg`});`,"translate-x":()=>`transform: translateX(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"translate-y":()=>`transform: translateY(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"skew-x":()=>`transform: skewX(${r?e:`${e}deg`});`,"skew-y":()=>`transform: skewY(${r?e:`${e}deg`});`,origin:()=>`transform-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,transition:()=>({none:"transition-property: none;",all:"transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",colors:"transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",opacity:"transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",shadow:"transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",transform:"transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;"})[e]||`transition-property: ${e};`,duration:()=>`transition-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,ease:()=>`transition-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,delay:()=>`transition-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,animate:()=>({none:"animation: none;",spin:"animation: spin 1s linear infinite;",ping:"animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;",pulse:"animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;",bounce:"animation: bounce 1s infinite;"})[e]||`animation: ${e};`,blur:()=>`filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,brightness:()=>`filter: brightness(${r?e:{0:"0",50:"0.5",75:"0.75",90:"0.9",95:"0.95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,contrast:()=>`filter: contrast(${r?e:{0:"0",50:"0.5",75:"0.75",100:"1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,grayscale:()=>`filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"hue-rotate":()=>`filter: hue-rotate(${r?e:`${e}deg`});`,invert:()=>`filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,saturate:()=>`filter: saturate(${r?e:{0:"0",50:"0.5",100:"1",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,sepia:()=>`filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"drop-shadow":()=>{let t={sm:"drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))",md:"drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",lg:"drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",xl:"drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08))","2xl":"drop-shadow(0 25px 25px rgb(0 0 0 / 0.15))",none:"drop-shadow(0 0 #0000)"};return`filter: ${r?`drop-shadow(${e.replace(/_/g," ")})`:t[e]||t.md};`},"bg-size":()=>`background-size: ${r?e.replace(/_/g," "):{auto:"auto",cover:"cover",contain:"contain"}[e]||e};`,"bg-pos":()=>`background-position: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"bg-repeat":()=>`background-repeat: ${{repeat:"repeat","no-repeat":"no-repeat","repeat-x":"repeat-x","repeat-y":"repeat-y",round:"round",space:"space"}[e]||e};`,"bg-attachment":()=>`background-attachment: ${e};`,"bg-clip":()=>`background-clip: ${{border:"border-box",padding:"padding-box",content:"content-box",text:"text"}[e]||e};`,"bg-origin":()=>`background-origin: ${{border:"border-box",padding:"padding-box",content:"content-box"}[e]||e};`,"bg-blend":()=>`background-blend-mode: ${e};`,"bg-image":()=>`background-image: ${r?e.replace(/_/g," "):{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"}[e]||e};`,from:()=>`--tw-gradient-from: ${r?e:`var(--c-${e})`}; --tw-gradient-to: transparent; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);`,via:()=>`--tw-gradient-via: ${r?e:`var(--c-${e})`}; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to);`,to:()=>`--tw-gradient-to: ${r?e:`var(--c-${e})`};`,"backdrop-blur":()=>`backdrop-filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,"backdrop-brightness":()=>`backdrop-filter: brightness(${r?e:parseFloat(e)/100});`,"backdrop-contrast":()=>`backdrop-filter: contrast(${r?e:parseFloat(e)/100});`,"backdrop-grayscale":()=>`backdrop-filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-hue-rotate":()=>`backdrop-filter: hue-rotate(${r?e:`${e}deg`});`,"backdrop-invert":()=>`backdrop-filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-opacity":()=>`backdrop-filter: opacity(${r?e:parseFloat(e)/100});`,"backdrop-saturate":()=>`backdrop-filter: saturate(${r?e:parseFloat(e)/100});`,"backdrop-sepia":()=>`backdrop-filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"animation-duration":()=>`animation-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,"animation-delay":()=>`animation-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,"animation-iteration":()=>`animation-iteration-count: ${{infinite:"infinite",once:"1",twice:"2"}[e]||e};`,"animation-direction":()=>`animation-direction: ${e};`,"animation-fill":()=>`animation-fill-mode: ${e};`,"animation-play":()=>`animation-play-state: ${e};`,"animation-timing":()=>`animation-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,"scroll-behavior":()=>`scroll-behavior: ${e};`,"scroll-m":()=>`scroll-margin: ${r?e:`var(--s-${e})`};`,"scroll-m-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-left: ${t}; scroll-margin-right: ${t};`},"scroll-m-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-top: ${t}; scroll-margin-bottom: ${t};`},"scroll-p":()=>`scroll-padding: ${r?e:`var(--s-${e})`};`,"scroll-p-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-left: ${t}; scroll-padding-right: ${t};`},"scroll-p-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-top: ${t}; scroll-padding-bottom: ${t};`},"snap-align":()=>`scroll-snap-align: ${e};`,"snap-stop":()=>`scroll-snap-stop: ${e};`,"snap-type":()=>`scroll-snap-type: ${{none:"none",x:"x mandatory",y:"y mandatory",both:"both mandatory","x-proximity":"x proximity","y-proximity":"y proximity"}[e]||e};`,touch:()=>`touch-action: ${{auto:"auto",none:"none","pan-x":"pan-x","pan-y":"pan-y","pan-left":"pan-left","pan-right":"pan-right","pan-up":"pan-up","pan-down":"pan-down","pinch-zoom":"pinch-zoom",manipulation:"manipulation"}[e]||e};`,resize:()=>`resize: ${{none:"none",both:"both",x:"horizontal",y:"vertical"}[e]||e};`,"will-change":()=>`will-change: ${{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform",opacity:"opacity"}[e]||e};`,"color-scheme":()=>`color-scheme: ${e};`,"field-sizing":()=>`field-sizing: ${e};`,"forced-color":()=>`forced-color-adjust: ${e};`,"border-style":()=>`border-style: ${e};`,outline:()=>`outline-color: ${r?e:`var(--c-${e})`};`,"outline-style":()=>`outline-style: ${e};`,"outline-w":()=>`outline-width: ${r?e:`${e}px`};`,"outline-offset":()=>`outline-offset: ${r?e:`${e}px`};`,ring:()=>e==="none"?"box-shadow: 0 0 0 0 transparent;":`box-shadow: 0 0 0 var(--ring-offset) var(--ring-offset-color), 0 0 0 calc(${r?e:`var(--ring-${e})`} + var(--ring-offset)) var(--ring-color);`,"ring-color":()=>`--ring-color: ${r?e:`var(--c-${e})`};`,"ring-offset":()=>`--ring-offset: ${r?e:`${e}px`};`,"ring-offset-color":()=>`--ring-offset-color ${r?e:`var(--c-${e})`};`,divide:()=>`border-color: ${r?e:`var(--c-${e})`}; border-style: solid;`,"divide-x":()=>{if(e==="reverse")return"--ss-divide-x-reverse: 1;";let t=r?e:`var(--c-${e})`;return`border-left-color: ${t}; border-right-color: ${t}; border-left-style: solid; border-right-style: solid;`},"divide-y":()=>{if(e==="reverse")return"--ss-divide-y-reverse: 1;";let t=r?e:`var(--c-${e})`;return`border-top-color: ${t}; border-bottom-color: ${t}; border-top-style: solid; border-bottom-style: solid;`},"divide-w":()=>`border-width: ${r?e:`var(--s-${e})`}; border-style: solid;`,"divide-x-w":()=>{let t=r?e:`var(--s-${e})`;return`
|
|
201
|
+
`}let F={flex:"display: flex;",grid:"display: grid;","inline-flex":"display: inline-flex;","inline-grid":"display: inline-grid;",block:"display: block;",inline:"display: inline-block;",hidden:"display: none;",row:"flex-direction: row;",col:"flex-direction: column;","row-reverse":"flex-direction: row-reverse;","col-reverse":"flex-direction: column-reverse;",wrap:"flex-wrap: wrap;",nowrap:"flex-wrap: nowrap;","wrap-reverse":"flex-wrap: wrap-reverse;",grow:"flex-grow: 1;","grow-0":"flex-grow: 0;",shrink:"flex-shrink: 1;","shrink-0":"flex-shrink: 0;","grid-flow-row":"grid-auto-flow: row;","grid-flow-col":"grid-auto-flow: column;","grid-flow-dense":"grid-auto-flow: dense;","grid-flow-row-dense":"grid-auto-flow: row dense;","grid-flow-col-dense":"grid-auto-flow: column dense;",center:"justify-content: center; align-items: center;",start:"justify-content: flex-start; align-items: flex-start;",end:"justify-content: flex-end; align-items: flex-end;",between:"justify-content: space-between;",around:"justify-content: space-around;",evenly:"justify-content: space-evenly;",absolute:"position: absolute;",relative:"position: relative;",fixed:"position: fixed;",sticky:"position: sticky;",static:"position: static;",visible:"visibility: visible;",invisible:"visibility: hidden;",isolate:"isolation: isolate;","isolate-auto":"isolation: auto;","box-border":"box-sizing: border-box;","box-content":"box-sizing: content-box;","float-left":"float: left;","float-right":"float: right;","float-none":"float: none;","clear-left":"clear: left;","clear-right":"clear: right;","clear-both":"clear: both;","clear-none":"clear: none;",container:"width: 100%; margin-left: auto; margin-right: auto;","border-collapse":"border-collapse: collapse;","border-separate":"border-collapse: separate;"},P=y,W=w;function M(s){let{property:n,value:e,isArbitrary:r}=s;if(n===e&&F[n])return F[n];if(n==="container")return"width: 100%; margin-left: auto; margin-right: auto;";if(n==="justify")return`justify-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="justify-items")return`justify-items: ${e};`;if(n==="justify-self")return`justify-self: ${e};`;if(n==="content")return`align-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="items")return`align-items: ${{start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="self")return`align-self: ${{auto:"auto",start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="place-content")return`place-content: ${{start:"start",end:"end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="place-items")return`place-items: ${e};`;if(n==="place-self")return`place-self: ${e};`;if(n==="z")return`z-index: var(--z-${e});`;if(n==="overflow")return`overflow: ${e};`;if(n==="overflow-x")return`overflow-x: ${e};`;if(n==="overflow-y")return`overflow-y: ${e};`;if(n==="aspect")return`aspect-ratio: ${r?e.replace(/_/g," "):{square:"1 / 1",video:"16 / 9",auto:"auto"}[e]||e};`;if(n==="object")return`object-fit: ${e};`;if(n==="object-pos")return`object-position: ${r?e.replace(/_/g," "):e};`;if(n==="inset")return`inset: ${r?e:e==="0"?"0":`var(--s-${e})`};`;if(["top","right","bottom","left"].includes(n)){let l=r?e:e==="0"?"0":`var(--s-${e})`;return`${n}: ${l};`}if(n==="inset-x"){let l=r?e:e==="0"?"0":`var(--s-${e})`;return`left: ${l}; right: ${l};`}if(n==="inset-y"){let l=r?e:e==="0"?"0":`var(--s-${e})`;return`top: ${l}; bottom: ${l};`}return n==="cols"?`columns: ${e};`:n==="overscroll"?`overscroll-behavior: ${e};`:n==="overscroll-x"?`overscroll-behavior-x: ${e};`:n==="overscroll-y"?`overscroll-behavior-y: ${e};`:n==="basis"?`flex-basis: ${r?e:`var(--s-${e})`};`:n==="flex"?`flex: ${r?e.replace(/_/g," "):{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"}[e]||e};`:n==="order"?`order: ${{first:"-9999",last:"9999",none:"0"}[e]||e};`:n==="grid-cols"?e==="none"?"grid-template-columns: none;":e==="subgrid"?"grid-template-columns: subgrid;":r?`grid-template-columns: ${e.replace(/_/g," ")};`:`grid-template-columns: repeat(${e}, minmax(0, 1fr));`:n==="grid-rows"?e==="none"?"grid-template-rows: none;":e==="subgrid"?"grid-template-rows: subgrid;":r?`grid-template-rows: ${e.replace(/_/g," ")};`:`grid-template-rows: repeat(${e}, minmax(0, 1fr));`:n==="col-span"?e==="full"?"grid-column: 1 / -1;":`grid-column: span ${e} / span ${e};`:n==="col-start"?`grid-column-start: ${e};`:n==="col-end"?`grid-column-end: ${e};`:n==="row-span"?e==="full"?"grid-row: 1 / -1;":`grid-row: span ${e} / span ${e};`:n==="row-start"?`grid-row-start: ${e};`:n==="row-end"?`grid-row-end: ${e};`:n==="auto-cols"?`grid-auto-columns: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="auto-rows"?`grid-auto-rows: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="table"?`table-layout: ${{auto:"auto",fixed:"fixed"}[e]||e};`:n==="caption"?`caption-side: ${e};`:n==="border-spacing"?`border-spacing: ${r?e:`var(--s-${e})`};`:n==="border-spacing-x"?`border-spacing: ${r?e:`var(--s-${e})`} 0;`:n==="border-spacing-y"?`border-spacing: 0 ${r?e:`var(--s-${e})`};`:F[n]||""}function j(s){let{property:n,value:e,isArbitrary:r}=s;if(e==="auto")return{m:"margin: auto;","m-x":"margin-left: auto; margin-right: auto;","m-y":"margin-top: auto; margin-bottom: auto;","m-t":"margin-top: auto;","m-r":"margin-right: auto;","m-b":"margin-bottom: auto;","m-l":"margin-left: auto;"}[n]||"";let l={min:"min-content",max:"max-content",fit:"fit-content"};if(["w","h","min-w","max-w","min-h","max-h"].includes(n)&&l[e]){let a=l[e];return{w:`width: ${a};`,h:`height: ${a};`,"min-w":`min-width: ${a};`,"max-w":`max-width: ${a};`,"min-h":`min-height: ${a};`,"max-h":`max-height: ${a};`}[n]||""}let c;if(r)c=e;else{let a=e.startsWith("-"),i=a?e.substring(1):e,o;i.startsWith("tw-")?o=`var(--tw-${i.slice(3)})`:o=`var(--s-${i})`,c=a?`calc(${o} * -1)`:o}return{p:`padding: ${c};`,"p-t":`padding-top: ${c};`,"p-r":`padding-right: ${c};`,"p-b":`padding-bottom: ${c};`,"p-l":`padding-left: ${c};`,"p-x":`padding-left: ${c}; padding-right: ${c};`,"p-y":`padding-top: ${c}; padding-bottom: ${c};`,m:`margin: ${c};`,"m-t":`margin-top: ${c};`,"m-r":`margin-right: ${c};`,"m-b":`margin-bottom: ${c};`,"m-l":`margin-left: ${c};`,"m-x":`margin-left: ${c}; margin-right: ${c};`,"m-y":`margin-top: ${c}; margin-bottom: ${c};`,g:`gap: ${c};`,"g-x":`column-gap: ${c};`,"g-y":`row-gap: ${c};`,w:`width: ${c};`,h:`height: ${c};`,"min-w":`min-width: ${c};`,"max-w":`max-width: ${c};`,"min-h":`min-height: ${c};`,"max-h":`max-height: ${c};`}[n]||""}function T(s){let{property:n,value:e,isArbitrary:r}=s,l={italic:"font-style: italic;","not-italic":"font-style: normal;","font-stretch-condensed":"font-stretch: condensed;","font-stretch-expanded":"font-stretch: expanded;","font-stretch-normal":"font-stretch: normal;",antialiased:"-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;","subpixel-antialiased":"-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;","normal-nums":"font-variant-numeric: normal;",ordinal:"font-variant-numeric: ordinal;","slashed-zero":"font-variant-numeric: slashed-zero;","lining-nums":"font-variant-numeric: lining-nums;","oldstyle-nums":"font-variant-numeric: oldstyle-nums;","proportional-nums":"font-variant-numeric: proportional-nums;","tabular-nums":"font-variant-numeric: tabular-nums;",uppercase:"text-transform: uppercase;",lowercase:"text-transform: lowercase;",capitalize:"text-transform: capitalize;","normal-case":"text-transform: none;",underline:"text-decoration-line: underline;",overline:"text-decoration-line: overline;","line-through":"text-decoration-line: line-through;","no-underline":"text-decoration-line: none;","decoration-solid":"text-decoration-style: solid;","decoration-double":"text-decoration-style: double;","decoration-dotted":"text-decoration-style: dotted;","decoration-dashed":"text-decoration-style: dashed;","decoration-wavy":"text-decoration-style: wavy;",truncate:"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;","text-ellipsis":"text-overflow: ellipsis;","text-clip":"text-overflow: clip;","text-wrap":"text-wrap: wrap;","text-nowrap":"text-wrap: nowrap;","text-balance":"text-wrap: balance;","text-pretty":"text-wrap: pretty;","whitespace-normal":"white-space: normal;","whitespace-nowrap":"white-space: nowrap;","whitespace-pre":"white-space: pre;","whitespace-pre-line":"white-space: pre-line;","whitespace-pre-wrap":"white-space: pre-wrap;","whitespace-break-spaces":"white-space: break-spaces;","break-normal":"overflow-wrap: normal; word-break: normal;","break-words":"overflow-wrap: break-word;","break-all":"word-break: break-all;","break-keep":"word-break: keep-all;","hyphens-none":"hyphens: none;","hyphens-manual":"hyphens: manual;","hyphens-auto":"hyphens: auto;","align-baseline":"vertical-align: baseline;","align-top":"vertical-align: top;","align-middle":"vertical-align: middle;","align-bottom":"vertical-align: bottom;","align-text-top":"vertical-align: text-top;","align-text-bottom":"vertical-align: text-bottom;","align-sub":"vertical-align: sub;","align-super":"vertical-align: super;","list-none":"list-style-type: none;","list-disc":"list-style-type: disc;","list-decimal":"list-style-type: decimal;","list-square":"list-style-type: square;","list-inside":"list-style-position: inside;","list-outside":"list-style-position: outside;"};if(l[n])return l[n];let c={bg:()=>`background-color: ${r?e:`var(--c-${e})`};`,text:()=>["left","center","right","justify"].includes(e)?`text-align: ${e};`:`color: ${r?e:`var(--c-${e})`};`,"text-size":()=>{let t,a;if(r)return t=e,`font-size: ${t};`;if(e.startsWith("tw-")){let i=e.slice(3);t=`var(--tw-text-${i})`,a=`var(--tw-leading-${i})`}else t=`var(--font-${e})`,a=`var(--font-lh-${e})`;return`font-size: ${t}; line-height: ${a};`},font:()=>{let t={sans:"ui-sans-serif, system-ui, sans-serif",serif:"ui-serif, Georgia, serif",mono:"ui-monospace, monospace"};if(t[e])return`font-family: ${t[e]};`;let a;return r?a=e:e.startsWith("tw-")?a=`var(--tw-font-${e.slice(3)})`:a=`var(--fw-${e})`,`font-weight: ${a};`},tracking:()=>`letter-spacing: ${r?e:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"}[e]||e};`,leading:()=>`line-height: ${r?e:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"}[e]||e};`,"line-clamp":()=>`overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${e};`,decoration:()=>`text-decoration-color: ${r?e:`var(--c-${e})`};`,"decoration-thickness":()=>`text-decoration-thickness: ${r?e:`${e}px`};`,"underline-offset":()=>`text-underline-offset: ${r?e:`${e}px`};`,indent:()=>`text-indent: ${r?e:`var(--s-${e})`};`,border:()=>`border-color: ${r?e:`var(--c-${e})`}; border-style: solid;`,"border-t":()=>`border-top-color: ${r?e:`var(--c-${e})`}; border-top-style: solid;`,"border-b":()=>`border-bottom-color: ${r?e:`var(--c-${e})`}; border-bottom-style: solid;`,"border-l":()=>`border-left-color: ${r?e:`var(--c-${e})`}; border-left-style: solid;`,"border-r":()=>`border-right-color: ${r?e:`var(--c-${e})`}; border-right-style: solid;`,"border-x":()=>{let t=r?e:`var(--c-${e})`;return`border-left-color: ${t}; border-right-color: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y":()=>{let t=r?e:`var(--c-${e})`;return`border-top-color: ${t}; border-bottom-color: ${t}; border-top-style: solid; border-bottom-style: solid;`},"border-w":()=>`border-width: ${r?e:`var(--s-${e})`}; border-style: solid;`,"border-t-w":()=>`border-top-width: ${r?e:`var(--s-${e})`}; border-top-style: solid;`,"border-b-w":()=>`border-bottom-width: ${r?e:`var(--s-${e})`}; border-bottom-style: solid;`,"border-l-w":()=>`border-left-width: ${r?e:`var(--s-${e})`}; border-left-style: solid;`,"border-r-w":()=>`border-right-width: ${r?e:`var(--s-${e})`}; border-right-style: solid;`,"border-x-w":()=>{let t=r?e:`var(--s-${e})`;return`border-left-width: ${t}; border-right-width: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y-w":()=>{let t=r?e:`var(--s-${e})`;return`border-top-width: ${t}; border-bottom-width: ${t}; border-top-style: solid; border-bottom-style: solid;`},rounded:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-rounded-${e.slice(3)})`:t=`var(--r-${e})`,`border-radius: ${t};`},shadow:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-shadow-${e.slice(3)})`:t=`var(--shadow-${e})`,`box-shadow: ${t};`},opacity:()=>`opacity: ${r?e:parseFloat(e)/100};`,content:()=>`content: "${e}";`,scale:()=>`transform: scale(${r?e:parseFloat(e)/100});`,"scale-x":()=>`transform: scaleX(${r?e:parseFloat(e)/100});`,"scale-y":()=>`transform: scaleY(${r?e:parseFloat(e)/100});`,rotate:()=>`transform: rotate(${r?e:`${e}deg`});`,"translate-x":()=>`transform: translateX(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"translate-y":()=>`transform: translateY(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"skew-x":()=>`transform: skewX(${r?e:`${e}deg`});`,"skew-y":()=>`transform: skewY(${r?e:`${e}deg`});`,origin:()=>`transform-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,transition:()=>({none:"transition-property: none;",all:"transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",colors:"transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",opacity:"transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",shadow:"transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",transform:"transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;"})[e]||`transition-property: ${e};`,duration:()=>`transition-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,ease:()=>`transition-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,delay:()=>`transition-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,animate:()=>({none:"animation: none;",spin:"animation: spin 1s linear infinite;",ping:"animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;",pulse:"animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;",bounce:"animation: bounce 1s infinite;"})[e]||`animation: ${e};`,blur:()=>`filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,brightness:()=>`filter: brightness(${r?e:{0:"0",50:"0.5",75:"0.75",90:"0.9",95:"0.95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,contrast:()=>`filter: contrast(${r?e:{0:"0",50:"0.5",75:"0.75",100:"1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,grayscale:()=>`filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"hue-rotate":()=>`filter: hue-rotate(${r?e:`${e}deg`});`,invert:()=>`filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,saturate:()=>`filter: saturate(${r?e:{0:"0",50:"0.5",100:"1",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,sepia:()=>`filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"drop-shadow":()=>{let t={sm:"drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))",md:"drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",lg:"drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",xl:"drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08))","2xl":"drop-shadow(0 25px 25px rgb(0 0 0 / 0.15))",none:"drop-shadow(0 0 #0000)"};return`filter: ${r?`drop-shadow(${e.replace(/_/g," ")})`:t[e]||t.md};`},"bg-size":()=>`background-size: ${r?e.replace(/_/g," "):{auto:"auto",cover:"cover",contain:"contain"}[e]||e};`,"bg-pos":()=>`background-position: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"bg-repeat":()=>`background-repeat: ${{repeat:"repeat","no-repeat":"no-repeat","repeat-x":"repeat-x","repeat-y":"repeat-y",round:"round",space:"space"}[e]||e};`,"bg-attachment":()=>`background-attachment: ${e};`,"bg-clip":()=>`background-clip: ${{border:"border-box",padding:"padding-box",content:"content-box",text:"text"}[e]||e};`,"bg-origin":()=>`background-origin: ${{border:"border-box",padding:"padding-box",content:"content-box"}[e]||e};`,"bg-blend":()=>`background-blend-mode: ${e};`,"bg-image":()=>`background-image: ${r?e.replace(/_/g," "):{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"}[e]||e};`,from:()=>`--tw-gradient-from: ${r?e:`var(--c-${e})`}; --tw-gradient-to: transparent; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);`,via:()=>`--tw-gradient-via: ${r?e:`var(--c-${e})`}; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to);`,to:()=>`--tw-gradient-to: ${r?e:`var(--c-${e})`};`,"backdrop-blur":()=>`backdrop-filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,"backdrop-brightness":()=>`backdrop-filter: brightness(${r?e:parseFloat(e)/100});`,"backdrop-contrast":()=>`backdrop-filter: contrast(${r?e:parseFloat(e)/100});`,"backdrop-grayscale":()=>`backdrop-filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-hue-rotate":()=>`backdrop-filter: hue-rotate(${r?e:`${e}deg`});`,"backdrop-invert":()=>`backdrop-filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-opacity":()=>`backdrop-filter: opacity(${r?e:parseFloat(e)/100});`,"backdrop-saturate":()=>`backdrop-filter: saturate(${r?e:parseFloat(e)/100});`,"backdrop-sepia":()=>`backdrop-filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"animation-duration":()=>`animation-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,"animation-delay":()=>`animation-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,"animation-iteration":()=>`animation-iteration-count: ${{infinite:"infinite",once:"1",twice:"2"}[e]||e};`,"animation-direction":()=>`animation-direction: ${e};`,"animation-fill":()=>`animation-fill-mode: ${e};`,"animation-play":()=>`animation-play-state: ${e};`,"animation-timing":()=>`animation-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,"scroll-behavior":()=>`scroll-behavior: ${e};`,"scroll-m":()=>`scroll-margin: ${r?e:`var(--s-${e})`};`,"scroll-m-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-left: ${t}; scroll-margin-right: ${t};`},"scroll-m-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-top: ${t}; scroll-margin-bottom: ${t};`},"scroll-p":()=>`scroll-padding: ${r?e:`var(--s-${e})`};`,"scroll-p-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-left: ${t}; scroll-padding-right: ${t};`},"scroll-p-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-top: ${t}; scroll-padding-bottom: ${t};`},"snap-align":()=>`scroll-snap-align: ${e};`,"snap-stop":()=>`scroll-snap-stop: ${e};`,"snap-type":()=>`scroll-snap-type: ${{none:"none",x:"x mandatory",y:"y mandatory",both:"both mandatory","x-proximity":"x proximity","y-proximity":"y proximity"}[e]||e};`,touch:()=>`touch-action: ${{auto:"auto",none:"none","pan-x":"pan-x","pan-y":"pan-y","pan-left":"pan-left","pan-right":"pan-right","pan-up":"pan-up","pan-down":"pan-down","pinch-zoom":"pinch-zoom",manipulation:"manipulation"}[e]||e};`,resize:()=>`resize: ${{none:"none",both:"both",x:"horizontal",y:"vertical"}[e]||e};`,"will-change":()=>`will-change: ${{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform",opacity:"opacity"}[e]||e};`,"color-scheme":()=>`color-scheme: ${e};`,"field-sizing":()=>`field-sizing: ${e};`,"forced-color":()=>`forced-color-adjust: ${e};`,"border-style":()=>`border-style: ${e};`,outline:()=>`outline-color: ${r?e:`var(--c-${e})`};`,"outline-style":()=>`outline-style: ${e};`,"outline-w":()=>`outline-width: ${r?e:`${e}px`};`,"outline-offset":()=>`outline-offset: ${r?e:`${e}px`};`,ring:()=>e==="none"?"box-shadow: 0 0 0 0 transparent;":`box-shadow: 0 0 0 var(--ring-offset) var(--ring-offset-color), 0 0 0 calc(${r?e:`var(--ring-${e})`} + var(--ring-offset)) var(--ring-color);`,"ring-color":()=>`--ring-color: ${r?e:`var(--c-${e})`};`,"ring-offset":()=>`--ring-offset: ${r?e:`${e}px`};`,"ring-offset-color":()=>`--ring-offset-color ${r?e:`var(--c-${e})`};`,divide:()=>`border-color: ${r?e:`var(--c-${e})`}; border-style: solid;`,"divide-x":()=>{if(e==="reverse")return"--ss-divide-x-reverse: 1;";let t=r?e:`var(--c-${e})`;return`border-left-color: ${t}; border-right-color: ${t}; border-left-style: solid; border-right-style: solid;`},"divide-y":()=>{if(e==="reverse")return"--ss-divide-y-reverse: 1;";let t=r?e:`var(--c-${e})`;return`border-top-color: ${t}; border-bottom-color: ${t}; border-top-style: solid; border-bottom-style: solid;`},"divide-w":()=>`border-width: ${r?e:`var(--s-${e})`}; border-style: solid;`,"divide-x-w":()=>{let t=r?e:`var(--s-${e})`;return`
|
|
202
202
|
border-right-width: calc(${t} * var(--ss-divide-x-reverse, 0));
|
|
203
203
|
border-left-width: calc(${t} * (1 - var(--ss-divide-x-reverse, 0)));
|
|
204
204
|
border-left-style: solid;
|
|
@@ -208,15 +208,15 @@ img, video {
|
|
|
208
208
|
border-top-width: calc(${t} * (1 - var(--ss-divide-y-reverse, 0)));
|
|
209
209
|
border-top-style: solid;
|
|
210
210
|
border-bottom-style: solid;
|
|
211
|
-
`},"divide-x:reverse":()=>"--ss-divide-x-reverse: 1;","divide-y:reverse":()=>"--ss-divide-y-reverse: 1;","divide-style":()=>`border-style: ${e};`,stroke:()=>`stroke: ${r?e:`var(--c-${e})`};`,"stroke-w":()=>`stroke-width: ${e};`,fill:()=>e==="none"?"fill: none;":`fill: ${r?e:`var(--c-${e})`};`,"mix-blend":()=>`mix-blend-mode: ${e};`,perspective:()=>`perspective: ${r?e:{none:"none",sm:"500px",md:"1000px",lg:"1500px",xl:"2000px"}[e]||e};`,"perspective-origin":()=>`perspective-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"rotate-x":()=>`transform: rotateX(${r?e:`${e}deg`});`,"rotate-y":()=>`transform: rotateY(${r?e:`${e}deg`});`,"rotate-z":()=>`transform: rotateZ(${r?e:`${e}deg`});`,"transform-style":()=>`transform-style: ${e};`,backface:()=>`backface-visibility: ${{visible:"visible",hidden:"hidden"}[e]||e};`}[n];return
|
|
212
|
-
`;let e=
|
|
213
|
-
`}function
|
|
214
|
-
@media (min-width: ${t[
|
|
215
|
-
`;let h=new Set;for(let
|
|
216
|
-
`,h.add(
|
|
217
|
-
`}if(d.length>0){let
|
|
211
|
+
`},"divide-x:reverse":()=>"--ss-divide-x-reverse: 1;","divide-y:reverse":()=>"--ss-divide-y-reverse: 1;","divide-style":()=>`border-style: ${e};`,stroke:()=>`stroke: ${r?e:`var(--c-${e})`};`,"stroke-w":()=>`stroke-width: ${e};`,fill:()=>e==="none"?"fill: none;":`fill: ${r?e:`var(--c-${e})`};`,"mix-blend":()=>`mix-blend-mode: ${e};`,perspective:()=>`perspective: ${r?e:{none:"none",sm:"500px",md:"1000px",lg:"1500px",xl:"2000px"}[e]||e};`,"perspective-origin":()=>`perspective-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"rotate-x":()=>`transform: rotateX(${r?e:`${e}deg`});`,"rotate-y":()=>`transform: rotateY(${r?e:`${e}deg`});`,"rotate-z":()=>`transform: rotateZ(${r?e:`${e}deg`});`,"transform-style":()=>`transform-style: ${e};`,backface:()=>`backface-visibility: ${{visible:"visible",hidden:"hidden"}[e]||e};`}[n];return c?c():""}function E(s,n){if(n==="layout"&&F[s])return`[layout~="${s}"] { ${F[s]} }
|
|
212
|
+
`;let e=k(s,n),r="";switch(n){case"layout":r=M(e);break;case"space":r=j(e);break;case"visual":r=T(e);break}if(!r)return"";let l=s.startsWith("divide")&&!s.includes(":reverse"),d="";return l?d=`[visual~="${s}"] > :not([hidden]) ~ :not([hidden])`:d=`[${n}~="${s}"]`,e.state&&e.state!=="dark"&&(l?d=`[visual~="${s}"] > :not([hidden]) ~ :not([hidden]):${e.state}`:d+=`:${e.state}`),`${d} { ${r} }
|
|
213
|
+
`}function A(){let s={layout:new Set,space:new Set,visual:new Set};return document.querySelectorAll("[layout], [space], [visual]").forEach(e=>{["layout","space","visual"].forEach(r=>{let l=e.getAttribute(r);l&&l.split(/\s+/).forEach(d=>{d&&s[r].add(d)})})}),s}function V(s,n){let e=x(n);n.preflight!==!1&&(e+=$());let r=[];for(let[o,m]of Object.entries(s))for(let h of m)r.push({raw:h,attrType:o});let l=[],d=[],c={},{screens:t}=n.theme;for(let o of Object.keys(t))c[o]=[];for(let o of r){let m=k(o.raw,o.attrType);m.state==="dark"?d.push(m):m.breakpoint?(c[m.breakpoint]||(c[m.breakpoint]=[]),c[m.breakpoint].push(m)):l.push(m)}let a=["flex","grid","inline-flex","inline-grid","block","inline","hidden","contents"],i=new Map;for(let o of l)o.attrType&&a.includes(o.property)&&(i.has(o.attrType)||i.set(o.attrType,new Set),i.get(o.attrType).add(o.raw));for(let o of l)e+=E(o.raw,o.attrType);for(let[o,m]of Object.entries(c))if(m.length>0){e+=`
|
|
214
|
+
@media (min-width: ${t[o]}) {
|
|
215
|
+
`;let h=new Set;for(let g of m)if(g.attrType&&a.includes(g.property)&&i.has(g.attrType)){let B=i.get(g.attrType);if(B.size>0&&!B.has(g.raw)&&!h.has(g.raw)){let O=`[${g.attrType}~="${g.raw}"]`;e+=` ${O} { display: revert-layer; }
|
|
216
|
+
`,h.add(g.raw)}}for(let g of m)e+=" "+E(g.raw,g.attrType);e+=`}
|
|
217
|
+
`}if(d.length>0){let o=n.darkMode||"media";if(o==="media"){e+=`
|
|
218
218
|
@media (prefers-color-scheme: dark) {
|
|
219
|
-
`;for(let
|
|
220
|
-
`}else{let
|
|
219
|
+
`;for(let m of d)e+=" "+E(m.raw,m.attrType);e+=`}
|
|
220
|
+
`}else{let m=Array.isArray(o)?o[1]:".dark";e+=`
|
|
221
221
|
/* Dark Mode */
|
|
222
|
-
`;for(let h of d){let
|
|
222
|
+
`;for(let h of d){let g=E(h.raw,h.attrType);e+=g.replace(/^(\[[^\]]+\])/,`${m} $1`)}}}return e}function D(s){let n=document.getElementById("senangstart-jit");n||(n=document.createElement("style"),n.id="senangstart-jit",document.head.appendChild(n)),n.textContent=s}function C(){let s=f(),n=b(s),e=A(),r=V(e,n);D(r),new MutationObserver(()=>{let d=A(),c=V(d,n);D(c)}).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["layout","space","visual"]}),console.log("%c[SenangStart CSS]%c Just-in-Time runtime initialized \u2713","color: #2563EB; font-weight: bold;","color: #10B981;")}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",C):C()})();})();
|
package/dist/senangstart-tw.js
CHANGED
|
@@ -320,13 +320,20 @@
|
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
const marginMatch = baseClass.match(
|
|
323
|
-
/^-?m([trblxy])?-(\d+\.?\d*|px|auto|full|screen)$/
|
|
323
|
+
/^-?m([trblxy])?-(\[.+\]|\d+\.?\d*|px|auto|full|screen)$/
|
|
324
324
|
);
|
|
325
325
|
if (marginMatch) {
|
|
326
326
|
const isNeg = baseClass.startsWith("-");
|
|
327
327
|
const side = marginMatch[1] ? "-" + marginMatch[1] : "";
|
|
328
328
|
let val = getSpacing(marginMatch[2], exact);
|
|
329
|
-
if (isNeg)
|
|
329
|
+
if (isNeg) {
|
|
330
|
+
if (val.startsWith("[") && val.endsWith("]")) {
|
|
331
|
+
const inner = val.slice(1, -1);
|
|
332
|
+
val = `[-${inner}]`;
|
|
333
|
+
} else {
|
|
334
|
+
val = `-${val}`;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
330
337
|
return { cat: "space", val: prefix + "m" + side + ":" + val };
|
|
331
338
|
}
|
|
332
339
|
const gapMatch = baseClass.match(/^gap-([xy])?-?(.+)$/);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* SenangStart TW v0.2.0 | MIT */
|
|
2
|
-
(()=>{var $={0:"none",px:"thin",.5:"regular",1:"tiny",1.5:"tiny-2x",2:"small",2.5:"small-2x",3:"small-3x",3.5:"small-4x",4:"medium",5:"medium-2x",6:"medium-3x",7:"medium-4x",8:"large",9:"large-2x",10:"large-3x",11:"large-4x",12:"big",14:"big-2x",16:"big-3x",20:"big-4x",24:"giant",28:"giant-2x",32:"giant-3x",36:"giant-4x",40:"vast",44:"vast-2x",48:"vast-3x",52:"vast-4x",56:"vast-5x",60:"vast-6x",64:"vast-7x",72:"vast-8x",80:"vast-9x",96:"vast-10x",full:"[100%]",screen:"[100vw]",auto:"auto"},Q={none:"none",sm:"small","":"small",md:"small",lg:"medium",xl:"medium","2xl":"big","3xl":"big",full:"round"},Z={none:"none",sm:"small","":"small",md:"medium",lg:"big",xl:"giant","2xl":"giant",inner:"none"},_={xs:"mini",sm:"small",base:"base",lg:"large",xl:"big","2xl":"huge","3xl":"grand","4xl":"giant","5xl":"mount","6xl":"mega","7xl":"giga","8xl":"tera","9xl":"hero"},k={container:"container",flex:"flex","inline-flex":"inline-flex",grid:"grid","inline-grid":"inline-grid",block:"block","inline-block":"inline",hidden:"hidden","flex-row":"row","flex-col":"col","flex-row-reverse":"row-reverse","flex-col-reverse":"col-reverse","flex-wrap":"wrap","flex-nowrap":"nowrap","flex-wrap-reverse":"wrap-reverse","flex-grow":"grow","flex-grow-0":"grow-0",grow:"grow","grow-0":"grow-0","flex-shrink":"shrink","flex-shrink-0":"shrink-0",shrink:"shrink","shrink-0":"shrink-0","flex-1":"flex:1","flex-auto":"flex:auto","flex-initial":"flex:initial","flex-none":"flex:none","justify-start":"justify:start","justify-end":"justify:end","justify-center":"justify:center","justify-between":"justify:between","justify-around":"justify:around","justify-evenly":"justify:evenly","items-start":"items:start","items-end":"items:end","items-center":"items:center","items-baseline":"items:baseline","items-stretch":"items:stretch","self-auto":"self:auto","self-start":"self:start","self-end":"self:end","self-center":"self:center","self-stretch":"self:stretch",relative:"relative",absolute:"absolute",fixed:"fixed",sticky:"sticky",static:"static","overflow-auto":"overflow:auto","overflow-hidden":"overflow:hidden","overflow-visible":"overflow:visible","overflow-scroll":"overflow:scroll","object-contain":"object:contain","object-cover":"object:cover","object-fill":"object:fill","object-none":"object:none","object-scale-down":"object:scale-down"},M={italic:"italic","not-italic":"not-italic",antialiased:"antialiased",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize","normal-case":"normal-case",underline:"underline","line-through":"line-through","no-underline":"no-underline",truncate:"truncate","cursor-pointer":"cursor:pointer","cursor-default":"cursor:default","cursor-not-allowed":"cursor:not-allowed","select-none":"select:none","select-text":"select:text","select-all":"select:all"};function v(n,l){return n.startsWith("[")&&n.endsWith("]")?n:l?["full","screen","auto"].includes(n)?$[n]||`[${n}]`:`tw-${n}`:$[n]||`[${n}]`}var at={0:"none",1:"thin",2:"regular",3:"thick",4:"tiny",8:"small"};function x(n,l){return l?`tw-${n}`:at[n]||`[${n}px]`}function tt(n,l){let d=n.match(/^(sm:|md:|lg:|xl:|2xl:|hover:|focus:|focus-visible:|active:|disabled:|dark:)(.+)$/),e="",t=n;if(d){let a=d[1].slice(0,-1);["sm","md","lg","xl","2xl"].includes(a)?e=`tw-${a}:`:e=d[1],t=d[2]}if(k[t])return{cat:"layout",val:e+k[t]};if(M[t])return{cat:"visual",val:e+M[t]};let u=t.match(/^text-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(u)return{cat:"visual",val:e+"text:"+u[1]};if(["text-left","text-center","text-right","text-justify"].includes(t))return{cat:"visual",val:e+"text:"+t.replace("text-","")};let s=t.match(/^text-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/);if(s){let a=l?`tw-${s[1]}`:_[s[1]]||s[1];return{cat:"visual",val:e+"text-size:"+a}}let o=t.match(/^bg-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?|transparent|current|inherit)$/);if(o){let a=o[1];return a==="transparent"?{cat:"visual",val:e+"bg:[transparent]"}:a==="current"?{cat:"visual",val:e+"bg:[currentColor]"}:a==="inherit"?{cat:"visual",val:e+"bg:[inherit]"}:{cat:"visual",val:e+"bg:"+a}}let r=t.match(/^border-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(r)return{cat:"visual",val:e+"border:"+r[1]};let c=t.match(/^p([trblxy])?-(.+)$/);if(c){let a=c[1]?"-"+c[1]:"";return{cat:"space",val:e+"p"+a+":"+v(c[2],l)}}let m=t.match(/^-?m([trblxy])?-(\d+\.?\d*|px|auto|full|screen)$/);if(m){let a=t.startsWith("-"),i=m[1]?"-"+m[1]:"",f=v(m[2],l);return a&&(f="[-"+f+"]"),{cat:"space",val:e+"m"+i+":"+f}}let g=t.match(/^gap-([xy])?-?(.+)$/);if(g){let a=g[1]?"-"+g[1]:"";return{cat:"space",val:e+"g"+a+":"+v(g[2],l)}}let p=t.match(/^(min-w|max-w|w)-(.+)$/);if(p){let a=p[1],i=p[2],y={max:"[max-content]",min:"[min-content]",fit:"[fit-content]",prose:"[65ch]"}[i]||v(i,l);return{cat:"space",val:e+a+":"+y}}let w=t.match(/^(min-h|max-h|h)-(.+)$/);if(w){let a=w[1],i=w[2],y={screen:"[100vh]",svh:"[100svh]",lvh:"[100lvh]",dvh:"[100dvh]",max:"[max-content]",min:"[min-content]",fit:"[fit-content]"}[i]||v(i,l);return{cat:"space",val:e+a+":"+y}}let j=t.match(/^rounded(?:-(.+))?$/);if(j){let a=j[1]||"",i=l?a===""?"tw-DEFAULT":`tw-${a}`:Q[a]||"medium";return{cat:"visual",val:e+"rounded:"+i}}let z=t.match(/^shadow(?:-(.+))?$/);if(z){let a=z[1]||"",i=l?a===""?"tw-DEFAULT":`tw-${a}`:Z[a]||"medium";return{cat:"visual",val:e+"shadow:"+i}}let S=t.match(/^font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)$/);if(S)return{cat:"visual",val:e+"font:tw-"+S[1]};let h=t.match(/^border(?:-([trblxy]))?(?:-(\d+))?$/);if(h&&(h[2]||!h[1]&&t==="border")){let a=h[1]?"-"+h[1]+"-w":"-w",i=h[2]||"1";return{cat:"visual",val:e+"border"+a+":"+x(i,l)}}let b=t.match(/^(top|right|bottom|left|inset|inset-x|inset-y)-(\d+|px|auto|full|\[.+\])$/);if(b){let a=b[1],i=b[2];return i==="0"?i="none":i.startsWith("[")&&i.endsWith("]")||(i=v(i,l)),{cat:"layout",val:e+a+":"+i}}if(t==="outline-none")return{cat:"visual",val:e+"outline:none"};let W=t.match(/^order-(\d+|first|last|none)$/);if(W)return{cat:"layout",val:e+"order:"+W[1]};let C=t.match(/^grid-cols-(\d+|none)$/);if(C)return{cat:"layout",val:e+"grid-cols:"+C[1]};let V=t.match(/^col-span-(\d+|full)$/);if(V)return{cat:"layout",val:e+"col-span:"+V[1]};let T=t.match(/^grid-rows-(\d+|none)$/);if(T)return{cat:"layout",val:e+"grid-rows:"+T[1]};let H=t.match(/^row-span-(\d+|full)$/);if(H)return{cat:"layout",val:e+"row-span:"+H[1]};let L=t.match(/^opacity-(\d+)$/);if(L)return{cat:"visual",val:e+"opacity:"+L[1]};let q=t.match(/^bg-gradient-to-(t|tr|r|br|b|bl|l|tl)$/);if(q)return{cat:"visual",val:e+"bg-image:gradient-to-"+q[1]};let A=t.match(/^from-(.+)$/);if(A)return{cat:"visual",val:e+"from:"+A[1]};let D=t.match(/^via-(.+)$/);if(D)return{cat:"visual",val:e+"via:"+D[1]};let E=t.match(/^to-(.+)$/);if(E)return{cat:"visual",val:e+"to:"+E[1]};let F=t.match(/^transition(?:-(all|colors|opacity|shadow|transform|none))?$/);if(F){let a=F[1]||"all";return{cat:"visual",val:e+"transition:"+a}}let U=t.match(/^duration-(\d+)$/);if(U){let a=parseInt(U[1]),i;return a<=75?i="instant":a<=100?i="quick":a<=150?i="fast":a<=200?i="normal":a<=300?i="slow":a<=500?i="slower":i="lazy",{cat:"visual",val:e+"duration:"+i}}let X=t.match(/^ease-(linear|in|out|in-out)$/);if(X)return{cat:"visual",val:e+"ease:"+X[1]};let Y=t.match(/^ring(?:-(\d+))?$/);if(Y){let a=Y[1]||"3";if(a==="0")return{cat:"visual",val:e+"ring:none"};let f={1:"thin",2:"regular",3:"small",4:"medium",8:"big"}[a]||`[${a}px]`;return{cat:"visual",val:e+"ring:"+f}}let B=t.match(/^ring-offset-(\d+)$/);if(B)return{cat:"visual",val:e+"ring-offset:"+B[1]};let G=t.match(/^ring-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(G)return{cat:"visual",val:e+"ring-color:"+G[1]};let I=t.match(/^divide-x-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(I)return{cat:"visual",val:e+"divide-x:"+I[1]};let K=t.match(/^divide-y-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(K)return{cat:"visual",val:e+"divide-y:"+K[1]};let N=t.match(/^divide-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(N)return{cat:"visual",val:e+"divide:"+N[1]};let O=t.match(/^divide-(\d+)$/);if(O)return{cat:"visual",val:e+"divide-w:"+x(O[1],l)};if(t==="divide-x-reverse")return{cat:"visual",val:e+"divide-x:reverse"};if(t==="divide-y-reverse")return{cat:"visual",val:e+"divide-y:reverse"};let P=t.match(/^divide-x-(\d+)$/);if(P)return{cat:"visual",val:e+"divide-x-w:"+x(P[1],l)};if(t==="divide-x")return{cat:"visual",val:e+"divide-x-w:thin"};if(t==="divide-y")return{cat:"visual",val:e+"divide-y-w:thin"};let R=t.match(/^divide-y-(\d+)$/);if(R)return{cat:"visual",val:e+"divide-y-w:"+x(R[1],l)};let J=t.match(/^divide-(solid|dashed|dotted|double|none)$/);return J?{cat:"visual",val:e+"divide-style:"+J[1]}:null}function et(n,l){let d=n.trim().split(/\s+/).filter(o=>o),e=[],t=[],u=[],s=[];for(let o of d){let r=tt(o,l);r?r.cat==="layout"?e.push(r.val):r.cat==="space"?t.push(r.val):r.cat==="visual"&&u.push(r.val):s.push(o)}return{layout:e,space:t,visual:u,unknown:s}}function it(n,l){return n.replace(/class=(['"])([^"']+)\1/g,(d,e,t)=>{let{layout:u,space:s,visual:o,unknown:r}=et(t,l),c=[];return u.length&&c.push(`layout="${u.join(" ")}"`),s.length&&c.push(`space="${s.join(" ")}"`),o.length&&c.push(`visual="${o.join(" ")}"`),r.length&&c.push(`class="${r.join(" ")}"`),c.join(" ")||'class=""'})}typeof window<"u"&&(window.SenangStartTW={convertClass:tt,convertClasses:et,convertHTML:it,scales:{spacing:$,radius:Q,shadow:Z,fontSize:_},mappings:{layout:k,visual:M}});})();
|
|
2
|
+
(()=>{var $={0:"none",px:"thin",.5:"regular",1:"tiny",1.5:"tiny-2x",2:"small",2.5:"small-2x",3:"small-3x",3.5:"small-4x",4:"medium",5:"medium-2x",6:"medium-3x",7:"medium-4x",8:"large",9:"large-2x",10:"large-3x",11:"large-4x",12:"big",14:"big-2x",16:"big-3x",20:"big-4x",24:"giant",28:"giant-2x",32:"giant-3x",36:"giant-4x",40:"vast",44:"vast-2x",48:"vast-3x",52:"vast-4x",56:"vast-5x",60:"vast-6x",64:"vast-7x",72:"vast-8x",80:"vast-9x",96:"vast-10x",full:"[100%]",screen:"[100vw]",auto:"auto"},Q={none:"none",sm:"small","":"small",md:"small",lg:"medium",xl:"medium","2xl":"big","3xl":"big",full:"round"},Z={none:"none",sm:"small","":"small",md:"medium",lg:"big",xl:"giant","2xl":"giant",inner:"none"},_={xs:"mini",sm:"small",base:"base",lg:"large",xl:"big","2xl":"huge","3xl":"grand","4xl":"giant","5xl":"mount","6xl":"mega","7xl":"giga","8xl":"tera","9xl":"hero"},k={container:"container",flex:"flex","inline-flex":"inline-flex",grid:"grid","inline-grid":"inline-grid",block:"block","inline-block":"inline",hidden:"hidden","flex-row":"row","flex-col":"col","flex-row-reverse":"row-reverse","flex-col-reverse":"col-reverse","flex-wrap":"wrap","flex-nowrap":"nowrap","flex-wrap-reverse":"wrap-reverse","flex-grow":"grow","flex-grow-0":"grow-0",grow:"grow","grow-0":"grow-0","flex-shrink":"shrink","flex-shrink-0":"shrink-0",shrink:"shrink","shrink-0":"shrink-0","flex-1":"flex:1","flex-auto":"flex:auto","flex-initial":"flex:initial","flex-none":"flex:none","justify-start":"justify:start","justify-end":"justify:end","justify-center":"justify:center","justify-between":"justify:between","justify-around":"justify:around","justify-evenly":"justify:evenly","items-start":"items:start","items-end":"items:end","items-center":"items:center","items-baseline":"items:baseline","items-stretch":"items:stretch","self-auto":"self:auto","self-start":"self:start","self-end":"self:end","self-center":"self:center","self-stretch":"self:stretch",relative:"relative",absolute:"absolute",fixed:"fixed",sticky:"sticky",static:"static","overflow-auto":"overflow:auto","overflow-hidden":"overflow:hidden","overflow-visible":"overflow:visible","overflow-scroll":"overflow:scroll","object-contain":"object:contain","object-cover":"object:cover","object-fill":"object:fill","object-none":"object:none","object-scale-down":"object:scale-down"},M={italic:"italic","not-italic":"not-italic",antialiased:"antialiased",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize","normal-case":"normal-case",underline:"underline","line-through":"line-through","no-underline":"no-underline",truncate:"truncate","cursor-pointer":"cursor:pointer","cursor-default":"cursor:default","cursor-not-allowed":"cursor:not-allowed","select-none":"select:none","select-text":"select:text","select-all":"select:all"};function v(l,n){return l.startsWith("[")&&l.endsWith("]")?l:n?["full","screen","auto"].includes(l)?$[l]||`[${l}]`:`tw-${l}`:$[l]||`[${l}]`}var at={0:"none",1:"thin",2:"regular",3:"thick",4:"tiny",8:"small"};function p(l,n){return n?`tw-${l}`:at[l]||`[${l}px]`}function tt(l,n){let f=l.match(/^(sm:|md:|lg:|xl:|2xl:|hover:|focus:|focus-visible:|active:|disabled:|dark:)(.+)$/),e="",t=l;if(f){let a=f[1].slice(0,-1);["sm","md","lg","xl","2xl"].includes(a)?e=`tw-${a}:`:e=f[1],t=f[2]}if(k[t])return{cat:"layout",val:e+k[t]};if(M[t])return{cat:"visual",val:e+M[t]};let d=t.match(/^text-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(d)return{cat:"visual",val:e+"text:"+d[1]};if(["text-left","text-center","text-right","text-justify"].includes(t))return{cat:"visual",val:e+"text:"+t.replace("text-","")};let o=t.match(/^text-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/);if(o){let a=n?`tw-${o[1]}`:_[o[1]]||o[1];return{cat:"visual",val:e+"text-size:"+a}}let c=t.match(/^bg-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?|transparent|current|inherit)$/);if(c){let a=c[1];return a==="transparent"?{cat:"visual",val:e+"bg:[transparent]"}:a==="current"?{cat:"visual",val:e+"bg:[currentColor]"}:a==="inherit"?{cat:"visual",val:e+"bg:[inherit]"}:{cat:"visual",val:e+"bg:"+a}}let r=t.match(/^border-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(r)return{cat:"visual",val:e+"border:"+r[1]};let u=t.match(/^p([trblxy])?-(.+)$/);if(u){let a=u[1]?"-"+u[1]:"";return{cat:"space",val:e+"p"+a+":"+v(u[2],n)}}let m=t.match(/^-?m([trblxy])?-(\[.+\]|\d+\.?\d*|px|auto|full|screen)$/);if(m){let a=t.startsWith("-"),i=m[1]?"-"+m[1]:"",s=v(m[2],n);return a&&(s.startsWith("[")&&s.endsWith("]")?s=`[-${s.slice(1,-1)}]`:s=`-${s}`),{cat:"space",val:e+"m"+i+":"+s}}let g=t.match(/^gap-([xy])?-?(.+)$/);if(g){let a=g[1]?"-"+g[1]:"";return{cat:"space",val:e+"g"+a+":"+v(g[2],n)}}let w=t.match(/^(min-w|max-w|w)-(.+)$/);if(w){let a=w[1],i=w[2],x={max:"[max-content]",min:"[min-content]",fit:"[fit-content]",prose:"[65ch]"}[i]||v(i,n);return{cat:"space",val:e+a+":"+x}}let b=t.match(/^(min-h|max-h|h)-(.+)$/);if(b){let a=b[1],i=b[2],x={screen:"[100vh]",svh:"[100svh]",lvh:"[100lvh]",dvh:"[100dvh]",max:"[max-content]",min:"[min-content]",fit:"[fit-content]"}[i]||v(i,n);return{cat:"space",val:e+a+":"+x}}let j=t.match(/^rounded(?:-(.+))?$/);if(j){let a=j[1]||"",i=n?a===""?"tw-DEFAULT":`tw-${a}`:Q[a]||"medium";return{cat:"visual",val:e+"rounded:"+i}}let z=t.match(/^shadow(?:-(.+))?$/);if(z){let a=z[1]||"",i=n?a===""?"tw-DEFAULT":`tw-${a}`:Z[a]||"medium";return{cat:"visual",val:e+"shadow:"+i}}let W=t.match(/^font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)$/);if(W)return{cat:"visual",val:e+"font:tw-"+W[1]};let h=t.match(/^border(?:-([trblxy]))?(?:-(\d+))?$/);if(h&&(h[2]||!h[1]&&t==="border")){let a=h[1]?"-"+h[1]+"-w":"-w",i=h[2]||"1";return{cat:"visual",val:e+"border"+a+":"+p(i,n)}}let y=t.match(/^(top|right|bottom|left|inset|inset-x|inset-y)-(\d+|px|auto|full|\[.+\])$/);if(y){let a=y[1],i=y[2];return i==="0"?i="none":i.startsWith("[")&&i.endsWith("]")||(i=v(i,n)),{cat:"layout",val:e+a+":"+i}}if(t==="outline-none")return{cat:"visual",val:e+"outline:none"};let S=t.match(/^order-(\d+|first|last|none)$/);if(S)return{cat:"layout",val:e+"order:"+S[1]};let C=t.match(/^grid-cols-(\d+|none)$/);if(C)return{cat:"layout",val:e+"grid-cols:"+C[1]};let V=t.match(/^col-span-(\d+|full)$/);if(V)return{cat:"layout",val:e+"col-span:"+V[1]};let T=t.match(/^grid-rows-(\d+|none)$/);if(T)return{cat:"layout",val:e+"grid-rows:"+T[1]};let H=t.match(/^row-span-(\d+|full)$/);if(H)return{cat:"layout",val:e+"row-span:"+H[1]};let L=t.match(/^opacity-(\d+)$/);if(L)return{cat:"visual",val:e+"opacity:"+L[1]};let q=t.match(/^bg-gradient-to-(t|tr|r|br|b|bl|l|tl)$/);if(q)return{cat:"visual",val:e+"bg-image:gradient-to-"+q[1]};let A=t.match(/^from-(.+)$/);if(A)return{cat:"visual",val:e+"from:"+A[1]};let D=t.match(/^via-(.+)$/);if(D)return{cat:"visual",val:e+"via:"+D[1]};let E=t.match(/^to-(.+)$/);if(E)return{cat:"visual",val:e+"to:"+E[1]};let F=t.match(/^transition(?:-(all|colors|opacity|shadow|transform|none))?$/);if(F){let a=F[1]||"all";return{cat:"visual",val:e+"transition:"+a}}let U=t.match(/^duration-(\d+)$/);if(U){let a=parseInt(U[1]),i;return a<=75?i="instant":a<=100?i="quick":a<=150?i="fast":a<=200?i="normal":a<=300?i="slow":a<=500?i="slower":i="lazy",{cat:"visual",val:e+"duration:"+i}}let X=t.match(/^ease-(linear|in|out|in-out)$/);if(X)return{cat:"visual",val:e+"ease:"+X[1]};let Y=t.match(/^ring(?:-(\d+))?$/);if(Y){let a=Y[1]||"3";if(a==="0")return{cat:"visual",val:e+"ring:none"};let s={1:"thin",2:"regular",3:"small",4:"medium",8:"big"}[a]||`[${a}px]`;return{cat:"visual",val:e+"ring:"+s}}let B=t.match(/^ring-offset-(\d+)$/);if(B)return{cat:"visual",val:e+"ring-offset:"+B[1]};let G=t.match(/^ring-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(G)return{cat:"visual",val:e+"ring-color:"+G[1]};let I=t.match(/^divide-x-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(I)return{cat:"visual",val:e+"divide-x:"+I[1]};let K=t.match(/^divide-y-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(K)return{cat:"visual",val:e+"divide-y:"+K[1]};let N=t.match(/^divide-((?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)(?:-\d+)?)$/);if(N)return{cat:"visual",val:e+"divide:"+N[1]};let O=t.match(/^divide-(\d+)$/);if(O)return{cat:"visual",val:e+"divide-w:"+p(O[1],n)};if(t==="divide-x-reverse")return{cat:"visual",val:e+"divide-x:reverse"};if(t==="divide-y-reverse")return{cat:"visual",val:e+"divide-y:reverse"};let P=t.match(/^divide-x-(\d+)$/);if(P)return{cat:"visual",val:e+"divide-x-w:"+p(P[1],n)};if(t==="divide-x")return{cat:"visual",val:e+"divide-x-w:thin"};if(t==="divide-y")return{cat:"visual",val:e+"divide-y-w:thin"};let R=t.match(/^divide-y-(\d+)$/);if(R)return{cat:"visual",val:e+"divide-y-w:"+p(R[1],n)};let J=t.match(/^divide-(solid|dashed|dotted|double|none)$/);return J?{cat:"visual",val:e+"divide-style:"+J[1]}:null}function et(l,n){let f=l.trim().split(/\s+/).filter(c=>c),e=[],t=[],d=[],o=[];for(let c of f){let r=tt(c,n);r?r.cat==="layout"?e.push(r.val):r.cat==="space"?t.push(r.val):r.cat==="visual"&&d.push(r.val):o.push(c)}return{layout:e,space:t,visual:d,unknown:o}}function it(l,n){return l.replace(/class=(['"])([^"']+)\1/g,(f,e,t)=>{let{layout:d,space:o,visual:c,unknown:r}=et(t,n),u=[];return d.length&&u.push(`layout="${d.join(" ")}"`),o.length&&u.push(`space="${o.join(" ")}"`),c.length&&u.push(`visual="${c.join(" ")}"`),r.length&&u.push(`class="${r.join(" ")}"`),u.join(" ")||'class=""'})}typeof window<"u"&&(window.SenangStartTW={convertClass:tt,convertClasses:et,convertHTML:it,scales:{spacing:$,radius:Q,shadow:Z,fontSize:_},mappings:{layout:k,visual:M}});})();
|
|
@@ -123,6 +123,12 @@ Let's create a simple card:
|
|
|
123
123
|
- `space="w:[320px] p:medium"` — 320px width, medium padding
|
|
124
124
|
- `visual="bg:white rounded:big shadow:medium"` — White background, rounded corners, shadow
|
|
125
125
|
|
|
126
|
+
## For AI Assistants
|
|
127
|
+
|
|
128
|
+
If you are using AI coding assistants (like Cursor, Windsurf, or others), you can provide them with our specialized context file. This file contains the full list of available references and usage instructions in a format optimized for LLMs.
|
|
129
|
+
|
|
130
|
+
File location: [`https://bookklik-technologies.github.io/senangstart-css/llms.txt`](https://bookklik-technologies.github.io/senangstart-css/llms.txt)
|
|
131
|
+
|
|
126
132
|
## Next Steps
|
|
127
133
|
|
|
128
134
|
- [Tri-Attribute Syntax](/guide/tri-attribute) — Deep dive into layout, space, visual
|
|
@@ -123,6 +123,12 @@ Mari cipta kad ringkas:
|
|
|
123
123
|
- `space="w:[320px] p:medium"` — Lebar 320px, padding medium
|
|
124
124
|
- `visual="bg:white rounded:big shadow:medium"` — Latar putih, sudut bulat, bayang
|
|
125
125
|
|
|
126
|
+
## Untuk Pembantu AI
|
|
127
|
+
|
|
128
|
+
Jika anda menggunakan pembantu pengekodan AI (seperti Cursor, Windsurf, atau lain-lain), anda boleh membekalkan fail konteks khusus kami kepada mereka. Fail ini mengandungi senarai penuh rujukan yang tersedia dan arahan penggunaan dalam format yang disokong untuk LLMs.
|
|
129
|
+
|
|
130
|
+
Lokasi fail: [`https://bookklik-technologies.github.io/senangstart-css/llms.txt`](https://bookklik-technologies.github.io/senangstart-css/llms.txt)
|
|
131
|
+
|
|
126
132
|
## Langkah Seterusnya
|
|
127
133
|
|
|
128
134
|
- [Sintaksis Tri-Atribusi](/ms/guide/tri-attribute) — Selami layout, space, visual
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/* SenangStart CSS v0.2.0 | MIT */
|
|
2
|
-
(()=>{var F=["mob","tab","lap","desk","tw-sm","tw-md","tw-lg","tw-xl","tw-2xl"],w=["hover","focus","focus-visible","active","disabled","dark"],B=["flex","grid","block","inline","hidden","row","col","row-reverse","col-reverse","center","start","end","between","around","evenly","wrap","nowrap","absolute","relative","fixed","sticky"];function z(p){return typeof p!="string"?"":p.replace(/;/g,"_")}function P(p){return!(!p.property||typeof p.property!="string"||p.property.length>100||p.value!==null&&typeof p.value!="string"||p.value&&p.value.length>500||p.breakpoint&&!F.includes(p.breakpoint)||p.state&&!w.includes(p.state))}function S(p){let y={raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1},u=p.split(":"),m=0;if(F.includes(u[0])&&(y.breakpoint=u[0],m++),w.includes(u[m])&&(y.state=u[m],m++),m<u.length&&(y.property=u[m],m++),m<u.length){let f=u.slice(m).join(":"),x=f.match(/^\[(.+)\]$/);x?(y.value=x[1].replace(/_/g," "),y.isArbitrary=!0):y.value=f}return y}function M(p,y){if(typeof p!="string"||p.length===0||p.length>200)return{raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:y,error:"Invalid token format"};let u={raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:y};if(y==="layout"){if(p.startsWith("z:"))return u.property="z",u.value=p.substring(2),u;if(p.startsWith("overflow:"))return u.property="overflow",u.value=p.substring(9),u;if(B.includes(p))return u.property=p,u.value=p,u;let x=p.split(":");if(x.length===2&&F.includes(x[0]))return u.breakpoint=x[0],u.property=x[1],u.value=x[1],u}let m=p.split(":");if(m.length===1)return u.property=p,u.value=p,u;let f=0;if(F.includes(m[0])&&(u.breakpoint=m[0],f++),w.includes(m[f])&&(u.state=m[f],f++),f<m.length&&(u.property=m[f],f++),f<m.length){let x=m.slice(f).join(":"),v=x.match(/^\[(.+)\]$/);v?(u.value=z(v[1].replace(/_/g," ")),u.isArbitrary=!0):u.value=z(x)}return P(u)||(u.error="Invalid token structure"),u}(function(){"use strict";let p={theme:{spacing:{none:"0px",thin:"1px",regular:"2px",thick:"3px",tiny:"4px","tiny-2x":"6px",small:"8px","small-2x":"10px","small-3x":"12px","small-4x":"14px",medium:"16px","medium-2x":"20px","medium-3x":"24px","medium-4x":"28px",large:"32px","large-2x":"36px","large-3x":"40px","large-4x":"44px",big:"48px","big-2x":"56px","big-3x":"64px","big-4x":"80px",giant:"96px","giant-2x":"112px","giant-3x":"128px","giant-4x":"144px",vast:"160px","vast-2x":"176px","vast-3x":"192px","vast-4x":"208px","vast-5x":"224px","vast-6x":"240px","vast-7x":"256px","vast-8x":"288px","vast-9x":"320px","vast-10x":"384px"},radius:{none:"0px",small:"4px",medium:"8px",big:"16px",round:"9999px"},shadow:{none:"none",small:"0 1px 2px rgba(0,0,0,0.05)",medium:"0 4px 6px rgba(0,0,0,0.1)",big:"0 10px 15px rgba(0,0,0,0.15)",giant:"0 25px 50px rgba(0,0,0,0.25)"},fontSize:{mini:"0.75rem",small:"0.875rem",base:"1rem",large:"1.125rem",big:"1.25rem",huge:"1.5rem",grand:"1.875rem",giant:"2.25rem",mount:"3rem",mega:"3.75rem",giga:"4.5rem",tera:"6rem",hero:"8rem"},fontSizeLineHeight:{mini:"1rem",small:"1.25rem",base:"1.5rem",large:"1.75rem",big:"1.75rem",huge:"2rem",grand:"2.25rem",giant:"2.5rem",mount:"1",mega:"1",giga:"1",tera:"1",hero:"1"},fontWeight:{normal:"400",medium:"500",bold:"700"},screens:{mob:"480px",tab:"768px",lap:"1024px",desk:"1280px","tw-sm":"640px","tw-md":"768px","tw-lg":"1024px","tw-xl":"1280px","tw-2xl":"1536px"},colors:{white:"#FFFFFF",black:"#000000",grey:"#6B7280",dark:"#3E4A5D",light:"#DBEAFE",primary:"#2563EB",secondary:"#DBEAFE",success:"#10B981",warning:"#F59E0B",danger:"#EF4444","red-50":"#FEF2F2","red-100":"#FEE2E2","red-200":"#FECACA","red-300":"#FCA5A5","red-400":"#F87171","red-500":"#EF4444","red-600":"#DC2626","red-700":"#B91C1C","red-800":"#991B1B","red-900":"#7F1D1D","red-950":"#450A0A","orange-50":"#FFF7ED","orange-100":"#FFEDD5","orange-200":"#FED7AA","orange-300":"#FDBA74","orange-400":"#FB923C","orange-500":"#F97316","orange-600":"#EA580C","orange-700":"#C2410C","orange-800":"#9A3412","orange-900":"#7C2D12","orange-950":"#431407","amber-50":"#FFFBEB","amber-100":"#FEF3C7","amber-200":"#FDE68A","amber-300":"#FCD34D","amber-400":"#FBBF24","amber-500":"#F59E0B","amber-600":"#D97706","amber-700":"#B45309","amber-800":"#92400E","amber-900":"#78350F","amber-950":"#451A03","yellow-50":"#FEFCE8","yellow-100":"#FEF9C3","yellow-200":"#FEF08A","yellow-300":"#FDE047","yellow-400":"#FACC15","yellow-500":"#EAB308","yellow-600":"#CA8A04","yellow-700":"#A16207","yellow-800":"#854D0E","yellow-900":"#713F12","yellow-950":"#422006","lime-50":"#F7FEE7","lime-100":"#ECFCCB","lime-200":"#D9F99D","lime-300":"#BEF264","lime-400":"#A3E635","lime-500":"#84CC16","lime-600":"#65A30D","lime-700":"#4D7C0F","lime-800":"#3F6212","lime-900":"#365314","lime-950":"#1A2E05","green-50":"#F0FDF4","green-100":"#DCFCE7","green-200":"#BBF7D0","green-300":"#86EFAC","green-400":"#4ADE80","green-500":"#22C55E","green-600":"#16A34A","green-700":"#15803D","green-800":"#166534","green-900":"#14532D","green-950":"#052E16","emerald-50":"#ECFDF5","emerald-100":"#D1FAE5","emerald-200":"#A7F3D0","emerald-300":"#6EE7B7","emerald-400":"#34D399","emerald-500":"#10B981","emerald-600":"#059669","emerald-700":"#047857","emerald-800":"#065F46","emerald-900":"#064E3B","emerald-950":"#022C22","teal-50":"#F0FDFA","teal-100":"#CCFBF1","teal-200":"#99F6E4","teal-300":"#5EEAD4","teal-400":"#2DD4BF","teal-500":"#14B8A6","teal-600":"#0D9488","teal-700":"#0F766E","teal-800":"#115E59","teal-900":"#134E4A","teal-950":"#042F2E","cyan-50":"#ECFEFF","cyan-100":"#CFFAFE","cyan-200":"#A5F3FC","cyan-300":"#67E8F9","cyan-400":"#22D3EE","cyan-500":"#06B6D4","cyan-600":"#0891B2","cyan-700":"#0E7490","cyan-800":"#155E75","cyan-900":"#164E63","cyan-950":"#083344","sky-50":"#F0F9FF","sky-100":"#E0F2FE","sky-200":"#BAE6FD","sky-300":"#7DD3FC","sky-400":"#38BDF8","sky-500":"#0EA5E9","sky-600":"#0284C7","sky-700":"#0369A1","sky-800":"#075985","sky-900":"#0C4A6E","sky-950":"#082F49","blue-50":"#EFF6FF","blue-100":"#DBEAFE","blue-200":"#BFDBFE","blue-300":"#93C5FD","blue-400":"#60A5FA","blue-500":"#3B82F6","blue-600":"#2563EB","blue-700":"#1D4ED8","blue-800":"#1E40AF","blue-900":"#1E3A8A","blue-950":"#172554","indigo-50":"#EEF2FF","indigo-100":"#E0E7FF","indigo-200":"#C7D2FE","indigo-300":"#A5B4FC","indigo-400":"#818CF8","indigo-500":"#6366F1","indigo-600":"#4F46E5","indigo-700":"#4338CA","indigo-800":"#3730A3","indigo-900":"#312E81","indigo-950":"#1E1B4B","violet-50":"#F5F3FF","violet-100":"#EDE9FE","violet-200":"#DDD6FE","violet-300":"#C4B5FD","violet-400":"#A78BFA","violet-500":"#8B5CF6","violet-600":"#7C3AED","violet-700":"#6D28D9","violet-800":"#5B21B6","violet-900":"#4C1D95","violet-950":"#2E1065","purple-50":"#FAF5FF","purple-100":"#F3E8FF","purple-200":"#E9D5FF","purple-300":"#D8B4FE","purple-400":"#C084FC","purple-500":"#A855F7","purple-600":"#9333EA","purple-700":"#7E22CE","purple-800":"#6B21A8","purple-900":"#581C87","purple-950":"#3B0764","fuchsia-50":"#FDF4FF","fuchsia-100":"#FAE8FF","fuchsia-200":"#F5D0FE","fuchsia-300":"#F0ABFC","fuchsia-400":"#E879F9","fuchsia-500":"#D946EF","fuchsia-600":"#C026D3","fuchsia-700":"#A21CAF","fuchsia-800":"#86198F","fuchsia-900":"#701A75","fuchsia-950":"#4A044E","pink-50":"#FDF2F8","pink-100":"#FCE7F3","pink-200":"#FBCFE8","pink-300":"#F9A8D4","pink-400":"#F472B6","pink-500":"#EC4899","pink-600":"#DB2777","pink-700":"#BE185D","pink-800":"#9D174D","pink-900":"#831843","pink-950":"#500724","rose-50":"#FFF1F2","rose-100":"#FFE4E6","rose-200":"#FECDD3","rose-300":"#FDA4AF","rose-400":"#FB7185","rose-500":"#F43F5E","rose-600":"#E11D48","rose-700":"#BE123C","rose-800":"#9F1239","rose-900":"#881337","rose-950":"#4C0519","slate-50":"#F8FAFC","slate-100":"#F1F5F9","slate-200":"#E2E8F0","slate-300":"#CBD5E1","slate-400":"#94A3B8","slate-500":"#64748B","slate-600":"#475569","slate-700":"#334155","slate-800":"#1E293B","slate-900":"#0F172A","slate-950":"#020617","gray-50":"#F9FAFB","gray-100":"#F3F4F6","gray-200":"#E5E7EB","gray-300":"#D1D5DB","gray-400":"#9CA3AF","gray-500":"#6B7280","gray-600":"#4B5563","gray-700":"#374151","gray-800":"#1F2937","gray-900":"#111827","gray-950":"#030712","zinc-50":"#FAFAFA","zinc-100":"#F4F4F5","zinc-200":"#E4E4E7","zinc-300":"#D4D4D8","zinc-400":"#A1A1AA","zinc-500":"#71717A","zinc-600":"#52525B","zinc-700":"#3F3F46","zinc-800":"#27272A","zinc-900":"#18181B","zinc-950":"#09090B","neutral-50":"#FAFAFA","neutral-100":"#F5F5F5","neutral-200":"#E5E5E5","neutral-300":"#D4D4D4","neutral-400":"#A3A3A3","neutral-500":"#737373","neutral-600":"#525252","neutral-700":"#404040","neutral-800":"#262626","neutral-900":"#171717","neutral-950":"#0A0A0A","stone-50":"#FAFAF9","stone-100":"#F5F5F4","stone-200":"#E7E5E4","stone-300":"#D6D3D1","stone-400":"#A8A29E","stone-500":"#78716C","stone-600":"#57534E","stone-700":"#44403C","stone-800":"#292524","stone-900":"#1C1917","stone-950":"#0C0A09"},zIndex:{base:"0",low:"10",mid:"50",high:"100",top:"9999"},ring:{none:"0px",thin:"1px",regular:"2px",thick:"3px",small:"4px",medium:"6px",big:"8px"}},darkMode:"media",preflight:!0},y={theme:{type:"object",properties:{spacing:{type:"object"},radius:{type:"object"},shadow:{type:"object"},fontSize:{type:"object"},fontWeight:{type:"object"},screens:{type:"object"},colors:{type:"object"},zIndex:{type:"object"},ring:{type:"object"}}},darkMode:{type:"string",enum:["media","selector"]},preflight:{type:"boolean"}};function u(s){return!(!s||typeof s!="object"||Array.isArray(s)||s.theme&&(typeof s.theme!="object"||Array.isArray(s.theme))||s.darkMode!==void 0&&s.darkMode!=="media"&&s.darkMode!=="selector"&&!Array.isArray(s.darkMode)||s.preflight!==void 0&&typeof s.preflight!="boolean")}function m(){let s=document.querySelector('script[type="senangstart/config"]');if(!s)return{};try{let n=JSON.parse(s.textContent);return u(n)?n:(console.error("[SenangStart] Invalid config structure"),{})}catch(n){return console.error("[SenangStart] Invalid config JSON:",n),{}}}function f(s){if(!u(s))return console.error("[SenangStart] Invalid user config, using defaults"),JSON.parse(JSON.stringify(p));let n=JSON.parse(JSON.stringify(p));if(s.theme)for(let e of Object.keys(n.theme))s.theme[e]&&(n.theme[e]={...n.theme[e],...s.theme[e]});return s.darkMode!==void 0&&(n.darkMode=s.darkMode),s.preflight!==void 0&&(n.preflight=s.preflight),n}function x(s){let{theme:n}=s,e=`:root {
|
|
3
|
-
`;for(let[
|
|
4
|
-
`;for(let[
|
|
5
|
-
`;for(let[
|
|
6
|
-
`;for(let[
|
|
7
|
-
`;if(n.fontSizeLineHeight)for(let[
|
|
8
|
-
`;for(let[
|
|
9
|
-
`;for(let[
|
|
10
|
-
`;for(let[
|
|
11
|
-
`;if(n.ring)for(let[
|
|
2
|
+
(()=>{var y=["mob","tab","lap","desk","tw-sm","tw-md","tw-lg","tw-xl","tw-2xl"],w=["hover","focus","focus-visible","active","disabled","dark"],z=["flex","grid","block","inline","hidden","row","col","row-reverse","col-reverse","center","start","end","between","around","evenly","wrap","nowrap","absolute","relative","fixed","sticky"];function S(p){return typeof p!="string"?"":p.replace(/;/g,"_")}function _(p){return!(!p.property||typeof p.property!="string"||p.property.length>100||p.value!==null&&typeof p.value!="string"||p.value&&p.value.length>500||p.breakpoint&&!y.includes(p.breakpoint)||p.state&&!w.includes(p.state))}function k(p,v){if(typeof p!="string"||p.length===0||p.length>200)return{raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:v,error:"Invalid token format"};let u={raw:p,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:v};if(v==="layout"){if(p.startsWith("z:"))return u.property="z",u.value=p.substring(2),u;if(p.startsWith("overflow:"))return u.property="overflow",u.value=p.substring(9),u;if(z.includes(p))return u.property=p,u.value=p,u;let x=p.split(":");if(x.length===2&&y.includes(x[0]))return u.breakpoint=x[0],u.property=x[1],u.value=x[1],u}let f=p.split(":");if(f.length===1)return u.property=p,u.value=p,u;let b=0;if(y.includes(f[0])&&(u.breakpoint=f[0],b++),w.includes(f[b])&&(u.state=f[b],b++),b<f.length&&(u.property=f[b],b++),b<f.length){let x=f.slice(b).join(":"),$=x.match(/^\[(.+)\]$/);$?(u.value=S($[1].replace(/_/g," ")),u.isArbitrary=!0):u.value=S(x)}return _(u)||(u.error="Invalid token structure"),u}(function(){"use strict";let p={theme:{spacing:{none:"0px",thin:"1px",regular:"2px",thick:"3px",tiny:"4px","tiny-2x":"6px",small:"8px","small-2x":"10px","small-3x":"12px","small-4x":"14px",medium:"16px","medium-2x":"20px","medium-3x":"24px","medium-4x":"28px",large:"32px","large-2x":"36px","large-3x":"40px","large-4x":"44px",big:"48px","big-2x":"56px","big-3x":"64px","big-4x":"80px",giant:"96px","giant-2x":"112px","giant-3x":"128px","giant-4x":"144px",vast:"160px","vast-2x":"176px","vast-3x":"192px","vast-4x":"208px","vast-5x":"224px","vast-6x":"240px","vast-7x":"256px","vast-8x":"288px","vast-9x":"320px","vast-10x":"384px"},radius:{none:"0px",small:"4px",medium:"8px",big:"16px",round:"9999px"},shadow:{none:"none",small:"0 1px 2px rgba(0,0,0,0.05)",medium:"0 4px 6px rgba(0,0,0,0.1)",big:"0 10px 15px rgba(0,0,0,0.15)",giant:"0 25px 50px rgba(0,0,0,0.25)"},fontSize:{mini:"0.75rem",small:"0.875rem",base:"1rem",large:"1.125rem",big:"1.25rem",huge:"1.5rem",grand:"1.875rem",giant:"2.25rem",mount:"3rem",mega:"3.75rem",giga:"4.5rem",tera:"6rem",hero:"8rem"},fontSizeLineHeight:{mini:"1rem",small:"1.25rem",base:"1.5rem",large:"1.75rem",big:"1.75rem",huge:"2rem",grand:"2.25rem",giant:"2.5rem",mount:"1",mega:"1",giga:"1",tera:"1",hero:"1"},fontWeight:{normal:"400",medium:"500",bold:"700"},screens:{mob:"480px",tab:"768px",lap:"1024px",desk:"1280px","tw-sm":"640px","tw-md":"768px","tw-lg":"1024px","tw-xl":"1280px","tw-2xl":"1536px"},colors:{white:"#FFFFFF",black:"#000000",grey:"#6B7280",dark:"#3E4A5D",light:"#DBEAFE",primary:"#2563EB",secondary:"#DBEAFE",success:"#10B981",warning:"#F59E0B",danger:"#EF4444","red-50":"#FEF2F2","red-100":"#FEE2E2","red-200":"#FECACA","red-300":"#FCA5A5","red-400":"#F87171","red-500":"#EF4444","red-600":"#DC2626","red-700":"#B91C1C","red-800":"#991B1B","red-900":"#7F1D1D","red-950":"#450A0A","orange-50":"#FFF7ED","orange-100":"#FFEDD5","orange-200":"#FED7AA","orange-300":"#FDBA74","orange-400":"#FB923C","orange-500":"#F97316","orange-600":"#EA580C","orange-700":"#C2410C","orange-800":"#9A3412","orange-900":"#7C2D12","orange-950":"#431407","amber-50":"#FFFBEB","amber-100":"#FEF3C7","amber-200":"#FDE68A","amber-300":"#FCD34D","amber-400":"#FBBF24","amber-500":"#F59E0B","amber-600":"#D97706","amber-700":"#B45309","amber-800":"#92400E","amber-900":"#78350F","amber-950":"#451A03","yellow-50":"#FEFCE8","yellow-100":"#FEF9C3","yellow-200":"#FEF08A","yellow-300":"#FDE047","yellow-400":"#FACC15","yellow-500":"#EAB308","yellow-600":"#CA8A04","yellow-700":"#A16207","yellow-800":"#854D0E","yellow-900":"#713F12","yellow-950":"#422006","lime-50":"#F7FEE7","lime-100":"#ECFCCB","lime-200":"#D9F99D","lime-300":"#BEF264","lime-400":"#A3E635","lime-500":"#84CC16","lime-600":"#65A30D","lime-700":"#4D7C0F","lime-800":"#3F6212","lime-900":"#365314","lime-950":"#1A2E05","green-50":"#F0FDF4","green-100":"#DCFCE7","green-200":"#BBF7D0","green-300":"#86EFAC","green-400":"#4ADE80","green-500":"#22C55E","green-600":"#16A34A","green-700":"#15803D","green-800":"#166534","green-900":"#14532D","green-950":"#052E16","emerald-50":"#ECFDF5","emerald-100":"#D1FAE5","emerald-200":"#A7F3D0","emerald-300":"#6EE7B7","emerald-400":"#34D399","emerald-500":"#10B981","emerald-600":"#059669","emerald-700":"#047857","emerald-800":"#065F46","emerald-900":"#064E3B","emerald-950":"#022C22","teal-50":"#F0FDFA","teal-100":"#CCFBF1","teal-200":"#99F6E4","teal-300":"#5EEAD4","teal-400":"#2DD4BF","teal-500":"#14B8A6","teal-600":"#0D9488","teal-700":"#0F766E","teal-800":"#115E59","teal-900":"#134E4A","teal-950":"#042F2E","cyan-50":"#ECFEFF","cyan-100":"#CFFAFE","cyan-200":"#A5F3FC","cyan-300":"#67E8F9","cyan-400":"#22D3EE","cyan-500":"#06B6D4","cyan-600":"#0891B2","cyan-700":"#0E7490","cyan-800":"#155E75","cyan-900":"#164E63","cyan-950":"#083344","sky-50":"#F0F9FF","sky-100":"#E0F2FE","sky-200":"#BAE6FD","sky-300":"#7DD3FC","sky-400":"#38BDF8","sky-500":"#0EA5E9","sky-600":"#0284C7","sky-700":"#0369A1","sky-800":"#075985","sky-900":"#0C4A6E","sky-950":"#082F49","blue-50":"#EFF6FF","blue-100":"#DBEAFE","blue-200":"#BFDBFE","blue-300":"#93C5FD","blue-400":"#60A5FA","blue-500":"#3B82F6","blue-600":"#2563EB","blue-700":"#1D4ED8","blue-800":"#1E40AF","blue-900":"#1E3A8A","blue-950":"#172554","indigo-50":"#EEF2FF","indigo-100":"#E0E7FF","indigo-200":"#C7D2FE","indigo-300":"#A5B4FC","indigo-400":"#818CF8","indigo-500":"#6366F1","indigo-600":"#4F46E5","indigo-700":"#4338CA","indigo-800":"#3730A3","indigo-900":"#312E81","indigo-950":"#1E1B4B","violet-50":"#F5F3FF","violet-100":"#EDE9FE","violet-200":"#DDD6FE","violet-300":"#C4B5FD","violet-400":"#A78BFA","violet-500":"#8B5CF6","violet-600":"#7C3AED","violet-700":"#6D28D9","violet-800":"#5B21B6","violet-900":"#4C1D95","violet-950":"#2E1065","purple-50":"#FAF5FF","purple-100":"#F3E8FF","purple-200":"#E9D5FF","purple-300":"#D8B4FE","purple-400":"#C084FC","purple-500":"#A855F7","purple-600":"#9333EA","purple-700":"#7E22CE","purple-800":"#6B21A8","purple-900":"#581C87","purple-950":"#3B0764","fuchsia-50":"#FDF4FF","fuchsia-100":"#FAE8FF","fuchsia-200":"#F5D0FE","fuchsia-300":"#F0ABFC","fuchsia-400":"#E879F9","fuchsia-500":"#D946EF","fuchsia-600":"#C026D3","fuchsia-700":"#A21CAF","fuchsia-800":"#86198F","fuchsia-900":"#701A75","fuchsia-950":"#4A044E","pink-50":"#FDF2F8","pink-100":"#FCE7F3","pink-200":"#FBCFE8","pink-300":"#F9A8D4","pink-400":"#F472B6","pink-500":"#EC4899","pink-600":"#DB2777","pink-700":"#BE185D","pink-800":"#9D174D","pink-900":"#831843","pink-950":"#500724","rose-50":"#FFF1F2","rose-100":"#FFE4E6","rose-200":"#FECDD3","rose-300":"#FDA4AF","rose-400":"#FB7185","rose-500":"#F43F5E","rose-600":"#E11D48","rose-700":"#BE123C","rose-800":"#9F1239","rose-900":"#881337","rose-950":"#4C0519","slate-50":"#F8FAFC","slate-100":"#F1F5F9","slate-200":"#E2E8F0","slate-300":"#CBD5E1","slate-400":"#94A3B8","slate-500":"#64748B","slate-600":"#475569","slate-700":"#334155","slate-800":"#1E293B","slate-900":"#0F172A","slate-950":"#020617","gray-50":"#F9FAFB","gray-100":"#F3F4F6","gray-200":"#E5E7EB","gray-300":"#D1D5DB","gray-400":"#9CA3AF","gray-500":"#6B7280","gray-600":"#4B5563","gray-700":"#374151","gray-800":"#1F2937","gray-900":"#111827","gray-950":"#030712","zinc-50":"#FAFAFA","zinc-100":"#F4F4F5","zinc-200":"#E4E4E7","zinc-300":"#D4D4D8","zinc-400":"#A1A1AA","zinc-500":"#71717A","zinc-600":"#52525B","zinc-700":"#3F3F46","zinc-800":"#27272A","zinc-900":"#18181B","zinc-950":"#09090B","neutral-50":"#FAFAFA","neutral-100":"#F5F5F5","neutral-200":"#E5E5E5","neutral-300":"#D4D4D4","neutral-400":"#A3A3A3","neutral-500":"#737373","neutral-600":"#525252","neutral-700":"#404040","neutral-800":"#262626","neutral-900":"#171717","neutral-950":"#0A0A0A","stone-50":"#FAFAF9","stone-100":"#F5F5F4","stone-200":"#E7E5E4","stone-300":"#D6D3D1","stone-400":"#A8A29E","stone-500":"#78716C","stone-600":"#57534E","stone-700":"#44403C","stone-800":"#292524","stone-900":"#1C1917","stone-950":"#0C0A09"},zIndex:{base:"0",low:"10",mid:"50",high:"100",top:"9999"},ring:{none:"0px",thin:"1px",regular:"2px",thick:"3px",small:"4px",medium:"6px",big:"8px"}},darkMode:"media",preflight:!0},v={theme:{type:"object",properties:{spacing:{type:"object"},radius:{type:"object"},shadow:{type:"object"},fontSize:{type:"object"},fontWeight:{type:"object"},screens:{type:"object"},colors:{type:"object"},zIndex:{type:"object"},ring:{type:"object"}}},darkMode:{type:"string",enum:["media","selector"]},preflight:{type:"boolean"}};function u(s){return!(!s||typeof s!="object"||Array.isArray(s)||s.theme&&(typeof s.theme!="object"||Array.isArray(s.theme))||s.darkMode!==void 0&&s.darkMode!=="media"&&s.darkMode!=="selector"&&!Array.isArray(s.darkMode)||s.preflight!==void 0&&typeof s.preflight!="boolean")}function f(){let s=document.querySelector('script[type="senangstart/config"]');if(!s)return{};try{let n=JSON.parse(s.textContent);return u(n)?n:(console.error("[SenangStart] Invalid config structure"),{})}catch(n){return console.error("[SenangStart] Invalid config JSON:",n),{}}}function b(s){if(!u(s))return console.error("[SenangStart] Invalid user config, using defaults"),JSON.parse(JSON.stringify(p));let n=JSON.parse(JSON.stringify(p));if(s.theme)for(let e of Object.keys(n.theme))s.theme[e]&&(n.theme[e]={...n.theme[e],...s.theme[e]});return s.darkMode!==void 0&&(n.darkMode=s.darkMode),s.preflight!==void 0&&(n.preflight=s.preflight),n}function x(s){let{theme:n}=s,e=`:root {
|
|
3
|
+
`;for(let[i,o]of Object.entries(n.spacing))e+=` --s-${i}: ${o};
|
|
4
|
+
`;for(let[i,o]of Object.entries(n.radius))e+=` --r-${i}: ${o};
|
|
5
|
+
`;for(let[i,o]of Object.entries(n.shadow))e+=` --shadow-${i}: ${o};
|
|
6
|
+
`;for(let[i,o]of Object.entries(n.fontSize))e+=` --font-${i}: ${o};
|
|
7
|
+
`;if(n.fontSizeLineHeight)for(let[i,o]of Object.entries(n.fontSizeLineHeight))e+=` --font-lh-${i}: ${o};
|
|
8
|
+
`;for(let[i,o]of Object.entries(n.fontWeight))e+=` --fw-${i}: ${o};
|
|
9
|
+
`;for(let[i,o]of Object.entries(n.colors))e+=` --c-${i}: ${o};
|
|
10
|
+
`;for(let[i,o]of Object.entries(n.zIndex))e+=` --z-${i}: ${o};
|
|
11
|
+
`;if(n.ring)for(let[i,o]of Object.entries(n.ring))e+=` --ring-${i}: ${o};
|
|
12
12
|
`;e+=` --ring-color: var(--c-primary);
|
|
13
13
|
`,e+=` --ring-offset: 0px;
|
|
14
14
|
`,e+=` --ring-offset-color: #fff;
|
|
15
|
-
`;let r={0:"0px",px:"1px","0.5":"0.125rem",1:"0.25rem","1.5":"0.375rem",2:"0.5rem","2.5":"0.625rem",3:"0.75rem","3.5":"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"};for(let[
|
|
16
|
-
`;let
|
|
17
|
-
`;let d={sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"0 0 #0000"};for(let[
|
|
18
|
-
`;let
|
|
19
|
-
`;let t={xs:"1rem",sm:"1.25rem",base:"1.5rem",lg:"1.75rem",xl:"1.75rem","2xl":"2rem","3xl":"2.25rem","4xl":"2.5rem","5xl":"1","6xl":"1","7xl":"1","8xl":"1","9xl":"1"};for(let[
|
|
20
|
-
`;let
|
|
15
|
+
`;let r={0:"0px",px:"1px","0.5":"0.125rem",1:"0.25rem","1.5":"0.375rem",2:"0.5rem","2.5":"0.625rem",3:"0.75rem","3.5":"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"};for(let[i,o]of Object.entries(r))e+=` --tw-${i}: ${o};
|
|
16
|
+
`;let l={none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"};for(let[i,o]of Object.entries(l))e+=` --tw-rounded-${i}: ${o};
|
|
17
|
+
`;let d={sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"0 0 #0000"};for(let[i,o]of Object.entries(d))e+=` --tw-shadow-${i}: ${o};
|
|
18
|
+
`;let c={xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"};for(let[i,o]of Object.entries(c))e+=` --tw-text-${i}: ${o};
|
|
19
|
+
`;let t={xs:"1rem",sm:"1.25rem",base:"1.5rem",lg:"1.75rem",xl:"1.75rem","2xl":"2rem","3xl":"2.25rem","4xl":"2.5rem","5xl":"1","6xl":"1","7xl":"1","8xl":"1","9xl":"1"};for(let[i,o]of Object.entries(t))e+=` --tw-leading-${i}: ${o};
|
|
20
|
+
`;let a={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"};for(let[i,o]of Object.entries(a))e+=` --tw-font-${i}: ${o};
|
|
21
21
|
`;return e+=`}
|
|
22
22
|
|
|
23
|
-
`,e}function
|
|
23
|
+
`,e}function $(){return`/* SenangStart Preflight - Opinionated Base Styles */
|
|
24
24
|
*,
|
|
25
25
|
::before,
|
|
26
26
|
::after {
|
|
@@ -198,7 +198,7 @@ img, video {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
`}let E={flex:"display: flex;",grid:"display: grid;","inline-flex":"display: inline-flex;","inline-grid":"display: inline-grid;",block:"display: block;",inline:"display: inline-block;",hidden:"display: none;",row:"flex-direction: row;",col:"flex-direction: column;","row-reverse":"flex-direction: row-reverse;","col-reverse":"flex-direction: column-reverse;",wrap:"flex-wrap: wrap;",nowrap:"flex-wrap: nowrap;","wrap-reverse":"flex-wrap: wrap-reverse;",grow:"flex-grow: 1;","grow-0":"flex-grow: 0;",shrink:"flex-shrink: 1;","shrink-0":"flex-shrink: 0;","grid-flow-row":"grid-auto-flow: row;","grid-flow-col":"grid-auto-flow: column;","grid-flow-dense":"grid-auto-flow: dense;","grid-flow-row-dense":"grid-auto-flow: row dense;","grid-flow-col-dense":"grid-auto-flow: column dense;",center:"justify-content: center; align-items: center;",start:"justify-content: flex-start; align-items: flex-start;",end:"justify-content: flex-end; align-items: flex-end;",between:"justify-content: space-between;",around:"justify-content: space-around;",evenly:"justify-content: space-evenly;",absolute:"position: absolute;",relative:"position: relative;",fixed:"position: fixed;",sticky:"position: sticky;",static:"position: static;",visible:"visibility: visible;",invisible:"visibility: hidden;",isolate:"isolation: isolate;","isolate-auto":"isolation: auto;","box-border":"box-sizing: border-box;","box-content":"box-sizing: content-box;","float-left":"float: left;","float-right":"float: right;","float-none":"float: none;","clear-left":"clear: left;","clear-right":"clear: right;","clear-both":"clear: both;","clear-none":"clear: none;",container:"width: 100%; margin-left: auto; margin-right: auto;","border-collapse":"border-collapse: collapse;","border-separate":"border-collapse: separate;"},W=F,I=w;function j(s){let{property:n,value:e,isArbitrary:r}=s;if(n==="container")return"width: 100%; margin-left: auto; margin-right: auto;";if(n==="justify")return`justify-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="justify-items")return`justify-items: ${e};`;if(n==="justify-self")return`justify-self: ${e};`;if(n==="content")return`align-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="items")return`align-items: ${{start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="self")return`align-self: ${{auto:"auto",start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="place-content")return`place-content: ${{start:"start",end:"end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="place-items")return`place-items: ${e};`;if(n==="place-self")return`place-self: ${e};`;if(n==="z")return`z-index: var(--z-${e});`;if(n==="overflow")return`overflow: ${e};`;if(n==="overflow-x")return`overflow-x: ${e};`;if(n==="overflow-y")return`overflow-y: ${e};`;if(n==="aspect")return`aspect-ratio: ${r?e.replace(/_/g," "):{square:"1 / 1",video:"16 / 9",auto:"auto"}[e]||e};`;if(n==="object")return`object-fit: ${e};`;if(n==="object-pos")return`object-position: ${r?e.replace(/_/g," "):e};`;if(n==="inset")return`inset: ${r?e:e==="0"?"0":`var(--s-${e})`};`;if(["top","right","bottom","left"].includes(n)){let i=r?e:e==="0"?"0":`var(--s-${e})`;return`${n}: ${i};`}if(n==="inset-x"){let i=r?e:e==="0"?"0":`var(--s-${e})`;return`left: ${i}; right: ${i};`}if(n==="inset-y"){let i=r?e:e==="0"?"0":`var(--s-${e})`;return`top: ${i}; bottom: ${i};`}return n==="cols"?`columns: ${e};`:n==="overscroll"?`overscroll-behavior: ${e};`:n==="overscroll-x"?`overscroll-behavior-x: ${e};`:n==="overscroll-y"?`overscroll-behavior-y: ${e};`:n==="basis"?`flex-basis: ${r?e:`var(--s-${e})`};`:n==="flex"?`flex: ${r?e.replace(/_/g," "):{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"}[e]||e};`:n==="order"?`order: ${{first:"-9999",last:"9999",none:"0"}[e]||e};`:n==="grid-cols"?e==="none"?"grid-template-columns: none;":e==="subgrid"?"grid-template-columns: subgrid;":r?`grid-template-columns: ${e.replace(/_/g," ")};`:`grid-template-columns: repeat(${e}, minmax(0, 1fr));`:n==="grid-rows"?e==="none"?"grid-template-rows: none;":e==="subgrid"?"grid-template-rows: subgrid;":r?`grid-template-rows: ${e.replace(/_/g," ")};`:`grid-template-rows: repeat(${e}, minmax(0, 1fr));`:n==="col-span"?e==="full"?"grid-column: 1 / -1;":`grid-column: span ${e} / span ${e};`:n==="col-start"?`grid-column-start: ${e};`:n==="col-end"?`grid-column-end: ${e};`:n==="row-span"?e==="full"?"grid-row: 1 / -1;":`grid-row: span ${e} / span ${e};`:n==="row-start"?`grid-row-start: ${e};`:n==="row-end"?`grid-row-end: ${e};`:n==="auto-cols"?`grid-auto-columns: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="auto-rows"?`grid-auto-rows: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="table"?`table-layout: ${{auto:"auto",fixed:"fixed"}[e]||e};`:n==="caption"?`caption-side: ${e};`:n==="border-spacing"?`border-spacing: ${r?e:`var(--s-${e})`};`:n==="border-spacing-x"?`border-spacing: ${r?e:`var(--s-${e})`} 0;`:n==="border-spacing-y"?`border-spacing: 0 ${r?e:`var(--s-${e})`};`:E[n]||""}function T(s){let{property:n,value:e,isArbitrary:r}=s;if(e==="auto")return{m:"margin: auto;","m-x":"margin-left: auto; margin-right: auto;","m-y":"margin-top: auto; margin-bottom: auto;","m-t":"margin-top: auto;","m-r":"margin-right: auto;","m-b":"margin-bottom: auto;","m-l":"margin-left: auto;"}[n]||"";let i={min:"min-content",max:"max-content",fit:"fit-content"};if(["w","h","min-w","max-w","min-h","max-h"].includes(n)&&i[e]){let o=i[e];return{w:`width: ${o};`,h:`height: ${o};`,"min-w":`min-width: ${o};`,"max-w":`max-width: ${o};`,"min-h":`min-height: ${o};`,"max-h":`max-height: ${o};`}[n]||""}let l;return r?l=e:e.startsWith("tw-")?l=`var(--tw-${e.slice(3)})`:l=`var(--s-${e})`,{p:`padding: ${l};`,"p-t":`padding-top: ${l};`,"p-r":`padding-right: ${l};`,"p-b":`padding-bottom: ${l};`,"p-l":`padding-left: ${l};`,"p-x":`padding-left: ${l}; padding-right: ${l};`,"p-y":`padding-top: ${l}; padding-bottom: ${l};`,m:`margin: ${l};`,"m-t":`margin-top: ${l};`,"m-r":`margin-right: ${l};`,"m-b":`margin-bottom: ${l};`,"m-l":`margin-left: ${l};`,"m-x":`margin-left: ${l}; margin-right: ${l};`,"m-y":`margin-top: ${l}; margin-bottom: ${l};`,g:`gap: ${l};`,"g-x":`column-gap: ${l};`,"g-y":`row-gap: ${l};`,w:`width: ${l};`,h:`height: ${l};`,"min-w":`min-width: ${l};`,"max-w":`max-width: ${l};`,"min-h":`min-height: ${l};`,"max-h":`max-height: ${l};`}[n]||""}function O(s){let{property:n,value:e,isArbitrary:r}=s,i={italic:"font-style: italic;","not-italic":"font-style: normal;","font-stretch-condensed":"font-stretch: condensed;","font-stretch-expanded":"font-stretch: expanded;","font-stretch-normal":"font-stretch: normal;",antialiased:"-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;","subpixel-antialiased":"-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;","normal-nums":"font-variant-numeric: normal;",ordinal:"font-variant-numeric: ordinal;","slashed-zero":"font-variant-numeric: slashed-zero;","lining-nums":"font-variant-numeric: lining-nums;","oldstyle-nums":"font-variant-numeric: oldstyle-nums;","proportional-nums":"font-variant-numeric: proportional-nums;","tabular-nums":"font-variant-numeric: tabular-nums;",uppercase:"text-transform: uppercase;",lowercase:"text-transform: lowercase;",capitalize:"text-transform: capitalize;","normal-case":"text-transform: none;",underline:"text-decoration-line: underline;",overline:"text-decoration-line: overline;","line-through":"text-decoration-line: line-through;","no-underline":"text-decoration-line: none;","decoration-solid":"text-decoration-style: solid;","decoration-double":"text-decoration-style: double;","decoration-dotted":"text-decoration-style: dotted;","decoration-dashed":"text-decoration-style: dashed;","decoration-wavy":"text-decoration-style: wavy;",truncate:"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;","text-ellipsis":"text-overflow: ellipsis;","text-clip":"text-overflow: clip;","text-wrap":"text-wrap: wrap;","text-nowrap":"text-wrap: nowrap;","text-balance":"text-wrap: balance;","text-pretty":"text-wrap: pretty;","whitespace-normal":"white-space: normal;","whitespace-nowrap":"white-space: nowrap;","whitespace-pre":"white-space: pre;","whitespace-pre-line":"white-space: pre-line;","whitespace-pre-wrap":"white-space: pre-wrap;","whitespace-break-spaces":"white-space: break-spaces;","break-normal":"overflow-wrap: normal; word-break: normal;","break-words":"overflow-wrap: break-word;","break-all":"word-break: break-all;","break-keep":"word-break: keep-all;","hyphens-none":"hyphens: none;","hyphens-manual":"hyphens: manual;","hyphens-auto":"hyphens: auto;","align-baseline":"vertical-align: baseline;","align-top":"vertical-align: top;","align-middle":"vertical-align: middle;","align-bottom":"vertical-align: bottom;","align-text-top":"vertical-align: text-top;","align-text-bottom":"vertical-align: text-bottom;","align-sub":"vertical-align: sub;","align-super":"vertical-align: super;","list-none":"list-style-type: none;","list-disc":"list-style-type: disc;","list-decimal":"list-style-type: decimal;","list-square":"list-style-type: square;","list-inside":"list-style-position: inside;","list-outside":"list-style-position: outside;"};if(i[n])return i[n];let l={bg:()=>`background-color: ${r?e:`var(--c-${e})`};`,text:()=>["left","center","right","justify"].includes(e)?`text-align: ${e};`:`color: ${r?e:`var(--c-${e})`};`,"text-size":()=>{let t,o;if(r)return t=e,`font-size: ${t};`;if(e.startsWith("tw-")){let c=e.slice(3);t=`var(--tw-text-${c})`,o=`var(--tw-leading-${c})`}else t=`var(--font-${e})`,o=`var(--font-lh-${e})`;return`font-size: ${t}; line-height: ${o};`},font:()=>{let t={sans:"ui-sans-serif, system-ui, sans-serif",serif:"ui-serif, Georgia, serif",mono:"ui-monospace, monospace"};if(t[e])return`font-family: ${t[e]};`;let o;return r?o=e:e.startsWith("tw-")?o=`var(--tw-font-${e.slice(3)})`:o=`var(--fw-${e})`,`font-weight: ${o};`},tracking:()=>`letter-spacing: ${r?e:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"}[e]||e};`,leading:()=>`line-height: ${r?e:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"}[e]||e};`,"line-clamp":()=>`overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${e};`,decoration:()=>`text-decoration-color: ${r?e:`var(--c-${e})`};`,"decoration-thickness":()=>`text-decoration-thickness: ${r?e:`${e}px`};`,"underline-offset":()=>`text-underline-offset: ${r?e:`${e}px`};`,indent:()=>`text-indent: ${r?e:`var(--s-${e})`};`,border:()=>`border-color: ${r?e:`var(--c-${e})`}; border-style: solid;`,"border-t":()=>`border-top-color: ${r?e:`var(--c-${e})`}; border-top-style: solid;`,"border-b":()=>`border-bottom-color: ${r?e:`var(--c-${e})`}; border-bottom-style: solid;`,"border-l":()=>`border-left-color: ${r?e:`var(--c-${e})`}; border-left-style: solid;`,"border-r":()=>`border-right-color: ${r?e:`var(--c-${e})`}; border-right-style: solid;`,"border-x":()=>{let t=r?e:`var(--c-${e})`;return`border-left-color: ${t}; border-right-color: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y":()=>{let t=r?e:`var(--c-${e})`;return`border-top-color: ${t}; border-bottom-color: ${t}; border-top-style: solid; border-bottom-style: solid;`},"border-w":()=>`border-width: ${r?e:`var(--s-${e})`}; border-style: solid;`,"border-t-w":()=>`border-top-width: ${r?e:`var(--s-${e})`}; border-top-style: solid;`,"border-b-w":()=>`border-bottom-width: ${r?e:`var(--s-${e})`}; border-bottom-style: solid;`,"border-l-w":()=>`border-left-width: ${r?e:`var(--s-${e})`}; border-left-style: solid;`,"border-r-w":()=>`border-right-width: ${r?e:`var(--s-${e})`}; border-right-style: solid;`,"border-x-w":()=>{let t=r?e:`var(--s-${e})`;return`border-left-width: ${t}; border-right-width: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y-w":()=>{let t=r?e:`var(--s-${e})`;return`border-top-width: ${t}; border-bottom-width: ${t}; border-top-style: solid; border-bottom-style: solid;`},rounded:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-rounded-${e.slice(3)})`:t=`var(--r-${e})`,`border-radius: ${t};`},shadow:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-shadow-${e.slice(3)})`:t=`var(--shadow-${e})`,`box-shadow: ${t};`},opacity:()=>`opacity: ${r?e:parseFloat(e)/100};`,content:()=>`content: "${e}";`,scale:()=>`transform: scale(${r?e:parseFloat(e)/100});`,"scale-x":()=>`transform: scaleX(${r?e:parseFloat(e)/100});`,"scale-y":()=>`transform: scaleY(${r?e:parseFloat(e)/100});`,rotate:()=>`transform: rotate(${r?e:`${e}deg`});`,"translate-x":()=>`transform: translateX(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"translate-y":()=>`transform: translateY(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"skew-x":()=>`transform: skewX(${r?e:`${e}deg`});`,"skew-y":()=>`transform: skewY(${r?e:`${e}deg`});`,origin:()=>`transform-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,transition:()=>({none:"transition-property: none;",all:"transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",colors:"transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",opacity:"transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",shadow:"transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",transform:"transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;"})[e]||`transition-property: ${e};`,duration:()=>`transition-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,ease:()=>`transition-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,delay:()=>`transition-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,animate:()=>({none:"animation: none;",spin:"animation: spin 1s linear infinite;",ping:"animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;",pulse:"animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;",bounce:"animation: bounce 1s infinite;"})[e]||`animation: ${e};`,blur:()=>`filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,brightness:()=>`filter: brightness(${r?e:{0:"0",50:"0.5",75:"0.75",90:"0.9",95:"0.95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,contrast:()=>`filter: contrast(${r?e:{0:"0",50:"0.5",75:"0.75",100:"1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,grayscale:()=>`filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"hue-rotate":()=>`filter: hue-rotate(${r?e:`${e}deg`});`,invert:()=>`filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,saturate:()=>`filter: saturate(${r?e:{0:"0",50:"0.5",100:"1",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,sepia:()=>`filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"drop-shadow":()=>{let t={sm:"drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))",md:"drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",lg:"drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",xl:"drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08))","2xl":"drop-shadow(0 25px 25px rgb(0 0 0 / 0.15))",none:"drop-shadow(0 0 #0000)"};return`filter: ${r?`drop-shadow(${e.replace(/_/g," ")})`:t[e]||t.md};`},"bg-size":()=>`background-size: ${r?e.replace(/_/g," "):{auto:"auto",cover:"cover",contain:"contain"}[e]||e};`,"bg-pos":()=>`background-position: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"bg-repeat":()=>`background-repeat: ${{repeat:"repeat","no-repeat":"no-repeat","repeat-x":"repeat-x","repeat-y":"repeat-y",round:"round",space:"space"}[e]||e};`,"bg-attachment":()=>`background-attachment: ${e};`,"bg-clip":()=>`background-clip: ${{border:"border-box",padding:"padding-box",content:"content-box",text:"text"}[e]||e};`,"bg-origin":()=>`background-origin: ${{border:"border-box",padding:"padding-box",content:"content-box"}[e]||e};`,"bg-blend":()=>`background-blend-mode: ${e};`,"bg-image":()=>`background-image: ${r?e.replace(/_/g," "):{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"}[e]||e};`,from:()=>`--tw-gradient-from: ${r?e:`var(--c-${e})`}; --tw-gradient-to: transparent; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);`,via:()=>`--tw-gradient-via: ${r?e:`var(--c-${e})`}; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to);`,to:()=>`--tw-gradient-to: ${r?e:`var(--c-${e})`};`,"backdrop-blur":()=>`backdrop-filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,"backdrop-brightness":()=>`backdrop-filter: brightness(${r?e:parseFloat(e)/100});`,"backdrop-contrast":()=>`backdrop-filter: contrast(${r?e:parseFloat(e)/100});`,"backdrop-grayscale":()=>`backdrop-filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-hue-rotate":()=>`backdrop-filter: hue-rotate(${r?e:`${e}deg`});`,"backdrop-invert":()=>`backdrop-filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-opacity":()=>`backdrop-filter: opacity(${r?e:parseFloat(e)/100});`,"backdrop-saturate":()=>`backdrop-filter: saturate(${r?e:parseFloat(e)/100});`,"backdrop-sepia":()=>`backdrop-filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"animation-duration":()=>`animation-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,"animation-delay":()=>`animation-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,"animation-iteration":()=>`animation-iteration-count: ${{infinite:"infinite",once:"1",twice:"2"}[e]||e};`,"animation-direction":()=>`animation-direction: ${e};`,"animation-fill":()=>`animation-fill-mode: ${e};`,"animation-play":()=>`animation-play-state: ${e};`,"animation-timing":()=>`animation-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,"scroll-behavior":()=>`scroll-behavior: ${e};`,"scroll-m":()=>`scroll-margin: ${r?e:`var(--s-${e})`};`,"scroll-m-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-left: ${t}; scroll-margin-right: ${t};`},"scroll-m-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-top: ${t}; scroll-margin-bottom: ${t};`},"scroll-p":()=>`scroll-padding: ${r?e:`var(--s-${e})`};`,"scroll-p-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-left: ${t}; scroll-padding-right: ${t};`},"scroll-p-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-top: ${t}; scroll-padding-bottom: ${t};`},"snap-align":()=>`scroll-snap-align: ${e};`,"snap-stop":()=>`scroll-snap-stop: ${e};`,"snap-type":()=>`scroll-snap-type: ${{none:"none",x:"x mandatory",y:"y mandatory",both:"both mandatory","x-proximity":"x proximity","y-proximity":"y proximity"}[e]||e};`,touch:()=>`touch-action: ${{auto:"auto",none:"none","pan-x":"pan-x","pan-y":"pan-y","pan-left":"pan-left","pan-right":"pan-right","pan-up":"pan-up","pan-down":"pan-down","pinch-zoom":"pinch-zoom",manipulation:"manipulation"}[e]||e};`,resize:()=>`resize: ${{none:"none",both:"both",x:"horizontal",y:"vertical"}[e]||e};`,"will-change":()=>`will-change: ${{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform",opacity:"opacity"}[e]||e};`,"color-scheme":()=>`color-scheme: ${e};`,"field-sizing":()=>`field-sizing: ${e};`,"forced-color":()=>`forced-color-adjust: ${e};`,"border-style":()=>`border-style: ${e};`,outline:()=>`outline-color: ${r?e:`var(--c-${e})`};`,"outline-style":()=>`outline-style: ${e};`,"outline-w":()=>`outline-width: ${r?e:`${e}px`};`,"outline-offset":()=>`outline-offset: ${r?e:`${e}px`};`,ring:()=>e==="none"?"box-shadow: 0 0 0 0 transparent;":`box-shadow: 0 0 0 var(--ring-offset) var(--ring-offset-color), 0 0 0 calc(${r?e:`var(--ring-${e})`} + var(--ring-offset)) var(--ring-color);`,"ring-color":()=>`--ring-color: ${r?e:`var(--c-${e})`};`,"ring-offset":()=>`--ring-offset: ${r?e:`${e}px`};`,"ring-offset-color":()=>`--ring-offset-color ${r?e:`var(--c-${e})`};`,divide:()=>`border-color: ${r?e:`var(--c-${e})`}; border-style: solid;`,"divide-x":()=>{if(e==="reverse")return"--ss-divide-x-reverse: 1;";let t=r?e:`var(--c-${e})`;return`border-left-color: ${t}; border-right-color: ${t}; border-left-style: solid; border-right-style: solid;`},"divide-y":()=>{if(e==="reverse")return"--ss-divide-y-reverse: 1;";let t=r?e:`var(--c-${e})`;return`border-top-color: ${t}; border-bottom-color: ${t}; border-top-style: solid; border-bottom-style: solid;`},"divide-w":()=>`border-width: ${r?e:`var(--s-${e})`}; border-style: solid;`,"divide-x-w":()=>{let t=r?e:`var(--s-${e})`;return`
|
|
201
|
+
`}let F={flex:"display: flex;",grid:"display: grid;","inline-flex":"display: inline-flex;","inline-grid":"display: inline-grid;",block:"display: block;",inline:"display: inline-block;",hidden:"display: none;",row:"flex-direction: row;",col:"flex-direction: column;","row-reverse":"flex-direction: row-reverse;","col-reverse":"flex-direction: column-reverse;",wrap:"flex-wrap: wrap;",nowrap:"flex-wrap: nowrap;","wrap-reverse":"flex-wrap: wrap-reverse;",grow:"flex-grow: 1;","grow-0":"flex-grow: 0;",shrink:"flex-shrink: 1;","shrink-0":"flex-shrink: 0;","grid-flow-row":"grid-auto-flow: row;","grid-flow-col":"grid-auto-flow: column;","grid-flow-dense":"grid-auto-flow: dense;","grid-flow-row-dense":"grid-auto-flow: row dense;","grid-flow-col-dense":"grid-auto-flow: column dense;",center:"justify-content: center; align-items: center;",start:"justify-content: flex-start; align-items: flex-start;",end:"justify-content: flex-end; align-items: flex-end;",between:"justify-content: space-between;",around:"justify-content: space-around;",evenly:"justify-content: space-evenly;",absolute:"position: absolute;",relative:"position: relative;",fixed:"position: fixed;",sticky:"position: sticky;",static:"position: static;",visible:"visibility: visible;",invisible:"visibility: hidden;",isolate:"isolation: isolate;","isolate-auto":"isolation: auto;","box-border":"box-sizing: border-box;","box-content":"box-sizing: content-box;","float-left":"float: left;","float-right":"float: right;","float-none":"float: none;","clear-left":"clear: left;","clear-right":"clear: right;","clear-both":"clear: both;","clear-none":"clear: none;",container:"width: 100%; margin-left: auto; margin-right: auto;","border-collapse":"border-collapse: collapse;","border-separate":"border-collapse: separate;"},P=y,W=w;function M(s){let{property:n,value:e,isArbitrary:r}=s;if(n===e&&F[n])return F[n];if(n==="container")return"width: 100%; margin-left: auto; margin-right: auto;";if(n==="justify")return`justify-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="justify-items")return`justify-items: ${e};`;if(n==="justify-self")return`justify-self: ${e};`;if(n==="content")return`align-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="items")return`align-items: ${{start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="self")return`align-self: ${{auto:"auto",start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="place-content")return`place-content: ${{start:"start",end:"end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="place-items")return`place-items: ${e};`;if(n==="place-self")return`place-self: ${e};`;if(n==="z")return`z-index: var(--z-${e});`;if(n==="overflow")return`overflow: ${e};`;if(n==="overflow-x")return`overflow-x: ${e};`;if(n==="overflow-y")return`overflow-y: ${e};`;if(n==="aspect")return`aspect-ratio: ${r?e.replace(/_/g," "):{square:"1 / 1",video:"16 / 9",auto:"auto"}[e]||e};`;if(n==="object")return`object-fit: ${e};`;if(n==="object-pos")return`object-position: ${r?e.replace(/_/g," "):e};`;if(n==="inset")return`inset: ${r?e:e==="0"?"0":`var(--s-${e})`};`;if(["top","right","bottom","left"].includes(n)){let l=r?e:e==="0"?"0":`var(--s-${e})`;return`${n}: ${l};`}if(n==="inset-x"){let l=r?e:e==="0"?"0":`var(--s-${e})`;return`left: ${l}; right: ${l};`}if(n==="inset-y"){let l=r?e:e==="0"?"0":`var(--s-${e})`;return`top: ${l}; bottom: ${l};`}return n==="cols"?`columns: ${e};`:n==="overscroll"?`overscroll-behavior: ${e};`:n==="overscroll-x"?`overscroll-behavior-x: ${e};`:n==="overscroll-y"?`overscroll-behavior-y: ${e};`:n==="basis"?`flex-basis: ${r?e:`var(--s-${e})`};`:n==="flex"?`flex: ${r?e.replace(/_/g," "):{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"}[e]||e};`:n==="order"?`order: ${{first:"-9999",last:"9999",none:"0"}[e]||e};`:n==="grid-cols"?e==="none"?"grid-template-columns: none;":e==="subgrid"?"grid-template-columns: subgrid;":r?`grid-template-columns: ${e.replace(/_/g," ")};`:`grid-template-columns: repeat(${e}, minmax(0, 1fr));`:n==="grid-rows"?e==="none"?"grid-template-rows: none;":e==="subgrid"?"grid-template-rows: subgrid;":r?`grid-template-rows: ${e.replace(/_/g," ")};`:`grid-template-rows: repeat(${e}, minmax(0, 1fr));`:n==="col-span"?e==="full"?"grid-column: 1 / -1;":`grid-column: span ${e} / span ${e};`:n==="col-start"?`grid-column-start: ${e};`:n==="col-end"?`grid-column-end: ${e};`:n==="row-span"?e==="full"?"grid-row: 1 / -1;":`grid-row: span ${e} / span ${e};`:n==="row-start"?`grid-row-start: ${e};`:n==="row-end"?`grid-row-end: ${e};`:n==="auto-cols"?`grid-auto-columns: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="auto-rows"?`grid-auto-rows: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="table"?`table-layout: ${{auto:"auto",fixed:"fixed"}[e]||e};`:n==="caption"?`caption-side: ${e};`:n==="border-spacing"?`border-spacing: ${r?e:`var(--s-${e})`};`:n==="border-spacing-x"?`border-spacing: ${r?e:`var(--s-${e})`} 0;`:n==="border-spacing-y"?`border-spacing: 0 ${r?e:`var(--s-${e})`};`:F[n]||""}function j(s){let{property:n,value:e,isArbitrary:r}=s;if(e==="auto")return{m:"margin: auto;","m-x":"margin-left: auto; margin-right: auto;","m-y":"margin-top: auto; margin-bottom: auto;","m-t":"margin-top: auto;","m-r":"margin-right: auto;","m-b":"margin-bottom: auto;","m-l":"margin-left: auto;"}[n]||"";let l={min:"min-content",max:"max-content",fit:"fit-content"};if(["w","h","min-w","max-w","min-h","max-h"].includes(n)&&l[e]){let a=l[e];return{w:`width: ${a};`,h:`height: ${a};`,"min-w":`min-width: ${a};`,"max-w":`max-width: ${a};`,"min-h":`min-height: ${a};`,"max-h":`max-height: ${a};`}[n]||""}let c;if(r)c=e;else{let a=e.startsWith("-"),i=a?e.substring(1):e,o;i.startsWith("tw-")?o=`var(--tw-${i.slice(3)})`:o=`var(--s-${i})`,c=a?`calc(${o} * -1)`:o}return{p:`padding: ${c};`,"p-t":`padding-top: ${c};`,"p-r":`padding-right: ${c};`,"p-b":`padding-bottom: ${c};`,"p-l":`padding-left: ${c};`,"p-x":`padding-left: ${c}; padding-right: ${c};`,"p-y":`padding-top: ${c}; padding-bottom: ${c};`,m:`margin: ${c};`,"m-t":`margin-top: ${c};`,"m-r":`margin-right: ${c};`,"m-b":`margin-bottom: ${c};`,"m-l":`margin-left: ${c};`,"m-x":`margin-left: ${c}; margin-right: ${c};`,"m-y":`margin-top: ${c}; margin-bottom: ${c};`,g:`gap: ${c};`,"g-x":`column-gap: ${c};`,"g-y":`row-gap: ${c};`,w:`width: ${c};`,h:`height: ${c};`,"min-w":`min-width: ${c};`,"max-w":`max-width: ${c};`,"min-h":`min-height: ${c};`,"max-h":`max-height: ${c};`}[n]||""}function T(s){let{property:n,value:e,isArbitrary:r}=s,l={italic:"font-style: italic;","not-italic":"font-style: normal;","font-stretch-condensed":"font-stretch: condensed;","font-stretch-expanded":"font-stretch: expanded;","font-stretch-normal":"font-stretch: normal;",antialiased:"-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;","subpixel-antialiased":"-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;","normal-nums":"font-variant-numeric: normal;",ordinal:"font-variant-numeric: ordinal;","slashed-zero":"font-variant-numeric: slashed-zero;","lining-nums":"font-variant-numeric: lining-nums;","oldstyle-nums":"font-variant-numeric: oldstyle-nums;","proportional-nums":"font-variant-numeric: proportional-nums;","tabular-nums":"font-variant-numeric: tabular-nums;",uppercase:"text-transform: uppercase;",lowercase:"text-transform: lowercase;",capitalize:"text-transform: capitalize;","normal-case":"text-transform: none;",underline:"text-decoration-line: underline;",overline:"text-decoration-line: overline;","line-through":"text-decoration-line: line-through;","no-underline":"text-decoration-line: none;","decoration-solid":"text-decoration-style: solid;","decoration-double":"text-decoration-style: double;","decoration-dotted":"text-decoration-style: dotted;","decoration-dashed":"text-decoration-style: dashed;","decoration-wavy":"text-decoration-style: wavy;",truncate:"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;","text-ellipsis":"text-overflow: ellipsis;","text-clip":"text-overflow: clip;","text-wrap":"text-wrap: wrap;","text-nowrap":"text-wrap: nowrap;","text-balance":"text-wrap: balance;","text-pretty":"text-wrap: pretty;","whitespace-normal":"white-space: normal;","whitespace-nowrap":"white-space: nowrap;","whitespace-pre":"white-space: pre;","whitespace-pre-line":"white-space: pre-line;","whitespace-pre-wrap":"white-space: pre-wrap;","whitespace-break-spaces":"white-space: break-spaces;","break-normal":"overflow-wrap: normal; word-break: normal;","break-words":"overflow-wrap: break-word;","break-all":"word-break: break-all;","break-keep":"word-break: keep-all;","hyphens-none":"hyphens: none;","hyphens-manual":"hyphens: manual;","hyphens-auto":"hyphens: auto;","align-baseline":"vertical-align: baseline;","align-top":"vertical-align: top;","align-middle":"vertical-align: middle;","align-bottom":"vertical-align: bottom;","align-text-top":"vertical-align: text-top;","align-text-bottom":"vertical-align: text-bottom;","align-sub":"vertical-align: sub;","align-super":"vertical-align: super;","list-none":"list-style-type: none;","list-disc":"list-style-type: disc;","list-decimal":"list-style-type: decimal;","list-square":"list-style-type: square;","list-inside":"list-style-position: inside;","list-outside":"list-style-position: outside;"};if(l[n])return l[n];let c={bg:()=>`background-color: ${r?e:`var(--c-${e})`};`,text:()=>["left","center","right","justify"].includes(e)?`text-align: ${e};`:`color: ${r?e:`var(--c-${e})`};`,"text-size":()=>{let t,a;if(r)return t=e,`font-size: ${t};`;if(e.startsWith("tw-")){let i=e.slice(3);t=`var(--tw-text-${i})`,a=`var(--tw-leading-${i})`}else t=`var(--font-${e})`,a=`var(--font-lh-${e})`;return`font-size: ${t}; line-height: ${a};`},font:()=>{let t={sans:"ui-sans-serif, system-ui, sans-serif",serif:"ui-serif, Georgia, serif",mono:"ui-monospace, monospace"};if(t[e])return`font-family: ${t[e]};`;let a;return r?a=e:e.startsWith("tw-")?a=`var(--tw-font-${e.slice(3)})`:a=`var(--fw-${e})`,`font-weight: ${a};`},tracking:()=>`letter-spacing: ${r?e:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"}[e]||e};`,leading:()=>`line-height: ${r?e:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"}[e]||e};`,"line-clamp":()=>`overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${e};`,decoration:()=>`text-decoration-color: ${r?e:`var(--c-${e})`};`,"decoration-thickness":()=>`text-decoration-thickness: ${r?e:`${e}px`};`,"underline-offset":()=>`text-underline-offset: ${r?e:`${e}px`};`,indent:()=>`text-indent: ${r?e:`var(--s-${e})`};`,border:()=>`border-color: ${r?e:`var(--c-${e})`}; border-style: solid;`,"border-t":()=>`border-top-color: ${r?e:`var(--c-${e})`}; border-top-style: solid;`,"border-b":()=>`border-bottom-color: ${r?e:`var(--c-${e})`}; border-bottom-style: solid;`,"border-l":()=>`border-left-color: ${r?e:`var(--c-${e})`}; border-left-style: solid;`,"border-r":()=>`border-right-color: ${r?e:`var(--c-${e})`}; border-right-style: solid;`,"border-x":()=>{let t=r?e:`var(--c-${e})`;return`border-left-color: ${t}; border-right-color: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y":()=>{let t=r?e:`var(--c-${e})`;return`border-top-color: ${t}; border-bottom-color: ${t}; border-top-style: solid; border-bottom-style: solid;`},"border-w":()=>`border-width: ${r?e:`var(--s-${e})`}; border-style: solid;`,"border-t-w":()=>`border-top-width: ${r?e:`var(--s-${e})`}; border-top-style: solid;`,"border-b-w":()=>`border-bottom-width: ${r?e:`var(--s-${e})`}; border-bottom-style: solid;`,"border-l-w":()=>`border-left-width: ${r?e:`var(--s-${e})`}; border-left-style: solid;`,"border-r-w":()=>`border-right-width: ${r?e:`var(--s-${e})`}; border-right-style: solid;`,"border-x-w":()=>{let t=r?e:`var(--s-${e})`;return`border-left-width: ${t}; border-right-width: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y-w":()=>{let t=r?e:`var(--s-${e})`;return`border-top-width: ${t}; border-bottom-width: ${t}; border-top-style: solid; border-bottom-style: solid;`},rounded:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-rounded-${e.slice(3)})`:t=`var(--r-${e})`,`border-radius: ${t};`},shadow:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-shadow-${e.slice(3)})`:t=`var(--shadow-${e})`,`box-shadow: ${t};`},opacity:()=>`opacity: ${r?e:parseFloat(e)/100};`,content:()=>`content: "${e}";`,scale:()=>`transform: scale(${r?e:parseFloat(e)/100});`,"scale-x":()=>`transform: scaleX(${r?e:parseFloat(e)/100});`,"scale-y":()=>`transform: scaleY(${r?e:parseFloat(e)/100});`,rotate:()=>`transform: rotate(${r?e:`${e}deg`});`,"translate-x":()=>`transform: translateX(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"translate-y":()=>`transform: translateY(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"skew-x":()=>`transform: skewX(${r?e:`${e}deg`});`,"skew-y":()=>`transform: skewY(${r?e:`${e}deg`});`,origin:()=>`transform-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,transition:()=>({none:"transition-property: none;",all:"transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",colors:"transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",opacity:"transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",shadow:"transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",transform:"transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;"})[e]||`transition-property: ${e};`,duration:()=>`transition-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,ease:()=>`transition-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,delay:()=>`transition-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,animate:()=>({none:"animation: none;",spin:"animation: spin 1s linear infinite;",ping:"animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;",pulse:"animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;",bounce:"animation: bounce 1s infinite;"})[e]||`animation: ${e};`,blur:()=>`filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,brightness:()=>`filter: brightness(${r?e:{0:"0",50:"0.5",75:"0.75",90:"0.9",95:"0.95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,contrast:()=>`filter: contrast(${r?e:{0:"0",50:"0.5",75:"0.75",100:"1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,grayscale:()=>`filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"hue-rotate":()=>`filter: hue-rotate(${r?e:`${e}deg`});`,invert:()=>`filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,saturate:()=>`filter: saturate(${r?e:{0:"0",50:"0.5",100:"1",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,sepia:()=>`filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"drop-shadow":()=>{let t={sm:"drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))",md:"drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",lg:"drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",xl:"drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08))","2xl":"drop-shadow(0 25px 25px rgb(0 0 0 / 0.15))",none:"drop-shadow(0 0 #0000)"};return`filter: ${r?`drop-shadow(${e.replace(/_/g," ")})`:t[e]||t.md};`},"bg-size":()=>`background-size: ${r?e.replace(/_/g," "):{auto:"auto",cover:"cover",contain:"contain"}[e]||e};`,"bg-pos":()=>`background-position: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"bg-repeat":()=>`background-repeat: ${{repeat:"repeat","no-repeat":"no-repeat","repeat-x":"repeat-x","repeat-y":"repeat-y",round:"round",space:"space"}[e]||e};`,"bg-attachment":()=>`background-attachment: ${e};`,"bg-clip":()=>`background-clip: ${{border:"border-box",padding:"padding-box",content:"content-box",text:"text"}[e]||e};`,"bg-origin":()=>`background-origin: ${{border:"border-box",padding:"padding-box",content:"content-box"}[e]||e};`,"bg-blend":()=>`background-blend-mode: ${e};`,"bg-image":()=>`background-image: ${r?e.replace(/_/g," "):{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"}[e]||e};`,from:()=>`--tw-gradient-from: ${r?e:`var(--c-${e})`}; --tw-gradient-to: transparent; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);`,via:()=>`--tw-gradient-via: ${r?e:`var(--c-${e})`}; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to);`,to:()=>`--tw-gradient-to: ${r?e:`var(--c-${e})`};`,"backdrop-blur":()=>`backdrop-filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,"backdrop-brightness":()=>`backdrop-filter: brightness(${r?e:parseFloat(e)/100});`,"backdrop-contrast":()=>`backdrop-filter: contrast(${r?e:parseFloat(e)/100});`,"backdrop-grayscale":()=>`backdrop-filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-hue-rotate":()=>`backdrop-filter: hue-rotate(${r?e:`${e}deg`});`,"backdrop-invert":()=>`backdrop-filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-opacity":()=>`backdrop-filter: opacity(${r?e:parseFloat(e)/100});`,"backdrop-saturate":()=>`backdrop-filter: saturate(${r?e:parseFloat(e)/100});`,"backdrop-sepia":()=>`backdrop-filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"animation-duration":()=>`animation-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,"animation-delay":()=>`animation-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,"animation-iteration":()=>`animation-iteration-count: ${{infinite:"infinite",once:"1",twice:"2"}[e]||e};`,"animation-direction":()=>`animation-direction: ${e};`,"animation-fill":()=>`animation-fill-mode: ${e};`,"animation-play":()=>`animation-play-state: ${e};`,"animation-timing":()=>`animation-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,"scroll-behavior":()=>`scroll-behavior: ${e};`,"scroll-m":()=>`scroll-margin: ${r?e:`var(--s-${e})`};`,"scroll-m-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-left: ${t}; scroll-margin-right: ${t};`},"scroll-m-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-top: ${t}; scroll-margin-bottom: ${t};`},"scroll-p":()=>`scroll-padding: ${r?e:`var(--s-${e})`};`,"scroll-p-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-left: ${t}; scroll-padding-right: ${t};`},"scroll-p-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-top: ${t}; scroll-padding-bottom: ${t};`},"snap-align":()=>`scroll-snap-align: ${e};`,"snap-stop":()=>`scroll-snap-stop: ${e};`,"snap-type":()=>`scroll-snap-type: ${{none:"none",x:"x mandatory",y:"y mandatory",both:"both mandatory","x-proximity":"x proximity","y-proximity":"y proximity"}[e]||e};`,touch:()=>`touch-action: ${{auto:"auto",none:"none","pan-x":"pan-x","pan-y":"pan-y","pan-left":"pan-left","pan-right":"pan-right","pan-up":"pan-up","pan-down":"pan-down","pinch-zoom":"pinch-zoom",manipulation:"manipulation"}[e]||e};`,resize:()=>`resize: ${{none:"none",both:"both",x:"horizontal",y:"vertical"}[e]||e};`,"will-change":()=>`will-change: ${{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform",opacity:"opacity"}[e]||e};`,"color-scheme":()=>`color-scheme: ${e};`,"field-sizing":()=>`field-sizing: ${e};`,"forced-color":()=>`forced-color-adjust: ${e};`,"border-style":()=>`border-style: ${e};`,outline:()=>`outline-color: ${r?e:`var(--c-${e})`};`,"outline-style":()=>`outline-style: ${e};`,"outline-w":()=>`outline-width: ${r?e:`${e}px`};`,"outline-offset":()=>`outline-offset: ${r?e:`${e}px`};`,ring:()=>e==="none"?"box-shadow: 0 0 0 0 transparent;":`box-shadow: 0 0 0 var(--ring-offset) var(--ring-offset-color), 0 0 0 calc(${r?e:`var(--ring-${e})`} + var(--ring-offset)) var(--ring-color);`,"ring-color":()=>`--ring-color: ${r?e:`var(--c-${e})`};`,"ring-offset":()=>`--ring-offset: ${r?e:`${e}px`};`,"ring-offset-color":()=>`--ring-offset-color ${r?e:`var(--c-${e})`};`,divide:()=>`border-color: ${r?e:`var(--c-${e})`}; border-style: solid;`,"divide-x":()=>{if(e==="reverse")return"--ss-divide-x-reverse: 1;";let t=r?e:`var(--c-${e})`;return`border-left-color: ${t}; border-right-color: ${t}; border-left-style: solid; border-right-style: solid;`},"divide-y":()=>{if(e==="reverse")return"--ss-divide-y-reverse: 1;";let t=r?e:`var(--c-${e})`;return`border-top-color: ${t}; border-bottom-color: ${t}; border-top-style: solid; border-bottom-style: solid;`},"divide-w":()=>`border-width: ${r?e:`var(--s-${e})`}; border-style: solid;`,"divide-x-w":()=>{let t=r?e:`var(--s-${e})`;return`
|
|
202
202
|
border-right-width: calc(${t} * var(--ss-divide-x-reverse, 0));
|
|
203
203
|
border-left-width: calc(${t} * (1 - var(--ss-divide-x-reverse, 0)));
|
|
204
204
|
border-left-style: solid;
|
|
@@ -208,15 +208,15 @@ img, video {
|
|
|
208
208
|
border-top-width: calc(${t} * (1 - var(--ss-divide-y-reverse, 0)));
|
|
209
209
|
border-top-style: solid;
|
|
210
210
|
border-bottom-style: solid;
|
|
211
|
-
`},"divide-x:reverse":()=>"--ss-divide-x-reverse: 1;","divide-y:reverse":()=>"--ss-divide-y-reverse: 1;","divide-style":()=>`border-style: ${e};`,stroke:()=>`stroke: ${r?e:`var(--c-${e})`};`,"stroke-w":()=>`stroke-width: ${e};`,fill:()=>e==="none"?"fill: none;":`fill: ${r?e:`var(--c-${e})`};`,"mix-blend":()=>`mix-blend-mode: ${e};`,perspective:()=>`perspective: ${r?e:{none:"none",sm:"500px",md:"1000px",lg:"1500px",xl:"2000px"}[e]||e};`,"perspective-origin":()=>`perspective-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"rotate-x":()=>`transform: rotateX(${r?e:`${e}deg`});`,"rotate-y":()=>`transform: rotateY(${r?e:`${e}deg`});`,"rotate-z":()=>`transform: rotateZ(${r?e:`${e}deg`});`,"transform-style":()=>`transform-style: ${e};`,backface:()=>`backface-visibility: ${{visible:"visible",hidden:"hidden"}[e]||e};`}[n];return
|
|
212
|
-
`;let e=
|
|
213
|
-
`}function
|
|
214
|
-
@media (min-width: ${t[
|
|
215
|
-
`;let h=new Set;for(let
|
|
216
|
-
`,h.add(
|
|
217
|
-
`}if(d.length>0){let
|
|
211
|
+
`},"divide-x:reverse":()=>"--ss-divide-x-reverse: 1;","divide-y:reverse":()=>"--ss-divide-y-reverse: 1;","divide-style":()=>`border-style: ${e};`,stroke:()=>`stroke: ${r?e:`var(--c-${e})`};`,"stroke-w":()=>`stroke-width: ${e};`,fill:()=>e==="none"?"fill: none;":`fill: ${r?e:`var(--c-${e})`};`,"mix-blend":()=>`mix-blend-mode: ${e};`,perspective:()=>`perspective: ${r?e:{none:"none",sm:"500px",md:"1000px",lg:"1500px",xl:"2000px"}[e]||e};`,"perspective-origin":()=>`perspective-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"rotate-x":()=>`transform: rotateX(${r?e:`${e}deg`});`,"rotate-y":()=>`transform: rotateY(${r?e:`${e}deg`});`,"rotate-z":()=>`transform: rotateZ(${r?e:`${e}deg`});`,"transform-style":()=>`transform-style: ${e};`,backface:()=>`backface-visibility: ${{visible:"visible",hidden:"hidden"}[e]||e};`}[n];return c?c():""}function E(s,n){if(n==="layout"&&F[s])return`[layout~="${s}"] { ${F[s]} }
|
|
212
|
+
`;let e=k(s,n),r="";switch(n){case"layout":r=M(e);break;case"space":r=j(e);break;case"visual":r=T(e);break}if(!r)return"";let l=s.startsWith("divide")&&!s.includes(":reverse"),d="";return l?d=`[visual~="${s}"] > :not([hidden]) ~ :not([hidden])`:d=`[${n}~="${s}"]`,e.state&&e.state!=="dark"&&(l?d=`[visual~="${s}"] > :not([hidden]) ~ :not([hidden]):${e.state}`:d+=`:${e.state}`),`${d} { ${r} }
|
|
213
|
+
`}function A(){let s={layout:new Set,space:new Set,visual:new Set};return document.querySelectorAll("[layout], [space], [visual]").forEach(e=>{["layout","space","visual"].forEach(r=>{let l=e.getAttribute(r);l&&l.split(/\s+/).forEach(d=>{d&&s[r].add(d)})})}),s}function V(s,n){let e=x(n);n.preflight!==!1&&(e+=$());let r=[];for(let[o,m]of Object.entries(s))for(let h of m)r.push({raw:h,attrType:o});let l=[],d=[],c={},{screens:t}=n.theme;for(let o of Object.keys(t))c[o]=[];for(let o of r){let m=k(o.raw,o.attrType);m.state==="dark"?d.push(m):m.breakpoint?(c[m.breakpoint]||(c[m.breakpoint]=[]),c[m.breakpoint].push(m)):l.push(m)}let a=["flex","grid","inline-flex","inline-grid","block","inline","hidden","contents"],i=new Map;for(let o of l)o.attrType&&a.includes(o.property)&&(i.has(o.attrType)||i.set(o.attrType,new Set),i.get(o.attrType).add(o.raw));for(let o of l)e+=E(o.raw,o.attrType);for(let[o,m]of Object.entries(c))if(m.length>0){e+=`
|
|
214
|
+
@media (min-width: ${t[o]}) {
|
|
215
|
+
`;let h=new Set;for(let g of m)if(g.attrType&&a.includes(g.property)&&i.has(g.attrType)){let B=i.get(g.attrType);if(B.size>0&&!B.has(g.raw)&&!h.has(g.raw)){let O=`[${g.attrType}~="${g.raw}"]`;e+=` ${O} { display: revert-layer; }
|
|
216
|
+
`,h.add(g.raw)}}for(let g of m)e+=" "+E(g.raw,g.attrType);e+=`}
|
|
217
|
+
`}if(d.length>0){let o=n.darkMode||"media";if(o==="media"){e+=`
|
|
218
218
|
@media (prefers-color-scheme: dark) {
|
|
219
|
-
`;for(let
|
|
220
|
-
`}else{let
|
|
219
|
+
`;for(let m of d)e+=" "+E(m.raw,m.attrType);e+=`}
|
|
220
|
+
`}else{let m=Array.isArray(o)?o[1]:".dark";e+=`
|
|
221
221
|
/* Dark Mode */
|
|
222
|
-
`;for(let h of d){let
|
|
222
|
+
`;for(let h of d){let g=E(h.raw,h.attrType);e+=g.replace(/^(\[[^\]]+\])/,`${m} $1`)}}}return e}function D(s){let n=document.getElementById("senangstart-jit");n||(n=document.createElement("style"),n.id="senangstart-jit",document.head.appendChild(n)),n.textContent=s}function C(){let s=f(),n=b(s),e=A(),r=V(e,n);D(r),new MutationObserver(()=>{let d=A(),c=V(d,n);D(c)}).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["layout","space","visual"]}),console.log("%c[SenangStart CSS]%c Just-in-Time runtime initialized \u2713","color: #2563EB; font-weight: bold;","color: #10B981;")}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",C):C()})();})();
|
package/docs/public/llms.txt
CHANGED
|
@@ -46,7 +46,8 @@ Controls dimensions and spacing using the Natural Scale.
|
|
|
46
46
|
- `vast` (160px), `vast-2x` (176px), `vast-3x` (192px), `vast-4x` (208px)
|
|
47
47
|
- `vast-5x` (224px), `vast-6x` (240px), `vast-7x` (256px), `vast-8x` (288px)
|
|
48
48
|
- `vast-9x` (320px), `vast-10x` (384px)
|
|
49
|
-
- **
|
|
49
|
+
- **Negative**: `space="m:-small m-x:-tw-4"` (Negative scale values).
|
|
50
|
+
- **Arbitrary**: `space="w:[350px] m:[-10px]"`
|
|
50
51
|
|
|
51
52
|
### 3. Visual Attribute
|
|
52
53
|
Controls appearance.
|
package/package.json
CHANGED
|
@@ -492,13 +492,23 @@ function convertClass(twClass, options = {}) {
|
|
|
492
492
|
|
|
493
493
|
// Margin
|
|
494
494
|
const marginMatch = baseClass.match(
|
|
495
|
-
/^-?m([trblxy])?-(\d+\.?\d*|px|auto|full|screen)$/
|
|
495
|
+
/^-?m([trblxy])?-(\[.+\]|\d+\.?\d*|px|auto|full|screen)$/
|
|
496
496
|
);
|
|
497
497
|
if (marginMatch) {
|
|
498
498
|
const isNeg = baseClass.startsWith("-");
|
|
499
499
|
const side = marginMatch[1] ? "-" + marginMatch[1] : "";
|
|
500
500
|
let val = getSpacingScale(marginMatch[2], options);
|
|
501
|
-
|
|
501
|
+
|
|
502
|
+
if (isNeg) {
|
|
503
|
+
if (val.startsWith('[') && val.endsWith(']')) {
|
|
504
|
+
// Handle arbitrary value: [10px] -> [-10px]
|
|
505
|
+
const inner = val.slice(1, -1);
|
|
506
|
+
val = `[-${inner}]`;
|
|
507
|
+
} else {
|
|
508
|
+
// Handle named/scale value: small -> -small
|
|
509
|
+
val = `-${val}`;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
502
512
|
return { category: 'space', value: prefix + "m" + side + ":" + val };
|
|
503
513
|
}
|
|
504
514
|
|
|
@@ -146,7 +146,8 @@ Controls dimensions and spacing using the Natural Scale.
|
|
|
146
146
|
- \`vast\` (160px), \`vast-2x\` (176px), \`vast-3x\` (192px), \`vast-4x\` (208px)
|
|
147
147
|
- \`vast-5x\` (224px), \`vast-6x\` (240px), \`vast-7x\` (256px), \`vast-8x\` (288px)
|
|
148
148
|
- \`vast-9x\` (320px), \`vast-10x\` (384px)
|
|
149
|
-
- **
|
|
149
|
+
- **Negative**: \`space="m:-small m-x:-tw-4"\` (Negative scale values).
|
|
150
|
+
- **Arbitrary**: \`space="w:[350px] m:[-10px]"\`
|
|
150
151
|
|
|
151
152
|
### 3. Visual Attribute
|
|
152
153
|
Controls appearance.
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
// Core module imports (bundled by esbuild)
|
|
14
|
-
import { BREAKPOINTS, STATES
|
|
15
|
-
import { tokenize
|
|
14
|
+
import { BREAKPOINTS, STATES } from '../core/constants.js';
|
|
15
|
+
import { tokenize } from '../core/tokenizer-core.js';
|
|
16
16
|
|
|
17
17
|
(function() {
|
|
18
18
|
'use strict';
|
|
@@ -771,11 +771,13 @@ img, video {
|
|
|
771
771
|
const breakpoints = BREAKPOINTS;
|
|
772
772
|
const states = STATES;
|
|
773
773
|
|
|
774
|
-
// Use shared parseToken from core module
|
|
775
|
-
// (parseToken is imported from core, using local alias for scoping)
|
|
776
|
-
|
|
777
774
|
function generateLayoutRule(token) {
|
|
778
775
|
const { property, value, isArbitrary } = token;
|
|
776
|
+
|
|
777
|
+
// Check for simple layout keywords first (property === value means it's a keyword like 'flex', 'grid', etc.)
|
|
778
|
+
if (property === value && layoutKeywords[property]) {
|
|
779
|
+
return layoutKeywords[property];
|
|
780
|
+
}
|
|
779
781
|
|
|
780
782
|
// Container
|
|
781
783
|
if (property === 'container') {
|
|
@@ -1129,15 +1131,25 @@ img, video {
|
|
|
1129
1131
|
return propMap[property] || '';
|
|
1130
1132
|
}
|
|
1131
1133
|
|
|
1132
|
-
// Handle Tailwind scale prefix (tw-*)
|
|
1134
|
+
// Handle Tailwind scale prefix (tw-*) and negative values
|
|
1133
1135
|
let cssValue;
|
|
1134
1136
|
if (isArbitrary) {
|
|
1135
1137
|
cssValue = value;
|
|
1136
|
-
} else if (value.startsWith('tw-')) {
|
|
1137
|
-
const twValue = value.slice(3); // Remove 'tw-' prefix
|
|
1138
|
-
cssValue = `var(--tw-${twValue})`;
|
|
1139
1138
|
} else {
|
|
1140
|
-
|
|
1139
|
+
// Check for negative value
|
|
1140
|
+
const isNegative = value.startsWith('-');
|
|
1141
|
+
const cleanValue = isNegative ? value.substring(1) : value;
|
|
1142
|
+
|
|
1143
|
+
let baseValue;
|
|
1144
|
+
if (cleanValue.startsWith('tw-')) {
|
|
1145
|
+
const twValue = cleanValue.slice(3); // Remove 'tw-' prefix
|
|
1146
|
+
baseValue = `var(--tw-${twValue})`;
|
|
1147
|
+
} else {
|
|
1148
|
+
baseValue = `var(--s-${cleanValue})`;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// Apply negative calculation if needed
|
|
1152
|
+
cssValue = isNegative ? `calc(${baseValue} * -1)` : baseValue;
|
|
1141
1153
|
}
|
|
1142
1154
|
|
|
1143
1155
|
const map = {
|
|
@@ -2128,7 +2140,7 @@ img, video {
|
|
|
2128
2140
|
return `[layout~="${raw}"] { ${layoutKeywords[raw]} }\n`;
|
|
2129
2141
|
}
|
|
2130
2142
|
|
|
2131
|
-
const token =
|
|
2143
|
+
const token = tokenize(raw, attrType);
|
|
2132
2144
|
let cssDeclaration = '';
|
|
2133
2145
|
|
|
2134
2146
|
switch (attrType) {
|
|
@@ -2359,7 +2371,7 @@ img, video {
|
|
|
2359
2371
|
attributeFilter: ['layout', 'space', 'visual']
|
|
2360
2372
|
});
|
|
2361
2373
|
|
|
2362
|
-
console.log('%c[SenangStart CSS]%c
|
|
2374
|
+
console.log('%c[SenangStart CSS]%c Just-in-Time runtime initialized ✓',
|
|
2363
2375
|
'color: #2563EB; font-weight: bold;',
|
|
2364
2376
|
'color: #10B981;'
|
|
2365
2377
|
);
|
|
@@ -322,13 +322,23 @@ function convertClass(twClass, exact) {
|
|
|
322
322
|
|
|
323
323
|
// Margin
|
|
324
324
|
const marginMatch = baseClass.match(
|
|
325
|
-
/^-?m([trblxy])?-(\d+\.?\d*|px|auto|full|screen)$/
|
|
325
|
+
/^-?m([trblxy])?-(\[.+\]|\d+\.?\d*|px|auto|full|screen)$/
|
|
326
326
|
);
|
|
327
327
|
if (marginMatch) {
|
|
328
328
|
const isNeg = baseClass.startsWith("-");
|
|
329
329
|
const side = marginMatch[1] ? "-" + marginMatch[1] : "";
|
|
330
330
|
let val = getSpacing(marginMatch[2], exact);
|
|
331
|
-
|
|
331
|
+
|
|
332
|
+
if (isNeg) {
|
|
333
|
+
if (val.startsWith('[') && val.endsWith(']')) {
|
|
334
|
+
// Handle arbitrary value: [10px] -> [-10px]
|
|
335
|
+
const inner = val.slice(1, -1);
|
|
336
|
+
val = `[-${inner}]`;
|
|
337
|
+
} else {
|
|
338
|
+
// Handle named/scale value: medium -> -medium
|
|
339
|
+
val = `-${val}`;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
332
342
|
return { cat: "space", val: prefix + "m" + side + ":" + val };
|
|
333
343
|
}
|
|
334
344
|
|
|
@@ -587,7 +587,25 @@ function generateSpaceRule(token, config) {
|
|
|
587
587
|
}
|
|
588
588
|
|
|
589
589
|
// Determine the CSS value
|
|
590
|
-
|
|
590
|
+
let cssValue;
|
|
591
|
+
if (isArbitrary) {
|
|
592
|
+
cssValue = value;
|
|
593
|
+
} else {
|
|
594
|
+
// Check for negative value
|
|
595
|
+
const isNegative = value.startsWith('-');
|
|
596
|
+
const cleanValue = isNegative ? value.substring(1) : value;
|
|
597
|
+
|
|
598
|
+
let baseValue;
|
|
599
|
+
if (cleanValue.startsWith('tw-')) {
|
|
600
|
+
const twValue = cleanValue.slice(3); // Remove 'tw-' prefix
|
|
601
|
+
baseValue = `var(--tw-${twValue})`;
|
|
602
|
+
} else {
|
|
603
|
+
baseValue = `var(--s-${cleanValue})`;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
// Apply negative calculation if needed
|
|
607
|
+
cssValue = isNegative ? `calc(${baseValue} * -1)` : baseValue;
|
|
608
|
+
}
|
|
591
609
|
|
|
592
610
|
// Handle special values
|
|
593
611
|
if (value === 'auto') {
|
|
@@ -71,6 +71,18 @@ describe('convertClass', () => {
|
|
|
71
71
|
assert.deepStrictEqual(convertClass('h-screen'), { category: 'space', value: 'h:[100vh]' });
|
|
72
72
|
assert.deepStrictEqual(convertClass('max-w-4'), { category: 'space', value: 'max-w:small' });
|
|
73
73
|
});
|
|
74
|
+
|
|
75
|
+
it('should convert negative margin classes', () => {
|
|
76
|
+
// Standard exact=false
|
|
77
|
+
assert.deepStrictEqual(convertClass('-m-4'), { category: 'space', value: 'm:-small' });
|
|
78
|
+
assert.deepStrictEqual(convertClass('-mt-8'), { category: 'space', value: 'm-t:-big' });
|
|
79
|
+
|
|
80
|
+
// Exact=true
|
|
81
|
+
assert.deepStrictEqual(convertClass('-m-4', { exact: true }), { category: 'space', value: 'm:-tw-4' });
|
|
82
|
+
|
|
83
|
+
// Arbitrary
|
|
84
|
+
assert.deepStrictEqual(convertClass('-m-[10px]'), { category: 'space', value: 'm:[-10px]' });
|
|
85
|
+
});
|
|
74
86
|
});
|
|
75
87
|
|
|
76
88
|
describe('Visual classes', () => {
|