@akanjs/client 0.9.36 → 0.9.37

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.
@@ -1,8 +1,5 @@
1
1
  "use client";
2
- import {
3
- createContext,
4
- useContext
5
- } from "react";
2
+ import { createContext, useContext } from "react";
6
3
  const DEFAULT_TOP_INSET = 48;
7
4
  const DEFAULT_BOTTOM_INSET = 60;
8
5
  const defaultPageState = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/client",
3
- "version": "0.9.36",
3
+ "version": "0.9.37",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/csrTypes.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ReactDOMAttributes } from "@use-gesture/react/dist/declarations/src/types";
2
- import { type ForwardRefExoticComponent, MutableRefObject, ReactNode, RefObject } from "react";
2
+ import { type ForwardRefExoticComponent, ReactNode, RefObject } from "react";
3
3
  import type { AnimatedComponent, AnimatedProps, Interpolation, SpringValue } from "react-spring";
4
4
  import type { RouterInstance } from "./router";
5
5
  export type TransitionType = "none" | "fade" | "bottomUp" | "stack" | "scaleOut";
@@ -109,13 +109,13 @@ export interface RouteState {
109
109
  clientHeight: number;
110
110
  location: Location;
111
111
  prevLocation: Location | null;
112
- history: MutableRefObject<History>;
113
- topSafeAreaRef: RefObject<HTMLDivElement>;
114
- bottomSafeAreaRef: RefObject<HTMLDivElement>;
115
- prevPageContentRef: RefObject<HTMLDivElement>;
116
- pageContentRef: RefObject<HTMLDivElement>;
117
- frameRootRef: RefObject<HTMLDivElement>;
118
- onBack: MutableRefObject<{
112
+ history: RefObject<History>;
113
+ topSafeAreaRef: RefObject<HTMLDivElement | null>;
114
+ bottomSafeAreaRef: RefObject<HTMLDivElement | null>;
115
+ prevPageContentRef: RefObject<HTMLDivElement | null>;
116
+ pageContentRef: RefObject<HTMLDivElement | null>;
117
+ frameRootRef: RefObject<HTMLDivElement | null>;
118
+ onBack: RefObject<{
119
119
  [K in TransitionType]?: () => Promise<void>;
120
120
  }>;
121
121
  router: RouterInstance;
package/src/device.d.ts CHANGED
@@ -12,7 +12,7 @@ declare class Device {
12
12
  bottomSafeArea: number;
13
13
  isMobile: boolean;
14
14
  init({ lang, supportLanguages }?: DeviceInitOption): Promise<void>;
15
- setPageContentRef(pageContentRef: RefObject<HTMLDivElement>): void;
15
+ setPageContentRef(pageContentRef: RefObject<HTMLDivElement | null>): void;
16
16
  showKeyboard(): Promise<void>;
17
17
  hideKeyboard(): Promise<void>;
18
18
  listenKeyboardChanged(onKeyboardChanged: (height: number) => void): void;