@flemo/core 1.0.2 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { create as D } from "zustand";
|
|
2
|
-
import { pathToRegexp as
|
|
3
|
-
class
|
|
2
|
+
import { pathToRegexp as S, match as Y } from "path-to-regexp";
|
|
3
|
+
class B {
|
|
4
4
|
tasks = /* @__PURE__ */ new Map();
|
|
5
5
|
instanceId = Date.now().toString();
|
|
6
6
|
isLocked = !1;
|
|
@@ -10,7 +10,7 @@ class Y {
|
|
|
10
10
|
pendingTaskQueue = [];
|
|
11
11
|
isProcessingPending = !1;
|
|
12
12
|
async acquireLock(t) {
|
|
13
|
-
for (let
|
|
13
|
+
for (let s = 0; s < 10; s++) {
|
|
14
14
|
if (!this.isLocked)
|
|
15
15
|
return this.isLocked = !0, this.currentTaskId = t, !0;
|
|
16
16
|
await new Promise((r) => setTimeout(r, 100));
|
|
@@ -25,8 +25,8 @@ class Y {
|
|
|
25
25
|
}
|
|
26
26
|
emitSignal(t) {
|
|
27
27
|
const e = this.signalListeners.get(t);
|
|
28
|
-
e && (e.forEach((
|
|
29
|
-
this.resolveTask(
|
|
28
|
+
e && (e.forEach((a) => {
|
|
29
|
+
this.resolveTask(a);
|
|
30
30
|
}), this.signalListeners.delete(t));
|
|
31
31
|
}
|
|
32
32
|
// 대기 중인 태스크들을 처리하는 메서드
|
|
@@ -53,7 +53,7 @@ class Y {
|
|
|
53
53
|
return new Promise((t) => {
|
|
54
54
|
const e = () => {
|
|
55
55
|
this.pendingTaskQueue.filter(
|
|
56
|
-
(
|
|
56
|
+
(s) => s.status === "MANUAL_PENDING" || s.status === "SIGNAL_PENDING"
|
|
57
57
|
).length === 0 ? t() : setTimeout(e, 100);
|
|
58
58
|
};
|
|
59
59
|
e();
|
|
@@ -61,15 +61,15 @@ class Y {
|
|
|
61
61
|
}
|
|
62
62
|
// 태스크 상태 변경 시 대기 큐 처리
|
|
63
63
|
async onTaskStatusChange(t, e) {
|
|
64
|
-
(e === "COMPLETED" || e === "FAILED" || e === "ROLLEDBACK") && (this.pendingTaskQueue = this.pendingTaskQueue.filter((
|
|
64
|
+
(e === "COMPLETED" || e === "FAILED" || e === "ROLLEDBACK") && (this.pendingTaskQueue = this.pendingTaskQueue.filter((a) => a.id !== t), await this.processPendingTasks());
|
|
65
65
|
}
|
|
66
66
|
async addTask(t, e = {}) {
|
|
67
|
-
const
|
|
68
|
-
return new Promise((
|
|
67
|
+
const a = e.id || this.generateTaskId();
|
|
68
|
+
return new Promise((s, r) => {
|
|
69
69
|
this.taskQueue = this.taskQueue.then(async () => {
|
|
70
70
|
try {
|
|
71
|
-
const { control:
|
|
72
|
-
id:
|
|
71
|
+
const { control: o, validate: c, rollback: l, dependencies: u = [], delay: d } = e, m = new AbortController(), i = {
|
|
72
|
+
id: a,
|
|
73
73
|
execute: t,
|
|
74
74
|
timestamp: Date.now(),
|
|
75
75
|
retryCount: 0,
|
|
@@ -78,29 +78,29 @@ class Y {
|
|
|
78
78
|
instanceId: this.instanceId,
|
|
79
79
|
validate: c,
|
|
80
80
|
rollback: l,
|
|
81
|
-
control:
|
|
81
|
+
control: o,
|
|
82
82
|
abortController: m
|
|
83
83
|
};
|
|
84
|
-
this.tasks.set(
|
|
84
|
+
this.tasks.set(i.id, i), this.pendingTaskQueue.length > 0 && (this.pendingTaskQueue.push(i), await this.waitForPendingTasks(), this.pendingTaskQueue = this.pendingTaskQueue.filter((g) => g.id !== i.id));
|
|
85
85
|
try {
|
|
86
|
-
if (!await this.acquireLock(
|
|
87
|
-
throw
|
|
86
|
+
if (!await this.acquireLock(i.id))
|
|
87
|
+
throw i.status = "FAILED", new Error("FAILED");
|
|
88
88
|
try {
|
|
89
|
-
|
|
90
|
-
for (const f of
|
|
89
|
+
i.status = "PROCESSING";
|
|
90
|
+
for (const f of i.dependencies) {
|
|
91
91
|
const y = this.tasks.get(f);
|
|
92
92
|
if (!y || y.status !== "COMPLETED")
|
|
93
|
-
throw
|
|
93
|
+
throw i.status = "FAILED", new Error("FAILED");
|
|
94
94
|
}
|
|
95
|
-
if (
|
|
96
|
-
throw
|
|
95
|
+
if (i.validate && !await i.validate())
|
|
96
|
+
throw i.status = "FAILED", new Error("FAILED");
|
|
97
97
|
d && d > 0 && await new Promise((f) => setTimeout(f, d));
|
|
98
|
-
const p = await
|
|
99
|
-
if (
|
|
100
|
-
|
|
98
|
+
const p = await i.execute(i.abortController);
|
|
99
|
+
if (i.abortController.signal.aborted) {
|
|
100
|
+
i.status = "COMPLETED", await this.onTaskStatusChange(i.id, "COMPLETED"), s({
|
|
101
101
|
success: !0,
|
|
102
102
|
result: void 0,
|
|
103
|
-
taskId:
|
|
103
|
+
taskId: i.id,
|
|
104
104
|
timestamp: Date.now(),
|
|
105
105
|
instanceId: this.instanceId
|
|
106
106
|
});
|
|
@@ -109,40 +109,40 @@ class Y {
|
|
|
109
109
|
if (e.control) {
|
|
110
110
|
const f = e.control;
|
|
111
111
|
if (f.delay && f.delay > 0 && await new Promise((y) => setTimeout(y, f.delay)), f.manual) {
|
|
112
|
-
|
|
112
|
+
i.status = "MANUAL_PENDING", i.manualResolver = { resolve: s, reject: r, result: p }, this.pendingTaskQueue.push(i), await this.onTaskStatusChange(i.id, "MANUAL_PENDING");
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
if (f.signal) {
|
|
116
|
-
|
|
116
|
+
i.status = "SIGNAL_PENDING", i.manualResolver = { resolve: s, reject: r, result: p }, this.signalListeners.has(f.signal) || this.signalListeners.set(f.signal, /* @__PURE__ */ new Set()), this.signalListeners.get(f.signal).add(i.id), this.pendingTaskQueue.push(i), await this.onTaskStatusChange(i.id, "SIGNAL_PENDING");
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
if (f.condition && !await f.condition()) {
|
|
120
|
-
|
|
120
|
+
i.status = "MANUAL_PENDING", i.manualResolver = { resolve: s, reject: r, result: p }, this.pendingTaskQueue.push(i), await this.onTaskStatusChange(i.id, "MANUAL_PENDING");
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
|
|
124
|
+
i.status = "COMPLETED", await this.onTaskStatusChange(i.id, "COMPLETED"), s({
|
|
125
125
|
success: !0,
|
|
126
126
|
result: p,
|
|
127
|
-
taskId:
|
|
127
|
+
taskId: i.id,
|
|
128
128
|
timestamp: Date.now(),
|
|
129
129
|
instanceId: this.instanceId
|
|
130
130
|
});
|
|
131
131
|
} catch (p) {
|
|
132
|
-
if (
|
|
132
|
+
if (i.status = "FAILED", i.rollback)
|
|
133
133
|
try {
|
|
134
|
-
await
|
|
134
|
+
await i.rollback(), i.status = "ROLLEDBACK";
|
|
135
135
|
} catch {
|
|
136
136
|
}
|
|
137
|
-
throw await this.onTaskStatusChange(
|
|
137
|
+
throw await this.onTaskStatusChange(i.id, i.status), p;
|
|
138
138
|
} finally {
|
|
139
|
-
this.releaseLock(
|
|
139
|
+
this.releaseLock(i.id);
|
|
140
140
|
}
|
|
141
141
|
} catch (g) {
|
|
142
142
|
r(g);
|
|
143
143
|
}
|
|
144
|
-
} catch (
|
|
145
|
-
r(
|
|
144
|
+
} catch (o) {
|
|
145
|
+
r(o);
|
|
146
146
|
}
|
|
147
147
|
}).catch(r);
|
|
148
148
|
});
|
|
@@ -155,10 +155,10 @@ class Y {
|
|
|
155
155
|
if (e.control?.condition && !await e.control.condition())
|
|
156
156
|
return !1;
|
|
157
157
|
e.status = "COMPLETED";
|
|
158
|
-
const
|
|
159
|
-
return
|
|
158
|
+
const a = e.manualResolver;
|
|
159
|
+
return a.resolve({
|
|
160
160
|
success: !0,
|
|
161
|
-
result:
|
|
161
|
+
result: a.result,
|
|
162
162
|
taskId: e.id,
|
|
163
163
|
timestamp: Date.now(),
|
|
164
164
|
instanceId: this.instanceId
|
|
@@ -173,7 +173,7 @@ class Y {
|
|
|
173
173
|
await Promise.all(t.map((e) => this.resolveTask(e.id)));
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
const
|
|
176
|
+
const pt = new B(), yt = D((n) => ({
|
|
177
177
|
index: -1,
|
|
178
178
|
histories: [],
|
|
179
179
|
addHistory: (t) => n((e) => ({
|
|
@@ -186,29 +186,29 @@ const dt = new Y(), mt = D((n) => ({
|
|
|
186
186
|
})),
|
|
187
187
|
popHistory: (t) => n((e) => ({
|
|
188
188
|
index: e.index - 1,
|
|
189
|
-
histories: e.histories.filter((
|
|
189
|
+
histories: e.histories.filter((a, s) => s !== t)
|
|
190
190
|
}))
|
|
191
|
-
})),
|
|
191
|
+
})), gt = D((n) => ({
|
|
192
192
|
status: "IDLE",
|
|
193
193
|
transitionTaskId: null,
|
|
194
194
|
setStatus: (t) => n({ status: t }),
|
|
195
195
|
setTransitionTaskId: (t) => n({ transitionTaskId: t })
|
|
196
196
|
}));
|
|
197
197
|
let N = 0;
|
|
198
|
-
function
|
|
198
|
+
function Pt() {
|
|
199
199
|
N += 1;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Et() {
|
|
202
202
|
return N > 0 ? (N -= 1, !0) : !1;
|
|
203
203
|
}
|
|
204
204
|
function k({
|
|
205
205
|
name: n,
|
|
206
206
|
initial: t,
|
|
207
207
|
idle: e,
|
|
208
|
-
enter:
|
|
209
|
-
enterBack:
|
|
208
|
+
enter: a,
|
|
209
|
+
enterBack: s,
|
|
210
210
|
exit: r,
|
|
211
|
-
exitBack:
|
|
211
|
+
exitBack: o,
|
|
212
212
|
options: c
|
|
213
213
|
}) {
|
|
214
214
|
return {
|
|
@@ -218,25 +218,25 @@ function k({
|
|
|
218
218
|
"IDLE-true": e,
|
|
219
219
|
"IDLE-false": e,
|
|
220
220
|
"PUSHING-false": r,
|
|
221
|
-
"PUSHING-true":
|
|
221
|
+
"PUSHING-true": a,
|
|
222
222
|
"REPLACING-false": r,
|
|
223
|
-
"REPLACING-true":
|
|
224
|
-
"POPPING-false":
|
|
225
|
-
"POPPING-true":
|
|
223
|
+
"REPLACING-true": a,
|
|
224
|
+
"POPPING-false": o,
|
|
225
|
+
"POPPING-true": s,
|
|
226
226
|
"COMPLETED-false": r,
|
|
227
|
-
"COMPLETED-true":
|
|
227
|
+
"COMPLETED-true": a
|
|
228
228
|
},
|
|
229
229
|
...c
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function It({
|
|
233
233
|
name: n,
|
|
234
234
|
initial: t,
|
|
235
235
|
idle: e,
|
|
236
|
-
pushOnEnter:
|
|
237
|
-
pushOnExit:
|
|
236
|
+
pushOnEnter: a,
|
|
237
|
+
pushOnExit: s,
|
|
238
238
|
replaceOnEnter: r,
|
|
239
|
-
replaceOnExit:
|
|
239
|
+
replaceOnExit: o,
|
|
240
240
|
popOnEnter: c,
|
|
241
241
|
popOnExit: l,
|
|
242
242
|
completedOnExit: u,
|
|
@@ -249,9 +249,9 @@ function gt({
|
|
|
249
249
|
variants: {
|
|
250
250
|
"IDLE-true": e,
|
|
251
251
|
"IDLE-false": e,
|
|
252
|
-
"PUSHING-false":
|
|
253
|
-
"PUSHING-true":
|
|
254
|
-
"REPLACING-false":
|
|
252
|
+
"PUSHING-false": s,
|
|
253
|
+
"PUSHING-true": a,
|
|
254
|
+
"REPLACING-false": o,
|
|
255
255
|
"REPLACING-true": r,
|
|
256
256
|
"POPPING-false": l,
|
|
257
257
|
"POPPING-true": c,
|
|
@@ -261,12 +261,12 @@ function gt({
|
|
|
261
261
|
...m
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
-
const
|
|
265
|
-
const [
|
|
266
|
-
if (
|
|
267
|
-
const c = (n -
|
|
268
|
-
return r + c * (
|
|
269
|
-
},
|
|
264
|
+
const Q = (n, t, e) => {
|
|
265
|
+
const [a, s] = t, [r, o] = e;
|
|
266
|
+
if (s === a) return r;
|
|
267
|
+
const c = (n - a) / (s - a);
|
|
268
|
+
return r + c * (o - r);
|
|
269
|
+
}, X = k({
|
|
270
270
|
name: "cupertino",
|
|
271
271
|
initial: {
|
|
272
272
|
x: "100%"
|
|
@@ -319,10 +319,10 @@ const B = (n, t, e) => {
|
|
|
319
319
|
decoratorName: "overlay",
|
|
320
320
|
swipeDirection: "x",
|
|
321
321
|
onSwipeStart: async () => !0,
|
|
322
|
-
onSwipe: (n, t, { animate: e, currentScreen:
|
|
323
|
-
const { offset:
|
|
322
|
+
onSwipe: (n, t, { animate: e, currentScreen: a, prevScreen: s, onProgress: r }) => {
|
|
323
|
+
const { offset: o } = t, c = o.x, l = Q(c, [0, window.innerWidth], [0, 100]);
|
|
324
324
|
return r?.(!0, l), e(
|
|
325
|
-
|
|
325
|
+
a,
|
|
326
326
|
{
|
|
327
327
|
x: Math.max(0, c)
|
|
328
328
|
},
|
|
@@ -330,7 +330,7 @@ const B = (n, t, e) => {
|
|
|
330
330
|
duration: 0
|
|
331
331
|
}
|
|
332
332
|
), e(
|
|
333
|
-
|
|
333
|
+
s,
|
|
334
334
|
{
|
|
335
335
|
x: -100 + l
|
|
336
336
|
},
|
|
@@ -339,11 +339,11 @@ const B = (n, t, e) => {
|
|
|
339
339
|
}
|
|
340
340
|
), l;
|
|
341
341
|
},
|
|
342
|
-
onSwipeEnd: async (n, t, { animate: e, currentScreen:
|
|
343
|
-
const { offset:
|
|
342
|
+
onSwipeEnd: async (n, t, { animate: e, currentScreen: a, prevScreen: s, onStart: r }) => {
|
|
343
|
+
const { offset: o, velocity: c } = t, u = o.x > 50 || c.x > 20;
|
|
344
344
|
return r?.(u), await Promise.all([
|
|
345
345
|
e(
|
|
346
|
-
|
|
346
|
+
a,
|
|
347
347
|
{
|
|
348
348
|
x: u ? "100%" : 0
|
|
349
349
|
},
|
|
@@ -353,7 +353,7 @@ const B = (n, t, e) => {
|
|
|
353
353
|
}
|
|
354
354
|
),
|
|
355
355
|
e(
|
|
356
|
-
|
|
356
|
+
s,
|
|
357
357
|
{
|
|
358
358
|
x: u ? 0 : -100
|
|
359
359
|
},
|
|
@@ -365,12 +365,12 @@ const B = (n, t, e) => {
|
|
|
365
365
|
]), u;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
}),
|
|
369
|
-
const [
|
|
370
|
-
if (
|
|
371
|
-
const c = (n -
|
|
372
|
-
return r + c * (
|
|
373
|
-
},
|
|
368
|
+
}), F = (n, t, e) => {
|
|
369
|
+
const [a, s] = t, [r, o] = e;
|
|
370
|
+
if (s === a) return r;
|
|
371
|
+
const c = (n - a) / (s - a);
|
|
372
|
+
return r + c * (o - r);
|
|
373
|
+
}, z = k({
|
|
374
374
|
name: "layout",
|
|
375
375
|
initial: {
|
|
376
376
|
opacity: 0.97
|
|
@@ -419,12 +419,12 @@ const B = (n, t, e) => {
|
|
|
419
419
|
decoratorName: "overlay",
|
|
420
420
|
swipeDirection: "y",
|
|
421
421
|
onSwipeStart: async () => !0,
|
|
422
|
-
onSwipe: (n, t, { animate: e, currentScreen:
|
|
423
|
-
const { offset: r } = t,
|
|
424
|
-
return
|
|
425
|
-
|
|
422
|
+
onSwipe: (n, t, { animate: e, currentScreen: a, onProgress: s }) => {
|
|
423
|
+
const { offset: r } = t, o = r.y, c = Math.max(0, Math.min(56, o)), l = F(c, [0, 56], [1, 0.96]), u = Math.max(0, o - 56), d = Math.min(1, u / 160), m = Math.sqrt(d) * 12, i = Math.max(0, c + m), h = Math.min(56, i);
|
|
424
|
+
return s?.(!0, 100), e(
|
|
425
|
+
a,
|
|
426
426
|
{
|
|
427
|
-
y:
|
|
427
|
+
y: i,
|
|
428
428
|
opacity: l
|
|
429
429
|
},
|
|
430
430
|
{
|
|
@@ -432,11 +432,11 @@ const B = (n, t, e) => {
|
|
|
432
432
|
}
|
|
433
433
|
), h;
|
|
434
434
|
},
|
|
435
|
-
onSwipeEnd: async (n, t, { animate: e, currentScreen:
|
|
436
|
-
const { offset:
|
|
435
|
+
onSwipeEnd: async (n, t, { animate: e, currentScreen: a, prevScreen: s, onStart: r }) => {
|
|
436
|
+
const { offset: o, velocity: c } = t, u = o.y > 56 || c.y > 20;
|
|
437
437
|
return r?.(u), await Promise.all([
|
|
438
438
|
e(
|
|
439
|
-
|
|
439
|
+
a,
|
|
440
440
|
{
|
|
441
441
|
y: u ? "100%" : 0,
|
|
442
442
|
opacity: u ? 0.96 : 1
|
|
@@ -446,7 +446,7 @@ const B = (n, t, e) => {
|
|
|
446
446
|
}
|
|
447
447
|
),
|
|
448
448
|
e(
|
|
449
|
-
|
|
449
|
+
s,
|
|
450
450
|
{
|
|
451
451
|
y: 0,
|
|
452
452
|
opacity: u ? 1 : 0.97
|
|
@@ -458,7 +458,7 @@ const B = (n, t, e) => {
|
|
|
458
458
|
]), u;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
}),
|
|
461
|
+
}), V = k({
|
|
462
462
|
name: "material",
|
|
463
463
|
initial: {
|
|
464
464
|
y: "100%"
|
|
@@ -510,29 +510,29 @@ const B = (n, t, e) => {
|
|
|
510
510
|
options: {
|
|
511
511
|
swipeDirection: "y",
|
|
512
512
|
onSwipeStart: async () => !0,
|
|
513
|
-
onSwipe: (n, t, { animate: e, currentScreen:
|
|
514
|
-
const { offset:
|
|
513
|
+
onSwipe: (n, t, { animate: e, currentScreen: a, prevScreen: s, onProgress: r }) => {
|
|
514
|
+
const { offset: o } = t, c = o.y, l = Math.max(0, Math.min(56, c)), u = Math.max(0, c - 56), d = Math.min(1, u / 160), m = Math.sqrt(d) * 12, i = Math.max(0, l + m), h = Math.min(56, i);
|
|
515
515
|
return r?.(!0, h), e(
|
|
516
|
-
|
|
516
|
+
a,
|
|
517
517
|
{
|
|
518
|
-
y:
|
|
518
|
+
y: i
|
|
519
519
|
},
|
|
520
520
|
{
|
|
521
521
|
duration: 0
|
|
522
522
|
}
|
|
523
523
|
), e(
|
|
524
|
-
|
|
524
|
+
s,
|
|
525
525
|
{
|
|
526
526
|
y: -56 + h
|
|
527
527
|
},
|
|
528
528
|
{ duration: 0 }
|
|
529
529
|
), h;
|
|
530
530
|
},
|
|
531
|
-
onSwipeEnd: async (n, t, { animate: e, currentScreen:
|
|
532
|
-
const { offset:
|
|
531
|
+
onSwipeEnd: async (n, t, { animate: e, currentScreen: a, prevScreen: s, onStart: r }) => {
|
|
532
|
+
const { offset: o, velocity: c } = t, u = o.y > 56 || c.y > 20;
|
|
533
533
|
return r?.(u), await Promise.all([
|
|
534
534
|
e(
|
|
535
|
-
|
|
535
|
+
a,
|
|
536
536
|
{
|
|
537
537
|
y: u ? "100%" : 0
|
|
538
538
|
},
|
|
@@ -542,7 +542,7 @@ const B = (n, t, e) => {
|
|
|
542
542
|
}
|
|
543
543
|
),
|
|
544
544
|
e(
|
|
545
|
-
|
|
545
|
+
s,
|
|
546
546
|
{
|
|
547
547
|
y: u ? 0 : -56
|
|
548
548
|
},
|
|
@@ -554,7 +554,7 @@ const B = (n, t, e) => {
|
|
|
554
554
|
]), u;
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
}),
|
|
557
|
+
}), Z = k({
|
|
558
558
|
name: "none",
|
|
559
559
|
initial: {},
|
|
560
560
|
idle: {
|
|
@@ -587,21 +587,22 @@ const B = (n, t, e) => {
|
|
|
587
587
|
duration: 0
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
}),
|
|
591
|
-
["none",
|
|
592
|
-
["cupertino",
|
|
593
|
-
["material",
|
|
594
|
-
["layout",
|
|
595
|
-
]),
|
|
590
|
+
}), kt = /* @__PURE__ */ new Map([
|
|
591
|
+
["none", Z],
|
|
592
|
+
["cupertino", X],
|
|
593
|
+
["material", V],
|
|
594
|
+
["layout", z]
|
|
595
|
+
]), Tt = D((n) => ({
|
|
596
596
|
defaultTransitionName: "cupertino",
|
|
597
597
|
setDefaultTransitionName: (t) => n({ defaultTransitionName: t })
|
|
598
598
|
}));
|
|
599
|
-
function
|
|
599
|
+
function j({
|
|
600
600
|
name: n,
|
|
601
601
|
initial: t,
|
|
602
|
-
|
|
602
|
+
idle: e,
|
|
603
|
+
enter: a,
|
|
603
604
|
exit: s,
|
|
604
|
-
options:
|
|
605
|
+
options: r
|
|
605
606
|
}) {
|
|
606
607
|
return {
|
|
607
608
|
name: n,
|
|
@@ -609,26 +610,26 @@ function Z({
|
|
|
609
610
|
variants: {
|
|
610
611
|
"IDLE-true": e,
|
|
611
612
|
"IDLE-false": e,
|
|
612
|
-
"PUSHING-false": s,
|
|
613
613
|
"PUSHING-true": e,
|
|
614
|
-
"
|
|
614
|
+
"PUSHING-false": a,
|
|
615
615
|
"REPLACING-true": e,
|
|
616
|
-
"
|
|
616
|
+
"REPLACING-false": a,
|
|
617
617
|
"POPPING-true": e,
|
|
618
|
-
"
|
|
619
|
-
"COMPLETED-true": e
|
|
618
|
+
"POPPING-false": s,
|
|
619
|
+
"COMPLETED-true": e,
|
|
620
|
+
"COMPLETED-false": a
|
|
620
621
|
},
|
|
621
|
-
...
|
|
622
|
+
...r
|
|
622
623
|
};
|
|
623
624
|
}
|
|
624
|
-
function
|
|
625
|
+
function Nt({
|
|
625
626
|
name: n,
|
|
626
627
|
initial: t,
|
|
627
628
|
idle: e,
|
|
628
|
-
pushOnEnter:
|
|
629
|
-
pushOnExit:
|
|
629
|
+
pushOnEnter: a,
|
|
630
|
+
pushOnExit: s,
|
|
630
631
|
replaceOnEnter: r,
|
|
631
|
-
replaceOnExit:
|
|
632
|
+
replaceOnExit: o,
|
|
632
633
|
popOnEnter: c,
|
|
633
634
|
popOnExit: l,
|
|
634
635
|
completedOnEnter: u,
|
|
@@ -641,9 +642,9 @@ function It({
|
|
|
641
642
|
variants: {
|
|
642
643
|
"IDLE-true": e,
|
|
643
644
|
"IDLE-false": e,
|
|
644
|
-
"PUSHING-false":
|
|
645
|
-
"PUSHING-true":
|
|
646
|
-
"REPLACING-false":
|
|
645
|
+
"PUSHING-false": s,
|
|
646
|
+
"PUSHING-true": a,
|
|
647
|
+
"REPLACING-false": o,
|
|
647
648
|
"REPLACING-true": r,
|
|
648
649
|
"POPPING-false": l,
|
|
649
650
|
"POPPING-true": c,
|
|
@@ -653,25 +654,39 @@ function It({
|
|
|
653
654
|
...m
|
|
654
655
|
};
|
|
655
656
|
}
|
|
656
|
-
const
|
|
657
|
+
const K = j({
|
|
657
658
|
name: "overlay",
|
|
658
659
|
initial: {
|
|
659
660
|
opacity: 0,
|
|
660
661
|
backgroundColor: "rgba(0, 0, 0, 0)"
|
|
661
662
|
},
|
|
662
|
-
|
|
663
|
+
idle: {
|
|
663
664
|
value: {
|
|
664
665
|
opacity: 0,
|
|
666
|
+
backgroundColor: "rgba(0, 0, 0, 0)"
|
|
667
|
+
},
|
|
668
|
+
options: {
|
|
669
|
+
duration: 0
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
// Visible dim — applied when this screen is the one going behind / sitting
|
|
673
|
+
// behind a new active screen (PUSHING-false / REPLACING-false / COMPLETED-false).
|
|
674
|
+
enter: {
|
|
675
|
+
value: {
|
|
676
|
+
opacity: 1,
|
|
665
677
|
backgroundColor: "rgba(0, 0, 0, 0.3)"
|
|
666
678
|
},
|
|
667
679
|
options: {
|
|
668
680
|
duration: 0.3
|
|
669
681
|
}
|
|
670
682
|
},
|
|
683
|
+
// POPPING-false target: the previously-behind screen is returning to active.
|
|
684
|
+
// Fades from `enter` (visible dim) back to invisible so the overlay clears
|
|
685
|
+
// before the screen lands at COMPLETED-true (= idle).
|
|
671
686
|
exit: {
|
|
672
687
|
value: {
|
|
673
|
-
opacity:
|
|
674
|
-
backgroundColor: "rgba(0, 0, 0, 0
|
|
688
|
+
opacity: 0,
|
|
689
|
+
backgroundColor: "rgba(0, 0, 0, 0)"
|
|
675
690
|
},
|
|
676
691
|
options: {
|
|
677
692
|
duration: 0.3
|
|
@@ -687,8 +702,8 @@ const j = Z({
|
|
|
687
702
|
duration: 0.3
|
|
688
703
|
}
|
|
689
704
|
),
|
|
690
|
-
onSwipe: (n, t, { animate: e, prevDecorator:
|
|
691
|
-
|
|
705
|
+
onSwipe: (n, t, { animate: e, prevDecorator: a }) => e(
|
|
706
|
+
a,
|
|
692
707
|
{
|
|
693
708
|
opacity: Math.max(0, 1 - t / 100)
|
|
694
709
|
},
|
|
@@ -706,7 +721,7 @@ const j = Z({
|
|
|
706
721
|
}
|
|
707
722
|
)
|
|
708
723
|
}
|
|
709
|
-
}),
|
|
724
|
+
}), Lt = /* @__PURE__ */ new Map([["overlay", K]]), I = {
|
|
710
725
|
"IDLE-true": "self",
|
|
711
726
|
"IDLE-false": "self",
|
|
712
727
|
"PUSHING-true": "initial",
|
|
@@ -717,7 +732,7 @@ const j = Z({
|
|
|
717
732
|
"POPPING-false": "PUSHING-false",
|
|
718
733
|
"COMPLETED-true": "self",
|
|
719
734
|
"COMPLETED-false": "self"
|
|
720
|
-
},
|
|
735
|
+
}, G = Object.keys(I), q = G, W = (n) => n.replace(/[^a-zA-Z0-9_-]/g, "_"), O = (n) => typeof n == "object" && n !== null && !Array.isArray(n), J = /* @__PURE__ */ new Set([
|
|
721
736
|
"opacity",
|
|
722
737
|
"scale",
|
|
723
738
|
"scaleX",
|
|
@@ -754,7 +769,7 @@ const j = Z({
|
|
|
754
769
|
"strokeDashoffset",
|
|
755
770
|
"strokeMiterlimit",
|
|
756
771
|
"strokeWidth"
|
|
757
|
-
]),
|
|
772
|
+
]), tt = (n, t) => t.startsWith("--") ? `${n}` : J.has(t) ? `${n}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${n}deg` : `${n}px`, b = (n, t) => typeof t == "number" ? tt(t, n) : typeof t == "string" ? t : "", $ = (n) => n.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`), R = /* @__PURE__ */ new Set([
|
|
758
773
|
"x",
|
|
759
774
|
"y",
|
|
760
775
|
"z",
|
|
@@ -765,7 +780,7 @@ const j = Z({
|
|
|
765
780
|
"rotateX",
|
|
766
781
|
"rotateY",
|
|
767
782
|
"rotateZ"
|
|
768
|
-
]),
|
|
783
|
+
]), et = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, nt = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, at = /^1(\.0+)?$/, st = (n, t) => n === "scale" || n === "scaleX" || n === "scaleY" ? t === 1 ? !0 : typeof t == "string" ? at.test(t.trim()) : !1 : n === "rotate" || n === "rotateX" || n === "rotateY" || n === "rotateZ" ? t === 0 ? !0 : typeof t == "string" ? nt.test(t.trim()) : !1 : t === 0 ? !0 : typeof t == "string" ? et.test(t.trim()) : !1, rt = (n, t) => {
|
|
769
784
|
switch (n) {
|
|
770
785
|
case "x":
|
|
771
786
|
return `translateX(${t})`;
|
|
@@ -789,35 +804,35 @@ const j = Z({
|
|
|
789
804
|
default:
|
|
790
805
|
return "";
|
|
791
806
|
}
|
|
792
|
-
},
|
|
807
|
+
}, Dt = (n) => {
|
|
793
808
|
const t = /* @__PURE__ */ new Set();
|
|
794
809
|
let e = !1;
|
|
795
|
-
const
|
|
796
|
-
if (
|
|
797
|
-
for (const r of Object.keys(
|
|
798
|
-
const
|
|
799
|
-
|
|
810
|
+
const a = (s) => {
|
|
811
|
+
if (O(s))
|
|
812
|
+
for (const r of Object.keys(s)) {
|
|
813
|
+
const o = s[r];
|
|
814
|
+
b(r, o) !== "" && (R.has(r) ? e = !0 : t.add($(r)));
|
|
800
815
|
}
|
|
801
816
|
};
|
|
802
|
-
|
|
803
|
-
for (const
|
|
804
|
-
s
|
|
817
|
+
a(n.initial);
|
|
818
|
+
for (const s of Object.values(n.variants))
|
|
819
|
+
a(s.value);
|
|
805
820
|
return e && t.add("transform"), Array.from(t);
|
|
806
821
|
}, P = (n) => {
|
|
807
|
-
if (!
|
|
822
|
+
if (!O(n)) return [];
|
|
808
823
|
const t = [];
|
|
809
824
|
let e = !0;
|
|
810
|
-
const
|
|
811
|
-
for (const
|
|
812
|
-
const r = n[
|
|
813
|
-
|
|
825
|
+
const a = [];
|
|
826
|
+
for (const s of Object.keys(n)) {
|
|
827
|
+
const r = n[s], o = b(s, r);
|
|
828
|
+
o !== "" && (R.has(s) ? (t.push(rt(s, o)), st(s, r) || (e = !1)) : a.push({ property: $(s), value: o }));
|
|
814
829
|
}
|
|
815
|
-
return t.length > 0 &&
|
|
830
|
+
return t.length > 0 && a.push({
|
|
816
831
|
property: "transform",
|
|
817
832
|
value: e ? "none" : t.join(" ")
|
|
818
|
-
}),
|
|
833
|
+
}), a;
|
|
819
834
|
}, E = (n) => n.map((t) => ` ${t.property}: ${t.value};`).join(`
|
|
820
|
-
`),
|
|
835
|
+
`), ot = (n) => Array.isArray(n) ? n.length === 4 && n.every((t) => typeof t == "number") ? `cubic-bezier(${n.join(", ")})` : "linear" : typeof n == "string" ? {
|
|
821
836
|
linear: "linear",
|
|
822
837
|
easeIn: "ease-in",
|
|
823
838
|
easeOut: "ease-out",
|
|
@@ -827,33 +842,33 @@ const j = Z({
|
|
|
827
842
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
828
843
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
829
844
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
830
|
-
}[n] ?? "ease" : "ease",
|
|
845
|
+
}[n] ?? "ease" : "ease", _ = (n) => {
|
|
831
846
|
if (!n) return 0;
|
|
832
847
|
const t = n.duration;
|
|
833
848
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
834
|
-
},
|
|
835
|
-
const [e,
|
|
836
|
-
return `[data-flemo-screen][data-flemo-transition="${n}"][data-flemo-status="${e}"][data-flemo-active="${
|
|
837
|
-
},
|
|
838
|
-
const [e,
|
|
839
|
-
return `[data-flemo-decorator][data-flemo-decorator-name="${n}"][data-flemo-status="${e}"][data-flemo-active="${
|
|
849
|
+
}, H = (n) => n && typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, v = (n, t) => {
|
|
850
|
+
const [e, a] = t.split("-");
|
|
851
|
+
return `[data-flemo-screen][data-flemo-transition="${n}"][data-flemo-status="${e}"][data-flemo-active="${a}"]`;
|
|
852
|
+
}, A = (n, t) => {
|
|
853
|
+
const [e, a] = t.split("-");
|
|
854
|
+
return `[data-flemo-decorator][data-flemo-decorator-name="${n}"][data-flemo-status="${e}"][data-flemo-active="${a}"]`;
|
|
840
855
|
}, it = (n, t) => {
|
|
841
|
-
const [e,
|
|
842
|
-
return `[data-flemo-bar][data-flemo-bar-transition="${n}"][data-flemo-bar-status="${e}"][data-flemo-bar-active="${
|
|
843
|
-
},
|
|
844
|
-
const
|
|
856
|
+
const [e, a] = t.split("-");
|
|
857
|
+
return `[data-flemo-bar][data-flemo-bar-transition="${n}"][data-flemo-bar-status="${e}"][data-flemo-bar-active="${a}"][data-flemo-bar-riding="true"]`;
|
|
858
|
+
}, ct = (n, t, e) => `flemo-${n}-${W(t)}-${e}`, M = (n, t, e, a, s, r) => {
|
|
859
|
+
const o = P(a), c = P(s.value), l = _(s.options), u = H(s.options), d = ot(s.options?.ease), m = r(t, e), i = n === "screen" ? `${m},
|
|
845
860
|
${it(t, e)}` : m;
|
|
846
|
-
if (c.length === 0 &&
|
|
861
|
+
if (c.length === 0 && o.length === 0)
|
|
847
862
|
return "";
|
|
848
863
|
if (l <= 0 && u <= 0)
|
|
849
|
-
return c.length === 0 ? "" : `${
|
|
864
|
+
return c.length === 0 ? "" : `${i} {
|
|
850
865
|
${E(c)}
|
|
851
866
|
animation: none;
|
|
852
867
|
}`;
|
|
853
|
-
const h =
|
|
868
|
+
const h = ct(n, t, e), g = [
|
|
854
869
|
`@keyframes ${h} {`,
|
|
855
870
|
" from {",
|
|
856
|
-
E(
|
|
871
|
+
E(o).replace(/^/gm, " "),
|
|
857
872
|
" }",
|
|
858
873
|
" to {",
|
|
859
874
|
E(c).replace(/^/gm, " "),
|
|
@@ -867,140 +882,142 @@ ${E(c)}
|
|
|
867
882
|
u > 0 ? `${u}s` : null,
|
|
868
883
|
"both"
|
|
869
884
|
].filter(Boolean).join(" "), f = Array.from(
|
|
870
|
-
/* @__PURE__ */ new Set([...
|
|
885
|
+
/* @__PURE__ */ new Set([...o.map((T) => T.property), ...c.map((T) => T.property)])
|
|
871
886
|
), y = f.length > 0 ? ` will-change: ${f.join(", ")};
|
|
872
|
-
` : "",
|
|
887
|
+
` : "", w = e.split("-")[0], U = `${i} {
|
|
873
888
|
animation: ${p};
|
|
874
|
-
${y}
|
|
889
|
+
${y}${w === "PUSHING" || w === "REPLACING" ? ` contain: layout;
|
|
890
|
+
pointer-events: none;
|
|
891
|
+
` : ""}}`;
|
|
875
892
|
return `${g}
|
|
876
|
-
${
|
|
877
|
-
},
|
|
878
|
-
const
|
|
879
|
-
return
|
|
880
|
-
${E(
|
|
893
|
+
${U}`;
|
|
894
|
+
}, x = (n, t, e, a) => {
|
|
895
|
+
const s = P(a.value);
|
|
896
|
+
return s.length === 0 ? "" : `${n(t, e)} {
|
|
897
|
+
${E(s)}
|
|
881
898
|
}`;
|
|
882
|
-
},
|
|
899
|
+
}, wt = (n, t) => {
|
|
883
900
|
const e = [];
|
|
884
|
-
for (const
|
|
885
|
-
const
|
|
886
|
-
for (const r of
|
|
887
|
-
const
|
|
901
|
+
for (const a of n) {
|
|
902
|
+
const s = a.name;
|
|
903
|
+
for (const r of G) {
|
|
904
|
+
const o = a.variants[r], c = I[r];
|
|
888
905
|
if (c === "self") {
|
|
889
|
-
e.push(
|
|
906
|
+
e.push(x(v, s, r, o));
|
|
890
907
|
continue;
|
|
891
908
|
}
|
|
892
|
-
const l = c === "initial" ?
|
|
909
|
+
const l = c === "initial" ? a.initial : a.variants[c].value;
|
|
893
910
|
e.push(
|
|
894
|
-
|
|
911
|
+
M("screen", s, r, l, o, v)
|
|
895
912
|
);
|
|
896
913
|
}
|
|
897
914
|
}
|
|
898
|
-
for (const
|
|
899
|
-
const
|
|
900
|
-
for (const r of
|
|
901
|
-
const
|
|
915
|
+
for (const a of t) {
|
|
916
|
+
const s = a.name;
|
|
917
|
+
for (const r of q) {
|
|
918
|
+
const o = a.variants[r], c = I[r];
|
|
902
919
|
if (c === "self") {
|
|
903
|
-
e.push(
|
|
920
|
+
e.push(x(A, s, r, o));
|
|
904
921
|
continue;
|
|
905
922
|
}
|
|
906
|
-
const l = c === "initial" ?
|
|
923
|
+
const l = c === "initial" ? a.initial : a.variants[c].value;
|
|
907
924
|
e.push(
|
|
908
|
-
|
|
925
|
+
M(
|
|
909
926
|
"decorator",
|
|
910
|
-
|
|
927
|
+
s,
|
|
911
928
|
r,
|
|
912
929
|
l,
|
|
913
|
-
|
|
914
|
-
|
|
930
|
+
o,
|
|
931
|
+
A
|
|
915
932
|
)
|
|
916
933
|
);
|
|
917
934
|
}
|
|
918
935
|
}
|
|
919
|
-
return e.filter((
|
|
936
|
+
return e.filter((a) => a.length > 0).join(`
|
|
920
937
|
|
|
921
938
|
`);
|
|
922
|
-
},
|
|
939
|
+
}, St = (n, t) => {
|
|
923
940
|
const e = I[t];
|
|
924
941
|
if (e === "self") return !1;
|
|
925
|
-
const
|
|
926
|
-
if (
|
|
927
|
-
const
|
|
942
|
+
const a = n.variants[t], s = _(a.options), r = H(a.options);
|
|
943
|
+
if (s <= 0 && r <= 0) return !1;
|
|
944
|
+
const o = e === "initial" ? n.initial : n.variants[e].value, c = P(o), l = P(a.value);
|
|
928
945
|
return c.length > 0 || l.length > 0;
|
|
929
946
|
};
|
|
930
|
-
function
|
|
947
|
+
function vt() {
|
|
931
948
|
return typeof document > "u";
|
|
932
949
|
}
|
|
933
|
-
function
|
|
934
|
-
return Array.isArray(n) ? n.find((e) =>
|
|
950
|
+
function ut(n, t) {
|
|
951
|
+
return Array.isArray(n) ? n.find((e) => S(e).regexp.test(t)) ?? "" : S(n).regexp.test(t) ? n : "";
|
|
935
952
|
}
|
|
936
|
-
function
|
|
937
|
-
const
|
|
938
|
-
return
|
|
953
|
+
function At(n, t, e) {
|
|
954
|
+
const a = ut(n, t), s = Y(a)(t), r = new URLSearchParams(e), o = Object.fromEntries(r.entries());
|
|
955
|
+
return s ? { ...s.params, ...o } : {};
|
|
939
956
|
}
|
|
940
|
-
function
|
|
957
|
+
function Mt(n, t) {
|
|
941
958
|
const {
|
|
942
959
|
direction: e = "x",
|
|
943
|
-
markerSelector:
|
|
944
|
-
depthLimit:
|
|
960
|
+
markerSelector: a = "[data-swipe-at-edge]",
|
|
961
|
+
depthLimit: s = 24,
|
|
945
962
|
verifyByScroll: r = !1
|
|
946
|
-
} = t ?? {},
|
|
947
|
-
if (!
|
|
948
|
-
const c =
|
|
949
|
-
if (c instanceof HTMLElement && L(c, e) && (!r ||
|
|
963
|
+
} = t ?? {}, o = lt(n);
|
|
964
|
+
if (!o) return { element: null, hasMarker: !1 };
|
|
965
|
+
const c = o.closest?.(a);
|
|
966
|
+
if (c instanceof HTMLElement && L(c, e) && (!r || C(c, e)))
|
|
950
967
|
return { element: c, hasMarker: !0 };
|
|
951
|
-
let l =
|
|
952
|
-
for (; l && u <
|
|
953
|
-
if (L(l, e) && (!r ||
|
|
968
|
+
let l = o, u = 0;
|
|
969
|
+
for (; l && u < s; ) {
|
|
970
|
+
if (L(l, e) && (!r || C(l, e)))
|
|
954
971
|
return { element: l, hasMarker: !1 };
|
|
955
972
|
l = l.parentElement, u++;
|
|
956
973
|
}
|
|
957
974
|
return { element: null, hasMarker: !1 };
|
|
958
975
|
}
|
|
959
|
-
function
|
|
976
|
+
function lt(n) {
|
|
960
977
|
if (!n) return null;
|
|
961
978
|
const t = n, e = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
962
979
|
if (e && e.length) {
|
|
963
|
-
for (const
|
|
964
|
-
if (
|
|
980
|
+
for (const a of e)
|
|
981
|
+
if (a instanceof HTMLElement) return a;
|
|
965
982
|
}
|
|
966
983
|
return n instanceof HTMLElement ? n : null;
|
|
967
984
|
}
|
|
968
985
|
function L(n, t) {
|
|
969
986
|
return t === "y" ? n.scrollHeight - n.clientHeight > 1 : n.scrollWidth - n.clientWidth > 1;
|
|
970
987
|
}
|
|
971
|
-
function
|
|
988
|
+
function C(n, t) {
|
|
972
989
|
if (!L(n, t) || typeof window > "u") return !1;
|
|
973
|
-
const e = window.getComputedStyle(n),
|
|
974
|
-
return
|
|
990
|
+
const e = window.getComputedStyle(n), a = t === "y" ? e.overflowY : e.overflowX;
|
|
991
|
+
return a === "auto" || a === "scroll" || a === "overlay";
|
|
975
992
|
}
|
|
976
993
|
export {
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
994
|
+
pt as TaskManger,
|
|
995
|
+
ct as animationName,
|
|
996
|
+
C as canProgrammaticallyScroll,
|
|
997
|
+
Dt as collectAnimatedProperties,
|
|
998
|
+
wt as compileTransitionStyles,
|
|
999
|
+
Et as consumeSelfInducedPop,
|
|
1000
|
+
j as createDecorator,
|
|
1001
|
+
Nt as createRawDecorator,
|
|
1002
|
+
It as createRawTransition,
|
|
986
1003
|
k as createTransition,
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1004
|
+
X as cupertino,
|
|
1005
|
+
Lt as decoratorMap,
|
|
1006
|
+
ot as easingToCss,
|
|
1007
|
+
Mt as findScrollable,
|
|
1008
|
+
ut as getMatchedPathPattern,
|
|
1009
|
+
At as getParams,
|
|
1010
|
+
vt as isServer,
|
|
1011
|
+
z as layout,
|
|
1012
|
+
Pt as markSelfInducedPop,
|
|
1013
|
+
V as material,
|
|
1014
|
+
Z as none,
|
|
998
1015
|
L as overflowsAxis,
|
|
999
|
-
|
|
1016
|
+
K as overlay,
|
|
1000
1017
|
P as targetToDecls,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1018
|
+
kt as transitionMap,
|
|
1019
|
+
yt as useHistoryStore,
|
|
1020
|
+
gt as useNavigateStore,
|
|
1021
|
+
Tt as useTransitionStore,
|
|
1022
|
+
St as variantHasAnimation
|
|
1006
1023
|
};
|
|
@@ -4,9 +4,10 @@ import { DecoratorName, Decorator, DecoratorOptions } from './typing';
|
|
|
4
4
|
interface CreateDecoratorProps {
|
|
5
5
|
name: DecoratorName;
|
|
6
6
|
initial: InitialTarget;
|
|
7
|
+
idle: TransitionVariantValue;
|
|
7
8
|
enter: TransitionVariantValue;
|
|
8
9
|
exit: TransitionVariantValue;
|
|
9
10
|
options?: DecoratorOptions;
|
|
10
11
|
}
|
|
11
|
-
export default function createDecorator({ name, initial, enter, exit, options }: CreateDecoratorProps): Decorator;
|
|
12
|
+
export default function createDecorator({ name, initial, idle, enter, exit, options }: CreateDecoratorProps): Decorator;
|
|
12
13
|
export {};
|
package/package.json
CHANGED