@tamagui/slider 1.61.2 → 1.62.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/cjs/Slider.js +72 -191
- package/dist/cjs/Slider.js.map +2 -2
- package/dist/cjs/Slider.native.js +438 -0
- package/dist/cjs/Slider.native.js.map +6 -0
- package/dist/cjs/SliderImpl.js +28 -65
- package/dist/cjs/SliderImpl.js.map +1 -1
- package/dist/cjs/SliderImpl.native.js +107 -0
- package/dist/cjs/SliderImpl.native.js.map +6 -0
- package/dist/cjs/constants.js +7 -17
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/constants.native.js +54 -0
- package/dist/cjs/constants.native.js.map +6 -0
- package/dist/cjs/helpers.js +12 -29
- package/dist/cjs/helpers.js.map +1 -1
- package/dist/cjs/helpers.native.js +86 -0
- package/dist/cjs/helpers.native.js.map +6 -0
- package/dist/cjs/index.js +6 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +30 -0
- package/dist/cjs/index.native.js.map +6 -0
- package/dist/cjs/types.js +3 -6
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/types.native.js +15 -0
- package/dist/cjs/types.native.js.map +6 -0
- package/dist/esm/Slider.js +65 -167
- package/dist/esm/Slider.js.map +2 -2
- package/dist/esm/SliderImpl.js +21 -47
- package/dist/esm/SliderImpl.js.map +1 -1
- package/dist/esm/constants.js +2 -8
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/helpers.js +7 -20
- package/dist/esm/helpers.js.map +1 -1
- package/dist/jsx/Slider.js +59 -158
- package/dist/jsx/Slider.js.map +2 -2
- package/dist/jsx/Slider.native.js +419 -0
- package/dist/jsx/Slider.native.js.map +6 -0
- package/dist/jsx/SliderImpl.js +20 -46
- package/dist/jsx/SliderImpl.js.map +1 -1
- package/dist/jsx/SliderImpl.native.js +77 -0
- package/dist/jsx/SliderImpl.native.js.map +6 -0
- package/dist/jsx/constants.js +2 -8
- package/dist/jsx/constants.js.map +1 -1
- package/dist/jsx/constants.native.js +24 -0
- package/dist/jsx/constants.native.js.map +6 -0
- package/dist/jsx/helpers.js +7 -20
- package/dist/jsx/helpers.js.map +1 -1
- package/dist/jsx/helpers.native.js +57 -0
- package/dist/jsx/helpers.native.js.map +6 -0
- package/dist/jsx/index.native.js +7 -0
- package/dist/jsx/index.native.js.map +6 -0
- package/dist/jsx/types.native.js +1 -0
- package/dist/jsx/types.native.js.map +6 -0
- package/package.json +10 -10
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
+
var SliderImpl_exports = {};
|
|
25
|
+
__export(SliderImpl_exports, {
|
|
26
|
+
DirectionalYStack: () => DirectionalYStack,
|
|
27
|
+
SliderFrame: () => SliderFrame,
|
|
28
|
+
SliderImpl: () => SliderImpl
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(SliderImpl_exports);
|
|
31
|
+
var import_core = require("@tamagui/core"), import_get_token = require("@tamagui/get-token"), import_stacks = require("@tamagui/stacks"), React = __toESM(require("react")), import_constants = require("./constants"), import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
const DirectionalYStack = (0, import_core.styled)(import_stacks.YStack, {
|
|
33
|
+
variants: {
|
|
34
|
+
orientation: {
|
|
35
|
+
horizontal: {},
|
|
36
|
+
vertical: {}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}), SliderFrame = (0, import_core.styled)(DirectionalYStack, {
|
|
40
|
+
position: "relative",
|
|
41
|
+
variants: {
|
|
42
|
+
size: (val, extras) => {
|
|
43
|
+
if (!val)
|
|
44
|
+
return;
|
|
45
|
+
const orientation = extras.props.orientation, size = Math.round((0, import_core.getVariableValue)((0, import_get_token.getSize)(val)) / 6);
|
|
46
|
+
return orientation === "horizontal" ? {
|
|
47
|
+
height: size,
|
|
48
|
+
borderRadius: size,
|
|
49
|
+
justifyContent: "center"
|
|
50
|
+
} : {
|
|
51
|
+
width: size,
|
|
52
|
+
borderRadius: size,
|
|
53
|
+
alignItems: "center"
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}), SliderImpl = React.forwardRef(
|
|
58
|
+
(props, forwardedRef) => {
|
|
59
|
+
const {
|
|
60
|
+
__scopeSlider,
|
|
61
|
+
onSlideStart,
|
|
62
|
+
onSlideMove,
|
|
63
|
+
onSlideEnd,
|
|
64
|
+
onHomeKeyDown,
|
|
65
|
+
onEndKeyDown,
|
|
66
|
+
onStepKeyDown,
|
|
67
|
+
...sliderProps
|
|
68
|
+
} = props, context = (0, import_constants.useSliderContext)(import_constants.SLIDER_NAME, __scopeSlider);
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
SliderFrame,
|
|
71
|
+
{
|
|
72
|
+
size: "$4",
|
|
73
|
+
...sliderProps,
|
|
74
|
+
"data-orientation": sliderProps.orientation,
|
|
75
|
+
ref: forwardedRef,
|
|
76
|
+
...import_core.isWeb && {
|
|
77
|
+
onKeyDown: (event) => {
|
|
78
|
+
event.key === "Home" ? (onHomeKeyDown(event), event.preventDefault()) : event.key === "End" ? (onEndKeyDown(event), event.preventDefault()) : import_constants.PAGE_KEYS.concat(import_constants.ARROW_KEYS).includes(event.key) && (onStepKeyDown(event), event.preventDefault());
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
onMoveShouldSetResponderCapture: () => !0,
|
|
82
|
+
onScrollShouldSetResponder: () => !0,
|
|
83
|
+
onScrollShouldSetResponderCapture: () => !0,
|
|
84
|
+
onMoveShouldSetResponder: () => !0,
|
|
85
|
+
onStartShouldSetResponder: () => !0,
|
|
86
|
+
onResponderTerminationRequest: () => !1,
|
|
87
|
+
onResponderGrant: (0, import_core.composeEventHandlers)(props.onResponderGrant, (event) => {
|
|
88
|
+
const target = event.target, isStartingOnThumb = context.thumbs.has(target);
|
|
89
|
+
import_core.isWeb && target instanceof HTMLElement && context.thumbs.has(target) && target.focus(), onSlideStart(event, isStartingOnThumb ? "thumb" : "track");
|
|
90
|
+
}),
|
|
91
|
+
onResponderMove: (0, import_core.composeEventHandlers)(props.onResponderMove, (event) => {
|
|
92
|
+
event.stopPropagation(), onSlideMove(event);
|
|
93
|
+
}),
|
|
94
|
+
onResponderRelease: (0, import_core.composeEventHandlers)(props.onResponderRelease, (event) => {
|
|
95
|
+
onSlideEnd(event);
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
102
|
+
0 && (module.exports = {
|
|
103
|
+
DirectionalYStack,
|
|
104
|
+
SliderFrame,
|
|
105
|
+
SliderImpl
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=SliderImpl.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/SliderImpl.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAsE,0BACtE,mBAAwB,+BACxB,gBAAuB,4BACvB,QAAuB,2BAGvB,mBAAqE,wBAoD/D;AAjDC,MAAM,wBAAoB,oBAAO,sBAAQ;AAAA,EAC9C,UAAU;AAAA,IACR,aAAa;AAAA,MACX,YAAY,CAAC;AAAA,MACb,UAAU,CAAC;AAAA,IACb;AAAA,EACF;AACF,CAAC,GAEY,kBAAc,oBAAO,mBAAmB;AAAA,EACnD,UAAU;AAAA,EAEV,UAAU;AAAA,IACR,MAAM,CAAC,KAAK,WAAW;AACrB,UAAI,CAAC;AACH;AAEF,YAAM,cAAc,OAAO,MAAM,aAC3B,OAAO,KAAK,UAAM,kCAAiB,0BAAQ,GAAG,CAAC,IAAI,CAAC;AAC1D,aAAI,gBAAgB,eACX;AAAA,QACL,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,gBAAgB;AAAA,MAClB,IAEK;AAAA,QACL,OAAO;AAAA,QACP,cAAc;AAAA,QACd,YAAY;AAAA,MACd;AAAA,IACF;AAAA,EACF;AACF,CAAC,GAEY,aAAa,MAAM;AAAA,EAC9B,CAAC,OAAqC,iBAAiB;AACrD,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI,OACE,cAAU,mCAAiB,8BAAa,aAAa;AAC3D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACJ,GAAG;AAAA,QACJ,oBAAkB,YAAY;AAAA,QAC9B,KAAK;AAAA,QACJ,GAAI,qBAAS;AAAA,UACZ,WAAW,CAAC,UAAU;AACpB,YAAI,MAAM,QAAQ,UAChB,cAAc,KAAK,GAEnB,MAAM,eAAe,KACZ,MAAM,QAAQ,SACvB,aAAa,KAAK,GAElB,MAAM,eAAe,KACZ,2BAAU,OAAO,2BAAU,EAAE,SAAS,MAAM,GAAG,MACxD,cAAc,KAAK,GAEnB,MAAM,eAAe;AAAA,UAEzB;AAAA,QACF;AAAA,QACA,iCAAiC,MAAM;AAAA,QACvC,4BAA4B,MAAM;AAAA,QAClC,mCAAmC,MAAM;AAAA,QACzC,0BAA0B,MAAM;AAAA,QAChC,2BAA2B,MAAM;AAAA,QAEjC,+BAA+B,MACtB;AAAA,QAET,sBAAkB,kCAAqB,MAAM,kBAAkB,CAAC,UAAU;AACxE,gBAAM,SAAS,MAAM,QACf,oBAAoB,QAAQ,OAAO,IAAI,MAAM;AAInD,UAAI,qBAAS,kBAAkB,eACzB,QAAQ,OAAO,IAAI,MAAM,KAC3B,OAAO,MAAM,GAGjB,aAAa,OAAO,oBAAoB,UAAU,OAAO;AAAA,QAC3D,CAAC;AAAA,QACD,qBAAiB,kCAAqB,MAAM,iBAAiB,CAAC,UAAU;AACtE,gBAAM,gBAAgB,GAEtB,YAAY,KAAK;AAAA,QACnB,CAAC;AAAA,QACD,wBAAoB,kCAAqB,MAAM,oBAAoB,CAAC,UAAU;AAE5E,qBAAW,KAAK;AAAA,QAClB,CAAC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
5
|
var __export = (target, all) => {
|
|
7
6
|
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable:
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
10
|
for (let key of __getOwnPropNames(from))
|
|
13
|
-
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
12
|
return to;
|
|
17
13
|
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value:
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
19
15
|
var constants_exports = {};
|
|
20
16
|
__export(constants_exports, {
|
|
21
17
|
ARROW_KEYS: () => ARROW_KEYS,
|
|
@@ -31,19 +27,13 @@ __export(constants_exports, {
|
|
|
31
27
|
});
|
|
32
28
|
module.exports = __toCommonJS(constants_exports);
|
|
33
29
|
var import_create_context = require("@tamagui/create-context");
|
|
34
|
-
const SLIDER_NAME = "Slider"
|
|
35
|
-
const [createSliderContext, createSliderScope] = (0, import_create_context.createContextScope)(SLIDER_NAME);
|
|
36
|
-
const [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);
|
|
37
|
-
const [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, {
|
|
30
|
+
const SLIDER_NAME = "Slider", [createSliderContext, createSliderScope] = (0, import_create_context.createContextScope)(SLIDER_NAME), [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME), [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, {
|
|
38
31
|
startEdge: "left",
|
|
39
32
|
endEdge: "right",
|
|
40
33
|
sizeProp: "width",
|
|
41
34
|
size: 0,
|
|
42
35
|
direction: 1
|
|
43
|
-
})
|
|
44
|
-
const PAGE_KEYS = ["PageUp", "PageDown"];
|
|
45
|
-
const ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
46
|
-
const BACK_KEYS = {
|
|
36
|
+
}), PAGE_KEYS = ["PageUp", "PageDown"], ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], BACK_KEYS = {
|
|
47
37
|
ltr: ["ArrowDown", "Home", "ArrowLeft", "PageDown"],
|
|
48
38
|
rtl: ["ArrowDown", "Home", "ArrowRight", "PageDown"]
|
|
49
39
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4BAAmC;AAI5B,MAAM,cAAc,UAEd,CAAC,qBAAqB,iBAAiB,QAAI,0CAAmB,WAAW,GAEzE,CAAC,gBAAgB,gBAAgB,IAC5C,oBAAwC,WAAW,GAExC,CAAC,2BAA2B,2BAA2B,IAClE,oBAMG,aAAa;AAAA,EACd,WAAW;AAAA,EACX,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,WAAW;AACb,CAAC,GAEU,YAAY,CAAC,UAAU,UAAU,GACjC,aAAa,CAAC,WAAW,aAAa,aAAa,YAAY,GAC/D,YAAyC;AAAA,EACpD,KAAK,CAAC,aAAa,QAAQ,aAAa,UAAU;AAAA,EAClD,KAAK,CAAC,aAAa,QAAQ,cAAc,UAAU;AACrD;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var constants_exports = {};
|
|
17
|
+
__export(constants_exports, {
|
|
18
|
+
ARROW_KEYS: () => ARROW_KEYS,
|
|
19
|
+
BACK_KEYS: () => BACK_KEYS,
|
|
20
|
+
PAGE_KEYS: () => PAGE_KEYS,
|
|
21
|
+
SLIDER_NAME: () => SLIDER_NAME,
|
|
22
|
+
SliderOrientationProvider: () => SliderOrientationProvider,
|
|
23
|
+
SliderProvider: () => SliderProvider,
|
|
24
|
+
createSliderContext: () => createSliderContext,
|
|
25
|
+
createSliderScope: () => createSliderScope,
|
|
26
|
+
useSliderContext: () => useSliderContext,
|
|
27
|
+
useSliderOrientationContext: () => useSliderOrientationContext
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(constants_exports);
|
|
30
|
+
var import_create_context = require("@tamagui/create-context");
|
|
31
|
+
const SLIDER_NAME = "Slider", [createSliderContext, createSliderScope] = (0, import_create_context.createContextScope)(SLIDER_NAME), [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME), [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, {
|
|
32
|
+
startEdge: "left",
|
|
33
|
+
endEdge: "right",
|
|
34
|
+
sizeProp: "width",
|
|
35
|
+
size: 0,
|
|
36
|
+
direction: 1
|
|
37
|
+
}), PAGE_KEYS = ["PageUp", "PageDown"], ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], BACK_KEYS = {
|
|
38
|
+
ltr: ["ArrowDown", "Home", "ArrowLeft", "PageDown"],
|
|
39
|
+
rtl: ["ArrowDown", "Home", "ArrowRight", "PageDown"]
|
|
40
|
+
};
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
ARROW_KEYS,
|
|
44
|
+
BACK_KEYS,
|
|
45
|
+
PAGE_KEYS,
|
|
46
|
+
SLIDER_NAME,
|
|
47
|
+
SliderOrientationProvider,
|
|
48
|
+
SliderProvider,
|
|
49
|
+
createSliderContext,
|
|
50
|
+
createSliderScope,
|
|
51
|
+
useSliderContext,
|
|
52
|
+
useSliderOrientationContext
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/constants.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4BAAmC;AAI5B,MAAM,cAAc,UAEd,CAAC,qBAAqB,iBAAiB,QAAI,0CAAmB,WAAW,GAEzE,CAAC,gBAAgB,gBAAgB,IAC5C,oBAAwC,WAAW,GAExC,CAAC,2BAA2B,2BAA2B,IAClE,oBAMG,aAAa;AAAA,EACd,WAAW;AAAA,EACX,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,WAAW;AACb,CAAC,GAEU,YAAY,CAAC,UAAU,UAAU,GACjC,aAAa,CAAC,WAAW,aAAa,aAAa,YAAY,GAC/D,YAAyC;AAAA,EACpD,KAAK,CAAC,aAAa,QAAQ,aAAa,UAAU;AAAA,EAClD,KAAK,CAAC,aAAa,QAAQ,cAAc,UAAU;AACrD;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/dist/cjs/helpers.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
5
|
var __export = (target, all) => {
|
|
7
6
|
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable:
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
10
|
for (let key of __getOwnPropNames(from))
|
|
13
|
-
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
12
|
return to;
|
|
17
13
|
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value:
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
19
15
|
var helpers_exports = {};
|
|
20
16
|
__export(helpers_exports, {
|
|
21
17
|
convertValueToPercentage: () => convertValueToPercentage,
|
|
@@ -31,34 +27,22 @@ __export(helpers_exports, {
|
|
|
31
27
|
module.exports = __toCommonJS(helpers_exports);
|
|
32
28
|
function getNextSortedValues(prevValues = [], nextValue, atIndex) {
|
|
33
29
|
const nextValues = [...prevValues];
|
|
34
|
-
nextValues[atIndex] = nextValue;
|
|
35
|
-
return nextValues.sort((a, b) => a - b);
|
|
30
|
+
return nextValues[atIndex] = nextValue, nextValues.sort((a, b) => a - b);
|
|
36
31
|
}
|
|
37
32
|
function convertValueToPercentage(value, min, max) {
|
|
38
|
-
|
|
39
|
-
const percentPerStep = 100 / maxSteps;
|
|
40
|
-
return percentPerStep * (value - min);
|
|
33
|
+
return 100 / (max - min) * (value - min);
|
|
41
34
|
}
|
|
42
35
|
function getLabel(index, totalValues) {
|
|
43
|
-
|
|
44
|
-
return `Value ${index + 1} of ${totalValues}`;
|
|
45
|
-
} else if (totalValues === 2) {
|
|
46
|
-
return ["Minimum", "Maximum"][index];
|
|
47
|
-
} else {
|
|
48
|
-
return void 0;
|
|
49
|
-
}
|
|
36
|
+
return totalValues > 2 ? `Value ${index + 1} of ${totalValues}` : totalValues === 2 ? ["Minimum", "Maximum"][index] : void 0;
|
|
50
37
|
}
|
|
51
38
|
function getClosestValueIndex(values, nextValue) {
|
|
52
39
|
if (values.length === 1)
|
|
53
40
|
return 0;
|
|
54
|
-
const distances = values.map((value) => Math.abs(value - nextValue));
|
|
55
|
-
const closestDistance = Math.min(...distances);
|
|
41
|
+
const distances = values.map((value) => Math.abs(value - nextValue)), closestDistance = Math.min(...distances);
|
|
56
42
|
return distances.indexOf(closestDistance);
|
|
57
43
|
}
|
|
58
44
|
function getThumbInBoundsOffset(width, left, direction) {
|
|
59
|
-
const halfWidth = width / 2;
|
|
60
|
-
const halfPercent = 50;
|
|
61
|
-
const offset = linearScale([0, halfPercent], [0, halfWidth]);
|
|
45
|
+
const halfWidth = width / 2, offset = linearScale([0, 50], [0, halfWidth]);
|
|
62
46
|
return (halfWidth - offset(left) * direction) * direction;
|
|
63
47
|
}
|
|
64
48
|
function getStepsBetweenValues(values) {
|
|
@@ -67,10 +51,9 @@ function getStepsBetweenValues(values) {
|
|
|
67
51
|
function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
|
|
68
52
|
if (minStepsBetweenValues > 0) {
|
|
69
53
|
const stepsBetweenValues = getStepsBetweenValues(values);
|
|
70
|
-
|
|
71
|
-
return actualMinStepsBetweenValues >= minStepsBetweenValues;
|
|
54
|
+
return Math.min(...stepsBetweenValues) >= minStepsBetweenValues;
|
|
72
55
|
}
|
|
73
|
-
return
|
|
56
|
+
return !0;
|
|
74
57
|
}
|
|
75
58
|
function linearScale(input, output) {
|
|
76
59
|
return (value) => {
|
package/dist/cjs/helpers.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/helpers.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,oBACd,aAAuB,CAAC,GACxB,WACA,SACA;AACA,QAAM,aAAa,CAAC,GAAG,UAAU;AACjC,oBAAW,OAAO,IAAI,WACf,WAAW,KAAK,CAAC,GAAG,MAAM,IAAI,CAAC;AACxC;AAEO,SAAS,yBAAyB,OAAe,KAAa,KAAa;AAGhF,SADuB,OADN,MAAM,QAEE,QAAQ;AACnC;AAKO,SAAS,SAAS,OAAe,aAAqB;AAC3D,SAAI,cAAc,IACT,SAAS,QAAQ,CAAC,OAAO,WAAW,KAClC,gBAAgB,IAClB,CAAC,WAAW,SAAS,EAAE,KAAK,IAEnC;AAEJ;AAUO,SAAS,qBAAqB,QAAkB,WAAmB;AACxE,MAAI,OAAO,WAAW;AAAG,WAAO;AAChC,QAAM,YAAY,OAAO,IAAI,CAAC,UAAU,KAAK,IAAI,QAAQ,SAAS,CAAC,GAC7D,kBAAkB,KAAK,IAAI,GAAG,SAAS;AAC7C,SAAO,UAAU,QAAQ,eAAe;AAC1C;AAMO,SAAS,uBAAuB,OAAe,MAAc,WAAmB;AACrF,QAAM,YAAY,QAAQ,GAEpB,SAAS,YAAY,CAAC,GADR,EACsB,GAAG,CAAC,GAAG,SAAS,CAAC;AAC3D,UAAQ,YAAY,OAAO,IAAI,IAAI,aAAa;AAClD;AASA,SAAS,sBAAsB,QAAkB;AAC/C,SAAO,OAAO,MAAM,GAAG,EAAE,EAAE,IAAI,CAAC,OAAO,UAAU,OAAO,QAAQ,CAAC,IAAI,KAAK;AAC5E;AAcO,SAAS,yBACd,QACA,uBACA;AACA,MAAI,wBAAwB,GAAG;AAC7B,UAAM,qBAAqB,sBAAsB,MAAM;AAEvD,WADoC,KAAK,IAAI,GAAG,kBAAkB,KAC5B;AAAA,EACxC;AACA,SAAO;AACT;AAGO,SAAS,YACd,OACA,QACA;AACA,SAAO,CAAC,UAAkB;AACxB,QAAI,MAAM,CAAC,MAAM,MAAM,CAAC,KAAK,OAAO,CAAC,MAAM,OAAO,CAAC;AAAG,aAAO,OAAO,CAAC;AACrE,UAAM,SAAS,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,MAAM,CAAC,IAAI,MAAM,CAAC;AAC3D,WAAO,OAAO,CAAC,IAAI,SAAS,QAAQ,MAAM,CAAC;AAAA,EAC7C;AACF;AAEO,SAAS,gBAAgB,OAAe;AAC7C,UAAQ,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC,KAAK,IAAI;AAC7C;AAEO,SAAS,WAAW,OAAe,cAAsB;AAC9D,QAAM,UAAU,MAAM;AACtB,SAAO,KAAK,MAAM,QAAQ,OAAO,IAAI;AACvC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var helpers_exports = {};
|
|
17
|
+
__export(helpers_exports, {
|
|
18
|
+
convertValueToPercentage: () => convertValueToPercentage,
|
|
19
|
+
getClosestValueIndex: () => getClosestValueIndex,
|
|
20
|
+
getDecimalCount: () => getDecimalCount,
|
|
21
|
+
getLabel: () => getLabel,
|
|
22
|
+
getNextSortedValues: () => getNextSortedValues,
|
|
23
|
+
getThumbInBoundsOffset: () => getThumbInBoundsOffset,
|
|
24
|
+
hasMinStepsBetweenValues: () => hasMinStepsBetweenValues,
|
|
25
|
+
linearScale: () => linearScale,
|
|
26
|
+
roundValue: () => roundValue
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(helpers_exports);
|
|
29
|
+
function getNextSortedValues(prevValues = [], nextValue, atIndex) {
|
|
30
|
+
const nextValues = [...prevValues];
|
|
31
|
+
return nextValues[atIndex] = nextValue, nextValues.sort((a, b) => a - b);
|
|
32
|
+
}
|
|
33
|
+
function convertValueToPercentage(value, min, max) {
|
|
34
|
+
return 100 / (max - min) * (value - min);
|
|
35
|
+
}
|
|
36
|
+
function getLabel(index, totalValues) {
|
|
37
|
+
return totalValues > 2 ? `Value ${index + 1} of ${totalValues}` : totalValues === 2 ? ["Minimum", "Maximum"][index] : void 0;
|
|
38
|
+
}
|
|
39
|
+
function getClosestValueIndex(values, nextValue) {
|
|
40
|
+
if (values.length === 1)
|
|
41
|
+
return 0;
|
|
42
|
+
const distances = values.map((value) => Math.abs(value - nextValue)), closestDistance = Math.min(...distances);
|
|
43
|
+
return distances.indexOf(closestDistance);
|
|
44
|
+
}
|
|
45
|
+
function getThumbInBoundsOffset(width, left, direction) {
|
|
46
|
+
const halfWidth = width / 2, offset = linearScale([0, 50], [0, halfWidth]);
|
|
47
|
+
return (halfWidth - offset(left) * direction) * direction;
|
|
48
|
+
}
|
|
49
|
+
function getStepsBetweenValues(values) {
|
|
50
|
+
return values.slice(0, -1).map((value, index) => values[index + 1] - value);
|
|
51
|
+
}
|
|
52
|
+
function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
|
|
53
|
+
if (minStepsBetweenValues > 0) {
|
|
54
|
+
const stepsBetweenValues = getStepsBetweenValues(values);
|
|
55
|
+
return Math.min(...stepsBetweenValues) >= minStepsBetweenValues;
|
|
56
|
+
}
|
|
57
|
+
return !0;
|
|
58
|
+
}
|
|
59
|
+
function linearScale(input, output) {
|
|
60
|
+
return (value) => {
|
|
61
|
+
if (input[0] === input[1] || output[0] === output[1])
|
|
62
|
+
return output[0];
|
|
63
|
+
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
|
64
|
+
return output[0] + ratio * (value - input[0]);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function getDecimalCount(value) {
|
|
68
|
+
return (String(value).split(".")[1] || "").length;
|
|
69
|
+
}
|
|
70
|
+
function roundValue(value, decimalCount) {
|
|
71
|
+
const rounder = 10 ** decimalCount;
|
|
72
|
+
return Math.round(value * rounder) / rounder;
|
|
73
|
+
}
|
|
74
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
+
0 && (module.exports = {
|
|
76
|
+
convertValueToPercentage,
|
|
77
|
+
getClosestValueIndex,
|
|
78
|
+
getDecimalCount,
|
|
79
|
+
getLabel,
|
|
80
|
+
getNextSortedValues,
|
|
81
|
+
getThumbInBoundsOffset,
|
|
82
|
+
hasMinStepsBetweenValues,
|
|
83
|
+
linearScale,
|
|
84
|
+
roundValue
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/helpers.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,oBACd,aAAuB,CAAC,GACxB,WACA,SACA;AACA,QAAM,aAAa,CAAC,GAAG,UAAU;AACjC,oBAAW,OAAO,IAAI,WACf,WAAW,KAAK,CAAC,GAAG,MAAM,IAAI,CAAC;AACxC;AAEO,SAAS,yBAAyB,OAAe,KAAa,KAAa;AAGhF,SADuB,OADN,MAAM,QAEE,QAAQ;AACnC;AAKO,SAAS,SAAS,OAAe,aAAqB;AAC3D,SAAI,cAAc,IACT,SAAS,QAAQ,CAAC,OAAO,WAAW,KAClC,gBAAgB,IAClB,CAAC,WAAW,SAAS,EAAE,KAAK,IAEnC;AAEJ;AAUO,SAAS,qBAAqB,QAAkB,WAAmB;AACxE,MAAI,OAAO,WAAW;AAAG,WAAO;AAChC,QAAM,YAAY,OAAO,IAAI,CAAC,UAAU,KAAK,IAAI,QAAQ,SAAS,CAAC,GAC7D,kBAAkB,KAAK,IAAI,GAAG,SAAS;AAC7C,SAAO,UAAU,QAAQ,eAAe;AAC1C;AAMO,SAAS,uBAAuB,OAAe,MAAc,WAAmB;AACrF,QAAM,YAAY,QAAQ,GAEpB,SAAS,YAAY,CAAC,GADR,EACsB,GAAG,CAAC,GAAG,SAAS,CAAC;AAC3D,UAAQ,YAAY,OAAO,IAAI,IAAI,aAAa;AAClD;AASA,SAAS,sBAAsB,QAAkB;AAC/C,SAAO,OAAO,MAAM,GAAG,EAAE,EAAE,IAAI,CAAC,OAAO,UAAU,OAAO,QAAQ,CAAC,IAAI,KAAK;AAC5E;AAcO,SAAS,yBACd,QACA,uBACA;AACA,MAAI,wBAAwB,GAAG;AAC7B,UAAM,qBAAqB,sBAAsB,MAAM;AAEvD,WADoC,KAAK,IAAI,GAAG,kBAAkB,KAC5B;AAAA,EACxC;AACA,SAAO;AACT;AAGO,SAAS,YACd,OACA,QACA;AACA,SAAO,CAAC,UAAkB;AACxB,QAAI,MAAM,CAAC,MAAM,MAAM,CAAC,KAAK,OAAO,CAAC,MAAM,OAAO,CAAC;AAAG,aAAO,OAAO,CAAC;AACrE,UAAM,SAAS,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,MAAM,CAAC,IAAI,MAAM,CAAC;AAC3D,WAAO,OAAO,CAAC,IAAI,SAAS,QAAQ,MAAM,CAAC;AAAA,EAC7C;AACF;AAEO,SAAS,gBAAgB,OAAe;AAC7C,UAAQ,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC,KAAK,IAAI;AAC7C;AAEO,SAAS,WAAW,OAAe,cAAsB;AAC9D,QAAM,UAAU,MAAM;AACtB,SAAO,KAAK,MAAM,QAAQ,OAAO,IAAI;AACvC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
5
|
var __export = (target, all) => {
|
|
7
6
|
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable:
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
10
|
for (let key of __getOwnPropNames(from))
|
|
13
|
-
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
12
|
return to;
|
|
17
|
-
};
|
|
18
|
-
var
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
13
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
20
15
|
var src_exports = {};
|
|
21
16
|
__export(src_exports, {
|
|
22
17
|
DirectionalYStack: () => import_SliderImpl.DirectionalYStack,
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
__export(src_exports, {
|
|
18
|
+
DirectionalYStack: () => import_SliderImpl.DirectionalYStack,
|
|
19
|
+
SliderFrame: () => import_SliderImpl.SliderFrame
|
|
20
|
+
});
|
|
21
|
+
module.exports = __toCommonJS(src_exports);
|
|
22
|
+
__reExport(src_exports, require("./Slider"), module.exports);
|
|
23
|
+
var import_SliderImpl = require("./SliderImpl");
|
|
24
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
+
0 && (module.exports = {
|
|
26
|
+
DirectionalYStack,
|
|
27
|
+
SliderFrame,
|
|
28
|
+
...require("./Slider")
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
package/dist/cjs/types.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
5
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
7
|
for (let key of __getOwnPropNames(from))
|
|
9
|
-
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
9
|
return to;
|
|
13
10
|
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value:
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
12
|
var types_exports = {};
|
|
16
13
|
module.exports = __toCommonJS(types_exports);
|
|
17
14
|
//# sourceMappingURL=types.js.map
|
package/dist/cjs/types.js.map
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
return to;
|
|
11
|
+
};
|
|
12
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
+
var types_exports = {};
|
|
14
|
+
module.exports = __toCommonJS(types_exports);
|
|
15
|
+
//# sourceMappingURL=types.js.map
|