@agnos-ui/core 0.10.0-next.2 → 0.10.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/{accordion-DqnKGmbS.js → accordion-47EpOD36.js} +2 -2
  2. package/{accordion-DRIm0xHf.cjs → accordion-nxveC0GZ.cjs} +2 -2
  3. package/{alert-B-jQDQcB.cjs → alert-AhaliJ17.cjs} +1 -1
  4. package/{alert-gGz2CDS9.js → alert-anMaigvi.js} +1 -1
  5. package/{collapse-BV4kD3j9.js → collapse-CrfvGo_T.js} +2 -2
  6. package/{collapse-gLiT080Y.cjs → collapse-Da_27YUU.cjs} +2 -2
  7. package/{common-D3QcdJ6S.cjs → common-B5jS-Ih_.cjs} +1 -1
  8. package/{common-DK0ADNTX.js → common-CCxNtFNM.js} +1 -1
  9. package/components/accordion/index.cjs +1 -1
  10. package/components/accordion/index.js +1 -1
  11. package/components/alert/index.cjs +1 -1
  12. package/components/alert/index.js +1 -1
  13. package/components/carousel/index.cjs +2 -2
  14. package/components/carousel/index.js +2 -2
  15. package/components/collapse/index.cjs +1 -1
  16. package/components/collapse/index.js +1 -1
  17. package/components/drawer/drawer.d.ts +32 -25
  18. package/components/drawer/index.cjs +1 -1
  19. package/components/drawer/index.js +1 -1
  20. package/components/modal/index.cjs +1 -1
  21. package/components/modal/index.js +1 -1
  22. package/components/pagination/index.cjs +1 -1
  23. package/components/pagination/index.js +1 -1
  24. package/components/progressbar/index.cjs +1 -1
  25. package/components/progressbar/index.js +1 -1
  26. package/components/rating/index.cjs +1 -1
  27. package/components/rating/index.js +1 -1
  28. package/components/select/index.cjs +1 -1
  29. package/components/select/index.js +1 -1
  30. package/components/slider/index.cjs +1 -1
  31. package/components/slider/index.js +1 -1
  32. package/components/toast/index.cjs +1 -1
  33. package/components/toast/index.js +1 -1
  34. package/components/tree/index.cjs +1 -1
  35. package/components/tree/index.js +1 -1
  36. package/{dom-C2gi9OCP.cjs → dom-Cm9_uROp.cjs} +76 -6
  37. package/{dom-Bcg9ORcA.js → dom-DD1hAVZy.js} +76 -6
  38. package/drawer-Caz4Uypu.js +291 -0
  39. package/{drawer-DP7UPojk.cjs → drawer-DOi0TqZC.cjs} +131 -91
  40. package/index.cjs +16 -14
  41. package/index.js +21 -19
  42. package/{modal-DiXZXYjR.cjs → modal-B_3Uxplo.cjs} +5 -5
  43. package/{modal-CAvQW-vo.js → modal-cKd3qUn1.js} +5 -5
  44. package/package.json +1 -1
  45. package/{pagination-DvZ2rLsz.cjs → pagination-2Vor6JPZ.cjs} +2 -2
  46. package/{pagination-BKbMROV6.js → pagination-DlOyP_2C.js} +2 -2
  47. package/{progressbar-D8zIcm9n.js → progressbar-B5g76eMV.js} +2 -2
  48. package/{progressbar-i9xfAxb7.cjs → progressbar-DyBRINco.cjs} +2 -2
  49. package/{rating-DmG4oUkr.cjs → rating-C0y1j4SC.cjs} +2 -2
  50. package/{rating-DEXTGWCU.js → rating-C7C4-p4B.js} +2 -2
  51. package/{select-MFjAnIt7.cjs → select-Dhsb9msC.cjs} +1 -1
  52. package/{select-Bw68Xdu5.js → select-nnl00UWY.js} +1 -1
  53. package/services/floatingUI.cjs +1 -1
  54. package/services/floatingUI.js +1 -1
  55. package/services/focusElement.cjs +1 -1
  56. package/services/focusElement.js +1 -1
  57. package/services/focustrack.cjs +1 -1
  58. package/services/focustrack.js +1 -1
  59. package/services/matchMedia.cjs +1 -1
  60. package/services/matchMedia.js +1 -1
  61. package/services/navManager.cjs +1 -1
  62. package/services/navManager.js +1 -1
  63. package/services/pointerdownPosition.cjs +60 -0
  64. package/services/pointerdownPosition.d.ts +42 -0
  65. package/services/pointerdownPosition.js +60 -0
  66. package/services/portal.cjs +1 -1
  67. package/services/portal.js +1 -1
  68. package/services/resizeObserver.cjs +40 -20
  69. package/services/resizeObserver.d.ts +10 -2
  70. package/services/resizeObserver.js +41 -21
  71. package/services/siblingsInert.cjs +1 -1
  72. package/services/siblingsInert.js +1 -1
  73. package/services/transitions/baseTransitions.cjs +2 -2
  74. package/services/transitions/baseTransitions.js +2 -2
  75. package/services/transitions/collapse.cjs +11 -15
  76. package/services/transitions/collapse.js +11 -15
  77. package/services/transitions/cssTransitions.cjs +1 -1
  78. package/services/transitions/cssTransitions.js +1 -1
  79. package/services/transitions/simpleClassTransition.cjs +1 -1
  80. package/services/transitions/simpleClassTransition.js +1 -1
  81. package/{slider-Cx50Eghd.js → slider-B4WrdTeE.js} +121 -170
  82. package/{slider-Dl4Trh32.cjs → slider-DTO58syz.cjs} +120 -169
  83. package/{toaster-_p1GTtHI.js → toaster-CRPErgI2.js} +3 -3
  84. package/{toaster-UDglac7x.cjs → toaster-CT148JSJ.cjs} +3 -3
  85. package/{tree-rGHtmCnS.cjs → tree-C4l2Wqny.cjs} +2 -2
  86. package/{tree-DV0tfPlZ.js → tree-CHpFqJPx.js} +2 -2
  87. package/types.cjs +2 -2
  88. package/types.d.ts +22 -3
  89. package/types.js +2 -2
  90. package/utils/directive.cjs +1 -1
  91. package/utils/directive.d.ts +2 -2
  92. package/utils/directive.js +1 -1
  93. package/utils/internal/ssrHTMLElement.d.ts +7 -1
  94. package/utils/stores.cjs +1 -1
  95. package/utils/stores.js +1 -1
  96. package/utils/writables.cjs +2 -1
  97. package/utils/writables.d.ts +7 -0
  98. package/utils/writables.js +6 -5
  99. package/{writables-DcGT98a7.cjs → writables-Dt68gADJ.cjs} +4 -0
  100. package/{writables-e0tyaQpe.js → writables-Is1bF1Vt.js} +10 -6
  101. package/drawer-D5SO73ew.js +0 -251
