@plumeria/vite-plugin 10.0.3 → 10.0.4

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -39
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createFilter } from 'vite';
2
2
  import { parseSync } from '@swc/core';
3
3
  import * as path from 'path';
4
- import { applyCssValue, genBase36Hash } from 'zss-engine';
4
+ import { applyCssValue, genBase36Hash, exceptionCamelCase } from 'zss-engine';
5
5
  import { traverse, getStyleRecords, collectLocalConsts, objectExpressionToObject, t, extractOndemandStyles, deepMerge, scanAll, resolveImportPath, optimizer, processVariants, } from '@plumeria/utils';
6
6
  import { getLeadingCommentLength } from '@plumeria/utils';
7
7
  const TARGET_EXTENSIONS = ['ts', 'tsx', 'js', 'jsx'];
@@ -1187,47 +1187,12 @@ export function plumeria(options = {}) {
1187
1187
  argSource.trim() === String(maybeNumber)) {
1188
1188
  valueExpr = JSON.stringify(applyCssValue(maybeNumber, targetProp));
1189
1189
  }
1190
- else if (argSource.startsWith('"') &&
1191
- argSource.endsWith('"')) {
1190
+ else if ((argSource.startsWith('"') && argSource.endsWith('"')) ||
1191
+ (argSource.startsWith("'") && argSource.endsWith("'"))) {
1192
1192
  valueExpr = JSON.stringify(applyCssValue(argSource.slice(1, -1), targetProp));
1193
1193
  }
1194
1194
  else {
1195
- const exception = [
1196
- 'animationIterationCount',
1197
- 'aspectRatio',
1198
- 'columnCount',
1199
- 'columns',
1200
- 'fillOpacity',
1201
- 'flex',
1202
- 'flexGrow',
1203
- 'flexShrink',
1204
- 'floodOpacity',
1205
- 'fontSizeAdjust',
1206
- 'fontWeight',
1207
- 'gridColumn',
1208
- 'gridColumnEnd',
1209
- 'gridColumnStart',
1210
- 'gridRow',
1211
- 'gridRowEnd',
1212
- 'gridRowStart',
1213
- 'hyphenateLimitChars',
1214
- 'initialLetter',
1215
- 'lineHeight',
1216
- 'mathDepth',
1217
- 'opacity',
1218
- 'order',
1219
- 'orphans',
1220
- 'scale',
1221
- 'shapeImageThreshold',
1222
- 'stopOpacity',
1223
- 'strokeMiterlimit',
1224
- 'strokeOpacity',
1225
- 'tabSize',
1226
- 'widows',
1227
- 'zIndex',
1228
- 'zoom',
1229
- ];
1230
- valueExpr = exception.includes(targetProp)
1195
+ valueExpr = exceptionCamelCase.includes(targetProp)
1231
1196
  ? argSource
1232
1197
  : `(typeof ${argSource} === 'number' ? ${argSource} + 'px' : ${argSource})`;
1233
1198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/vite-plugin",
3
- "version": "10.0.3",
3
+ "version": "10.0.4",
4
4
  "type": "module",
5
5
  "description": "Plumeria Vite plugin",
6
6
  "author": "Refirst 11",
@@ -22,12 +22,12 @@
22
22
  "dist/"
23
23
  ],
24
24
  "dependencies": {
25
- "@plumeria/utils": "^10.0.3"
25
+ "@plumeria/utils": "^10.0.4"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@swc/core": "1.15.18",
29
29
  "vite": "^7.1.1",
30
- "zss-engine": "2.2.5"
30
+ "zss-engine": "2.2.6"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public",