rafters 0.0.79 → 0.0.80
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/index.js +32 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1261,7 +1261,30 @@ function postProcessDocSheet(css) {
|
|
|
1261
1261
|
themeContent = themeContent.replace(/:root,:host/g, ":host");
|
|
1262
1262
|
parts.push(`:host{container-type:inline-size}${themeContent}`);
|
|
1263
1263
|
}
|
|
1264
|
-
const
|
|
1264
|
+
const propertyRe = /@property\s+--[\w-]+\s*\{[^}]*\}/g;
|
|
1265
|
+
let propMatch;
|
|
1266
|
+
while ((propMatch = propertyRe.exec(css)) !== null) {
|
|
1267
|
+
parts.push(propMatch[0]);
|
|
1268
|
+
}
|
|
1269
|
+
const keyframesRe = /@keyframes\s+[\w-]+\s*\{/g;
|
|
1270
|
+
let kfMatch;
|
|
1271
|
+
while ((kfMatch = keyframesRe.exec(css)) !== null) {
|
|
1272
|
+
const start = kfMatch.index;
|
|
1273
|
+
let depth = 0;
|
|
1274
|
+
let end = start;
|
|
1275
|
+
for (let i = start; i < css.length; i++) {
|
|
1276
|
+
if (css[i] === "{") depth++;
|
|
1277
|
+
if (css[i] === "}") {
|
|
1278
|
+
depth--;
|
|
1279
|
+
if (depth === 0) {
|
|
1280
|
+
end = i + 1;
|
|
1281
|
+
break;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
parts.push(css.slice(start, end));
|
|
1286
|
+
}
|
|
1287
|
+
const layerRe = /@layer (base|components|utilities|properties)\{/g;
|
|
1265
1288
|
let match;
|
|
1266
1289
|
while ((match = layerRe.exec(css)) !== null) {
|
|
1267
1290
|
const start = match.index;
|
|
@@ -1277,7 +1300,14 @@ function postProcessDocSheet(css) {
|
|
|
1277
1300
|
}
|
|
1278
1301
|
}
|
|
1279
1302
|
}
|
|
1280
|
-
|
|
1303
|
+
let block = css.slice(start, end);
|
|
1304
|
+
if (match[1] === "properties") {
|
|
1305
|
+
block = block.replace(
|
|
1306
|
+
/\*\s*,\s*:?:?before\s*,\s*:?:?after\s*,\s*:?:?backdrop/g,
|
|
1307
|
+
":host,*,::before,::after"
|
|
1308
|
+
);
|
|
1309
|
+
}
|
|
1310
|
+
parts.push(block);
|
|
1281
1311
|
}
|
|
1282
1312
|
return parts.join("");
|
|
1283
1313
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rafters",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.80",
|
|
4
4
|
"description": "Design Intelligence CLI. Scaffold tokens, import existing shadcn/Tailwind v4 sources, add components, and serve an MCP server so AI agents read decisions instead of guessing.",
|
|
5
5
|
"homepage": "https://rafters.studio",
|
|
6
6
|
"license": "MIT",
|