@estjs/template 0.0.16-beta.4 → 0.0.16-beta.6
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/chunk-IA4OZ7NW.esm.js +1 -0
- package/dist/{chunk-JT6RSDKI.dev.esm.js → chunk-OEKE4VTS.dev.esm.js} +8 -4
- package/dist/chunk-OEKE4VTS.dev.esm.js.map +1 -0
- package/dist/{internal-DSKAj-zW.d.cts → internal-DR5pJGCO.d.cts} +8 -1
- package/dist/{internal-DSKAj-zW.d.ts → internal-DR5pJGCO.d.ts} +8 -1
- package/dist/internal.cjs.js +1 -2
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.dev.cjs.js +5 -0
- package/dist/internal.dev.cjs.js.map +1 -1
- package/dist/internal.dev.esm.js +1 -1
- package/dist/internal.esm.js +1 -2
- package/dist/template.cjs.js +2 -3
- package/dist/template.d.cts +3 -3
- package/dist/template.d.ts +3 -3
- package/dist/template.dev.cjs.js +15 -3
- package/dist/template.dev.cjs.js.map +1 -1
- package/dist/template.dev.esm.js +17 -5
- package/dist/template.dev.esm.js.map +1 -1
- package/dist/template.esm.js +2 -3
- package/package.json +6 -6
- package/dist/chunk-JT6RSDKI.dev.esm.js.map +0 -1
- package/dist/chunk-WWGSC3TY.esm.js +0 -2
- package/dist/chunk-WWGSC3TY.esm.js.map +0 -1
- package/dist/internal.cjs.js.map +0 -1
- package/dist/internal.esm.js.map +0 -1
- package/dist/template.cjs.js.map +0 -1
- package/dist/template.esm.js.map +0 -1
package/dist/template.dev.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getActiveScope, runWithScope, onCleanup, __objRest, createScope, disposeScope, __async } from './chunk-
|
|
2
|
-
import { normalizeClassName, isObject, warn, isSpecialBooleanAttr, isBooleanAttr, includeBooleanAttr, isSymbol, isString, isArray, camelCase, capitalize, isBrowser, error, isPromise, isFunction, isOn, coerceArray } from '@estjs/shared';
|
|
1
|
+
import { getActiveScope, runWithScope, onCleanup, __objRest, createScope, disposeScope, __async } from './chunk-OEKE4VTS.dev.esm.js';
|
|
2
|
+
import { normalizeClassName, isObject, warn, isSpecialBooleanAttr, isBooleanAttr, includeBooleanAttr, isSymbol, isString, isArray, kebabCase, camelCase, capitalize, isBrowser, error, isPromise, isFunction, isOn, coerceArray } from '@estjs/shared';
|
|
3
3
|
import { effect, shallowReactive, isSignal, isComputed, signal } from '@estjs/signals';
|
|
4
4
|
|
|
5
5
|
// src/constants.ts
|
|
@@ -196,17 +196,29 @@ function setStyle(style, name, val) {
|
|
|
196
196
|
if (val == null || val === "") {
|
|
197
197
|
val = "";
|
|
198
198
|
}
|
|
199
|
+
const priority = isString(val) && importantRE.test(val) ? "important" : "";
|
|
200
|
+
if (priority) {
|
|
201
|
+
val = val.replace(importantRE, "");
|
|
202
|
+
}
|
|
199
203
|
if (name.startsWith("--")) {
|
|
200
|
-
|
|
204
|
+
if (priority) {
|
|
205
|
+
style.setProperty(name, val, priority);
|
|
206
|
+
} else {
|
|
207
|
+
style.setProperty(name, val);
|
|
208
|
+
}
|
|
201
209
|
return;
|
|
202
210
|
}
|
|
203
211
|
const prefixed = autoPrefix(style, name);
|
|
204
|
-
if (
|
|
205
|
-
style.setProperty(
|
|
212
|
+
if (priority) {
|
|
213
|
+
style.setProperty(toCssPropertyName(prefixed), val, priority);
|
|
206
214
|
} else {
|
|
207
215
|
style[prefixed] = val;
|
|
208
216
|
}
|
|
209
217
|
}
|
|
218
|
+
function toCssPropertyName(name) {
|
|
219
|
+
const hyphenated = kebabCase(name);
|
|
220
|
+
return name.startsWith("Webkit") || name.startsWith("Moz") || name.startsWith("ms") ? `-${hyphenated}` : hyphenated;
|
|
221
|
+
}
|
|
210
222
|
function autoPrefix(style, rawName) {
|
|
211
223
|
const cached = prefixCache[rawName];
|
|
212
224
|
if (cached) {
|