olova 2.0.63 → 2.0.67
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/compiler.js +8 -2
- package/dist/compiler.js.map +1 -1
- package/dist/core.js +7 -2
- package/dist/core.js.map +1 -1
- package/dist/index.js +23 -12
- package/dist/index.js.map +1 -1
- package/dist/runtime.js +7 -2
- package/dist/runtime.js.map +1 -1
- package/dist/vite.js +23 -12
- package/dist/vite.js.map +1 -1
- package/package.json +1 -1
package/dist/compiler.js
CHANGED
|
@@ -403,9 +403,10 @@ function parseHTML(html) {
|
|
|
403
403
|
const attrsStr = rawTag.slice(tagNameEnd).replace(/\/\s*$/, "").trim();
|
|
404
404
|
const selfClose = /\/\s*$/.test(rawTag);
|
|
405
405
|
const attrs = parseAttributes2(attrsStr);
|
|
406
|
-
const
|
|
406
|
+
const isNativeVoidTag = tag === tag.toLowerCase() && /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/.test(
|
|
407
407
|
tag
|
|
408
408
|
);
|
|
409
|
+
const isSelfClosing = !!selfClose || isNativeVoidTag;
|
|
409
410
|
const element = {
|
|
410
411
|
type: "element",
|
|
411
412
|
tag,
|
|
@@ -1922,7 +1923,12 @@ ${exportHead}
|
|
|
1922
1923
|
__olovaJsxHandlers.set(id, handler);
|
|
1923
1924
|
return ' data-o-jsx-' + eventName + '="' + id + '" on' + eventName + '="window.__olovaDispatchJsxEvent(event, this)"';
|
|
1924
1925
|
};
|
|
1925
|
-
const __olovaToString = (value) =>
|
|
1926
|
+
const __olovaToString = (value) =>
|
|
1927
|
+
Array.isArray(value)
|
|
1928
|
+
? value.map(__olovaToString).join('')
|
|
1929
|
+
: value == null || value === false || value === true
|
|
1930
|
+
? ''
|
|
1931
|
+
: String(value);
|
|
1926
1932
|
const __olovaDangerouslySetHtml = (value) => ({ __dangerousHtml: true, value: __olovaToString(value) });
|
|
1927
1933
|
const __olovaNormalizeClassValue = (value) => {
|
|
1928
1934
|
if (value == null || value === false) {
|