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.
Files changed (111) hide show
  1. package/dist/attributes.d.mts +1 -1
  2. package/dist/benchmark.CX_oY03V-COK1VBpH.mjs +5176 -0
  3. package/dist/custom-elements.d.mts +1 -1
  4. package/dist/{element-w1GCIMVp.mjs → element-BjpyY6qv.mjs} +17 -35
  5. package/dist/for.d.mts +1 -1
  6. package/dist/for.mjs +2 -2
  7. package/dist/{infer-DuFY-y2b.d.mts → infer-BUUWMoG9.d.mts} +3 -3
  8. package/dist/integrations/react.d.mts +1 -1
  9. package/dist/integrations/react.mjs +2 -2
  10. package/dist/jsx-runtime/index.d.mts +1 -1
  11. package/dist/jsx-runtime/index.mjs +1 -1
  12. package/dist/render.mjs +1 -1
  13. package/dist/{scope-DM2gzOkb.mjs → scope-CwVlgN8b.mjs} +1 -1
  14. package/dist/signals/index.d.mts +1 -1
  15. package/dist/signals/index.mjs +2 -2
  16. package/dist/{slot-CKtUoy2X.mjs → slot-BnzxFBfO.mjs} +1 -1
  17. package/dist/slot.d.mts +1 -1
  18. package/dist/slot.mjs +1 -1
  19. package/dist/{test.BmQO5GaM-BeO5pvCo.mjs → test.BmQO5GaM-C8YqghE0.mjs} +9 -5156
  20. package/dist/utilities/_observe.mjs +1 -1
  21. package/dist/utilities/active-element.d.mts +1 -1
  22. package/dist/utilities/active-element.mjs +1 -1
  23. package/dist/utilities/active-element.test.mjs +2 -1
  24. package/dist/utilities/async.d.mts +1 -1
  25. package/dist/utilities/async.mjs +1 -1
  26. package/dist/utilities/async.test.mjs +3 -2
  27. package/dist/utilities/context.d.mts +78 -0
  28. package/dist/utilities/context.mjs +115 -0
  29. package/dist/utilities/context.test.d.mts +1 -0
  30. package/dist/utilities/context.test.mjs +171 -0
  31. package/dist/utilities/debounced.d.mts +1 -1
  32. package/dist/utilities/debounced.mjs +1 -1
  33. package/dist/utilities/debounced.test.mjs +3 -2
  34. package/dist/utilities/dom-lifecycle.bench.d.mts +1 -0
  35. package/dist/utilities/dom-lifecycle.bench.mjs +90 -0
  36. package/dist/utilities/dom-lifecycle.d.mts +88 -0
  37. package/dist/utilities/dom-lifecycle.mjs +113 -0
  38. package/dist/utilities/dom-lifecycle.test.d.mts +1 -0
  39. package/dist/utilities/dom-lifecycle.test.mjs +227 -0
  40. package/dist/utilities/element-rect.d.mts +1 -1
  41. package/dist/utilities/element-rect.mjs +1 -1
  42. package/dist/utilities/element-rect.test.mjs +3 -2
  43. package/dist/utilities/element-scroll.d.mts +1 -1
  44. package/dist/utilities/element-scroll.test.mjs +3 -2
  45. package/dist/utilities/event-driven.d.mts +1 -1
  46. package/dist/utilities/event-driven.mjs +1 -1
  47. package/dist/utilities/event-listener.d.mts +1 -1
  48. package/dist/utilities/event-listener.mjs +1 -1
  49. package/dist/utilities/event-listener.test.mjs +3 -2
  50. package/dist/utilities/focus-within.d.mts +1 -1
  51. package/dist/utilities/focus-within.mjs +1 -1
  52. package/dist/utilities/focus-within.test.mjs +3 -2
  53. package/dist/utilities/hover.d.mts +1 -1
  54. package/dist/utilities/hover.mjs +1 -1
  55. package/dist/utilities/hover.test.mjs +3 -2
  56. package/dist/utilities/intersection-observer.test.mjs +3 -2
  57. package/dist/utilities/interval.d.mts +1 -1
  58. package/dist/utilities/interval.mjs +1 -1
  59. package/dist/utilities/interval.test.mjs +3 -2
  60. package/dist/utilities/location.d.mts +1 -1
  61. package/dist/utilities/location.mjs +1 -1
  62. package/dist/utilities/location.test.mjs +2 -1
  63. package/dist/utilities/long-press.test.mjs +3 -2
  64. package/dist/utilities/media-devices.d.mts +1 -1
  65. package/dist/utilities/media-devices.mjs +1 -1
  66. package/dist/utilities/media-devices.test.mjs +3 -2
  67. package/dist/utilities/media-player.d.mts +1 -1
  68. package/dist/utilities/media-player.test.mjs +3 -2
  69. package/dist/utilities/media-query.d.mts +1 -1
  70. package/dist/utilities/media-query.mjs +1 -1
  71. package/dist/utilities/mutation-observer.test.mjs +3 -2
  72. package/dist/utilities/network.d.mts +1 -1
  73. package/dist/utilities/network.mjs +1 -1
  74. package/dist/utilities/network.test.mjs +2 -1
  75. package/dist/utilities/on-click-outside.test.mjs +3 -2
  76. package/dist/utilities/orientation.d.mts +1 -1
  77. package/dist/utilities/orientation.mjs +1 -1
  78. package/dist/utilities/previous.d.mts +1 -1
  79. package/dist/utilities/previous.mjs +1 -1
  80. package/dist/utilities/previous.test.mjs +3 -2
  81. package/dist/utilities/promise.d.mts +1 -1
  82. package/dist/utilities/promise.mjs +1 -1
  83. package/dist/utilities/promise.test.mjs +3 -2
  84. package/dist/utilities/retry.mjs +1 -1
  85. package/dist/utilities/retry.test.mjs +3 -2
  86. package/dist/utilities/routing.d.mts +1 -1
  87. package/dist/utilities/routing.mjs +1 -1
  88. package/dist/utilities/routing.test.mjs +2 -1
  89. package/dist/utilities/search-params.d.mts +1 -1
  90. package/dist/utilities/search-params.test.mjs +3 -2
  91. package/dist/utilities/ssr.test.mjs +2 -1
  92. package/dist/utilities/storage.d.mts +1 -1
  93. package/dist/utilities/storage.test.mjs +3 -2
  94. package/dist/utilities/throttled.d.mts +1 -1
  95. package/dist/utilities/throttled.mjs +1 -1
  96. package/dist/utilities/throttled.test.mjs +3 -2
  97. package/dist/utilities/timeout.d.mts +1 -1
  98. package/dist/utilities/timeout.mjs +1 -1
  99. package/dist/utilities/timeout.test.mjs +3 -2
  100. package/dist/utilities/window-focus.d.mts +1 -1
  101. package/dist/utilities/window-focus.mjs +1 -1
  102. package/dist/utilities/window-size.d.mts +1 -1
  103. package/dist/utilities/window-size.mjs +1 -1
  104. package/dist/utilities/window-size.test.mjs +2 -1
  105. package/package.json +13 -2
  106. /package/dist/{attributes-DILeh3-s.d.mts → attributes-3r7Diua4.d.mts} +0 -0
  107. /package/dist/{custom-elements-D5_NMNyD.d.mts → custom-elements-CBuenqVD.d.mts} +0 -0
  108. /package/dist/{lib-D6duEs38.mjs → lib-CVfOddra.mjs} +0 -0
  109. /package/dist/{magic-string.es-cTgJnTCj.mjs → magic-string.es-CXefOmkB.mjs} +0 -0
  110. /package/dist/{polyfill-B1lNNcum.mjs → polyfill-CdZVCxdo.mjs} +0 -0
  111. /package/dist/{slot-D5iBUSAm.d.mts → slot-CfafCBOW.d.mts} +0 -0