package/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { FACTORY_WIDGET_NAME, INVALID_VALUE } from "./types.js";
2
- import { a, c, f, g } from "./accordion-DqnKGmbS.js";
3
- import { c as c2, g as g2 } from "./alert-gGz2CDS9.js";
4
- import { c as c3, g as g3 } from "./collapse-BV4kD3j9.js";
5
- import { c as c4, g as g4, a as a2, b, m } from "./modal-CAvQW-vo.js";
6
- import { c as c5, g as g5 } from "./pagination-BKbMROV6.js";
7
- import { c as c6, g as g6 } from "./progressbar-D8zIcm9n.js";
8
- import { c as c7, g as g7 } from "./rating-DEXTGWCU.js";
9
- import { c as c8, g as g8 } from "./select-Bw68Xdu5.js";
10
- import { c as c9, g as g9 } from "./slider-Cx50Eghd.js";
11
- import { T, c as c10, d, g as g10 } from "./toaster-_p1GTtHI.js";
12
- import { c as c11, g as g11 } from "./tree-DV0tfPlZ.js";
13
- import { c as c12, g as g12 } from "./drawer-D5SO73ew.js";
2
+ import { a, c, f, g } from "./accordion-47EpOD36.js";
3
+ import { c as c2, g as g2 } from "./alert-anMaigvi.js";
4
+ import { c as c3, g as g3 } from "./collapse-CrfvGo_T.js";
5
+ import { c as c4, g as g4, a as a2, b, m } from "./modal-cKd3qUn1.js";
6
+ import { c as c5, g as g5 } from "./pagination-DlOyP_2C.js";
7
+ import { c as c6, g as g6 } from "./progressbar-B5g76eMV.js";
8
+ import { c as c7, g as g7 } from "./rating-C7C4-p4B.js";
9
+ import { c as c8, g as g8 } from "./select-nnl00UWY.js";
10
+ import { c as c9, g as g9 } from "./slider-B4WrdTeE.js";
11
+ import { T, c as c10, d, g as g10 } from "./toaster-CRPErgI2.js";
12
+ import { c as c11, g as g11 } from "./tree-CHpFqJPx.js";
13
+ import { c as c12, g as g12 } from "./drawer-Caz4Uypu.js";
14
14
  import { createWidgetsConfig, mergeInto } from "./config.js";
15
15
  import { extendWidgetProps } from "./services/extendWidget.js";
16
16
  import { createFloatingUI } from "./services/floatingUI.js";
@@ -19,15 +19,15 @@ import { createIntersection } from "./services/intersection.js";
19
19
  import { createMatchMedia } from "./services/matchMedia.js";
20
20
  import { createNavManager, getKeyName, isInternalInputNavigation } from "./services/navManager.js";
