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 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 = 256 * 1024;
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 s = signal(snapshot && entry.key in snapshot ? snapshot[entry.key] : typeof entry.init === "function" ? entry.init(input) : entry.init);
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;
@@ -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
- return html(["", ...normalizedChildren.map(() => "")], ...normalizedChildren);
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ilha",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "A tiny, framework-free island architecture library",
5
5
  "keywords": [
6
6
  "framework-free",