elements-kit 0.1.0 → 0.3.0
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/attributes.d.mts +1 -1
- package/dist/benchmark.CX_oY03V-COK1VBpH.mjs +5176 -0
- package/dist/custom-elements.d.mts +1 -1
- package/dist/{element-w1GCIMVp.mjs → element-BjpyY6qv.mjs} +17 -35
- package/dist/for.d.mts +1 -1
- package/dist/for.mjs +2 -2
- package/dist/{infer-DuFY-y2b.d.mts → infer-BUUWMoG9.d.mts} +3 -3
- package/dist/integrations/react.d.mts +1 -1
- package/dist/integrations/react.mjs +2 -2
- package/dist/jsx-runtime/index.d.mts +1 -1
- package/dist/jsx-runtime/index.mjs +1 -1
- package/dist/render.mjs +1 -1
- package/dist/{scope-DM2gzOkb.mjs → scope-CwVlgN8b.mjs} +1 -1
- package/dist/signals/index.d.mts +1 -1
- package/dist/signals/index.mjs +2 -2
- package/dist/{slot-CKtUoy2X.mjs → slot-BnzxFBfO.mjs} +1 -1
- package/dist/slot.d.mts +1 -1
- package/dist/slot.mjs +1 -1
- package/dist/{test.BmQO5GaM-BeO5pvCo.mjs → test.BmQO5GaM-C8YqghE0.mjs} +9 -5156
- package/dist/utilities/_observe.mjs +1 -1
- package/dist/utilities/active-element.d.mts +1 -1
- package/dist/utilities/active-element.mjs +1 -1
- package/dist/utilities/active-element.test.mjs +2 -1
- package/dist/utilities/async.d.mts +1 -1
- package/dist/utilities/async.mjs +1 -1
- package/dist/utilities/async.test.mjs +3 -2
- package/dist/utilities/context.d.mts +78 -0
- package/dist/utilities/context.mjs +115 -0
- package/dist/utilities/context.test.d.mts +1 -0
- package/dist/utilities/context.test.mjs +171 -0
- package/dist/utilities/debounced.d.mts +1 -1
- package/dist/utilities/debounced.mjs +1 -1
- package/dist/utilities/debounced.test.mjs +3 -2
- package/dist/utilities/dom-lifecycle.bench.d.mts +1 -0
- package/dist/utilities/dom-lifecycle.bench.mjs +90 -0
- package/dist/utilities/dom-lifecycle.d.mts +88 -0
- package/dist/utilities/dom-lifecycle.mjs +113 -0
- package/dist/utilities/dom-lifecycle.test.d.mts +1 -0
- package/dist/utilities/dom-lifecycle.test.mjs +227 -0
- package/dist/utilities/element-rect.d.mts +1 -1
- package/dist/utilities/element-rect.mjs +1 -1
- package/dist/utilities/element-rect.test.mjs +3 -2
- package/dist/utilities/element-scroll.d.mts +1 -1
- package/dist/utilities/element-scroll.test.mjs +3 -2
- package/dist/utilities/event-driven.d.mts +1 -1
- package/dist/utilities/event-driven.mjs +1 -1
- package/dist/utilities/event-listener.d.mts +1 -1
- package/dist/utilities/event-listener.mjs +1 -1
- package/dist/utilities/event-listener.test.mjs +3 -2
- package/dist/utilities/focus-within.d.mts +1 -1
- package/dist/utilities/focus-within.mjs +1 -1
- package/dist/utilities/focus-within.test.mjs +3 -2
- package/dist/utilities/hover.d.mts +1 -1
- package/dist/utilities/hover.mjs +1 -1
- package/dist/utilities/hover.test.mjs +3 -2
- package/dist/utilities/intersection-observer.test.mjs +3 -2
- package/dist/utilities/interval.d.mts +1 -1
- package/dist/utilities/interval.mjs +1 -1
- package/dist/utilities/interval.test.mjs +3 -2
- package/dist/utilities/location.d.mts +1 -1
- package/dist/utilities/location.mjs +1 -1
- package/dist/utilities/location.test.mjs +2 -1
- package/dist/utilities/long-press.test.mjs +3 -2
- package/dist/utilities/media-devices.d.mts +1 -1
- package/dist/utilities/media-devices.mjs +1 -1
- package/dist/utilities/media-devices.test.mjs +3 -2
- package/dist/utilities/media-player.d.mts +1 -1
- package/dist/utilities/media-player.test.mjs +3 -2
- package/dist/utilities/media-query.d.mts +1 -1
- package/dist/utilities/media-query.mjs +1 -1
- package/dist/utilities/mutation-observer.test.mjs +3 -2
- package/dist/utilities/network.d.mts +1 -1
- package/dist/utilities/network.mjs +1 -1
- package/dist/utilities/network.test.mjs +2 -1
- package/dist/utilities/on-click-outside.test.mjs +3 -2
- package/dist/utilities/orientation.d.mts +1 -1
- package/dist/utilities/orientation.mjs +1 -1
- package/dist/utilities/previous.d.mts +1 -1
- package/dist/utilities/previous.mjs +1 -1
- package/dist/utilities/previous.test.mjs +3 -2
- package/dist/utilities/promise.d.mts +1 -1
- package/dist/utilities/promise.mjs +1 -1
- package/dist/utilities/promise.test.mjs +3 -2
- package/dist/utilities/retry.mjs +1 -1
- package/dist/utilities/retry.test.mjs +3 -2
- package/dist/utilities/routing.d.mts +1 -1
- package/dist/utilities/routing.mjs +1 -1
- package/dist/utilities/routing.test.mjs +2 -1
- package/dist/utilities/search-params.d.mts +1 -1
- package/dist/utilities/search-params.test.mjs +3 -2
- package/dist/utilities/ssr.test.mjs +2 -1
- package/dist/utilities/storage.d.mts +1 -1
- package/dist/utilities/storage.test.mjs +3 -2
- package/dist/utilities/throttled.d.mts +1 -1
- package/dist/utilities/throttled.mjs +1 -1
- package/dist/utilities/throttled.test.mjs +3 -2
- package/dist/utilities/timeout.d.mts +1 -1
- package/dist/utilities/timeout.mjs +1 -1
- package/dist/utilities/timeout.test.mjs +3 -2
- package/dist/utilities/window-focus.d.mts +1 -1
- package/dist/utilities/window-focus.mjs +1 -1
- package/dist/utilities/window-size.d.mts +1 -1
- package/dist/utilities/window-size.mjs +1 -1
- package/dist/utilities/window-size.test.mjs +2 -1
- package/package.json +13 -2
- /package/dist/{attributes-DILeh3-s.d.mts → attributes-3r7Diua4.d.mts} +0 -0
- /package/dist/{custom-elements-D5_NMNyD.d.mts → custom-elements-CBuenqVD.d.mts} +0 -0
- /package/dist/{lib-D6duEs38.mjs → lib-CVfOddra.mjs} +0 -0
- /package/dist/{magic-string.es-cTgJnTCj.mjs → magic-string.es-CXefOmkB.mjs} +0 -0
- /package/dist/{polyfill-B1lNNcum.mjs → polyfill-CdZVCxdo.mjs} +0 -0
- /package/dist/{slot-D5iBUSAm.d.mts → slot-CfafCBOW.d.mts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as defineElement, t as CustomElementRegistry } from "./custom-elements-
|
|
1
|
+
import { n as defineElement, t as CustomElementRegistry } from "./custom-elements-CBuenqVD.mjs";
|
|
2
2
|
export { CustomElementRegistry, defineElement };
|
|
@@ -1,38 +1,20 @@
|
|
|
1
|
-
import { c as effectScope, g as untracked, p as onCleanup, s as effect } from "./lib-
|
|
2
|
-
import "./polyfill-
|
|
1
|
+
import { c as effectScope, g as untracked, p as onCleanup, s as effect } from "./lib-CVfOddra.mjs";
|
|
2
|
+
import "./polyfill-CdZVCxdo.mjs";
|
|
3
3
|
import { isReactive, resolveProps } from "./signals/index.mjs";
|
|
4
4
|
import { on } from "./utilities/event-listener.mjs";
|
|
5
|
-
import { i as resolveNode$1, n as Slot, r as Slots, t as SLOTS } from "./slot-
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __exportAll = (all, no_symbols) => {
|
|
12
|
-
let target = {};
|
|
13
|
-
for (var name in all) __defProp(target, name, {
|
|
14
|
-
get: all[name],
|
|
15
|
-
enumerable: true
|
|
16
|
-
});
|
|
17
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
22
|
-
key = keys[i];
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
24
|
-
get: ((k) => from[k]).bind(null, key),
|
|
25
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return to;
|
|
29
|
-
};
|
|
30
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
31
|
-
//#endregion
|
|
5
|
+
import { i as resolveNode$1, n as Slot, r as Slots, t as SLOTS } from "./slot-BnzxFBfO.mjs";
|
|
6
|
+
import { ChildProperties, Properties, SVGNamespace } from "dom-expressions/src/constants.js";
|
|
32
7
|
//#region src/jsx-runtime/constants.ts
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
8
|
+
/**
|
|
9
|
+
* IDL properties that take precedence over the default `setAttribute` path.
|
|
10
|
+
*
|
|
11
|
+
* Extends dom-expressions' base set with `defaultValue` — without it, JSX
|
|
12
|
+
* `<input defaultValue="x" />` falls through to `setAttribute("defaultValue",
|
|
13
|
+
* "x")` and creates a useless `defaultvalue` HTML attribute (native
|
|
14
|
+
* `HTMLInputElement` has no such content attribute; its `defaultValue` IDL
|
|
15
|
+
* property reflects the `value` content attribute instead).
|
|
16
|
+
*/
|
|
17
|
+
const Properties$1 = new Set([...Properties, "defaultValue"]);
|
|
36
18
|
const ReservedNameSpaces = new Set([
|
|
37
19
|
"class",
|
|
38
20
|
"on",
|
|
@@ -174,7 +156,7 @@ function setProp(node, key, value) {
|
|
|
174
156
|
}
|
|
175
157
|
return;
|
|
176
158
|
}
|
|
177
|
-
const svgNs =
|
|
159
|
+
const svgNs = SVGNamespace[ns];
|
|
178
160
|
if (svgNs) {
|
|
179
161
|
node.setAttributeNS(svgNs, key, String(value ?? ""));
|
|
180
162
|
return;
|
|
@@ -188,11 +170,11 @@ function setProp(node, key, value) {
|
|
|
188
170
|
applyStyle(node, value);
|
|
189
171
|
return;
|
|
190
172
|
}
|
|
191
|
-
if (
|
|
173
|
+
if (ChildProperties.has(key)) {
|
|
192
174
|
node[key] = value ?? "";
|
|
193
175
|
return;
|
|
194
176
|
}
|
|
195
|
-
if (!(node instanceof SVGElement) &&
|
|
177
|
+
if (!(node instanceof SVGElement) && Properties$1.has(key)) {
|
|
196
178
|
node[key] = value;
|
|
197
179
|
return;
|
|
198
180
|
}
|
package/dist/for.d.mts
CHANGED
package/dist/for.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as effectScope, g as untracked, h as trigger, m as signal, p as onCleanup, s as effect } from "./lib-D6duEs38.mjs";
|
|
1
|
+
import { c as effectScope, g as untracked, h as trigger, m as signal, p as onCleanup, s as effect } from "./lib-CVfOddra.mjs";
|
|
3
2
|
import "./signals/index.mjs";
|
|
3
|
+
import { n as disposeElement } from "./element-BjpyY6qv.mjs";
|
|
4
4
|
//#region src/for.ts
|
|
5
5
|
/**
|
|
6
6
|
* Keyed list renderer. See {@link ForProps} for prop details.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AttrChangeHandler, t as ATTRIBUTES } from "./attributes-
|
|
2
|
-
import { t as CustomElementRegistry } from "./custom-elements-
|
|
3
|
-
import { a as PrimitiveNodeType, i as Slots, n as Slot, t as SLOTS } from "./slot-
|
|
1
|
+
import { n as AttrChangeHandler, t as ATTRIBUTES } from "./attributes-3r7Diua4.mjs";
|
|
2
|
+
import { t as CustomElementRegistry } from "./custom-elements-CBuenqVD.mjs";
|
|
3
|
+
import { a as PrimitiveNodeType, i as Slots, n as Slot, t as SLOTS } from "./slot-CfafCBOW.mjs";
|
|
4
4
|
import { JSX } from "dom-expressions/src/jsx-h";
|
|
5
5
|
|
|
6
6
|
//#region src/jsx-runtime/element.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as signal, s as effect } from "../lib-
|
|
1
|
+
import { m as signal, s as effect } from "../lib-CVfOddra.mjs";
|
|
2
2
|
import "../signals/index.mjs";
|
|
3
|
-
import { t as scope } from "../scope-
|
|
3
|
+
import { t as scope } from "../scope-CwVlgN8b.mjs";
|
|
4
4
|
import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
5
5
|
//#region src/integrations/react.ts
|
|
6
6
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { U as createElement, _ as SlotProps, a as RawProps, b as MaybeReactive, c as ResolveProps, d as ComponentClass, f as ComponentFn, g as JSX, h as Attrs, i as Props, l as Child, m as PropsTarget, n as ElementProps, o as ReactiveProps, p as ComponentInstance, r as MaybeReactiveProps, s as Require, t as ComponentProps, u as Component, v as Fragment } from "../infer-
|
|
1
|
+
import { U as createElement, _ as SlotProps, a as RawProps, b as MaybeReactive, c as ResolveProps, d as ComponentClass, f as ComponentFn, g as JSX, h as Attrs, i as Props, l as Child, m as PropsTarget, n as ElementProps, o as ReactiveProps, p as ComponentInstance, r as MaybeReactiveProps, s as Require, t as ComponentProps, u as Component, v as Fragment } from "../infer-BUUWMoG9.mjs";
|
|
2
2
|
export { Attrs, Child, Component, ComponentClass, ComponentFn, ComponentInstance, ComponentProps, ElementProps, Fragment, JSX, MaybeReactive, MaybeReactiveProps, Props, PropsTarget, RawProps, ReactiveProps, Require, ResolveProps, SlotProps, createElement as h, createElement as jsx, createElement as jsxDEV, createElement as jsxs };
|
package/dist/render.mjs
CHANGED
package/dist/signals/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as SIGNAL, B as signal, C as isReactive, D as COMPUTED, E as resolveProps, F as isComputed, H as untracked, I as isEffect, L as isEffectScope, M as computed, N as effect, O as EFFECT, P as effectScope, R as isSignal, S as Updater, T as resolve, V as trigger, b as MaybeReactive, j as batch, k as EFFECT_SCOPE, w as reactive, x as Signal, y as Computed, z as onCleanup } from "../infer-
|
|
1
|
+
import { A as SIGNAL, B as signal, C as isReactive, D as COMPUTED, E as resolveProps, F as isComputed, H as untracked, I as isEffect, L as isEffectScope, M as computed, N as effect, O as EFFECT, P as effectScope, R as isSignal, S as Updater, T as resolve, V as trigger, b as MaybeReactive, j as batch, k as EFFECT_SCOPE, w as reactive, x as Signal, y as Computed, z as onCleanup } from "../infer-BUUWMoG9.mjs";
|
|
2
2
|
export { COMPUTED, Computed, EFFECT, EFFECT_SCOPE, MaybeReactive, SIGNAL, Signal, Updater, batch, computed, effect, effectScope, isComputed, isEffect, isEffectScope, isReactive, isSignal, onCleanup, reactive, resolve, resolveProps, signal, trigger, untracked };
|
package/dist/signals/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as batch, c as effectScope, d as isEffectScope, f as isSignal, g as untracked, h as trigger, i as SIGNAL, l as isComputed, m as signal, n as EFFECT, o as computed, p as onCleanup, r as EFFECT_SCOPE, s as effect, t as COMPUTED, u as isEffect } from "../lib-
|
|
2
|
-
import "../polyfill-
|
|
1
|
+
import { a as batch, c as effectScope, d as isEffectScope, f as isSignal, g as untracked, h as trigger, i as SIGNAL, l as isComputed, m as signal, n as EFFECT, o as computed, p as onCleanup, r as EFFECT_SCOPE, s as effect, t as COMPUTED, u as isEffect } from "../lib-CVfOddra.mjs";
|
|
2
|
+
import "../polyfill-CdZVCxdo.mjs";
|
|
3
3
|
//#region src/signals/index.ts
|
|
4
4
|
/**
|
|
5
5
|
* Type-guard: `true` when `value` is a reactive source (`signal` or `computed`),
|
package/dist/slot.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as Slots, n as Slot, r as SlotInstance, t as SLOTS } from "./slot-
|
|
1
|
+
import { i as Slots, n as Slot, r as SlotInstance, t as SLOTS } from "./slot-CfafCBOW.mjs";
|
|
2
2
|
export { SLOTS, Slot, SlotInstance, Slots };
|
package/dist/slot.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Slot, r as Slots, t as SLOTS } from "./slot-
|
|
1
|
+
import { n as Slot, r as Slots, t as SLOTS } from "./slot-BnzxFBfO.mjs";
|
|
2
2
|
export { SLOTS, Slot, Slots };
|