ilha 0.10.0 → 0.10.1
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 +5 -4
- package/dist/jsx-runtime.js +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, effect, endBatch, setActiveSub, signal, startBatch } from "alien-signals";
|
|
2
2
|
|
|
3
3
|
//#region src/index.ts
|
|
4
|
-
const MAX_SNAPSHOT_CHARS =
|
|
4
|
+
const MAX_SNAPSHOT_CHARS = 262144;
|
|
5
5
|
const MAX_SNAPSHOT_DEPTH = 32;
|
|
6
6
|
function exceedsMaxDepth(value, depth) {
|
|
7
7
|
if (depth > MAX_SNAPSHOT_DEPTH) return true;
|
|
@@ -1673,7 +1673,8 @@ var IlhaBuilder = class IlhaBuilder {
|
|
|
1673
1673
|
function buildSignalState(input, snapshot) {
|
|
1674
1674
|
const state = {};
|
|
1675
1675
|
for (const entry of states) {
|
|
1676
|
-
const
|
|
1676
|
+
const initial = snapshot && entry.key in snapshot ? snapshot[entry.key] : typeof entry.init === "function" ? entry.init(input) : entry.init;
|
|
1677
|
+
const s = signal(initial);
|
|
1677
1678
|
const accessor = markSignalAccessor((...args) => {
|
|
1678
1679
|
if (args.length === 0) return s();
|
|
1679
1680
|
s(resolveSignalSetter(() => s(), args[0]));
|
|
@@ -2090,9 +2091,9 @@ var IlhaBuilder = class IlhaBuilder {
|
|
|
2090
2091
|
entry.el.remove();
|
|
2091
2092
|
}
|
|
2092
2093
|
function slotBelongsToHost(candidate) {
|
|
2093
|
-
let el = candidate;
|
|
2094
|
+
let el = candidate.parentElement;
|
|
2094
2095
|
while (el && el !== host) {
|
|
2095
|
-
if (el.hasAttribute("data-ilha")) return false;
|
|
2096
|
+
if (el.hasAttribute(SLOT_ATTR) || el.hasAttribute("data-ilha")) return false;
|
|
2096
2097
|
el = el.parentElement;
|
|
2097
2098
|
}
|
|
2098
2099
|
return el === host;
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -243,7 +243,8 @@ function jsx(type, props, maybeKey, ...restChildren) {
|
|
|
243
243
|
const jsxs = jsx;
|
|
244
244
|
function Fragment(props, ...children) {
|
|
245
245
|
const normalizedChildren = normalizeJsxChildren(props, children);
|
|
246
|
-
|
|
246
|
+
const chunks = ["", ...normalizedChildren.map(() => "")];
|
|
247
|
+
return html(chunks, ...normalizedChildren);
|
|
247
248
|
}
|
|
248
249
|
function jsxDEV(type, props, maybeKey, _source, _self) {
|
|
249
250
|
return jsx(type, props, maybeKey);
|