zigap-utils 3.1.0-preview.3 → 3.1.0-preview.5

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.
@@ -0,0 +1,2 @@
1
+ export declare const logDeeplinkSignal: (event: string, extra?: string) => void;
2
+ export declare const installDeeplinkSignalProbes: () => void;
@@ -41,6 +41,7 @@ export type ResumeAction = 'resume' | 'noop' | 'timeout';
41
41
  * 그 외(진행중 + 화면 보임 + 시간 내) → resume (이어서 진행)
42
42
  */
43
43
  export declare const computeResumeAction: (snapshot: DeeplinkSnapshot | null | undefined, visibilityState: string, now?: number, timeoutMs?: number) => ResumeAction;
44
+ export declare const resolveForegroundVisibility: (visibilityState: string, hasFocus: boolean) => string;
44
45
  /** 진행중('pending') 상태의 스냅샷 객체를 만든다 (순수). type='login'/'signMessage' 동일 구조(type-무관). */
45
46
  export declare const makeSnapshot: (roomId: string, nonce: string, type: DeeplinkEnvelopeType | string) => DeeplinkSnapshot;
46
47
  /**
@@ -57,6 +58,12 @@ declare class DeeplinkTransportService {
57
58
  snapshotLoad(roomId: string): DeeplinkSnapshot | null;
58
59
  snapshotClear(roomId: string): void;
59
60
  snapshotClearAll(): void;
61
+ /**
62
+ * 보관된 pending 스냅샷 중 미만료 최신 1건을 반환한다 (풀 리로드 복귀 시 원래 방 복구용).
63
+ * 스냅샷엔 ttl 필드가 없어 기본 timeout 창(DEFAULT_TIMEOUT_MS)을 만료 기준으로 쓴다.
64
+ * 만료 항목은 순회하며 removeItem 으로 정리한다. done/파싱불가/없음 → null.
65
+ */
66
+ snapshotLoadAnyPending(now?: number, timeoutMs?: number): DeeplinkSnapshot | null;
60
67
  }
61
68
  export declare const deeplinkTransport: DeeplinkTransportService;
62
69
  export default deeplinkTransport;
