@react-motion-router/stack 2.0.0-beta.eb7bb7e → 2.0.0-beta.sha-dfc284b
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/build/Anchor.d.ts +19 -0
- package/build/GestureRegion.d.ts +5 -0
- package/build/HistoryEntry.d.ts +19 -0
- package/build/Navigation.d.ts +31 -0
- package/build/Router.d.ts +57 -0
- package/build/Screen.d.ts +94 -0
- package/build/animation-configs/animation-presets.d.ts +9 -0
- package/build/animation-configs/keyframe-options-presets.d.ts +7 -0
- package/build/animation-configs/keyframe-presets.d.ts +25 -0
- package/build/common/constants.d.ts +7 -0
- package/build/common/events.d.ts +37 -0
- package/build/common/hooks.d.ts +6 -0
- package/build/common/types.d.ts +40 -0
- package/build/common/utils.d.ts +7 -0
- package/build/index.d.ts +10 -0
- package/build/index.js +2385 -0
- package/build/index.js.map +1 -0
- package/package.json +2 -2
package/build/index.js
ADDED
|
@@ -0,0 +1,2385 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__ from "@react-motion-router/core";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__ from "web-animations-extension";
|
|
4
|
+
/******/ var __webpack_modules__ = ({
|
|
5
|
+
|
|
6
|
+
/***/ 837:
|
|
7
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
var __webpack_unused_export__;
|
|
10
|
+
/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/
|
|
19
|
+
var f=__webpack_require__(810),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
20
|
+
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}__webpack_unused_export__=l;exports.jsx=q;__webpack_unused_export__=q;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/***/ }),
|
|
24
|
+
|
|
25
|
+
/***/ 322:
|
|
26
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
if (true) {
|
|
31
|
+
module.exports = __webpack_require__(837);
|
|
32
|
+
} else {}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
/***/ }),
|
|
36
|
+
|
|
37
|
+
/***/ 319:
|
|
38
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
45
|
+
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
46
|
+
class DoubleTapEvent extends GestureEvent_1.default {
|
|
47
|
+
constructor(touchEvent) {
|
|
48
|
+
super('doubletap', touchEvent);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports["default"] = DoubleTapEvent;
|
|
52
|
+
//# sourceMappingURL=DoubleTapEvent.js.map
|
|
53
|
+
|
|
54
|
+
/***/ }),
|
|
55
|
+
|
|
56
|
+
/***/ 292:
|
|
57
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
61
|
+
var GestureEventTypeEnum;
|
|
62
|
+
(function (GestureEventTypeEnum) {
|
|
63
|
+
GestureEventTypeEnum[GestureEventTypeEnum["tap"] = 0] = "tap";
|
|
64
|
+
GestureEventTypeEnum[GestureEventTypeEnum["longpress"] = 1] = "longpress";
|
|
65
|
+
GestureEventTypeEnum[GestureEventTypeEnum["pinchstart"] = 2] = "pinchstart";
|
|
66
|
+
GestureEventTypeEnum[GestureEventTypeEnum["pinch"] = 3] = "pinch";
|
|
67
|
+
GestureEventTypeEnum[GestureEventTypeEnum["pinchend"] = 4] = "pinchend";
|
|
68
|
+
GestureEventTypeEnum[GestureEventTypeEnum["rotatestart"] = 5] = "rotatestart";
|
|
69
|
+
GestureEventTypeEnum[GestureEventTypeEnum["rotate"] = 6] = "rotate";
|
|
70
|
+
GestureEventTypeEnum[GestureEventTypeEnum["rotateend"] = 7] = "rotateend";
|
|
71
|
+
GestureEventTypeEnum[GestureEventTypeEnum["swipestart"] = 8] = "swipestart";
|
|
72
|
+
GestureEventTypeEnum[GestureEventTypeEnum["swipe"] = 9] = "swipe";
|
|
73
|
+
GestureEventTypeEnum[GestureEventTypeEnum["swipeend"] = 10] = "swipeend";
|
|
74
|
+
GestureEventTypeEnum[GestureEventTypeEnum["panstart"] = 11] = "panstart";
|
|
75
|
+
GestureEventTypeEnum[GestureEventTypeEnum["pan"] = 12] = "pan";
|
|
76
|
+
GestureEventTypeEnum[GestureEventTypeEnum["panend"] = 13] = "panend";
|
|
77
|
+
GestureEventTypeEnum[GestureEventTypeEnum["doubletap"] = 14] = "doubletap";
|
|
78
|
+
})(GestureEventTypeEnum || (GestureEventTypeEnum = {}));
|
|
79
|
+
class GestureEvent extends TouchEvent {
|
|
80
|
+
constructor(type, touchEvent) {
|
|
81
|
+
super(type, {
|
|
82
|
+
touches: Array.from(touchEvent.touches),
|
|
83
|
+
targetTouches: Array.from(touchEvent.targetTouches),
|
|
84
|
+
changedTouches: Array.from(touchEvent.changedTouches),
|
|
85
|
+
ctrlKey: touchEvent.ctrlKey,
|
|
86
|
+
shiftKey: touchEvent.shiftKey,
|
|
87
|
+
altKey: touchEvent.altKey,
|
|
88
|
+
metaKey: touchEvent.metaKey,
|
|
89
|
+
bubbles: true,
|
|
90
|
+
cancelable: true
|
|
91
|
+
});
|
|
92
|
+
if (type.includes("end") || touchEvent.type.includes("end")) {
|
|
93
|
+
this.gestureTarget = touchEvent.changedTouches[0].target;
|
|
94
|
+
this.x = touchEvent.changedTouches[0].clientX;
|
|
95
|
+
this.y = touchEvent.changedTouches[0].clientY;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this.gestureTarget = touchEvent.touches[0].target;
|
|
99
|
+
this.x = touchEvent.touches[0].clientX;
|
|
100
|
+
this.y = touchEvent.touches[0].clientY;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports["default"] = GestureEvent;
|
|
104
|
+
//# sourceMappingURL=GestureEvent.js.map
|
|
105
|
+
|
|
106
|
+
/***/ }),
|
|
107
|
+
|
|
108
|
+
/***/ 747:
|
|
109
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
113
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
114
|
+
};
|
|
115
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
116
|
+
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
117
|
+
class LongPressEvent extends GestureEvent_1.default {
|
|
118
|
+
constructor(touchEvent, duration) {
|
|
119
|
+
super('longpress', touchEvent);
|
|
120
|
+
this.duration = 0;
|
|
121
|
+
this.duration = duration;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports["default"] = LongPressEvent;
|
|
125
|
+
//# sourceMappingURL=LongPressEvent.js.map
|
|
126
|
+
|
|
127
|
+
/***/ }),
|
|
128
|
+
|
|
129
|
+
/***/ 985:
|
|
130
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
134
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
135
|
+
};
|
|
136
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
137
|
+
exports.PanEndEvent = exports.PanStartEvent = void 0;
|
|
138
|
+
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
139
|
+
var PanLifecycleStateEnum;
|
|
140
|
+
(function (PanLifecycleStateEnum) {
|
|
141
|
+
PanLifecycleStateEnum[PanLifecycleStateEnum["start"] = 0] = "start";
|
|
142
|
+
PanLifecycleStateEnum[PanLifecycleStateEnum["end"] = 1] = "end";
|
|
143
|
+
})(PanLifecycleStateEnum || (PanLifecycleStateEnum = {}));
|
|
144
|
+
class PanEventBase extends GestureEvent_1.default {
|
|
145
|
+
constructor(touchEvent, panData, state) {
|
|
146
|
+
let eventType;
|
|
147
|
+
switch (state) {
|
|
148
|
+
case "start":
|
|
149
|
+
eventType = "panstart";
|
|
150
|
+
break;
|
|
151
|
+
case "end":
|
|
152
|
+
eventType = "panend";
|
|
153
|
+
break;
|
|
154
|
+
default:
|
|
155
|
+
eventType = "pan";
|
|
156
|
+
}
|
|
157
|
+
super(eventType, touchEvent);
|
|
158
|
+
this.velocity = panData.velocity;
|
|
159
|
+
this.translation = {
|
|
160
|
+
x: panData.translation.x,
|
|
161
|
+
y: panData.translation.y,
|
|
162
|
+
magnitude: panData.translation.magnitude,
|
|
163
|
+
clientX: panData.translation.clientX,
|
|
164
|
+
clientY: panData.translation.clientY,
|
|
165
|
+
clientMagnitude: panData.translation.clientMagnitude
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
class PanEvent extends PanEventBase {
|
|
170
|
+
constructor(touchEvent, panData) {
|
|
171
|
+
super(touchEvent, panData);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports["default"] = PanEvent;
|
|
175
|
+
class PanStartEvent extends PanEventBase {
|
|
176
|
+
constructor(touchEvent, panData) {
|
|
177
|
+
super(touchEvent, panData, "start");
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
exports.PanStartEvent = PanStartEvent;
|
|
181
|
+
class PanEndEvent extends PanEventBase {
|
|
182
|
+
constructor(touchEvent, panData) {
|
|
183
|
+
super(touchEvent, panData, "end");
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
exports.PanEndEvent = PanEndEvent;
|
|
187
|
+
//# sourceMappingURL=PanEvent.js.map
|
|
188
|
+
|
|
189
|
+
/***/ }),
|
|
190
|
+
|
|
191
|
+
/***/ 731:
|
|
192
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
196
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
197
|
+
};
|
|
198
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
199
|
+
exports.PinchEndEvent = exports.PinchStartEvent = void 0;
|
|
200
|
+
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
201
|
+
var PinchLifecycleStateEnum;
|
|
202
|
+
(function (PinchLifecycleStateEnum) {
|
|
203
|
+
PinchLifecycleStateEnum[PinchLifecycleStateEnum["start"] = 0] = "start";
|
|
204
|
+
PinchLifecycleStateEnum[PinchLifecycleStateEnum["end"] = 1] = "end";
|
|
205
|
+
})(PinchLifecycleStateEnum || (PinchLifecycleStateEnum = {}));
|
|
206
|
+
class PinchEventBase extends GestureEvent_1.default {
|
|
207
|
+
constructor(touchEvent, pinchData, state) {
|
|
208
|
+
let eventType;
|
|
209
|
+
switch (state) {
|
|
210
|
+
case "start":
|
|
211
|
+
eventType = "pinchstart";
|
|
212
|
+
break;
|
|
213
|
+
case "end":
|
|
214
|
+
eventType = "pinchend";
|
|
215
|
+
break;
|
|
216
|
+
default:
|
|
217
|
+
eventType = "pinch";
|
|
218
|
+
}
|
|
219
|
+
super(eventType, touchEvent);
|
|
220
|
+
Object.defineProperty(this, 'scale', {
|
|
221
|
+
value: pinchData.scale,
|
|
222
|
+
writable: false
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
class PinchEvent extends PinchEventBase {
|
|
227
|
+
constructor(touchEvent, pinchData) {
|
|
228
|
+
super(touchEvent, pinchData);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
exports["default"] = PinchEvent;
|
|
232
|
+
class PinchStartEvent extends PinchEventBase {
|
|
233
|
+
constructor(touchEvent, pinchData) {
|
|
234
|
+
super(touchEvent, pinchData, "start");
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
exports.PinchStartEvent = PinchStartEvent;
|
|
238
|
+
class PinchEndEvent extends PinchEventBase {
|
|
239
|
+
constructor(touchEvent, pinchData) {
|
|
240
|
+
super(touchEvent, pinchData, "end");
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
exports.PinchEndEvent = PinchEndEvent;
|
|
244
|
+
//# sourceMappingURL=PinchEvent.js.map
|
|
245
|
+
|
|
246
|
+
/***/ }),
|
|
247
|
+
|
|
248
|
+
/***/ 473:
|
|
249
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
253
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
254
|
+
};
|
|
255
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
256
|
+
exports.RotateEndEvent = exports.RotateStartEvent = void 0;
|
|
257
|
+
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
258
|
+
var RotateLifecycleStateEnum;
|
|
259
|
+
(function (RotateLifecycleStateEnum) {
|
|
260
|
+
RotateLifecycleStateEnum[RotateLifecycleStateEnum["start"] = 0] = "start";
|
|
261
|
+
RotateLifecycleStateEnum[RotateLifecycleStateEnum["end"] = 1] = "end";
|
|
262
|
+
})(RotateLifecycleStateEnum || (RotateLifecycleStateEnum = {}));
|
|
263
|
+
class RotateEventBase extends GestureEvent_1.default {
|
|
264
|
+
constructor(touchEvent, rotationData, state) {
|
|
265
|
+
let eventType;
|
|
266
|
+
switch (state) {
|
|
267
|
+
case "start":
|
|
268
|
+
eventType = "rotatestart";
|
|
269
|
+
break;
|
|
270
|
+
case "end":
|
|
271
|
+
eventType = "rotateend";
|
|
272
|
+
break;
|
|
273
|
+
default:
|
|
274
|
+
eventType = "rotate";
|
|
275
|
+
}
|
|
276
|
+
super(eventType, touchEvent);
|
|
277
|
+
this.anchor = {
|
|
278
|
+
x: rotationData.anchor.x,
|
|
279
|
+
y: rotationData.anchor.y,
|
|
280
|
+
clientX: rotationData.anchor.clientX,
|
|
281
|
+
clientY: rotationData.anchor.clientY
|
|
282
|
+
};
|
|
283
|
+
Object.defineProperty(this, 'rotation', {
|
|
284
|
+
value: rotationData.rotation,
|
|
285
|
+
writable: false
|
|
286
|
+
});
|
|
287
|
+
this.rotationDeg = rotationData.rotationDeg;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
class RotateEvent extends RotateEventBase {
|
|
291
|
+
constructor(touchEvent, rotationData) {
|
|
292
|
+
super(touchEvent, rotationData);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
exports["default"] = RotateEvent;
|
|
296
|
+
class RotateStartEvent extends RotateEventBase {
|
|
297
|
+
constructor(touchEvent, rotationData) {
|
|
298
|
+
super(touchEvent, rotationData, "start");
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
exports.RotateStartEvent = RotateStartEvent;
|
|
302
|
+
class RotateEndEvent extends RotateEventBase {
|
|
303
|
+
constructor(touchEvent, rotationData) {
|
|
304
|
+
super(touchEvent, rotationData, "end");
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
exports.RotateEndEvent = RotateEndEvent;
|
|
308
|
+
//# sourceMappingURL=RotateEvent.js.map
|
|
309
|
+
|
|
310
|
+
/***/ }),
|
|
311
|
+
|
|
312
|
+
/***/ 376:
|
|
313
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
317
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
318
|
+
};
|
|
319
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
320
|
+
exports.SwipeEndEvent = exports.SwipeStartEvent = void 0;
|
|
321
|
+
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
322
|
+
var SwipeLifecycleStateEnum;
|
|
323
|
+
(function (SwipeLifecycleStateEnum) {
|
|
324
|
+
SwipeLifecycleStateEnum[SwipeLifecycleStateEnum["start"] = 0] = "start";
|
|
325
|
+
SwipeLifecycleStateEnum[SwipeLifecycleStateEnum["end"] = 1] = "end";
|
|
326
|
+
})(SwipeLifecycleStateEnum || (SwipeLifecycleStateEnum = {}));
|
|
327
|
+
class SwipeEventBase extends GestureEvent_1.default {
|
|
328
|
+
constructor(touchEvent, swipeData, state) {
|
|
329
|
+
let eventType;
|
|
330
|
+
switch (state) {
|
|
331
|
+
case "start":
|
|
332
|
+
eventType = "swipestart";
|
|
333
|
+
break;
|
|
334
|
+
case "end":
|
|
335
|
+
eventType = "swipeend";
|
|
336
|
+
break;
|
|
337
|
+
default:
|
|
338
|
+
eventType = "swipe";
|
|
339
|
+
}
|
|
340
|
+
super(eventType, touchEvent);
|
|
341
|
+
this.velocity = swipeData.velocity;
|
|
342
|
+
this.direction = swipeData.direction;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
class SwipeEvent extends SwipeEventBase {
|
|
346
|
+
constructor(touchEvent, swipeData) {
|
|
347
|
+
super(touchEvent, swipeData);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
exports["default"] = SwipeEvent;
|
|
351
|
+
class SwipeStartEvent extends SwipeEventBase {
|
|
352
|
+
constructor(touchEvent, swipeData) {
|
|
353
|
+
super(touchEvent, swipeData, "start");
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
exports.SwipeStartEvent = SwipeStartEvent;
|
|
357
|
+
class SwipeEndEvent extends SwipeEventBase {
|
|
358
|
+
constructor(touchEvent, swipeData) {
|
|
359
|
+
super(touchEvent, swipeData, "end");
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
exports.SwipeEndEvent = SwipeEndEvent;
|
|
363
|
+
//# sourceMappingURL=SwipeEvent.js.map
|
|
364
|
+
|
|
365
|
+
/***/ }),
|
|
366
|
+
|
|
367
|
+
/***/ 59:
|
|
368
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
372
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
373
|
+
};
|
|
374
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
375
|
+
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
376
|
+
class TapEvent extends GestureEvent_1.default {
|
|
377
|
+
constructor(touchEvent) {
|
|
378
|
+
super('tap', touchEvent);
|
|
379
|
+
this.duration = 0;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
exports["default"] = TapEvent;
|
|
383
|
+
//# sourceMappingURL=TapEvent.js.map
|
|
384
|
+
|
|
385
|
+
/***/ }),
|
|
386
|
+
|
|
387
|
+
/***/ 190:
|
|
388
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
392
|
+
if (k2 === undefined) k2 = k;
|
|
393
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
394
|
+
}) : (function(o, m, k, k2) {
|
|
395
|
+
if (k2 === undefined) k2 = k;
|
|
396
|
+
o[k2] = m[k];
|
|
397
|
+
}));
|
|
398
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
399
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
400
|
+
}) : function(o, v) {
|
|
401
|
+
o["default"] = v;
|
|
402
|
+
});
|
|
403
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
404
|
+
if (mod && mod.__esModule) return mod;
|
|
405
|
+
var result = {};
|
|
406
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
407
|
+
__setModuleDefault(result, mod);
|
|
408
|
+
return result;
|
|
409
|
+
};
|
|
410
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
411
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
412
|
+
};
|
|
413
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
414
|
+
exports.RotateEndEvent = exports.RotateEvent = exports.RotateStartEvent = exports.PinchEndEvent = exports.PinchEvent = exports.PinchStartEvent = exports.PanEndEvent = exports.PanEvent = exports.PanStartEvent = exports.SwipeEndEvent = exports.SwipeEvent = exports.SwipeStartEvent = exports.DoubleTapEvent = exports.LongPressEvent = exports.GestureEvent = exports.TapEvent = void 0;
|
|
415
|
+
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
416
|
+
exports.GestureEvent = GestureEvent_1.default;
|
|
417
|
+
const LongPressEvent_1 = __importDefault(__webpack_require__(747));
|
|
418
|
+
exports.LongPressEvent = LongPressEvent_1.default;
|
|
419
|
+
const TapEvent_1 = __importDefault(__webpack_require__(59));
|
|
420
|
+
exports.TapEvent = TapEvent_1.default;
|
|
421
|
+
const DoubleTapEvent_1 = __importDefault(__webpack_require__(319));
|
|
422
|
+
exports.DoubleTapEvent = DoubleTapEvent_1.default;
|
|
423
|
+
const SwipeEvent_1 = __importStar(__webpack_require__(376));
|
|
424
|
+
exports.SwipeEvent = SwipeEvent_1.default;
|
|
425
|
+
Object.defineProperty(exports, "SwipeEndEvent", ({ enumerable: true, get: function () { return SwipeEvent_1.SwipeEndEvent; } }));
|
|
426
|
+
Object.defineProperty(exports, "SwipeStartEvent", ({ enumerable: true, get: function () { return SwipeEvent_1.SwipeStartEvent; } }));
|
|
427
|
+
const PanEvent_1 = __importStar(__webpack_require__(985));
|
|
428
|
+
exports.PanEvent = PanEvent_1.default;
|
|
429
|
+
Object.defineProperty(exports, "PanEndEvent", ({ enumerable: true, get: function () { return PanEvent_1.PanEndEvent; } }));
|
|
430
|
+
Object.defineProperty(exports, "PanStartEvent", ({ enumerable: true, get: function () { return PanEvent_1.PanStartEvent; } }));
|
|
431
|
+
const PinchEvent_1 = __importStar(__webpack_require__(731));
|
|
432
|
+
exports.PinchEvent = PinchEvent_1.default;
|
|
433
|
+
Object.defineProperty(exports, "PinchEndEvent", ({ enumerable: true, get: function () { return PinchEvent_1.PinchEndEvent; } }));
|
|
434
|
+
Object.defineProperty(exports, "PinchStartEvent", ({ enumerable: true, get: function () { return PinchEvent_1.PinchStartEvent; } }));
|
|
435
|
+
const RotateEvent_1 = __importStar(__webpack_require__(473));
|
|
436
|
+
exports.RotateEvent = RotateEvent_1.default;
|
|
437
|
+
Object.defineProperty(exports, "RotateEndEvent", ({ enumerable: true, get: function () { return RotateEvent_1.RotateEndEvent; } }));
|
|
438
|
+
Object.defineProperty(exports, "RotateStartEvent", ({ enumerable: true, get: function () { return RotateEvent_1.RotateStartEvent; } }));
|
|
439
|
+
const utils_1 = __webpack_require__(46);
|
|
440
|
+
var CartesianDirectionEnum;
|
|
441
|
+
(function (CartesianDirectionEnum) {
|
|
442
|
+
CartesianDirectionEnum[CartesianDirectionEnum["right"] = 0] = "right";
|
|
443
|
+
CartesianDirectionEnum[CartesianDirectionEnum["up"] = 1] = "up";
|
|
444
|
+
CartesianDirectionEnum[CartesianDirectionEnum["left"] = 2] = "left";
|
|
445
|
+
CartesianDirectionEnum[CartesianDirectionEnum["down"] = 3] = "down";
|
|
446
|
+
})(CartesianDirectionEnum || (CartesianDirectionEnum = {}));
|
|
447
|
+
class GestureProvider {
|
|
448
|
+
constructor() {
|
|
449
|
+
this.touchStart = new TouchEvent('touchstart') || {};
|
|
450
|
+
this.touchMove = new TouchEvent('touchmove') || {};
|
|
451
|
+
this.touchEnd = new TouchEvent('touchend') || {};
|
|
452
|
+
this.touchCancel = new TouchEvent('touchcancel') || {};
|
|
453
|
+
this.velocity = 0;
|
|
454
|
+
this.dxDy = new utils_1.Vec2(0, 0);
|
|
455
|
+
this.scale = 1;
|
|
456
|
+
this.rotation = 0;
|
|
457
|
+
this.rotationDeg = 0;
|
|
458
|
+
this.anchor = new utils_1.Vec2(0, 0);
|
|
459
|
+
this.octant = 0;
|
|
460
|
+
this.isPanning = false;
|
|
461
|
+
this.isPinching = false;
|
|
462
|
+
this.isSwiping = false;
|
|
463
|
+
this.isRotating = false;
|
|
464
|
+
this.touchStartTime = 0;
|
|
465
|
+
this.touchEndTime = 0;
|
|
466
|
+
this.lastTouchTime = 0;
|
|
467
|
+
this.taps = 0;
|
|
468
|
+
this.scaleBase = 0;
|
|
469
|
+
this.touchMoved = false;
|
|
470
|
+
this.touchDown = false;
|
|
471
|
+
this.shouldFire = false;
|
|
472
|
+
this.pointers = 0;
|
|
473
|
+
this.isLongPress = false;
|
|
474
|
+
this.longPressTimeout = 0;
|
|
475
|
+
this.touchStartListener = this.onTouchStart.bind(this);
|
|
476
|
+
this.touchMoveListener = this.onTouchMove.bind(this);
|
|
477
|
+
this.touchEndListener = this.onTouchEnd.bind(this);
|
|
478
|
+
this.touchCancelListener = this.onTouchCancel.bind(this);
|
|
479
|
+
this.currentTarget = window;
|
|
480
|
+
this.config = {
|
|
481
|
+
longPressDuration: 500,
|
|
482
|
+
tapDelay: 500,
|
|
483
|
+
minPointers: 1,
|
|
484
|
+
numberOfTaps: 0
|
|
485
|
+
};
|
|
486
|
+
if (!GestureProvider.listening) {
|
|
487
|
+
if (TouchEvent)
|
|
488
|
+
window.addEventListener('touchstart', this.touchStartListener, true);
|
|
489
|
+
GestureProvider.listening = true;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
bind(target) {
|
|
493
|
+
this.unbind(this.currentTarget);
|
|
494
|
+
target.addEventListener('touchmove', this.touchMoveListener, true);
|
|
495
|
+
target.addEventListener('touchend', this.touchEndListener, true);
|
|
496
|
+
target.addEventListener('touchcancel', this.touchCancelListener, true);
|
|
497
|
+
this.currentTarget = target;
|
|
498
|
+
}
|
|
499
|
+
unbind(target) {
|
|
500
|
+
target.removeEventListener('touchmove', this.touchMoveListener);
|
|
501
|
+
target.removeEventListener('touchend', this.touchEndListener);
|
|
502
|
+
target.removeEventListener('touchcancel', this.touchCancelListener);
|
|
503
|
+
}
|
|
504
|
+
clean() {
|
|
505
|
+
this.touchMoved = false;
|
|
506
|
+
this.touchStartTime = 0;
|
|
507
|
+
this.touchDown = false;
|
|
508
|
+
this.scaleBase = 0;
|
|
509
|
+
if (this.longPressTimeout && !this.isLongPress) {
|
|
510
|
+
clearTimeout(this.longPressTimeout);
|
|
511
|
+
this.longPressTimeout = 0;
|
|
512
|
+
}
|
|
513
|
+
this.isLongPress = false;
|
|
514
|
+
}
|
|
515
|
+
onPointerLeave(touchEnd) {
|
|
516
|
+
if (!touchEnd.touches.length) {
|
|
517
|
+
if (this.isSwiping) {
|
|
518
|
+
const swipeEndEvent = new SwipeEvent_1.SwipeEndEvent(touchEnd, {
|
|
519
|
+
velocity: this.velocity,
|
|
520
|
+
direction: CartesianDirectionEnum[(0, utils_1.closest)(this.octant, [0, 1, 2, 3])]
|
|
521
|
+
});
|
|
522
|
+
this.dispatchEvent(swipeEndEvent);
|
|
523
|
+
this.isSwiping = false;
|
|
524
|
+
}
|
|
525
|
+
if (this.isPanning) {
|
|
526
|
+
const panEndEvent = new PanEvent_1.PanEndEvent(touchEnd, {
|
|
527
|
+
translation: this.dxDy,
|
|
528
|
+
velocity: this.velocity
|
|
529
|
+
});
|
|
530
|
+
this.dispatchEvent(panEndEvent);
|
|
531
|
+
this.isPanning = false;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
if (touchEnd.touches.length === 1) {
|
|
535
|
+
this.scaleBase = 0;
|
|
536
|
+
if (this.isPinching) {
|
|
537
|
+
const pinchEndEvent = new PinchEvent_1.PinchEndEvent(touchEnd, {
|
|
538
|
+
scale: this.scale
|
|
539
|
+
});
|
|
540
|
+
this.dispatchEvent(pinchEndEvent);
|
|
541
|
+
this.isPinching = false;
|
|
542
|
+
}
|
|
543
|
+
if (this.isRotating) {
|
|
544
|
+
const rotateEndEvent = new RotateEvent_1.RotateEndEvent(touchEnd, {
|
|
545
|
+
rotation: this.rotation,
|
|
546
|
+
rotationDeg: this.rotationDeg,
|
|
547
|
+
anchor: this.anchor
|
|
548
|
+
});
|
|
549
|
+
this.dispatchEvent(rotateEndEvent);
|
|
550
|
+
this.isRotating = false;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
dispatchEvent(gestureEvent) {
|
|
555
|
+
queueMicrotask(() => {
|
|
556
|
+
this.currentTarget.dispatchEvent(gestureEvent);
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
onTouchStart(touchStart) {
|
|
560
|
+
if (this.currentTarget !== touchStart.touches[0].target) {
|
|
561
|
+
this.clean();
|
|
562
|
+
this.unbind(this.currentTarget);
|
|
563
|
+
this.pointers = this.touchEnd.touches.length;
|
|
564
|
+
this.taps = 0;
|
|
565
|
+
}
|
|
566
|
+
this.touchStart = touchStart;
|
|
567
|
+
const minPointers = parseInt(touchStart.touches[0].target.dataset.minpointers || '0') || this.config.minPointers;
|
|
568
|
+
if (this.touchStart.touches.length < minPointers) {
|
|
569
|
+
this.shouldFire = false;
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
this.shouldFire = true;
|
|
573
|
+
this.touchStartTime = touchStart.timeStamp;
|
|
574
|
+
this.touchDown = true;
|
|
575
|
+
if (!this.pointers)
|
|
576
|
+
this.bind(touchStart.touches[0].target);
|
|
577
|
+
this.pointers = this.touchStart.touches.length;
|
|
578
|
+
const longPressDuration = parseFloat(this.currentTarget.dataset.longpressduration || '0') || this.config.longPressDuration;
|
|
579
|
+
if (!this.longPressTimeout) {
|
|
580
|
+
this.longPressTimeout = setTimeout(() => {
|
|
581
|
+
if (!this.touchMoved && this.touchDown) {
|
|
582
|
+
const touchDuration = Date.now() - this.touchStartTime;
|
|
583
|
+
const longPressEvent = new LongPressEvent_1.default(this.touchStart, touchDuration);
|
|
584
|
+
this.dispatchEvent(longPressEvent);
|
|
585
|
+
this.isLongPress = true;
|
|
586
|
+
this.longPressTimeout = 0;
|
|
587
|
+
}
|
|
588
|
+
}, longPressDuration);
|
|
589
|
+
}
|
|
590
|
+
if (this.touchStart.touches.length > 1) {
|
|
591
|
+
const originPointerPrimary = new utils_1.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY);
|
|
592
|
+
const originPointerSecondary = new utils_1.Vec2(this.touchStart.touches[1].clientX, this.touchStart.touches[1].clientY);
|
|
593
|
+
this.scaleBase = originPointerPrimary.substract(originPointerSecondary).magnitude;
|
|
594
|
+
}
|
|
595
|
+
else
|
|
596
|
+
this.scaleBase = 0;
|
|
597
|
+
}
|
|
598
|
+
onTouchMove(touchMove) {
|
|
599
|
+
if (!this.shouldFire)
|
|
600
|
+
return;
|
|
601
|
+
this.touchMoved = true;
|
|
602
|
+
this.touchMove = touchMove;
|
|
603
|
+
if (touchMove.touches.length > 1 && this.touchStart.touches.length > 1) {
|
|
604
|
+
if (touchMove.touches[1].clientX !== this.touchStart.touches[1].clientX
|
|
605
|
+
|| touchMove.touches[1].clientY !== this.touchStart.touches[1].clientY) {
|
|
606
|
+
const currentPointerPrimary = new utils_1.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY);
|
|
607
|
+
const currentPointerSecondary = new utils_1.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY);
|
|
608
|
+
const originPointerPrimary = new utils_1.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY);
|
|
609
|
+
const distance = currentPointerPrimary.substract(currentPointerSecondary);
|
|
610
|
+
if (this.scaleBase && Math.abs(this.scaleBase - distance.magnitude) > 10) {
|
|
611
|
+
const scaleFactor = distance.magnitude / this.scaleBase;
|
|
612
|
+
this.scale = scaleFactor;
|
|
613
|
+
if (this.isPinching) {
|
|
614
|
+
const pinchEvent = new PinchEvent_1.default(touchMove, {
|
|
615
|
+
scale: scaleFactor
|
|
616
|
+
});
|
|
617
|
+
this.dispatchEvent(pinchEvent);
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
const pinchStartEvent = new PinchEvent_1.PinchStartEvent(touchMove, {
|
|
621
|
+
scale: scaleFactor
|
|
622
|
+
});
|
|
623
|
+
this.dispatchEvent(pinchStartEvent);
|
|
624
|
+
this.isPinching = true;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
this.anchor = currentPointerPrimary;
|
|
628
|
+
let rotationAngle = Math.atan2((originPointerPrimary.clientY - currentPointerSecondary.clientY), (originPointerPrimary.clientX - currentPointerSecondary.clientX));
|
|
629
|
+
rotationAngle < 0 ? rotationAngle += 1.5708 : rotationAngle -= 1.5708;
|
|
630
|
+
this.rotation = rotationAngle;
|
|
631
|
+
this.rotationDeg = rotationAngle * 180 / Math.PI;
|
|
632
|
+
this.anchor = this.anchor;
|
|
633
|
+
if (this.isRotating) {
|
|
634
|
+
const rotateEvent = new RotateEvent_1.default(touchMove, {
|
|
635
|
+
anchor: this.anchor,
|
|
636
|
+
rotation: this.rotation,
|
|
637
|
+
rotationDeg: this.rotationDeg
|
|
638
|
+
});
|
|
639
|
+
this.dispatchEvent(rotateEvent);
|
|
640
|
+
}
|
|
641
|
+
else {
|
|
642
|
+
const rotateStartEvent = new RotateEvent_1.RotateStartEvent(touchMove, {
|
|
643
|
+
anchor: this.anchor,
|
|
644
|
+
rotation: this.rotation,
|
|
645
|
+
rotationDeg: this.rotationDeg
|
|
646
|
+
});
|
|
647
|
+
this.dispatchEvent(rotateStartEvent);
|
|
648
|
+
this.isRotating = true;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
const origin = new utils_1.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY);
|
|
653
|
+
const currentPosition = new utils_1.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY);
|
|
654
|
+
const dxDy = currentPosition.substract(origin);
|
|
655
|
+
const length = dxDy.magnitude;
|
|
656
|
+
const normalised = {
|
|
657
|
+
x: dxDy.x / length,
|
|
658
|
+
y: dxDy.y / length
|
|
659
|
+
};
|
|
660
|
+
const angle = Math.atan2(normalised.y, normalised.x);
|
|
661
|
+
this.octant = Math.round(4 * angle / (2 * Math.PI) + 4) % 4;
|
|
662
|
+
const dt = (touchMove.timeStamp - this.touchStart.timeStamp) / 1000;
|
|
663
|
+
const velocity = dxDy.magnitude / dt;
|
|
664
|
+
if (this.isSwiping) {
|
|
665
|
+
const swipeEvent = new SwipeEvent_1.default(touchMove, {
|
|
666
|
+
direction: CartesianDirectionEnum[(0, utils_1.closest)(this.octant, [0, 1, 2, 3])],
|
|
667
|
+
velocity: velocity
|
|
668
|
+
});
|
|
669
|
+
this.dispatchEvent(swipeEvent);
|
|
670
|
+
}
|
|
671
|
+
else {
|
|
672
|
+
const swipeStartEvent = new SwipeEvent_1.SwipeStartEvent(touchMove, {
|
|
673
|
+
direction: CartesianDirectionEnum[(0, utils_1.closest)(this.octant, [0, 1, 2, 3])],
|
|
674
|
+
velocity: velocity
|
|
675
|
+
});
|
|
676
|
+
this.dispatchEvent(swipeStartEvent);
|
|
677
|
+
this.isSwiping = true;
|
|
678
|
+
}
|
|
679
|
+
this.dxDy = dxDy;
|
|
680
|
+
this.velocity = velocity;
|
|
681
|
+
if (this.isPanning) {
|
|
682
|
+
const panEvent = new PanEvent_1.default(touchMove, {
|
|
683
|
+
translation: dxDy,
|
|
684
|
+
velocity: velocity
|
|
685
|
+
});
|
|
686
|
+
this.dispatchEvent(panEvent);
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
const panStartEvent = new PanEvent_1.PanStartEvent(touchMove, {
|
|
690
|
+
translation: dxDy,
|
|
691
|
+
velocity: velocity
|
|
692
|
+
});
|
|
693
|
+
this.dispatchEvent(panStartEvent);
|
|
694
|
+
this.isPanning = true;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
onTouchEnd(touchEnd) {
|
|
698
|
+
const numberOfTaps = parseInt(this.currentTarget.dataset.numberoftaps || '0') || this.config.numberOfTaps;
|
|
699
|
+
this.taps++;
|
|
700
|
+
this.shouldFire = Boolean(this.taps > numberOfTaps);
|
|
701
|
+
if (this.shouldFire) {
|
|
702
|
+
this.touchEnd = touchEnd;
|
|
703
|
+
this.touchEndTime = touchEnd.timeStamp;
|
|
704
|
+
const maxTapDelay = parseFloat(this.currentTarget.dataset.tapdelay || '0') || this.config.tapDelay;
|
|
705
|
+
if (!this.touchMoved && !this.isLongPress) {
|
|
706
|
+
if (this.taps === 1 || (this.touchEndTime - this.lastTouchTime) < maxTapDelay) {
|
|
707
|
+
if (this.taps % 2 === numberOfTaps) {
|
|
708
|
+
const doubleTapEvent = new DoubleTapEvent_1.default(touchEnd);
|
|
709
|
+
this.dispatchEvent(doubleTapEvent);
|
|
710
|
+
this.taps = 0;
|
|
711
|
+
}
|
|
712
|
+
const tapEvent = new TapEvent_1.default(touchEnd);
|
|
713
|
+
this.dispatchEvent(tapEvent);
|
|
714
|
+
}
|
|
715
|
+
else {
|
|
716
|
+
this.taps = 0;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
this.pointers = this.touchEnd.touches.length;
|
|
721
|
+
this.lastTouchTime = this.touchEndTime;
|
|
722
|
+
this.onPointerLeave(touchEnd);
|
|
723
|
+
this.unbind(this.currentTarget);
|
|
724
|
+
this.clean();
|
|
725
|
+
}
|
|
726
|
+
onTouchCancel(touchCancel) {
|
|
727
|
+
if (!this.shouldFire)
|
|
728
|
+
return;
|
|
729
|
+
this.touchCancel = touchCancel;
|
|
730
|
+
this.unbind(this.currentTarget);
|
|
731
|
+
this.clean();
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
exports["default"] = GestureProvider;
|
|
735
|
+
GestureProvider.listening = false;
|
|
736
|
+
if (TouchEvent)
|
|
737
|
+
window.gestureProvider = new GestureProvider();
|
|
738
|
+
//# sourceMappingURL=index.js.map
|
|
739
|
+
|
|
740
|
+
/***/ }),
|
|
741
|
+
|
|
742
|
+
/***/ 46:
|
|
743
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
747
|
+
exports.closest = exports.Vec2 = exports.assert = void 0;
|
|
748
|
+
function assert(condition, message) {
|
|
749
|
+
if (!condition) {
|
|
750
|
+
throw new Error(message);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
exports.assert = assert;
|
|
754
|
+
class Vec2 {
|
|
755
|
+
constructor(_x, _y) {
|
|
756
|
+
this._x = 0;
|
|
757
|
+
this._y = 0;
|
|
758
|
+
this._clientX = 0;
|
|
759
|
+
this._clientY = 0;
|
|
760
|
+
this._clientX = _x;
|
|
761
|
+
this._clientY = _y;
|
|
762
|
+
this._x = this.translateX(_x);
|
|
763
|
+
this._y = this.translateY(_y);
|
|
764
|
+
}
|
|
765
|
+
translateY(_y) {
|
|
766
|
+
return -(_y - window.innerHeight / 2);
|
|
767
|
+
}
|
|
768
|
+
translateX(_x) {
|
|
769
|
+
return _x - window.innerWidth / 2;
|
|
770
|
+
}
|
|
771
|
+
get x() {
|
|
772
|
+
return this._x;
|
|
773
|
+
}
|
|
774
|
+
get y() {
|
|
775
|
+
return this._y;
|
|
776
|
+
}
|
|
777
|
+
get clientX() {
|
|
778
|
+
return this._clientX;
|
|
779
|
+
}
|
|
780
|
+
get clientY() {
|
|
781
|
+
return this._clientY;
|
|
782
|
+
}
|
|
783
|
+
set x(_x) {
|
|
784
|
+
this._clientX = _x;
|
|
785
|
+
this._x = this.translateX(_x);
|
|
786
|
+
}
|
|
787
|
+
set y(_y) {
|
|
788
|
+
this._clientY = _y;
|
|
789
|
+
this._y = this.translateY(_y);
|
|
790
|
+
}
|
|
791
|
+
add(vector) {
|
|
792
|
+
this._x += vector.x;
|
|
793
|
+
this._y += vector.y;
|
|
794
|
+
this._clientX += vector.clientX;
|
|
795
|
+
this._clientY += vector.clientY;
|
|
796
|
+
return this;
|
|
797
|
+
}
|
|
798
|
+
substract(vector) {
|
|
799
|
+
this._x -= vector.x;
|
|
800
|
+
this._y -= vector.y;
|
|
801
|
+
this._clientX -= vector.clientX;
|
|
802
|
+
this._clientY -= vector.clientY;
|
|
803
|
+
return this;
|
|
804
|
+
}
|
|
805
|
+
dot(vector) {
|
|
806
|
+
const scalar = (this._x * vector.x) + (this._y * vector.y);
|
|
807
|
+
return scalar;
|
|
808
|
+
}
|
|
809
|
+
get magnitude() {
|
|
810
|
+
return Math.sqrt(Math.pow(this._x, 2) + Math.pow(this._y, 2));
|
|
811
|
+
}
|
|
812
|
+
get clientMagnitude() {
|
|
813
|
+
return Math.sqrt(Math.pow(this._clientX, 2) + Math.pow(this._clientY, 2));
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
exports.Vec2 = Vec2;
|
|
817
|
+
function closest(needle, haystack) {
|
|
818
|
+
return haystack.reduce((a, b) => {
|
|
819
|
+
let a_diff = Math.abs(a - needle);
|
|
820
|
+
let b_diff = Math.abs(b - needle);
|
|
821
|
+
if (a_diff === b_diff) {
|
|
822
|
+
return a > b ? a : b;
|
|
823
|
+
}
|
|
824
|
+
else {
|
|
825
|
+
return b_diff < a_diff ? b : a;
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
exports.closest = closest;
|
|
830
|
+
//# sourceMappingURL=utils.js.map
|
|
831
|
+
|
|
832
|
+
/***/ }),
|
|
833
|
+
|
|
834
|
+
/***/ 810:
|
|
835
|
+
/***/ ((module) => {
|
|
836
|
+
|
|
837
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
|
838
|
+
var y = x => () => x
|
|
839
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
840
|
+
|
|
841
|
+
/***/ })
|
|
842
|
+
|
|
843
|
+
/******/ });
|
|
844
|
+
/************************************************************************/
|
|
845
|
+
/******/ // The module cache
|
|
846
|
+
/******/ var __webpack_module_cache__ = {};
|
|
847
|
+
/******/
|
|
848
|
+
/******/ // The require function
|
|
849
|
+
/******/ function __webpack_require__(moduleId) {
|
|
850
|
+
/******/ // Check if module is in cache
|
|
851
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
852
|
+
/******/ if (cachedModule !== undefined) {
|
|
853
|
+
/******/ return cachedModule.exports;
|
|
854
|
+
/******/ }
|
|
855
|
+
/******/ // Create a new module (and put it into the cache)
|
|
856
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
857
|
+
/******/ // no module.id needed
|
|
858
|
+
/******/ // no module.loaded needed
|
|
859
|
+
/******/ exports: {}
|
|
860
|
+
/******/ };
|
|
861
|
+
/******/
|
|
862
|
+
/******/ // Execute the module function
|
|
863
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
864
|
+
/******/
|
|
865
|
+
/******/ // Return the exports of the module
|
|
866
|
+
/******/ return module.exports;
|
|
867
|
+
/******/ }
|
|
868
|
+
/******/
|
|
869
|
+
/************************************************************************/
|
|
870
|
+
/******/ /* webpack/runtime/define property getters */
|
|
871
|
+
/******/ (() => {
|
|
872
|
+
/******/ // define getter functions for harmony exports
|
|
873
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
874
|
+
/******/ for(var key in definition) {
|
|
875
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
876
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
877
|
+
/******/ }
|
|
878
|
+
/******/ }
|
|
879
|
+
/******/ };
|
|
880
|
+
/******/ })();
|
|
881
|
+
/******/
|
|
882
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
883
|
+
/******/ (() => {
|
|
884
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
885
|
+
/******/ })();
|
|
886
|
+
/******/
|
|
887
|
+
/************************************************************************/
|
|
888
|
+
var __webpack_exports__ = {};
|
|
889
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
890
|
+
(() => {
|
|
891
|
+
|
|
892
|
+
// EXPORTS
|
|
893
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
894
|
+
"ee": () => (/* reexport */ Anchor),
|
|
895
|
+
"zF": () => (/* reexport */ FadeInKeyframes),
|
|
896
|
+
"JA": () => (/* reexport */ FadeOutKeyframes),
|
|
897
|
+
"rN": () => (/* reexport */ GestureRegion),
|
|
898
|
+
"W_": () => (/* reexport */ Navigation),
|
|
899
|
+
"F0": () => (/* reexport */ Router),
|
|
900
|
+
"lL": () => (/* reexport */ Screen),
|
|
901
|
+
"Tq": () => (/* reexport */ SlideInFromBottomKeyframes),
|
|
902
|
+
"um": () => (/* reexport */ SlideInFromLeftKeyframes),
|
|
903
|
+
"ID": () => (/* reexport */ SlideInFromRightKeyframes),
|
|
904
|
+
"u5": () => (/* reexport */ SlideInFromTopKeyframes),
|
|
905
|
+
"eH": () => (/* reexport */ SlideOutToBottomKeyframes),
|
|
906
|
+
"ak": () => (/* reexport */ SlideOutToLeftKeyframes),
|
|
907
|
+
"pQ": () => (/* reexport */ SlideOutToRightKeyframes),
|
|
908
|
+
"Bu": () => (/* reexport */ SlideOutToTopKeyframes),
|
|
909
|
+
"xH": () => (/* reexport */ ZoomInKeyframes),
|
|
910
|
+
"s$": () => (/* reexport */ ZoomOutKeyframes),
|
|
911
|
+
"eV": () => (/* reexport */ androidBottomSheetSlideInOptions),
|
|
912
|
+
"aR": () => (/* reexport */ androidBottomSheetSlideOutOptions),
|
|
913
|
+
"BI": () => (/* reexport */ androidConcealToBottomKeyframes),
|
|
914
|
+
"gd": () => (/* reexport */ androidFadeInFromBottom),
|
|
915
|
+
"d3": () => (/* reexport */ androidFadeInFromBottomKeyframes),
|
|
916
|
+
"yo": () => (/* reexport */ androidFadeInFromBottomOptions),
|
|
917
|
+
"_s": () => (/* reexport */ androidFadeInFromBottomSheet),
|
|
918
|
+
"ih": () => (/* reexport */ androidFadeInFromBottomSheetKeyframes),
|
|
919
|
+
"r_": () => (/* reexport */ androidFadeInFromRight),
|
|
920
|
+
"kb": () => (/* reexport */ androidFadeInFromRightKeyframes),
|
|
921
|
+
"GY": () => (/* reexport */ androidFadeOutToBottomOptions),
|
|
922
|
+
"ef": () => (/* reexport */ androidFadeOutToLeftKeyframes),
|
|
923
|
+
"n_": () => (/* reexport */ androidRevealFromBottom),
|
|
924
|
+
"RA": () => (/* reexport */ androidRevealFromBottomKeyframes),
|
|
925
|
+
"TA": () => (/* reexport */ androidRevealFromBottomOptions),
|
|
926
|
+
"zf": () => (/* reexport */ androidScaleFromCentre),
|
|
927
|
+
"mz": () => (/* reexport */ androidScaleFromCentreKeyframes),
|
|
928
|
+
"pb": () => (/* reexport */ androidScaleFromCentreOptions),
|
|
929
|
+
"G6": () => (/* reexport */ androidScaleToCentreKeyframes),
|
|
930
|
+
"ZM": () => (/* reexport */ iOSKeyframeOptions),
|
|
931
|
+
"kB": () => (/* reexport */ iOSSlideInFromBottom),
|
|
932
|
+
"Hh": () => (/* reexport */ iOSSlideInFromBottomKeyframes),
|
|
933
|
+
"kz": () => (/* reexport */ iOSSlideInFromLeft),
|
|
934
|
+
"nI": () => (/* reexport */ iOSSlideInFromLeftKeyframes),
|
|
935
|
+
"E7": () => (/* reexport */ iOSSlideInFromRight),
|
|
936
|
+
"Cq": () => (/* reexport */ iOSSlideInFromRightKeyframes),
|
|
937
|
+
"cj": () => (/* reexport */ iOSSlideOutToLeftKeyframes),
|
|
938
|
+
"Cj": () => (/* reexport */ iOSSlideOutToRightKeyframes),
|
|
939
|
+
"HJ": () => (/* reexport */ useNavigation),
|
|
940
|
+
"yj": () => (/* reexport */ useRoute),
|
|
941
|
+
"tv": () => (/* reexport */ useRouter)
|
|
942
|
+
});
|
|
943
|
+
|
|
944
|
+
// EXTERNAL MODULE: ../../node_modules/web-gesture-events/index.js
|
|
945
|
+
var web_gesture_events = __webpack_require__(190);
|
|
946
|
+
;// CONCATENATED MODULE: external "@react-motion-router/core"
|
|
947
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
|
948
|
+
var y = x => () => x
|
|
949
|
+
const core_namespaceObject = x({ ["NavigationBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.NavigationBase, ["RouterBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.RouterBase, ["ScreenBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.ScreenBase, ["includesRoute"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.includesRoute, ["isValidScreenChild"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.isValidScreenChild, ["matchRoute"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.matchRoute, ["resolveBaseURLFromPattern"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.resolveBaseURLFromPattern, ["useNavigationBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.useNavigationBase, ["useRouteBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.useRouteBase, ["useRouterBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.useRouterBase });
|
|
950
|
+
;// CONCATENATED MODULE: ./src/common/events.ts
|
|
951
|
+
class NavigateEvent extends Event {
|
|
952
|
+
routerId;
|
|
953
|
+
route;
|
|
954
|
+
props;
|
|
955
|
+
navigationType;
|
|
956
|
+
signal;
|
|
957
|
+
result;
|
|
958
|
+
transition;
|
|
959
|
+
constructor(routerId, route, props, type, signal, result, transition) {
|
|
960
|
+
super('navigate');
|
|
961
|
+
this.routerId = routerId;
|
|
962
|
+
this.route = route;
|
|
963
|
+
this.props = props;
|
|
964
|
+
this.navigationType = type ?? "push";
|
|
965
|
+
this.signal = signal;
|
|
966
|
+
this.result = result;
|
|
967
|
+
this.transition = transition;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
class BackEvent extends Event {
|
|
971
|
+
routerId;
|
|
972
|
+
signal;
|
|
973
|
+
result;
|
|
974
|
+
transition;
|
|
975
|
+
constructor(routerId, signal, result, transition) {
|
|
976
|
+
super('back');
|
|
977
|
+
this.routerId = routerId;
|
|
978
|
+
this.signal = signal;
|
|
979
|
+
this.result = result;
|
|
980
|
+
this.transition = transition;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
class ForwardEvent extends Event {
|
|
984
|
+
routerId;
|
|
985
|
+
signal;
|
|
986
|
+
result;
|
|
987
|
+
transition;
|
|
988
|
+
constructor(routerId, signal, result, transition) {
|
|
989
|
+
super('forward');
|
|
990
|
+
this.routerId = routerId;
|
|
991
|
+
this.signal = signal;
|
|
992
|
+
this.result = result;
|
|
993
|
+
this.transition = transition;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
class GestureStartEvent extends Event {
|
|
997
|
+
source;
|
|
998
|
+
constructor(source) {
|
|
999
|
+
super('gesture-start');
|
|
1000
|
+
this.source = source;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
class GestureEndEvent extends Event {
|
|
1004
|
+
source;
|
|
1005
|
+
constructor(source) {
|
|
1006
|
+
super('gesture-end');
|
|
1007
|
+
this.source = source;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
class GestureCancelEvent extends Event {
|
|
1011
|
+
constructor() {
|
|
1012
|
+
super('gesture-cancel');
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
;// CONCATENATED MODULE: ./src/HistoryEntry.ts
|
|
1017
|
+
class HistoryEntry {
|
|
1018
|
+
routerId;
|
|
1019
|
+
#nativeEntry;
|
|
1020
|
+
index;
|
|
1021
|
+
constructor(nativeEntry, routerId, index) {
|
|
1022
|
+
this.#nativeEntry = nativeEntry;
|
|
1023
|
+
this.routerId = routerId;
|
|
1024
|
+
this.index = index;
|
|
1025
|
+
}
|
|
1026
|
+
set ondispose(handler) {
|
|
1027
|
+
this.#nativeEntry.ondispose = handler;
|
|
1028
|
+
}
|
|
1029
|
+
get ondispose() {
|
|
1030
|
+
return this.#nativeEntry.ondispose;
|
|
1031
|
+
}
|
|
1032
|
+
get id() {
|
|
1033
|
+
return this.#nativeEntry.id;
|
|
1034
|
+
}
|
|
1035
|
+
get globalIndex() {
|
|
1036
|
+
return this.#nativeEntry.index;
|
|
1037
|
+
}
|
|
1038
|
+
get url() {
|
|
1039
|
+
if (!this.#nativeEntry.url)
|
|
1040
|
+
return null;
|
|
1041
|
+
return new URL(this.#nativeEntry.url);
|
|
1042
|
+
}
|
|
1043
|
+
get key() {
|
|
1044
|
+
return this.#nativeEntry.key;
|
|
1045
|
+
}
|
|
1046
|
+
get sameDocument() {
|
|
1047
|
+
return this.#nativeEntry.sameDocument;
|
|
1048
|
+
}
|
|
1049
|
+
addEventListener(type, listener, options) {
|
|
1050
|
+
this.#nativeEntry.addEventListener(type, listener, options);
|
|
1051
|
+
return () => this.#nativeEntry.removeEventListener(type, listener, options);
|
|
1052
|
+
}
|
|
1053
|
+
removeEventListener(type, listener, options) {
|
|
1054
|
+
this.#nativeEntry.addEventListener(type, listener, options);
|
|
1055
|
+
}
|
|
1056
|
+
dispatchEvent(event) {
|
|
1057
|
+
return this.#nativeEntry.dispatchEvent(event);
|
|
1058
|
+
}
|
|
1059
|
+
getState() {
|
|
1060
|
+
return this.#nativeEntry.getState();
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
;// CONCATENATED MODULE: ./src/Navigation.ts
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
class Navigation extends core_namespaceObject.NavigationBase {
|
|
1069
|
+
router;
|
|
1070
|
+
constructor(router) {
|
|
1071
|
+
super(router);
|
|
1072
|
+
this.router = router;
|
|
1073
|
+
}
|
|
1074
|
+
traverseTo(key) {
|
|
1075
|
+
return window.navigation.traverseTo(key);
|
|
1076
|
+
}
|
|
1077
|
+
replace(route, props = {}, options = {}) {
|
|
1078
|
+
return this.navigate(route, props, { ...options, type: "replace" });
|
|
1079
|
+
}
|
|
1080
|
+
push(route, props = {}, options = {}) {
|
|
1081
|
+
return this.navigate(route, props, { ...options, type: "push" });
|
|
1082
|
+
}
|
|
1083
|
+
reload(props = {}) {
|
|
1084
|
+
return window.navigation.reload({ state: props });
|
|
1085
|
+
}
|
|
1086
|
+
navigate(route, props = {}, options = {}) {
|
|
1087
|
+
const { type: history = "push" } = options;
|
|
1088
|
+
const url = new URL(route, this.baseURL);
|
|
1089
|
+
const result = window.navigation.navigate(url.href, { history, state: props });
|
|
1090
|
+
const transition = window.navigation.transition;
|
|
1091
|
+
const controller = new AbortController();
|
|
1092
|
+
controller.signal.addEventListener('abort', () => this.goBack(), { once: true });
|
|
1093
|
+
options.signal?.addEventListener('abort', controller.abort, { once: true });
|
|
1094
|
+
const event = this.createNavigateEvent(route, props, history, controller.signal, result, transition);
|
|
1095
|
+
this.dispatchEvent?.(event);
|
|
1096
|
+
return result;
|
|
1097
|
+
}
|
|
1098
|
+
goBack(options = {}) {
|
|
1099
|
+
if (!this.canGoBack)
|
|
1100
|
+
return;
|
|
1101
|
+
const previous = this.previous;
|
|
1102
|
+
const result = window.navigation.traverseTo(previous.key);
|
|
1103
|
+
const transition = window.navigation.transition;
|
|
1104
|
+
const controller = new AbortController();
|
|
1105
|
+
controller.signal.addEventListener('abort', () => this.goForward(), { once: true });
|
|
1106
|
+
options.signal?.addEventListener('abort', controller.abort, { once: true });
|
|
1107
|
+
const event = this.createBackEvent(controller.signal, result, transition);
|
|
1108
|
+
this.dispatchEvent?.(event);
|
|
1109
|
+
return result;
|
|
1110
|
+
}
|
|
1111
|
+
goForward(options = {}) {
|
|
1112
|
+
if (!this.canGoForward)
|
|
1113
|
+
return;
|
|
1114
|
+
const next = this.next;
|
|
1115
|
+
const result = window.navigation.traverseTo(next.key);
|
|
1116
|
+
const transition = window.navigation.transition;
|
|
1117
|
+
const controller = new AbortController();
|
|
1118
|
+
controller.signal.addEventListener('abort', () => this.goBack(), { once: true });
|
|
1119
|
+
options.signal?.addEventListener('abort', controller.abort, { once: true });
|
|
1120
|
+
const event = this.createForwardEvent(controller.signal, result, transition);
|
|
1121
|
+
this.dispatchEvent?.(event);
|
|
1122
|
+
return result;
|
|
1123
|
+
}
|
|
1124
|
+
createBackEvent(signal, result, transition) {
|
|
1125
|
+
if (!this.routerId)
|
|
1126
|
+
throw new Error("Router ID is not set");
|
|
1127
|
+
return new BackEvent(this.routerId, signal, result, transition);
|
|
1128
|
+
}
|
|
1129
|
+
createForwardEvent(signal, result, transition) {
|
|
1130
|
+
if (!this.routerId)
|
|
1131
|
+
throw new Error("Router ID is not set");
|
|
1132
|
+
return new ForwardEvent(this.routerId, signal, result, transition);
|
|
1133
|
+
}
|
|
1134
|
+
createNavigateEvent(route, props, type, signal, result, transition) {
|
|
1135
|
+
if (!this.routerId)
|
|
1136
|
+
throw new Error("Router ID is not set");
|
|
1137
|
+
return new NavigateEvent(this.routerId, route, props, type, signal, result, transition);
|
|
1138
|
+
}
|
|
1139
|
+
get transition() {
|
|
1140
|
+
return this.router.state.transition;
|
|
1141
|
+
}
|
|
1142
|
+
get globalEntries() {
|
|
1143
|
+
return window.navigation.entries();
|
|
1144
|
+
}
|
|
1145
|
+
get entries() {
|
|
1146
|
+
const nestedPathPatterns = this.router.pathPatterns.filter(({ pattern }) => pattern.endsWith("**"));
|
|
1147
|
+
let inNestedScope = false;
|
|
1148
|
+
return this.globalEntries
|
|
1149
|
+
.filter(entry => {
|
|
1150
|
+
if (!entry.url)
|
|
1151
|
+
return false;
|
|
1152
|
+
const url = new URL(entry.url);
|
|
1153
|
+
if (!(0,core_namespaceObject.resolveBaseURLFromPattern)(this.baseURLPattern.pathname, url.pathname))
|
|
1154
|
+
return false;
|
|
1155
|
+
if ((0,core_namespaceObject.includesRoute)(nestedPathPatterns, url.pathname, this.baseURLPattern.pathname)) {
|
|
1156
|
+
if (inNestedScope)
|
|
1157
|
+
return false;
|
|
1158
|
+
return inNestedScope = true; // technically in nested scope but include the first entry (the entry intercepted by the parent router)
|
|
1159
|
+
}
|
|
1160
|
+
else {
|
|
1161
|
+
inNestedScope = false;
|
|
1162
|
+
return true; // not in nested scope, so include
|
|
1163
|
+
}
|
|
1164
|
+
})
|
|
1165
|
+
.map((entry, index) => {
|
|
1166
|
+
return new HistoryEntry(entry, this.routerId, index);
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
get index() {
|
|
1170
|
+
const globalCurrentIndex = window.navigation.currentEntry?.index ?? -1;
|
|
1171
|
+
const firstEntryGlobalIndex = this.entries.at(0)?.globalIndex ?? -1;
|
|
1172
|
+
const lastEntryGlobalIndex = this.entries.at(-1)?.globalIndex ?? -1;
|
|
1173
|
+
if (globalCurrentIndex <= firstEntryGlobalIndex)
|
|
1174
|
+
return 0;
|
|
1175
|
+
else if (globalCurrentIndex >= lastEntryGlobalIndex)
|
|
1176
|
+
return this.entries.length - 1;
|
|
1177
|
+
else {
|
|
1178
|
+
const scopedEntries = this.globalEntries.slice(firstEntryGlobalIndex, globalCurrentIndex + 1);
|
|
1179
|
+
return this.entries.findLastIndex(entry => {
|
|
1180
|
+
return scopedEntries.findLastIndex(globalEntry => entry.key === globalEntry.key) > -1;
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
get previous() {
|
|
1185
|
+
return this.entries[this.index - 1] ?? null;
|
|
1186
|
+
}
|
|
1187
|
+
get next() {
|
|
1188
|
+
return this.entries[this.index + 1] ?? null;
|
|
1189
|
+
}
|
|
1190
|
+
get current() {
|
|
1191
|
+
return this.entries[this.index];
|
|
1192
|
+
}
|
|
1193
|
+
get canGoBack() {
|
|
1194
|
+
return Boolean(this.previous?.sameDocument);
|
|
1195
|
+
}
|
|
1196
|
+
get canGoForward() {
|
|
1197
|
+
return Boolean(this.next?.sameDocument);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
;// CONCATENATED MODULE: ./src/Screen.tsx
|
|
1202
|
+
|
|
1203
|
+
class Screen extends core_namespaceObject.ScreenBase {
|
|
1204
|
+
routeProp;
|
|
1205
|
+
constructor(props, context) {
|
|
1206
|
+
super(props, context);
|
|
1207
|
+
const setParams = this.setParams.bind(this);
|
|
1208
|
+
const setConfig = this.setConfig.bind(this);
|
|
1209
|
+
const getProps = () => this.props;
|
|
1210
|
+
const getState = () => this.state;
|
|
1211
|
+
this.routeProp = {
|
|
1212
|
+
setParams,
|
|
1213
|
+
setConfig,
|
|
1214
|
+
get path() {
|
|
1215
|
+
return getProps().path;
|
|
1216
|
+
},
|
|
1217
|
+
get resolvedPathname() {
|
|
1218
|
+
return getProps().resolvedPathname;
|
|
1219
|
+
},
|
|
1220
|
+
get focused() {
|
|
1221
|
+
return getState().focused;
|
|
1222
|
+
},
|
|
1223
|
+
get config() {
|
|
1224
|
+
return {
|
|
1225
|
+
...getProps().config,
|
|
1226
|
+
...context.screenState.get(this.path)?.config
|
|
1227
|
+
};
|
|
1228
|
+
},
|
|
1229
|
+
get params() {
|
|
1230
|
+
return {
|
|
1231
|
+
...getProps().defaultParams,
|
|
1232
|
+
...context.screenState.get(this.path)?.params
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
static getDerivedStateFromProps(props) {
|
|
1238
|
+
if (props.config?.presentation === "dialog"
|
|
1239
|
+
|| props.config?.presentation === "modal")
|
|
1240
|
+
return { elementType: "dialog" };
|
|
1241
|
+
else
|
|
1242
|
+
return { elementType: "div" };
|
|
1243
|
+
}
|
|
1244
|
+
get config() {
|
|
1245
|
+
return {
|
|
1246
|
+
...this.props.config,
|
|
1247
|
+
...this.context.screenState.get(this.props.path)?.config
|
|
1248
|
+
};
|
|
1249
|
+
}
|
|
1250
|
+
get params() {
|
|
1251
|
+
return {
|
|
1252
|
+
...this.props.defaultParams,
|
|
1253
|
+
...this.context.screenState.get(this.props.path)?.params
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
setParams(params) {
|
|
1257
|
+
super.setParams(params);
|
|
1258
|
+
if (this.state.focused)
|
|
1259
|
+
window.navigation.updateCurrentEntry({ state: { params } });
|
|
1260
|
+
}
|
|
1261
|
+
setConfig(config) {
|
|
1262
|
+
super.setConfig(config);
|
|
1263
|
+
if (this.state.focused)
|
|
1264
|
+
window.navigation.updateCurrentEntry({ state: { config } });
|
|
1265
|
+
}
|
|
1266
|
+
get router() {
|
|
1267
|
+
return this.context;
|
|
1268
|
+
}
|
|
1269
|
+
onClickOutside(e) {
|
|
1270
|
+
if (!this.transitionProvider.current?.ref.current)
|
|
1271
|
+
return;
|
|
1272
|
+
const navigation = this.context?.navigation;
|
|
1273
|
+
const rect = this.transitionProvider.current.ref.current.getBoundingClientRect();
|
|
1274
|
+
const isInDialog = (rect.top <= e.clientY
|
|
1275
|
+
&& e.clientY <= rect.top + rect.height
|
|
1276
|
+
&& rect.left <= e.clientX
|
|
1277
|
+
&& e.clientX <= rect.left + rect.width);
|
|
1278
|
+
if (!isInDialog)
|
|
1279
|
+
navigation?.goBack();
|
|
1280
|
+
}
|
|
1281
|
+
onEnter(signal) {
|
|
1282
|
+
if (this.transitionProvider.current?.ref.current instanceof HTMLDialogElement
|
|
1283
|
+
&& this.transitionProvider.current.ref.current.open === false) {
|
|
1284
|
+
const navigation = this.context?.navigation;
|
|
1285
|
+
if (this.props.config?.presentation === "modal") {
|
|
1286
|
+
this.transitionProvider.current.ref.current.showModal();
|
|
1287
|
+
}
|
|
1288
|
+
else {
|
|
1289
|
+
this.transitionProvider.current.ref.current.show();
|
|
1290
|
+
}
|
|
1291
|
+
this.transitionProvider.current.ref.current.style.maxHeight = 'unset';
|
|
1292
|
+
this.transitionProvider.current.ref.current.style.maxWidth = 'unset';
|
|
1293
|
+
this.transitionProvider.current.ref.current.style.width = 'max-content';
|
|
1294
|
+
this.transitionProvider.current.ref.current.style.height = 'max-content';
|
|
1295
|
+
if (this.ref.current) {
|
|
1296
|
+
this.ref.current.style.width = 'max-content';
|
|
1297
|
+
this.ref.current.style.height = 'max-content';
|
|
1298
|
+
}
|
|
1299
|
+
const onClickOutside = this.onClickOutside.bind(this);
|
|
1300
|
+
// closed by form submit or ESC key
|
|
1301
|
+
this.transitionProvider.current?.ref.current.addEventListener('close', function () {
|
|
1302
|
+
if (this.returnValue !== "screen-exit") {
|
|
1303
|
+
this.style.display = "block";
|
|
1304
|
+
navigation?.goBack();
|
|
1305
|
+
}
|
|
1306
|
+
navigation?.removeEventListener('click', onClickOutside);
|
|
1307
|
+
}, { once: true });
|
|
1308
|
+
navigation?.addEventListener('click', onClickOutside);
|
|
1309
|
+
}
|
|
1310
|
+
return super.onEnter(signal);
|
|
1311
|
+
}
|
|
1312
|
+
;
|
|
1313
|
+
onExited(signal) {
|
|
1314
|
+
if (this.transitionProvider.current?.ref.current instanceof HTMLDialogElement) {
|
|
1315
|
+
this.transitionProvider.current.ref.current.close("screen-exit");
|
|
1316
|
+
}
|
|
1317
|
+
return super.onExited(signal);
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
;// CONCATENATED MODULE: ./src/common/types.ts
|
|
1322
|
+
function isRefObject(value) {
|
|
1323
|
+
if (value !== null
|
|
1324
|
+
&& typeof value === 'object'
|
|
1325
|
+
&& value.hasOwnProperty('current'))
|
|
1326
|
+
return true;
|
|
1327
|
+
return false;
|
|
1328
|
+
}
|
|
1329
|
+
function isVerticalDirection(direction) {
|
|
1330
|
+
return direction === 'up' || direction === 'down' || direction === 'vertical';
|
|
1331
|
+
}
|
|
1332
|
+
function isHorizontalDirection(direction) {
|
|
1333
|
+
return direction === 'left' || direction === 'right' || direction === 'horizontal';
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
// EXTERNAL MODULE: external "react"
|
|
1337
|
+
var external_react_ = __webpack_require__(810);
|
|
1338
|
+
;// CONCATENATED MODULE: external "web-animations-extension"
|
|
1339
|
+
var external_web_animations_extension_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
|
1340
|
+
var external_web_animations_extension_y = x => () => x
|
|
1341
|
+
const external_web_animations_extension_namespaceObject = external_web_animations_extension_x({ ["GestureTimeline"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.GestureTimeline, ["easingToLinear"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.easingToLinear, ["springToLinear"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.springToLinear });
|
|
1342
|
+
;// CONCATENATED MODULE: ./src/common/utils.ts
|
|
1343
|
+
function searchParamsToObject(searchPart) {
|
|
1344
|
+
const entries = new URLSearchParams(decodeURI(searchPart)).entries();
|
|
1345
|
+
const result = {};
|
|
1346
|
+
for (const [key, value] of entries) { // each 'entry' is a [key, value] tuple
|
|
1347
|
+
let parsedValue = '';
|
|
1348
|
+
try {
|
|
1349
|
+
parsedValue = JSON.parse(value);
|
|
1350
|
+
}
|
|
1351
|
+
catch (e) {
|
|
1352
|
+
console.warn("Non JSON serialisable value was passed as URL route param.");
|
|
1353
|
+
parsedValue = value;
|
|
1354
|
+
}
|
|
1355
|
+
result[key] = parsedValue;
|
|
1356
|
+
}
|
|
1357
|
+
return Object.keys(result).length ? result : undefined;
|
|
1358
|
+
}
|
|
1359
|
+
function searchParamsFromObject(params) {
|
|
1360
|
+
try {
|
|
1361
|
+
return new URLSearchParams(params).toString();
|
|
1362
|
+
}
|
|
1363
|
+
catch (e) {
|
|
1364
|
+
console.error(e);
|
|
1365
|
+
console.warn("Non JSON serialisable value was passed as query param.");
|
|
1366
|
+
}
|
|
1367
|
+
return '';
|
|
1368
|
+
}
|
|
1369
|
+
function isRollback(info) {
|
|
1370
|
+
if (info && typeof info === 'object' && 'rollback' in info)
|
|
1371
|
+
return Boolean(info.rollback);
|
|
1372
|
+
return false;
|
|
1373
|
+
}
|
|
1374
|
+
function deepEquals(obj1, obj2) {
|
|
1375
|
+
if (obj1 === obj2) {
|
|
1376
|
+
return true;
|
|
1377
|
+
}
|
|
1378
|
+
if (obj1 === null || obj2 === null || typeof obj1 !== 'object' || typeof obj2 !== 'object') {
|
|
1379
|
+
return false;
|
|
1380
|
+
}
|
|
1381
|
+
const keys1 = Object.keys(obj1);
|
|
1382
|
+
const keys2 = Object.keys(obj2);
|
|
1383
|
+
if (keys1.length !== keys2.length) {
|
|
1384
|
+
return false;
|
|
1385
|
+
}
|
|
1386
|
+
for (let key of keys1) {
|
|
1387
|
+
if (!keys2.includes(key) || !deepEquals(obj1[key], obj2[key])) {
|
|
1388
|
+
return false;
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
return true;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
;// CONCATENATED MODULE: ./src/common/constants.ts
|
|
1395
|
+
const DEFAULT_GESTURE_CONFIG = {
|
|
1396
|
+
gestureHysteresis: 0.5,
|
|
1397
|
+
gestureMinFlingVelocity: 400,
|
|
1398
|
+
gestureAreaWidth: 100,
|
|
1399
|
+
gestureDirection: 'right',
|
|
1400
|
+
disableGesture: false
|
|
1401
|
+
};
|
|
1402
|
+
|
|
1403
|
+
;// CONCATENATED MODULE: ./src/Router.tsx
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
class Router extends core_namespaceObject.RouterBase {
|
|
1413
|
+
navigation = new Navigation(this);
|
|
1414
|
+
constructor(props, context) {
|
|
1415
|
+
super(props, context);
|
|
1416
|
+
this.state = {
|
|
1417
|
+
screenStack: [],
|
|
1418
|
+
gestureDirection: "horizontal",
|
|
1419
|
+
gestureAreaWidth: 50,
|
|
1420
|
+
gestureHysteresis: 0.5,
|
|
1421
|
+
disableGesture: true,
|
|
1422
|
+
gestureMinFlingVelocity: 500,
|
|
1423
|
+
transition: null,
|
|
1424
|
+
backNavigating: false,
|
|
1425
|
+
documentTitle: document.title,
|
|
1426
|
+
fromKey: null,
|
|
1427
|
+
destinationKey: null
|
|
1428
|
+
};
|
|
1429
|
+
}
|
|
1430
|
+
static defaultProps = {
|
|
1431
|
+
config: {
|
|
1432
|
+
screenConfig: {
|
|
1433
|
+
...DEFAULT_GESTURE_CONFIG
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
};
|
|
1437
|
+
static getDerivedStateFromProps(_, state) {
|
|
1438
|
+
const config = state.screenStack.find(screen => isRefObject(screen.ref) && screen.ref.current?.focused)?.props.config;
|
|
1439
|
+
document.title = config?.title ?? document.title;
|
|
1440
|
+
return {
|
|
1441
|
+
gestureDirection: config?.gestureDirection ?? DEFAULT_GESTURE_CONFIG.gestureDirection,
|
|
1442
|
+
gestureAreaWidth: config?.gestureAreaWidth ?? DEFAULT_GESTURE_CONFIG.gestureAreaWidth,
|
|
1443
|
+
gestureMinFlingVelocity: config?.gestureMinFlingVelocity ?? DEFAULT_GESTURE_CONFIG.gestureMinFlingVelocity,
|
|
1444
|
+
gestureHysteresis: config?.gestureHysteresis ?? DEFAULT_GESTURE_CONFIG.gestureHysteresis,
|
|
1445
|
+
disableGesture: config?.disableGesture ?? DEFAULT_GESTURE_CONFIG.disableGesture,
|
|
1446
|
+
documentTitle: config?.title
|
|
1447
|
+
};
|
|
1448
|
+
}
|
|
1449
|
+
componentDidMount() {
|
|
1450
|
+
super.componentDidMount();
|
|
1451
|
+
this.ref.current?.addEventListener('swipestart', this.onSwipeStart);
|
|
1452
|
+
this.ref.current?.addEventListener('swipeend', this.onSwipeEnd);
|
|
1453
|
+
}
|
|
1454
|
+
shouldComponentUpdate(nextProps, nextState) {
|
|
1455
|
+
return (!deepEquals(this.props.config, nextProps.config)
|
|
1456
|
+
|| !deepEquals(this.state, nextState)
|
|
1457
|
+
|| this.props.id !== nextProps.id);
|
|
1458
|
+
}
|
|
1459
|
+
componentWillUnmount() {
|
|
1460
|
+
this.ref.current?.removeEventListener('swipestart', this.onSwipeStart);
|
|
1461
|
+
this.ref.current?.removeEventListener('swipeend', this.onSwipeEnd);
|
|
1462
|
+
}
|
|
1463
|
+
canGestureNavigate(e) {
|
|
1464
|
+
if (!this.ref.current)
|
|
1465
|
+
return false;
|
|
1466
|
+
if (this.state.disableGesture)
|
|
1467
|
+
return false;
|
|
1468
|
+
const clientRect = this.ref.current.getBoundingClientRect();
|
|
1469
|
+
const { direction } = e;
|
|
1470
|
+
if ((direction === "down" || direction === "right") && !this.navigation.canGoBack)
|
|
1471
|
+
return false;
|
|
1472
|
+
if ((direction === "up" || direction === "left") && !this.navigation.canGoForward)
|
|
1473
|
+
return false;
|
|
1474
|
+
if (isHorizontalDirection(direction) !== isHorizontalDirection(this.state.gestureDirection))
|
|
1475
|
+
return false;
|
|
1476
|
+
if (direction === "right" && Math.abs(e.x - clientRect.left) >= this.state.gestureAreaWidth)
|
|
1477
|
+
return false;
|
|
1478
|
+
if (direction === "left" && Math.abs(e.x - clientRect.right) >= this.state.gestureAreaWidth)
|
|
1479
|
+
return false;
|
|
1480
|
+
if (direction === "down" && Math.abs(e.y - clientRect.top) >= this.state.gestureAreaWidth)
|
|
1481
|
+
return false;
|
|
1482
|
+
if (direction === "up" && Math.abs(e.y - clientRect.bottom) >= this.state.gestureAreaWidth)
|
|
1483
|
+
return false;
|
|
1484
|
+
return true;
|
|
1485
|
+
}
|
|
1486
|
+
onSwipeStart = (e) => {
|
|
1487
|
+
if (!this.canGestureNavigate(e))
|
|
1488
|
+
return;
|
|
1489
|
+
if (!this.ref.current || !this.screenTransitionLayer.current)
|
|
1490
|
+
return;
|
|
1491
|
+
const { direction } = e;
|
|
1492
|
+
let axis = isHorizontalDirection(direction) ? "x" : "y";
|
|
1493
|
+
let rangeStart;
|
|
1494
|
+
let rangeEnd;
|
|
1495
|
+
switch (direction) {
|
|
1496
|
+
case "right":
|
|
1497
|
+
rangeStart = 0;
|
|
1498
|
+
rangeEnd = this.ref.current.clientWidth;
|
|
1499
|
+
break;
|
|
1500
|
+
case "left":
|
|
1501
|
+
rangeStart = this.ref.current.clientWidth;
|
|
1502
|
+
rangeEnd = 0;
|
|
1503
|
+
break;
|
|
1504
|
+
case "down":
|
|
1505
|
+
rangeStart = 0;
|
|
1506
|
+
rangeEnd = this.ref.current.clientHeight;
|
|
1507
|
+
break;
|
|
1508
|
+
case "up":
|
|
1509
|
+
rangeStart = this.ref.current.clientHeight;
|
|
1510
|
+
rangeEnd = 0;
|
|
1511
|
+
break;
|
|
1512
|
+
}
|
|
1513
|
+
this.screenTransitionLayer.current.animation.timeline = new external_web_animations_extension_namespaceObject.GestureTimeline({
|
|
1514
|
+
source: this.ref.current,
|
|
1515
|
+
type: "swipe",
|
|
1516
|
+
axis,
|
|
1517
|
+
rangeStart,
|
|
1518
|
+
rangeEnd
|
|
1519
|
+
});
|
|
1520
|
+
if (direction === "down" || direction === "right")
|
|
1521
|
+
this.navigation.goBack();
|
|
1522
|
+
else
|
|
1523
|
+
this.navigation.goForward();
|
|
1524
|
+
this.dispatchEvent(new GestureStartEvent(e));
|
|
1525
|
+
};
|
|
1526
|
+
onSwipeEnd = (e) => {
|
|
1527
|
+
if (!this.screenTransitionLayer.current)
|
|
1528
|
+
return;
|
|
1529
|
+
const progress = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0;
|
|
1530
|
+
const playbackRate = this.screenTransitionLayer.current.animation.playbackRate;
|
|
1531
|
+
this.screenTransitionLayer.current.animation.timeline = document.timeline;
|
|
1532
|
+
const hysteresisReached = playbackRate > 0 ? progress > this.state.gestureHysteresis : progress < this.state.gestureHysteresis;
|
|
1533
|
+
let rollback = false;
|
|
1534
|
+
if (e.velocity < this.state.gestureMinFlingVelocity && !hysteresisReached) {
|
|
1535
|
+
this.screenTransitionLayer.current.animation.reverse();
|
|
1536
|
+
rollback = true;
|
|
1537
|
+
this.dispatchEvent(new GestureCancelEvent());
|
|
1538
|
+
}
|
|
1539
|
+
else {
|
|
1540
|
+
this.dispatchEvent(new GestureEndEvent(e));
|
|
1541
|
+
}
|
|
1542
|
+
const { fromKey } = this.state;
|
|
1543
|
+
if (rollback && fromKey) {
|
|
1544
|
+
this.state.transition?.finished.then(() => {
|
|
1545
|
+
window.navigation.traverseTo(fromKey.toString(), { info: { rollback } });
|
|
1546
|
+
});
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
get screens() {
|
|
1550
|
+
const screenStack = this.state.screenStack;
|
|
1551
|
+
return screenStack
|
|
1552
|
+
.filter((screen, index) => {
|
|
1553
|
+
const currentScreenRef = screen.ref ?? null;
|
|
1554
|
+
const nextScreenRef = screenStack.at(index + 1)?.ref;
|
|
1555
|
+
return (isRefObject(currentScreenRef) && currentScreenRef.current?.config.keepAlive)
|
|
1556
|
+
|| (isRefObject(nextScreenRef) && nextScreenRef.current?.config.presentation === "modal")
|
|
1557
|
+
|| (isRefObject(nextScreenRef) && nextScreenRef.current?.config.presentation === "dialog")
|
|
1558
|
+
|| screen.key === this.navigation.current?.key
|
|
1559
|
+
|| screen.key === this.state.fromKey
|
|
1560
|
+
|| screen.key === this.state.destinationKey;
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
screenChildFromPathname(pathname) {
|
|
1564
|
+
return external_react_.Children.toArray(this.props.children)
|
|
1565
|
+
.find(child => {
|
|
1566
|
+
if (!(0,core_namespaceObject.isValidScreenChild)(child))
|
|
1567
|
+
return;
|
|
1568
|
+
return (0,core_namespaceObject.matchRoute)(child.props.path, pathname, this.baseURLPattern.pathname, child.props.caseSensitive);
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
getScreenRefByKey(key) {
|
|
1572
|
+
const screen = this.state.screenStack.find(screen => screen.key === key)?.ref;
|
|
1573
|
+
if (isRefObject(screen))
|
|
1574
|
+
return screen;
|
|
1575
|
+
return null;
|
|
1576
|
+
}
|
|
1577
|
+
canIntercept(e) {
|
|
1578
|
+
const pathname = new URL(e.destination.url).pathname;
|
|
1579
|
+
const baseURLPattern = this.baseURLPattern.pathname;
|
|
1580
|
+
return this.mounted
|
|
1581
|
+
&& this.shouldIntercept(e)
|
|
1582
|
+
&& (0,core_namespaceObject.includesRoute)(this.pathPatterns, pathname, baseURLPattern);
|
|
1583
|
+
}
|
|
1584
|
+
shouldIntercept(e) {
|
|
1585
|
+
if (this.props.config.shouldIntercept)
|
|
1586
|
+
return this.props.config.shouldIntercept(e);
|
|
1587
|
+
return e.canIntercept
|
|
1588
|
+
&& !e.formData
|
|
1589
|
+
&& !e.hashChange
|
|
1590
|
+
&& !e.downloadRequest;
|
|
1591
|
+
}
|
|
1592
|
+
intercept(e) {
|
|
1593
|
+
if (this.props.config.onIntercept && e.navigationType !== "load")
|
|
1594
|
+
if (this.props.config.onIntercept(e) || e.defaultPrevented)
|
|
1595
|
+
return;
|
|
1596
|
+
switch (e.navigationType) {
|
|
1597
|
+
case "load":
|
|
1598
|
+
this.handleLoad(e);
|
|
1599
|
+
break;
|
|
1600
|
+
case "reload":
|
|
1601
|
+
case "replace":
|
|
1602
|
+
this.handleReplace(e);
|
|
1603
|
+
break;
|
|
1604
|
+
default:
|
|
1605
|
+
this.handleDefault(e);
|
|
1606
|
+
break;
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
handleLoad(e) {
|
|
1610
|
+
const handler = () => {
|
|
1611
|
+
const fromKey = e.transition?.from?.key ?? null;
|
|
1612
|
+
const destinationKey = e.destination.key;
|
|
1613
|
+
const transition = e.transition;
|
|
1614
|
+
const screenStack = new Array();
|
|
1615
|
+
const entries = this.navigation.entries;
|
|
1616
|
+
entries.forEach((entry) => {
|
|
1617
|
+
if (!entry.url)
|
|
1618
|
+
return null;
|
|
1619
|
+
const screen = this.screenChildFromPathname(entry.url.pathname);
|
|
1620
|
+
if (!(0,core_namespaceObject.isValidScreenChild)(screen))
|
|
1621
|
+
return null;
|
|
1622
|
+
const { params, config } = entry.getState() ?? {};
|
|
1623
|
+
const queryParams = searchParamsToObject(entry.url.search);
|
|
1624
|
+
screenStack.push((0,external_react_.cloneElement)(screen, {
|
|
1625
|
+
config: {
|
|
1626
|
+
title: document.title,
|
|
1627
|
+
...this.props.config.screenConfig,
|
|
1628
|
+
...screen.props.config,
|
|
1629
|
+
...config
|
|
1630
|
+
},
|
|
1631
|
+
defaultParams: {
|
|
1632
|
+
...screen.props.defaultParams,
|
|
1633
|
+
...queryParams,
|
|
1634
|
+
...params
|
|
1635
|
+
},
|
|
1636
|
+
resolvedPathname: entry.url.pathname,
|
|
1637
|
+
key: entry.key,
|
|
1638
|
+
ref: (0,external_react_.createRef)()
|
|
1639
|
+
}));
|
|
1640
|
+
});
|
|
1641
|
+
return new Promise((resolve, reject) => (0,external_react_.startTransition)(() => {
|
|
1642
|
+
this.setState({ screenStack, fromKey, transition, destinationKey }, async () => {
|
|
1643
|
+
const { initialPath } = this.props.config;
|
|
1644
|
+
const [firstEntry] = entries;
|
|
1645
|
+
if (initialPath
|
|
1646
|
+
&& entries.length === 1
|
|
1647
|
+
&& firstEntry.url
|
|
1648
|
+
&& !(0,core_namespaceObject.matchRoute)(initialPath, firstEntry.url.pathname, this.baseURLPattern.pathname)) {
|
|
1649
|
+
const transitionFinished = window.navigation.transition?.finished ?? Promise.resolve();
|
|
1650
|
+
transitionFinished.then(() => {
|
|
1651
|
+
this.navigation.replace(initialPath).finished.then(() => {
|
|
1652
|
+
const state = e.destination.getState() ?? {};
|
|
1653
|
+
this.navigation.push(e.destination.url, state);
|
|
1654
|
+
});
|
|
1655
|
+
});
|
|
1656
|
+
return resolve();
|
|
1657
|
+
}
|
|
1658
|
+
const signal = e.signal;
|
|
1659
|
+
if (this.navigation.current?.key === undefined)
|
|
1660
|
+
reject(new Error("Current key is undefined"));
|
|
1661
|
+
const currentScreen = this.getScreenRefByKey(this.navigation.current.key);
|
|
1662
|
+
await this.dispatchLifecycleHandlers(currentScreen, null, signal).catch(reject);
|
|
1663
|
+
this.setState({ destinationKey: null, fromKey: null, transition: null }, resolve);
|
|
1664
|
+
});
|
|
1665
|
+
}));
|
|
1666
|
+
};
|
|
1667
|
+
e.intercept({ handler });
|
|
1668
|
+
}
|
|
1669
|
+
handleReplace(e) {
|
|
1670
|
+
const screenStack = this.state.screenStack;
|
|
1671
|
+
const destinationPathname = new URL(e.destination.url).pathname;
|
|
1672
|
+
const destinationScreen = this.screenChildFromPathname(destinationPathname);
|
|
1673
|
+
if (!(0,core_namespaceObject.isValidScreenChild)(destinationScreen))
|
|
1674
|
+
return e.preventDefault();
|
|
1675
|
+
const handler = () => {
|
|
1676
|
+
const { params, config } = e.destination.getState() ?? {};
|
|
1677
|
+
const destination = e.destination;
|
|
1678
|
+
const isHotReplace = this.state.transition !== null;
|
|
1679
|
+
const transition = this.state.transition ?? window.navigation.transition;
|
|
1680
|
+
const fromKey = transition?.from?.key ?? null;
|
|
1681
|
+
const destinationKey = window.navigation.currentEntry?.key ?? destination.key;
|
|
1682
|
+
const resolvedPathname = new URL(e.destination.url).pathname;
|
|
1683
|
+
const queryParams = searchParamsToObject(new URL(destination.url).search);
|
|
1684
|
+
const currentIndex = screenStack.findIndex(screen => screen.key === this.navigation.current?.key);
|
|
1685
|
+
const backNavigating = this.state.backNavigating;
|
|
1686
|
+
screenStack.splice(currentIndex, 1, (0,external_react_.cloneElement)(destinationScreen, {
|
|
1687
|
+
config: {
|
|
1688
|
+
title: document.title,
|
|
1689
|
+
...this.props.config.screenConfig,
|
|
1690
|
+
...destinationScreen.props.config,
|
|
1691
|
+
...config
|
|
1692
|
+
},
|
|
1693
|
+
defaultParams: {
|
|
1694
|
+
...destinationScreen.props.defaultParams,
|
|
1695
|
+
...queryParams,
|
|
1696
|
+
...params,
|
|
1697
|
+
},
|
|
1698
|
+
resolvedPathname,
|
|
1699
|
+
key: destinationKey,
|
|
1700
|
+
ref: (0,external_react_.createRef)()
|
|
1701
|
+
}));
|
|
1702
|
+
return new Promise((resolve, reject) => (0,external_react_.startTransition)(() => {
|
|
1703
|
+
this.setState({ destinationKey, fromKey, transition, screenStack }, async () => {
|
|
1704
|
+
const signal = e.signal;
|
|
1705
|
+
const outgoingScreen = this.getScreenRefByKey(String(fromKey));
|
|
1706
|
+
const incomingScreen = this.getScreenRefByKey(String(destinationKey));
|
|
1707
|
+
const pendingLifecycleHandlers = this.dispatchLifecycleHandlers(incomingScreen, null, signal).catch(reject);
|
|
1708
|
+
if (isHotReplace) {
|
|
1709
|
+
const currentTime = this.screenTransitionLayer.current?.animation.currentTime ?? 0;
|
|
1710
|
+
this.screenTransitionLayer.current?.animation.cancel();
|
|
1711
|
+
await new Promise(requestAnimationFrame);
|
|
1712
|
+
const animation = this.screenTransition(incomingScreen, outgoingScreen, backNavigating);
|
|
1713
|
+
if (animation) {
|
|
1714
|
+
animation.currentTime = currentTime;
|
|
1715
|
+
}
|
|
1716
|
+
animation?.updatePlaybackRate(1);
|
|
1717
|
+
await animation?.finished.catch(reject);
|
|
1718
|
+
}
|
|
1719
|
+
await pendingLifecycleHandlers;
|
|
1720
|
+
this.setState({ destinationKey: null, fromKey: null, transition: null }, resolve);
|
|
1721
|
+
});
|
|
1722
|
+
}));
|
|
1723
|
+
};
|
|
1724
|
+
e.intercept({ handler });
|
|
1725
|
+
}
|
|
1726
|
+
handleDefault(e) {
|
|
1727
|
+
const screenStack = this.state.screenStack;
|
|
1728
|
+
const destinationPathname = new URL(e.destination.url).pathname;
|
|
1729
|
+
const destinationScreen = this.screenChildFromPathname(destinationPathname);
|
|
1730
|
+
if (!(0,core_namespaceObject.isValidScreenChild)(destinationScreen))
|
|
1731
|
+
return e.preventDefault();
|
|
1732
|
+
const handler = () => {
|
|
1733
|
+
const { params, config } = e.destination.getState() ?? {};
|
|
1734
|
+
const transition = window.navigation.transition;
|
|
1735
|
+
const destination = e.destination;
|
|
1736
|
+
const resolvedPathname = new URL(e.destination.url).pathname;
|
|
1737
|
+
let fromIndex = screenStack.findIndex(screen => screen.key === transition?.from.key);
|
|
1738
|
+
if (fromIndex === -1 && e.navigationType === "traverse") {
|
|
1739
|
+
fromIndex = screenStack.findIndex(screen => {
|
|
1740
|
+
if (!transition?.from.url || !screen.props.resolvedPathname)
|
|
1741
|
+
return false;
|
|
1742
|
+
const pathnameMatched = transition.from.url.includes(screen.props.resolvedPathname);
|
|
1743
|
+
const patternMatched = (0,core_namespaceObject.matchRoute)(screen.props.path, new URL(transition.from.url).pathname, this.baseURLPattern.pathname, screen.props.caseSensitive);
|
|
1744
|
+
return pathnameMatched && patternMatched;
|
|
1745
|
+
});
|
|
1746
|
+
}
|
|
1747
|
+
const destinationIndex = screenStack.findIndex(screen => screen.key === e.destination.key);
|
|
1748
|
+
const fromKey = (screenStack[fromIndex]?.key || transition?.from.key) ?? null;
|
|
1749
|
+
const destinationKey = (screenStack[destinationIndex]?.key || window.navigation.currentEntry?.key) ?? null;
|
|
1750
|
+
const backNavigating = destinationIndex >= 0 && destinationIndex < fromIndex;
|
|
1751
|
+
if (e.navigationType === "push") {
|
|
1752
|
+
const queryParams = searchParamsToObject(new URL(destination.url).search);
|
|
1753
|
+
screenStack.splice(fromIndex + 1, Infinity, // Remove all screens after current
|
|
1754
|
+
(0,external_react_.cloneElement)(destinationScreen, {
|
|
1755
|
+
config: {
|
|
1756
|
+
title: document.title,
|
|
1757
|
+
...this.props.config.screenConfig,
|
|
1758
|
+
...destinationScreen.props.config,
|
|
1759
|
+
...config
|
|
1760
|
+
},
|
|
1761
|
+
defaultParams: {
|
|
1762
|
+
...destinationScreen.props.defaultParams,
|
|
1763
|
+
...queryParams,
|
|
1764
|
+
...params,
|
|
1765
|
+
},
|
|
1766
|
+
resolvedPathname,
|
|
1767
|
+
key: window.navigation.currentEntry?.key,
|
|
1768
|
+
ref: (0,external_react_.createRef)()
|
|
1769
|
+
}));
|
|
1770
|
+
}
|
|
1771
|
+
return new Promise((resolve, reject) => (0,external_react_.startTransition)(() => {
|
|
1772
|
+
this.setState({ destinationKey, fromKey, transition, screenStack, backNavigating }, async () => {
|
|
1773
|
+
const signal = e.signal;
|
|
1774
|
+
const outgoingScreen = this.getScreenRefByKey(String(fromKey));
|
|
1775
|
+
const incomingScreen = this.getScreenRefByKey(String(destinationKey));
|
|
1776
|
+
const pendingLifecycleHandlers = this.dispatchLifecycleHandlers(incomingScreen, outgoingScreen, signal).catch(reject);
|
|
1777
|
+
if (!isRollback(e.info)) {
|
|
1778
|
+
const animation = this.screenTransition(incomingScreen, outgoingScreen, backNavigating);
|
|
1779
|
+
animation?.updatePlaybackRate(1);
|
|
1780
|
+
animation?.finished.catch(reject);
|
|
1781
|
+
}
|
|
1782
|
+
await pendingLifecycleHandlers;
|
|
1783
|
+
this.setState({ destinationKey: null, fromKey: null, transition: null }, resolve);
|
|
1784
|
+
});
|
|
1785
|
+
}));
|
|
1786
|
+
};
|
|
1787
|
+
e.intercept({ handler });
|
|
1788
|
+
}
|
|
1789
|
+
async dispatchLifecycleHandlers(incomingScreen, outgoingScreen, signal) {
|
|
1790
|
+
let animationStarted = false;
|
|
1791
|
+
this.addEventListener('transition-start', () => animationStarted = true, { once: true });
|
|
1792
|
+
await Promise.all([
|
|
1793
|
+
outgoingScreen?.current?.onExit(signal).then(() => outgoingScreen.current?.blur()),
|
|
1794
|
+
incomingScreen?.current?.onEnter(signal).then(() => incomingScreen.current?.focus()),
|
|
1795
|
+
incomingScreen?.current?.load(signal)
|
|
1796
|
+
]);
|
|
1797
|
+
if (animationStarted)
|
|
1798
|
+
await new Promise((resolve) => this.addEventListener('transition-end', resolve, { once: true }));
|
|
1799
|
+
await Promise.all([
|
|
1800
|
+
outgoingScreen?.current?.onExited(signal),
|
|
1801
|
+
incomingScreen?.current?.onEntered(signal)
|
|
1802
|
+
]);
|
|
1803
|
+
}
|
|
1804
|
+
screenTransition(incomingScreen, outgoingScreen, backNavigating) {
|
|
1805
|
+
if (this.screenTransitionLayer.current && incomingScreen && outgoingScreen) {
|
|
1806
|
+
this.screenTransitionLayer.current.direction = backNavigating ? 'reverse' : 'normal';
|
|
1807
|
+
if (incomingScreen.current?.transitionProvider.current) {
|
|
1808
|
+
incomingScreen.current.transitionProvider.current.exiting = false;
|
|
1809
|
+
}
|
|
1810
|
+
if (outgoingScreen.current?.transitionProvider.current) {
|
|
1811
|
+
outgoingScreen.current.transitionProvider.current.exiting = true;
|
|
1812
|
+
}
|
|
1813
|
+
if (this.screenTransitionLayer.current.sharedElementTransitionLayer.current) {
|
|
1814
|
+
this.screenTransitionLayer.current.sharedElementTransitionLayer.current.outgoingScreen = outgoingScreen;
|
|
1815
|
+
this.screenTransitionLayer.current.sharedElementTransitionLayer.current.incomingScreen = incomingScreen;
|
|
1816
|
+
}
|
|
1817
|
+
const topScreenIndex = this.screens.findIndex(screen => screen.ref === (backNavigating ? outgoingScreen : incomingScreen));
|
|
1818
|
+
this.screenTransitionLayer.current.screens = this.screens
|
|
1819
|
+
.map((screen, index) => {
|
|
1820
|
+
// normalise indices making incoming screen index 1 and preceding screens index 0...-n
|
|
1821
|
+
index = (index - topScreenIndex) + 1;
|
|
1822
|
+
if (isRefObject(screen.ref) && screen.ref.current?.transitionProvider.current) {
|
|
1823
|
+
screen.ref.current.transitionProvider.current.index = index;
|
|
1824
|
+
return screen.ref;
|
|
1825
|
+
}
|
|
1826
|
+
return null;
|
|
1827
|
+
})
|
|
1828
|
+
.filter(isRefObject);
|
|
1829
|
+
return this.screenTransitionLayer.current.transition();
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
// EXTERNAL MODULE: ../../node_modules/react/jsx-runtime.js
|
|
1835
|
+
var jsx_runtime = __webpack_require__(322);
|
|
1836
|
+
;// CONCATENATED MODULE: ./src/common/hooks.ts
|
|
1837
|
+
|
|
1838
|
+
|
|
1839
|
+
function useNavigation() {
|
|
1840
|
+
(0,external_react_.useDebugValue)("StackNavigation");
|
|
1841
|
+
return (0,core_namespaceObject.useNavigationBase)();
|
|
1842
|
+
}
|
|
1843
|
+
function useRouter() {
|
|
1844
|
+
(0,external_react_.useDebugValue)("StackRouter");
|
|
1845
|
+
return (0,core_namespaceObject.useRouterBase)();
|
|
1846
|
+
}
|
|
1847
|
+
function useRoute() {
|
|
1848
|
+
(0,external_react_.useDebugValue)("StackRoute");
|
|
1849
|
+
return (0,core_namespaceObject.useRouteBase)();
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
;// CONCATENATED MODULE: ./src/Anchor.tsx
|
|
1853
|
+
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
function useNavigationOrDefault(navigation) {
|
|
1858
|
+
const defaultNavigation = useNavigation();
|
|
1859
|
+
return navigation ?? defaultNavigation;
|
|
1860
|
+
}
|
|
1861
|
+
function Anchor(props) {
|
|
1862
|
+
const { preload, goBack, params = {}, type = "push", href: hrefProp, onClick: onClickProp, ...aProps } = props;
|
|
1863
|
+
const navigation = useNavigationOrDefault(props.navigation);
|
|
1864
|
+
const [href, setHref] = (0,external_react_.useState)(undefined);
|
|
1865
|
+
const routerId = navigation?.routerId;
|
|
1866
|
+
const isExternal = !href?.includes(window.location.origin);
|
|
1867
|
+
const rel = isExternal ? "noopener noreferrer" : goBack ? "prev" : "next";
|
|
1868
|
+
(0,external_react_.useEffect)(() => {
|
|
1869
|
+
if (!preload || !href)
|
|
1870
|
+
return;
|
|
1871
|
+
navigation.preloadRoute(hrefProp);
|
|
1872
|
+
}, [preload, hrefProp]);
|
|
1873
|
+
(0,external_react_.useEffect)(() => {
|
|
1874
|
+
if (goBack) {
|
|
1875
|
+
setHref(navigation.previous?.url?.href);
|
|
1876
|
+
}
|
|
1877
|
+
else if (hrefProp) {
|
|
1878
|
+
const search = searchParamsFromObject(params);
|
|
1879
|
+
const uri = new URL(hrefProp, navigation.baseURL);
|
|
1880
|
+
uri.search = search;
|
|
1881
|
+
setHref(uri.href);
|
|
1882
|
+
}
|
|
1883
|
+
}, [hrefProp, params]);
|
|
1884
|
+
const onClick = (e) => {
|
|
1885
|
+
if (goBack) {
|
|
1886
|
+
e.preventDefault();
|
|
1887
|
+
navigation.goBack();
|
|
1888
|
+
}
|
|
1889
|
+
else if (type === "replace" && hrefProp) {
|
|
1890
|
+
e.preventDefault();
|
|
1891
|
+
navigation.replace(hrefProp);
|
|
1892
|
+
}
|
|
1893
|
+
onClickProp?.(e);
|
|
1894
|
+
};
|
|
1895
|
+
return ((0,jsx_runtime.jsx)("a", { href: href, "data-router-id": routerId, onClick: onClick, rel: rel, ...aProps, children: props.children }));
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
;// CONCATENATED MODULE: ./src/animation-configs/keyframe-presets.ts
|
|
1899
|
+
const SlideInFromRightKeyframes = [
|
|
1900
|
+
{
|
|
1901
|
+
transform: 'translateX(100vw)',
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
transform: 'translateX(0vw)'
|
|
1905
|
+
}
|
|
1906
|
+
];
|
|
1907
|
+
const iOSSlideInFromRightKeyframes = [
|
|
1908
|
+
{
|
|
1909
|
+
transform: 'translateX(100vw)',
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
transform: 'translateX(0vw)'
|
|
1913
|
+
}
|
|
1914
|
+
];
|
|
1915
|
+
const SlideOutToLeftKeyframes = [
|
|
1916
|
+
{
|
|
1917
|
+
transform: 'translateX(0vw)'
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
transform: 'translateX(-50vw)'
|
|
1921
|
+
}
|
|
1922
|
+
];
|
|
1923
|
+
const iOSSlideOutToLeftKeyframes = [
|
|
1924
|
+
{
|
|
1925
|
+
transform: 'translateX(0vw)',
|
|
1926
|
+
},
|
|
1927
|
+
{
|
|
1928
|
+
transform: 'translateX(calc(100vw * -0.3))'
|
|
1929
|
+
}
|
|
1930
|
+
];
|
|
1931
|
+
const SlideInFromLeftKeyframes = [
|
|
1932
|
+
{
|
|
1933
|
+
transform: 'translateX(-100vw)'
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
transform: 'translateX(0vw)'
|
|
1937
|
+
}
|
|
1938
|
+
];
|
|
1939
|
+
const iOSSlideInFromLeftKeyframes = [
|
|
1940
|
+
{
|
|
1941
|
+
transform: 'translateX(-100vw)'
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
transform: 'translateX(0vw)'
|
|
1945
|
+
}
|
|
1946
|
+
];
|
|
1947
|
+
const SlideOutToRightKeyframes = [
|
|
1948
|
+
{
|
|
1949
|
+
transform: 'translateX(0vw)'
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
transform: 'translateX(50vw)'
|
|
1953
|
+
}
|
|
1954
|
+
];
|
|
1955
|
+
const iOSSlideOutToRightKeyframes = [
|
|
1956
|
+
{
|
|
1957
|
+
transform: 'translateX(0vw)'
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
transform: 'translateX(calc(100vw * 0.3))'
|
|
1961
|
+
}
|
|
1962
|
+
];
|
|
1963
|
+
const SlideInFromBottomKeyframes = [
|
|
1964
|
+
{
|
|
1965
|
+
transform: 'translateY(100vh)'
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
transform: 'translateY(0vh)'
|
|
1969
|
+
}
|
|
1970
|
+
];
|
|
1971
|
+
const iOSSlideInFromBottomKeyframes = [
|
|
1972
|
+
{
|
|
1973
|
+
transform: 'translateY(100vh)'
|
|
1974
|
+
},
|
|
1975
|
+
{
|
|
1976
|
+
transform: 'translateY(0vh)'
|
|
1977
|
+
}
|
|
1978
|
+
];
|
|
1979
|
+
const SlideOutToTopKeyframes = [
|
|
1980
|
+
{
|
|
1981
|
+
transform: 'translateY(0vh)'
|
|
1982
|
+
},
|
|
1983
|
+
{
|
|
1984
|
+
transform: 'translateY(-50vh)'
|
|
1985
|
+
}
|
|
1986
|
+
];
|
|
1987
|
+
const SlideInFromTopKeyframes = [
|
|
1988
|
+
{
|
|
1989
|
+
transform: 'translateY(-100vh)'
|
|
1990
|
+
},
|
|
1991
|
+
{
|
|
1992
|
+
transform: 'translateY(0vh)'
|
|
1993
|
+
}
|
|
1994
|
+
];
|
|
1995
|
+
const SlideOutToBottomKeyframes = [
|
|
1996
|
+
{
|
|
1997
|
+
transform: 'translateY(0vh)'
|
|
1998
|
+
},
|
|
1999
|
+
{
|
|
2000
|
+
transform: 'translateY(50vh)'
|
|
2001
|
+
}
|
|
2002
|
+
];
|
|
2003
|
+
const ZoomInKeyframes = [
|
|
2004
|
+
{
|
|
2005
|
+
transform: 'scale(0.85)',
|
|
2006
|
+
opacity: 0
|
|
2007
|
+
},
|
|
2008
|
+
{
|
|
2009
|
+
transform: 'scale(1)',
|
|
2010
|
+
opacity: 1
|
|
2011
|
+
}
|
|
2012
|
+
];
|
|
2013
|
+
const ZoomOutKeyframes = [
|
|
2014
|
+
{
|
|
2015
|
+
transform: 'scale(1)',
|
|
2016
|
+
opacity: 1
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
transform: 'scale(1.15)',
|
|
2020
|
+
opacity: 0
|
|
2021
|
+
}
|
|
2022
|
+
];
|
|
2023
|
+
const FadeInKeyframes = [
|
|
2024
|
+
{
|
|
2025
|
+
opacity: 0
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
opacity: 1
|
|
2029
|
+
}
|
|
2030
|
+
];
|
|
2031
|
+
const FadeOutKeyframes = [
|
|
2032
|
+
{
|
|
2033
|
+
opacity: 1
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
opacity: 0
|
|
2037
|
+
}
|
|
2038
|
+
];
|
|
2039
|
+
const androidFadeInFromBottomKeyframes = [
|
|
2040
|
+
{
|
|
2041
|
+
opacity: 0,
|
|
2042
|
+
transform: 'translateY(calc(100vh * 0.08))'
|
|
2043
|
+
},
|
|
2044
|
+
{
|
|
2045
|
+
opacity: 0.25,
|
|
2046
|
+
offset: 0.5
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
opacity: 0.7,
|
|
2050
|
+
offset: 0.9
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
opacity: 1,
|
|
2054
|
+
transform: 'translateY(0vh)'
|
|
2055
|
+
}
|
|
2056
|
+
];
|
|
2057
|
+
const androidFadeInFromRightKeyframes = [
|
|
2058
|
+
{
|
|
2059
|
+
opacity: 0,
|
|
2060
|
+
transform: 'translateY(96vw)'
|
|
2061
|
+
},
|
|
2062
|
+
{
|
|
2063
|
+
opacity: 1,
|
|
2064
|
+
transform: 'translateY(0vw)'
|
|
2065
|
+
}
|
|
2066
|
+
];
|
|
2067
|
+
const androidFadeOutToLeftKeyframes = [
|
|
2068
|
+
{
|
|
2069
|
+
opacity: 0,
|
|
2070
|
+
transform: 'translateY(0vw)'
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
opacity: 1,
|
|
2074
|
+
transform: 'translateY(-96vw)'
|
|
2075
|
+
}
|
|
2076
|
+
];
|
|
2077
|
+
const androidRevealFromBottomKeyframes = [
|
|
2078
|
+
{
|
|
2079
|
+
transform: 'translateY(100vh)'
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
transform: 'translateY(0vh)'
|
|
2083
|
+
}
|
|
2084
|
+
];
|
|
2085
|
+
const androidConcealToBottomKeyframes = [
|
|
2086
|
+
{
|
|
2087
|
+
transform: 'translateY(0vh)'
|
|
2088
|
+
},
|
|
2089
|
+
{
|
|
2090
|
+
transform: 'translateY(-2vh)'
|
|
2091
|
+
}
|
|
2092
|
+
];
|
|
2093
|
+
const androidScaleFromCentreKeyframes = [
|
|
2094
|
+
{
|
|
2095
|
+
transform: 'scale(0.85)',
|
|
2096
|
+
opacity: 0
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
opacity: 0,
|
|
2100
|
+
offset: 0.75
|
|
2101
|
+
},
|
|
2102
|
+
{
|
|
2103
|
+
opacity: 1,
|
|
2104
|
+
offset: 0.875
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
transform: 'scale(1)',
|
|
2108
|
+
opacity: 1
|
|
2109
|
+
}
|
|
2110
|
+
];
|
|
2111
|
+
const androidScaleToCentreKeyframes = [
|
|
2112
|
+
{
|
|
2113
|
+
transform: 'scale(1)',
|
|
2114
|
+
opacity: 1
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
opacity: 1,
|
|
2118
|
+
offset: 0.0825
|
|
2119
|
+
},
|
|
2120
|
+
{
|
|
2121
|
+
opacity: 1,
|
|
2122
|
+
offset: 0.2075
|
|
2123
|
+
},
|
|
2124
|
+
{
|
|
2125
|
+
transform: 'scale(1.075)',
|
|
2126
|
+
opacity: 0
|
|
2127
|
+
}
|
|
2128
|
+
];
|
|
2129
|
+
const androidFadeInFromBottomSheetKeyframes = [
|
|
2130
|
+
{
|
|
2131
|
+
transform: 'translateY(calc(100vh * 0.8))',
|
|
2132
|
+
opacity: 0
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
transform: 'translateY(0vh)',
|
|
2136
|
+
opacity: 1
|
|
2137
|
+
}
|
|
2138
|
+
];
|
|
2139
|
+
|
|
2140
|
+
;// CONCATENATED MODULE: ./src/animation-configs/keyframe-options-presets.ts
|
|
2141
|
+
|
|
2142
|
+
function easingOut(easing) {
|
|
2143
|
+
return t => 1 - easing(1 - t);
|
|
2144
|
+
}
|
|
2145
|
+
function easingPoly(n) {
|
|
2146
|
+
return (t) => Math.pow(t, n);
|
|
2147
|
+
}
|
|
2148
|
+
const iOSKeyframeOptions = {
|
|
2149
|
+
...(0,external_web_animations_extension_namespaceObject.springToLinear)({
|
|
2150
|
+
mass: 3,
|
|
2151
|
+
stiffness: 1000,
|
|
2152
|
+
damping: 500,
|
|
2153
|
+
velocity: 0,
|
|
2154
|
+
steps: 200
|
|
2155
|
+
})
|
|
2156
|
+
};
|
|
2157
|
+
const androidFadeInFromBottomOptions = {
|
|
2158
|
+
duration: 350,
|
|
2159
|
+
easing: (0,external_web_animations_extension_namespaceObject.easingToLinear)(easingOut(easingPoly(5)))
|
|
2160
|
+
};
|
|
2161
|
+
const androidFadeOutToBottomOptions = {
|
|
2162
|
+
duration: 150,
|
|
2163
|
+
easing: 'linear'
|
|
2164
|
+
};
|
|
2165
|
+
const androidRevealFromBottomOptions = {
|
|
2166
|
+
duration: 425,
|
|
2167
|
+
easing: 'cubic-bezier(0.35, 0.45, 0, 1)'
|
|
2168
|
+
};
|
|
2169
|
+
const androidScaleFromCentreOptions = {
|
|
2170
|
+
duration: 400,
|
|
2171
|
+
easing: 'cubic-bezier(0.35, 0.45, 0, 1)'
|
|
2172
|
+
};
|
|
2173
|
+
const androidBottomSheetSlideInOptions = {
|
|
2174
|
+
duration: 250,
|
|
2175
|
+
easing: (0,external_web_animations_extension_namespaceObject.easingToLinear)(t => Math.cos((t + 1) * Math.PI) / 2.0 + 0.5)
|
|
2176
|
+
};
|
|
2177
|
+
const androidBottomSheetSlideOutOptions = {
|
|
2178
|
+
duration: 200,
|
|
2179
|
+
easing: (0,external_web_animations_extension_namespaceObject.easingToLinear)(t => (t === 1.0 ? 1 : Math.pow(t, 2)))
|
|
2180
|
+
};
|
|
2181
|
+
|
|
2182
|
+
;// CONCATENATED MODULE: ./src/animation-configs/animation-presets.ts
|
|
2183
|
+
|
|
2184
|
+
|
|
2185
|
+
function iOSSlideInFromRight({ ref, direction, playbackRate, index }) {
|
|
2186
|
+
const keyframesPresets = [
|
|
2187
|
+
iOSSlideOutToLeftKeyframes,
|
|
2188
|
+
iOSSlideInFromRightKeyframes
|
|
2189
|
+
];
|
|
2190
|
+
let keyframes = keyframesPresets[index];
|
|
2191
|
+
const options = {
|
|
2192
|
+
playbackRate,
|
|
2193
|
+
fill: "forwards",
|
|
2194
|
+
...iOSKeyframeOptions
|
|
2195
|
+
};
|
|
2196
|
+
if (direction === "reverse")
|
|
2197
|
+
keyframes = keyframes.toReversed();
|
|
2198
|
+
return new KeyframeEffect(ref, keyframes, options);
|
|
2199
|
+
}
|
|
2200
|
+
function iOSSlideInFromLeft({ ref, direction, playbackRate, index }) {
|
|
2201
|
+
const keyframesPresets = [
|
|
2202
|
+
iOSSlideOutToRightKeyframes,
|
|
2203
|
+
iOSSlideInFromLeftKeyframes
|
|
2204
|
+
];
|
|
2205
|
+
let keyframes = keyframesPresets[index];
|
|
2206
|
+
const options = {
|
|
2207
|
+
playbackRate,
|
|
2208
|
+
fill: "forwards",
|
|
2209
|
+
...iOSKeyframeOptions
|
|
2210
|
+
};
|
|
2211
|
+
if (direction === "reverse")
|
|
2212
|
+
keyframes = keyframes.toReversed();
|
|
2213
|
+
return new KeyframeEffect(ref, keyframes, options);
|
|
2214
|
+
}
|
|
2215
|
+
function iOSSlideInFromBottom({ ref, direction, playbackRate }) {
|
|
2216
|
+
let keyframes = iOSSlideInFromBottomKeyframes;
|
|
2217
|
+
const options = {
|
|
2218
|
+
playbackRate,
|
|
2219
|
+
fill: "forwards",
|
|
2220
|
+
...iOSKeyframeOptions
|
|
2221
|
+
};
|
|
2222
|
+
if (direction === "reverse")
|
|
2223
|
+
keyframes = keyframes.toReversed();
|
|
2224
|
+
return new KeyframeEffect(ref, keyframes, options);
|
|
2225
|
+
}
|
|
2226
|
+
function androidFadeInFromBottom({ ref, direction, playbackRate }) {
|
|
2227
|
+
let keyframes = androidFadeInFromBottomKeyframes;
|
|
2228
|
+
const options = {
|
|
2229
|
+
playbackRate,
|
|
2230
|
+
fill: "forwards",
|
|
2231
|
+
...androidFadeInFromBottomOptions
|
|
2232
|
+
};
|
|
2233
|
+
if (direction === "reverse")
|
|
2234
|
+
keyframes = keyframes.toReversed();
|
|
2235
|
+
return new KeyframeEffect(ref, keyframes, options);
|
|
2236
|
+
}
|
|
2237
|
+
function androidFadeInFromBottomSheet({ ref, direction, index, playbackRate }) {
|
|
2238
|
+
let keyframes = androidFadeInFromBottomSheetKeyframes;
|
|
2239
|
+
let timing;
|
|
2240
|
+
if (index === 0)
|
|
2241
|
+
timing = androidBottomSheetSlideOutOptions;
|
|
2242
|
+
else
|
|
2243
|
+
timing = androidBottomSheetSlideInOptions;
|
|
2244
|
+
const options = {
|
|
2245
|
+
playbackRate,
|
|
2246
|
+
fill: "forwards",
|
|
2247
|
+
...timing
|
|
2248
|
+
};
|
|
2249
|
+
if (direction === "reverse")
|
|
2250
|
+
keyframes = keyframes.toReversed();
|
|
2251
|
+
return new KeyframeEffect(ref, keyframes, options);
|
|
2252
|
+
}
|
|
2253
|
+
function androidRevealFromBottom({ ref, direction, index, playbackRate }) {
|
|
2254
|
+
let keyframesPresets = [
|
|
2255
|
+
androidConcealToBottomKeyframes,
|
|
2256
|
+
androidRevealFromBottomKeyframes
|
|
2257
|
+
];
|
|
2258
|
+
const keyframes = keyframesPresets[index];
|
|
2259
|
+
const options = {
|
|
2260
|
+
direction,
|
|
2261
|
+
playbackRate,
|
|
2262
|
+
fill: "forwards",
|
|
2263
|
+
...androidRevealFromBottomOptions
|
|
2264
|
+
};
|
|
2265
|
+
return new KeyframeEffect(ref, keyframes, options);
|
|
2266
|
+
}
|
|
2267
|
+
function androidFadeInFromRight({ ref, direction, index, playbackRate }) {
|
|
2268
|
+
let keyframesPresets = [
|
|
2269
|
+
androidFadeOutToLeftKeyframes,
|
|
2270
|
+
androidFadeInFromRightKeyframes
|
|
2271
|
+
];
|
|
2272
|
+
let timing;
|
|
2273
|
+
if (index === 0)
|
|
2274
|
+
timing = androidFadeOutToBottomOptions;
|
|
2275
|
+
else
|
|
2276
|
+
timing = androidFadeInFromBottomOptions;
|
|
2277
|
+
let keyframes = keyframesPresets[index];
|
|
2278
|
+
const options = {
|
|
2279
|
+
playbackRate,
|
|
2280
|
+
fill: "forwards",
|
|
2281
|
+
...timing
|
|
2282
|
+
};
|
|
2283
|
+
if (direction === "reverse")
|
|
2284
|
+
keyframes = keyframes.toReversed();
|
|
2285
|
+
return new KeyframeEffect(ref, keyframes, options);
|
|
2286
|
+
}
|
|
2287
|
+
function androidScaleFromCentre({ ref, direction, index, playbackRate }) {
|
|
2288
|
+
let keyframesPresets = [
|
|
2289
|
+
androidScaleToCentreKeyframes,
|
|
2290
|
+
androidScaleFromCentreKeyframes
|
|
2291
|
+
];
|
|
2292
|
+
const keyframes = keyframesPresets[index];
|
|
2293
|
+
const options = {
|
|
2294
|
+
direction,
|
|
2295
|
+
playbackRate,
|
|
2296
|
+
fill: "forwards",
|
|
2297
|
+
...androidScaleFromCentreOptions
|
|
2298
|
+
};
|
|
2299
|
+
return new KeyframeEffect(ref, keyframes, options);
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
;// CONCATENATED MODULE: ./src/GestureRegion.tsx
|
|
2303
|
+
|
|
2304
|
+
|
|
2305
|
+
function GestureRegion({ disabled, children, ...props }) {
|
|
2306
|
+
const ref = (0,external_react_.useRef)(null);
|
|
2307
|
+
(0,external_react_.useEffect)(() => {
|
|
2308
|
+
const onSwipeStart = (e) => {
|
|
2309
|
+
e.stopPropagation();
|
|
2310
|
+
e.preventDefault();
|
|
2311
|
+
};
|
|
2312
|
+
ref.current?.addEventListener('swipestart', onSwipeStart);
|
|
2313
|
+
return () => {
|
|
2314
|
+
ref.current?.removeEventListener('swipestart', onSwipeStart);
|
|
2315
|
+
};
|
|
2316
|
+
}, [ref]);
|
|
2317
|
+
return ((0,jsx_runtime.jsx)("div", { ref: ref, className: "gesture-region", "data-disabled": disabled, style: { display: 'contents' }, ...props, children: children }));
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2320
|
+
;// CONCATENATED MODULE: ./src/index.ts
|
|
2321
|
+
/// <reference types="urlpattern-polyfill" />
|
|
2322
|
+
|
|
2323
|
+
|
|
2324
|
+
|
|
2325
|
+
|
|
2326
|
+
|
|
2327
|
+
|
|
2328
|
+
|
|
2329
|
+
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
})();
|
|
2334
|
+
|
|
2335
|
+
var __webpack_exports__Anchor = __webpack_exports__.ee;
|
|
2336
|
+
var __webpack_exports__FadeInKeyframes = __webpack_exports__.zF;
|
|
2337
|
+
var __webpack_exports__FadeOutKeyframes = __webpack_exports__.JA;
|
|
2338
|
+
var __webpack_exports__GestureRegion = __webpack_exports__.rN;
|
|
2339
|
+
var __webpack_exports__Navigation = __webpack_exports__.W_;
|
|
2340
|
+
var __webpack_exports__Router = __webpack_exports__.F0;
|
|
2341
|
+
var __webpack_exports__Screen = __webpack_exports__.lL;
|
|
2342
|
+
var __webpack_exports__SlideInFromBottomKeyframes = __webpack_exports__.Tq;
|
|
2343
|
+
var __webpack_exports__SlideInFromLeftKeyframes = __webpack_exports__.um;
|
|
2344
|
+
var __webpack_exports__SlideInFromRightKeyframes = __webpack_exports__.ID;
|
|
2345
|
+
var __webpack_exports__SlideInFromTopKeyframes = __webpack_exports__.u5;
|
|
2346
|
+
var __webpack_exports__SlideOutToBottomKeyframes = __webpack_exports__.eH;
|
|
2347
|
+
var __webpack_exports__SlideOutToLeftKeyframes = __webpack_exports__.ak;
|
|
2348
|
+
var __webpack_exports__SlideOutToRightKeyframes = __webpack_exports__.pQ;
|
|
2349
|
+
var __webpack_exports__SlideOutToTopKeyframes = __webpack_exports__.Bu;
|
|
2350
|
+
var __webpack_exports__ZoomInKeyframes = __webpack_exports__.xH;
|
|
2351
|
+
var __webpack_exports__ZoomOutKeyframes = __webpack_exports__.s$;
|
|
2352
|
+
var __webpack_exports__androidBottomSheetSlideInOptions = __webpack_exports__.eV;
|
|
2353
|
+
var __webpack_exports__androidBottomSheetSlideOutOptions = __webpack_exports__.aR;
|
|
2354
|
+
var __webpack_exports__androidConcealToBottomKeyframes = __webpack_exports__.BI;
|
|
2355
|
+
var __webpack_exports__androidFadeInFromBottom = __webpack_exports__.gd;
|
|
2356
|
+
var __webpack_exports__androidFadeInFromBottomKeyframes = __webpack_exports__.d3;
|
|
2357
|
+
var __webpack_exports__androidFadeInFromBottomOptions = __webpack_exports__.yo;
|
|
2358
|
+
var __webpack_exports__androidFadeInFromBottomSheet = __webpack_exports__._s;
|
|
2359
|
+
var __webpack_exports__androidFadeInFromBottomSheetKeyframes = __webpack_exports__.ih;
|
|
2360
|
+
var __webpack_exports__androidFadeInFromRight = __webpack_exports__.r_;
|
|
2361
|
+
var __webpack_exports__androidFadeInFromRightKeyframes = __webpack_exports__.kb;
|
|
2362
|
+
var __webpack_exports__androidFadeOutToBottomOptions = __webpack_exports__.GY;
|
|
2363
|
+
var __webpack_exports__androidFadeOutToLeftKeyframes = __webpack_exports__.ef;
|
|
2364
|
+
var __webpack_exports__androidRevealFromBottom = __webpack_exports__.n_;
|
|
2365
|
+
var __webpack_exports__androidRevealFromBottomKeyframes = __webpack_exports__.RA;
|
|
2366
|
+
var __webpack_exports__androidRevealFromBottomOptions = __webpack_exports__.TA;
|
|
2367
|
+
var __webpack_exports__androidScaleFromCentre = __webpack_exports__.zf;
|
|
2368
|
+
var __webpack_exports__androidScaleFromCentreKeyframes = __webpack_exports__.mz;
|
|
2369
|
+
var __webpack_exports__androidScaleFromCentreOptions = __webpack_exports__.pb;
|
|
2370
|
+
var __webpack_exports__androidScaleToCentreKeyframes = __webpack_exports__.G6;
|
|
2371
|
+
var __webpack_exports__iOSKeyframeOptions = __webpack_exports__.ZM;
|
|
2372
|
+
var __webpack_exports__iOSSlideInFromBottom = __webpack_exports__.kB;
|
|
2373
|
+
var __webpack_exports__iOSSlideInFromBottomKeyframes = __webpack_exports__.Hh;
|
|
2374
|
+
var __webpack_exports__iOSSlideInFromLeft = __webpack_exports__.kz;
|
|
2375
|
+
var __webpack_exports__iOSSlideInFromLeftKeyframes = __webpack_exports__.nI;
|
|
2376
|
+
var __webpack_exports__iOSSlideInFromRight = __webpack_exports__.E7;
|
|
2377
|
+
var __webpack_exports__iOSSlideInFromRightKeyframes = __webpack_exports__.Cq;
|
|
2378
|
+
var __webpack_exports__iOSSlideOutToLeftKeyframes = __webpack_exports__.cj;
|
|
2379
|
+
var __webpack_exports__iOSSlideOutToRightKeyframes = __webpack_exports__.Cj;
|
|
2380
|
+
var __webpack_exports__useNavigation = __webpack_exports__.HJ;
|
|
2381
|
+
var __webpack_exports__useRoute = __webpack_exports__.yj;
|
|
2382
|
+
var __webpack_exports__useRouter = __webpack_exports__.tv;
|
|
2383
|
+
export { __webpack_exports__Anchor as Anchor, __webpack_exports__FadeInKeyframes as FadeInKeyframes, __webpack_exports__FadeOutKeyframes as FadeOutKeyframes, __webpack_exports__GestureRegion as GestureRegion, __webpack_exports__Navigation as Navigation, __webpack_exports__Router as Router, __webpack_exports__Screen as Screen, __webpack_exports__SlideInFromBottomKeyframes as SlideInFromBottomKeyframes, __webpack_exports__SlideInFromLeftKeyframes as SlideInFromLeftKeyframes, __webpack_exports__SlideInFromRightKeyframes as SlideInFromRightKeyframes, __webpack_exports__SlideInFromTopKeyframes as SlideInFromTopKeyframes, __webpack_exports__SlideOutToBottomKeyframes as SlideOutToBottomKeyframes, __webpack_exports__SlideOutToLeftKeyframes as SlideOutToLeftKeyframes, __webpack_exports__SlideOutToRightKeyframes as SlideOutToRightKeyframes, __webpack_exports__SlideOutToTopKeyframes as SlideOutToTopKeyframes, __webpack_exports__ZoomInKeyframes as ZoomInKeyframes, __webpack_exports__ZoomOutKeyframes as ZoomOutKeyframes, __webpack_exports__androidBottomSheetSlideInOptions as androidBottomSheetSlideInOptions, __webpack_exports__androidBottomSheetSlideOutOptions as androidBottomSheetSlideOutOptions, __webpack_exports__androidConcealToBottomKeyframes as androidConcealToBottomKeyframes, __webpack_exports__androidFadeInFromBottom as androidFadeInFromBottom, __webpack_exports__androidFadeInFromBottomKeyframes as androidFadeInFromBottomKeyframes, __webpack_exports__androidFadeInFromBottomOptions as androidFadeInFromBottomOptions, __webpack_exports__androidFadeInFromBottomSheet as androidFadeInFromBottomSheet, __webpack_exports__androidFadeInFromBottomSheetKeyframes as androidFadeInFromBottomSheetKeyframes, __webpack_exports__androidFadeInFromRight as androidFadeInFromRight, __webpack_exports__androidFadeInFromRightKeyframes as androidFadeInFromRightKeyframes, __webpack_exports__androidFadeOutToBottomOptions as androidFadeOutToBottomOptions, __webpack_exports__androidFadeOutToLeftKeyframes as androidFadeOutToLeftKeyframes, __webpack_exports__androidRevealFromBottom as androidRevealFromBottom, __webpack_exports__androidRevealFromBottomKeyframes as androidRevealFromBottomKeyframes, __webpack_exports__androidRevealFromBottomOptions as androidRevealFromBottomOptions, __webpack_exports__androidScaleFromCentre as androidScaleFromCentre, __webpack_exports__androidScaleFromCentreKeyframes as androidScaleFromCentreKeyframes, __webpack_exports__androidScaleFromCentreOptions as androidScaleFromCentreOptions, __webpack_exports__androidScaleToCentreKeyframes as androidScaleToCentreKeyframes, __webpack_exports__iOSKeyframeOptions as iOSKeyframeOptions, __webpack_exports__iOSSlideInFromBottom as iOSSlideInFromBottom, __webpack_exports__iOSSlideInFromBottomKeyframes as iOSSlideInFromBottomKeyframes, __webpack_exports__iOSSlideInFromLeft as iOSSlideInFromLeft, __webpack_exports__iOSSlideInFromLeftKeyframes as iOSSlideInFromLeftKeyframes, __webpack_exports__iOSSlideInFromRight as iOSSlideInFromRight, __webpack_exports__iOSSlideInFromRightKeyframes as iOSSlideInFromRightKeyframes, __webpack_exports__iOSSlideOutToLeftKeyframes as iOSSlideOutToLeftKeyframes, __webpack_exports__iOSSlideOutToRightKeyframes as iOSSlideOutToRightKeyframes, __webpack_exports__useNavigation as useNavigation, __webpack_exports__useRoute as useRoute, __webpack_exports__useRouter as useRouter };
|
|
2384
|
+
|
|
2385
|
+
//# sourceMappingURL=index.js.map
|