@plumeria/turbopack-loader 18.1.8 → 18.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -939,16 +939,19 @@ async function loader(source) {
|
|
|
939
939
|
.subarray(argStart, argEnd)
|
|
940
940
|
.toString('utf-8');
|
|
941
941
|
let valueExpr;
|
|
942
|
+
const kebabProp = (0, zss_engine_1.camelToKebabCase)(targetProp);
|
|
943
|
+
const isUnitless = zss_engine_1.exceptionCamelCase.includes(targetProp) ||
|
|
944
|
+
targetProp.startsWith('--');
|
|
942
945
|
const maybeNumber = Number(argSource);
|
|
943
946
|
if (!isNaN(maybeNumber) && argSource.trim() === String(maybeNumber)) {
|
|
944
|
-
valueExpr = JSON.stringify((0, zss_engine_1.applyCssValue)(maybeNumber,
|
|
947
|
+
valueExpr = JSON.stringify((0, zss_engine_1.applyCssValue)(maybeNumber, kebabProp));
|
|
945
948
|
}
|
|
946
949
|
else if ((argSource.startsWith('"') && argSource.endsWith('"')) ||
|
|
947
950
|
(argSource.startsWith("'") && argSource.endsWith("'"))) {
|
|
948
|
-
valueExpr = JSON.stringify((0, zss_engine_1.applyCssValue)(argSource.slice(1, -1),
|
|
951
|
+
valueExpr = JSON.stringify((0, zss_engine_1.applyCssValue)(argSource.slice(1, -1), kebabProp));
|
|
949
952
|
}
|
|
950
953
|
else {
|
|
951
|
-
valueExpr =
|
|
954
|
+
valueExpr = isUnitless
|
|
952
955
|
? argSource
|
|
953
956
|
: `(typeof (${argSource}) === 'number' ? (${argSource}) + 'px' : (${argSource}))`;
|
|
954
957
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/turbopack-loader",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"description": "Plumeria Turbopack-loader",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"zero-virtual.css"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@plumeria/compiler": "^18.
|
|
26
|
-
"@plumeria/utils": "^18.
|
|
25
|
+
"@plumeria/compiler": "^18.2.0",
|
|
26
|
+
"@plumeria/utils": "^18.2.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@swc/core": "1.15.47",
|