@akanjs/next 0.9.45 → 0.9.47

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/cjs/bootCsr.js CHANGED
@@ -73,10 +73,10 @@ const bootCsr = async (context) => {
73
73
  const { transition, safeArea, topInset, bottomInset, gesture, cache } = csrConfig ?? {};
74
74
  const pageState = {
75
75
  transition: transition ?? "none",
76
- topSafeArea: safeArea === false ? 0 : import_client.device.topSafeArea,
77
- bottomSafeArea: safeArea === false ? 0 : import_client.device.bottomSafeArea,
78
- // topSafeArea: safeArea === false || device.info.platform === "android" ? 0 : device.topSafeArea,
79
- // bottomSafeArea: safeArea === false || device.info.platform === "android" ? 0 : device.bottomSafeArea,
76
+ // topSafeArea: safeArea === false ? 0 : device.topSafeArea,
77
+ // bottomSafeArea: safeArea === false ? 0 : device.bottomSafeArea,
78
+ topSafeArea: safeArea === false || import_client.device.info.platform === "android" ? 0 : import_client.device.topSafeArea,
79
+ bottomSafeArea: safeArea === false || import_client.device.info.platform === "android" ? 0 : import_client.device.bottomSafeArea,
80
80
  topInset: topInset === true ? import_client2.DEFAULT_TOP_INSET : topInset === false ? 0 : topInset ?? 0,
81
81
  bottomInset: bottomInset === true ? import_client2.DEFAULT_BOTTOM_INSET : bottomInset === false ? 0 : bottomInset ?? 0,
82
82
  gesture: gesture ?? true,
@@ -336,12 +336,29 @@ const useStackTrans = ({
336
336
  )
337
337
  },
338
338
  contentStyle: {
339
- top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
340
- opacity: transProgress.to((progress) => progress)
339
+ top: transProgress.to(
340
+ [0, 1],
341
+ [
342
+ 0,
343
+ 0
344
+ // -(pageState.bottomInset - prevPageState.bottomInset) * 2
345
+ ]
346
+ ),
347
+ opacity: transProgress.to((progress) => progress),
348
+ //animate origin from top to bottom
349
+ transformOrigin: "top"
341
350
  },
342
351
  prevContentStyle: {
343
- top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
344
- opacity: transProgress.to((progress) => 1 - progress)
352
+ // top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
353
+ height: transProgress.to(
354
+ [0, 1],
355
+ [
356
+ prevPageState.bottomInset ? -(pageState.bottomInset - prevPageState.bottomInset) : 0,
357
+ pageState.bottomInset ? -(pageState.bottomInset - prevPageState.bottomInset) : 0
358
+ ]
359
+ ),
360
+ opacity: transProgress.to((progress) => 1 - progress),
361
+ transformOrigin: "top"
345
362
  }
346
363
  }
347
364
  };
@@ -478,15 +495,19 @@ const useBottomUpTrans = ({
478
495
  [
479
496
  clientHeight - prevPageState.bottomInset - prevPageState.bottomSafeArea,
480
497
  clientHeight - pageState.bottomInset - pageState.bottomSafeArea
498
+ // prevPageState.bottomInset ? clientHeight - pageState.bottomInset - pageState.bottomSafeArea : 0,
481
499
  ]
482
500
  )
483
501
  },
484
502
  contentStyle: {
485
- top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
503
+ top: transProgress.to(
504
+ [0, 1],
505
+ [0, prevPageState.bottomInset ? -(pageState.bottomInset - prevPageState.bottomInset) : 0]
506
+ ),
486
507
  opacity: transProgress.to((progress) => progress)
487
508
  },
488
509
  prevContentStyle: {
489
- top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
510
+ top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset)]),
490
511
  opacity: transProgress.to((progress) => 1 - progress)
491
512
  }
492
513
  }