21
21
  import { portal } from "./services/portal.js";
22
- import { createResizeObserver } from "./services/resizeObserver.js";
22
+ import { createResizeObserver, createResizeObserverMap } from "./services/resizeObserver.js";
23
23
  import { siblingsInert } from "./services/siblingsInert.js";
24
24
  import { hash$ } from "./services/hash.js";
25
25
  import { createTransition, noAnimation } from "./services/transitions/baseTransitions.js";
26
26
  import { createCSSTransition, getTransitionDurationMs, hasTransition } from "./services/transitions/cssTransitions.js";
27
27
  import { createSimpleClassTransition } from "./services/transitions/simpleClassTransition.js";
28
- import { q, a as a3, c as c13, b as b2, s, p, h, l, j, f as f2, g as g13, k, t, d as d2, e, i, m as m2, n, o, r, u } from "./dom-Bcg9ORcA.js";
28
+ import { q, a as a3, c as c13, b as b2, s, p, h, l, j, f as f2, g as g13, k, t, d as d2, e, i, m as m2, n, o, r, u } from "./dom-DD1hAVZy.js";
29
29
  import { bindableDerived, bindableProp, createPatch, false$, findChangedProperties, idWithDefault, isStore, mergeConfigStores, normalizeConfigStores, stateStores, toReadableStore, toWritableStore, true$, writableWithDefault, writablesForProps, writablesWithDefault } from "./utils/stores.js";
