@agnos-ui/core 0.10.0-next.2 → 0.10.0-next.4
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/{accordion-DqnKGmbS.js → accordion-47EpOD36.js} +2 -2
- package/{accordion-DRIm0xHf.cjs → accordion-nxveC0GZ.cjs} +2 -2
- package/{alert-B-jQDQcB.cjs → alert-AhaliJ17.cjs} +1 -1
- package/{alert-gGz2CDS9.js → alert-anMaigvi.js} +1 -1
- package/{collapse-BV4kD3j9.js → collapse-CrfvGo_T.js} +2 -2
- package/{collapse-gLiT080Y.cjs → collapse-Da_27YUU.cjs} +2 -2
- package/{common-D3QcdJ6S.cjs → common-B5jS-Ih_.cjs} +1 -1
- package/{common-DK0ADNTX.js → common-CCxNtFNM.js} +1 -1
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/alert/index.cjs +1 -1
- package/components/alert/index.js +1 -1
- package/components/carousel/index.cjs +2 -2
- package/components/carousel/index.js +2 -2
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.js +1 -1
- package/components/drawer/drawer.d.ts +32 -25
- package/components/drawer/index.cjs +1 -1
- package/components/drawer/index.js +1 -1
- package/components/modal/index.cjs +1 -1
- package/components/modal/index.js +1 -1
- package/components/pagination/index.cjs +1 -1
- package/components/pagination/index.js +1 -1
- package/components/progressbar/index.cjs +1 -1
- package/components/progressbar/index.js +1 -1
- package/components/rating/index.cjs +1 -1
- package/components/rating/index.js +1 -1
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/tree/index.cjs +1 -1
- package/components/tree/index.js +1 -1
- package/{dom-C2gi9OCP.cjs → dom-Cm9_uROp.cjs} +76 -6
- package/{dom-Bcg9ORcA.js → dom-DD1hAVZy.js} +76 -6
- package/drawer-B5Yaqpiu.cjs +297 -0
- package/drawer-CGHyRTM9.js +298 -0
- package/index.cjs +16 -14
- package/index.js +21 -19
- package/{modal-DiXZXYjR.cjs → modal-B_3Uxplo.cjs} +5 -5
- package/{modal-CAvQW-vo.js → modal-cKd3qUn1.js} +5 -5
- package/package.json +1 -1
- package/{pagination-DvZ2rLsz.cjs → pagination-2Vor6JPZ.cjs} +2 -2
- package/{pagination-BKbMROV6.js → pagination-DlOyP_2C.js} +2 -2
- package/{progressbar-D8zIcm9n.js → progressbar-B5g76eMV.js} +2 -2
- package/{progressbar-i9xfAxb7.cjs → progressbar-DyBRINco.cjs} +2 -2
- package/{rating-DmG4oUkr.cjs → rating-C0y1j4SC.cjs} +2 -2
- package/{rating-DEXTGWCU.js → rating-C7C4-p4B.js} +2 -2
- package/{select-MFjAnIt7.cjs → select-Dhsb9msC.cjs} +1 -1
- package/{select-Bw68Xdu5.js → select-nnl00UWY.js} +1 -1
- package/services/floatingUI.cjs +1 -1
- package/services/floatingUI.js +1 -1
- package/services/focusElement.cjs +1 -1
- package/services/focusElement.js +1 -1
- package/services/focustrack.cjs +1 -1
- package/services/focustrack.js +1 -1
- package/services/matchMedia.cjs +1 -1
- package/services/matchMedia.js +1 -1
- package/services/navManager.cjs +1 -1
- package/services/navManager.js +1 -1
- package/services/pointerdownPosition.cjs +60 -0
- package/services/pointerdownPosition.d.ts +42 -0
- package/services/pointerdownPosition.js +60 -0
- package/services/portal.cjs +1 -1
- package/services/portal.js +1 -1
- package/services/resizeObserver.cjs +40 -20
- package/services/resizeObserver.d.ts +10 -2
- package/services/resizeObserver.js +41 -21
- package/services/siblingsInert.cjs +1 -1
- package/services/siblingsInert.js +1 -1
- package/services/transitions/baseTransitions.cjs +2 -2
- package/services/transitions/baseTransitions.js +2 -2
- package/services/transitions/collapse.cjs +11 -15
- package/services/transitions/collapse.js +11 -15
- package/services/transitions/cssTransitions.cjs +1 -1
- package/services/transitions/cssTransitions.js +1 -1
- package/services/transitions/simpleClassTransition.cjs +1 -1
- package/services/transitions/simpleClassTransition.js +1 -1
- package/{slider-Cx50Eghd.js → slider-B4WrdTeE.js} +121 -170
- package/{slider-Dl4Trh32.cjs → slider-DTO58syz.cjs} +120 -169
- package/{toaster-_p1GTtHI.js → toaster-CRPErgI2.js} +3 -3
- package/{toaster-UDglac7x.cjs → toaster-CT148JSJ.cjs} +3 -3
- package/{tree-rGHtmCnS.cjs → tree-C4l2Wqny.cjs} +2 -2
- package/{tree-DV0tfPlZ.js → tree-CHpFqJPx.js} +2 -2
- package/types.cjs +2 -2
- package/types.d.ts +22 -3
- package/types.js +2 -2
- package/utils/directive.cjs +1 -1
- package/utils/directive.d.ts +2 -2
- package/utils/directive.js +1 -1
- package/utils/internal/ssrHTMLElement.d.ts +7 -1
- package/utils/stores.cjs +1 -1
- package/utils/stores.js +1 -1
- package/utils/writables.cjs +2 -1
- package/utils/writables.d.ts +7 -0
- package/utils/writables.js +6 -5
- package/{writables-DcGT98a7.cjs → writables-Dt68gADJ.cjs} +4 -0
- package/{writables-e0tyaQpe.js → writables-Is1bF1Vt.js} +10 -6
- package/drawer-D5SO73ew.js +0 -251
- package/drawer-DP7UPojk.cjs +0 -250
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-
|
|
3
|
-
import { c as c2, g as g2 } from "./alert-
|
|
4
|
-
import { c as c3, g as g3 } from "./collapse-
|
|
5
|
-
import { c as c4, g as g4, a as a2, b, m } from "./modal-
|
|
6
|
-
import { c as c5, g as g5 } from "./pagination-
|
|
7
|
-
import { c as c6, g as g6 } from "./progressbar-
|
|
8
|
-
import { c as c7, g as g7 } from "./rating-
|
|
9
|
-
import { c as c8, g as g8 } from "./select-
|
|
10
|
-
import { c as c9, g as g9 } from "./slider-
|
|
11
|
-
import { T, c as c10, d, g as g10 } from "./toaster-
|
|
12
|
-
import { c as c11, g as g11 } from "./tree-
|
|
13
|
-
import { c as c12, g as g12 } from "./drawer-
|
|
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-CGHyRTM9.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-
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
123
|
+
j2 as typeArray,
|
|
123
124
|
c14 as typeBoolean,
|
|
124
125
|
d3 as typeBooleanOrNull,
|
|
125
|
-
|
|
126
|
-
|
|
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-
|
|
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-
|
|
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,
|
|
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-
|
|
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,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-
|
|
4
|
+
const utils_writables = require("./writables-Dt68gADJ.cjs");
|
|
5
5
|
const utils_func = require("./utils/func.cjs");
|
|
6
|
-
const utils_directive = require("./dom-
|
|
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 {
|
|
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-
|
|
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 {
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
-
const utils_writables = require("./writables-
|
|
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-
|
|
4
|
-
import { e as typeString,
|
|
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-
|
|
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-
|
|
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";
|
package/services/floatingUI.cjs
CHANGED
|
@@ -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-
|
|
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 = {
|
package/services/floatingUI.js
CHANGED
|
@@ -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-
|
|
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-
|
|
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;
|
package/services/focusElement.js
CHANGED
package/services/focustrack.cjs
CHANGED
|
@@ -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-
|
|
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";
|
package/services/focustrack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readable, computed } from "@amadeus-it-group/tansu";
|
|
2
|
-
import { h as createBrowserStoreArrayDirective } from "../dom-
|
|
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";
|
package/services/matchMedia.cjs
CHANGED
|
@@ -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-
|
|
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 }) {
|
package/services/matchMedia.js
CHANGED
|
@@ -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-
|
|
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 }) {
|
package/services/navManager.cjs
CHANGED
|
@@ -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-
|
|
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) {
|
package/services/navManager.js
CHANGED
|
@@ -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-
|
|
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
|
+
};
|
package/services/portal.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const utils_directive = require("../dom-
|
|
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;
|
package/services/portal.js
CHANGED
|
@@ -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-
|
|
4
|
+
const utils_directive = require("../dom-Cm9_uROp.cjs");
|
|
5
5
|
const utils_func = require("../utils/func.cjs");
|
|
6
|
-
const
|
|
7
|
-
const {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
(
|
|
11
|
-
|
|
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(
|
|
17
|
+
entries.forEach((entry) => dimensionsMap.set(entry.target, entry));
|
|
18
|
+
set(dimensionsMap);
|
|
16
19
|
});
|
|
17
|
-
observer.observe(element);
|
|
18
|
-
return () => observer
|
|
20
|
+
elements.forEach((element) => observer.observe(element));
|
|
21
|
+
return () => observer.disconnect();
|
|
19
22
|
},
|
|
20
|
-
|
|
23
|
+
/* @__PURE__ */ new Map()
|
|
21
24
|
);
|
|
22
|
-
return {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
5
|
-
* @returns An object containing the store with the
|
|
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>;
|