package/esm/bootCsr.js CHANGED
@@ -46,10 +46,10 @@ const bootCsr = async (context) => {
46
46
  const { transition, safeArea, topInset, bottomInset, gesture, cache } = csrConfig ?? {};
47
47
  const pageState = {
48
48
  transition: transition ?? "none",
49
- topSafeArea: safeArea === false ? 0 : device.topSafeArea,
50
- bottomSafeArea: safeArea === false ? 0 : device.bottomSafeArea,
51
- // topSafeArea: safeArea === false || device.info.platform === "android" ? 0 : device.topSafeArea,
52
- // bottomSafeArea: safeArea === false || device.info.platform === "android" ? 0 : device.bottomSafeArea,
49
+ // topSafeArea: safeArea === false ? 0 : device.topSafeArea,
50
+ // bottomSafeArea: safeArea === false ? 0 : device.bottomSafeArea,
51
+ topSafeArea: safeArea === false || device.info.platform === "android" ? 0 : device.topSafeArea,
52
+ bottomSafeArea: safeArea === false || device.info.platform === "android" ? 0 : device.bottomSafeArea,
53
53
  topInset: topInset === true ? DEFAULT_TOP_INSET : topInset === false ? 0 : topInset ?? 0,
54
54
  bottomInset: bottomInset === true ? DEFAULT_BOTTOM_INSET : bottomInset === false ? 0 : bottomInset ?? 0,
55
55
  gesture: gesture ?? true,
@@ -318,12 +318,29 @@ const useStackTrans = ({
318
318
  )
319
319
  },
320
320
  contentStyle: {
321
- top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
322
- opacity: transProgress.to((progress) => progress)
321
+ top: transProgress.to(
322
+ [0, 1],
323
+ [
324
+ 0,
325
+ 0
326
+ // -(pageState.bottomInset - prevPageState.bottomInset) * 2
327
+ ]
328
+ ),
329
+ opacity: transProgress.to((progress) => progress),
330
+ //animate origin from top to bottom
331
+ transformOrigin: "top"
323
332
  },
324
333
  prevContentStyle: {
325
- top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
326
- opacity: transProgress.to((progress) => 1 - progress)
334
+ // top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
335
+ height: transProgress.to(
336
+ [0, 1],
337
+ [
338
+ prevPageState.bottomInset ? -(pageState.bottomInset - prevPageState.bottomInset) : 0,
339
+ pageState.bottomInset ? -(pageState.bottomInset - prevPageState.bottomInset) : 0
340
+ ]
341
+ ),
342
+ opacity: transProgress.to((progress) => 1 - progress),
343
+ transformOrigin: "top"
327
344
  }
328
345
  }
329
346
  };
@@ -460,15 +477,19 @@ const useBottomUpTrans = ({
460
477
  [
461
478
  clientHeight - prevPageState.bottomInset - prevPageState.bottomSafeArea,
462
479
  clientHeight - pageState.bottomInset - pageState.bottomSafeArea
480
+ // prevPageState.bottomInset ? clientHeight - pageState.bottomInset - pageState.bottomSafeArea : 0,
463
481
  ]
464
482
  )
465
483
  },
466
484
  contentStyle: {
467
- top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
485
+ top: transProgress.to(
486
+ [0, 1],
487
+ [0, prevPageState.bottomInset ? -(pageState.bottomInset - prevPageState.bottomInset) : 0]
488
+ ),
468
489
  opacity: transProgress.to((progress) => progress)
469
490
  },
470
491
  prevContentStyle: {
471
- top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset) * 2]),
492
+ top: transProgress.to([0, 1], [0, -(pageState.bottomInset - prevPageState.bottomInset)]),
472
493
  opacity: transProgress.to((progress) => 1 - progress)
473
494
  }
474
495
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/next",
3
- "version": "0.9.45",
3
+ "version": "0.9.47",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -20,7 +20,7 @@
20
20
  "@capacitor/app": "^7.0.1",
21
21
  "@capacitor/camera": "7.0.1",
22
22
  "@capacitor/device": "7.0.1",
23
- "@capacitor/geolocation": "7.1.2",
23
+ "@capacitor/geolocation": "^7.1.2",
24
24
  "@capacitor/push-notifications": "7.0.1",
25
25
  "@capgo/capacitor-updater": "^7.0.50",
26
26
  "@formatjs/intl-localematcher": "^0.5.10",
package/usePage.d.ts CHANGED
@@ -644,7 +644,7 @@ export declare const usePage: () => {
644
644
  [key: string]: Translation;
645
645
  };
646
646
  })[ModelKey], arg: string): string;
647
- trans<Returns extends import("react").ReactNode>(translation: Record<"en" | "ko" | (string & {}), Returns>): Returns extends string ? string : Returns;
647
+ trans<Returns extends import("react").ReactNode>(translation: Record<(string & {}) | "en" | "ko", Returns>): Returns extends string ? string : Returns;
648
648
  };
649
649
  lang: string;
650
650
  };