@@ -1,6 +1,7 @@
1
- import { c as effectScope } from "../lib-D6duEs38.mjs";
1
+ import { c as effectScope } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
- import { n as vi, o as describe, r as afterEach, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
3
+ import { f as it, l as describe, o as afterEach } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
4
+ import { n as vi, t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
4
5
  import { onClickOutside } from "./on-click-outside.mjs";
5
6
  //#region src/utilities/on-click-outside.test.ts
6
7
  afterEach(() => {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DuFY-y2b.mjs";
1
+ import { y as Computed } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/orientation.d.ts
4
4
  type OrientationResult = {
@@ -1,4 +1,4 @@
1
- import { o as computed } from "../lib-D6duEs38.mjs";
1
+ import { o as computed } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
3
  import { fromEvent, sync } from "./event-driven.mjs";
4
4
  import { isBrowser } from "./environment.mjs";
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DuFY-y2b.mjs";
1
+ import { y as Computed } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/previous.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { m as signal, s as effect } from "../lib-D6duEs38.mjs";
1
+ import { m as signal, s as effect } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
3
  //#region src/utilities/previous.ts
4
4
  /**
@@ -1,6 +1,7 @@
1
- import { c as effectScope, m as signal } from "../lib-D6duEs38.mjs";
1
+ import { c as effectScope, m as signal } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
- import { o as describe, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
3
+ import { f as it, l as describe } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
4
+ import { t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
4
5
  import { createPrevious } from "./previous.mjs";
5
6
  //#region src/utilities/previous.test.ts
6
7
  describe("createPrevious", () => {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DuFY-y2b.mjs";
1
+ import { y as Computed } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/promise.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { a as batch, m as signal, o as computed } from "../lib-D6duEs38.mjs";
1
+ import { a as batch, m as signal, o as computed } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
3
  //#region src/utilities/promise.ts
4
4
  /**
@@ -1,6 +1,7 @@
1
- import { s as effect } from "../lib-D6duEs38.mjs";
1
+ import { s as effect } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
- import { o as describe, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
3
+ import { f as it, l as describe } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
4
+ import { t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
4
5
  import { ReactivePromise, promise } from "./promise.mjs";
5
6
  //#region src/utilities/promise.test.ts
6
7
  describe("ReactivePromise", () => {
@@ -1,4 +1,4 @@
1
- import { g as untracked, s as effect } from "../lib-D6duEs38.mjs";
1
+ import { g as untracked, s as effect } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
3
  //#region src/utilities/retry.ts
4
4
  /**
@@ -1,6 +1,7 @@
1
- import { p as onCleanup } from "../lib-D6duEs38.mjs";
1
+ import { p as onCleanup } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
- import { n as vi, o as describe, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
3
+ import { f as it, l as describe } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
4
+ import { n as vi, t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
4
5
  import { retry } from "./retry.mjs";
5
6
  //#region src/utilities/retry.test.ts
6
7
  describe("retry", () => {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DuFY-y2b.mjs";
1
+ import { y as Computed } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/routing.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { o as computed } from "../lib-D6duEs38.mjs";
1
+ import { o as computed } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
3
  import { currentLocation } from "./location.mjs";
4
4
  //#region src/utilities/routing.ts
@@ -1,4 +1,5 @@
1
- import { i as beforeAll, n as vi, o as describe, r as afterEach, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
1
+ import { f as it, l as describe, o as afterEach, s as beforeAll } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
2
+ import { n as vi, t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
2
3
  import { isLocalNavigationEvent, match, matches, navigate, patchHistory } from "./routing.mjs";
3
4
  //#region src/utilities/routing.test.ts
4
5
  beforeAll(() => {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DuFY-y2b.mjs";
1
+ import { y as Computed } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/search-params.d.ts
4
4
  /**
@@ -1,6 +1,7 @@
1
- import { c as effectScope } from "../lib-D6duEs38.mjs";
1
+ import { c as effectScope } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
- import { o as describe, r as afterEach, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
3
+ import { f as it, l as describe, o as afterEach } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
4
+ import { t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
4
5
  import { createSearchParam } from "./search-params.mjs";
5
6
  //#region src/utilities/search-params.test.ts
6
7
  afterEach(() => {
@@ -1,4 +1,5 @@
1
- import { c as test, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
1
+ import { p as test } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
2
+ import { t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
2
3
  //#region src/utilities/ssr.test.ts
3
4
  // @vitest-environment node
4
5
  test.each([
@@ -1,4 +1,4 @@
1
- import { x as Signal } from "../infer-DuFY-y2b.mjs";
1
+ import { x as Signal } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/storage.d.ts
4
4
  type StorageOptions<T> = {
@@ -1,6 +1,7 @@
1
- import { c as effectScope } from "../lib-D6duEs38.mjs";
1
+ import { c as effectScope } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
- import { o as describe, r as afterEach, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
3
+ import { f as it, l as describe, o as afterEach } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
4
+ import { t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
4
5
  import { createLocalStorage, createSessionStorage } from "./storage.mjs";
5
6
  //#region src/utilities/storage.test.ts
6
7
  describe("createLocalStorage", () => {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DuFY-y2b.mjs";
1
+ import { y as Computed } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/throttled.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { m as signal, s as effect } from "../lib-D6duEs38.mjs";
1
+ import { m as signal, s as effect } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
3
  import { createTimeout } from "./timeout.mjs";
4
4
  //#region src/utilities/throttled.ts
@@ -1,6 +1,7 @@
1
- import { c as effectScope, m as signal } from "../lib-D6duEs38.mjs";
1
+ import { c as effectScope, m as signal } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
- import { a as beforeEach, n as vi, o as describe, r as afterEach, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
3
+ import { c as beforeEach, f as it, l as describe, o as afterEach } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
4
+ import { n as vi, t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
4
5
  import { createThrottled } from "./throttled.mjs";
5
6
  //#region src/utilities/throttled.test.ts
6
7
  beforeEach(() => {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DuFY-y2b.mjs";
1
+ import { y as Computed } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/timeout.d.ts
4
4
  type TimeoutResult = {
@@ -1,4 +1,4 @@
1
- import { m as signal, p as onCleanup } from "../lib-D6duEs38.mjs";
1
+ import { m as signal, p as onCleanup } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
3
  //#region src/utilities/timeout.ts
4
4
  /**
@@ -1,6 +1,7 @@
1
- import { c as effectScope } from "../lib-D6duEs38.mjs";
1
+ import { c as effectScope } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
- import { n as vi, o as describe, r as afterEach, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
3
+ import { f as it, l as describe, o as afterEach } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
4
+ import { n as vi, t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
4
5
  import { createTimeout } from "./timeout.mjs";
5
6
  //#region src/utilities/timeout.test.ts
6
7
  afterEach(() => {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DuFY-y2b.mjs";
1
+ import { y as Computed } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/window-focus.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { m as signal } from "../lib-D6duEs38.mjs";
1
+ import { m as signal } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
3
  import { on } from "./event-listener.mjs";
4
4
  import { isBrowser } from "./environment.mjs";
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DuFY-y2b.mjs";
1
+ import { y as Computed } from "../infer-BUUWMoG9.mjs";
2
2
 
3
3
  //#region src/utilities/window-size.d.ts
4
4
  type WindowSizeResult = {
@@ -1,4 +1,4 @@
1
- import { o as computed } from "../lib-D6duEs38.mjs";
1
+ import { o as computed } from "../lib-CVfOddra.mjs";
2
2
  import "../signals/index.mjs";
3
3
  import { fromEvent, sync } from "./event-driven.mjs";
4
4
  import { isBrowser } from "./environment.mjs";
@@ -1,4 +1,5 @@
1
- import { o as describe, s as it, t as globalExpect } from "../test.BmQO5GaM-BeO5pvCo.mjs";
1
+ import { f as it, l as describe } from "../benchmark.CX_oY03V-COK1VBpH.mjs";
2
+ import { t as globalExpect } from "../test.BmQO5GaM-C8YqghE0.mjs";
2
3
  import { windowSize } from "./window-size.mjs";
3
4
  //#region src/utilities/window-size.test.ts
4
5
  describe("windowSize (singleton)", () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elements-kit",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.3.0",
5
5
  "description": "A lightweight reactive UI library that transforms native HTMLElements into reactive components with signals. Ideal for framework-agnostic applications and web components.",
6
6
  "keywords": [
7
7
  "webcomponents",
@@ -15,8 +15,19 @@
15
15
  "html",
16
16
  "web"
17
17
  ],
18
- "author": "@waelbettayeb",
18
+ "author": {
19
+ "name": "Wael Bettayeb",
20
+ "url": "https://x.com/waelbettayeb"
21
+ },
19
22
  "license": "MIT",
23
+ "homepage": "https://elements-kit.com/",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/waelbettayeb/elements-kit.git"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/waelbettayeb/elements-kit/issues"
30
+ },
20
31
  "main": "./dist/index.mjs",
21
32
  "types": "./dist/index.d.mts",
22
33
  "files": [
File without changes