package/package.json CHANGED
@@ -1,70 +1,65 @@
1
1
  {
2
- "name": "zigap-utils",
3
- "version": "3.1.0-preview.3",
4
- "description": "",
5
- "main": "dist/index.es.js",
6
- "types": "dist/index.d.ts",
7
- "author": "Seoullabs",
8
- "license": "ISC",
9
- "homepage": "https://seoul-labs.gitbook.io/zigap-utils",
10
- "repository": {
11
- "type": "git",
12
- "url": "https://github.com/Seoullabs-official/zigap-utils"
13
- },
14
- "files": [
15
- "dist"
16
- ],
17
- "pnpm": {
18
- "onlyBuiltDependencies": [
19
- "esbuild"
20
- ]
21
- },
22
- "scripts": {
23
- "preinstall": "npx only-allow pnpm",
24
- "dev": "vite",
25
- "build": "rm -rf dist && tsx ./src/preprocessEnv.ts && vite build",
26
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
27
- "preview": "vite preview"
28
- },
29
- "dependencies": {
30
- "@rollup/plugin-terser": "^0.4.4",
31
- "dayjs": "^1.11.11",
32
- "dotenv": "^16.4.5",
33
- "react": "^18.2.0 || ^19.0.0",
34
- "react-dom": "^18.2.0 || ^19.0.0",
35
- "styled-components": "^6.1.11",
36
- "tsx": "^4.16.2",
37
- "tweetnacl": "^1.0.3",
38
- "vite-plugin-commonjs": "^0.10.1",
39
- "web3": "^4.16.0"
40
- },
41
- "devDependencies": {
42
- "@types/crypto-js": "^4.2.2",
43
- "@types/elliptic": "^6.4.18",
44
- "@types/node": "^20.12.12",
45
- "@types/react": "^19.0.0",
46
- "@types/react-dom": "^19.0.0",
47
- "@types/styled-components": "^5.1.34",
48
- "@typescript-eslint/eslint-plugin": "^7.2.0",
49
- "@typescript-eslint/parser": "^7.2.0",
50
- "@vitejs/plugin-react": "^4.2.1",
51
- "crypto-js": "^4.2.0",
52
- "elliptic": "^6.5.5",
53
- "eslint": "^8.57.0",
54
- "eslint-config-prettier": "^9.1.0",
55
- "eslint-plugin-import": "^2.29.1",
56
- "eslint-plugin-jsx-a11y": "^6.8.0",
57
- "eslint-plugin-react": "^7.34.1",
58
- "eslint-plugin-react-hooks": "^4.6.2",
59
- "eslint-plugin-react-refresh": "^0.4.6",
60
- "path": "^0.12.7",
61
- "prettier": "^3.2.5",
62
- "qrcode.react": "^4.2.0",
63
- "socket.io-client": "^4.7.5",
64
- "typescript": "^5.2.2",
65
- "vite": "^5.2.0",
66
- "vite-plugin-css-injected-by-js": "^3.5.1",
67
- "vite-plugin-dts": "^3.9.1",
68
- "vite-tsconfig-paths": "^4.3.2"
69
- }
70
- }
2
+ "name": "zigap-utils",
3
+ "version": "3.1.0-preview.5",
4
+ "description": "",
5
+ "main": "dist/index.es.js",
6
+ "types": "dist/index.d.ts",
7
+ "author": "Seoullabs",
8
+ "license": "ISC",
9
+ "homepage": "https://seoul-labs.gitbook.io/zigap-utils",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/Seoullabs-official/zigap-utils"
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "dependencies": {
18
+ "@rollup/plugin-terser": "^0.4.4",
19
+ "dayjs": "^1.11.11",
20
+ "dotenv": "^16.4.5",
21
+ "react": "^18.2.0 || ^19.0.0",
22
+ "react-dom": "^18.2.0 || ^19.0.0",
23
+ "styled-components": "^6.1.11",
24
+ "tsx": "^4.16.2",
25
+ "tweetnacl": "^1.0.3",
26
+ "vite-plugin-commonjs": "^0.10.1",
27
+ "web3": "^4.16.0"
28
+ },
29
+ "devDependencies": {
30
+ "@types/crypto-js": "^4.2.2",
31
+ "@types/elliptic": "^6.4.18",
32
+ "@types/node": "^20.12.12",
33
+ "@types/react": "^19.0.0",
34
+ "@types/react-dom": "^19.0.0",
35
+ "@types/styled-components": "^5.1.34",
36
+ "@typescript-eslint/eslint-plugin": "^7.2.0",
37
+ "@typescript-eslint/parser": "^7.2.0",
38
+ "@vitejs/plugin-react": "^4.2.1",
39
+ "crypto-js": "^4.2.0",
40
+ "elliptic": "^6.5.5",
41
+ "eslint": "^8.57.0",
42
+ "eslint-config-prettier": "^9.1.0",
43
+ "eslint-plugin-import": "^2.29.1",
44
+ "eslint-plugin-jsx-a11y": "^6.8.0",
45
+ "eslint-plugin-react": "^7.34.1",
46
+ "eslint-plugin-react-hooks": "^4.6.2",
47
+ "eslint-plugin-react-refresh": "^0.4.6",
48
+ "path": "^0.12.7",
49
+ "prettier": "^3.2.5",
50
+ "qrcode.react": "^4.2.0",
51
+ "socket.io-client": "^4.7.5",
52
+ "typescript": "^5.2.2",
53
+ "vite": "^5.2.0",
54
+ "vite-plugin-css-injected-by-js": "^3.5.1",
55
+ "vite-plugin-dts": "^3.9.1",
56
+ "vite-tsconfig-paths": "^4.3.2"
57
+ },
58
+ "scripts": {
59
+ "preinstall": "npx only-allow pnpm",
60
+ "dev": "vite",
61
+ "build": "rm -rf dist && tsx ./src/preprocessEnv.ts && vite build",
62
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
63
+ "preview": "vite preview"
64
+ }
65
+ }