ilha 0.9.2 → 0.9.3
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.
|
@@ -38,6 +38,14 @@ declare const ISLAND_CALL: unique symbol;
|
|
|
38
38
|
* retain a handle to push updated props into it on subsequent parent
|
|
39
39
|
* re-renders. Not part of the public surface. */
|
|
40
40
|
declare const ISLAND_MOUNT_INTERNAL: unique symbol;
|
|
41
|
+
/** @internal Live mount handles keyed by host element. Lets @ilha/router adopt
|
|
42
|
+
* islands hydrated by `ilha.mount()` (whose handles it never saw) and push new
|
|
43
|
+
* loader props into them in place instead of remounting. Entries are removed
|
|
44
|
+
* on unmount. Not part of the public surface. */
|
|
45
|
+
declare const ISLAND_MOUNT_HANDLES: WeakMap<Element, {
|
|
46
|
+
unmount: () => void | Promise<void>;
|
|
47
|
+
updateProps: (props?: Record<string, unknown>) => void;
|
|
48
|
+
}>;
|
|
41
49
|
interface RawHtml {
|
|
42
50
|
[RAW]: true;
|
|
43
51
|
value: string;
|
|
@@ -350,4 +358,4 @@ declare const context: typeof ilhaContextFn & {
|
|
|
350
358
|
clear(): void;
|
|
351
359
|
};
|
|
352
360
|
//#endregion
|
|
353
|
-
export {
|
|
361
|
+
export { ilhaSignal as A, context as C, ilha as D, html as E, onUncaughtError as M, raw as N, ilhaComputed as O, untrack as P, batch as S, from as T, MountResult as _, ErrorSource as a, SignalAccessor as b, HandlerContextFor as c, ISLAND_MOUNT_INTERNAL as d, Island as f, MountOptions as g, KeyedIsland as h, ErrorContext as i, mount as j, ilhaEffect as k, HydratableOptions as l, IslandState as m, DerivedValue as n, ExternalSignal as o, IslandDerived as p, EffectContext as r, HandlerContext as s, DerivedAccessor as t, ISLAND_MOUNT_HANDLES as u, OnMountContext as v, css as w, __ilhaJsxSlot as x, RawHtml as y };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { DerivedAccessor, DerivedValue, EffectContext, ErrorContext, ErrorSource, ExternalSignal, HandlerContext, HandlerContextFor, HydratableOptions, ISLAND_MOUNT_INTERNAL, Island, IslandDerived, IslandState, KeyedIsland, MountOptions, MountResult, OnMountContext, RawHtml, SignalAccessor, __ilhaJsxSlot, batch, ilhaComputed as computed, context, css, ilha as default, ilhaEffect as effect, from, html, ilhaSignal, ilhaSignal as signal, mount, onUncaughtError, raw, untrack };
|
|
1
|
+
import { A as ilhaSignal, C as context, D as ilha, E as html, M as onUncaughtError, N as raw, O as ilhaComputed, P as untrack, S as batch, T as from, _ as MountResult, a as ErrorSource, b as SignalAccessor, c as HandlerContextFor, d as ISLAND_MOUNT_INTERNAL, f as Island, g as MountOptions, h as KeyedIsland, i as ErrorContext, j as mount, k as ilhaEffect, l as HydratableOptions, m as IslandState, n as DerivedValue, o as ExternalSignal, p as IslandDerived, r as EffectContext, s as HandlerContext, t as DerivedAccessor, u as ISLAND_MOUNT_HANDLES, v as OnMountContext, w as css, x as __ilhaJsxSlot, y as RawHtml } from "./index-Dx_q_SGo.js";
|
|
2
|
+
export { DerivedAccessor, DerivedValue, EffectContext, ErrorContext, ErrorSource, ExternalSignal, HandlerContext, HandlerContextFor, HydratableOptions, ISLAND_MOUNT_HANDLES, ISLAND_MOUNT_INTERNAL, Island, IslandDerived, IslandState, KeyedIsland, MountOptions, MountResult, OnMountContext, RawHtml, SignalAccessor, __ilhaJsxSlot, batch, ilhaComputed as computed, context, css, ilha as default, ilhaEffect as effect, from, html, ilhaSignal, ilhaSignal as signal, mount, onUncaughtError, raw, untrack };
|
package/dist/index.js
CHANGED
|
@@ -277,6 +277,11 @@ const ISLAND_CALL = Symbol.for("ilha.islandCall");
|
|
|
277
277
|
* re-renders. Not part of the public surface. */
|
|
278
278
|
const ISLAND_MOUNT_INTERNAL = Symbol.for("ilha.islandMountInternal");
|
|
279
279
|
const ISLAND_SLOT_TAG = Symbol.for("ilha.islandSlotTag");
|
|
280
|
+
/** @internal Live mount handles keyed by host element. Lets @ilha/router adopt
|
|
281
|
+
* islands hydrated by `ilha.mount()` (whose handles it never saw) and push new
|
|
282
|
+
* loader props into them in place instead of remounting. Entries are removed
|
|
283
|
+
* on unmount. Not part of the public surface. */
|
|
284
|
+
const ISLAND_MOUNT_HANDLES = /* @__PURE__ */ new WeakMap();
|
|
280
285
|
const SLOT_ATTR = "data-ilha-slot";
|
|
281
286
|
const PROPS_ATTR = "data-ilha-props";
|
|
282
287
|
const STATE_ATTR = "data-ilha-state";
|
|
@@ -1823,6 +1828,7 @@ var IlhaBuilder = class IlhaBuilder {
|
|
|
1823
1828
|
const unmount = () => {
|
|
1824
1829
|
if (tornDown) return;
|
|
1825
1830
|
tornDown = true;
|
|
1831
|
+
ISLAND_MOUNT_HANDLES.delete(host);
|
|
1826
1832
|
stopRender();
|
|
1827
1833
|
detachListeners();
|
|
1828
1834
|
const pending = [];
|
|
@@ -1851,10 +1857,12 @@ var IlhaBuilder = class IlhaBuilder {
|
|
|
1851
1857
|
if (shallowEqualInput(inputSignal(), next)) return;
|
|
1852
1858
|
inputSignal(next);
|
|
1853
1859
|
};
|
|
1854
|
-
|
|
1860
|
+
const handle = {
|
|
1855
1861
|
unmount,
|
|
1856
1862
|
updateProps
|
|
1857
1863
|
};
|
|
1864
|
+
ISLAND_MOUNT_HANDLES.set(host, handle);
|
|
1865
|
+
return handle;
|
|
1858
1866
|
}
|
|
1859
1867
|
/**
|
|
1860
1868
|
* Dual-mode island invocation:
|
|
@@ -2130,4 +2138,4 @@ const from = ilhaFrom;
|
|
|
2130
2138
|
const context = ilhaContext;
|
|
2131
2139
|
|
|
2132
2140
|
//#endregion
|
|
2133
|
-
export { ISLAND_MOUNT_INTERNAL, __ilhaJsxSlot, batch, ilhaComputed as computed, context, css, ilha as default, ilhaEffect as effect, from, html, ilhaSignal, ilhaSignal as signal, mount, onUncaughtError, raw, untrack };
|
|
2141
|
+
export { ISLAND_MOUNT_HANDLES, ISLAND_MOUNT_INTERNAL, __ilhaJsxSlot, batch, ilhaComputed as computed, context, css, ilha as default, ilhaEffect as effect, from, html, ilhaSignal, ilhaSignal as signal, mount, onUncaughtError, raw, untrack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as JSX, r as jsxDEV, t as Fragment } from "./jsx-runtime-
|
|
1
|
+
import { a as JSX, r as jsxDEV, t as Fragment } from "./jsx-runtime-DysRyz9R.js";
|
|
2
2
|
export { Fragment, type JSX, jsxDEV };
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as JSX, i as jsxs, n as jsx, r as jsxDEV, t as Fragment } from "./jsx-runtime-
|
|
1
|
+
import { a as JSX, i as jsxs, n as jsx, r as jsxDEV, t as Fragment } from "./jsx-runtime-DysRyz9R.js";
|
|
2
2
|
export { Fragment, type JSX, jsx, jsxDEV, jsxs };
|