🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@solidjs/web

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solidjs/web - npm Package Compare versions

Comparing version
2.0.0-beta.13
to
2.0.0-beta.14
+213
-69
dist/dev.cjs

@@ -34,2 +34,3 @@ 'use strict';

const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
const $$SLOT = /*#__PURE__*/Symbol("slot");
const DelegatedEvents = /*#__PURE__*/new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);

@@ -68,3 +69,3 @@ const SVGElements = /*#__PURE__*/new Set([

function reconcileArrays(parentNode, a, b) {
function reconcileArrays(parentNode, a, b, marker) {
let bLength = b.length,

@@ -75,4 +76,8 @@ aEnd = a.length,

bStart = 0,
after = a[aEnd - 1].nextSibling,
map = null;
tail = a[aEnd - 1],
tailTag = tail[$$SLOT],
after = tail.parentNode === parentNode && (!tailTag || tailTag === marker) ? tail.nextSibling : marker || null,
map = null,
anchor,
anchorTag;
while (aStart < aEnd || bStart < bEnd) {

@@ -89,16 +94,39 @@ if (a[aStart] === b[bStart]) {

if (aEnd === aStart) {
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
let node;
if (bEnd < bLength) {
if (bStart) {
const prev = b[bStart - 1];
const prevTag = prev[$$SLOT];
node = prev.parentNode === parentNode && (!prevTag || prevTag === marker) ? prev.nextSibling : after;
} else node = b[bEnd - bStart];
} else node = after;
while (bStart < bEnd) {
const n = b[bStart++];
parentNode.insertBefore(n, node);
if (marker) n[$$SLOT] = marker;
}
} else if (bEnd === bStart) {
while (aStart < aEnd) {
if (!map || !map.has(a[aStart])) a[aStart].remove();
aStart++;
const n = a[aStart++];
if (!map || !map.has(n)) {
const tag = n[$$SLOT];
if (n.parentNode === parentNode && (!tag || tag === marker)) n.remove();
}
}
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
const anchor = a[aStart];
do {
parentNode.insertBefore(a[--aEnd], anchor);
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
} else if ((anchor = a[aStart]) === b[bEnd - 1] && b[bStart] === a[aEnd - 1] && anchor.parentNode === parentNode && (!(anchorTag = anchor[$$SLOT]) || anchorTag === marker)) {
if (marker) {
do {
const n = a[--aEnd];
parentNode.insertBefore(n, anchor);
n[$$SLOT] = marker;
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
} else {
do {
parentNode.insertBefore(a[--aEnd], anchor);
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
}
} else {

@@ -121,7 +149,27 @@ if (!map) {

if (sequence > index - bStart) {
const node = a[aStart];
while (bStart < index) parentNode.insertBefore(b[bStart++], node);
} else parentNode.replaceChild(b[bStart++], a[aStart++]);
const head = a[aStart];
const headTag = head[$$SLOT];
const node = head.parentNode === parentNode && (!headTag || headTag === marker) ? head : after;
while (bStart < index) {
const n = b[bStart++];
parentNode.insertBefore(n, node);
if (marker) n[$$SLOT] = marker;
}
} else {
const oldNode = a[aStart++];
const newNode = b[bStart++];
const oldTag = oldNode[$$SLOT];
if (oldNode.parentNode === parentNode && (!oldTag || oldTag === marker)) {
parentNode.replaceChild(newNode, oldNode);
} else {
parentNode.insertBefore(newNode, after);
}
if (marker) newNode[$$SLOT] = marker;
}
} else aStart++;
} else a[aStart++].remove();
} else {
const n = a[aStart++];
const nTag = n[$$SLOT];
if (n.parentNode === parentNode && (!nTag || nTag === marker)) n.remove();
}
}

@@ -131,4 +179,6 @@ }

const $$EVENTS = "_$DX_DELEGATE";
const $$EVENT_OWNER = "_$DX_EVENT_OWNER";
const INNER_OWNED = {};
const delegatedEvents = new Set();
const delegatedContainers = new Map();
function render$1(code, element, init, options = {}) {

@@ -139,16 +189,24 @@ if (!element) {

let disposer;
solidJs.createRoot(dispose => {
disposer = dispose;
if (element === document) {
const tree = code();
effect(() => solidJs.flatten(tree), () => {});
} else {
const tree = code();
insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
}
}, {
id: options.renderId
});
registerDelegatedRoot(element);
try {
solidJs.createRoot(dispose => {
disposer = dispose;
if (element === document) {
const tree = code();
effect(() => solidJs.flatten(tree), () => {});
} else {
const tree = code();
insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
}
}, {
id: options.renderId
});
} catch (err) {
if (disposer) disposer();
unregisterDelegatedRoot(element);
throw err;
}
return () => {
disposer();
unregisterDelegatedRoot(element);
element.textContent = "";

@@ -169,18 +227,64 @@ };

}
function delegateEvents(eventNames, document = window.document) {
const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());
function delegateEvents(eventNames) {
for (let i = 0, l = eventNames.length; i < l; i++) {
const name = eventNames[i];
if (!e.has(name)) {
e.add(name);
document.addEventListener(name, eventHandler);
if (!delegatedEvents.has(name)) {
delegatedEvents.add(name);
delegatedContainers.forEach((state, container) => attachDelegatedEvent(name, container, state));
}
}
}
function clearDelegatedEvents(document = window.document) {
if (document[$$EVENTS]) {
for (let name of document[$$EVENTS].keys()) document.removeEventListener(name, eventHandler);
delete document[$$EVENTS];
function registerDelegatedRoot(root) {
const state = registerDelegatedContainer(root, root);
if (state) state.roots = (state.roots || 0) + 1;
}
function unregisterDelegatedRoot(root) {
const state = delegatedContainers.get(root);
if (state) state.roots > 1 ? state.roots-- : delete state.roots;
unregisterDelegatedContainer(root, root);
}
function registerDelegatedContainer(container, owner = container) {
if (!container || !owner) return;
let state = delegatedContainers.get(container);
if (!state) delegatedContainers.set(container, state = {
owners: new Map(),
handlers: new Map()
});
state.owners.set(owner, (state.owners.get(owner) || 0) + 1);
delegatedEvents.forEach(name => attachDelegatedEvent(name, container, state));
return state;
}
function unregisterDelegatedContainer(container, owner = container) {
const state = delegatedContainers.get(container);
if (!state) return;
const count = state.owners.get(owner);
if (count > 1) state.owners.set(owner, count - 1);else state.owners.delete(owner);
if (state.owners.size) return;
state.handlers.forEach((handler, name) => container.removeEventListener(name, handler));
delegatedContainers.delete(container);
}
function attachDelegatedEvent(name, container, state) {
if (state.handlers.has(name)) return;
const handler = e => eventHandler(e, container, state);
state.handlers.set(name, handler);
container.addEventListener(name, handler);
}
function getDelegatedRoot(node) {
while (node) {
if (delegatedContainers.get(node)?.roots) return node;
node = node._$host || node.parentNode || node.host;
}
}
function findOwner(target, state) {
let node = target;
let distance = 0;
while (node) {
if (state.owners.has(node)) return {
owner: node,
distance
};
distance++;
node = node._$host || node.parentNode || node.host;
}
}
function setProperty(node, name, value) {

@@ -228,3 +332,3 @@ if (isHydrating(node)) return;

}
function addEventListener(node, name, handler, delegate) {
function addEvent(node, name, handler, delegate) {
if (delegate) {

@@ -531,3 +635,13 @@ if (Array.isArray(handler)) {

events.shift();
eventHandler(e);
let match;
for (const [container, state] of delegatedContainers) {
if (!state.handlers.has(e.type)) continue;
const entry = findOwner(e.target, state);
if (entry && (!match || entry.distance < match.distance)) match = {
container,
state,
distance: entry.distance
};
}
if (match) eventHandler(e, match.container, match.state);
}

@@ -587,3 +701,3 @@ if (solidJs.sharedConfig.done) {

if (delegate || value) {
addEventListener(node, name, value, delegate);
addEvent(node, name, value, delegate);
delegate && delegateEvents([name]);

@@ -600,10 +714,14 @@ }

}
function eventHandler(e) {
function eventHandler(e, container, state) {
if (solidJs.sharedConfig.registry && solidJs.sharedConfig.events) {
if (solidJs.sharedConfig.events.find(([el, ev]) => ev === e)) return;
}
if (e[$$EVENT_OWNER]) return;
const owner = state && (state.owners.size === 1 && state.owners.has(container) ? container : findOwner(e.target, state)?.owner);
if (state && !owner) return;
e[$$EVENT_OWNER] = owner || true;
let node = e.target;
const key = `$$${e.type}`;
const oriTarget = e.target;
const oriCurrentTarget = e.currentTarget;
const boundary = owner || container || e.currentTarget;
const retarget = value => Object.defineProperty(e, "target", {

@@ -624,3 +742,6 @@ configurable: true,

const walkUpTree = () => {
while (handleNode() && (node = node._$host || node.parentNode || node.host));
while (handleNode()) {
if (node === boundary || node.parentNode === boundary) break;
node = node._$host || node.parentNode || node.host;
}
};

@@ -630,3 +751,3 @@ Object.defineProperty(e, "currentTarget", {

get() {
return node || document;
return node || boundary || document;
}

@@ -636,15 +757,17 @@ });

const path = e.composedPath();
retarget(path[0]);
for (let i = 0; i < path.length - 2; i++) {
node = path[i];
if (!handleNode()) break;
if (node._$host) {
node = node._$host;
walkUpTree();
break;
if (path.length) {
retarget(path[0]);
for (let i = 0; i < path.length; i++) {
node = path[i];
if (!handleNode()) break;
if (node._$host) {
node = node._$host;
walkUpTree();
break;
}
if (node === boundary || node.parentNode === boundary) {
break;
}
}
if (node.parentNode === oriCurrentTarget) {
break;
}
}
} else walkUpTree();
}

@@ -669,5 +792,10 @@ else walkUpTree();

cleanChildren(parent, current, multi ? marker : null, value);
} else if (current === undefined || !parent.firstChild) {
} else if (current && current.nodeType) {
current.parentNode === parent ? parent.replaceChild(value, current) : parent.appendChild(value);
} else if (current && parent.firstChild) {
parent.replaceChild(value, parent.firstChild);
} else {
parent.appendChild(value);
} else parent.replaceChild(value, parent.firstChild);
}
if (marker) value[$$SLOT] = marker;
} else if (Array.isArray(value)) {

@@ -680,3 +808,3 @@ const currentArray = current && Array.isArray(current);

appendNodes(parent, value, marker);
} else reconcileArrays(parent, current, value);
} else reconcileArrays(parent, current, value, marker);
} else {

@@ -706,3 +834,7 @@ current && cleanChildren(parent);

function appendNodes(parent, array, marker = null) {
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
for (let i = 0, len = array.length; i < len; i++) {
const n = array[i];
parent.insertBefore(n, marker);
if (marker) n[$$SLOT] = marker;
}
}

@@ -716,7 +848,9 @@ function cleanChildren(parent, current, marker, replacement) {

if (replacement !== el) {
const isParent = el.parentNode === parent;
if (replacement && !inserted && !i) isParent ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else isParent && el.remove();
const tag = el[$$SLOT];
const owns = el.parentNode === parent && (!tag || tag === marker);
if (replacement && !inserted && !i) owns ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else if (owns) el.remove();
} else inserted = true;
}
} else if (replacement) parent.insertBefore(replacement, marker);
if (replacement && marker) replacement[$$SLOT] = marker;
}

@@ -785,4 +919,4 @@ function gatherHydratable(element, root) {

endMarker = document.createTextNode(""),
mount = () => createElementProxy(props.mount || document.body, treeMarker);
let content = solidJs.createMemo(() => [startMarker, props.children]);
mount = () => createElementProxy(props.mount || document.body, treeMarker),
content = solidJs.createMemo(() => [startMarker, props.children]);
solidJs.createRenderEffect(() => [mount(), content()], ([m, c]) => {

@@ -800,2 +934,8 @@ m.appendChild(endMarker);

});
solidJs.createEffect(mount, m => {
const ownerRoot = getDelegatedRoot(treeMarker);
if (!ownerRoot || ownerRoot.contains(m)) return;
registerDelegatedContainer(m, ownerRoot);
return () => unregisterDelegatedContainer(m, ownerRoot);
});
return treeMarker;

@@ -917,7 +1057,6 @@ }

exports.VoidElements = VoidElements;
exports.addEventListener = addEventListener;
exports.addEvent = addEvent;
exports.applyRef = applyRef;
exports.assign = assign;
exports.className = className;
exports.clearDelegatedEvents = clearDelegatedEvents;
exports.delegateEvents = delegateEvents;

@@ -930,2 +1069,3 @@ exports.dynamic = dynamic;

exports.getAssets = voidFn;
exports.getDelegatedRoot = getDelegatedRoot;
exports.getFirstChild = getFirstChild;

@@ -945,2 +1085,4 @@ exports.getHydrationKey = getHydrationKey;

exports.ref = ref;
exports.registerDelegatedContainer = registerDelegatedContainer;
exports.registerDelegatedRoot = registerDelegatedRoot;
exports.render = render;

@@ -965,2 +1107,4 @@ exports.renderToStream = renderToStream;

exports.template = template;
exports.unregisterDelegatedContainer = unregisterDelegatedContainer;
exports.unregisterDelegatedRoot = unregisterDelegatedRoot;
exports.useAssets = voidFn;

@@ -1,2 +0,2 @@

import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, merge, createComponent, omit, $DEVCOMP, enableHydration, enforceLoadingBoundary, flush } from 'solid-js';
import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, merge, createComponent, omit, createEffect, $DEVCOMP, enableHydration, enforceLoadingBoundary, flush } from 'solid-js';
export { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent, getOwner, untrack } from 'solid-js';

@@ -33,2 +33,3 @@

const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
const $$SLOT = /*#__PURE__*/Symbol("slot");
const DelegatedEvents = /*#__PURE__*/new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);

@@ -67,3 +68,3 @@ const SVGElements = /*#__PURE__*/new Set([

function reconcileArrays(parentNode, a, b) {
function reconcileArrays(parentNode, a, b, marker) {
let bLength = b.length,

@@ -74,4 +75,8 @@ aEnd = a.length,

bStart = 0,
after = a[aEnd - 1].nextSibling,
map = null;
tail = a[aEnd - 1],
tailTag = tail[$$SLOT],
after = tail.parentNode === parentNode && (!tailTag || tailTag === marker) ? tail.nextSibling : marker || null,
map = null,
anchor,
anchorTag;
while (aStart < aEnd || bStart < bEnd) {

@@ -88,16 +93,39 @@ if (a[aStart] === b[bStart]) {

if (aEnd === aStart) {
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
let node;
if (bEnd < bLength) {
if (bStart) {
const prev = b[bStart - 1];
const prevTag = prev[$$SLOT];
node = prev.parentNode === parentNode && (!prevTag || prevTag === marker) ? prev.nextSibling : after;
} else node = b[bEnd - bStart];
} else node = after;
while (bStart < bEnd) {
const n = b[bStart++];
parentNode.insertBefore(n, node);
if (marker) n[$$SLOT] = marker;
}
} else if (bEnd === bStart) {
while (aStart < aEnd) {
if (!map || !map.has(a[aStart])) a[aStart].remove();
aStart++;
const n = a[aStart++];
if (!map || !map.has(n)) {
const tag = n[$$SLOT];
if (n.parentNode === parentNode && (!tag || tag === marker)) n.remove();
}
}
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
const anchor = a[aStart];
do {
parentNode.insertBefore(a[--aEnd], anchor);
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
} else if ((anchor = a[aStart]) === b[bEnd - 1] && b[bStart] === a[aEnd - 1] && anchor.parentNode === parentNode && (!(anchorTag = anchor[$$SLOT]) || anchorTag === marker)) {
if (marker) {
do {
const n = a[--aEnd];
parentNode.insertBefore(n, anchor);
n[$$SLOT] = marker;
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
} else {
do {
parentNode.insertBefore(a[--aEnd], anchor);
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
}
} else {

@@ -120,7 +148,27 @@ if (!map) {

if (sequence > index - bStart) {
const node = a[aStart];
while (bStart < index) parentNode.insertBefore(b[bStart++], node);
} else parentNode.replaceChild(b[bStart++], a[aStart++]);
const head = a[aStart];
const headTag = head[$$SLOT];
const node = head.parentNode === parentNode && (!headTag || headTag === marker) ? head : after;
while (bStart < index) {
const n = b[bStart++];
parentNode.insertBefore(n, node);
if (marker) n[$$SLOT] = marker;
}
} else {
const oldNode = a[aStart++];
const newNode = b[bStart++];
const oldTag = oldNode[$$SLOT];
if (oldNode.parentNode === parentNode && (!oldTag || oldTag === marker)) {
parentNode.replaceChild(newNode, oldNode);
} else {
parentNode.insertBefore(newNode, after);
}
if (marker) newNode[$$SLOT] = marker;
}
} else aStart++;
} else a[aStart++].remove();
} else {
const n = a[aStart++];
const nTag = n[$$SLOT];
if (n.parentNode === parentNode && (!nTag || nTag === marker)) n.remove();
}
}

@@ -130,4 +178,6 @@ }

const $$EVENTS = "_$DX_DELEGATE";
const $$EVENT_OWNER = "_$DX_EVENT_OWNER";
const INNER_OWNED = {};
const delegatedEvents = new Set();
const delegatedContainers = new Map();
function render$1(code, element, init, options = {}) {

@@ -138,16 +188,24 @@ if (!element) {

let disposer;
createRoot(dispose => {
disposer = dispose;
if (element === document) {
const tree = code();
effect(() => flatten(tree), () => {});
} else {
const tree = code();
insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
}
}, {
id: options.renderId
});
registerDelegatedRoot(element);
try {
createRoot(dispose => {
disposer = dispose;
if (element === document) {
const tree = code();
effect(() => flatten(tree), () => {});
} else {
const tree = code();
insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
}
}, {
id: options.renderId
});
} catch (err) {
if (disposer) disposer();
unregisterDelegatedRoot(element);
throw err;
}
return () => {
disposer();
unregisterDelegatedRoot(element);
element.textContent = "";

@@ -168,18 +226,64 @@ };

}
function delegateEvents(eventNames, document = window.document) {
const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());
function delegateEvents(eventNames) {
for (let i = 0, l = eventNames.length; i < l; i++) {
const name = eventNames[i];
if (!e.has(name)) {
e.add(name);
document.addEventListener(name, eventHandler);
if (!delegatedEvents.has(name)) {
delegatedEvents.add(name);
delegatedContainers.forEach((state, container) => attachDelegatedEvent(name, container, state));
}
}
}
function clearDelegatedEvents(document = window.document) {
if (document[$$EVENTS]) {
for (let name of document[$$EVENTS].keys()) document.removeEventListener(name, eventHandler);
delete document[$$EVENTS];
function registerDelegatedRoot(root) {
const state = registerDelegatedContainer(root, root);
if (state) state.roots = (state.roots || 0) + 1;
}
function unregisterDelegatedRoot(root) {
const state = delegatedContainers.get(root);
if (state) state.roots > 1 ? state.roots-- : delete state.roots;
unregisterDelegatedContainer(root, root);
}
function registerDelegatedContainer(container, owner = container) {
if (!container || !owner) return;
let state = delegatedContainers.get(container);
if (!state) delegatedContainers.set(container, state = {
owners: new Map(),
handlers: new Map()
});
state.owners.set(owner, (state.owners.get(owner) || 0) + 1);
delegatedEvents.forEach(name => attachDelegatedEvent(name, container, state));
return state;
}
function unregisterDelegatedContainer(container, owner = container) {
const state = delegatedContainers.get(container);
if (!state) return;
const count = state.owners.get(owner);
if (count > 1) state.owners.set(owner, count - 1);else state.owners.delete(owner);
if (state.owners.size) return;
state.handlers.forEach((handler, name) => container.removeEventListener(name, handler));
delegatedContainers.delete(container);
}
function attachDelegatedEvent(name, container, state) {
if (state.handlers.has(name)) return;
const handler = e => eventHandler(e, container, state);
state.handlers.set(name, handler);
container.addEventListener(name, handler);
}
function getDelegatedRoot(node) {
while (node) {
if (delegatedContainers.get(node)?.roots) return node;
node = node._$host || node.parentNode || node.host;
}
}
function findOwner(target, state) {
let node = target;
let distance = 0;
while (node) {
if (state.owners.has(node)) return {
owner: node,
distance
};
distance++;
node = node._$host || node.parentNode || node.host;
}
}
function setProperty(node, name, value) {

@@ -227,3 +331,3 @@ if (isHydrating(node)) return;

}
function addEventListener(node, name, handler, delegate) {
function addEvent(node, name, handler, delegate) {
if (delegate) {

@@ -530,3 +634,13 @@ if (Array.isArray(handler)) {

events.shift();
eventHandler(e);
let match;
for (const [container, state] of delegatedContainers) {
if (!state.handlers.has(e.type)) continue;
const entry = findOwner(e.target, state);
if (entry && (!match || entry.distance < match.distance)) match = {
container,
state,
distance: entry.distance
};
}
if (match) eventHandler(e, match.container, match.state);
}

@@ -586,3 +700,3 @@ if (sharedConfig.done) {

if (delegate || value) {
addEventListener(node, name, value, delegate);
addEvent(node, name, value, delegate);
delegate && delegateEvents([name]);

@@ -599,10 +713,14 @@ }

}
function eventHandler(e) {
function eventHandler(e, container, state) {
if (sharedConfig.registry && sharedConfig.events) {
if (sharedConfig.events.find(([el, ev]) => ev === e)) return;
}
if (e[$$EVENT_OWNER]) return;
const owner = state && (state.owners.size === 1 && state.owners.has(container) ? container : findOwner(e.target, state)?.owner);
if (state && !owner) return;
e[$$EVENT_OWNER] = owner || true;
let node = e.target;
const key = `$$${e.type}`;
const oriTarget = e.target;
const oriCurrentTarget = e.currentTarget;
const boundary = owner || container || e.currentTarget;
const retarget = value => Object.defineProperty(e, "target", {

@@ -623,3 +741,6 @@ configurable: true,

const walkUpTree = () => {
while (handleNode() && (node = node._$host || node.parentNode || node.host));
while (handleNode()) {
if (node === boundary || node.parentNode === boundary) break;
node = node._$host || node.parentNode || node.host;
}
};

@@ -629,3 +750,3 @@ Object.defineProperty(e, "currentTarget", {

get() {
return node || document;
return node || boundary || document;
}

@@ -635,15 +756,17 @@ });

const path = e.composedPath();
retarget(path[0]);
for (let i = 0; i < path.length - 2; i++) {
node = path[i];
if (!handleNode()) break;
if (node._$host) {
node = node._$host;
walkUpTree();
break;
if (path.length) {
retarget(path[0]);
for (let i = 0; i < path.length; i++) {
node = path[i];
if (!handleNode()) break;
if (node._$host) {
node = node._$host;
walkUpTree();
break;
}
if (node === boundary || node.parentNode === boundary) {
break;
}
}
if (node.parentNode === oriCurrentTarget) {
break;
}
}
} else walkUpTree();
}

@@ -668,5 +791,10 @@ else walkUpTree();

cleanChildren(parent, current, multi ? marker : null, value);
} else if (current === undefined || !parent.firstChild) {
} else if (current && current.nodeType) {
current.parentNode === parent ? parent.replaceChild(value, current) : parent.appendChild(value);
} else if (current && parent.firstChild) {
parent.replaceChild(value, parent.firstChild);
} else {
parent.appendChild(value);
} else parent.replaceChild(value, parent.firstChild);
}
if (marker) value[$$SLOT] = marker;
} else if (Array.isArray(value)) {

@@ -679,3 +807,3 @@ const currentArray = current && Array.isArray(current);

appendNodes(parent, value, marker);
} else reconcileArrays(parent, current, value);
} else reconcileArrays(parent, current, value, marker);
} else {

@@ -705,3 +833,7 @@ current && cleanChildren(parent);

function appendNodes(parent, array, marker = null) {
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
for (let i = 0, len = array.length; i < len; i++) {
const n = array[i];
parent.insertBefore(n, marker);
if (marker) n[$$SLOT] = marker;
}
}

@@ -715,7 +847,9 @@ function cleanChildren(parent, current, marker, replacement) {

if (replacement !== el) {
const isParent = el.parentNode === parent;
if (replacement && !inserted && !i) isParent ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else isParent && el.remove();
const tag = el[$$SLOT];
const owns = el.parentNode === parent && (!tag || tag === marker);
if (replacement && !inserted && !i) owns ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else if (owns) el.remove();
} else inserted = true;
}
} else if (replacement) parent.insertBefore(replacement, marker);
if (replacement && marker) replacement[$$SLOT] = marker;
}

@@ -784,4 +918,4 @@ function gatherHydratable(element, root) {

endMarker = document.createTextNode(""),
mount = () => createElementProxy(props.mount || document.body, treeMarker);
let content = createMemo(() => [startMarker, props.children]);
mount = () => createElementProxy(props.mount || document.body, treeMarker),
content = createMemo(() => [startMarker, props.children]);
createRenderEffect(() => [mount(), content()], ([m, c]) => {

@@ -799,2 +933,8 @@ m.appendChild(endMarker);

});
createEffect(mount, m => {
const ownerRoot = getDelegatedRoot(treeMarker);
if (!ownerRoot || ownerRoot.contains(m)) return;
registerDelegatedContainer(m, ownerRoot);
return () => unregisterDelegatedContainer(m, ownerRoot);
});
return treeMarker;

@@ -850,2 +990,2 @@ }

export { voidFn as Assets, ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, voidFn as HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, addEventListener, applyRef, assign, className, clearDelegatedEvents, delegateEvents, dynamic, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, mergeProps, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };
export { voidFn as Assets, ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, voidFn as HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, addEvent, applyRef, assign, className, delegateEvents, dynamic, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getDelegatedRoot, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, mergeProps, ref, registerDelegatedContainer, registerDelegatedRoot, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, unregisterDelegatedContainer, unregisterDelegatedRoot, voidFn as useAssets };

@@ -7,2 +7,30 @@ 'use strict';

const DOMWithState = {
INPUT: {
value: 1,
defaultValue: 2,
checked: 1,
defaultChecked: 2
},
SELECT: {
value: 1
},
OPTION: {
value: 1,
selected: 1,
defaultSelected: 2
},
TEXTAREA: {
value: 1,
defaultValue: 2
},
VIDEO: {
muted: 1,
defaultMuted: 2
},
AUDIO: {
muted: 1,
defaultMuted: 2
}
};
const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);

@@ -956,2 +984,5 @@ const DelegatedEvents = /*#__PURE__*/new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);

}
function Assets(props) {
useAssets(() => props.children);
}
function generateHydrationScript({

@@ -1233,4 +1264,6 @@ eventNames = ["click", "input"],

});
exports.Assets = Assets;
exports.ChildProperties = ChildProperties;
exports.DOMElements = DOMElements;
exports.DOMWithState = DOMWithState;
exports.DelegatedEvents = DelegatedEvents;

@@ -1246,3 +1279,3 @@ exports.Dynamic = Dynamic;

exports.VoidElements = VoidElements;
exports.addEventListener = notSup;
exports.addEvent = notSup;
exports.applyRef = applyRef;

@@ -1258,2 +1291,3 @@ exports.assign = notSup;

exports.getAssets = getAssets;
exports.getDelegatedRoot = notSup;
exports.getHydrationKey = getHydrationKey;

@@ -1270,2 +1304,5 @@ exports.getNextElement = notSup;

exports.mergeProps = mergeProps;
exports.ref = notSup;
exports.registerDelegatedContainer = notSup;
exports.registerDelegatedRoot = notSup;
exports.render = notSup;

@@ -1279,2 +1316,3 @@ exports.renderToStream = renderToStream;

exports.setProperty = notSup;
exports.setStyleProperty = notSup;
exports.spread = notSup;

@@ -1291,2 +1329,4 @@ exports.ssr = ssr;

exports.template = notSup;
exports.unregisterDelegatedContainer = notSup;
exports.unregisterDelegatedRoot = notSup;
exports.useAssets = useAssets;

@@ -6,2 +6,30 @@ import { createRenderEffect, createMemo, sharedConfig, createRoot, ssrHandleError, getOwner, runWithOwner, createComponent, omit, getNextChildId, createOwner } from 'solid-js';

const DOMWithState = {
INPUT: {
value: 1,
defaultValue: 2,
checked: 1,
defaultChecked: 2
},
SELECT: {
value: 1
},
OPTION: {
value: 1,
selected: 1,
defaultSelected: 2
},
TEXTAREA: {
value: 1,
defaultValue: 2
},
VIDEO: {
muted: 1,
defaultMuted: 2
},
AUDIO: {
muted: 1,
defaultMuted: 2
}
};
const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);

@@ -955,2 +983,5 @@ const DelegatedEvents = /*#__PURE__*/new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);

}
function Assets(props) {
useAssets(() => props.children);
}
function generateHydrationScript({

@@ -1180,2 +1211,2 @@ eventNames = ["click", "input"],

export { ChildProperties, DOMElements, DelegatedEvents, Dynamic, HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, notSup as addEventListener, applyRef, notSup as assign, notSup as className, notSup as delegateEvents, dynamic, notSup as dynamicProperty, effect, escape, generateHydrationScript, getAssets, getHydrationKey, notSup as getNextElement, notSup as getNextMarker, notSup as getNextMatch, getRequestEvent, notSup as hydrate, notSup as insert, isDev, isServer, memo, mergeProps, notSup as render, renderToStream, renderToString, renderToStringAsync, notSup as runHydrationEvents, notSup as setAttribute, notSup as setAttributeNS, notSup as setProperty, notSup as spread, ssr, ssrAttribute, ssrClassName, ssrElement, ssrGroup, ssrHydrationKey, ssrStyle, ssrStyleProperty, notSup as style, notSup as template, useAssets };
export { Assets, ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, notSup as addEvent, applyRef, notSup as assign, notSup as className, notSup as delegateEvents, dynamic, notSup as dynamicProperty, effect, escape, generateHydrationScript, getAssets, notSup as getDelegatedRoot, getHydrationKey, notSup as getNextElement, notSup as getNextMarker, notSup as getNextMatch, getRequestEvent, notSup as hydrate, notSup as insert, isDev, isServer, memo, mergeProps, notSup as ref, notSup as registerDelegatedContainer, notSup as registerDelegatedRoot, notSup as render, renderToStream, renderToString, renderToStringAsync, notSup as runHydrationEvents, notSup as setAttribute, notSup as setAttributeNS, notSup as setProperty, notSup as setStyleProperty, notSup as spread, ssr, ssrAttribute, ssrClassName, ssrElement, ssrGroup, ssrHydrationKey, ssrStyle, ssrStyleProperty, notSup as style, notSup as template, notSup as unregisterDelegatedContainer, notSup as unregisterDelegatedRoot, useAssets };

@@ -34,2 +34,3 @@ 'use strict';

const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
const $$SLOT = /*#__PURE__*/Symbol("slot");
const DelegatedEvents = /*#__PURE__*/new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);

@@ -68,3 +69,3 @@ const SVGElements = /*#__PURE__*/new Set([

function reconcileArrays(parentNode, a, b) {
function reconcileArrays(parentNode, a, b, marker) {
let bLength = b.length,

@@ -75,4 +76,8 @@ aEnd = a.length,

bStart = 0,
after = a[aEnd - 1].nextSibling,
map = null;
tail = a[aEnd - 1],
tailTag = tail[$$SLOT],
after = tail.parentNode === parentNode && (!tailTag || tailTag === marker) ? tail.nextSibling : marker || null,
map = null,
anchor,
anchorTag;
while (aStart < aEnd || bStart < bEnd) {

@@ -89,16 +94,39 @@ if (a[aStart] === b[bStart]) {

if (aEnd === aStart) {
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
let node;
if (bEnd < bLength) {
if (bStart) {
const prev = b[bStart - 1];
const prevTag = prev[$$SLOT];
node = prev.parentNode === parentNode && (!prevTag || prevTag === marker) ? prev.nextSibling : after;
} else node = b[bEnd - bStart];
} else node = after;
while (bStart < bEnd) {
const n = b[bStart++];
parentNode.insertBefore(n, node);
if (marker) n[$$SLOT] = marker;
}
} else if (bEnd === bStart) {
while (aStart < aEnd) {
if (!map || !map.has(a[aStart])) a[aStart].remove();
aStart++;
const n = a[aStart++];
if (!map || !map.has(n)) {
const tag = n[$$SLOT];
if (n.parentNode === parentNode && (!tag || tag === marker)) n.remove();
}
}
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
const anchor = a[aStart];
do {
parentNode.insertBefore(a[--aEnd], anchor);
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
} else if ((anchor = a[aStart]) === b[bEnd - 1] && b[bStart] === a[aEnd - 1] && anchor.parentNode === parentNode && (!(anchorTag = anchor[$$SLOT]) || anchorTag === marker)) {
if (marker) {
do {
const n = a[--aEnd];
parentNode.insertBefore(n, anchor);
n[$$SLOT] = marker;
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
} else {
do {
parentNode.insertBefore(a[--aEnd], anchor);
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
}
} else {

@@ -121,7 +149,27 @@ if (!map) {

if (sequence > index - bStart) {
const node = a[aStart];
while (bStart < index) parentNode.insertBefore(b[bStart++], node);
} else parentNode.replaceChild(b[bStart++], a[aStart++]);
const head = a[aStart];
const headTag = head[$$SLOT];
const node = head.parentNode === parentNode && (!headTag || headTag === marker) ? head : after;
while (bStart < index) {
const n = b[bStart++];
parentNode.insertBefore(n, node);
if (marker) n[$$SLOT] = marker;
}
} else {
const oldNode = a[aStart++];
const newNode = b[bStart++];
const oldTag = oldNode[$$SLOT];
if (oldNode.parentNode === parentNode && (!oldTag || oldTag === marker)) {
parentNode.replaceChild(newNode, oldNode);
} else {
parentNode.insertBefore(newNode, after);
}
if (marker) newNode[$$SLOT] = marker;
}
} else aStart++;
} else a[aStart++].remove();
} else {
const n = a[aStart++];
const nTag = n[$$SLOT];
if (n.parentNode === parentNode && (!nTag || nTag === marker)) n.remove();
}
}

@@ -131,20 +179,30 @@ }

const $$EVENTS = "_$DX_DELEGATE";
const $$EVENT_OWNER = "_$DX_EVENT_OWNER";
const INNER_OWNED = {};
const delegatedEvents = new Set();
const delegatedContainers = new Map();
function render$1(code, element, init, options = {}) {
let disposer;
solidJs.createRoot(dispose => {
disposer = dispose;
if (element === document) {
const tree = code();
effect(() => solidJs.flatten(tree), () => {});
} else {
const tree = code();
insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
}
}, {
id: options.renderId
});
registerDelegatedRoot(element);
try {
solidJs.createRoot(dispose => {
disposer = dispose;
if (element === document) {
const tree = code();
effect(() => solidJs.flatten(tree), () => {});
} else {
const tree = code();
insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
}
}, {
id: options.renderId
});
} catch (err) {
if (disposer) disposer();
unregisterDelegatedRoot(element);
throw err;
}
return () => {
disposer();
unregisterDelegatedRoot(element);
element.textContent = "";

@@ -163,18 +221,64 @@ };

}
function delegateEvents(eventNames, document = window.document) {
const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());
function delegateEvents(eventNames) {
for (let i = 0, l = eventNames.length; i < l; i++) {
const name = eventNames[i];
if (!e.has(name)) {
e.add(name);
document.addEventListener(name, eventHandler);
if (!delegatedEvents.has(name)) {
delegatedEvents.add(name);
delegatedContainers.forEach((state, container) => attachDelegatedEvent(name, container, state));
}
}
}
function clearDelegatedEvents(document = window.document) {
if (document[$$EVENTS]) {
for (let name of document[$$EVENTS].keys()) document.removeEventListener(name, eventHandler);
delete document[$$EVENTS];
function registerDelegatedRoot(root) {
const state = registerDelegatedContainer(root, root);
if (state) state.roots = (state.roots || 0) + 1;
}
function unregisterDelegatedRoot(root) {
const state = delegatedContainers.get(root);
if (state) state.roots > 1 ? state.roots-- : delete state.roots;
unregisterDelegatedContainer(root, root);
}
function registerDelegatedContainer(container, owner = container) {
if (!container || !owner) return;
let state = delegatedContainers.get(container);
if (!state) delegatedContainers.set(container, state = {
owners: new Map(),
handlers: new Map()
});
state.owners.set(owner, (state.owners.get(owner) || 0) + 1);
delegatedEvents.forEach(name => attachDelegatedEvent(name, container, state));
return state;
}
function unregisterDelegatedContainer(container, owner = container) {
const state = delegatedContainers.get(container);
if (!state) return;
const count = state.owners.get(owner);
if (count > 1) state.owners.set(owner, count - 1);else state.owners.delete(owner);
if (state.owners.size) return;
state.handlers.forEach((handler, name) => container.removeEventListener(name, handler));
delegatedContainers.delete(container);
}
function attachDelegatedEvent(name, container, state) {
if (state.handlers.has(name)) return;
const handler = e => eventHandler(e, container, state);
state.handlers.set(name, handler);
container.addEventListener(name, handler);
}
function getDelegatedRoot(node) {
while (node) {
if (delegatedContainers.get(node)?.roots) return node;
node = node._$host || node.parentNode || node.host;
}
}
function findOwner(target, state) {
let node = target;
let distance = 0;
while (node) {
if (state.owners.has(node)) return {
owner: node,
distance
};
distance++;
node = node._$host || node.parentNode || node.host;
}
}
function setProperty(node, name, value) {

@@ -222,3 +326,3 @@ if (isHydrating(node)) return;

}
function addEventListener(node, name, handler, delegate) {
function addEvent(node, name, handler, delegate) {
if (delegate) {

@@ -473,3 +577,13 @@ if (Array.isArray(handler)) {

events.shift();
eventHandler(e);
let match;
for (const [container, state] of delegatedContainers) {
if (!state.handlers.has(e.type)) continue;
const entry = findOwner(e.target, state);
if (entry && (!match || entry.distance < match.distance)) match = {
container,
state,
distance: entry.distance
};
}
if (match) eventHandler(e, match.container, match.state);
}

@@ -529,3 +643,3 @@ if (solidJs.sharedConfig.done) {

if (delegate || value) {
addEventListener(node, name, value, delegate);
addEvent(node, name, value, delegate);
delegate && delegateEvents([name]);

@@ -542,10 +656,14 @@ }

}
function eventHandler(e) {
function eventHandler(e, container, state) {
if (solidJs.sharedConfig.registry && solidJs.sharedConfig.events) {
if (solidJs.sharedConfig.events.find(([el, ev]) => ev === e)) return;
}
if (e[$$EVENT_OWNER]) return;
const owner = state && (state.owners.size === 1 && state.owners.has(container) ? container : findOwner(e.target, state)?.owner);
if (state && !owner) return;
e[$$EVENT_OWNER] = owner || true;
let node = e.target;
const key = `$$${e.type}`;
const oriTarget = e.target;
const oriCurrentTarget = e.currentTarget;
const boundary = owner || container || e.currentTarget;
const retarget = value => Object.defineProperty(e, "target", {

@@ -566,3 +684,6 @@ configurable: true,

const walkUpTree = () => {
while (handleNode() && (node = node._$host || node.parentNode || node.host));
while (handleNode()) {
if (node === boundary || node.parentNode === boundary) break;
node = node._$host || node.parentNode || node.host;
}
};

@@ -572,3 +693,3 @@ Object.defineProperty(e, "currentTarget", {

get() {
return node || document;
return node || boundary || document;
}

@@ -578,15 +699,17 @@ });

const path = e.composedPath();
retarget(path[0]);
for (let i = 0; i < path.length - 2; i++) {
node = path[i];
if (!handleNode()) break;
if (node._$host) {
node = node._$host;
walkUpTree();
break;
if (path.length) {
retarget(path[0]);
for (let i = 0; i < path.length; i++) {
node = path[i];
if (!handleNode()) break;
if (node._$host) {
node = node._$host;
walkUpTree();
break;
}
if (node === boundary || node.parentNode === boundary) {
break;
}
}
if (node.parentNode === oriCurrentTarget) {
break;
}
}
} else walkUpTree();
}

@@ -611,5 +734,10 @@ else walkUpTree();

cleanChildren(parent, current, multi ? marker : null, value);
} else if (current === undefined || !parent.firstChild) {
} else if (current && current.nodeType) {
current.parentNode === parent ? parent.replaceChild(value, current) : parent.appendChild(value);
} else if (current && parent.firstChild) {
parent.replaceChild(value, parent.firstChild);
} else {
parent.appendChild(value);
} else parent.replaceChild(value, parent.firstChild);
}
if (marker) value[$$SLOT] = marker;
} else if (Array.isArray(value)) {

@@ -622,3 +750,3 @@ const currentArray = current && Array.isArray(current);

appendNodes(parent, value, marker);
} else reconcileArrays(parent, current, value);
} else reconcileArrays(parent, current, value, marker);
} else {

@@ -648,3 +776,7 @@ current && cleanChildren(parent);

function appendNodes(parent, array, marker = null) {
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
for (let i = 0, len = array.length; i < len; i++) {
const n = array[i];
parent.insertBefore(n, marker);
if (marker) n[$$SLOT] = marker;
}
}

@@ -658,7 +790,9 @@ function cleanChildren(parent, current, marker, replacement) {

if (replacement !== el) {
const isParent = el.parentNode === parent;
if (replacement && !inserted && !i) isParent ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else isParent && el.remove();
const tag = el[$$SLOT];
const owns = el.parentNode === parent && (!tag || tag === marker);
if (replacement && !inserted && !i) owns ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else if (owns) el.remove();
} else inserted = true;
}
} else if (replacement) parent.insertBefore(replacement, marker);
if (replacement && marker) replacement[$$SLOT] = marker;
}

@@ -725,4 +859,4 @@ function gatherHydratable(element, root) {

endMarker = document.createTextNode(""),
mount = () => createElementProxy(props.mount || document.body, treeMarker);
let content = solidJs.createMemo(() => [startMarker, props.children]);
mount = () => createElementProxy(props.mount || document.body, treeMarker),
content = solidJs.createMemo(() => [startMarker, props.children]);
solidJs.createRenderEffect(() => [mount(), content()], ([m, c]) => {

@@ -740,2 +874,8 @@ m.appendChild(endMarker);

});
solidJs.createEffect(mount, m => {
const ownerRoot = getDelegatedRoot(treeMarker);
if (!ownerRoot || ownerRoot.contains(m)) return;
registerDelegatedContainer(m, ownerRoot);
return () => unregisterDelegatedContainer(m, ownerRoot);
});
return treeMarker;

@@ -854,7 +994,6 @@ }

exports.VoidElements = VoidElements;
exports.addEventListener = addEventListener;
exports.addEvent = addEvent;
exports.applyRef = applyRef;
exports.assign = assign;
exports.className = className;
exports.clearDelegatedEvents = clearDelegatedEvents;
exports.delegateEvents = delegateEvents;

@@ -867,2 +1006,3 @@ exports.dynamic = dynamic;

exports.getAssets = voidFn;
exports.getDelegatedRoot = getDelegatedRoot;
exports.getFirstChild = getFirstChild;

@@ -882,2 +1022,4 @@ exports.getHydrationKey = getHydrationKey;

exports.ref = ref;
exports.registerDelegatedContainer = registerDelegatedContainer;
exports.registerDelegatedRoot = registerDelegatedRoot;
exports.render = render;

@@ -902,2 +1044,4 @@ exports.renderToStream = renderToStream;

exports.template = template;
exports.unregisterDelegatedContainer = unregisterDelegatedContainer;
exports.unregisterDelegatedRoot = unregisterDelegatedRoot;
exports.useAssets = voidFn;

@@ -1,2 +0,2 @@

import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, merge, createComponent, omit, enableHydration, flush } from 'solid-js';
import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, merge, createComponent, omit, createEffect, enableHydration, flush } from 'solid-js';
export { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent, getOwner, untrack } from 'solid-js';

@@ -33,2 +33,3 @@

const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
const $$SLOT = /*#__PURE__*/Symbol("slot");
const DelegatedEvents = /*#__PURE__*/new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);

@@ -67,3 +68,3 @@ const SVGElements = /*#__PURE__*/new Set([

function reconcileArrays(parentNode, a, b) {
function reconcileArrays(parentNode, a, b, marker) {
let bLength = b.length,

@@ -74,4 +75,8 @@ aEnd = a.length,

bStart = 0,
after = a[aEnd - 1].nextSibling,
map = null;
tail = a[aEnd - 1],
tailTag = tail[$$SLOT],
after = tail.parentNode === parentNode && (!tailTag || tailTag === marker) ? tail.nextSibling : marker || null,
map = null,
anchor,
anchorTag;
while (aStart < aEnd || bStart < bEnd) {

@@ -88,16 +93,39 @@ if (a[aStart] === b[bStart]) {

if (aEnd === aStart) {
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
let node;
if (bEnd < bLength) {
if (bStart) {
const prev = b[bStart - 1];
const prevTag = prev[$$SLOT];
node = prev.parentNode === parentNode && (!prevTag || prevTag === marker) ? prev.nextSibling : after;
} else node = b[bEnd - bStart];
} else node = after;
while (bStart < bEnd) {
const n = b[bStart++];
parentNode.insertBefore(n, node);
if (marker) n[$$SLOT] = marker;
}
} else if (bEnd === bStart) {
while (aStart < aEnd) {
if (!map || !map.has(a[aStart])) a[aStart].remove();
aStart++;
const n = a[aStart++];
if (!map || !map.has(n)) {
const tag = n[$$SLOT];
if (n.parentNode === parentNode && (!tag || tag === marker)) n.remove();
}
}
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
const anchor = a[aStart];
do {
parentNode.insertBefore(a[--aEnd], anchor);
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
} else if ((anchor = a[aStart]) === b[bEnd - 1] && b[bStart] === a[aEnd - 1] && anchor.parentNode === parentNode && (!(anchorTag = anchor[$$SLOT]) || anchorTag === marker)) {
if (marker) {
do {
const n = a[--aEnd];
parentNode.insertBefore(n, anchor);
n[$$SLOT] = marker;
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
} else {
do {
parentNode.insertBefore(a[--aEnd], anchor);
bStart++;
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
}
} else {

@@ -120,7 +148,27 @@ if (!map) {

if (sequence > index - bStart) {
const node = a[aStart];
while (bStart < index) parentNode.insertBefore(b[bStart++], node);
} else parentNode.replaceChild(b[bStart++], a[aStart++]);
const head = a[aStart];
const headTag = head[$$SLOT];
const node = head.parentNode === parentNode && (!headTag || headTag === marker) ? head : after;
while (bStart < index) {
const n = b[bStart++];
parentNode.insertBefore(n, node);
if (marker) n[$$SLOT] = marker;
}
} else {
const oldNode = a[aStart++];
const newNode = b[bStart++];
const oldTag = oldNode[$$SLOT];
if (oldNode.parentNode === parentNode && (!oldTag || oldTag === marker)) {
parentNode.replaceChild(newNode, oldNode);
} else {
parentNode.insertBefore(newNode, after);
}
if (marker) newNode[$$SLOT] = marker;
}
} else aStart++;
} else a[aStart++].remove();
} else {
const n = a[aStart++];
const nTag = n[$$SLOT];
if (n.parentNode === parentNode && (!nTag || nTag === marker)) n.remove();
}
}

@@ -130,20 +178,30 @@ }

const $$EVENTS = "_$DX_DELEGATE";
const $$EVENT_OWNER = "_$DX_EVENT_OWNER";
const INNER_OWNED = {};
const delegatedEvents = new Set();
const delegatedContainers = new Map();
function render$1(code, element, init, options = {}) {
let disposer;
createRoot(dispose => {
disposer = dispose;
if (element === document) {
const tree = code();
effect(() => flatten(tree), () => {});
} else {
const tree = code();
insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
}
}, {
id: options.renderId
});
registerDelegatedRoot(element);
try {
createRoot(dispose => {
disposer = dispose;
if (element === document) {
const tree = code();
effect(() => flatten(tree), () => {});
} else {
const tree = code();
insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
}
}, {
id: options.renderId
});
} catch (err) {
if (disposer) disposer();
unregisterDelegatedRoot(element);
throw err;
}
return () => {
disposer();
unregisterDelegatedRoot(element);
element.textContent = "";

@@ -162,18 +220,64 @@ };

}
function delegateEvents(eventNames, document = window.document) {
const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());
function delegateEvents(eventNames) {
for (let i = 0, l = eventNames.length; i < l; i++) {
const name = eventNames[i];
if (!e.has(name)) {
e.add(name);
document.addEventListener(name, eventHandler);
if (!delegatedEvents.has(name)) {
delegatedEvents.add(name);
delegatedContainers.forEach((state, container) => attachDelegatedEvent(name, container, state));
}
}
}
function clearDelegatedEvents(document = window.document) {
if (document[$$EVENTS]) {
for (let name of document[$$EVENTS].keys()) document.removeEventListener(name, eventHandler);
delete document[$$EVENTS];
function registerDelegatedRoot(root) {
const state = registerDelegatedContainer(root, root);
if (state) state.roots = (state.roots || 0) + 1;
}
function unregisterDelegatedRoot(root) {
const state = delegatedContainers.get(root);
if (state) state.roots > 1 ? state.roots-- : delete state.roots;
unregisterDelegatedContainer(root, root);
}
function registerDelegatedContainer(container, owner = container) {
if (!container || !owner) return;
let state = delegatedContainers.get(container);
if (!state) delegatedContainers.set(container, state = {
owners: new Map(),
handlers: new Map()
});
state.owners.set(owner, (state.owners.get(owner) || 0) + 1);
delegatedEvents.forEach(name => attachDelegatedEvent(name, container, state));
return state;
}
function unregisterDelegatedContainer(container, owner = container) {
const state = delegatedContainers.get(container);
if (!state) return;
const count = state.owners.get(owner);
if (count > 1) state.owners.set(owner, count - 1);else state.owners.delete(owner);
if (state.owners.size) return;
state.handlers.forEach((handler, name) => container.removeEventListener(name, handler));
delegatedContainers.delete(container);
}
function attachDelegatedEvent(name, container, state) {
if (state.handlers.has(name)) return;
const handler = e => eventHandler(e, container, state);
state.handlers.set(name, handler);
container.addEventListener(name, handler);
}
function getDelegatedRoot(node) {
while (node) {
if (delegatedContainers.get(node)?.roots) return node;
node = node._$host || node.parentNode || node.host;
}
}
function findOwner(target, state) {
let node = target;
let distance = 0;
while (node) {
if (state.owners.has(node)) return {
owner: node,
distance
};
distance++;
node = node._$host || node.parentNode || node.host;
}
}
function setProperty(node, name, value) {

@@ -221,3 +325,3 @@ if (isHydrating(node)) return;

}
function addEventListener(node, name, handler, delegate) {
function addEvent(node, name, handler, delegate) {
if (delegate) {

@@ -472,3 +576,13 @@ if (Array.isArray(handler)) {

events.shift();
eventHandler(e);
let match;
for (const [container, state] of delegatedContainers) {
if (!state.handlers.has(e.type)) continue;
const entry = findOwner(e.target, state);
if (entry && (!match || entry.distance < match.distance)) match = {
container,
state,
distance: entry.distance
};
}
if (match) eventHandler(e, match.container, match.state);
}

@@ -528,3 +642,3 @@ if (sharedConfig.done) {

if (delegate || value) {
addEventListener(node, name, value, delegate);
addEvent(node, name, value, delegate);
delegate && delegateEvents([name]);

@@ -541,10 +655,14 @@ }

}
function eventHandler(e) {
function eventHandler(e, container, state) {
if (sharedConfig.registry && sharedConfig.events) {
if (sharedConfig.events.find(([el, ev]) => ev === e)) return;
}
if (e[$$EVENT_OWNER]) return;
const owner = state && (state.owners.size === 1 && state.owners.has(container) ? container : findOwner(e.target, state)?.owner);
if (state && !owner) return;
e[$$EVENT_OWNER] = owner || true;
let node = e.target;
const key = `$$${e.type}`;
const oriTarget = e.target;
const oriCurrentTarget = e.currentTarget;
const boundary = owner || container || e.currentTarget;
const retarget = value => Object.defineProperty(e, "target", {

@@ -565,3 +683,6 @@ configurable: true,

const walkUpTree = () => {
while (handleNode() && (node = node._$host || node.parentNode || node.host));
while (handleNode()) {
if (node === boundary || node.parentNode === boundary) break;
node = node._$host || node.parentNode || node.host;
}
};

@@ -571,3 +692,3 @@ Object.defineProperty(e, "currentTarget", {

get() {
return node || document;
return node || boundary || document;
}

@@ -577,15 +698,17 @@ });

const path = e.composedPath();
retarget(path[0]);
for (let i = 0; i < path.length - 2; i++) {
node = path[i];
if (!handleNode()) break;
if (node._$host) {
node = node._$host;
walkUpTree();
break;
if (path.length) {
retarget(path[0]);
for (let i = 0; i < path.length; i++) {
node = path[i];
if (!handleNode()) break;
if (node._$host) {
node = node._$host;
walkUpTree();
break;
}
if (node === boundary || node.parentNode === boundary) {
break;
}
}
if (node.parentNode === oriCurrentTarget) {
break;
}
}
} else walkUpTree();
}

@@ -610,5 +733,10 @@ else walkUpTree();

cleanChildren(parent, current, multi ? marker : null, value);
} else if (current === undefined || !parent.firstChild) {
} else if (current && current.nodeType) {
current.parentNode === parent ? parent.replaceChild(value, current) : parent.appendChild(value);
} else if (current && parent.firstChild) {
parent.replaceChild(value, parent.firstChild);
} else {
parent.appendChild(value);
} else parent.replaceChild(value, parent.firstChild);
}
if (marker) value[$$SLOT] = marker;
} else if (Array.isArray(value)) {

@@ -621,3 +749,3 @@ const currentArray = current && Array.isArray(current);

appendNodes(parent, value, marker);
} else reconcileArrays(parent, current, value);
} else reconcileArrays(parent, current, value, marker);
} else {

@@ -647,3 +775,7 @@ current && cleanChildren(parent);

function appendNodes(parent, array, marker = null) {
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
for (let i = 0, len = array.length; i < len; i++) {
const n = array[i];
parent.insertBefore(n, marker);
if (marker) n[$$SLOT] = marker;
}
}

@@ -657,7 +789,9 @@ function cleanChildren(parent, current, marker, replacement) {

if (replacement !== el) {
const isParent = el.parentNode === parent;
if (replacement && !inserted && !i) isParent ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else isParent && el.remove();
const tag = el[$$SLOT];
const owns = el.parentNode === parent && (!tag || tag === marker);
if (replacement && !inserted && !i) owns ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else if (owns) el.remove();
} else inserted = true;
}
} else if (replacement) parent.insertBefore(replacement, marker);
if (replacement && marker) replacement[$$SLOT] = marker;
}

@@ -724,4 +858,4 @@ function gatherHydratable(element, root) {

endMarker = document.createTextNode(""),
mount = () => createElementProxy(props.mount || document.body, treeMarker);
let content = createMemo(() => [startMarker, props.children]);
mount = () => createElementProxy(props.mount || document.body, treeMarker),
content = createMemo(() => [startMarker, props.children]);
createRenderEffect(() => [mount(), content()], ([m, c]) => {

@@ -739,2 +873,8 @@ m.appendChild(endMarker);

});
createEffect(mount, m => {
const ownerRoot = getDelegatedRoot(treeMarker);
if (!ownerRoot || ownerRoot.contains(m)) return;
registerDelegatedContainer(m, ownerRoot);
return () => unregisterDelegatedContainer(m, ownerRoot);
});
return treeMarker;

@@ -787,2 +927,2 @@ }

export { voidFn as Assets, ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, voidFn as HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, addEventListener, applyRef, assign, className, clearDelegatedEvents, delegateEvents, dynamic, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, mergeProps, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };
export { voidFn as Assets, ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, voidFn as HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, addEvent, applyRef, assign, className, delegateEvents, dynamic, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getDelegatedRoot, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, mergeProps, ref, registerDelegatedContainer, registerDelegatedRoot, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, unregisterDelegatedContainer, unregisterDelegatedRoot, voidFn as useAssets };
{
"name": "@solidjs/web",
"description": "Solid's web runtime: client rendering, hydration, SSR, and DOM-specific control flow (Portal, Dynamic).",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"author": "Ryan Carniato",

@@ -140,6 +140,6 @@ "license": "MIT",

"peerDependencies": {
"solid-js": "^2.0.0-beta.13"
"solid-js": "^2.0.0-beta.14"
},
"devDependencies": {
"solid-js": "2.0.0-beta.13"
"solid-js": "2.0.0-beta.14"
},

@@ -146,0 +146,0 @@ "scripts": {

@@ -36,4 +36,14 @@ import { JSX } from "./jsx.cjs";

export function createComponent<T>(Comp: (props: T) => JSX.Element, props: T): JSX.Element;
export function delegateEvents(eventNames: string[], d?: Document): void;
export function clearDelegatedEvents(d?: Document): void;
export function delegateEvents(eventNames: string[]): void;
export function registerDelegatedRoot(root: MountableElement): void;
export function unregisterDelegatedRoot(root: MountableElement): void;
export function registerDelegatedContainer(
container: MountableElement,
owner?: MountableElement
): void;
export function unregisterDelegatedContainer(
container: MountableElement,
owner?: MountableElement
): void;
export function getDelegatedRoot(node: MountableElement): MountableElement | undefined;
export function spread<T>(node: Element, accessor: T, skipChildren?: Boolean): void;

@@ -49,13 +59,6 @@ export function assign(

export function setAttributeNS(node: Element, namespace: string, name: string, value: string): void;
type ClassList =
| Record<string, boolean>
| Array<string | number | boolean | null | undefined | Record<string, boolean>>;
export function className(
node: Element,
value: string | ClassList,
prev?: string | ClassList
): void;
export function className(node: Element, value: JSX.ClassValue, prev?: JSX.ClassValue): void;
export function setProperty(node: Element, name: string, value: any): void;
export function setStyleProperty(node: Element, name: string, value: any): void;
export function addEventListener(
export function addEvent(
node: Element,

@@ -62,0 +65,0 @@ name: string,

@@ -34,2 +34,3 @@ /**

| File
| Date
| Element;

@@ -36,0 +37,0 @@

import { JSX } from "./jsx.cjs";
export const DOMWithState: Record<string, Record<string, 1 | 2>>;
export const ChildProperties: Set<string>;

@@ -127,4 +128,20 @@ export const DelegatedEvents: Set<string>;

/** @deprecated not supported on the server side */
export function delegateEvents(eventNames: string[], d?: Document): void;
export function delegateEvents(eventNames: string[]): void;
/** @deprecated not supported on the server side */
export function registerDelegatedRoot(root: MountableElement): void;
/** @deprecated not supported on the server side */
export function unregisterDelegatedRoot(root: MountableElement): void;
/** @deprecated not supported on the server side */
export function registerDelegatedContainer(
container: MountableElement,
owner?: MountableElement
): void;
/** @deprecated not supported on the server side */
export function unregisterDelegatedContainer(
container: MountableElement,
owner?: MountableElement
): void;
/** @deprecated not supported on the server side */
export function getDelegatedRoot(node: MountableElement): MountableElement | undefined;
/** @deprecated not supported on the server side */
export function dynamicProperty(props: unknown, key: string): unknown;

@@ -137,8 +154,3 @@ /** @deprecated not supported on the server side */

/** @deprecated not supported on the server side */
export function addEventListener(
node: Element,
name: string,
handler: () => void,
delegate: boolean
): void;
export function addEvent(node: Element, name: string, handler: () => void, delegate: boolean): void;

@@ -177,1 +189,8 @@ /** @deprecated not supported on the server side */

export function runHydrationEvents(): void;
/** @deprecated not supported on the server side */
export function ref(
fn: () => ((element: Element) => void) | ((element: Element) => void)[],
element: Element
): void;
/** @deprecated not supported on the server side */
export function setStyleProperty(node: Element, name: string, value: any): void;

@@ -36,4 +36,14 @@ import { JSX } from "./jsx.js";

export function createComponent<T>(Comp: (props: T) => JSX.Element, props: T): JSX.Element;
export function delegateEvents(eventNames: string[], d?: Document): void;
export function clearDelegatedEvents(d?: Document): void;
export function delegateEvents(eventNames: string[]): void;
export function registerDelegatedRoot(root: MountableElement): void;
export function unregisterDelegatedRoot(root: MountableElement): void;
export function registerDelegatedContainer(
container: MountableElement,
owner?: MountableElement
): void;
export function unregisterDelegatedContainer(
container: MountableElement,
owner?: MountableElement
): void;
export function getDelegatedRoot(node: MountableElement): MountableElement | undefined;
export function spread<T>(node: Element, accessor: T, skipChildren?: Boolean): void;

@@ -49,13 +59,6 @@ export function assign(

export function setAttributeNS(node: Element, namespace: string, name: string, value: string): void;
type ClassList =
| Record<string, boolean>
| Array<string | number | boolean | null | undefined | Record<string, boolean>>;
export function className(
node: Element,
value: string | ClassList,
prev?: string | ClassList
): void;
export function className(node: Element, value: JSX.ClassValue, prev?: JSX.ClassValue): void;
export function setProperty(node: Element, name: string, value: any): void;
export function setStyleProperty(node: Element, name: string, value: any): void;
export function addEventListener(
export function addEvent(
node: Element,

@@ -62,0 +65,0 @@ name: string,

@@ -34,2 +34,3 @@ /**

| File
| Date
| Element;

@@ -36,0 +37,0 @@

import { JSX } from "./jsx.js";
export const DOMWithState: Record<string, Record<string, 1 | 2>>;
export const ChildProperties: Set<string>;

@@ -127,4 +128,20 @@ export const DelegatedEvents: Set<string>;

/** @deprecated not supported on the server side */
export function delegateEvents(eventNames: string[], d?: Document): void;
export function delegateEvents(eventNames: string[]): void;
/** @deprecated not supported on the server side */
export function registerDelegatedRoot(root: MountableElement): void;
/** @deprecated not supported on the server side */
export function unregisterDelegatedRoot(root: MountableElement): void;
/** @deprecated not supported on the server side */
export function registerDelegatedContainer(
container: MountableElement,
owner?: MountableElement
): void;
/** @deprecated not supported on the server side */
export function unregisterDelegatedContainer(
container: MountableElement,
owner?: MountableElement
): void;
/** @deprecated not supported on the server side */
export function getDelegatedRoot(node: MountableElement): MountableElement | undefined;
/** @deprecated not supported on the server side */
export function dynamicProperty(props: unknown, key: string): unknown;

@@ -137,8 +154,3 @@ /** @deprecated not supported on the server side */

/** @deprecated not supported on the server side */
export function addEventListener(
node: Element,
name: string,
handler: () => void,
delegate: boolean
): void;
export function addEvent(node: Element, name: string, handler: () => void, delegate: boolean): void;

@@ -177,1 +189,8 @@ /** @deprecated not supported on the server side */

export function runHydrationEvents(): void;
/** @deprecated not supported on the server side */
export function ref(
fn: () => ((element: Element) => void) | ((element: Element) => void)[],
element: Element
): void;
/** @deprecated not supported on the server side */
export function setStyleProperty(node: Element, name: string, value: any): void;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display