30
- import { j as j2, t as t2, i as i2, c as c14, d as d3, g as g14, h as h2, a as a4, b as b3, e as e2, f as f3 } from "./writables-e0tyaQpe.js";
30
+ import { k as k2, t as t2, j as j2, c as c14, d as d3, h as h2, i as i2, a as a4, b as b3, g as g14, e as e2, f as f3 } from "./writables-Is1bF1Vt.js";
31
31
  export {
32
32
  FACTORY_WIDGET_NAME,
33
33
  INVALID_VALUE,
@@ -62,6 +62,7 @@ export {
62
62
  c6 as createProgressbar,
63
63
  c7 as createRating,
64
64
  createResizeObserver,
65
+ createResizeObserverMap,
65
66
  c8 as createSelect,
66
67
  createSimpleClassTransition,
67
68
  c9 as createSlider,
@@ -70,7 +71,7 @@ export {
70
71
  c10 as createToast,
71
72
  createTransition,
72
73
  c11 as createTree,
73
- j2 as createTypeEnum,
74
+ k2 as createTypeEnum,
74
75
  createWidgetsConfig,
75
76
  d as defaultToasterProps,
76
77
  t as directiveAttributes,
@@ -119,13 +120,14 @@ export {
119
120
  toReadableStore,
120
121
  toWritableStore,
121
122
  true$,
122
- i2 as typeArray,
123
+ j2 as typeArray,
123
124
  c14 as typeBoolean,
124
125
  d3 as typeBooleanOrNull,
125
- g14 as typeFunction,
126
- h2 as typeHTMLElementOrNull,
126
+ h2 as typeFunction,
127
+ i2 as typeHTMLElementOrNull,
127
128
  a4 as typeNumber,
128
129
  b3 as typeNumberInRangeFactory,
130
+ g14 as typeNumberOrNull,
129
131
  e2 as typeString,
130
132
  f3 as typeStringOrNull,
131
133
  writableWithDefault,
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  const tansu = require("@amadeus-it-group/tansu");
3
- const utils_writables = require("./writables-DcGT98a7.cjs");
3
+ const utils_writables = require("./writables-Dt68gADJ.cjs");
4
4
  const utils_stores = require("./utils/stores.cjs");
5
5
  const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
6
6
  const promise = require("./promise-CxCD3NYv.cjs");
7
7
  const utils_func = require("./utils/func.cjs");
8
8
  const scrollbars = require("./scrollbars-CT87iv_6.cjs");
9
- const utils_directive = require("./dom-C2gi9OCP.cjs");
9
+ const utils_directive = require("./dom-Cm9_uROp.cjs");
10
10
  const services_portal = require("./services/portal.cjs");
11
11
  const services_siblingsInert = require("./services/siblingsInert.cjs");
12
12
  const utils_widget = require("./utils/widget.cjs");
13
13
  const services_focusElement = require("./services/focusElement.cjs");
14
- const modalOutsideClick = Symbol();
15
- const modalCloseButtonClick = Symbol();
16
- const modalCloseEscape = Symbol();
14
+ const modalOutsideClick = /* @__PURE__ */ Symbol();
15
+ const modalCloseButtonClick = /* @__PURE__ */ Symbol();
16
+ const modalCloseEscape = /* @__PURE__ */ Symbol();
17
17
  const defaultConfig = {
18
18
  animated: true,
19
19
  ariaCloseButtonLabel: "Close",
@@ -1,18 +1,18 @@
1
1
  import { computed, readable } from "@amadeus-it-group/tansu";
2
- import { c as typeBoolean, g as typeFunction, e as typeString, h as typeHTMLElementOrNull } from "./writables-e0tyaQpe.js";
2
+ import { c as typeBoolean, h as typeFunction, e as typeString, i as typeHTMLElementOrNull } from "./writables-Is1bF1Vt.js";
3
3
  import { writablesForProps, stateStores } from "./utils/stores.js";
4
4
  import { createTransition } from "./services/transitions/baseTransitions.js";
5
5
  import { p as promiseFromStore } from "./promise-Y53vc4Ia.js";
6
6
  import { noop } from "./utils/func.js";
7
7
  import { r as removeScrollbars, a as revertScrollbars } from "./scrollbars-CcxSrnCx.js";
8
- import { a as bindDirective, r as registrationArray, p as createAttributesDirective, n as mergeDirectives, d as directiveSubscribe, c as bindDirectiveNoArg, b as browserDirective } from "./dom-Bcg9ORcA.js";
8
+ import { a as bindDirective, r as registrationArray, p as createAttributesDirective, n as mergeDirectives, d as directiveSubscribe, c as bindDirectiveNoArg, b as browserDirective } from "./dom-DD1hAVZy.js";
9
9
  import { portal } from "./services/portal.js";
10
10
  import { siblingsInert } from "./services/siblingsInert.js";
11
11
  import { createWidgetFactory } from "./utils/widget.js";
12
12
  import { focusElement } from "./services/focusElement.js";
13
- const modalOutsideClick = Symbol();
14
- const modalCloseButtonClick = Symbol();
15
- const modalCloseEscape = Symbol();
13
+ const modalOutsideClick = /* @__PURE__ */ Symbol();
14
+ const modalCloseButtonClick = /* @__PURE__ */ Symbol();
15
+ const modalCloseEscape = /* @__PURE__ */ Symbol();
16
16
  const defaultConfig = {
17
17
  animated: true,
18
18
  ariaCloseButtonLabel: "Close",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agnos-ui/core",
3
3
  "description": "Framework-agnostic headless component library.",
4
- "version": "0.10.0-next.2",
4
+ "version": "0.10.0-next.3",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",
7
7
  "module": "./index.js",
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  const tansu = require("@amadeus-it-group/tansu");
3
3
  const utils_stores = require("./utils/stores.cjs");
4
- const utils_writables = require("./writables-DcGT98a7.cjs");
4
+ const utils_writables = require("./writables-Dt68gADJ.cjs");
5
5
  const utils_func = require("./utils/func.cjs");
6
- const utils_directive = require("./dom-C2gi9OCP.cjs");
6
+ const utils_directive = require("./dom-Cm9_uROp.cjs");
7
7
  const utils_widget = require("./utils/widget.cjs");
8
8
  const PAGE_LINK_DEFAULT = "#";
9
9
  const defaultConfig = {
@@ -1,8 +1,8 @@
1
1
  import { computed } from "@amadeus-it-group/tansu";
2
2
  import { writablesForProps, bindableProp, stateStores, true$ } from "./utils/stores.js";
3
- import { l as isNumber, e as typeString, g as typeFunction, c as typeBoolean, a as typeNumber, k as clamp } from "./writables-e0tyaQpe.js";
3
+ import { m as isNumber, e as typeString, h as typeFunction, c as typeBoolean, a as typeNumber, l as clamp } from "./writables-Is1bF1Vt.js";
4
4
  import { noop } from "./utils/func.js";
5
- import { p as createAttributesDirective } from "./dom-Bcg9ORcA.js";
5
+ import { p as createAttributesDirective } from "./dom-DD1hAVZy.js";
6
6
  import { createWidgetFactory } from "./utils/widget.js";
7
7
  const PAGE_LINK_DEFAULT = "#";
8
8
  const defaultConfig = {
@@ -1,7 +1,7 @@
1
- import { k as clamp, g as typeFunction, e as typeString, a as typeNumber } from "./writables-e0tyaQpe.js";
1
+ import { l as clamp, h as typeFunction, e as typeString, a as typeNumber } from "./writables-Is1bF1Vt.js";
2
2
  import { writablesForProps, stateStores } from "./utils/stores.js";
3
3
  import { computed, readable } from "@amadeus-it-group/tansu";
4
- import { p as createAttributesDirective } from "./dom-Bcg9ORcA.js";
4
+ import { p as createAttributesDirective } from "./dom-DD1hAVZy.js";
5
5
  import { createWidgetFactory } from "./utils/widget.js";
6
6
  const defaultConfig = {
7
7
  min: 0,
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
- const utils_writables = require("./writables-DcGT98a7.cjs");
2
+ const utils_writables = require("./writables-Dt68gADJ.cjs");
3
3
  const utils_stores = require("./utils/stores.cjs");
4
4
  const tansu = require("@amadeus-it-group/tansu");
5
- const utils_directive = require("./dom-C2gi9OCP.cjs");
5
+ const utils_directive = require("./dom-Cm9_uROp.cjs");
6
6
  const utils_widget = require("./utils/widget.cjs");
7
7
  const defaultConfig = {
8
8
  min: 0,
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  const tansu = require("@amadeus-it-group/tansu");
3
3
  const types = require("./types.cjs");
4
- const utils_directive = require("./dom-C2gi9OCP.cjs");
5
- const utils_writables = require("./writables-DcGT98a7.cjs");
4
+ const utils_directive = require("./dom-Cm9_uROp.cjs");
5
+ const utils_writables = require("./writables-Dt68gADJ.cjs");
6
6
  const utils_func = require("./utils/func.cjs");
7
7
  const utils_stores = require("./utils/stores.cjs");
8
8
  const utils_widget = require("./utils/widget.cjs");
@@ -1,7 +1,7 @@
1
1
  import { computed, writable, readable } from "@amadeus-it-group/tansu";
2
2
  import { INVALID_VALUE } from "./types.js";
3
- import { p as createAttributesDirective } from "./dom-Bcg9ORcA.js";
4
- import { e as typeString, g as typeFunction, c as typeBoolean, a as typeNumber, k as clamp, l as isNumber } from "./writables-e0tyaQpe.js";
3
+ import { p as createAttributesDirective } from "./dom-DD1hAVZy.js";
4
+ import { e as typeString, h as typeFunction, c as typeBoolean, a as typeNumber, l as clamp, m as isNumber } from "./writables-Is1bF1Vt.js";
5
5
  import { noop } from "./utils/func.js";
6
6
  import { writablesForProps, bindableProp, stateStores, true$ } from "./utils/stores.js";
7
7
  import { createWidgetFactory } from "./utils/widget.js";
@@ -4,7 +4,7 @@ const dom = require("@floating-ui/dom");
4
4
  const services_floatingUI = require("./services/floatingUI.cjs");
5
5
  const services_focustrack = require("./services/focustrack.cjs");
6
6
  const services_navManager = require("./services/navManager.cjs");
7
- const utils_directive = require("./dom-C2gi9OCP.cjs");
7
+ const utils_directive = require("./dom-Cm9_uROp.cjs");
8
8
  const utils_func = require("./utils/func.cjs");
9
9
  const utils_stores = require("./utils/stores.cjs");
10
10
  const utils_widget = require("./utils/widget.cjs");
@@ -3,7 +3,7 @@ import { offset, autoPlacement, size } from "@floating-ui/dom";
3
3
  import { createFloatingUI } from "./services/floatingUI.js";
4
4
  import { createHasFocus } from "./services/focustrack.js";
5
5
  import { createNavManager } from "./services/navManager.js";
6
- import { v as generateId, n as mergeDirectives, p as createAttributesDirective, a as bindDirective } from "./dom-Bcg9ORcA.js";
6
+ import { v as generateId, n as mergeDirectives, p as createAttributesDirective, a as bindDirective } from "./dom-DD1hAVZy.js";
7
7
  import { noop } from "./utils/func.js";
8
8
  import { writablesForProps, bindableProp, bindableDerived, stateStores, true$ } from "./utils/stores.js";
9
9
  import { createWidgetFactory } from "./utils/widget.js";
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const tansu = require("@amadeus-it-group/tansu");
4
4
  const dom = require("@floating-ui/dom");
5
- const utils_directive = require("../dom-C2gi9OCP.cjs");
5
+ const utils_directive = require("../dom-Cm9_uROp.cjs");
6
6
  const promise = require("../promise-CxCD3NYv.cjs");
7
7
  const utils_stores = require("../utils/stores.cjs");
8
8
  const defaultConfig = {
@@ -1,6 +1,6 @@
1
1
  import { computed, derived } from "@amadeus-it-group/tansu";
2
2
  import { arrow, autoUpdate, computePosition } from "@floating-ui/dom";
3
- import { l as createBrowserStoreDirective, n as mergeDirectives, d as directiveSubscribe } from "../dom-Bcg9ORcA.js";
3
+ import { l as createBrowserStoreDirective, n as mergeDirectives, d as directiveSubscribe } from "../dom-DD1hAVZy.js";
4
4
  import { a as promiseStoreToValueStore } from "../promise-Y53vc4Ia.js";
5
5
  import { writablesForProps, stateStores } from "../utils/stores.js";
6
6
  const defaultConfig = {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const utils_directive = require("../dom-C2gi9OCP.cjs");
3
+ const utils_directive = require("../dom-Cm9_uROp.cjs");
4
4
  const isFocusable = require("../isFocusable-DfzDLeAN.cjs");
5
5
  const stack = [];
6
6
  let stackProcessPlanned = false;
@@ -1,4 +1,4 @@
1
- import { b as browserDirective } from "../dom-Bcg9ORcA.js";
1
+ import { b as browserDirective } from "../dom-DD1hAVZy.js";
2
2
  import { i as isFocusable } from "../isFocusable-Ckwus82R.js";
3
3
  const stack = [];
4
4
  let stackProcessPlanned = false;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const tansu = require("@amadeus-it-group/tansu");
4
- const utils_directive = require("../dom-C2gi9OCP.cjs");
4
+ const utils_directive = require("../dom-Cm9_uROp.cjs");
5
5
  const esmEnv = require("esm-env");
6
6
  const evtFocusIn = "focusin";
7
7
  const evtFocusOut = "focusout";
@@ -1,5 +1,5 @@
1
1
  import { readable, computed } from "@amadeus-it-group/tansu";
2
- import { h as createBrowserStoreArrayDirective } from "../dom-Bcg9ORcA.js";
2
+ import { h as createBrowserStoreArrayDirective } from "../dom-DD1hAVZy.js";
3
3
  import { BROWSER } from "esm-env";
4
4
  const evtFocusIn = "focusin";
5
5
  const evtFocusOut = "focusout";
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const tansu = require("@amadeus-it-group/tansu");
4
4
  const esmEnv = require("esm-env");
5
- const utils_directive = require("../dom-C2gi9OCP.cjs");
5
+ const utils_directive = require("../dom-Cm9_uROp.cjs");
6
6
  const utils_stores = require("../utils/stores.cjs");
7
7
  const createMatchMedia = (query) => esmEnv.BROWSER ? tansu.readable(false, {
8
8
  onUse({ set }) {
@@ -1,6 +1,6 @@
1
1
  import { readable } from "@amadeus-it-group/tansu";
2
2
  import { BROWSER } from "esm-env";
3
- import { w as addEvent } from "../dom-Bcg9ORcA.js";
3
+ import { w as addEvent } from "../dom-DD1hAVZy.js";
4
4
  import { false$ } from "../utils/stores.js";
5
5
  const createMatchMedia = (query) => BROWSER ? readable(false, {
6
6
  onUse({ set }) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const tansu = require("@amadeus-it-group/tansu");
4
- const utils_directive = require("../dom-C2gi9OCP.cjs");
4
+ const utils_directive = require("../dom-Cm9_uROp.cjs");
5
5
  const isFocusable = require("../isFocusable-DfzDLeAN.cjs");
6
6
  const compareDomOrder = (element1, element2) => {
7
7
  if (element1 === element2) {
@@ -1,5 +1,5 @@
1
1
  import { writable, computed } from "@amadeus-it-group/tansu";
2
- import { r as registrationArray, A as computeCommonAncestor, b as browserDirective } from "../dom-Bcg9ORcA.js";
2
+ import { r as registrationArray, A as computeCommonAncestor, b as browserDirective } from "../dom-DD1hAVZy.js";
3
3
  import { i as isFocusable } from "../isFocusable-Ckwus82R.js";
4
4
  const compareDomOrder = (element1, element2) => {
5
5
  if (element1 === element2) {
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const utils_directive = require("../dom-Cm9_uROp.cjs");
4
+ const utils_func = require("../utils/func.cjs");
5
+ const createPointerdownPositionDirective = (onStart) => utils_directive.browserDirective((element, arg) => {
6
+ let activePointerId = null;
7
+ let activeHandlers = null;
8
+ let removePointerMoveEvent = utils_func.noop;
9
+ let removePointerUpEvent = utils_func.noop;
10
+ let removePointerCancelEvent = utils_func.noop;
11
+ const onMove = (e) => {
12
+ if (e.pointerId === activePointerId) {
13
+ e.preventDefault();
14
+ activeHandlers?.onMove?.(e);
15
+ }
16
+ };
17
+ const endCurrent = (e) => {
18
+ removePointerMoveEvent();
19
+ removePointerUpEvent();
20
+ removePointerCancelEvent();
21
+ removePointerMoveEvent = utils_func.noop;
22
+ removePointerUpEvent = utils_func.noop;
23
+ removePointerCancelEvent = utils_func.noop;
24
+ const handlers = activeHandlers;
25
+ activeHandlers = null;
26
+ activePointerId = null;
27
+ handlers?.onEnd?.(e);
28
+ };
29
+ const onEnd = (e) => {
30
+ if (e.pointerId === activePointerId) {
31
+ e.preventDefault();
32
+ endCurrent(e);
33
+ }
34
+ };
35
+ const removePointerDownEvent = utils_directive.addEvent(element, "pointerdown", (e) => {
36
+ if (activeHandlers) {
37
+ endCurrent();
38
+ }
39
+ const pointerId = e.pointerId;
40
+ const startResult = onStart(e, arg);
41
+ if (startResult) {
42
+ e.preventDefault();
43
+ activePointerId = pointerId;
44
+ activeHandlers = startResult;
45
+ removePointerMoveEvent = utils_directive.addEvent(document, "pointermove", onMove);
46
+ removePointerUpEvent = utils_directive.addEvent(document, "pointerup", onEnd);
47
+ removePointerCancelEvent = utils_directive.addEvent(document, "pointercancel", onEnd);
48
+ }
49
+ });
50
+ return {
51
+ update(newArg) {
52
+ arg = newArg;
53
+ },
54
+ destroy() {
55
+ removePointerDownEvent();
56
+ endCurrent();
57
+ }
58
+ };
59
+ });
60
+ exports.createPointerdownPositionDirective = createPointerdownPositionDirective;
@@ -0,0 +1,42 @@
1
+ import type { Directive } from '../types';
2
+ /**
3
+ * Configuration options for tracking pointer position after a pointerdown event.
4
+ */
5
+ export interface PointerPositionHandlers {
6
+ /**
7
+ * Callback function invoked when the mouse moves after a pointerdown event.
8
+ * @param position - The current mouse position information including origin and current coordinates.
9
+ */
10
+ onMove?: (event: PointerEvent) => void;
11
+ /**
12
+ * Callback function invoked when the move ends after a pointerdown event.
13
+ */
14
+ onEnd?: (event?: PointerEvent) => void;
15
+ }
16
+ /**
17
+ * Creates a directive for tracking pointer position during drag operations.
18
+ *
19
+ * This function sets up event listeners that track pointer movements from an initial pointerdown event
20
+ * through pointermover and pointerup events. It provides a directive that can be attached to DOM elements
21
+ * to enable drag tracking functionality.
22
+ *
23
+ * @param onStart - Callback function invoked when the pointerdown event happens.
24
+ *
25
+ * @returns The pointerdownPositionDirective that can be applied to elements.
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * const pointerPositionDirective = createPointerdownPositionDirective((event) => {
30
+ * console.log(`Drag started at (${event.clientX}, ${event.clientY})`);
31
+ * return {
32
+ * onMove: (event) => {
33
+ * console.log(`Dragging: ${event.clientX}, dy=${event.clientY}`);
34
+ * },
35
+ * onEnd: () => {
36
+ * console.log(`Drag ended`);
37
+ * }
38
+ * };
39
+ * });
40
+ * ```
41
+ */
42
+ export declare const createPointerdownPositionDirective: <T = void>(onStart: (position: PointerEvent, arg: T) => PointerPositionHandlers | undefined) => Directive<T>;
@@ -0,0 +1,60 @@
1
+ import { b as browserDirective, w as addEvent } from "../dom-DD1hAVZy.js";
2
+ import { noop } from "../utils/func.js";
3
+ const createPointerdownPositionDirective = (onStart) => browserDirective((element, arg) => {
4
+ let activePointerId = null;
5
+ let activeHandlers = null;
6
+ let removePointerMoveEvent = noop;
7
+ let removePointerUpEvent = noop;
8
+ let removePointerCancelEvent = noop;
9
+ const onMove = (e) => {
10
+ if (e.pointerId === activePointerId) {
11
+ e.preventDefault();
12
+ activeHandlers?.onMove?.(e);
13
+ }
14
+ };
15
+ const endCurrent = (e) => {
16
+ removePointerMoveEvent();
17
+ removePointerUpEvent();
18
+ removePointerCancelEvent();
19
+ removePointerMoveEvent = noop;
20
+ removePointerUpEvent = noop;
21
+ removePointerCancelEvent = noop;
22
+ const handlers = activeHandlers;
23
+ activeHandlers = null;
24
+ activePointerId = null;
25
+ handlers?.onEnd?.(e);
26
+ };
27
+ const onEnd = (e) => {
28
+ if (e.pointerId === activePointerId) {
29
+ e.preventDefault();
30
+ endCurrent(e);
31
+ }
32
+ };
33
+ const removePointerDownEvent = addEvent(element, "pointerdown", (e) => {
34
+ if (activeHandlers) {
35
+ endCurrent();
36
+ }
37
+ const pointerId = e.pointerId;
38
+ const startResult = onStart(e, arg);
39
+ if (startResult) {
40
+ e.preventDefault();
41
+ activePointerId = pointerId;
42
+ activeHandlers = startResult;
43
+ removePointerMoveEvent = addEvent(document, "pointermove", onMove);
44
+ removePointerUpEvent = addEvent(document, "pointerup", onEnd);
45
+ removePointerCancelEvent = addEvent(document, "pointercancel", onEnd);
46
+ }
47
+ });
48
+ return {
49
+ update(newArg) {
50
+ arg = newArg;
51
+ },
52
+ destroy() {
53
+ removePointerDownEvent();
54
+ endCurrent();
55
+ }
56
+ };
57
+ });
58
+ export {
59
+ createPointerdownPositionDirective
60
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const utils_directive = require("../dom-C2gi9OCP.cjs");
3
+ const utils_directive = require("../dom-Cm9_uROp.cjs");
4
4
  const portal = utils_directive.browserDirective((content, newArg) => {
5
5
  let arg;
6
6
  let replaceComment;
@@ -1,4 +1,4 @@
1
- import { b as browserDirective } from "../dom-Bcg9ORcA.js";
1
+ import { b as browserDirective } from "../dom-DD1hAVZy.js";
2
2
  const portal = browserDirective((content, newArg) => {
3
3
  let arg;
4
4
  let replaceComment;
@@ -1,32 +1,52 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const tansu = require("@amadeus-it-group/tansu");
4
- const utils_directive = require("../dom-C2gi9OCP.cjs");
4
+ const utils_directive = require("../dom-Cm9_uROp.cjs");
5
5
  const utils_func = require("../utils/func.cjs");
6
- const createResizeObserver = () => {
7
- const { element$, directive } = utils_directive.createBrowserStoreDirective();
8
- const observedElement$ = tansu.derived(
9
- element$,
10
- (element, set) => {
11
- if (element === null) {
6
+ const createResizeObserverMap = () => {
7
+ const { elements$, directive } = utils_directive.createBrowserStoreArrayDirective();
8
+ const dimensionsMap$ = tansu.derived(
9
+ elements$,
10
+ (elements, set) => {
11
+ const dimensionsMap = /* @__PURE__ */ new Map();
12
+ if (elements.length === 0) {
13
+ set(dimensionsMap);
12
14
  return utils_func.noop;
13
15
  }
14
16
  const observer = new ResizeObserver((entries) => {
15
- set(entries[0]);
17
+ entries.forEach((entry) => dimensionsMap.set(entry.target, entry));
18
+ set(dimensionsMap);
16
19
  });
17
- observer.observe(element);
18
- return () => observer?.disconnect();
20
+ elements.forEach((element) => observer.observe(element));
21
+ return () => observer.disconnect();
19
22
  },
20
- void 0
23
+ /* @__PURE__ */ new Map()
21
24
  );
22
- return {
23
- /**
24
- * Store which contains the dimensions of the observed element (ResizeObserverEntry type)
25
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry | MDN documentation}
26
- */
27
- dimensions$: observedElement$,
28
- /** Directive to be attached to html element in order to listen to resize events */
29
- directive
30
- };
25
+ return { dimensionsMap$, directive };
26
+ };
27
+ const createResizeObserver = () => {
28
+ const { dimensionsMap$, directive: arrayDirective } = createResizeObserverMap();
29
+ let firstElement = null;
30
+ const directive = utils_directive.browserDirective((element) => {
31
+ if (firstElement === null) {
32
+ firstElement = element;
33
+ } else {
34
+ console.error("createResizeObserver directive can only be applied to a single element. Use createResizeObserverMap for multiple elements.");
35
+ return;
36
+ }
37
+ const result = arrayDirective(element);
38
+ if (!result) return;
39
+ const originalDestroy = result.destroy;
40
+ return {
41
+ ...result,
42
+ destroy: () => {
43
+ firstElement = null;
44
+ originalDestroy?.();
45
+ }
46
+ };
47
+ });
48
+ const dimensions$ = tansu.derived(dimensionsMap$, (map) => firstElement ? map.get(firstElement) : void 0, void 0);
49
+ return { dimensions$, directive };
31
50
  };
32
51
  exports.createResizeObserver = createResizeObserver;
52
+ exports.createResizeObserverMap = createResizeObserverMap;
@@ -1,8 +1,16 @@
1
1
  import type { ReadableSignal } from '@amadeus-it-group/tansu';
2
2
  import type { Directive, SSRHTMLElement } from '../types';
3
3
  /**
4
- * Create a resize observer object
5
- * @returns An object containing the store with the dimentions of observed element (ResizeObserverEntry), the directive to be applied to the html element to be observed
4
+ * Create a resize observer that can be applied to multiple elements
5
+ * @returns An object containing the store with the dimensions map of observed elements (ResizeObserverEntry), the directive to be applied to the html element to be observed
6
+ */
7
+ export declare const createResizeObserverMap: () => {
8
+ dimensionsMap$: ReadableSignal<Map<HTMLElement, ResizeObserverEntry>>;
9
+ directive: Directive<void, SSRHTMLElement>;
10
+ };
11
+ /**
12
+ * Create a resize observer object for a single element
13
+ * @returns An object containing the store with the dimensions of observed element (ResizeObserverEntry), the directive to be applied to the html element to be observed
6
14
  */
7
15
  export declare const createResizeObserver: () => {
8
16
  dimensions$: ReadableSignal<ResizeObserverEntry | undefined>;